File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ defineProps<{
2121 value: number ;
2222 total: number ;
2323 unit? : string ;
24- danger ? : boolean ;
24+ theme ? : string ;
2525 }[];
2626 editUniqueId? : string ;
2727}>();
@@ -181,7 +181,7 @@ const isDevMode = useDevMode();
181181 :value =" info.value"
182182 :total =" info.total"
183183 :unit =" info.unit"
184- :danger =" info.danger "
184+ :theme =" info.theme "
185185 />
186186 </div >
187187 </div >
Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ defineProps<{
33 value: number ;
44 total: number ;
55 unit? : string ;
6- danger? : boolean ;
6+ // "france" for blue | "marianne" for red
7+ theme? : string ;
78}>();
89 </script >
910
1011<template >
11- <div class =" card-donut" :class =" { 'is-danger': danger } " >
12+ <div class =" card-donut" :class =" theme ? `theme-${theme}` : null " >
1213 <div class =" fr-m-0 card-hole" >
1314 <p class =" fr-m-0 card-hole-content" >
1415 {{ value }}
@@ -30,12 +31,19 @@ defineProps<{
3031 align-items : center ;
3132 justify-content : center ;
3233 background : conic-gradient (
33- var (--background-action-high-blue-france ) 0deg var (--pie-deg ),
34- var (--background-alt -grey ) var (--pie-deg ) 360deg
34+ var (--border-plain-grey ) 0deg var (--pie-deg ),
35+ var (--border-disabled -grey ) var (--pie-deg ) 360deg
3536 );
3637}
3738
38- .is-danger {
39+ .theme-france {
40+ background : conic-gradient (
41+ var (--background-active-blue-france ) 0deg var (--pie-deg ),
42+ var (--background-contrast-info ) var (--pie-deg ) 360deg
43+ );
44+ }
45+
46+ .theme-marianne {
3947 background : conic-gradient (
4048 var (--red-marianne-main-472 ) 0deg var (--pie-deg ),
4149 var (--background-action-low-pink-macaron ) var (--pie-deg ) 360deg
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ defineProps<{
99 value: number ;
1010 total: number ;
1111 unit? : string ;
12- danger ? : boolean ;
12+ theme ? : string ;
1313}>();
1414
1515const slots = useSlots ();
@@ -22,7 +22,7 @@ const uniqueId = useUniqueId();
2222<template >
2323 <div class =" card" >
2424 <div class =" fr-p-3w card-main-content" >
25- <StatDonut :value =" value" :total =" total" :unit =" unit" :danger = " danger " />
25+ <StatDonut :value =" value" :total =" total" :unit =" unit" :theme = " theme " />
2626
2727 <div class =" card-info" >
2828 <p class =" fr-h6 fr-mb-1v card-title" >{{ title }}</p >
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ const headerInfos = computed(() => [
4646 value: complianceLevel .value ,
4747 total: 100 ,
4848 unit: " %" ,
49+ theme: " france" ,
4950 },
5051 ]
5152 : []),
@@ -54,7 +55,7 @@ const headerInfos = computed(() => [
5455 description: ` Dont ${blockingCriteriaCount .value } bloquants pour l’usager ` ,
5556 value: notCompliantCriteriaCount .value ,
5657 total: getCriteriaCount (auditStore .data ?.auditType as AuditType ),
57- danger: true ,
58+ theme: " marianne " ,
5859 },
5960 {
6061 title: " Critères non applicables" ,
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ const headerInfos = computed(() => [
110110 value: complianceLevel .value ,
111111 total: 100 ,
112112 unit: " %" ,
113+ theme: " france" ,
113114 },
114115 ]
115116 : []),
@@ -118,7 +119,7 @@ const headerInfos = computed(() => [
118119 description: ` Dont ${blockingCriteriaCount .value } bloquants pour l’usager ` ,
119120 value: notCompliantCriteriaCount .value ,
120121 total: getCriteriaCount (auditStore .data ?.auditType as AuditType ),
121- danger: true ,
122+ theme: " marianne " ,
122123 },
123124 {
124125 title: " Critères non applicables" ,
You can’t perform that action at this time.
0 commit comments