@pagopa/io-app-design-system 4.5.0 → 4.5.2
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/Advice/Advice.js +1 -1
- package/lib/commonjs/components/accordion/AccordionItem.js +1 -1
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/accordion/RawAccordion.js +1 -1
- package/lib/commonjs/components/accordion/RawAccordion.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
- package/lib/commonjs/components/buttons/ButtonLink.js +26 -26
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +45 -101
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +71 -64
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +31 -30
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +11 -11
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +30 -30
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
- package/lib/commonjs/components/icons/Icon.js +2 -2
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/README.md +1 -1
- package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js +8 -20
- package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
- package/lib/commonjs/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +2 -2
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +4 -3
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
- package/lib/commonjs/components/numberpad/NumberButton.js +1 -1
- package/lib/commonjs/components/pictograms/Pictogram.js +1 -22
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/spacer/Spacer.js +1 -1
- package/lib/commonjs/components/spacer/Spacer.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +1 -1
- package/lib/commonjs/components/switch/NativeSwitch.js +2 -2
- package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +3 -3
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
- package/lib/commonjs/components/typography/__test__/typography.test.js +13 -13
- package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/commonjs/core/IOColors.js +31 -99
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +2 -2
- package/lib/module/components/Advice/Advice.js +1 -1
- package/lib/module/components/accordion/AccordionItem.js +1 -1
- package/lib/module/components/accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/accordion/RawAccordion.js +1 -1
- package/lib/module/components/accordion/RawAccordion.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
- package/lib/module/components/buttons/ButtonLink.js +27 -27
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +46 -102
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +74 -67
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +32 -31
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +11 -11
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +31 -31
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
- package/lib/module/components/icons/Icon.js +2 -2
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/README.md +1 -1
- package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js +9 -21
- package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
- package/lib/module/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
- package/lib/module/components/layout/HeaderFirstLevel.js +2 -2
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +1 -1
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +4 -3
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
- package/lib/module/components/numberpad/NumberButton.js +1 -1
- package/lib/module/components/pictograms/Pictogram.js +0 -20
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/spacer/Spacer.js +1 -1
- package/lib/module/components/spacer/Spacer.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +1 -1
- package/lib/module/components/switch/NativeSwitch.js +2 -2
- package/lib/module/components/switch/NativeSwitch.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +3 -3
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
- package/lib/module/components/typography/__test__/typography.test.js +13 -13
- package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/module/core/IOColors.js +31 -99
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/core/IOStyles.js +2 -2
- package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +2 -2
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconProductIOAppBlueBg.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts +2 -2
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts +2 -11
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/types.d.ts +0 -1
- package/lib/typescript/components/pictograms/types.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
- package/lib/typescript/components/typography/Caption.d.ts +1 -1
- package/lib/typescript/components/typography/H1.d.ts +1 -1
- package/lib/typescript/components/typography/H2.d.ts +1 -1
- package/lib/typescript/components/typography/H3.d.ts +1 -1
- package/lib/typescript/components/typography/H4.d.ts +1 -1
- package/lib/typescript/components/typography/H5.d.ts +1 -1
- package/lib/typescript/components/typography/H6.d.ts +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +1 -1
- package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
- package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
- package/lib/typescript/core/IOColors.d.ts +5 -35
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +2 -2
- package/lib/typescript/utils/fonts.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Advice/Advice.tsx +1 -1
- package/src/components/accordion/AccordionItem.tsx +1 -1
- package/src/components/accordion/RawAccordion.tsx +1 -1
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
- package/src/components/buttons/ButtonLink.tsx +38 -31
- package/src/components/buttons/ButtonOutline.tsx +55 -112
- package/src/components/buttons/ButtonSolid.tsx +95 -79
- package/src/components/buttons/IconButton.tsx +39 -32
- package/src/components/buttons/IconButtonContained.tsx +11 -11
- package/src/components/buttons/IconButtonSolid.tsx +38 -34
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
- package/src/components/icons/Icon.tsx +2 -2
- package/src/components/icons/README.md +1 -1
- package/src/components/icons/svg/IconProductIOAppBlueBg.tsx +12 -13
- package/src/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
- package/src/components/layout/HeaderFirstLevel.tsx +4 -4
- package/src/components/listitems/ListItemInfo.tsx +1 -1
- package/src/components/listitems/ListItemInfoCopy.tsx +1 -1
- package/src/components/listitems/ListItemNav.tsx +5 -4
- package/src/components/listitems/ListItemNavAlert.tsx +3 -1
- package/src/components/listitems/ListItemTransaction.tsx +1 -1
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
- package/src/components/numberpad/NumberButton.tsx +1 -1
- package/src/components/pictograms/Pictogram.tsx +0 -22
- package/src/components/pictograms/types.ts +0 -1
- package/src/components/spacer/Spacer.tsx +1 -1
- package/src/components/stepper/Stepper.tsx +1 -1
- package/src/components/switch/NativeSwitch.tsx +2 -2
- package/src/components/tabs/TabItem.tsx +3 -3
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
- package/src/components/typography/__test__/typography.test.tsx +18 -16
- package/src/core/IOColors.ts +39 -98
- package/src/core/IOStyles.ts +2 -2
- package/lib/commonjs/components/layout/BlockButtons.js +0 -85
- package/lib/commonjs/components/layout/BlockButtons.js.map +0 -1
- package/lib/commonjs/components/pictograms/svg/PictogramCompleted.js +0 -33
- package/lib/commonjs/components/pictograms/svg/PictogramCompleted.js.map +0 -1
- package/lib/commonjs/components/pictograms/svg/PictogramProcessing.js +0 -33
- package/lib/commonjs/components/pictograms/svg/PictogramProcessing.js.map +0 -1
- package/lib/commonjs/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
- package/lib/module/components/layout/BlockButtons.js +0 -76
- package/lib/module/components/layout/BlockButtons.js.map +0 -1
- package/lib/module/components/pictograms/svg/PictogramCompleted.js +0 -25
- package/lib/module/components/pictograms/svg/PictogramCompleted.js.map +0 -1
- package/lib/module/components/pictograms/svg/PictogramProcessing.js +0 -25
- package/lib/module/components/pictograms/svg/PictogramProcessing.js.map +0 -1
- package/lib/module/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
- package/lib/typescript/components/layout/BlockButtons.d.ts +0 -54
- package/lib/typescript/components/layout/BlockButtons.d.ts.map +0 -1
- package/lib/typescript/components/pictograms/svg/PictogramCompleted.d.ts +0 -5
- package/lib/typescript/components/pictograms/svg/PictogramCompleted.d.ts.map +0 -1
- package/lib/typescript/components/pictograms/svg/PictogramProcessing.d.ts +0 -5
- package/lib/typescript/components/pictograms/svg/PictogramProcessing.d.ts.map +0 -1
- package/src/components/layout/BlockButtons.tsx +0 -143
- package/src/components/pictograms/svg/PictogramCompleted.tsx +0 -22
- package/src/components/pictograms/svg/PictogramProcessing.tsx +0 -22
- package/src/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
|
@@ -64,13 +64,13 @@ const mapColorStates: Record<
|
|
|
64
64
|
neutral: {
|
|
65
65
|
background: {
|
|
66
66
|
default: IOColors.white,
|
|
67
|
-
pressed: IOColors
|
|
67
|
+
pressed: IOColors["grey-50"],
|
|
68
68
|
disabled: "transparent"
|
|
69
69
|
},
|
|
70
70
|
icon: {
|
|
71
|
-
default: IOColors
|
|
71
|
+
default: IOColors["grey-700"],
|
|
72
72
|
pressed: IOColors.black,
|
|
73
|
-
disabled: IOColors
|
|
73
|
+
disabled: IOColors["grey-450"]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
// Contrast button
|
|
@@ -95,27 +95,27 @@ const mapLegacyColorStates: Record<
|
|
|
95
95
|
// Primary button
|
|
96
96
|
primary: {
|
|
97
97
|
background: {
|
|
98
|
-
default: hexToRgba(IOColors
|
|
99
|
-
pressed: hexToRgba(IOColors
|
|
98
|
+
default: hexToRgba(IOColors["blue-500"], 0),
|
|
99
|
+
pressed: hexToRgba(IOColors["blue-500"], 0.15),
|
|
100
100
|
disabled: "transparent"
|
|
101
101
|
},
|
|
102
102
|
icon: {
|
|
103
|
-
default: IOColors
|
|
104
|
-
pressed: IOColors
|
|
105
|
-
disabled: hexToRgba(IOColors
|
|
103
|
+
default: IOColors["blue-500"],
|
|
104
|
+
pressed: IOColors["blue-500"],
|
|
105
|
+
disabled: hexToRgba(IOColors["blue-500"], 0.25)
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
// Neutral button
|
|
109
109
|
neutral: {
|
|
110
110
|
background: {
|
|
111
111
|
default: IOColors.white,
|
|
112
|
-
pressed: IOColors
|
|
112
|
+
pressed: IOColors["grey-50"],
|
|
113
113
|
disabled: "transparent"
|
|
114
114
|
},
|
|
115
115
|
icon: {
|
|
116
|
-
default: IOColors
|
|
116
|
+
default: IOColors["grey-700"],
|
|
117
117
|
pressed: IOColors.black,
|
|
118
|
-
disabled: IOColors
|
|
118
|
+
disabled: IOColors["grey-450"]
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
// Contrast button
|
|
@@ -8,7 +8,8 @@ import Animated, {
|
|
|
8
8
|
import {
|
|
9
9
|
IOButtonStyles,
|
|
10
10
|
IOIconButtonStyles,
|
|
11
|
-
useIOExperimentalDesign
|
|
11
|
+
useIOExperimentalDesign,
|
|
12
|
+
useIOTheme
|
|
12
13
|
} from "../../core";
|
|
13
14
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
14
15
|
import { useScaleAnimation } from "../../hooks";
|
|
@@ -36,35 +37,6 @@ type ColorStates = {
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
|
|
39
|
-
const mapColorStates: Record<
|
|
40
|
-
NonNullable<IconButtonSolid["color"]>,
|
|
41
|
-
ColorStates
|
|
42
|
-
> = {
|
|
43
|
-
// Primary button
|
|
44
|
-
primary: {
|
|
45
|
-
background: {
|
|
46
|
-
default: IOColors["blueIO-500"],
|
|
47
|
-
pressed: IOColors["blueIO-600"],
|
|
48
|
-
disabled: IOColors["grey-100"]
|
|
49
|
-
},
|
|
50
|
-
icon: {
|
|
51
|
-
default: IOColors.white,
|
|
52
|
-
disabled: IOColors["grey-450"]
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
contrast: {
|
|
56
|
-
background: {
|
|
57
|
-
default: IOColors.white,
|
|
58
|
-
pressed: IOColors["blueIO-50"],
|
|
59
|
-
disabled: hexToRgba(IOColors.white, 0.25)
|
|
60
|
-
},
|
|
61
|
-
icon: {
|
|
62
|
-
default: IOColors["blueIO-500"],
|
|
63
|
-
disabled: IOColors["blueIO-500"]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
40
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
69
41
|
const mapLegacyColorStates: Record<
|
|
70
42
|
NonNullable<IconButtonSolid["color"]>,
|
|
@@ -73,7 +45,7 @@ const mapLegacyColorStates: Record<
|
|
|
73
45
|
// Primary button
|
|
74
46
|
primary: {
|
|
75
47
|
background: {
|
|
76
|
-
default: IOColors
|
|
48
|
+
default: IOColors["blue-500"],
|
|
77
49
|
pressed: IOColors["blue-600"],
|
|
78
50
|
disabled: IOColors["grey-100"]
|
|
79
51
|
},
|
|
@@ -89,8 +61,8 @@ const mapLegacyColorStates: Record<
|
|
|
89
61
|
disabled: hexToRgba(IOColors.white, 0.25)
|
|
90
62
|
},
|
|
91
63
|
icon: {
|
|
92
|
-
default: IOColors
|
|
93
|
-
disabled: IOColors
|
|
64
|
+
default: IOColors["blue-500"],
|
|
65
|
+
disabled: IOColors["blue-500"]
|
|
94
66
|
}
|
|
95
67
|
}
|
|
96
68
|
};
|
|
@@ -104,15 +76,47 @@ export const IconButtonSolid = ({
|
|
|
104
76
|
accessibilityHint,
|
|
105
77
|
testID
|
|
106
78
|
}: IconButtonSolid) => {
|
|
79
|
+
const theme = useIOTheme();
|
|
107
80
|
const { isExperimental } = useIOExperimentalDesign();
|
|
108
81
|
|
|
109
82
|
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
110
83
|
useScaleAnimation("exaggerated");
|
|
111
84
|
const reducedMotion = useReducedMotion();
|
|
112
85
|
|
|
86
|
+
const mapColorStates = React.useMemo<
|
|
87
|
+
Record<NonNullable<IconButtonSolid["color"]>, ColorStates>
|
|
88
|
+
>(
|
|
89
|
+
() => ({
|
|
90
|
+
// Primary button
|
|
91
|
+
primary: {
|
|
92
|
+
background: {
|
|
93
|
+
default: IOColors[theme["interactiveElem-default"]],
|
|
94
|
+
pressed: IOColors[theme["interactiveElem-pressed"]],
|
|
95
|
+
disabled: IOColors[theme["interactiveElem-disabled"]]
|
|
96
|
+
},
|
|
97
|
+
icon: {
|
|
98
|
+
default: IOColors[theme["buttonText-default"]],
|
|
99
|
+
disabled: IOColors[theme["buttonText-disabled"]]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
contrast: {
|
|
103
|
+
background: {
|
|
104
|
+
default: IOColors.white,
|
|
105
|
+
pressed: IOColors["blueIO-50"],
|
|
106
|
+
disabled: hexToRgba(IOColors.white, 0.25)
|
|
107
|
+
},
|
|
108
|
+
icon: {
|
|
109
|
+
default: IOColors["blueIO-500"],
|
|
110
|
+
disabled: IOColors["blueIO-500"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
[theme]
|
|
115
|
+
);
|
|
116
|
+
|
|
113
117
|
const colorMap = React.useMemo(
|
|
114
118
|
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
115
|
-
[isExperimental]
|
|
119
|
+
[isExperimental, mapColorStates]
|
|
116
120
|
);
|
|
117
121
|
|
|
118
122
|
const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
|
|
@@ -176,7 +176,7 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
|
|
|
176
176
|
},
|
|
177
177
|
false,
|
|
178
178
|
{
|
|
179
|
-
"backgroundColor": "rgba(
|
|
179
|
+
"backgroundColor": "rgba(9,50,182,0)",
|
|
180
180
|
"borderColor": "#0B3EE3",
|
|
181
181
|
},
|
|
182
182
|
{
|
|
@@ -282,15 +282,14 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
282
282
|
"textAlignVertical": "center",
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
+
"backgroundColor": "#0B3EE3",
|
|
285
286
|
"overflow": "hidden",
|
|
286
287
|
},
|
|
287
288
|
false,
|
|
288
289
|
{
|
|
289
290
|
"height": 48,
|
|
290
291
|
},
|
|
291
|
-
{
|
|
292
|
-
"backgroundColor": "#0B3EE3",
|
|
293
|
-
},
|
|
292
|
+
{},
|
|
294
293
|
{
|
|
295
294
|
"transform": [
|
|
296
295
|
{
|
|
@@ -1024,15 +1023,14 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1024
1023
|
"textAlignVertical": "center",
|
|
1025
1024
|
},
|
|
1026
1025
|
{
|
|
1026
|
+
"backgroundColor": "#0073E6",
|
|
1027
1027
|
"overflow": "hidden",
|
|
1028
1028
|
},
|
|
1029
1029
|
false,
|
|
1030
1030
|
{
|
|
1031
1031
|
"height": 40,
|
|
1032
1032
|
},
|
|
1033
|
-
{
|
|
1034
|
-
"backgroundColor": "#0073E6",
|
|
1035
|
-
},
|
|
1033
|
+
{},
|
|
1036
1034
|
{
|
|
1037
1035
|
"transform": [
|
|
1038
1036
|
{
|
|
@@ -427,7 +427,7 @@ change its color values. It accepts `IOColors` values only.
|
|
|
427
427
|
*/
|
|
428
428
|
export const Icon = ({
|
|
429
429
|
name,
|
|
430
|
-
color = "
|
|
430
|
+
color = "grey-700",
|
|
431
431
|
size = 24,
|
|
432
432
|
accessible = false,
|
|
433
433
|
accessibilityLabel = "",
|
|
@@ -471,7 +471,7 @@ type IOAnimatedIconsProps = {
|
|
|
471
471
|
|
|
472
472
|
export const AnimatedIcon = ({
|
|
473
473
|
name,
|
|
474
|
-
color = IOColors
|
|
474
|
+
color = IOColors["grey-700"],
|
|
475
475
|
size = 24,
|
|
476
476
|
accessible = false,
|
|
477
477
|
allowFontScaling = false,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Path, Svg } from "react-native-svg";
|
|
3
|
+
import { IOColors } from "../../../core";
|
|
3
4
|
import { SVGIconProps } from "../types";
|
|
4
5
|
|
|
5
6
|
const IconProductIOAppBlueBg = ({ size, style, ...props }: SVGIconProps) => (
|
|
6
7
|
<Svg width={size} height={size} viewBox="0 0 24 24" style={style} {...props}>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<Path fill="#fff" d="M-13-13h50v50h-50z" />
|
|
18
|
-
</G>
|
|
8
|
+
<Path
|
|
9
|
+
d="M0 9.6c0-3.36 0-5.04.654-6.324A6 6 0 0 1 3.276.654C4.56 0 6.24 0 9.6 0h4.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C24 4.56 24 6.24 24 9.6v4.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C19.44 24 17.76 24 14.4 24H9.6c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C0 19.44 0 17.76 0 14.4V9.6Z"
|
|
10
|
+
fill={IOColors["blueIO-500"]}
|
|
11
|
+
/>
|
|
12
|
+
<Path
|
|
13
|
+
fillRule="evenodd"
|
|
14
|
+
clipRule="evenodd"
|
|
15
|
+
d="M7.21 6.4a1.35 1.35 0 1 1 0 2.7 1.35 1.35 0 0 1 0-2.7Zm11.34 6.48c0 2.386-1.934 4.32-4.114 4.32-2.592 0-4.526-1.934-4.526-4.32s1.934-4.32 4.526-4.32c2.18 0 4.114 1.934 4.114 4.32ZM8.29 11.53a1.08 1.08 0 1 0-2.16 0v4.59a1.08 1.08 0 0 0 2.16 0v-4.59Zm7.001.897h.576v-.566h-.571v-.685h-.625v2.277c0 .36.05.606.153.737.1.136.29.202.57.202.108 0 .27-.026.477-.075l-.03-.526-.355.009c-.062 0-.108-.013-.137-.044a.177.177 0 0 1-.05-.105 2.24 2.24 0 0 1-.008-.211v-1.013Zm-1.882-.562v2.47h.624v-2.47h-.624Zm-.938-.062a.366.366 0 0 1 .378.385c0 .11-.034.196-.105.27a.37.37 0 0 1-.269.101.375.375 0 0 1-.382-.38c0-.106.038-.196.105-.27a.363.363 0 0 1 .273-.106Z"
|
|
16
|
+
fill={IOColors.white}
|
|
17
|
+
/>
|
|
19
18
|
</Svg>
|
|
20
19
|
);
|
|
21
20
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<path
|
|
3
|
+
d="M0 9.6c0-3.36 0-5.04.654-6.324A6 6 0 0 1 3.276.654C4.56 0 6.24 0 9.6 0h4.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C24 4.56 24 6.24 24 9.6v4.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C19.44 24 17.76 24 14.4 24H9.6c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C0 19.44 0 17.76 0 14.4V9.6Z"
|
|
4
|
+
fill="#0B3EE3"
|
|
5
|
+
/>
|
|
6
|
+
<path
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
clip-rule="evenodd"
|
|
9
|
+
d="M7.21 6.4a1.35 1.35 0 1 1 0 2.7 1.35 1.35 0 0 1 0-2.7Zm11.34 6.48c0 2.386-1.934 4.32-4.114 4.32-2.592 0-4.526-1.934-4.526-4.32s1.934-4.32 4.526-4.32c2.18 0 4.114 1.934 4.114 4.32ZM8.29 11.53a1.08 1.08 0 1 0-2.16 0v4.59a1.08 1.08 0 0 0 2.16 0v-4.59Zm7.001.897h.576v-.566h-.571v-.685h-.625v2.277c0 .36.05.606.153.737.1.136.29.202.57.202.108 0 .27-.026.477-.075l-.03-.526-.355.009c-.062 0-.108-.013-.137-.044a.177.177 0 0 1-.05-.105 2.24 2.24 0 0 1-.008-.211v-1.013Zm-1.882-.562v2.47h.624v-2.47h-.624Zm-.938-.062a.366.366 0 0 1 .378.385c0 .11-.034.196-.105.27a.37.37 0 0 1-.269.101.375.375 0 0 1-.382-.38c0-.106.038-.196.105-.27a.363.363 0 0 1 .273-.106Z"
|
|
10
|
+
fill="#fff"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -28,8 +28,8 @@ import { HeaderActionProps } from "./common";
|
|
|
28
28
|
|
|
29
29
|
export type HeaderFirstLevel = WithTestID<{
|
|
30
30
|
title: string;
|
|
31
|
-
firstAction
|
|
32
|
-
secondAction
|
|
31
|
+
firstAction?: HeaderActionProps;
|
|
32
|
+
secondAction?: HeaderActionProps;
|
|
33
33
|
thirdAction?: HeaderActionProps;
|
|
34
34
|
animatedRef?: AnimatedRef<Animated.ScrollView>;
|
|
35
35
|
animatedFlatListRef?: AnimatedRef<Animated.FlatList<any>>;
|
|
@@ -134,8 +134,8 @@ export const HeaderFirstLevel = ({
|
|
|
134
134
|
</View>
|
|
135
135
|
<HStack space={16} style={{ flexShrink: 0 }}>
|
|
136
136
|
{thirdAction && <IconButton {...thirdAction} color={"primary"} />}
|
|
137
|
-
<IconButton {...secondAction} color={"primary"} />
|
|
138
|
-
<IconButton {...firstAction} color={"primary"} />
|
|
137
|
+
{secondAction && <IconButton {...secondAction} color={"primary"} />}
|
|
138
|
+
{firstAction && <IconButton {...firstAction} color={"primary"} />}
|
|
139
139
|
</HStack>
|
|
140
140
|
</View>
|
|
141
141
|
</Animated.View>
|
|
@@ -81,7 +81,7 @@ export const ListItemNav = ({
|
|
|
81
81
|
description,
|
|
82
82
|
onPress,
|
|
83
83
|
icon,
|
|
84
|
-
iconColor
|
|
84
|
+
iconColor,
|
|
85
85
|
avatarProps: avatar,
|
|
86
86
|
paymentLogoUri,
|
|
87
87
|
accessibilityLabel,
|
|
@@ -96,6 +96,9 @@ export const ListItemNav = ({
|
|
|
96
96
|
useListItemAnimation();
|
|
97
97
|
const theme = useIOTheme();
|
|
98
98
|
|
|
99
|
+
const defaultIconColor = iconColor ?? theme["icon-decorative"];
|
|
100
|
+
const interactiveColor = theme["interactiveElem-default"];
|
|
101
|
+
|
|
99
102
|
const { dynamicFontScale, hugeFontEnabled } = useIOFontDynamicScale();
|
|
100
103
|
|
|
101
104
|
const listItemNavContent = (
|
|
@@ -151,8 +154,6 @@ export const ListItemNav = ({
|
|
|
151
154
|
</>
|
|
152
155
|
);
|
|
153
156
|
|
|
154
|
-
const interactiveColor = theme["interactiveElem-default"];
|
|
155
|
-
|
|
156
157
|
const handleOnPress = (event: GestureResponderEvent) => {
|
|
157
158
|
if (!loading) {
|
|
158
159
|
onPress(event);
|
|
@@ -188,7 +189,7 @@ export const ListItemNav = ({
|
|
|
188
189
|
<Icon
|
|
189
190
|
allowFontScaling
|
|
190
191
|
name={icon}
|
|
191
|
-
color={
|
|
192
|
+
color={defaultIconColor}
|
|
192
193
|
size={IOListItemVisualParams.iconSize}
|
|
193
194
|
/>
|
|
194
195
|
<HSpacer
|
|
@@ -123,7 +123,7 @@ export const ListItemTransaction = ({
|
|
|
123
123
|
|
|
124
124
|
const interactiveColor: IOColors = isExperimental
|
|
125
125
|
? theme["interactiveElem-default"]
|
|
126
|
-
: "blue";
|
|
126
|
+
: "blue-500";
|
|
127
127
|
|
|
128
128
|
const amountColorDefault: IOColors = theme["textBody-default"];
|
|
129
129
|
const amountColorRefund: IOColors = theme.successText;
|
|
@@ -2800,7 +2800,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2800
2800
|
"width": 24,
|
|
2801
2801
|
},
|
|
2802
2802
|
{
|
|
2803
|
-
"borderColor": "#
|
|
2803
|
+
"borderColor": "#555C70",
|
|
2804
2804
|
},
|
|
2805
2805
|
]
|
|
2806
2806
|
}
|
|
@@ -3085,7 +3085,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3085
3085
|
"width": 24,
|
|
3086
3086
|
},
|
|
3087
3087
|
{
|
|
3088
|
-
"borderColor": "#
|
|
3088
|
+
"borderColor": "#555C70",
|
|
3089
3089
|
},
|
|
3090
3090
|
]
|
|
3091
3091
|
}
|
|
@@ -56,7 +56,7 @@ const legacyColorMap: Record<NumberButtonVariantType, ColorMapVariant> = {
|
|
|
56
56
|
light: {
|
|
57
57
|
background: IOColors["grey-100"],
|
|
58
58
|
pressed: IOColors["grey-200"],
|
|
59
|
-
foreground: "blue"
|
|
59
|
+
foreground: "blue-500"
|
|
60
60
|
},
|
|
61
61
|
dark: {
|
|
62
62
|
background: hexToRgba(IOColors.black, 0.1),
|
|
@@ -12,7 +12,6 @@ import PictogramCameraDenied from "./svg/PictogramCameraDenied";
|
|
|
12
12
|
import PictogramCameraRequest from "./svg/PictogramCameraRequest";
|
|
13
13
|
import PictogramCharity from "./svg/PictogramCharity";
|
|
14
14
|
import PictogramCie from "./svg/PictogramCie";
|
|
15
|
-
import PictogramCompleted from "./svg/PictogramCompleted";
|
|
16
15
|
import PictogramComunicationProblem from "./svg/PictogramComunicationProblem";
|
|
17
16
|
import PictogramEmpty from "./svg/PictogramEmpty";
|
|
18
17
|
import PictogramEmptyArchive from "./svg/PictogramEmptyArchive";
|
|
@@ -36,7 +35,6 @@ import PictogramObjManual from "./svg/PictogramObjManual";
|
|
|
36
35
|
import PictogramObjTrash from "./svg/PictogramObjTrash";
|
|
37
36
|
import PictogramPasscode from "./svg/PictogramPasscode";
|
|
38
37
|
import PictogramPayments from "./svg/PictogramPayments";
|
|
39
|
-
import PictogramProcessing from "./svg/PictogramProcessing";
|
|
40
38
|
import PictogramSecurity from "./svg/PictogramSecurity";
|
|
41
39
|
import PictogramStopSecurity from "./svg/PictogramStopSecurity";
|
|
42
40
|
import PictogramSuccess from "./svg/PictogramSuccess";
|
|
@@ -117,10 +115,6 @@ import PictogramWalletDoc from "./svg/PictogramWalletDoc";
|
|
|
117
115
|
import { SVGPictogramProps } from "./types";
|
|
118
116
|
|
|
119
117
|
export const IOPictograms = {
|
|
120
|
-
// Start legacy pictograms //
|
|
121
|
-
processing: PictogramProcessing,
|
|
122
|
-
completed: PictogramCompleted,
|
|
123
|
-
// End legacy pictograms
|
|
124
118
|
empty: PictogramEmpty,
|
|
125
119
|
feature: PictogramFeature,
|
|
126
120
|
charity: PictogramCharity,
|
|
@@ -197,7 +191,6 @@ export type IOPictogramSizeScale = 48 | 64 | 72 | 80 | 120 | 180;
|
|
|
197
191
|
|
|
198
192
|
type IOPictogramsProps = {
|
|
199
193
|
name: IOPictograms;
|
|
200
|
-
color?: IOColors;
|
|
201
194
|
/* Not too happy about the API choice,
|
|
202
195
|
but at least we have the same <StatusBar …>
|
|
203
196
|
component props. */
|
|
@@ -215,7 +208,6 @@ type PictogramPalette = {
|
|
|
215
208
|
|
|
216
209
|
export const Pictogram = ({
|
|
217
210
|
name,
|
|
218
|
-
color = "aqua",
|
|
219
211
|
pictogramStyle = "default",
|
|
220
212
|
size = 120,
|
|
221
213
|
allowFontScaling = false,
|
|
@@ -256,7 +248,6 @@ export const Pictogram = ({
|
|
|
256
248
|
<PictogramElement
|
|
257
249
|
{...props}
|
|
258
250
|
size={pictogramSize}
|
|
259
|
-
color={IOColors[color]}
|
|
260
251
|
colorValues={colorValues}
|
|
261
252
|
/>
|
|
262
253
|
);
|
|
@@ -365,7 +356,6 @@ export const IOPictogramsBleed: {
|
|
|
365
356
|
|
|
366
357
|
export const PictogramBleed = ({
|
|
367
358
|
name,
|
|
368
|
-
color = "aqua",
|
|
369
359
|
size = 80,
|
|
370
360
|
pictogramStyle = "default",
|
|
371
361
|
allowFontScaling = false,
|
|
@@ -406,7 +396,6 @@ export const PictogramBleed = ({
|
|
|
406
396
|
<PictogramElement
|
|
407
397
|
{...props}
|
|
408
398
|
size={pictogramSize}
|
|
409
|
-
color={IOColors[color]}
|
|
410
399
|
colorValues={colorValues}
|
|
411
400
|
/>
|
|
412
401
|
);
|
|
@@ -428,14 +417,3 @@ export const IOPictogramsObject = {
|
|
|
428
417
|
} as const;
|
|
429
418
|
|
|
430
419
|
export type IOPictogramsObject = keyof typeof IOPictogramsObject;
|
|
431
|
-
|
|
432
|
-
/* Legacy pictograms */
|
|
433
|
-
|
|
434
|
-
const { processing, completed } = IOPictograms;
|
|
435
|
-
|
|
436
|
-
export const IOPictogramsLegacy = {
|
|
437
|
-
processing,
|
|
438
|
-
completed
|
|
439
|
-
} as const;
|
|
440
|
-
|
|
441
|
-
export type IOPictogramsLegacy = keyof typeof IOPictogramsLegacy;
|
|
@@ -18,7 +18,7 @@ type OwnProps = Pick<
|
|
|
18
18
|
|
|
19
19
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
20
20
|
const bgLegacyTrackColorAndroid =
|
|
21
|
-
Platform.OS === "android" ? IOColors["grey-300"] : IOColors
|
|
21
|
+
Platform.OS === "android" ? IOColors["grey-300"] : IOColors["grey-50"];
|
|
22
22
|
|
|
23
23
|
export const NativeSwitch = ({
|
|
24
24
|
onValueChange,
|
|
@@ -34,7 +34,7 @@ export const NativeSwitch = ({
|
|
|
34
34
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
35
35
|
const legacyTrackColor = {
|
|
36
36
|
false: bgLegacyTrackColorAndroid,
|
|
37
|
-
true: IOColors
|
|
37
|
+
true: IOColors["blue-500"]
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const trackColorComponent = isExperimental ? trackColor : legacyTrackColor;
|
|
@@ -100,17 +100,17 @@ const mapLegacyColorStates: Record<
|
|
|
100
100
|
light: {
|
|
101
101
|
border: {
|
|
102
102
|
default: IOColors["grey-300"],
|
|
103
|
-
selected: IOColors
|
|
103
|
+
selected: IOColors["blue-500"],
|
|
104
104
|
disabled: hexToRgba(IOColors.white)
|
|
105
105
|
},
|
|
106
106
|
background: {
|
|
107
107
|
default: IOColors.white,
|
|
108
|
-
selected: hexToRgba(IOColors
|
|
108
|
+
selected: hexToRgba(IOColors["blue-500"], 0.1),
|
|
109
109
|
pressed: IOColors.white
|
|
110
110
|
},
|
|
111
111
|
foreground: {
|
|
112
112
|
default: "black",
|
|
113
|
-
selected: "blue",
|
|
113
|
+
selected: "blue-500",
|
|
114
114
|
disabled: "grey-700"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
@@ -103,7 +103,7 @@ exports[`Test Typography Components BodySmall Snapshot 3`] = `
|
|
|
103
103
|
[
|
|
104
104
|
{},
|
|
105
105
|
{
|
|
106
|
-
"color": "#
|
|
106
|
+
"color": "#555C70",
|
|
107
107
|
"fontFamily": "Titillium Sans Pro",
|
|
108
108
|
"fontSize": 14,
|
|
109
109
|
"fontStyle": "normal",
|
|
@@ -126,7 +126,7 @@ exports[`Test Typography Components BodySmall Snapshot 4`] = `
|
|
|
126
126
|
[
|
|
127
127
|
{},
|
|
128
128
|
{
|
|
129
|
-
"color": "#
|
|
129
|
+
"color": "#D13333",
|
|
130
130
|
"fontFamily": "Titillium Sans Pro",
|
|
131
131
|
"fontSize": 14,
|
|
132
132
|
"fontStyle": "normal",
|
|
@@ -286,7 +286,7 @@ exports[`Test Typography Components H3 Snapshot 2`] = `
|
|
|
286
286
|
[
|
|
287
287
|
{},
|
|
288
288
|
{
|
|
289
|
-
"color": "#
|
|
289
|
+
"color": "#D2D6E3",
|
|
290
290
|
"fontFamily": "Titillium Sans Pro",
|
|
291
291
|
"fontSize": 22,
|
|
292
292
|
"fontStyle": "normal",
|
|
@@ -476,7 +476,7 @@ exports[`Test Typography Components H5 Snapshot 2`] = `
|
|
|
476
476
|
"textTransform": "uppercase",
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
|
-
"color": "#
|
|
479
|
+
"color": "#555C70",
|
|
480
480
|
"fontFamily": "Titillium Sans Pro",
|
|
481
481
|
"fontSize": 14,
|
|
482
482
|
"fontStyle": "normal",
|