@pi-spi/app 1.5.1 → 2.0.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/README.md +64 -30
- package/example/App.tsx +27 -24
- package/lib/module/core/assets.js +0 -7
- package/lib/module/core/assets.js.map +1 -1
- package/lib/module/core/di.js +17 -8
- package/lib/module/core/di.js.map +1 -1
- package/lib/module/core/pi_spi_custom_theme.js +22 -10
- package/lib/module/core/pi_spi_custom_theme.js.map +1 -1
- package/lib/module/core/pi_spi_sdk_config.js +22 -8
- package/lib/module/core/pi_spi_sdk_config.js.map +1 -1
- package/lib/module/core/theme.js +345 -225
- package/lib/module/core/theme.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/l10n/app_localizations.js.map +1 -1
- package/lib/module/l10n/app_localizations_en.js +26 -1
- package/lib/module/l10n/app_localizations_en.js.map +1 -1
- package/lib/module/l10n/app_localizations_fr.js +26 -1
- package/lib/module/l10n/app_localizations_fr.js.map +1 -1
- package/lib/module/l10n/app_localizations_pt.js +26 -1
- package/lib/module/l10n/app_localizations_pt.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js +15 -19
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js +4 -11
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js.map +1 -1
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js +6 -7
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js.map +1 -1
- package/lib/module/modules/config/domain/models/config_keys.js +3 -1
- package/lib/module/modules/config/domain/models/config_keys.js.map +1 -1
- package/lib/module/modules/config/domain/services/config_service.js +31 -2
- package/lib/module/modules/config/domain/services/config_service.js.map +1 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte.js +0 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte.js.map +1 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte_more_menu.js +38 -37
- package/lib/module/modules/home/presentation/pages/home_tab_compte_more_menu.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js +25 -11
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js +14 -20
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js +109 -103
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js +55 -72
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js +31 -45
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js +175 -203
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js +26 -0
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js.map +1 -0
- package/lib/module/modules/profile/presentation/pages/profile_menu.js +144 -34
- package/lib/module/modules/profile/presentation/pages/profile_menu.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page.js +95 -63
- package/lib/module/modules/profile/presentation/pages/profile_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js +97 -45
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js +9 -8
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js +26 -2
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_page.js +0 -1
- package/lib/module/modules/search/presentation/pages/search_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.js +3 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js +4 -11
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js +13 -10
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.js +5 -4
- package/lib/module/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.js +2 -2
- package/lib/module/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.js.map +1 -1
- package/lib/module/pi_spi_sdk_entry.js +7 -2
- package/lib/module/pi_spi_sdk_entry.js.map +1 -1
- package/lib/module/shared/utils/color.js +15 -0
- package/lib/module/shared/utils/color.js.map +1 -0
- package/lib/module/shared/widgets/custom_progressbar.js +3 -2
- package/lib/module/shared/widgets/custom_progressbar.js.map +1 -1
- package/lib/module/shared/widgets/error_card_widget.js +70 -0
- package/lib/module/shared/widgets/error_card_widget.js.map +1 -0
- package/lib/module/shared/widgets/selection.js +136 -0
- package/lib/module/shared/widgets/selection.js.map +1 -0
- package/lib/typescript/src/core/assets.d.ts +0 -7
- package/lib/typescript/src/core/assets.d.ts.map +1 -1
- package/lib/typescript/src/core/di.d.ts.map +1 -1
- package/lib/typescript/src/core/pi_spi_custom_theme.d.ts +17 -8
- package/lib/typescript/src/core/pi_spi_custom_theme.d.ts.map +1 -1
- package/lib/typescript/src/core/pi_spi_sdk_config.d.ts +22 -8
- package/lib/typescript/src/core/pi_spi_sdk_config.d.ts.map +1 -1
- package/lib/typescript/src/core/theme.d.ts +123 -53
- package/lib/typescript/src/core/theme.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations.d.ts +50 -0
- package/lib/typescript/src/l10n/app_localizations.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_en.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_fr.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_pt.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_delete_btn_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_page_claim.d.ts.map +1 -1
- package/lib/typescript/src/modules/compte/presentation/pages/compte_details_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/config/domain/models/config_keys.d.ts +3 -1
- package/lib/typescript/src/modules/config/domain/models/config_keys.d.ts.map +1 -1
- package/lib/typescript/src/modules/config/domain/services/config_service.d.ts +7 -0
- package/lib/typescript/src/modules/config/domain/services/config_service.d.ts.map +1 -1
- package/lib/typescript/src/modules/home/presentation/pages/home_tab_compte_more_menu.d.ts +2 -0
- package/lib/typescript/src/modules/home/presentation/pages/home_tab_compte_more_menu.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/compte/profile_compte_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.d.ts +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts +5 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts.map +1 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts +31 -4
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts +4 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_contacts.d.ts.map +1 -1
- package/lib/typescript/src/modules/search/presentation/pages/search_fonctionnalites.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.d.ts.map +1 -1
- package/lib/typescript/src/shared/utils/color.d.ts +7 -0
- package/lib/typescript/src/shared/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/custom_progressbar.d.ts.map +1 -1
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts +11 -0
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts +21 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/assets.ts +0 -7
- package/src/core/di.ts +13 -8
- package/src/core/pi_spi_custom_theme.ts +22 -15
- package/src/core/pi_spi_sdk_config.ts +27 -9
- package/src/core/theme.ts +381 -269
- package/src/index.ts +1 -1
- package/src/l10n/app_localizations.ts +50 -0
- package/src/l10n/app_localizations_en.ts +25 -0
- package/src/l10n/app_localizations_fr.ts +25 -0
- package/src/l10n/app_localizations_pt.ts +25 -0
- package/src/modules/alias/presentation/pages/alias_delete_btn_widget.tsx +13 -12
- package/src/modules/alias/presentation/pages/alias_page_claim.tsx +5 -4
- package/src/modules/compte/presentation/pages/compte_details_widget.tsx +3 -4
- package/src/modules/config/domain/models/config_keys.ts +3 -1
- package/src/modules/config/domain/services/config_service.ts +31 -2
- package/src/modules/home/presentation/pages/home_tab_compte.tsx +1 -1
- package/src/modules/home/presentation/pages/home_tab_compte_more_menu.tsx +34 -42
- package/src/modules/profile/presentation/pages/compte/profile_compte_page.tsx +15 -7
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page.tsx +12 -17
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.tsx +89 -68
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.tsx +84 -54
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.tsx +28 -24
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.tsx +121 -131
- package/src/modules/profile/presentation/pages/profile_app_bar.tsx +21 -0
- package/src/modules/profile/presentation/pages/profile_menu.tsx +126 -33
- package/src/modules/profile/presentation/pages/profile_page.tsx +90 -66
- package/src/modules/profile/presentation/pages/profile_page_avatar.tsx +69 -28
- package/src/modules/profile/presentation/pages/profile_page_contacts.tsx +5 -4
- package/src/modules/search/presentation/pages/search_fonctionnalites.ts +40 -7
- package/src/modules/search/presentation/pages/search_page.tsx +1 -1
- package/src/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.tsx +3 -1
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.tsx +2 -4
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.tsx +13 -6
- package/src/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.tsx +4 -4
- package/src/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.tsx +2 -2
- package/src/pi_spi_sdk_entry.tsx +9 -2
- package/src/shared/utils/color.ts +14 -0
- package/src/shared/widgets/custom_progressbar.tsx +3 -2
- package/src/shared/widgets/error_card_widget.tsx +58 -0
- package/src/shared/widgets/selection.tsx +98 -0
- package/assets/images/theme_light_blue.jpeg +0 -0
- package/assets/images/theme_light_green.jpeg +0 -0
- package/assets/images/theme_light_orange.jpeg +0 -0
- package/assets/images/theme_light_pink.jpeg +0 -0
- package/assets/images/theme_light_purple.jpeg +0 -0
- package/assets/images/theme_light_red.jpeg +0 -0
- package/assets/images/theme_light_yellow.jpeg +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Équivalent de `Color.withValues(alpha:)` : la couleur [color] avec
|
|
3
|
+
* l'opacité [alpha] (0 à 1). Accepte `#RGB`, `#RRGGBB` et `#RRGGBBAA` ;
|
|
4
|
+
* toute autre forme est rendue telle quelle.
|
|
5
|
+
*/
|
|
6
|
+
export function withAlpha(color: string, alpha: number): string {
|
|
7
|
+
let hex = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(color)?.[1];
|
|
8
|
+
if (hex == null) return color;
|
|
9
|
+
if (hex.length === 3) hex = hex.replace(/./g, (c) => c + c);
|
|
10
|
+
const a = Math.round(Math.min(1, Math.max(0, alpha)) * 255)
|
|
11
|
+
.toString(16)
|
|
12
|
+
.padStart(2, '0');
|
|
13
|
+
return `#${hex.slice(0, 6)}${a}`;
|
|
14
|
+
}
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import Svg, { Circle } from 'react-native-svg';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { useTheme } from '../../core/theme';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Anneau de progression (≈ `CustomCircularProgressBar`) : cercle de fond
|
|
@@ -25,6 +25,7 @@ export function CustomCircularProgressBar({
|
|
|
25
25
|
strokeWidth?: number;
|
|
26
26
|
children?: ReactNode;
|
|
27
27
|
}) {
|
|
28
|
+
const theme = useTheme();
|
|
28
29
|
const radius = size / 2;
|
|
29
30
|
const box = size + strokeWidth;
|
|
30
31
|
const center = box / 2;
|
|
@@ -38,7 +39,7 @@ export function CustomCircularProgressBar({
|
|
|
38
39
|
cx={center}
|
|
39
40
|
cy={center}
|
|
40
41
|
r={radius}
|
|
41
|
-
stroke={progressColor ??
|
|
42
|
+
stroke={progressColor ?? theme.colorScheme.primary}
|
|
42
43
|
strokeWidth={strokeWidth}
|
|
43
44
|
fill="none"
|
|
44
45
|
strokeLinecap="round"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MaterialIcons } from '@expo/vector-icons';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Themer, useTheme } from '../../core/theme';
|
|
6
|
+
import { Card } from '../material/card';
|
|
7
|
+
|
|
8
|
+
/** Couleur d'erreur du thème avec une opacité (0 à 1). */
|
|
9
|
+
function erreur(alpha: number): string {
|
|
10
|
+
const hex = Math.round(alpha * 255).toString(16).padStart(2, '0');
|
|
11
|
+
return `${Themer.systemErrorColor}${hex}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Carte d'avertissement : fond teinté, bordure et icône dans la couleur
|
|
16
|
+
* d'erreur du thème, suivies du `message`.
|
|
17
|
+
*/
|
|
18
|
+
export function ErrorCardWidget({
|
|
19
|
+
message,
|
|
20
|
+
icon = 'warning-amber',
|
|
21
|
+
}: {
|
|
22
|
+
message: string;
|
|
23
|
+
icon?: ComponentProps<typeof MaterialIcons>['name'];
|
|
24
|
+
}) {
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
const texte = theme.textTheme.bodySmall;
|
|
27
|
+
return (
|
|
28
|
+
<Card style={styles.card}>
|
|
29
|
+
<View style={styles.row}>
|
|
30
|
+
<View style={styles.icon}>
|
|
31
|
+
<MaterialIcons name={icon} size={18} color={Themer.systemErrorColor} />
|
|
32
|
+
</View>
|
|
33
|
+
<Text
|
|
34
|
+
style={[
|
|
35
|
+
texte,
|
|
36
|
+
styles.message,
|
|
37
|
+
texte?.fontSize != null && { lineHeight: texte.fontSize * 1.4 },
|
|
38
|
+
]}
|
|
39
|
+
>
|
|
40
|
+
{message}
|
|
41
|
+
</Text>
|
|
42
|
+
</View>
|
|
43
|
+
</Card>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
card: {
|
|
49
|
+
margin: 0,
|
|
50
|
+
backgroundColor: erreur(0.08),
|
|
51
|
+
borderRadius: 16,
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: erreur(0.35),
|
|
54
|
+
},
|
|
55
|
+
row: { flexDirection: 'row', alignItems: 'flex-start', padding: 14 },
|
|
56
|
+
icon: { padding: 6, borderRadius: 999, backgroundColor: erreur(0.15), marginRight: 12 },
|
|
57
|
+
message: { flex: 1, textAlign: 'left', color: Themer.systemErrorColor },
|
|
58
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { MaterialIcons } from '@expo/vector-icons';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { Pressable, StyleSheet, Text, useWindowDimensions, View } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
|
|
6
|
+
import { Themer, useTheme } from '../../core/theme';
|
|
7
|
+
import { withAlpha } from '../utils/color';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Feuille de sélection : poignée, [titre], [entete] facultatif, puis le
|
|
11
|
+
* [contenu] (qui défile s'il est trop long : utiliser un ScrollView).
|
|
12
|
+
* À ouvrir avec showModalBottomSheet.
|
|
13
|
+
*/
|
|
14
|
+
export function SelectionSheet({
|
|
15
|
+
titre,
|
|
16
|
+
titreSize,
|
|
17
|
+
entete,
|
|
18
|
+
contenu,
|
|
19
|
+
}: {
|
|
20
|
+
titre?: string;
|
|
21
|
+
titreSize?: number;
|
|
22
|
+
entete?: ReactNode;
|
|
23
|
+
contenu: ReactNode;
|
|
24
|
+
}) {
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
const insets = useSafeAreaInsets();
|
|
27
|
+
const { height } = useWindowDimensions();
|
|
28
|
+
return (
|
|
29
|
+
<View
|
|
30
|
+
style={[
|
|
31
|
+
styles.sheet,
|
|
32
|
+
{ maxHeight: height * 0.75, backgroundColor: theme.colorScheme.surface, paddingBottom: insets.bottom },
|
|
33
|
+
]}
|
|
34
|
+
>
|
|
35
|
+
{/* Poignée */}
|
|
36
|
+
<View style={[styles.poignee, { backgroundColor: withAlpha(Themer.neural03Color, 0.4) }]} />
|
|
37
|
+
{titre != null && (
|
|
38
|
+
<Text style={[theme.textTheme.headlineLarge, styles.titre, titreSize != null ? { fontSize: titreSize } : null]}>{titre}</Text>
|
|
39
|
+
)}
|
|
40
|
+
{entete != null && <View style={styles.entete}>{entete}</View>}
|
|
41
|
+
<View style={styles.gap8} />
|
|
42
|
+
<View style={styles.contenu}>{contenu}</View>
|
|
43
|
+
</View>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Ligne d'une feuille de sélection : [pastille], [texte], [detail] facultatif et coche si elle est [choisie]. */
|
|
48
|
+
export function SbSelectionLigne({
|
|
49
|
+
pastille,
|
|
50
|
+
texte,
|
|
51
|
+
detail,
|
|
52
|
+
choisie,
|
|
53
|
+
onPress,
|
|
54
|
+
}: {
|
|
55
|
+
pastille: ReactNode;
|
|
56
|
+
texte: string;
|
|
57
|
+
detail?: string;
|
|
58
|
+
choisie: boolean;
|
|
59
|
+
onPress: () => void;
|
|
60
|
+
}) {
|
|
61
|
+
const theme = useTheme();
|
|
62
|
+
const primaire = theme.colorScheme.primary;
|
|
63
|
+
return (
|
|
64
|
+
<Pressable
|
|
65
|
+
accessibilityRole="button"
|
|
66
|
+
accessibilityState={{ selected: choisie }}
|
|
67
|
+
onPress={onPress}
|
|
68
|
+
style={({ pressed }) => [
|
|
69
|
+
styles.ligne,
|
|
70
|
+
{ backgroundColor: choisie ? withAlpha(primaire, 0.08) : pressed ? theme.colorScheme.secondary : 'transparent' },
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
{pastille}
|
|
74
|
+
<View style={styles.textes}>
|
|
75
|
+
<Text numberOfLines={1} style={[theme.textTheme.displayLarge, { fontWeight: choisie ? '700' : '500' }]}>
|
|
76
|
+
{texte}
|
|
77
|
+
</Text>
|
|
78
|
+
{detail != null && detail.length > 0 && (
|
|
79
|
+
<Text numberOfLines={1} style={[theme.textTheme.displaySmall, { color: Themer.neural03Color }]}>
|
|
80
|
+
{detail}
|
|
81
|
+
</Text>
|
|
82
|
+
)}
|
|
83
|
+
</View>
|
|
84
|
+
{choisie && <MaterialIcons name="check-circle" size={22} color={primaire} />}
|
|
85
|
+
</Pressable>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
sheet: { width: '100%', borderTopLeftRadius: 20, borderTopRightRadius: 20 },
|
|
91
|
+
poignee: { alignSelf: 'center', marginTop: 10, marginBottom: 14, width: 36, height: 4, borderRadius: 2 },
|
|
92
|
+
titre: { paddingHorizontal: 20 },
|
|
93
|
+
entete: { paddingHorizontal: 20, paddingTop: 12 },
|
|
94
|
+
contenu: { flexShrink: 1 },
|
|
95
|
+
gap8: { height: 8 },
|
|
96
|
+
ligne: { flexDirection: 'row', alignItems: 'center', marginVertical: 2, paddingHorizontal: 8, paddingVertical: 10, borderRadius: 14 },
|
|
97
|
+
textes: { flex: 1, marginHorizontal: 14 },
|
|
98
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|