@situaction/traquiste-mobile 1.0.0 → 1.1.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.
Files changed (463) hide show
  1. package/README.md +60 -90
  2. package/build/components/AssociationTag/AssociationTag.d.ts +19 -0
  3. package/build/components/AssociationTag/AssociationTag.d.ts.map +1 -0
  4. package/build/components/AssociationTag/AssociationTag.js +29 -0
  5. package/build/components/AssociationTag/AssociationTag.js.map +1 -0
  6. package/build/components/AssociationTag/AssociationTag.styles.d.ts +21 -0
  7. package/build/components/AssociationTag/AssociationTag.styles.d.ts.map +1 -0
  8. package/build/components/AssociationTag/AssociationTag.styles.js +26 -0
  9. package/build/components/AssociationTag/AssociationTag.styles.js.map +1 -0
  10. package/build/components/AssociationTag/index.d.ts +3 -0
  11. package/build/components/AssociationTag/index.d.ts.map +1 -0
  12. package/build/components/AssociationTag/index.js +2 -0
  13. package/build/components/AssociationTag/index.js.map +1 -0
  14. package/build/components/BottomSheet/BottomSheet.d.ts +36 -0
  15. package/build/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  16. package/build/components/BottomSheet/BottomSheet.js +76 -0
  17. package/build/components/BottomSheet/BottomSheet.js.map +1 -0
  18. package/build/components/BottomSheet/BottomSheet.styles.d.ts +32 -0
  19. package/build/components/BottomSheet/BottomSheet.styles.d.ts.map +1 -0
  20. package/build/components/BottomSheet/BottomSheet.styles.js +31 -0
  21. package/build/components/BottomSheet/BottomSheet.styles.js.map +1 -0
  22. package/build/components/BottomSheet/index.d.ts +3 -0
  23. package/build/components/BottomSheet/index.d.ts.map +1 -0
  24. package/build/components/BottomSheet/index.js +2 -0
  25. package/build/components/BottomSheet/index.js.map +1 -0
  26. package/build/components/Button/Button.d.ts +5 -1
  27. package/build/components/Button/Button.d.ts.map +1 -1
  28. package/build/components/Button/Button.js +11 -5
  29. package/build/components/Button/Button.js.map +1 -1
  30. package/build/components/ButtonAction/ButtonAction.d.ts +5 -1
  31. package/build/components/ButtonAction/ButtonAction.d.ts.map +1 -1
  32. package/build/components/ButtonAction/ButtonAction.js +2 -2
  33. package/build/components/ButtonAction/ButtonAction.js.map +1 -1
  34. package/build/components/ButtonMap/ButtonMap.d.ts +5 -1
  35. package/build/components/ButtonMap/ButtonMap.d.ts.map +1 -1
  36. package/build/components/ButtonMap/ButtonMap.js +11 -9
  37. package/build/components/ButtonMap/ButtonMap.js.map +1 -1
  38. package/build/components/ButtonMenu/ButtonMenu.d.ts +5 -1
  39. package/build/components/ButtonMenu/ButtonMenu.d.ts.map +1 -1
  40. package/build/components/ButtonMenu/ButtonMenu.js +15 -15
  41. package/build/components/ButtonMenu/ButtonMenu.js.map +1 -1
  42. package/build/components/Calendar/Calendar.d.ts +4 -0
  43. package/build/components/Calendar/Calendar.d.ts.map +1 -0
  44. package/build/components/Calendar/Calendar.i18n.d.ts +34 -0
  45. package/build/components/Calendar/Calendar.i18n.d.ts.map +1 -0
  46. package/build/components/Calendar/Calendar.i18n.js +34 -0
  47. package/build/components/Calendar/Calendar.i18n.js.map +1 -0
  48. package/build/components/Calendar/Calendar.js +172 -0
  49. package/build/components/Calendar/Calendar.js.map +1 -0
  50. package/build/components/Calendar/Calendar.styles.d.ts +254 -0
  51. package/build/components/Calendar/Calendar.styles.d.ts.map +1 -0
  52. package/build/components/Calendar/Calendar.styles.js +231 -0
  53. package/build/components/Calendar/Calendar.styles.js.map +1 -0
  54. package/build/components/Calendar/Calendar.types.d.ts +62 -0
  55. package/build/components/Calendar/Calendar.types.d.ts.map +1 -0
  56. package/build/components/Calendar/Calendar.types.js +2 -0
  57. package/build/components/Calendar/Calendar.types.js.map +1 -0
  58. package/build/components/Calendar/CalendarDay.d.ts +4 -0
  59. package/build/components/Calendar/CalendarDay.d.ts.map +1 -0
  60. package/build/components/Calendar/CalendarDay.js +52 -0
  61. package/build/components/Calendar/CalendarDay.js.map +1 -0
  62. package/build/components/Calendar/CalendarHeader.d.ts +4 -0
  63. package/build/components/Calendar/CalendarHeader.d.ts.map +1 -0
  64. package/build/components/Calendar/CalendarHeader.js +16 -0
  65. package/build/components/Calendar/CalendarHeader.js.map +1 -0
  66. package/build/components/Calendar/CalendarLegend.d.ts +3 -0
  67. package/build/components/Calendar/CalendarLegend.d.ts.map +1 -0
  68. package/build/components/Calendar/CalendarLegend.js +38 -0
  69. package/build/components/Calendar/CalendarLegend.js.map +1 -0
  70. package/build/components/Calendar/CalendarYearPicker.d.ts +19 -0
  71. package/build/components/Calendar/CalendarYearPicker.d.ts.map +1 -0
  72. package/build/components/Calendar/CalendarYearPicker.js +158 -0
  73. package/build/components/Calendar/CalendarYearPicker.js.map +1 -0
  74. package/build/components/Calendar/index.d.ts +5 -0
  75. package/build/components/Calendar/index.d.ts.map +1 -0
  76. package/build/components/Calendar/index.js +3 -0
  77. package/build/components/Calendar/index.js.map +1 -0
  78. package/build/components/Card/Card.d.ts +25 -0
  79. package/build/components/Card/Card.d.ts.map +1 -0
  80. package/build/components/Card/Card.js +31 -0
  81. package/build/components/Card/Card.js.map +1 -0
  82. package/build/components/Card/Card.styles.d.ts +15 -0
  83. package/build/components/Card/Card.styles.d.ts.map +1 -0
  84. package/build/components/Card/Card.styles.js +18 -0
  85. package/build/components/Card/Card.styles.js.map +1 -0
  86. package/build/components/Card/index.d.ts +3 -0
  87. package/build/components/Card/index.d.ts.map +1 -0
  88. package/build/components/Card/index.js +2 -0
  89. package/build/components/Card/index.js.map +1 -0
  90. package/build/components/CardEquip/CardEquip.d.ts +60 -0
  91. package/build/components/CardEquip/CardEquip.d.ts.map +1 -0
  92. package/build/components/CardEquip/CardEquip.js +106 -0
  93. package/build/components/CardEquip/CardEquip.js.map +1 -0
  94. package/build/components/CardEquip/CardEquip.styles.d.ts +125 -0
  95. package/build/components/CardEquip/CardEquip.styles.d.ts.map +1 -0
  96. package/build/components/CardEquip/CardEquip.styles.js +139 -0
  97. package/build/components/CardEquip/CardEquip.styles.js.map +1 -0
  98. package/build/components/CardEquip/index.d.ts +3 -0
  99. package/build/components/CardEquip/index.d.ts.map +1 -0
  100. package/build/components/CardEquip/index.js +2 -0
  101. package/build/components/CardEquip/index.js.map +1 -0
  102. package/build/components/CardProfile/CardProfile.d.ts +55 -0
  103. package/build/components/CardProfile/CardProfile.d.ts.map +1 -0
  104. package/build/components/CardProfile/CardProfile.js +74 -0
  105. package/build/components/CardProfile/CardProfile.js.map +1 -0
  106. package/build/components/CardProfile/CardProfile.styles.d.ts +62 -0
  107. package/build/components/CardProfile/CardProfile.styles.d.ts.map +1 -0
  108. package/build/components/CardProfile/CardProfile.styles.js +65 -0
  109. package/build/components/CardProfile/CardProfile.styles.js.map +1 -0
  110. package/build/components/CardProfile/index.d.ts +3 -0
  111. package/build/components/CardProfile/index.d.ts.map +1 -0
  112. package/build/components/CardProfile/index.js +2 -0
  113. package/build/components/CardProfile/index.js.map +1 -0
  114. package/build/components/Checkbox/Checkbox.d.ts +28 -0
  115. package/build/components/Checkbox/Checkbox.d.ts.map +1 -0
  116. package/build/components/Checkbox/Checkbox.js +78 -0
  117. package/build/components/Checkbox/Checkbox.js.map +1 -0
  118. package/build/components/Checkbox/Checkbox.styles.d.ts +34 -0
  119. package/build/components/Checkbox/Checkbox.styles.d.ts.map +1 -0
  120. package/build/components/Checkbox/Checkbox.styles.js +39 -0
  121. package/build/components/Checkbox/Checkbox.styles.js.map +1 -0
  122. package/build/components/Checkbox/Checkbox.types.d.ts +25 -0
  123. package/build/components/Checkbox/Checkbox.types.d.ts.map +1 -0
  124. package/build/components/Checkbox/Checkbox.types.js +5 -0
  125. package/build/components/Checkbox/Checkbox.types.js.map +1 -0
  126. package/build/components/Checkbox/index.d.ts +3 -0
  127. package/build/components/Checkbox/index.d.ts.map +1 -0
  128. package/build/components/Checkbox/index.js +2 -0
  129. package/build/components/Checkbox/index.js.map +1 -0
  130. package/build/components/Cluster/Cluster.d.ts +23 -0
  131. package/build/components/Cluster/Cluster.d.ts.map +1 -0
  132. package/build/components/Cluster/Cluster.js +34 -0
  133. package/build/components/Cluster/Cluster.js.map +1 -0
  134. package/build/components/Cluster/Cluster.styles.d.ts +33 -0
  135. package/build/components/Cluster/Cluster.styles.d.ts.map +1 -0
  136. package/build/components/Cluster/Cluster.styles.js +34 -0
  137. package/build/components/Cluster/Cluster.styles.js.map +1 -0
  138. package/build/components/Cluster/index.d.ts +3 -0
  139. package/build/components/Cluster/index.d.ts.map +1 -0
  140. package/build/components/Cluster/index.js +2 -0
  141. package/build/components/Cluster/index.js.map +1 -0
  142. package/build/components/ColorPicker/ColorPicker.d.ts +20 -0
  143. package/build/components/ColorPicker/ColorPicker.d.ts.map +1 -0
  144. package/build/components/ColorPicker/ColorPicker.js +17 -0
  145. package/build/components/ColorPicker/ColorPicker.js.map +1 -0
  146. package/build/components/ColorPicker/ColorPicker.styles.d.ts +10 -0
  147. package/build/components/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
  148. package/build/components/ColorPicker/ColorPicker.styles.js +11 -0
  149. package/build/components/ColorPicker/ColorPicker.styles.js.map +1 -0
  150. package/build/components/ColorPicker/index.d.ts +3 -0
  151. package/build/components/ColorPicker/index.d.ts.map +1 -0
  152. package/build/components/ColorPicker/index.js +2 -0
  153. package/build/components/ColorPicker/index.js.map +1 -0
  154. package/build/components/ColorSwatch/ColorSwatch.d.ts +20 -0
  155. package/build/components/ColorSwatch/ColorSwatch.d.ts.map +1 -0
  156. package/build/components/ColorSwatch/ColorSwatch.js +35 -0
  157. package/build/components/ColorSwatch/ColorSwatch.js.map +1 -0
  158. package/build/components/ColorSwatch/ColorSwatch.styles.d.ts +16 -0
  159. package/build/components/ColorSwatch/ColorSwatch.styles.d.ts.map +1 -0
  160. package/build/components/ColorSwatch/ColorSwatch.styles.js +19 -0
  161. package/build/components/ColorSwatch/ColorSwatch.styles.js.map +1 -0
  162. package/build/components/ColorSwatch/index.d.ts +3 -0
  163. package/build/components/ColorSwatch/index.d.ts.map +1 -0
  164. package/build/components/ColorSwatch/index.js +2 -0
  165. package/build/components/ColorSwatch/index.js.map +1 -0
  166. package/build/components/FileCard/FileCard.d.ts +29 -0
  167. package/build/components/FileCard/FileCard.d.ts.map +1 -0
  168. package/build/components/FileCard/FileCard.js +66 -0
  169. package/build/components/FileCard/FileCard.js.map +1 -0
  170. package/build/components/FileCard/FileCard.styles.d.ts +54 -0
  171. package/build/components/FileCard/FileCard.styles.d.ts.map +1 -0
  172. package/build/components/FileCard/FileCard.styles.js +56 -0
  173. package/build/components/FileCard/FileCard.styles.js.map +1 -0
  174. package/build/components/FileCard/index.d.ts +3 -0
  175. package/build/components/FileCard/index.d.ts.map +1 -0
  176. package/build/components/FileCard/index.js +2 -0
  177. package/build/components/FileCard/index.js.map +1 -0
  178. package/build/components/FilterChip/FilterChip.d.ts +5 -1
  179. package/build/components/FilterChip/FilterChip.d.ts.map +1 -1
  180. package/build/components/FilterChip/FilterChip.js +12 -11
  181. package/build/components/FilterChip/FilterChip.js.map +1 -1
  182. package/build/components/FilterNav/FilterNav.d.ts +53 -0
  183. package/build/components/FilterNav/FilterNav.d.ts.map +1 -0
  184. package/build/components/FilterNav/FilterNav.js +39 -0
  185. package/build/components/FilterNav/FilterNav.js.map +1 -0
  186. package/build/components/FilterNav/FilterNav.styles.d.ts +10 -0
  187. package/build/components/FilterNav/FilterNav.styles.d.ts.map +1 -0
  188. package/build/components/FilterNav/FilterNav.styles.js +11 -0
  189. package/build/components/FilterNav/FilterNav.styles.js.map +1 -0
  190. package/build/components/FilterNav/index.d.ts +3 -0
  191. package/build/components/FilterNav/index.d.ts.map +1 -0
  192. package/build/components/FilterNav/index.js +2 -0
  193. package/build/components/FilterNav/index.js.map +1 -0
  194. package/build/components/ImgPicker/ImgPicker.d.ts +47 -0
  195. package/build/components/ImgPicker/ImgPicker.d.ts.map +1 -0
  196. package/build/components/ImgPicker/ImgPicker.js +49 -0
  197. package/build/components/ImgPicker/ImgPicker.js.map +1 -0
  198. package/build/components/ImgPicker/ImgPicker.styles.d.ts +18 -0
  199. package/build/components/ImgPicker/ImgPicker.styles.d.ts.map +1 -0
  200. package/build/components/ImgPicker/ImgPicker.styles.js +19 -0
  201. package/build/components/ImgPicker/ImgPicker.styles.js.map +1 -0
  202. package/build/components/ImgPicker/index.d.ts +3 -0
  203. package/build/components/ImgPicker/index.d.ts.map +1 -0
  204. package/build/components/ImgPicker/index.js +2 -0
  205. package/build/components/ImgPicker/index.js.map +1 -0
  206. package/build/components/InlineInfo/InlineInfo.d.ts +60 -0
  207. package/build/components/InlineInfo/InlineInfo.d.ts.map +1 -0
  208. package/build/components/InlineInfo/InlineInfo.js +115 -0
  209. package/build/components/InlineInfo/InlineInfo.js.map +1 -0
  210. package/build/components/InlineInfo/InlineInfo.styles.d.ts +42 -0
  211. package/build/components/InlineInfo/InlineInfo.styles.d.ts.map +1 -0
  212. package/build/components/InlineInfo/InlineInfo.styles.js +50 -0
  213. package/build/components/InlineInfo/InlineInfo.styles.js.map +1 -0
  214. package/build/components/InlineInfo/index.d.ts +3 -0
  215. package/build/components/InlineInfo/index.d.ts.map +1 -0
  216. package/build/components/InlineInfo/index.js +2 -0
  217. package/build/components/InlineInfo/index.js.map +1 -0
  218. package/build/components/Input/Input.d.ts +57 -0
  219. package/build/components/Input/Input.d.ts.map +1 -0
  220. package/build/components/Input/Input.js +104 -0
  221. package/build/components/Input/Input.js.map +1 -0
  222. package/build/components/Input/Input.styles.d.ts +34 -0
  223. package/build/components/Input/Input.styles.d.ts.map +1 -0
  224. package/build/components/Input/Input.styles.js +35 -0
  225. package/build/components/Input/Input.styles.js.map +1 -0
  226. package/build/components/Input/index.d.ts +3 -0
  227. package/build/components/Input/index.d.ts.map +1 -0
  228. package/build/components/Input/index.js +2 -0
  229. package/build/components/Input/index.js.map +1 -0
  230. package/build/components/ListItem/ListItem.d.ts +42 -0
  231. package/build/components/ListItem/ListItem.d.ts.map +1 -0
  232. package/build/components/ListItem/ListItem.js +66 -0
  233. package/build/components/ListItem/ListItem.js.map +1 -0
  234. package/build/components/ListItem/ListItem.styles.d.ts +66 -0
  235. package/build/components/ListItem/ListItem.styles.d.ts.map +1 -0
  236. package/build/components/ListItem/ListItem.styles.js +70 -0
  237. package/build/components/ListItem/ListItem.styles.js.map +1 -0
  238. package/build/components/ListItem/index.d.ts +3 -0
  239. package/build/components/ListItem/index.d.ts.map +1 -0
  240. package/build/components/ListItem/index.js +2 -0
  241. package/build/components/ListItem/index.js.map +1 -0
  242. package/build/components/MapPin/MapPin.d.ts +61 -0
  243. package/build/components/MapPin/MapPin.d.ts.map +1 -0
  244. package/build/components/MapPin/MapPin.js +118 -0
  245. package/build/components/MapPin/MapPin.js.map +1 -0
  246. package/build/components/MapPin/MapPin.styles.d.ts +93 -0
  247. package/build/components/MapPin/MapPin.styles.d.ts.map +1 -0
  248. package/build/components/MapPin/MapPin.styles.js +101 -0
  249. package/build/components/MapPin/MapPin.styles.js.map +1 -0
  250. package/build/components/MapPin/index.d.ts +3 -0
  251. package/build/components/MapPin/index.d.ts.map +1 -0
  252. package/build/components/MapPin/index.js +2 -0
  253. package/build/components/MapPin/index.js.map +1 -0
  254. package/build/components/MediaPicker/MediaPicker.d.ts +74 -0
  255. package/build/components/MediaPicker/MediaPicker.d.ts.map +1 -0
  256. package/build/components/MediaPicker/MediaPicker.js +43 -0
  257. package/build/components/MediaPicker/MediaPicker.js.map +1 -0
  258. package/build/components/MediaPicker/MediaPicker.styles.d.ts +30 -0
  259. package/build/components/MediaPicker/MediaPicker.styles.d.ts.map +1 -0
  260. package/build/components/MediaPicker/MediaPicker.styles.js +31 -0
  261. package/build/components/MediaPicker/MediaPicker.styles.js.map +1 -0
  262. package/build/components/MediaPicker/index.d.ts +3 -0
  263. package/build/components/MediaPicker/index.d.ts.map +1 -0
  264. package/build/components/MediaPicker/index.js +2 -0
  265. package/build/components/MediaPicker/index.js.map +1 -0
  266. package/build/components/PhotoCard/PhotoCard.d.ts +28 -0
  267. package/build/components/PhotoCard/PhotoCard.d.ts.map +1 -0
  268. package/build/components/PhotoCard/PhotoCard.js +53 -0
  269. package/build/components/PhotoCard/PhotoCard.js.map +1 -0
  270. package/build/components/PhotoCard/PhotoCard.styles.d.ts +47 -0
  271. package/build/components/PhotoCard/PhotoCard.styles.d.ts.map +1 -0
  272. package/build/components/PhotoCard/PhotoCard.styles.js +45 -0
  273. package/build/components/PhotoCard/PhotoCard.styles.js.map +1 -0
  274. package/build/components/PhotoCard/index.d.ts +3 -0
  275. package/build/components/PhotoCard/index.d.ts.map +1 -0
  276. package/build/components/PhotoCard/index.js +2 -0
  277. package/build/components/PhotoCard/index.js.map +1 -0
  278. package/build/components/ProgressStep/ProgressStep.d.ts +9 -0
  279. package/build/components/ProgressStep/ProgressStep.d.ts.map +1 -0
  280. package/build/components/ProgressStep/ProgressStep.js +23 -0
  281. package/build/components/ProgressStep/ProgressStep.js.map +1 -0
  282. package/build/components/ProgressStep/ProgressStep.styles.d.ts +12 -0
  283. package/build/components/ProgressStep/ProgressStep.styles.d.ts.map +1 -0
  284. package/build/components/ProgressStep/ProgressStep.styles.js +13 -0
  285. package/build/components/ProgressStep/ProgressStep.styles.js.map +1 -0
  286. package/build/components/ProgressStep/index.d.ts +3 -0
  287. package/build/components/ProgressStep/index.d.ts.map +1 -0
  288. package/build/components/ProgressStep/index.js +2 -0
  289. package/build/components/ProgressStep/index.js.map +1 -0
  290. package/build/components/RadioButton/RadioButton.d.ts +29 -0
  291. package/build/components/RadioButton/RadioButton.d.ts.map +1 -0
  292. package/build/components/RadioButton/RadioButton.js +71 -0
  293. package/build/components/RadioButton/RadioButton.js.map +1 -0
  294. package/build/components/RadioButton/RadioButton.styles.d.ts +27 -0
  295. package/build/components/RadioButton/RadioButton.styles.d.ts.map +1 -0
  296. package/build/components/RadioButton/RadioButton.styles.js +30 -0
  297. package/build/components/RadioButton/RadioButton.styles.js.map +1 -0
  298. package/build/components/RadioButton/index.d.ts +3 -0
  299. package/build/components/RadioButton/index.d.ts.map +1 -0
  300. package/build/components/RadioButton/index.js +2 -0
  301. package/build/components/RadioButton/index.js.map +1 -0
  302. package/build/components/SearchBar/SearchBar.d.ts +33 -0
  303. package/build/components/SearchBar/SearchBar.d.ts.map +1 -0
  304. package/build/components/SearchBar/SearchBar.js +83 -0
  305. package/build/components/SearchBar/SearchBar.js.map +1 -0
  306. package/build/components/SearchBar/SearchBar.styles.d.ts +19 -0
  307. package/build/components/SearchBar/SearchBar.styles.d.ts.map +1 -0
  308. package/build/components/SearchBar/SearchBar.styles.js +21 -0
  309. package/build/components/SearchBar/SearchBar.styles.js.map +1 -0
  310. package/build/components/SearchBar/index.d.ts +3 -0
  311. package/build/components/SearchBar/index.d.ts.map +1 -0
  312. package/build/components/SearchBar/index.js +2 -0
  313. package/build/components/SearchBar/index.js.map +1 -0
  314. package/build/components/Spinner/Spinner.d.ts +12 -0
  315. package/build/components/Spinner/Spinner.d.ts.map +1 -0
  316. package/build/components/Spinner/Spinner.js +80 -0
  317. package/build/components/Spinner/Spinner.js.map +1 -0
  318. package/build/components/Spinner/Spinner.styles.d.ts +21 -0
  319. package/build/components/Spinner/Spinner.styles.d.ts.map +1 -0
  320. package/build/components/Spinner/Spinner.styles.js +22 -0
  321. package/build/components/Spinner/Spinner.styles.js.map +1 -0
  322. package/build/components/Spinner/index.d.ts +3 -0
  323. package/build/components/Spinner/index.d.ts.map +1 -0
  324. package/build/components/Spinner/index.js +2 -0
  325. package/build/components/Spinner/index.js.map +1 -0
  326. package/build/components/StepSheet/StepSheet.d.ts +77 -0
  327. package/build/components/StepSheet/StepSheet.d.ts.map +1 -0
  328. package/build/components/StepSheet/StepSheet.js +30 -0
  329. package/build/components/StepSheet/StepSheet.js.map +1 -0
  330. package/build/components/StepSheet/StepSheet.styles.d.ts +6 -0
  331. package/build/components/StepSheet/StepSheet.styles.d.ts.map +1 -0
  332. package/build/components/StepSheet/StepSheet.styles.js +7 -0
  333. package/build/components/StepSheet/StepSheet.styles.js.map +1 -0
  334. package/build/components/StepSheet/index.d.ts +3 -0
  335. package/build/components/StepSheet/index.d.ts.map +1 -0
  336. package/build/components/StepSheet/index.js +2 -0
  337. package/build/components/StepSheet/index.js.map +1 -0
  338. package/build/components/Stepper/Stepper.d.ts +50 -0
  339. package/build/components/Stepper/Stepper.d.ts.map +1 -0
  340. package/build/components/Stepper/Stepper.js +48 -0
  341. package/build/components/Stepper/Stepper.js.map +1 -0
  342. package/build/components/Stepper/Stepper.styles.d.ts +27 -0
  343. package/build/components/Stepper/Stepper.styles.d.ts.map +1 -0
  344. package/build/components/Stepper/Stepper.styles.js +28 -0
  345. package/build/components/Stepper/Stepper.styles.js.map +1 -0
  346. package/build/components/Stepper/index.d.ts +3 -0
  347. package/build/components/Stepper/index.d.ts.map +1 -0
  348. package/build/components/Stepper/index.js +2 -0
  349. package/build/components/Stepper/index.js.map +1 -0
  350. package/build/components/Switch/Switch.d.ts +29 -0
  351. package/build/components/Switch/Switch.d.ts.map +1 -0
  352. package/build/components/Switch/Switch.js +83 -0
  353. package/build/components/Switch/Switch.js.map +1 -0
  354. package/build/components/Switch/Switch.styles.d.ts +29 -0
  355. package/build/components/Switch/Switch.styles.d.ts.map +1 -0
  356. package/build/components/Switch/Switch.styles.js +26 -0
  357. package/build/components/Switch/Switch.styles.js.map +1 -0
  358. package/build/components/Switch/index.d.ts +3 -0
  359. package/build/components/Switch/index.d.ts.map +1 -0
  360. package/build/components/Switch/index.js +2 -0
  361. package/build/components/Switch/index.js.map +1 -0
  362. package/build/components/Tab/Tab.d.ts +50 -0
  363. package/build/components/Tab/Tab.d.ts.map +1 -0
  364. package/build/components/Tab/Tab.js +117 -0
  365. package/build/components/Tab/Tab.js.map +1 -0
  366. package/build/components/Tab/Tab.styles.d.ts +55 -0
  367. package/build/components/Tab/Tab.styles.d.ts.map +1 -0
  368. package/build/components/Tab/Tab.styles.js +60 -0
  369. package/build/components/Tab/Tab.styles.js.map +1 -0
  370. package/build/components/Tab/index.d.ts +3 -0
  371. package/build/components/Tab/index.d.ts.map +1 -0
  372. package/build/components/Tab/index.js +2 -0
  373. package/build/components/Tab/index.js.map +1 -0
  374. package/build/components/Tag/Tag.d.ts +4 -0
  375. package/build/components/Tag/Tag.d.ts.map +1 -0
  376. package/build/components/Tag/Tag.js +40 -0
  377. package/build/components/Tag/Tag.js.map +1 -0
  378. package/build/components/Tag/Tag.styles.d.ts +33 -0
  379. package/build/components/Tag/Tag.styles.d.ts.map +1 -0
  380. package/build/components/Tag/Tag.styles.js +43 -0
  381. package/build/components/Tag/Tag.styles.js.map +1 -0
  382. package/build/components/Tag/Tag.types.d.ts +23 -0
  383. package/build/components/Tag/Tag.types.d.ts.map +1 -0
  384. package/build/components/Tag/Tag.types.js +2 -0
  385. package/build/components/Tag/Tag.types.js.map +1 -0
  386. package/build/components/Tag/index.d.ts +3 -0
  387. package/build/components/Tag/index.d.ts.map +1 -0
  388. package/build/components/Tag/index.js +2 -0
  389. package/build/components/Tag/index.js.map +1 -0
  390. package/build/components/navigation/GeneralNav/GeneralNav.d.ts +19 -0
  391. package/build/components/navigation/GeneralNav/GeneralNav.d.ts.map +1 -0
  392. package/build/components/navigation/GeneralNav/GeneralNav.js +27 -0
  393. package/build/components/navigation/GeneralNav/GeneralNav.js.map +1 -0
  394. package/build/components/navigation/GeneralNav/GeneralNav.styles.d.ts +33 -0
  395. package/build/components/navigation/GeneralNav/GeneralNav.styles.d.ts.map +1 -0
  396. package/build/components/navigation/GeneralNav/GeneralNav.styles.js +35 -0
  397. package/build/components/navigation/GeneralNav/GeneralNav.styles.js.map +1 -0
  398. package/build/components/navigation/GeneralNav/index.d.ts +3 -0
  399. package/build/components/navigation/GeneralNav/index.d.ts.map +1 -0
  400. package/build/components/navigation/GeneralNav/index.js +2 -0
  401. package/build/components/navigation/GeneralNav/index.js.map +1 -0
  402. package/build/components/navigation/MobileCanva/MobileCanva.d.ts +11 -0
  403. package/build/components/navigation/MobileCanva/MobileCanva.d.ts.map +1 -0
  404. package/build/components/navigation/MobileCanva/MobileCanva.js +45 -0
  405. package/build/components/navigation/MobileCanva/MobileCanva.js.map +1 -0
  406. package/build/components/navigation/MobileCanva/MobileCanva.styles.d.ts +93 -0
  407. package/build/components/navigation/MobileCanva/MobileCanva.styles.d.ts.map +1 -0
  408. package/build/components/navigation/MobileCanva/MobileCanva.styles.js +94 -0
  409. package/build/components/navigation/MobileCanva/MobileCanva.styles.js.map +1 -0
  410. package/build/components/navigation/MobileCanva/MobileCanva.types.d.ts +21 -0
  411. package/build/components/navigation/MobileCanva/MobileCanva.types.d.ts.map +1 -0
  412. package/build/components/navigation/MobileCanva/MobileCanva.types.js +2 -0
  413. package/build/components/navigation/MobileCanva/MobileCanva.types.js.map +1 -0
  414. package/build/components/navigation/MobileCanva/index.d.ts +3 -0
  415. package/build/components/navigation/MobileCanva/index.d.ts.map +1 -0
  416. package/build/components/navigation/MobileCanva/index.js +2 -0
  417. package/build/components/navigation/MobileCanva/index.js.map +1 -0
  418. package/build/components/navigation/PageNav/PageNav.d.ts +46 -0
  419. package/build/components/navigation/PageNav/PageNav.d.ts.map +1 -0
  420. package/build/components/navigation/PageNav/PageNav.js +48 -0
  421. package/build/components/navigation/PageNav/PageNav.js.map +1 -0
  422. package/build/components/navigation/PageNav/PageNav.styles.d.ts +60 -0
  423. package/build/components/navigation/PageNav/PageNav.styles.d.ts.map +1 -0
  424. package/build/components/navigation/PageNav/PageNav.styles.js +60 -0
  425. package/build/components/navigation/PageNav/PageNav.styles.js.map +1 -0
  426. package/build/components/navigation/PageNav/index.d.ts +3 -0
  427. package/build/components/navigation/PageNav/index.d.ts.map +1 -0
  428. package/build/components/navigation/PageNav/index.js +2 -0
  429. package/build/components/navigation/PageNav/index.js.map +1 -0
  430. package/build/components/navigation/TabBar/TabBar.d.ts +22 -0
  431. package/build/components/navigation/TabBar/TabBar.d.ts.map +1 -0
  432. package/build/components/navigation/TabBar/TabBar.js +13 -0
  433. package/build/components/navigation/TabBar/TabBar.js.map +1 -0
  434. package/build/components/navigation/TabBar/TabBar.styles.d.ts +14 -0
  435. package/build/components/navigation/TabBar/TabBar.styles.d.ts.map +1 -0
  436. package/build/components/navigation/TabBar/TabBar.styles.js +16 -0
  437. package/build/components/navigation/TabBar/TabBar.styles.js.map +1 -0
  438. package/build/components/navigation/TabBar/index.d.ts +3 -0
  439. package/build/components/navigation/TabBar/index.d.ts.map +1 -0
  440. package/build/components/navigation/TabBar/index.js +2 -0
  441. package/build/components/navigation/TabBar/index.js.map +1 -0
  442. package/build/context/BottomSheetContext.d.ts +42 -0
  443. package/build/context/BottomSheetContext.d.ts.map +1 -0
  444. package/build/context/BottomSheetContext.js +51 -0
  445. package/build/context/BottomSheetContext.js.map +1 -0
  446. package/build/context/ThemeContext.d.ts +5 -1
  447. package/build/context/ThemeContext.d.ts.map +1 -1
  448. package/build/context/ThemeContext.js +4 -2
  449. package/build/context/ThemeContext.js.map +1 -1
  450. package/build/index.d.ts +75 -1
  451. package/build/index.d.ts.map +1 -1
  452. package/build/index.js +37 -0
  453. package/build/index.js.map +1 -1
  454. package/build/theme/tokens/dark.d.ts.map +1 -1
  455. package/build/theme/tokens/dark.js +263 -10
  456. package/build/theme/tokens/dark.js.map +1 -1
  457. package/build/theme/tokens/light.d.ts.map +1 -1
  458. package/build/theme/tokens/light.js +252 -7
  459. package/build/theme/tokens/light.js.map +1 -1
  460. package/build/theme/type.d.ts +398 -0
  461. package/build/theme/type.d.ts.map +1 -1
  462. package/build/theme/type.js.map +1 -1
  463. package/package.json +8 -5
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AA2BtD,kDAAkD;AAElD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAG,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAA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AO,CAAC,CACxC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAE/B;MAAA,CAAC,SAAS,CAAC,QAAQ,CAAC,CACpB;MAAA,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CACxD;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,CACvB;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Button component for Traq[UI]ste Mobile.\n * Supports four variants, four sizes and three content layouts.\n */\nimport React, { useState } from 'react';\nimport { Pressable, Text } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonVariant = 'primary' | 'tertiary' | 'ghost' | 'destructive';\nexport type ButtonSize = 'S' | 'M' | 'L' | 'XL';\nexport type ButtonContent = 'icon-only' | 'icon-only-rounded' | 'icon-both';\n\nexport interface ButtonProps {\n /** Button visual variant */\n variant?: ButtonVariant;\n /** Button size */\n size?: ButtonSize;\n /** Content layout */\n content?: ButtonContent;\n /** Label text — required when content is 'icon-both' */\n label?: string;\n /** Left icon component (Phosphor icon) */\n iconLeft?: React.ReactElement;\n /** Right icon component (Phosphor icon) */\n iconRight?: React.ReactElement;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n}\n\n// --- Size tokens (static, theme-independent) ---\n\nconst SIZE_TOKENS = {\n S: { height: 36, paddingVertical: 10, paddingHorizontal: 10, gap: 8, borderRadius: 8, iconSize: 16, fontSize: 12, lineHeight: 16 },\n M: { height: 40, paddingVertical: 10, paddingHorizontal: 16, gap: 4, borderRadius: 8, iconSize: 18, fontSize: 14, lineHeight: 20 },\n L: { height: 48, paddingVertical: 12, paddingHorizontal: 12, gap: 10, borderRadius: 8, iconSize: 20, fontSize: 16, lineHeight: 24 },\n XL: { height: 60, paddingVertical: 16, paddingHorizontal: 32, gap: 12, borderRadius: 8, iconSize: 24, fontSize: 18, lineHeight: 26 },\n} as const;\n\n// --- Component ---\n\nexport function Button({\n variant = 'primary',\n size = 'M',\n content = 'icon-both',\n label,\n iconLeft,\n iconRight,\n disabled = false,\n onPress,\n style,\n}: ButtonProps) {\n const [pressed, setPressed] = useState(false);\n const { colors } = useTheme();\n\n const sizeTokens = SIZE_TOKENS[size];\n const state = disabled ? 'disabled' : pressed ? 'pressed' : 'default';\n const colorTokens = colors.button[variant][state];\n\n const isIconOnly = content === 'icon-only' || content === 'icon-only-rounded';\n const borderRadius = content === 'icon-only-rounded' ? 9999 : sizeTokens.borderRadius;\n const hasBorder = colorTokens.border !== 'transparent';\n\n const containerStyle: ViewStyle = {\n height: sizeTokens.height,\n paddingVertical: isIconOnly ? undefined : sizeTokens.paddingVertical,\n paddingHorizontal: isIconOnly ? undefined : sizeTokens.paddingHorizontal,\n width: isIconOnly ? sizeTokens.height : undefined,\n borderRadius,\n gap: sizeTokens.gap,\n backgroundColor: colorTokens.background,\n borderWidth: hasBorder ? 1 : undefined,\n borderColor: hasBorder ? colorTokens.border : undefined,\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'row',\n };\n\n const textStyle = {\n color: colorTokens.text,\n fontSize: sizeTokens.fontSize,\n lineHeight: sizeTokens.lineHeight,\n fontFamily: 'Urbanist',\n fontWeight: '500' as const,\n };\n\n // Clone icon elements to inject size and color from active theme state\n const cloneIcon = (icon: React.ReactElement | undefined) => {\n if (!icon) return null;\n return React.cloneElement(icon, {\n size: sizeTokens.iconSize,\n color: colorTokens.icon,\n ...(icon.props as Record<string, unknown>),\n } as object);\n };\n\n if (isIconOnly) {\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n >\n {cloneIcon(iconLeft)}\n </Pressable>\n );\n }\n\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n >\n {cloneIcon(iconLeft)}\n {label != null && <Text style={textStyle}>{label}</Text>}\n {cloneIcon(iconRight)}\n </Pressable>\n );\n}"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AA+BtD,kDAAkD;AAElD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAG,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAG,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpI,CAAC,EAAG,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAG,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpI,CAAC,EAAG,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IAC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I]ste Mobile.\n * Supports four variants, four sizes and three content layouts.\n */\nimport React, { useState } from 'react';\nimport { Pressable, Text } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonVariant = 'primary' | 'tertiary' | 'ghost' | 'destructive';\nexport type ButtonSize = 'S' | 'M' | 'L' | 'XL';\nexport type ButtonContent = 'icon-only' | 'icon-only-rounded' | 'icon-both';\n\nexport interface ButtonProps {\n /** Button visual variant */\n variant?: ButtonVariant;\n /** Button size */\n size?: ButtonSize;\n /** Content layout */\n content?: ButtonContent;\n /** Label text — required when content is 'icon-both' */\n label?: string;\n /** Left icon component (Phosphor icon) */\n iconLeft?: React.ReactElement;\n /** Right icon component (Phosphor icon) */\n iconRight?: React.ReactElement;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n /** Accessibility label for screen readers — defaults to label when omitted */\n accessibilityLabel?: string;\n /** Test identifier */\n testID?: string;\n}\n\n// --- Size tokens (static, theme-independent) ---\n\nconst SIZE_TOKENS = {\n S: { height: 36, paddingVertical: 10, paddingHorizontal: 10, gap: 8, borderRadius: 8, iconSize: 16, fontSize: 12, lineHeight: 16 },\n M: { height: 40, paddingVertical: 10, paddingHorizontal: 16, gap: 4, borderRadius: 8, iconSize: 18, fontSize: 14, lineHeight: 20 },\n L: { height: 48, paddingVertical: 12, paddingHorizontal: 12, gap: 10, borderRadius: 8, iconSize: 20, fontSize: 16, lineHeight: 24 },\n XL: { height: 60, paddingVertical: 16, paddingHorizontal: 32, gap: 12, borderRadius: 8, iconSize: 24, fontSize: 18, lineHeight: 26 },\n} as const;\n\n// --- Component ---\n\nexport function Button({\n variant = 'primary',\n size = 'M',\n content = 'icon-both',\n label,\n iconLeft,\n iconRight,\n disabled = false,\n onPress,\n style,\n accessibilityLabel,\n testID,\n}: ButtonProps) {\n const [pressed, setPressed] = useState(false);\n const { colors, fontFamily } = useTheme();\n\n const sizeTokens = SIZE_TOKENS[size];\n const state = disabled ? 'disabled' : pressed ? 'pressed' : 'default';\n const colorTokens = colors.button[variant][state];\n\n const isIconOnly = content === 'icon-only' || content === 'icon-only-rounded';\n const borderRadius = content === 'icon-only-rounded' ? 9999 : sizeTokens.borderRadius;\n const hasBorder = colorTokens.border !== 'transparent';\n\n const containerStyle: ViewStyle = {\n height: sizeTokens.height,\n paddingVertical: isIconOnly ? undefined : sizeTokens.paddingVertical,\n paddingHorizontal: isIconOnly ? undefined : sizeTokens.paddingHorizontal,\n width: isIconOnly ? sizeTokens.height : undefined,\n borderRadius,\n gap: sizeTokens.gap,\n backgroundColor: colorTokens.background,\n borderWidth: hasBorder ? 1 : undefined,\n borderColor: hasBorder ? colorTokens.border : undefined,\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'row',\n };\n\n const textStyle = {\n color: colorTokens.text,\n fontSize: sizeTokens.fontSize,\n lineHeight: sizeTokens.lineHeight,\n fontFamily,\n fontWeight: '500' as const,\n };\n\n // Clone icon elements to inject size and color from active theme state\n const cloneIcon = (icon: React.ReactElement | undefined) => {\n if (!icon) return null;\n return React.cloneElement(icon, {\n size: sizeTokens.iconSize,\n color: colorTokens.icon,\n ...(icon.props as Record<string, unknown>),\n } as object);\n };\n\n const sharedA11y = {\n accessibilityRole: 'button' as const,\n accessibilityLabel: accessibilityLabel ?? label,\n accessibilityState: { disabled },\n testID,\n };\n\n if (isIconOnly) {\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n {...sharedA11y}\n >\n {cloneIcon(iconLeft)}\n </Pressable>\n );\n }\n\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n {...sharedA11y}\n >\n {cloneIcon(iconLeft)}\n {label != null && <Text style={textStyle}>{label}</Text>}\n {cloneIcon(iconRight)}\n </Pressable>\n );\n}"]}
@@ -16,6 +16,10 @@ export interface ButtonActionProps {
16
16
  onPress?: () => void;
17
17
  /** Additional container styles */
18
18
  style?: StyleProp<ViewStyle>;
19
+ /** Accessibility label for screen readers — recommended for icon-only buttons */
20
+ accessibilityLabel?: string;
21
+ /** Test identifier */
22
+ testID?: string;
19
23
  }
20
- export declare function ButtonAction({ icon, size, disabled, onPress, style, }: ButtonActionProps): React.JSX.Element;
24
+ export declare function ButtonAction({ icon, size, disabled, onPress, style, accessibilityLabel, testID, }: ButtonActionProps): React.JSX.Element;
21
25
  //# sourceMappingURL=ButtonAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAction.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,gBAAgB;IAChB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAWD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAU,EACV,QAAgB,EAChB,OAAO,EACP,KAAK,GACN,EAAE,iBAAiB,qBA2BnB"}
1
+ {"version":3,"file":"ButtonAction.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,gBAAgB;IAChB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAWD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAU,EACV,QAAgB,EAChB,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,MAAM,GACP,EAAE,iBAAiB,qBA+BnB"}
@@ -13,7 +13,7 @@ const ICON_SIZE = {
13
13
  XL: 28,
14
14
  XXL: 32,
15
15
  };
16
- export function ButtonAction({ icon, size = 'M', disabled = false, onPress, style, }) {
16
+ export function ButtonAction({ icon, size = 'M', disabled = false, onPress, style, accessibilityLabel, testID, }) {
17
17
  const { colors } = useTheme();
18
18
  const iconPx = ICON_SIZE[size];
19
19
  const containerStyle = {
@@ -28,7 +28,7 @@ export function ButtonAction({ icon, size = 'M', disabled = false, onPress, styl
28
28
  color: colors.text.primary,
29
29
  ...icon.props,
30
30
  });
31
- return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPress={disabled ? undefined : onPress} style={[containerStyle, style]}>
31
+ return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPress={disabled ? undefined : onPress} style={[containerStyle, style]} accessibilityRole="button" accessibilityLabel={accessibilityLabel} accessibilityState={{ disabled }} testID={testID}>
32
32
  {clonedIcon}
33
33
  </Pressable>);
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAction.js","sourceRoot":"","sources":["../../../src/components/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAiBtD,MAAM,SAAS,GAAqC;IAClD,EAAE,EAAG,EAAE;IACP,CAAC,EAAI,EAAE;IACP,CAAC,EAAI,EAAE;IACP,CAAC,EAAI,EAAE;IACP,EAAE,EAAG,EAAE;IACP,GAAG,EAAE,EAAE;CACR,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,GAAG,GAAG,EACV,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,GACa;IAClB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAE/B,MAAM,cAAc,GAAc;QAChC,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC3B,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB,CAAC;IAEF,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;QAC1C,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO;QAC1B,GAAI,IAAI,CAAC,KAAiC;KACjC,CAAC,CAAC;IAEb,OAAO,CACL,CAAC,SAAS,CACR,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CACxC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAE/B;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * ButtonAction component — bare icon-only pressable with no background or border.\n * Extends Button size range with XS and XXL sizes.\n */\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonActionSize = 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';\n\nexport interface ButtonActionProps {\n /** Icon component (Phosphor Duotone) */\n icon: React.ReactElement;\n /** Icon size */\n size?: ButtonActionSize;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n}\n\nconst ICON_SIZE: Record<ButtonActionSize, number> = {\n XS: 12,\n S: 16,\n M: 20,\n L: 24,\n XL: 28,\n XXL: 32,\n};\n\nexport function ButtonAction({\n icon,\n size = 'M',\n disabled = false,\n onPress,\n style,\n}: ButtonActionProps) {\n const { colors } = useTheme();\n const iconPx = ICON_SIZE[size];\n\n const containerStyle: ViewStyle = {\n width: iconPx,\n height: iconPx,\n opacity: disabled ? 0.5 : 1,\n alignItems: 'center',\n justifyContent: 'center',\n };\n\n const clonedIcon = React.cloneElement(icon, {\n size: iconPx,\n color: colors.text.primary,\n ...(icon.props as Record<string, unknown>),\n } as object);\n\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n >\n {clonedIcon}\n </Pressable>\n );\n}"]}
1
+ {"version":3,"file":"ButtonAction.js","sourceRoot":"","sources":["../../../src/components/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAqBtD,MAAM,SAAS,GAAqC;IAClD,EAAE,EAAG,EAAE;IACP,CAAC,EAAI,EAAE;IACP,CAAC,EAAI,EAAE;IACP,CAAC,EAAI,EAAE;IACP,EAAE,EAAG,EAAE;IACP,GAAG,EAAE,EAAE;CACR,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,GAAG,GAAG,EACV,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,MAAM,GACY;IAClB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAE/B,MAAM,cAAc,GAAc;QAChC,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC3B,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB,CAAC;IAEF,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;QAC1C,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO;QAC1B,GAAI,IAAI,CAAC,KAAiC;KACjC,CAAC,CAAC;IAEb,OAAO,CACL,CAAC,SAAS,CACR,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CACxC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAC/B,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CACjC,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * ButtonAction component — bare icon-only pressable with no background or border.\n * Extends Button size range with XS and XXL sizes.\n */\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonActionSize = 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';\n\nexport interface ButtonActionProps {\n /** Icon component (Phosphor Duotone) */\n icon: React.ReactElement;\n /** Icon size */\n size?: ButtonActionSize;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n /** Accessibility label for screen readers — recommended for icon-only buttons */\n accessibilityLabel?: string;\n /** Test identifier */\n testID?: string;\n}\n\nconst ICON_SIZE: Record<ButtonActionSize, number> = {\n XS: 12,\n S: 16,\n M: 20,\n L: 24,\n XL: 28,\n XXL: 32,\n};\n\nexport function ButtonAction({\n icon,\n size = 'M',\n disabled = false,\n onPress,\n style,\n accessibilityLabel,\n testID,\n}: ButtonActionProps) {\n const { colors } = useTheme();\n const iconPx = ICON_SIZE[size];\n\n const containerStyle: ViewStyle = {\n width: iconPx,\n height: iconPx,\n opacity: disabled ? 0.5 : 1,\n alignItems: 'center',\n justifyContent: 'center',\n };\n\n const clonedIcon = React.cloneElement(icon, {\n size: iconPx,\n color: colors.text.primary,\n ...(icon.props as Record<string, unknown>),\n } as object);\n\n return (\n <Pressable\n pointerEvents={disabled ? 'none' : 'auto'}\n onPress={disabled ? undefined : onPress}\n style={[containerStyle, style]}\n accessibilityRole=\"button\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ disabled }}\n testID={testID}\n >\n {clonedIcon}\n </Pressable>\n );\n}"]}
@@ -13,6 +13,10 @@ export interface ButtonMapProps {
13
13
  onPress?: () => void;
14
14
  /** Additional container styles */
15
15
  style?: StyleProp<ViewStyle>;
16
+ /** Accessibility label for screen readers */
17
+ accessibilityLabel?: string;
18
+ /** Test identifier */
19
+ testID?: string;
16
20
  }
17
- export declare function ButtonMap({ icon, disabled, onPress, style }: ButtonMapProps): React.JSX.Element;
21
+ export declare function ButtonMap({ icon, disabled, onPress, style, accessibilityLabel, testID }: ButtonMapProps): React.JSX.Element;
18
22
  //# sourceMappingURL=ButtonMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonMap.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonMap/ButtonMap.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAUD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,cAAc,qBAY3E"}
1
+ {"version":3,"file":"ButtonMap.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonMap/ButtonMap.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,cAAc,qBAwBvG"}
@@ -3,15 +3,17 @@
3
3
  * Applies a specific cartography shadow (Below/Minimal).
4
4
  */
5
5
  import React from 'react';
6
+ import { useTheme } from '../../context/ThemeContext';
6
7
  import { Button } from '../Button';
7
- const shadowStyle = {
8
- shadowColor: '#0f0f0f0d',
9
- shadowOffset: { width: 0, height: 4 },
10
- shadowRadius: 5,
11
- shadowOpacity: 1,
12
- elevation: 3,
13
- };
14
- export function ButtonMap({ icon, disabled, onPress, style }) {
15
- return (<Button variant="tertiary" content="icon-only-rounded" size="S" iconLeft={icon} disabled={disabled} onPress={onPress} style={[shadowStyle, style]}/>);
8
+ export function ButtonMap({ icon, disabled, onPress, style, accessibilityLabel, testID }) {
9
+ const { colors } = useTheme();
10
+ const shadowStyle = {
11
+ shadowColor: colors.shadow.minimal,
12
+ shadowOffset: { width: 0, height: 4 },
13
+ shadowRadius: 5,
14
+ shadowOpacity: 1,
15
+ elevation: 3,
16
+ };
17
+ return (<Button variant="tertiary" content="icon-only-rounded" size="S" iconLeft={icon} disabled={disabled} onPress={onPress} style={[shadowStyle, style]} accessibilityLabel={accessibilityLabel} testID={testID}/>);
16
18
  }
17
19
  //# sourceMappingURL=ButtonMap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonMap.js","sourceRoot":"","sources":["../../../src/components/ButtonMap/ButtonMap.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAanC,MAAM,WAAW,GAAc;IAC7B,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;IACrC,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,SAAS,EAAE,CAAC;CACb,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAkB;IAC1E,OAAO,CACL,CAAC,MAAM,CACL,OAAO,CAAC,UAAU,CAClB,OAAO,CAAC,mBAAmB,CAC3B,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,CAAC,IAAI,CAAC,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,EAC5B,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * ButtonMap component — icon-only-rounded Button wrapper for map UI.\n * Applies a specific cartography shadow (Below/Minimal).\n */\nimport React from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { Button } from '../Button';\n\nexport interface ButtonMapProps {\n /** Icon component (Phosphor Duotone) */\n icon: React.ReactElement;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n}\n\nconst shadowStyle: ViewStyle = {\n shadowColor: '#0f0f0f0d',\n shadowOffset: { width: 0, height: 4 },\n shadowRadius: 5,\n shadowOpacity: 1,\n elevation: 3,\n};\n\nexport function ButtonMap({ icon, disabled, onPress, style }: ButtonMapProps) {\n return (\n <Button\n variant=\"tertiary\"\n content=\"icon-only-rounded\"\n size=\"S\"\n iconLeft={icon}\n disabled={disabled}\n onPress={onPress}\n style={[shadowStyle, style]}\n />\n );\n}"]}
1
+ {"version":3,"file":"ButtonMap.js","sourceRoot":"","sources":["../../../src/components/ButtonMap/ButtonMap.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAiBnC,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAkB;IACtG,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE9B,MAAM,WAAW,GAAc;QAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QAClC,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACrC,YAAY,EAAE,CAAC;QACf,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,CAAC;KACb,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,OAAO,CAAC,UAAU,CAClB,OAAO,CAAC,mBAAmB,CAC3B,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,CAAC,IAAI,CAAC,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAC5B,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * ButtonMap component — icon-only-rounded Button wrapper for map UI.\n * Applies a specific cartography shadow (Below/Minimal).\n */\nimport React from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { Button } from '../Button';\n\nexport interface ButtonMapProps {\n /** Icon component (Phosphor Duotone) */\n icon: React.ReactElement;\n /** Disabled state */\n disabled?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n /** Accessibility label for screen readers */\n accessibilityLabel?: string;\n /** Test identifier */\n testID?: string;\n}\n\nexport function ButtonMap({ icon, disabled, onPress, style, accessibilityLabel, testID }: ButtonMapProps) {\n const { colors } = useTheme();\n\n const shadowStyle: ViewStyle = {\n shadowColor: colors.shadow.minimal,\n shadowOffset: { width: 0, height: 4 },\n shadowRadius: 5,\n shadowOpacity: 1,\n elevation: 3,\n };\n\n return (\n <Button\n variant=\"tertiary\"\n content=\"icon-only-rounded\"\n size=\"S\"\n iconLeft={icon}\n disabled={disabled}\n onPress={onPress}\n style={[shadowStyle, style]}\n accessibilityLabel={accessibilityLabel}\n testID={testID}\n />\n );\n}"]}
@@ -17,6 +17,10 @@ export interface ButtonMenuProps {
17
17
  onPress?: () => void;
18
18
  /** Additional container styles */
19
19
  style?: StyleProp<ViewStyle>;
20
+ /** Accessibility label for screen readers */
21
+ accessibilityLabel?: string;
22
+ /** Test identifier */
23
+ testID?: string;
20
24
  }
21
- export declare function ButtonMenu({ icon, state, notif, onPress, style, }: ButtonMenuProps): React.JSX.Element;
25
+ export declare function ButtonMenu({ icon, state, notif, onPress, style, accessibilityLabel, testID, }: ButtonMenuProps): React.JSX.Element;
22
26
  //# sourceMappingURL=ButtonMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonMenu/ButtonMenu.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,IAAI,EAAE,YAAY,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAkBD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAiB,EACjB,KAAa,EACb,OAAO,EACP,KAAK,GACN,EAAE,eAAe,qBAkDjB"}
1
+ {"version":3,"file":"ButtonMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonMenu/ButtonMenu.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,IAAI,EAAE,YAAY,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAiB,EACjB,KAAa,EACb,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,MAAM,GACP,EAAE,eAAe,qBAmEjB"}
@@ -5,24 +5,23 @@
5
5
  import React, { useState } from 'react';
6
6
  import { Pressable, View } from 'react-native';
7
7
  import { useTheme } from '../../context/ThemeContext';
8
- const BACKGROUND = {
9
- default: 'transparent',
10
- active: '#d1c3a033',
11
- disabled: '#0f0f0f0d',
12
- };
13
- const BORDER_COLOR = {
14
- default: undefined,
15
- active: '#afafad80',
16
- disabled: undefined,
17
- };
18
- const PRESSED_BACKGROUND = '#d1c3a066';
19
8
  const ICON_SIZE = 28;
20
9
  const NOTIF_DOT = 8;
21
- export function ButtonMenu({ icon, state = 'default', notif = false, onPress, style, }) {
10
+ export function ButtonMenu({ icon, state = 'default', notif = false, onPress, style, accessibilityLabel, testID, }) {
22
11
  const [pressed, setPressed] = useState(false);
23
12
  const { colors } = useTheme();
13
+ const BACKGROUND = {
14
+ default: 'transparent',
15
+ active: colors.tabBar.activeBackground,
16
+ disabled: colors.button.tertiary.disabled.background,
17
+ };
18
+ const BORDER_COLOR = {
19
+ default: undefined,
20
+ active: colors.border.default,
21
+ disabled: undefined,
22
+ };
24
23
  const isDisabled = state === 'disabled';
25
- const background = pressed && !isDisabled ? PRESSED_BACKGROUND : BACKGROUND[state];
24
+ const background = pressed && !isDisabled ? colors.button.tertiary.pressed.background : BACKGROUND[state];
26
25
  const borderColor = BORDER_COLOR[state];
27
26
  const containerStyle = {
28
27
  width: 48,
@@ -37,10 +36,11 @@ export function ButtonMenu({ icon, state = 'default', notif = false, onPress, st
37
36
  };
38
37
  const clonedIcon = React.cloneElement(icon, {
39
38
  size: ICON_SIZE,
39
+ weight: 'duotone',
40
40
  color: isDisabled ? colors.text.disabled : undefined,
41
41
  ...icon.props,
42
42
  });
43
- return (<Pressable pointerEvents={isDisabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={isDisabled ? undefined : onPress} style={[containerStyle, style]}>
43
+ return (<Pressable pointerEvents={isDisabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={isDisabled ? undefined : onPress} style={[containerStyle, style]} accessibilityRole="button" accessibilityLabel={accessibilityLabel} accessibilityState={{ disabled: isDisabled, selected: state === 'active' }} testID={testID}>
44
44
  {clonedIcon}
45
45
  {notif && (<View style={{
46
46
  position: 'absolute',
@@ -49,7 +49,7 @@ export function ButtonMenu({ icon, state = 'default', notif = false, onPress, st
49
49
  width: NOTIF_DOT,
50
50
  height: NOTIF_DOT,
51
51
  borderRadius: 9999,
52
- backgroundColor: '#ff4747',
52
+ backgroundColor: colors.tabBar.badgeBackground,
53
53
  }}/>)}
54
54
  </Pressable>);
55
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonMenu.js","sourceRoot":"","sources":["../../../src/components/ButtonMenu/ButtonMenu.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAiBtD,MAAM,UAAU,GAAoC;IAClD,OAAO,EAAG,aAAa;IACvB,MAAM,EAAI,WAAW;IACrB,QAAQ,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,YAAY,GAAgD;IAChE,OAAO,EAAG,SAAS;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AS,CACR,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAC5C,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAClC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACpC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAC1C,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAE/B;MAAA,CAAC,UAAU,CACX;MAAA,CAAC,KAAK,IAAI,CACR,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;gBACL,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,CAAC;gBACN,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,SAAS;gBACjB,YAAY,EAAE,IAAI;gBAClB,eAAe,EAAE,SAAS;aAC3B,CAAC,EACF,CACH,CACH;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * ButtonMenu component — icon-only toggle button for navigation/menu bars.\n * Supports default, active and disabled states with an optional notification dot.\n */\nimport React, { useState } from 'react';\nimport type { ReactElement } from 'react';\nimport { Pressable, View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonMenuState = 'default' | 'active' | 'disabled';\n\nexport interface ButtonMenuProps {\n /** Icon component (Phosphor Duotone icon) */\n icon: ReactElement;\n /** Toggle state */\n state?: ButtonMenuState;\n /** Show notification dot */\n notif?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n}\n\nconst BACKGROUND: Record<ButtonMenuState, string> = {\n default: 'transparent',\n active: '#d1c3a033',\n disabled: '#0f0f0f0d',\n};\n\nconst BORDER_COLOR: Record<ButtonMenuState, string | undefined> = {\n default: undefined,\n active: '#afafad80',\n disabled: undefined,\n};\n\nconst PRESSED_BACKGROUND = '#d1c3a066';\nconst ICON_SIZE = 28;\nconst NOTIF_DOT = 8;\n\nexport function ButtonMenu({\n icon,\n state = 'default',\n notif = false,\n onPress,\n style,\n}: ButtonMenuProps) {\n const [pressed, setPressed] = useState(false);\n const { colors } = useTheme();\n\n const isDisabled = state === 'disabled';\n const background = pressed && !isDisabled ? PRESSED_BACKGROUND : BACKGROUND[state];\n const borderColor = BORDER_COLOR[state];\n\n const containerStyle: ViewStyle = {\n width: 48,\n height: 48,\n padding: 10,\n borderRadius: 8,\n backgroundColor: background,\n borderWidth: borderColor != null ? 1 : undefined,\n borderColor: borderColor ?? undefined,\n alignItems: 'center',\n justifyContent: 'center',\n };\n\n const clonedIcon = React.cloneElement(icon, {\n size: ICON_SIZE,\n color: isDisabled ? colors.text.disabled : undefined,\n ...(icon.props as Record<string, unknown>),\n } as object);\n\n return (\n <Pressable\n pointerEvents={isDisabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={isDisabled ? undefined : onPress}\n style={[containerStyle, style]}\n >\n {clonedIcon}\n {notif && (\n <View\n style={{\n position: 'absolute',\n top: 6,\n left: 34,\n width: NOTIF_DOT,\n height: NOTIF_DOT,\n borderRadius: 9999,\n backgroundColor: '#ff4747',\n }}\n />\n )}\n </Pressable>\n );\n}"]}
1
+ {"version":3,"file":"ButtonMenu.js","sourceRoot":"","sources":["../../../src/components/ButtonMenu/ButtonMenu.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAqBtD,MAAM,SAAS,GAAG,EAAE,C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AACJ,CAAC","sourcesContent":["/**\n * ButtonMenu component — icon-only toggle button for navigation/menu bars.\n * Supports default, active and disabled states with an optional notification dot.\n */\nimport React, { useState } from 'react';\nimport type { ReactElement } from 'react';\nimport { Pressable, View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\n\nexport type ButtonMenuState = 'default' | 'active' | 'disabled';\n\nexport interface ButtonMenuProps {\n /** Icon component (Phosphor Duotone icon) */\n icon: ReactElement;\n /** Toggle state */\n state?: ButtonMenuState;\n /** Show notification dot */\n notif?: boolean;\n /** Press handler */\n onPress?: () => void;\n /** Additional container styles */\n style?: StyleProp<ViewStyle>;\n /** Accessibility label for screen readers */\n accessibilityLabel?: string;\n /** Test identifier */\n testID?: string;\n}\n\nconst ICON_SIZE = 28;\nconst NOTIF_DOT = 8;\n\nexport function ButtonMenu({\n icon,\n state = 'default',\n notif = false,\n onPress,\n style,\n accessibilityLabel,\n testID,\n}: ButtonMenuProps) {\n const [pressed, setPressed] = useState(false);\n const { colors } = useTheme();\n\n const BACKGROUND: Record<ButtonMenuState, string> = {\n default: 'transparent',\n active: colors.tabBar.activeBackground,\n disabled: colors.button.tertiary.disabled.background,\n };\n\n const BORDER_COLOR: Record<ButtonMenuState, string | undefined> = {\n default: undefined,\n active: colors.border.default,\n disabled: undefined,\n };\n\n const isDisabled = state === 'disabled';\n const background = pressed && !isDisabled ? colors.button.tertiary.pressed.background : BACKGROUND[state];\n const borderColor = BORDER_COLOR[state];\n\n const containerStyle: ViewStyle = {\n width: 48,\n height: 48,\n padding: 10,\n borderRadius: 8,\n backgroundColor: background,\n borderWidth: borderColor != null ? 1 : undefined,\n borderColor: borderColor ?? undefined,\n alignItems: 'center',\n justifyContent: 'center',\n };\n\n const clonedIcon = React.cloneElement(icon, {\n size: ICON_SIZE,\n weight: 'duotone',\n color: isDisabled ? colors.text.disabled : undefined,\n ...(icon.props as Record<string, unknown>),\n } as object);\n\n return (\n <Pressable\n pointerEvents={isDisabled ? 'none' : 'auto'}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n onPress={isDisabled ? undefined : onPress}\n style={[containerStyle, style]}\n accessibilityRole=\"button\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ disabled: isDisabled, selected: state === 'active' }}\n testID={testID}\n >\n {clonedIcon}\n {notif && (\n <View\n style={{\n position: 'absolute',\n top: 6,\n left: 34,\n width: NOTIF_DOT,\n height: NOTIF_DOT,\n borderRadius: 9999,\n backgroundColor: colors.tabBar.badgeBackground,\n }}\n />\n )}\n </Pressable>\n );\n}"]}
@@ -0,0 +1,4 @@
1
+ import type { CalendarProps } from './Calendar.types';
2
+ export declare function Calendar({ selectedDate, rangeStart, rangeEnd, mode, showModeTabs, dataDates, onDayPress, onModeChange, onClear, onConfirm, minYear, maxYear, i18n: i18nProp, }: CalendarProps): import("react").JSX.Element;
3
+ export default Calendar;
4
+ //# sourceMappingURL=Calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,kBAAkB,CAAC;AA2GhE,wBAAgB,QAAQ,CAAC,EACvB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,IAAY,EACZ,YAAoB,EACpB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,OAAO,EACP,IAAI,EAAE,QAAQ,GACf,EAAE,aAAa,+BAsHf;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,34 @@
1
+ /** i18n contract and presets for the Calendar component family */
2
+ export interface CalendarI18n {
3
+ /** Full month names — index 0 = January */
4
+ months: [string, string, string, string, string, string, string, string, string, string, string, string];
5
+ /** Short month names used in date display — index 0 = January */
6
+ monthsShort: [string, string, string, string, string, string, string, string, string, string, string, string];
7
+ /** Week day labels starting Monday — 2–3 chars */
8
+ weekDays: [string, string, string, string, string, string, string];
9
+ /** Top bar label above the selected date */
10
+ dateLabel: string;
11
+ /** Mode tab — single day */
12
+ modeDay: string;
13
+ /** Mode tab — date range */
14
+ modeRange: string;
15
+ /** Clear button */
16
+ clear: string;
17
+ /** Confirm button */
18
+ confirm: string;
19
+ /** Legend — data dot */
20
+ legendData: string;
21
+ /** Legend — today circle */
22
+ legendToday: string;
23
+ /** Legend — range band */
24
+ legendRange: string;
25
+ /** Legend — selected day */
26
+ legendSelection: string;
27
+ /** Year picker sheet title */
28
+ yearPickerTitle: string;
29
+ /** Tag label shown next to the current year in the year picker */
30
+ yearPickerTodayTag: string;
31
+ }
32
+ export declare const CALENDAR_FR: CalendarI18n;
33
+ export declare const CALENDAR_EN: CalendarI18n;
34
+ //# sourceMappingURL=Calendar.i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.i18n.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.i18n.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzG,iEAAiE;IACjE,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9G,kDAAkD;IAClD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnE,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,EAAE,YAezB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAezB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /** i18n contract and presets for the Calendar component family */
2
+ export const CALENDAR_FR = {
3
+ months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
4
+ monthsShort: ['jan.', 'fév.', 'mar.', 'avr.', 'mai', 'jun.', 'jul.', 'aoû.', 'sep.', 'oct.', 'nov.', 'déc.'],
5
+ weekDays: ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],
6
+ dateLabel: 'Sélection de date',
7
+ modeDay: 'Jour',
8
+ modeRange: 'Plage',
9
+ clear: 'Effacer',
10
+ confirm: 'Valider',
11
+ legendData: 'Données',
12
+ legendToday: "Aujourd'hui",
13
+ legendRange: 'Plage',
14
+ legendSelection: 'Sélection',
15
+ yearPickerTitle: "Sélection de l'année",
16
+ yearPickerTodayTag: "Aujourd'hui",
17
+ };
18
+ export const CALENDAR_EN = {
19
+ months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
20
+ monthsShort: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'],
21
+ weekDays: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
22
+ dateLabel: 'Date selection',
23
+ modeDay: 'Day',
24
+ modeRange: 'Range',
25
+ clear: 'Clear',
26
+ confirm: 'Confirm',
27
+ legendData: 'Data',
28
+ legendToday: 'Today',
29
+ legendRange: 'Range',
30
+ legendSelection: 'Selection',
31
+ yearPickerTitle: 'Select a year',
32
+ yearPickerTodayTag: 'Today',
33
+ };
34
+ //# sourceMappingURL=Calendar.i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.i18n.js","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.i18n.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAiClE,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,MAAM,EAAW,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;IAC1I,WAAW,EAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAChH,QAAQ,EAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC3D,SAAS,EAAQ,mBAAmB;IACpC,OAAO,EAAU,MAAM;IACvB,SAAS,EAAQ,OAAO;IACxB,KAAK,EAAY,SAAS;IAC1B,OAAO,EAAU,SAAS;IAC1B,UAAU,EAAO,SAAS;IAC1B,WAAW,EAAM,aAAa;IAC9B,WAAW,EAAM,OAAO;IACxB,eAAe,EAAE,WAAW;IAC5B,eAAe,EAAE,sBAAsB;IACvC,kBAAkB,EAAE,aAAa;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,MAAM,EAAW,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;IAC3I,WAAW,EAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAChH,QAAQ,EAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC3D,SAAS,EAAQ,gBAAgB;IACjC,OAAO,EAAU,KAAK;IACtB,SAAS,EAAQ,OAAO;IACxB,KAAK,EAAY,OAAO;IACxB,OAAO,EAAU,SAAS;IAC1B,UAAU,EAAO,MAAM;IACvB,WAAW,EAAM,OAAO;IACxB,WAAW,EAAM,OAAO;IACxB,eAAe,EAAE,WAAW;IAC5B,eAAe,EAAE,eAAe;IAChC,kBAAkB,EAAE,OAAO;CAC5B,CAAC","sourcesContent":["/** i18n contract and presets for the Calendar component family */\n\nexport interface CalendarI18n {\n /** Full month names — index 0 = January */\n months: [string, string, string, string, string, string, string, string, string, string, string, string];\n /** Short month names used in date display — index 0 = January */\n monthsShort: [string, string, string, string, string, string, string, string, string, string, string, string];\n /** Week day labels starting Monday — 2–3 chars */\n weekDays: [string, string, string, string, string, string, string];\n /** Top bar label above the selected date */\n dateLabel: string;\n /** Mode tab — single day */\n modeDay: string;\n /** Mode tab — date range */\n modeRange: string;\n /** Clear button */\n clear: string;\n /** Confirm button */\n confirm: string;\n /** Legend — data dot */\n legendData: string;\n /** Legend — today circle */\n legendToday: string;\n /** Legend — range band */\n legendRange: string;\n /** Legend — selected day */\n legendSelection: string;\n /** Year picker sheet title */\n yearPickerTitle: string;\n /** Tag label shown next to the current year in the year picker */\n yearPickerTodayTag: string;\n}\n\nexport const CALENDAR_FR: CalendarI18n = {\n months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],\n monthsShort: ['jan.', 'fév.', 'mar.', 'avr.', 'mai', 'jun.', 'jul.', 'aoû.', 'sep.', 'oct.', 'nov.', 'déc.'],\n weekDays: ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],\n dateLabel: 'Sélection de date',\n modeDay: 'Jour',\n modeRange: 'Plage',\n clear: 'Effacer',\n confirm: 'Valider',\n legendData: 'Données',\n legendToday: \"Aujourd'hui\",\n legendRange: 'Plage',\n legendSelection: 'Sélection',\n yearPickerTitle: \"Sélection de l'année\",\n yearPickerTodayTag: \"Aujourd'hui\",\n};\n\nexport const CALENDAR_EN: CalendarI18n = {\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthsShort: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'],\n weekDays: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],\n dateLabel: 'Date selection',\n modeDay: 'Day',\n modeRange: 'Range',\n clear: 'Clear',\n confirm: 'Confirm',\n legendData: 'Data',\n legendToday: 'Today',\n legendRange: 'Range',\n legendSelection: 'Selection',\n yearPickerTitle: 'Select a year',\n yearPickerTodayTag: 'Today',\n};\n"]}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Calendar component — monthly date picker with day and range selection modes.
3
+ * Supports data dots, mode tabs, today highlight and range band visualization.
4
+ */
5
+ import { useState } from 'react';
6
+ import { Pressable, Text, View } from 'react-native';
7
+ import { useTheme } from '../../context/ThemeContext';
8
+ import { BottomSheetProvider } from '../../context/BottomSheetContext';
9
+ import { Button } from '../Button';
10
+ import { CALENDAR_FR } from './Calendar.i18n';
11
+ import { CalendarYearPicker } from './CalendarYearPicker';
12
+ import { calendarStyles } from './Calendar.styles';
13
+ import { CalendarDay } from './CalendarDay';
14
+ import { CalendarHeader } from './CalendarHeader';
15
+ import { CalendarLegend } from './CalendarLegend';
16
+ // --- Constants ---
17
+ // --- Helpers ---
18
+ function isSameDay(a, b) {
19
+ return (a.getFullYear() === b.getFullYear() &&
20
+ a.getMonth() === b.getMonth() &&
21
+ a.getDate() === b.getDate());
22
+ }
23
+ function stripTime(d) {
24
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
25
+ }
26
+ function formatRangeDate(d, showYear, monthsShort) {
27
+ const day = d.getDate();
28
+ const month = monthsShort[d.getMonth()];
29
+ return showYear ? `${day} ${month} ${d.getFullYear()}` : `${day} ${month}`;
30
+ }
31
+ function buildMonthGrid(year, month) {
32
+ const firstDay = new Date(year, month, 1);
33
+ const lastDate = new Date(year, month + 1, 0).getDate();
34
+ const startOffset = (firstDay.getDay() + 6) % 7; // Mon-based offset
35
+ const days = [];
36
+ for (let i = startOffset; i > 0; i--) {
37
+ const date = new Date(year, month, 1 - i);
38
+ days.push({ day: date.getDate(), date, isCurrentMonth: false });
39
+ }
40
+ for (let d = 1; d <= lastDate; d++) {
41
+ days.push({ day: d, date: new Date(year, month, d), isCurrentMonth: true });
42
+ }
43
+ const total = days.length <= 35 ? 35 : 42;
44
+ let next = 1;
45
+ while (days.length < total) {
46
+ days.push({ day: next, date: new Date(year, month + 1, next++), isCurrentMonth: false });
47
+ }
48
+ return days;
49
+ }
50
+ function getDayState(date, isCurrentMonth, today, mode, selectedDate, rangeStart, rangeEnd, dataDates) {
51
+ if (!isCurrentMonth)
52
+ return 'outside';
53
+ const t = stripTime(date);
54
+ if (mode === 'day') {
55
+ if (selectedDate && isSameDay(date, selectedDate))
56
+ return 'selected-start';
57
+ if (isSameDay(date, today))
58
+ return 'today';
59
+ if (dataDates?.length && !dataDates.some(d => isSameDay(d, date)))
60
+ return 'nodata';
61
+ return 'default';
62
+ }
63
+ if (rangeStart && isSameDay(date, rangeStart))
64
+ return 'selected-start';
65
+ if (rangeEnd && isSameDay(date, rangeEnd))
66
+ return 'selected-end';
67
+ if (rangeStart && rangeEnd) {
68
+ if (t > stripTime(rangeStart) && t < stripTime(rangeEnd))
69
+ return 'in-range';
70
+ }
71
+ if (isSameDay(date, today))
72
+ return 'today';
73
+ if (dataDates?.length && !dataDates.some(d => isSameDay(d, date)))
74
+ return 'nodata';
75
+ return 'default';
76
+ }
77
+ function chunkArray(arr, size) {
78
+ const chunks = [];
79
+ for (let i = 0; i < arr.length; i += size)
80
+ chunks.push(arr.slice(i, i + size));
81
+ return chunks;
82
+ }
83
+ function getDisplayDate(mode, monthsShort, selectedDate, rangeStart, rangeEnd) {
84
+ if (mode === 'day')
85
+ return selectedDate ? formatRangeDate(selectedDate, true, monthsShort) : '—';
86
+ if (rangeStart && rangeEnd) {
87
+ return `${formatRangeDate(rangeStart, false, monthsShort)} → ${formatRangeDate(rangeEnd, true, monthsShort)}`;
88
+ }
89
+ if (rangeStart)
90
+ return formatRangeDate(rangeStart, true, monthsShort);
91
+ return '—';
92
+ }
93
+ // --- Component ---
94
+ export function Calendar({ selectedDate, rangeStart, rangeEnd, mode = 'day', showModeTabs = false, dataDates, onDayPress, onModeChange, onClear, onConfirm, minYear, maxYear, i18n: i18nProp, }) {
95
+ const i18n = { ...CALENDAR_FR, ...i18nProp };
96
+ const { colors, fontFamily } = useTheme();
97
+ const cal = colors.calendar;
98
+ const today = new Date();
99
+ const [showYearPicker, setShowYearPicker] = useState(false);
100
+ const [currentMonth, setCurrentMonth] = useState(() => {
101
+ const base = selectedDate ?? rangeStart ?? today;
102
+ return new Date(base.getFullYear(), base.getMonth(), 1);
103
+ });
104
+ const year = currentMonth.getFullYear();
105
+ const month = currentMonth.getMonth();
106
+ const monthLabel = `${i18n.months[month]} ${year}`;
107
+ const displayDate = getDisplayDate(mode, i18n.monthsShort, selectedDate, rangeStart, rangeEnd);
108
+ const weeks = chunkArray(buildMonthGrid(year, month), 7);
109
+ const handlePrev = () => setCurrentMonth(new Date(year, month - 1, 1));
110
+ const handleNext = () => setCurrentMonth(new Date(year, month + 1, 1));
111
+ return (<BottomSheetProvider>
112
+ <View style={[calendarStyles.card, { backgroundColor: colors.background.primary, shadowColor: colors.shadow.lowest }]}>
113
+ {/* Top bar */}
114
+ <View style={calendarStyles.topBar}>
115
+ <View>
116
+ <Text style={[calendarStyles.topBarLabel, { color: cal.day.default.secondary, fontFamily }]}>{i18n.dateLabel}</Text>
117
+ <Text style={[calendarStyles.topBarDate, { color: cal.day.default.text, fontFamily }]}>{displayDate}</Text>
118
+ </View>
119
+
120
+ {showModeTabs && (<View style={[calendarStyles.tabsContainer, { backgroundColor: cal.legend.background, borderColor: cal.header.border }]}>
121
+ {['day', 'range'].map(m => {
122
+ const active = mode === m;
123
+ return (<Pressable key={m} style={[
124
+ calendarStyles.tab,
125
+ active && [calendarStyles.tabActive, { backgroundColor: colors.background.primary, borderColor: cal.header.border }],
126
+ ]} onPress={() => onModeChange?.(m)}>
127
+ <Text style={[calendarStyles.tabText, { color: cal.day.default.text, fontFamily }]}>
128
+ {m === 'day' ? i18n.modeDay : i18n.modeRange}
129
+ </Text>
130
+ </Pressable>);
131
+ })}
132
+ </View>)}
133
+ </View>
134
+
135
+ <View style={[calendarStyles.divider, { backgroundColor: cal.header.border }]}/>
136
+
137
+ {/* Grid */}
138
+ <View style={calendarStyles.gridContainer}>
139
+ <CalendarHeader label={monthLabel} onPrev={handlePrev} onNext={handleNext} onLabelPress={() => setShowYearPicker(true)}/>
140
+
141
+ <View style={calendarStyles.weekLabelsRow}>
142
+ {i18n.weekDays.map(d => (<View key={d} style={calendarStyles.weekLabelCell}>
143
+ <Text style={[calendarStyles.weekLabelText, { color: cal.day.default.secondary, fontFamily }]}>{d}</Text>
144
+ </View>))}
145
+ </View>
146
+
147
+ {weeks.map((week, wi) => (<View key={wi} style={calendarStyles.weekRow}>
148
+ {week.map((gd, di) => {
149
+ const state = getDayState(gd.date, gd.isCurrentMonth, today, mode, selectedDate, rangeStart, rangeEnd, dataDates);
150
+ const hasData = gd.isCurrentMonth && (dataDates?.some(d => isSameDay(d, gd.date)) ?? false);
151
+ return (<CalendarDay key={di} day={gd.day} state={state} mode={mode} hasRange={!!(rangeStart && rangeEnd)} hasData={hasData} onPress={() => !gd.isCurrentMonth ? undefined : onDayPress?.(gd.date)}/>);
152
+ })}
153
+ </View>))}
154
+ </View>
155
+
156
+ <CalendarLegend mode={mode} i18n={i18n}/>
157
+
158
+ {/* Footer */}
159
+ <View style={calendarStyles.footer}>
160
+ <Button variant="tertiary" label={i18n.clear} onPress={onClear} style={{ flex: 1 }}/>
161
+ <Button variant="primary" label={i18n.confirm} onPress={onConfirm} style={{ flex: 1 }}/>
162
+ </View>
163
+
164
+ <CalendarYearPicker visible={showYearPicker} currentYear={year} minYear={minYear} maxYear={maxYear} i18n={i18n} onSelect={selectedYear => {
165
+ setCurrentMonth(new Date(selectedYear, month, 1));
166
+ setShowYearPicker(false);
167
+ }} onClose={() => setShowYearPicker(false)}/>
168
+ </View>
169
+ </BottomSheetProvider>);
170
+ }
171
+ export default Calendar;
172
+ //# sourceMappingURL=Calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OA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AC,EAAE;YACvB,eAAe,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;YAClD,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC,CACF,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,EAE5C;IAAA,EAAE,IAAI,CACN;IAAA,EAAE,mBAAmB,CAAC,CACvB,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * Calendar component — monthly date picker with day and range selection modes.\n * Supports data dots, mode tabs, today highlight and range band visualization.\n */\nimport { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { BottomSheetProvider } from '../../context/BottomSheetContext';\nimport { Button } from '../Button';\nimport type { CalendarProps, DayState } from './Calendar.types';\nimport { CALENDAR_FR } from './Calendar.i18n';\nimport { CalendarYearPicker } from './CalendarYearPicker';\nimport { calendarStyles } from './Calendar.styles';\nimport { CalendarDay } from './CalendarDay';\nimport { CalendarHeader } from './CalendarHeader';\nimport { CalendarLegend } from './CalendarLegend';\n\n// --- Constants ---\n\n\n// --- Helpers ---\n\nfunction isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nfunction stripTime(d: Date): number {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n}\n\n\n\nfunction formatRangeDate(d: Date, showYear: boolean, monthsShort: string[]): string {\n const day = d.getDate();\n const month = monthsShort[d.getMonth()];\n return showYear ? `${day} ${month} ${d.getFullYear()}` : `${day} ${month}`;\n}\n\ninterface GridDay {\n day: number;\n date: Date;\n isCurrentMonth: boolean;\n}\n\nfunction buildMonthGrid(year: number, month: number): GridDay[] {\n const firstDay = new Date(year, month, 1);\n const lastDate = new Date(year, month + 1, 0).getDate();\n const startOffset = (firstDay.getDay() + 6) % 7; // Mon-based offset\n const days: GridDay[] = [];\n\n for (let i = startOffset; i > 0; i--) {\n const date = new Date(year, month, 1 - i);\n days.push({ day: date.getDate(), date, isCurrentMonth: false });\n }\n for (let d = 1; d <= lastDate; d++) {\n days.push({ day: d, date: new Date(year, month, d), isCurrentMonth: true });\n }\n const total = days.length <= 35 ? 35 : 42;\n let next = 1;\n while (days.length < total) {\n days.push({ day: next, date: new Date(year, month + 1, next++), isCurrentMonth: false });\n }\n return days;\n}\n\nfunction getDayState(\n date: Date,\n isCurrentMonth: boolean,\n today: Date,\n mode: 'day' | 'range',\n selectedDate?: Date,\n rangeStart?: Date,\n rangeEnd?: Date,\n dataDates?: Date[],\n): DayState {\n if (!isCurrentMonth) return 'outside';\n const t = stripTime(date);\n\n if (mode === 'day') {\n if (selectedDate && isSameDay(date, selectedDate)) return 'selected-start';\n if (isSameDay(date, today)) return 'today';\n if (dataDates?.length && !dataDates.some(d => isSameDay(d, date))) return 'nodata';\n return 'default';\n }\n\n if (rangeStart && isSameDay(date, rangeStart)) return 'selected-start';\n if (rangeEnd && isSameDay(date, rangeEnd)) return 'selected-end';\n if (rangeStart && rangeEnd) {\n if (t > stripTime(rangeStart) && t < stripTime(rangeEnd)) return 'in-range';\n }\n if (isSameDay(date, today)) return 'today';\n if (dataDates?.length && !dataDates.some(d => isSameDay(d, date))) return 'nodata';\n return 'default';\n}\n\nfunction chunkArray<T>(arr: T[], size: number): T[][] {\n const chunks: T[][] = [];\n for (let i = 0; i < arr.length; i += size) chunks.push(arr.slice(i, i + size));\n return chunks;\n}\n\nfunction getDisplayDate(mode: 'day' | 'range', monthsShort: string[], selectedDate?: Date, rangeStart?: Date, rangeEnd?: Date): string {\n if (mode === 'day') return selectedDate ? formatRangeDate(selectedDate, true, monthsShort) : '—';\n if (rangeStart && rangeEnd) {\n return `${formatRangeDate(rangeStart, false, monthsShort)} → ${formatRangeDate(rangeEnd, true, monthsShort)}`;\n }\n if (rangeStart) return formatRangeDate(rangeStart, true, monthsShort);\n return '—';\n}\n\n// --- Component ---\n\nexport function Calendar({\n selectedDate,\n rangeStart,\n rangeEnd,\n mode = 'day',\n showModeTabs = false,\n dataDates,\n onDayPress,\n onModeChange,\n onClear,\n onConfirm,\n minYear,\n maxYear,\n i18n: i18nProp,\n}: CalendarProps) {\n const i18n = { ...CALENDAR_FR, ...i18nProp };\n const { colors, fontFamily } = useTheme();\n const cal = colors.calendar;\n const today = new Date();\n\n const [showYearPicker, setShowYearPicker] = useState(false);\n\n const [currentMonth, setCurrentMonth] = useState<Date>(() => {\n const base = selectedDate ?? rangeStart ?? today;\n return new Date(base.getFullYear(), base.getMonth(), 1);\n });\n\n const year = currentMonth.getFullYear();\n const month = currentMonth.getMonth();\n const monthLabel = `${i18n.months[month]} ${year}`;\n const displayDate = getDisplayDate(mode, i18n.monthsShort, selectedDate, rangeStart, rangeEnd);\n const weeks = chunkArray(buildMonthGrid(year, month), 7);\n\n const handlePrev = () => setCurrentMonth(new Date(year, month - 1, 1));\n const handleNext = () => setCurrentMonth(new Date(year, month + 1, 1));\n\n return (\n <BottomSheetProvider>\n <View style={[calendarStyles.card, { backgroundColor: colors.background.primary, shadowColor: colors.shadow.lowest }]}>\n {/* Top bar */}\n <View style={calendarStyles.topBar}>\n <View>\n <Text style={[calendarStyles.topBarLabel, { color: cal.day.default.secondary, fontFamily }]}>{i18n.dateLabel}</Text>\n <Text style={[calendarStyles.topBarDate, { color: cal.day.default.text, fontFamily }]}>{displayDate}</Text>\n </View>\n\n {showModeTabs && (\n <View style={[calendarStyles.tabsContainer, { backgroundColor: cal.legend.background, borderColor: cal.header.border }]}>\n {(['day', 'range'] as const).map(m => {\n const active = mode === m;\n return (\n <Pressable\n key={m}\n style={[\n calendarStyles.tab,\n active && [calendarStyles.tabActive, { backgroundColor: colors.background.primary, borderColor: cal.header.border }],\n ]}\n onPress={() => onModeChange?.(m)}\n >\n <Text style={[calendarStyles.tabText, { color: cal.day.default.text, fontFamily }]}>\n {m === 'day' ? i18n.modeDay : i18n.modeRange}\n </Text>\n </Pressable>\n );\n })}\n </View>\n )}\n </View>\n\n <View style={[calendarStyles.divider, { backgroundColor: cal.header.border }]} />\n\n {/* Grid */}\n <View style={calendarStyles.gridContainer}>\n <CalendarHeader\n label={monthLabel}\n onPrev={handlePrev}\n onNext={handleNext}\n onLabelPress={() => setShowYearPicker(true)}\n />\n\n <View style={calendarStyles.weekLabelsRow}>\n {i18n.weekDays.map(d => (\n <View key={d} style={calendarStyles.weekLabelCell}>\n <Text style={[calendarStyles.weekLabelText, { color: cal.day.default.secondary, fontFamily }]}>{d}</Text>\n </View>\n ))}\n </View>\n\n {weeks.map((week, wi) => (\n <View key={wi} style={calendarStyles.weekRow}>\n {week.map((gd, di) => {\n const state = getDayState(gd.date, gd.isCurrentMonth, today, mode, selectedDate, rangeStart, rangeEnd, dataDates);\n const hasData = gd.isCurrentMonth && (dataDates?.some(d => isSameDay(d, gd.date)) ?? false);\n return (\n <CalendarDay\n key={di}\n day={gd.day}\n state={state}\n mode={mode}\n hasRange={!!(rangeStart && rangeEnd)}\n hasData={hasData}\n onPress={() => !gd.isCurrentMonth ? undefined : onDayPress?.(gd.date)}\n />\n );\n })}\n </View>\n ))}\n </View>\n\n <CalendarLegend mode={mode} i18n={i18n} />\n\n {/* Footer */}\n <View style={calendarStyles.footer}>\n <Button variant=\"tertiary\" label={i18n.clear} onPress={onClear} style={{ flex: 1 }} />\n <Button variant=\"primary\" label={i18n.confirm} onPress={onConfirm} style={{ flex: 1 }} />\n </View>\n\n <CalendarYearPicker\n visible={showYearPicker}\n currentYear={year}\n minYear={minYear}\n maxYear={maxYear}\n i18n={i18n}\n onSelect={selectedYear => {\n setCurrentMonth(new Date(selectedYear, month, 1));\n setShowYearPicker(false);\n }}\n onClose={() => setShowYearPicker(false)}\n />\n </View>\n </BottomSheetProvider>\n );\n}\n\nexport default Calendar;"]}