Skip to content

Commit ef8770c

Browse files
chore: add new home card (#633)
* chore: add new home card * chore: change js file to tsx * chore(statusItem): add button action to trigger show/hide treatment details * chore: fix asc/desc yes/no indicator * Update app/src/utils/indicatorUtils.ts Co-authored-by: Revu <dnum.fabrique@sg.social.gouv.fr> --------- Co-authored-by: Revu <dnum.fabrique@sg.social.gouv.fr>
1 parent e36e657 commit ef8770c

File tree

16 files changed

+441
-420
lines changed

16 files changed

+441
-420
lines changed

app/assets/svg/icon/File.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Svg, Path } from "react-native-svg";
2+
3+
export default function FileIcon({ width = 20, height = 20 }) {
4+
return (
5+
<Svg width={width} height={height} viewBox="0 0 20 20" fill="none">
6+
<Path
7+
d="M11.6667 1.89124V5.33335C11.6667 5.80006 11.6667 6.03342 11.7575 6.21168C11.8374 6.36848 11.9649 6.49596 12.1217 6.57586C12.3 6.66669 12.5333 6.66669 13 6.66669H16.4422M11.6667 14.1666H6.66671M13.3334 10.8333H6.66671M16.6667 8.32348V14.3333C16.6667 15.7334 16.6667 16.4335 16.3942 16.9683C16.1545 17.4387 15.7721 17.8211 15.3017 18.0608C14.7669 18.3333 14.0668 18.3333 12.6667 18.3333H7.33337C5.93324 18.3333 5.23318 18.3333 4.6984 18.0608C4.22799 17.8211 3.84554 17.4387 3.60586 16.9683C3.33337 16.4335 3.33337 15.7334 3.33337 14.3333V5.66663C3.33337 4.26649 3.33337 3.56643 3.60586 3.03165C3.84554 2.56124 4.22799 2.17879 4.6984 1.93911C5.23318 1.66663 5.93324 1.66663 7.33337 1.66663H10.0099C10.6213 1.66663 10.9271 1.66663 11.2148 1.7357C11.4699 1.79694 11.7137 1.89795 11.9374 2.03503C12.1897 2.18963 12.4059 2.40582 12.8383 2.8382L15.4951 5.49505C15.9275 5.92743 16.1437 6.14362 16.2983 6.39591C16.4354 6.61959 16.5364 6.86346 16.5976 7.11855C16.6667 7.40627 16.6667 7.712 16.6667 8.32348Z"
8+
stroke="#617778"
9+
strokeWidth="1.66667"
10+
strokeLinecap="round"
11+
strokeLinejoin="round"
12+
/>
13+
</Svg>
14+
);
15+
}

app/assets/svg/smileys/bad.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import { iconColors } from "@/utils/constants";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Circle, Path } from "react-native-svg";
33

4-
export default function SmileyBad({ width = 27, height = 28 }: { width?: number; height?: number }) {
4+
export default function SmileyBad({
5+
width = 27,
6+
height = 28,
7+
backgroundColor = "transparent",
8+
}: {
9+
width?: number;
10+
height?: number;
11+
backgroundColor: string;
12+
}) {
513
return (
614
<Svg width={width} height={height} viewBox="0 0 27 28" fill="none">
15+
<Circle
16+
cx={13.5}
17+
cy={14}
18+
r={11.5} // correspond à ton Path
19+
fill={backgroundColor} // 👉 ta couleur intérieure
20+
/>
721
<Path
822
d="M17.5611 18.3826C17.5611 18.3826 15.9176 16.1913 13.1784 16.1913C10.4393 16.1913 8.79584 18.3826 8.79584 18.3826M16.4654 10.713H16.4764M9.89149 10.713H9.90245M24.135 14C24.135 20.0511 19.2296 24.9565 13.1784 24.9565C7.12733 24.9565 2.22192 20.0511 2.22192 14C2.22192 7.94888 7.12733 3.04348 13.1784 3.04348C19.2296 3.04348 24.135 7.94888 24.135 14ZM17.0132 10.713C17.0132 11.0156 16.768 11.2609 16.4654 11.2609C16.1628 11.2609 15.9176 11.0156 15.9176 10.713C15.9176 10.4105 16.1628 10.1652 16.4654 10.1652C16.768 10.1652 17.0132 10.4105 17.0132 10.713ZM10.4393 10.713C10.4393 11.0156 10.194 11.2609 9.89149 11.2609C9.58893 11.2609 9.34366 11.0156 9.34366 10.713C9.34366 10.4105 9.58893 10.1652 9.89149 10.1652C10.194 10.1652 10.4393 10.4105 10.4393 10.713Z"
923
stroke={iconColors.bad}

app/assets/svg/smileys/good.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import { iconColors } from "@/utils/constants";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Circle, Path } from "react-native-svg";
33

4-
export default function SmileyGood({ width = 25, height = 26 }: { width?: number; height?: number }) {
4+
export default function SmileyGood({
5+
width = 25,
6+
height = 26,
7+
backgroundColor = "transparent",
8+
}: {
9+
width?: number;
10+
height?: number;
11+
backgroundColor: string;
12+
}) {
513
return (
614
<Svg width={width} height={height} viewBox="0 0 25 26" fill="none">
15+
<Circle
16+
cx={13.5}
17+
cy={14}
18+
r={11.5} // correspond à ton Path
19+
fill={backgroundColor} // 👉 ta couleur intérieure
20+
/>
721
<Path
822
d="M7.79584 15.1913C7.79584 15.1913 9.43932 17.3826 12.1784 17.3826C14.9176 17.3826 16.5611 15.1913 16.5611 15.1913M15.4654 9.71304H15.4764M8.89149 9.71304H8.90245M23.135 13C23.135 19.0511 18.2296 23.9565 12.1784 23.9565C6.12733 23.9565 1.22192 19.0511 1.22192 13C1.22192 6.94888 6.12733 2.04348 12.1784 2.04348C18.2296 2.04348 23.135 6.94888 23.135 13ZM16.0132 9.71304C16.0132 10.0156 15.768 10.2609 15.4654 10.2609C15.1628 10.2609 14.9176 10.0156 14.9176 9.71304C14.9176 9.41049 15.1628 9.16522 15.4654 9.16522C15.768 9.16522 16.0132 9.41049 16.0132 9.71304ZM9.43932 9.71304C9.43932 10.0156 9.19405 10.2609 8.89149 10.2609C8.58893 10.2609 8.34366 10.0156 8.34366 9.71304C8.34366 9.41049 8.58893 9.16522 8.89149 9.16522C9.19405 9.16522 9.43932 9.41049 9.43932 9.71304Z"
923
stroke={iconColors.good}

app/assets/svg/smileys/middle.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import { iconColors } from "@/utils/constants";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Circle, Path } from "react-native-svg";
33

4-
export default function SmileyMiddle({ width = 27, height = 28 }: { width?: number; height?: number }) {
4+
export default function SmileyMiddle({
5+
width = 27,
6+
height = 28,
7+
backgroundColor = "transparent",
8+
}: {
9+
width?: number;
10+
height?: number;
11+
backgroundColor?: string;
12+
}) {
513
return (
614
<Svg width={width} height={height} viewBox="0 0 27 28" fill="none">
15+
<Circle
16+
cx={13.5}
17+
cy={14}
18+
r={11.5} // correspond à ton Path
19+
fill={backgroundColor} // 👉 ta couleur intérieure
20+
/>
721
<Path
822
d="M8.79584 17.287H17.5611M16.4654 10.713H16.4764M9.89149 10.713H9.90245M24.135 14C24.135 20.0511 19.2296 24.9565 13.1784 24.9565C7.12733 24.9565 2.22192 20.0511 2.22192 14C2.22192 7.94888 7.12733 3.04348 13.1784 3.04348C19.2296 3.04348 24.135 7.94888 24.135 14ZM17.0132 10.713C17.0132 11.0156 16.768 11.2609 16.4654 11.2609C16.1628 11.2609 15.9176 11.0156 15.9176 10.713C15.9176 10.4105 16.1628 10.1652 16.4654 10.1652C16.768 10.1652 17.0132 10.4105 17.0132 10.713ZM10.4393 10.713C10.4393 11.0156 10.194 11.2609 9.89149 11.2609C9.58893 11.2609 9.34366 11.0156 9.34366 10.713C9.34366 10.4105 9.58893 10.1652 9.89149 10.1652C10.194 10.1652 10.4393 10.4105 10.4393 10.713Z"
923
stroke={iconColors.middle}

app/assets/svg/smileys/veryBad.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import { iconColors } from "@/utils/constants";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Circle, Path } from "react-native-svg";
33

4-
export default function SmileyVeryBad({ width = 25, height = 26 }: { width?: number; height?: number }) {
4+
export default function SmileyVeryBad({
5+
width = 25,
6+
height = 26,
7+
backgroundColor = "transparent",
8+
}: {
9+
width?: number;
10+
height?: number;
11+
backgroundColor: string;
12+
}) {
513
return (
614
<Svg width={width} height={height} viewBox="0 0 27 28" fill="none">
15+
<Circle
16+
cx={13.5}
17+
cy={14}
18+
r={11.5} // correspond à ton Path
19+
fill={backgroundColor} // 👉 ta couleur intérieure
20+
/>
721
<Path
822
d="M17.8826 18.3826C17.8826 18.3826 16.2391 16.1913 13.5 16.1913C10.7608 16.1913 9.11737 18.3826 9.11737 18.3826M18.9782 10.976C18.5455 11.5074 17.9538 11.8087 17.3348 11.8087C16.7157 11.8087 16.1405 11.5074 15.6913 10.976M11.3087 10.976C10.8759 11.5074 10.2842 11.8087 9.6652 11.8087C9.04615 11.8087 8.47094 11.5074 8.02172 10.976M24.4565 14C24.4565 20.0511 19.5511 24.9565 13.5 24.9565C7.44886 24.9565 2.54346 20.0511 2.54346 14C2.54346 7.94886 7.44886 3.04346 13.5 3.04346C19.5511 3.04346 24.4565 7.94886 24.4565 14Z"
923
stroke={iconColors.veryBad}

app/assets/svg/smileys/veryGood.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import { iconColors } from "@/utils/constants";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Circle, Path } from "react-native-svg";
33

4-
export default function SmileyVeryGood({ width = 27, height = 28 }: { width?: number; height?: number }) {
4+
export default function SmileyVeryGood({
5+
width = 27,
6+
height = 28,
7+
backgroundColor = "transparent",
8+
}: {
9+
width?: number;
10+
height?: number;
11+
backgroundColor: string;
12+
}) {
513
return (
614
<Svg width={width} height={height} viewBox="0 0 27 28" fill="none">
15+
<Circle
16+
cx={13.5}
17+
cy={14}
18+
r={11.5} // correspond à ton Path
19+
fill={backgroundColor} // 👉 ta couleur intérieure
20+
/>
721
<Path
822
stroke={iconColors.veryGood}
923
strokeWidth={2.1}

app/src/components/CircledIcon.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ import SmileyVeryBad from "@assets/svg/smileys/veryBad";
1010
import PlusIcon from "@assets/svg/icon/plus";
1111
import TodaySvg from "@assets/svg/today.svg";
1212
import YesterdaySvg from "@assets/svg/yesterday.svg";
13+
import { classNames } from "@/utils/index.js";
1314

1415
const styles = StyleSheet.create({
1516
iconContainer: {
1617
width: 40,
1718
height: 40,
1819
borderRadius: 20,
19-
borderWidth: 1,
20-
borderColor: "lightgrey",
20+
// borderWidth: 1,
21+
// borderColor: "lightgrey",
2122
display: "flex",
2223
alignItems: "center",
2324
justifyContent: "center",
@@ -82,24 +83,24 @@ const CircledIcon = ({
8283
iconContainerStyle,
8384
iconWidth = 20,
8485
iconHeight = 20,
86+
className,
8587
}) => {
8688
const Icon = mapIconToSvg(icon);
8789
return (
8890
<View
8991
style={{
9092
...styles.iconContainer,
91-
backgroundColor: color,
92-
borderColor,
93-
borderWidth,
93+
// backgroundColor: color,
94+
// borderColor,
95+
// borderWidth,
9496
opacity,
95-
...iconContainerStyle,
96-
9797
width: iconWidth * 1.25,
9898
height: iconHeight * 1.25,
9999
borderRadius: iconWidth,
100+
...iconContainerStyle,
100101
}}
101102
>
102-
<Icon width={iconWidth} height={iconHeight} color={iconColor} />
103+
<Icon width={iconWidth} height={iconHeight} color={iconColor} backgroundColor={color} />
103104
</View>
104105
);
105106
};

app/src/components/Separator.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import React from "react";
22
import { StyleSheet, View } from "react-native";
33

4-
export default ({ style }: { style?: any }) => (
4+
export default ({ style, separatorColor }: { style?: any; separatorColor?: string }) => (
55
<View style={[styles.separator, style]} collapsable={false}>
6-
<View style={[styles.separatorContent]} collapsable={false} />
6+
<View
7+
style={[
8+
styles.separatorContent,
9+
{
10+
backgroundColor: separatorColor,
11+
},
12+
]}
13+
collapsable={false}
14+
/>
715
</View>
816
);
917

app/src/scenes/goals/status/GoalsStatus.js

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)