@xetwa/design-system 1.0.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.
Files changed (168) hide show
  1. package/.github/workflows/publish.yml +30 -0
  2. package/.storybook/main.ts +17 -0
  3. package/.storybook/preview.tsx +65 -0
  4. package/eslint.config.js +22 -0
  5. package/index.html +13 -0
  6. package/package.json +55 -0
  7. package/public/favicon.svg +1 -0
  8. package/public/icons.svg +24 -0
  9. package/src/App.css +184 -0
  10. package/src/App.tsx +122 -0
  11. package/src/BordasSombras.mdx +343 -0
  12. package/src/Colors.mdx +393 -0
  13. package/src/GrelhaLayout.mdx +375 -0
  14. package/src/Icons.mdx +42 -0
  15. package/src/MovimentoBreakpoints.mdx +379 -0
  16. package/src/Spacing.mdx +231 -0
  17. package/src/Typography.mdx +321 -0
  18. package/src/assets/Mascots/vava/estaticos/vava-acenar.svg +3 -0
  19. package/src/assets/Mascots/vava/estaticos/vava-acertou.svg +3 -0
  20. package/src/assets/Mascots/vava/estaticos/vava-celebrar.svg +3 -0
  21. package/src/assets/Mascots/vava/estaticos/vava-com-autocolantes.svg +3 -0
  22. package/src/assets/Mascots/vava/estaticos/vava-dormir.svg +3 -0
  23. package/src/assets/Mascots/vava/estaticos/vava-errou.svg +3 -0
  24. package/src/assets/Mascots/vava/estaticos/vava-feliz.svg +3 -0
  25. package/src/assets/Mascots/vava/estaticos/vava-neutra.svg +3 -0
  26. package/src/assets/Mascots/vava/estaticos/vava-original.svg +3 -0
  27. package/src/assets/Mascots/vava/estaticos/vava-pensar.svg +3 -0
  28. package/src/assets/Mascots/vava/estaticos/vava-surpresa.svg +3 -0
  29. package/src/assets/Mascots/yaya/avatar/yaya-avatar-falar.svg +7 -0
  30. package/src/assets/Mascots/yaya/avatar/yaya-avatar-feliz.svg +7 -0
  31. package/src/assets/Mascots/yaya/avatar/yaya-avatar-transparente.svg +6 -0
  32. package/src/assets/Mascots/yaya/estaticos/yaya-acertou.svg +13 -0
  33. package/src/assets/Mascots/yaya/estaticos/yaya-celebrar.svg +13 -0
  34. package/src/assets/Mascots/yaya/estaticos/yaya-dormir.svg +13 -0
  35. package/src/assets/Mascots/yaya/estaticos/yaya-errou.svg +13 -0
  36. package/src/assets/Mascots/yaya/estaticos/yaya-falar.svg +13 -0
  37. package/src/assets/Mascots/yaya/estaticos/yaya-feliz.svg +13 -0
  38. package/src/assets/Mascots/yaya/estaticos/yaya-neutra.svg +13 -0
  39. package/src/assets/Mascots/yaya/estaticos/yaya-pensar.svg +13 -0
  40. package/src/assets/Mascots/yaya/estaticos/yaya-surpresa.svg +13 -0
  41. package/src/assets/hero.png +0 -0
  42. package/src/assets/react.svg +1 -0
  43. package/src/assets/vite.svg +1 -0
  44. package/src/components/Buttons/BackButton/BackButton.stories.tsx +86 -0
  45. package/src/components/Buttons/BackButton/BackButton.tsx +107 -0
  46. package/src/components/Buttons/FabButton/FabButton.stories.tsx +74 -0
  47. package/src/components/Buttons/FabButton/FabButton.tsx +161 -0
  48. package/src/components/Buttons/IconButton/IconButton.stories.tsx +99 -0
  49. package/src/components/Buttons/IconButton/IconButton.tsx +189 -0
  50. package/src/components/Buttons/JourneyButton/JourneyButton.stories.tsx +80 -0
  51. package/src/components/Buttons/JourneyButton/JourneyButton.tsx +194 -0
  52. package/src/components/Buttons/MainButton/MainButton.stories.tsx +144 -0
  53. package/src/components/Buttons/MainButton/MainButton.tsx +258 -0
  54. package/src/components/Buttons/WordChip/WordChip.stories.tsx +84 -0
  55. package/src/components/Buttons/WordChip/WordChip.tsx +157 -0
  56. package/src/components/Buttons/WordChip/index.ts +1 -0
  57. package/src/components/Cards/AnswerOptionCard/AnswerOptionCard.stories.tsx +181 -0
  58. package/src/components/Cards/AnswerOptionCard/AnswerOptionCard.tsx +201 -0
  59. package/src/components/Cards/BaseCard/BaseCard.stories.tsx +148 -0
  60. package/src/components/Cards/BaseCard/BaseCard.tsx +181 -0
  61. package/src/components/Cards/BoardingPassCard/BoardingPassCard.stories.tsx +205 -0
  62. package/src/components/Cards/BoardingPassCard/BoardingPassCard.tsx +384 -0
  63. package/src/components/Cards/BoardingPassCard/FlightIcon.tsx +21 -0
  64. package/src/components/Cards/BoardingPassCard/FlightIcon.web.tsx +18 -0
  65. package/src/components/Cards/CountryCard/CountryCard.stories.tsx +97 -0
  66. package/src/components/Cards/CountryCard/CountryCard.tsx +185 -0
  67. package/src/components/Cards/LevelProgressCard/LevelProgressCard.stories.tsx +61 -0
  68. package/src/components/Cards/LevelProgressCard/LevelProgressCard.tsx +143 -0
  69. package/src/components/Cards/ModuleCard/ModuleCard.stories.tsx +108 -0
  70. package/src/components/Cards/ModuleCard/ModuleCard.tsx +304 -0
  71. package/src/components/Cards/ModuleCompletionCard/ModuleCompletionCard.stories.tsx +53 -0
  72. package/src/components/Cards/ModuleCompletionCard/ModuleCompletionCard.tsx +167 -0
  73. package/src/components/Cards/Passport/PassportCover.tsx +114 -0
  74. package/src/components/Cards/Passport/PassportIDPage.tsx +217 -0
  75. package/src/components/Cards/Passport/PassportStampPage.tsx +253 -0
  76. package/src/components/Cards/Passport/PassportViewer.stories.tsx +95 -0
  77. package/src/components/Cards/Passport/PassportViewer.tsx +328 -0
  78. package/src/components/Cards/PlanCard/PlanCard.stories.tsx +159 -0
  79. package/src/components/Cards/PlanCard/PlanCard.tsx +317 -0
  80. package/src/components/Cards/PricingCard/PricingCard.stories.tsx +83 -0
  81. package/src/components/Cards/PricingCard/PricingCard.tsx +144 -0
  82. package/src/components/Cards/SelectionCard/SelectionCard.stories.tsx +77 -0
  83. package/src/components/Cards/SelectionCard/SelectionCard.tsx +111 -0
  84. package/src/components/Cards/TeacherCard/TeacherCard.stories.tsx +126 -0
  85. package/src/components/Cards/TeacherCard/TeacherCard.tsx +236 -0
  86. package/src/components/Charts/WeeklyProgressChart/WeeklyProgressChart.stories.tsx +89 -0
  87. package/src/components/Charts/WeeklyProgressChart/WeeklyProgressChart.tsx +179 -0
  88. package/src/components/Charts/WeeklyProgressChart/index.ts +1 -0
  89. package/src/components/DataDisplay/Avatar/Avatar.stories.tsx +85 -0
  90. package/src/components/DataDisplay/Avatar/Avatar.tsx +118 -0
  91. package/src/components/DataDisplay/Avatar/index.ts +1 -0
  92. package/src/components/DataDisplay/Badge/Badge.stories.tsx +62 -0
  93. package/src/components/DataDisplay/Badge/Badge.tsx +146 -0
  94. package/src/components/DataDisplay/Flag/Flag.stories.tsx +98 -0
  95. package/src/components/DataDisplay/Flag/Flag.tsx +347 -0
  96. package/src/components/DataDisplay/Flag/Flag.web.tsx +334 -0
  97. package/src/components/DataDisplay/InstructionBubble/InstructionBubble.stories.tsx +80 -0
  98. package/src/components/DataDisplay/InstructionBubble/InstructionBubble.tsx +86 -0
  99. package/src/components/DataDisplay/LevelBadge/LevelBadge.stories.tsx +99 -0
  100. package/src/components/DataDisplay/LevelBadge/LevelBadge.tsx +118 -0
  101. package/src/components/DataDisplay/ProgressBar/ProgressBar.stories.tsx +95 -0
  102. package/src/components/DataDisplay/ProgressBar/ProgressBar.tsx +117 -0
  103. package/src/components/DataDisplay/StatBadge/StatBadge.stories.tsx +82 -0
  104. package/src/components/DataDisplay/StatBadge/StatBadge.tsx +135 -0
  105. package/src/components/DataDisplay/StatBadge/index.ts +1 -0
  106. package/src/components/DataDisplay/Tag/Tag.stories.tsx +63 -0
  107. package/src/components/DataDisplay/Tag/Tag.tsx +148 -0
  108. package/src/components/Feedback/FeedbackBottomSheet/FeedbackBottomSheet.stories.tsx +74 -0
  109. package/src/components/Feedback/FeedbackBottomSheet/FeedbackBottomSheet.tsx +200 -0
  110. package/src/components/Forms/Checkbox/Checkbox.stories.tsx +60 -0
  111. package/src/components/Forms/Checkbox/Checkbox.tsx +127 -0
  112. package/src/components/Forms/Checkbox/index.ts +1 -0
  113. package/src/components/Forms/DaySelector/DaySelector.stories.tsx +62 -0
  114. package/src/components/Forms/DaySelector/DaySelector.tsx +133 -0
  115. package/src/components/Forms/Radio/Radio.stories.tsx +61 -0
  116. package/src/components/Forms/Radio/Radio.tsx +141 -0
  117. package/src/components/Forms/Radio/index.ts +1 -0
  118. package/src/components/Forms/SegmentedToggle/SegmentedToggle.stories.tsx +67 -0
  119. package/src/components/Forms/SegmentedToggle/SegmentedToggle.tsx +150 -0
  120. package/src/components/Forms/SegmentedToggle/index.ts +1 -0
  121. package/src/components/Forms/Select/Select.stories.tsx +59 -0
  122. package/src/components/Forms/Select/Select.tsx +255 -0
  123. package/src/components/Forms/Select/index.ts +1 -0
  124. package/src/components/Forms/Switch/Switch.stories.tsx +57 -0
  125. package/src/components/Forms/Switch/Switch.tsx +120 -0
  126. package/src/components/Forms/Switch/index.ts +1 -0
  127. package/src/components/Forms/TimeSlot/TimeSlot.stories.tsx +62 -0
  128. package/src/components/Forms/TimeSlot/TimeSlot.tsx +116 -0
  129. package/src/components/Headers/CountryHeader/CountryHeader.stories.tsx +114 -0
  130. package/src/components/Headers/CountryHeader/CountryHeader.tsx +147 -0
  131. package/src/components/Headers/ProfileHeader/ProfileHeader.stories.tsx +141 -0
  132. package/src/components/Headers/ProfileHeader/ProfileHeader.tsx +233 -0
  133. package/src/components/Inputs/FillInTheBlank/FillInTheBlank.stories.tsx +333 -0
  134. package/src/components/Inputs/FillInTheBlank/FillInTheBlank.tsx +287 -0
  135. package/src/components/Inputs/FillInTheBlank/index.ts +1 -0
  136. package/src/components/Inputs/TextInput/TextInput.stories.tsx +103 -0
  137. package/src/components/Inputs/TextInput/TextInput.tsx +187 -0
  138. package/src/components/Mascots/Vava/Vava.stories.tsx +114 -0
  139. package/src/components/Mascots/Vava/Vava.tsx +276 -0
  140. package/src/components/Mascots/Yaya/Yaya.stories.tsx +98 -0
  141. package/src/components/Mascots/Yaya/Yaya.tsx +233 -0
  142. package/src/components/Navigation/BottomTabBar/BottomTabBar.stories.tsx +68 -0
  143. package/src/components/Navigation/BottomTabBar/BottomTabBar.tsx +85 -0
  144. package/src/components/Navigation/BottomTabBar/BottomTabBarItem.tsx +68 -0
  145. package/src/components/Navigation/BottomTabBar/index.ts +2 -0
  146. package/src/components/Navigation/PaginationDots/PaginationDots.stories.tsx +62 -0
  147. package/src/components/Navigation/PaginationDots/PaginationDots.tsx +81 -0
  148. package/src/components/Navigation/PaginationDots/index.ts +1 -0
  149. package/src/components/Navigation/ProgressMap/ProgressMap.stories.tsx +116 -0
  150. package/src/components/Navigation/ProgressMap/ProgressMap.tsx +827 -0
  151. package/src/components/Navigation/WorldProgressMap/WorldProgressMap.stories.tsx +169 -0
  152. package/src/components/Navigation/WorldProgressMap/WorldProgressMap.tsx +790 -0
  153. package/src/components/Typography/Typography.stories.tsx +127 -0
  154. package/src/components/Typography/Typography.tsx +53 -0
  155. package/src/hooks/useResponsive.ts +41 -0
  156. package/src/hooks/useTheme.ts +32 -0
  157. package/src/index.css +355 -0
  158. package/src/index.ts +28 -0
  159. package/src/main.tsx +10 -0
  160. package/src/mocks/codegenNativeComponent.ts +5 -0
  161. package/src/styles/countryThemes.ts +79 -0
  162. package/src/styles/theme.ts +297 -0
  163. package/src/utils/iconMap.ts +23 -0
  164. package/tsconfig.app.json +25 -0
  165. package/tsconfig.json +7 -0
  166. package/tsconfig.node.json +24 -0
  167. package/vite.config.ts +51 -0
  168. package/vitest.shims.d.ts +1 -0
@@ -0,0 +1,347 @@
1
+ import { View } from 'react-native';
2
+ import type { ViewStyle } from 'react-native';
3
+ import Svg, { Path, Circle } from 'react-native-svg';
4
+
5
+ /**
6
+ * Exibe a bandeira circular de um país através do seu código ou nome.
7
+ */
8
+ export interface FlagProps {
9
+ /** Código ISO do país (ex: 'FR') ou nome em PT/EN. */
10
+ countryCode: string;
11
+ /** Tamanho da bandeira em píxeis. */
12
+ size?: number;
13
+ style?: ViewStyle | ViewStyle[];
14
+ }
15
+
16
+ const normalizeCountryCode = (input: string): string => {
17
+ const code = input.toLowerCase().trim();
18
+
19
+ if (code === 'fr' || code === 'fra' || code === 'frança' || code === 'france') return 'FR';
20
+ if (code === 'be' || code === 'bel' || code === 'bélgica' || code === 'belgium') return 'BE';
21
+ if (code === 'ch' || code === 'che' || code === 'suíça' || code === 'switzerland') return 'CH';
22
+ if (code === 'lu' || code === 'lux' || code === 'luxemburgo' || code === 'luxembourg') return 'LU';
23
+ if (code === 'mc' || code === 'mco' || code === 'mónaco' || code === 'monaco') return 'MC';
24
+ if (code === 'ca' || code === 'can' || code === 'canadá' || code === 'canada') return 'CA';
25
+ if (code === 'ci' || code === 'civ' || code === "côte d'ivoire" || code === "cote d'ivoire" || code === 'marfim' || code === 'costa do marfim') return 'CI';
26
+ if (code === 'sn' || code === 'sen' || code === 'senegal') return 'SN';
27
+ if (code === 'cm' || code === 'cmr' || code === 'camarões' || code === 'cameroon') return 'CM';
28
+ if (code === 'cd' || code === 'cod' || code === 'rd congo' || code === 'republica democratica do congo' || code === 'república democrática do congo' || code === 'dr congo') return 'CD';
29
+ if (code === 'mg' || code === 'mdg' || code === 'madagascar') return 'MG';
30
+ if (code === 'bf' || code === 'bfa' || code === 'burkina faso') return 'BF';
31
+ if (code === 'ne' || code === 'ner' || code === 'níger' || code === 'niger') return 'NE';
32
+ if (code === 'ml' || code === 'mli' || code === 'mali') return 'ML';
33
+ if (code === 'td' || code === 'tcd' || code === 'chade' || code === 'chad') return 'TD';
34
+ if (code === 'gn' || code === 'gin' || code === 'guiné' || code === 'guinea') return 'GN';
35
+ if (code === 'rw' || code === 'rwa' || code === 'ruanda' || code === 'rwanda') return 'RW';
36
+ if (code === 'bi' || code === 'bdi' || code === 'burundi') return 'BI';
37
+ if (code === 'bj' || code === 'ben' || code === 'benim' || code === 'benin') return 'BJ';
38
+ if (code === 'tg' || code === 'tgo' || code === 'togo') return 'TG';
39
+ if (code === 'cf' || code === 'caf' || code === 'república centro-africana' || code === 'republica centro-africana' || code === 'central african republic') return 'CF';
40
+ if (code === 'cg' || code === 'cog' || code === 'congo' || code === 'república do congo' || code === 'republica do congo') return 'CG';
41
+ if (code === 'ga' || code === 'gab' || code === 'gabão' || code === 'gabon') return 'GA';
42
+ if (code === 'gq' || code === 'gnq' || code === 'guiné equatorial' || code === 'guine equatorial' || code === 'equatorial guinea') return 'GQ';
43
+ if (code === 'dj' || code === 'dji' || code === 'djibouti') return 'DJ';
44
+ if (code === 'km' || code === 'com' || code === 'comores' || code === 'comoros') return 'KM';
45
+ if (code === 'vu' || code === 'vut' || code === 'vanuatu') return 'VU';
46
+ if (code === 'sc' || code === 'syc' || code === 'seychelles') return 'SC';
47
+ if (code === 'ht' || code === 'hti' || code === 'haiti') return 'HT';
48
+
49
+ return 'UNKNOWN';
50
+ };
51
+
52
+ export const Flag = ({ countryCode, size = 40, style }: FlagProps) => {
53
+ const normalized = normalizeCountryCode(countryCode);
54
+
55
+ const renderFlagContent = () => {
56
+ switch (normalized) {
57
+ case 'FR': // França
58
+ return (
59
+ <>
60
+ <Path fill="#00209F" d="M0 0h170.7v512H0z"/>
61
+ <Path fill="#fff" d="M170.7 0h170.6v512H170.7z"/>
62
+ <Path fill="#E8001F" d="M341.3 0H512v512H341.3z"/>
63
+ </>
64
+ );
65
+ case 'BE': // Bélgica
66
+ return (
67
+ <>
68
+ <Path fill="#000" d="M0 0h170.7v512H0z"/>
69
+ <Path fill="#FFE300" d="M170.7 0h170.6v512H170.7z"/>
70
+ <Path fill="#E8001F" d="M341.3 0H512v512H341.3z"/>
71
+ </>
72
+ );
73
+ case 'CH': // Suíça
74
+ return (
75
+ <>
76
+ <Path fill="#d52b1e" d="M0 0h512v512H0z"/>
77
+ <Path fill="#fff" d="M236 116h40v280h-40zM116 236h280v-40H116z"/>
78
+ </>
79
+ );
80
+ case 'LU': // Luxemburgo
81
+ return (
82
+ <>
83
+ <Path fill="#E8001F" d="M0 0h512v170.7H0z"/>
84
+ <Path fill="#fff" d="M0 170.7h512v170.6H0z"/>
85
+ <Path fill="#419ad6" d="M0 341.3h512V512H0z"/>
86
+ </>
87
+ );
88
+ case 'MC': // Mónaco
89
+ return (
90
+ <>
91
+ <Path fill="#E8001F" d="M0 0h512v256H0z"/>
92
+ <Path fill="#fff" d="M0 256h512v256H0z"/>
93
+ </>
94
+ );
95
+ case 'CA': // Canadá
96
+ return (
97
+ <>
98
+ <Path fill="#fff" d="M128 0h256v512H128z"/>
99
+ <Path fill="#d52b1e" d="M0 0h128v512H0zm384 0h128v512H384z"/>
100
+ <Path fill="#d52b1e" d="M135.3 247.4l-14 4.8 65.4 57.5c5 14.8-1.7 19.1-6 26.9l71-9-1.8 71.5 14.8-.5-3.3-70.9 71.2 8.4c-4.4-9.3-8.3-14.2-4.3-29l65.4-54.5-11.4-4.1c-9.4-7.3 4-34.8 6-52.2 0 0-38.1 13.1-40.6 6.2l-9.9-18.5-34.6 38c-3.8 1-5.4-.6-6.3-3.8l16-79.7-25.4 14.3q-3.3 1.3-5.6-2.4l-24.5-49-25.2 50.9q-3 2.7-5.4.8l-24.2-13.6 14.5 79.2c-1.1 3-3.9 4-7.1 2.3l-33.3-37.8c-4.3 7-7.3 18.4-13 21-5.7 2.3-25-4.9-37.9-7.7 4.4 15.9 18.2 42.3 9.5 51z"/>
101
+ </>
102
+ );
103
+ case 'CI': // Côte d'Ivoire
104
+ return (
105
+ <>
106
+ <Path fill="#F77F00" d="M0 0h170.7v512H0z"/>
107
+ <Path fill="#fff" d="M170.7 0h170.6v512H170.7z"/>
108
+ <Path fill="#009E60" d="M341.3 0H512v512H341.3z"/>
109
+ </>
110
+ );
111
+ case 'SN': // Senegal
112
+ return (
113
+ <>
114
+ <Path fill="#00E070" d="M0 0h170.7v512H0z"/>
115
+ <Path fill="#FFDC00" d="M170.7 0h170.6v512H170.7z"/>
116
+ <Path fill="#E8001F" d="M341.3 0H512v512H341.3z"/>
117
+ <Path fill="#00E070" d="M256 180l16 48h50l-40 30 15 48-41-30-41 30 15-48-40-30h50z"/>
118
+ </>
119
+ );
120
+ case 'CM': // Camarões
121
+ return (
122
+ <>
123
+ <Path fill="#00E070" d="M0 0h170.7v512H0z"/>
124
+ <Path fill="#E8001F" d="M170.7 0h170.6v512H170.7z"/>
125
+ <Path fill="#FFE300" d="M341.3 0H512v512H341.3z"/>
126
+ <Path fill="#FFE300" d="M256 180l16 48h50l-40 30 15 48-41-30-41 30 15-48-40-30h50z"/>
127
+ </>
128
+ );
129
+ case 'CD': // RD Congo
130
+ return (
131
+ <>
132
+ <Path fill="#00A3E0" d="M0 0h512v512H0z"/>
133
+ <Path fill="#FFDC00" d="M0 400L400 0h70L0 470z"/>
134
+ <Path fill="#E8001F" d="M0 415L415 0h40L0 455z"/>
135
+ <Path fill="#FFDC00" d="M70 60l8 24h25l-20 15 8 24-21-15-21 15 8-24-20-15h25z"/>
136
+ </>
137
+ );
138
+ case 'MG': // Madagascar
139
+ return (
140
+ <>
141
+ <Path fill="#fff" d="M0 0h170.7v512H0z"/>
142
+ <Path fill="#E8001F" d="M170.7 0H512v256H170.7z"/>
143
+ <Path fill="#009E60" d="M170.7 256H512v256H170.7z"/>
144
+ </>
145
+ );
146
+ case 'BF': // Burkina Faso
147
+ return (
148
+ <>
149
+ <Path fill="#E8001F" d="M0 0h512v256H0z"/>
150
+ <Path fill="#009E60" d="M0 256h512v256H0z"/>
151
+ <Path fill="#FFDC00" d="M256 210l10 30h32l-26 18 10 30-26-18-26 18 10-30-26-18h32z"/>
152
+ </>
153
+ );
154
+ case 'NE': // Níger
155
+ return (
156
+ <>
157
+ <Path fill="#F77F00" d="M0 0h512v170.7H0z"/>
158
+ <Path fill="#fff" d="M0 170.7h512v170.6H0z"/>
159
+ <Path fill="#009E60" d="M0 341.3h512V512H0z"/>
160
+ <Circle cx="256" cy="256" r="50" fill="#F77F00"/>
161
+ </>
162
+ );
163
+ case 'ML': // Mali
164
+ return (
165
+ <>
166
+ <Path fill="#00E070" d="M0 0h170.7v512H0z"/>
167
+ <Path fill="#FFDC00" d="M170.7 0h170.6v512H170.7z"/>
168
+ <Path fill="#E8001F" d="M341.3 0H512v512H341.3z"/>
169
+ </>
170
+ );
171
+ case 'TD': // Chade
172
+ return (
173
+ <>
174
+ <Path fill="#00209F" d="M0 0h170.7v512H0z"/>
175
+ <Path fill="#FFDC00" d="M170.7 0h170.6v512H170.7z"/>
176
+ <Path fill="#E8001F" d="M341.3 0H512v512H341.3z"/>
177
+ </>
178
+ );
179
+ case 'GN': // Guiné
180
+ return (
181
+ <>
182
+ <Path fill="#E8001F" d="M0 0h170.7v512H0z"/>
183
+ <Path fill="#FFDC00" d="M170.7 0h170.6v512H170.7z"/>
184
+ <Path fill="#00E070" d="M341.3 0H512v512H341.3z"/>
185
+ </>
186
+ );
187
+ case 'RW': // Ruanda
188
+ return (
189
+ <>
190
+ <Path fill="#00A3E0" d="M0 0h512v256H0z"/>
191
+ <Path fill="#FFDC00" d="M0 256h512v128H0z"/>
192
+ <Path fill="#009E60" d="M0 384h512v128H0z"/>
193
+ <Circle cx="400" cy="80" r="30" fill="#FFDC00"/>
194
+ </>
195
+ );
196
+ case 'BI': // Burundi
197
+ return (
198
+ <>
199
+ <Path fill="#E8001F" d="M0 0h512v512H0z"/>
200
+ <Path fill="#009E60" d="M0 0l256 256L0 512zm512 0L256 256l256 256z"/>
201
+ <Path d="M0 0l512 512M0 512l512-512" stroke="#fff" strokeWidth="40"/>
202
+ <Circle cx="256" cy="256" r="80" fill="#fff"/>
203
+ <Circle cx="256" cy="225" r="10" fill="#e8001f" stroke="#009e60" strokeWidth="2"/>
204
+ <Circle cx="226" cy="275" r="10" fill="#e8001f" stroke="#009e60" strokeWidth="2"/>
205
+ <Circle cx="286" cy="275" r="10" fill="#e8001f" stroke="#009e60" strokeWidth="2"/>
206
+ </>
207
+ );
208
+ case 'BJ': // Benim
209
+ return (
210
+ <>
211
+ <Path fill="#00E070" d="M0 0h192v512H0z"/>
212
+ <Path fill="#FFDC00" d="M192 0h320v256H192z"/>
213
+ <Path fill="#E8001F" d="M192 256h320v256H192z"/>
214
+ </>
215
+ );
216
+ case 'TG': // Togo
217
+ return (
218
+ <>
219
+ <Path fill="#FFDC00" d="M0 0h512v512H0z"/>
220
+ <Path fill="#009E60" d="M0 0h512v102.4H0zm0 204.8h512v102.4H0zm0 204.8h512v102.4H0z"/>
221
+ <Path fill="#E8001F" d="M0 0h204.8v204.8H0z"/>
222
+ <Path fill="#fff" d="M102.4 75l10 30h32l-26 18 10 30-26-18-26 18 10-30-26-18h32z"/>
223
+ </>
224
+ );
225
+ case 'CF': // Rep. Centro-Africana
226
+ return (
227
+ <>
228
+ <Path fill="#00209F" d="M0 0h512v128H0z"/>
229
+ <Path fill="#fff" d="M0 128h512v128H0z"/>
230
+ <Path fill="#009E60" d="M0 256h512v128H0z"/>
231
+ <Path fill="#FFDC00" d="M0 384h512v128H0z"/>
232
+ <Path fill="#E8001F" d="M213.3 0h85.4v512h-85.4z"/>
233
+ <Path fill="#FFDC00" d="M60 25l6 18h19l-15 11 6 18-15-11-15 11 6-18-15-11h19z"/>
234
+ </>
235
+ );
236
+ case 'CG': // Congo
237
+ return (
238
+ <>
239
+ <Path fill="#FFDC00" d="M0 0h512v512H0z"/>
240
+ <Path fill="#009E60" d="M0 0h341.3L0 341.3z"/>
241
+ <Path fill="#E8001F" d="M512 512L170.7 512L512 170.7z"/>
242
+ </>
243
+ );
244
+ case 'GA': // Gabão
245
+ return (
246
+ <>
247
+ <Path fill="#00E070" d="M0 0h512v170.7H0z"/>
248
+ <Path fill="#FFDC00" d="M0 170.7h512v170.6H0z"/>
249
+ <Path fill="#00209F" d="M0 341.3h512V512H0z"/>
250
+ </>
251
+ );
252
+ case 'GQ': // Guiné Equatorial
253
+ return (
254
+ <>
255
+ <Path fill="#009E60" d="M0 0h512v170.7H0z"/>
256
+ <Path fill="#fff" d="M0 170.7h512v170.6H0z"/>
257
+ <Path fill="#E8001F" d="M0 341.3h512V512H0z"/>
258
+ <Path fill="#00A3E0" d="M0 0l170.7 256L0 512z"/>
259
+ <Path fill="#888" d="M246 236h20v40h-20z"/>
260
+ <Path fill="#009E60" d="M256 216c5 0 5 15 5 20h-10c0-5 0-20 5-20z"/>
261
+ </>
262
+ );
263
+ case 'DJ': // Djibouti
264
+ return (
265
+ <>
266
+ <Path fill="#00A3E0" d="M0 0h512v256H0z"/>
267
+ <Path fill="#009E60" d="M0 256h512v256H0z"/>
268
+ <Path fill="#fff" d="M0 0l216 256L0 512z"/>
269
+ <Path fill="#E8001F" d="M70 230l5 15h16l-13 9 5 15-13-9-13 9 5-15-13-9h16z"/>
270
+ </>
271
+ );
272
+ case 'KM': // Comores
273
+ return (
274
+ <>
275
+ <Path fill="#FFDC00" d="M0 0h512v128H0z"/>
276
+ <Path fill="#fff" d="M0 128h512v128H0z"/>
277
+ <Path fill="#E8001F" d="M0 256h512v128H0z"/>
278
+ <Path fill="#00209F" d="M0 384h512v128H0z"/>
279
+ <Path fill="#009E60" d="M0 0l216 256L0 512z"/>
280
+ <Path fill="#fff" d="M45 220c15 0 25 15 25 36s-10 36-25 36c20 0 30-15 30-36s-10-36-30-36z"/>
281
+ <Circle cx="76" cy="211" r="3" fill="#fff"/>
282
+ <Circle cx="79" cy="236" r="3" fill="#fff"/>
283
+ <Circle cx="79" cy="261" r="3" fill="#fff"/>
284
+ <Circle cx="76" cy="286" r="3" fill="#fff"/>
285
+ </>
286
+ );
287
+ case 'VU': // Vanuatu
288
+ return (
289
+ <>
290
+ <Path fill="#E8001F" d="M0 0h512v256H0z"/>
291
+ <Path fill="#009E60" d="M0 256h512v256H0z"/>
292
+ <Path fill="#FFDC00" d="M0 0l250 256L0 512z"/>
293
+ <Path fill="#000" d="M0 30l210 226L0 482z"/>
294
+ <Path fill="#FFDC00" d="M220 240h292v32H220z"/>
295
+ <Path fill="#000" d="M230 246h282v20H230z"/>
296
+ <Circle cx="65" cy="256" r="30" fill="none" stroke="#FFDC00" strokeWidth="6" strokeDasharray="140 50"/>
297
+ </>
298
+ );
299
+ case 'SC': // Seychelles
300
+ return (
301
+ <>
302
+ <Path fill="#00209F" d="M0 512L0 0h170.7z"/>
303
+ <Path fill="#FFDC00" d="M0 512L170.7 0h170.6z"/>
304
+ <Path fill="#E8001F" d="M0 512L341.3 0H512v170.7z"/>
305
+ <Path fill="#fff" d="M0 512L512 170.7v170.6z"/>
306
+ <Path fill="#009E60" d="M0 512L512 341.3V512z"/>
307
+ </>
308
+ );
309
+ case 'HT': // Haiti
310
+ return (
311
+ <>
312
+ <Path fill="#00209F" d="M0 0h512v256H0z"/>
313
+ <Path fill="#E8001F" d="M0 256h512v256H0z"/>
314
+ <Path fill="#fff" d="M220 220h72v72H220z"/>
315
+ <Path fill="#51332d" d="M253 235h6v20h-6z"/>
316
+ <Path fill="#009E60" d="M256 235c-8-6-15 4-15 4s7 3 15-4zm0 0c8-6 15 4 15 4s-7 3-15-4z"/>
317
+ </>
318
+ );
319
+ default: // Fallback gray
320
+ return (
321
+ <Path fill="#ccc" d="M0 0h512v512H0z"/>
322
+ );
323
+ }
324
+ };
325
+
326
+ return (
327
+ <View
328
+ style={[
329
+ {
330
+ width: size,
331
+ height: size,
332
+ borderRadius: size / 2,
333
+ overflow: 'hidden',
334
+ },
335
+ style,
336
+ ]}
337
+ >
338
+ <Svg
339
+ width={size}
340
+ height={size}
341
+ viewBox="0 0 512 512"
342
+ >
343
+ {renderFlagContent()}
344
+ </Svg>
345
+ </View>
346
+ );
347
+ };