@cnamts/synapse 1.0.19 → 1.0.21

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 (378) hide show
  1. package/dist/{DateFilter-CeVuSfJ9.js → DateFilter-uN8OURoP.js} +1 -1
  2. package/dist/{NumberFilter-C8PAu_sw.js → NumberFilter-sm1dQNQi.js} +1 -1
  3. package/dist/{PeriodFilter-UMUaxx3d.js → PeriodFilter-Cklsxnh9.js} +1 -1
  4. package/dist/{SelectFilter-CqZl8CYt.js → SelectFilter-CWefj27Z.js} +1 -1
  5. package/dist/{TextFilter-D_RhhNOh.js → TextFilter-Ddyj885L.js} +1 -1
  6. package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +4 -4
  7. package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +17 -7
  8. package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +4 -4
  9. package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +4 -4
  10. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +2416 -0
  11. package/dist/components/Customs/Selects/SyAutocomplete/types.d.ts +5 -0
  12. package/dist/components/Customs/Selects/SyAutocomplete/utils/ariaManager.d.ts +14 -0
  13. package/dist/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.d.ts +16 -0
  14. package/dist/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.d.ts +28 -0
  15. package/dist/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.d.ts +12 -0
  16. package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +2 -0
  17. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
  18. package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
  19. package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
  20. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
  21. package/dist/components/Customs/SyIcon/SyIcon.d.ts +2 -1
  22. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
  23. package/dist/components/DatePicker/composables/useDateSelection.d.ts +1 -0
  24. package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
  25. package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
  26. package/dist/components/ErrorPage/locales.d.ts +18 -3
  27. package/dist/components/FileUpload/FileUpload.d.ts +2 -0
  28. package/dist/components/MaintenancePage/locales.d.ts +18 -2
  29. package/dist/components/NotFoundPage/locales.d.ts +20 -4
  30. package/dist/components/PaginatedTable/PaginatedTable.d.ts +1 -1
  31. package/dist/components/PaginatedTable/Pagination.d.ts +17 -0
  32. package/dist/components/StatusPage/StatusPage.d.ts +39 -0
  33. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -5
  34. package/dist/components/Tables/SyTable/SyTable.d.ts +5 -5
  35. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
  36. package/dist/components/index.d.ts +4 -0
  37. package/dist/components/types.d.ts +15 -0
  38. package/dist/composables/useFormFieldErrorHandling.d.ts +31 -0
  39. package/dist/design-system-v3.js +126 -122
  40. package/dist/design-system-v3.umd.cjs +325 -314
  41. package/dist/{main-B39UVv5p.js → main-CWniLr0s.js} +15837 -14587
  42. package/dist/modules.d.ts +6 -0
  43. package/dist/style.css +1 -1
  44. package/dist/utils/theme/index.d.ts +6 -0
  45. package/package.json +12 -10
  46. package/src/assets/amelipro/icons.ts +166 -153
  47. package/src/components/Accordion/Accordion.mdx +4 -1
  48. package/src/components/Accordion/{Accessibilite/AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +2 -2
  49. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +73 -14
  50. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +119 -27
  51. package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.a11y.spec.ts +304 -0
  52. package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +435 -9
  53. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +60 -0
  54. package/src/components/Amelipro/AmeliproIcon/__tests__/AmeliproIcon.spec.ts +1 -1
  55. package/src/components/Amelipro/AmeliproIcon/iconList.ts +2 -0
  56. package/src/components/BackBtn/BackBtn.vue +5 -4
  57. package/src/components/BackBtn/accessibilite/Accessibility.mdx +15 -0
  58. package/src/components/BackToTopBtn/BackToTopBtn.vue +6 -3
  59. package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +15 -0
  60. package/src/components/Captcha/Captcha.vue +5 -1
  61. package/src/components/Captcha/CaptchaAlert.vue +9 -7
  62. package/src/components/Captcha/accessibilite/Accessibility.mdx +10 -0
  63. package/src/components/ChipList/accessibilite/Accessibility.mdx +15 -0
  64. package/src/components/CollapsibleList/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +8 -6
  65. package/src/components/Common/IconSlot/IconSlot.vue +1 -1
  66. package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
  67. package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +71 -0
  68. package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
  69. package/src/components/CookieBanner/CookieBanner.vue +20 -5
  70. package/src/components/CookieBanner/accessibilite/Accessibility.mdx +71 -0
  71. package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
  72. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +5 -4
  73. package/src/components/CopyBtn/CopyBtn.vue +6 -3
  74. package/src/components/CopyBtn/accessibilite/Accessibility.mdx +15 -0
  75. package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +15 -0
  76. package/src/components/Customs/Selects/SelectOverview.mdx +112 -1
  77. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.mdx +52 -0
  78. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +979 -0
  79. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +653 -0
  80. package/src/components/Customs/Selects/{SySelect → SyAutocomplete/accessibilite}/Accessibilite.stories.ts +7 -38
  81. package/src/components/Customs/Selects/{SySelect/Accessibilite.mdx → SyAutocomplete/accessibilite/Accessibility.mdx} +15 -20
  82. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +72 -0
  83. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +345 -0
  84. package/src/components/Customs/Selects/SyAutocomplete/types.ts +7 -0
  85. package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +180 -0
  86. package/src/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.ts +46 -0
  87. package/src/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.ts +107 -0
  88. package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +74 -0
  89. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +13 -9
  90. package/src/components/Customs/Selects/SyInputSelect/accessibilite/Accessibility.mdx +12 -0
  91. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +43 -34
  92. package/src/components/Customs/Selects/SySelect/SySelect.vue +19 -2
  93. package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +274 -0
  94. package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +21 -16
  95. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
  96. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
  97. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
  98. package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
  99. package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
  100. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
  101. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
  102. package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
  103. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
  104. package/src/components/Customs/SyCheckbox/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -3
  105. package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
  106. package/src/components/Customs/SyForm/accessibilite/Accessibility.mdx +10 -0
  107. package/src/components/Customs/SyIcon/SyIcon.mdx +4 -1
  108. package/src/components/Customs/SyIcon/SyIcon.vue +4 -3
  109. package/src/components/Customs/SyIcon/{Accessibilite.stories.ts → accessibilite/Accessibilite.stories.ts} +3 -3
  110. package/src/components/Customs/SyIcon/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  111. package/src/components/Customs/SyPagination/SyPagination.mdx +4 -2
  112. package/src/components/Customs/SyPagination/accessibilite/Accessibility.mdx +10 -0
  113. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
  114. package/src/components/Customs/SyRadioGroup/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  115. package/src/components/Customs/SyTabs/SyTabs.mdx +4 -2
  116. package/src/components/Customs/SyTabs/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  117. package/src/components/Customs/SyTextField/SyTextField.mdx +1 -2
  118. package/src/components/Customs/SyTextField/SyTextField.vue +13 -0
  119. package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +15 -0
  120. package/src/components/DataList/accessibilite/Accessibility.mdx +15 -0
  121. package/src/components/DataListGroup/accessibilite/Accessibility.mdx +14 -0
  122. package/src/components/DatePicker/Accessibilite.mdx +1 -1
  123. package/src/components/DatePicker/Accessibilite.stories.ts +1 -1
  124. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +7 -4
  125. package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
  126. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
  127. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +297 -0
  128. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
  129. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
  130. package/src/components/DatePicker/composables/useDateSelection.ts +5 -0
  131. package/src/components/DatePicker/docExamples/BidirectionalComplexValidation.vue +273 -0
  132. package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
  133. package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +10 -0
  134. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
  135. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
  136. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
  137. package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
  138. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
  139. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
  140. package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
  141. package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +10 -0
  142. package/src/components/DialogBox/accessibilite/Accessibility.mdx +15 -0
  143. package/src/components/DownloadBtn/DownloadBtn.vue +5 -4
  144. package/src/components/DownloadBtn/accessibilite/Accessibility.mdx +15 -0
  145. package/src/components/ErrorPage/ErrorPage.mdx +6 -16
  146. package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
  147. package/src/components/ErrorPage/ErrorPage.vue +38 -125
  148. package/src/components/ErrorPage/accessibilite/Accessibility.mdx +77 -0
  149. package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
  150. package/src/components/ErrorPage/locales.ts +21 -3
  151. package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
  152. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
  153. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
  154. package/src/components/ExternalLinks/accessibilite/Accessibility.mdx +15 -0
  155. package/src/components/FileList/UploadItem/UploadItem.vue +25 -20
  156. package/src/components/FileList/accessibilite/Accessibility.mdx +12 -0
  157. package/src/components/FilePreview/accessibilite/Accessibility.mdx +12 -0
  158. package/src/components/FileUpload/FileUpload.vue +5 -0
  159. package/src/components/FileUpload/FileUploadContent.vue +5 -4
  160. package/src/components/FileUpload/accessibilite/Accessibility.mdx +12 -0
  161. package/src/components/FilterInline/FilterInline.vue +5 -4
  162. package/src/components/FilterInline/accessibilite/Accessibility.mdx +12 -0
  163. package/src/components/FilterSideBar/accessibilite/Accessibility.mdx +15 -0
  164. package/src/components/FooterBar/FooterBar.stories.ts +18 -14
  165. package/src/components/FooterBar/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -4
  166. package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
  167. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +6 -5
  168. package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +15 -0
  169. package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +3 -0
  170. package/src/components/HeaderBar/HeaderBurgerMenu/accessibilite/Accessibility.mdx +15 -0
  171. package/src/components/HeaderBar/accessibilite/Accessibility.mdx +15 -0
  172. package/src/components/HeaderBar/{Usages.mdx → usages/Usages.mdx} +2 -2
  173. package/src/components/HeaderLoading/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +9 -5
  174. package/src/components/HeaderToolbar/accessibilite/Accessibility.mdx +15 -0
  175. package/src/components/LangBtn/LangBtn.vue +5 -4
  176. package/src/components/LangBtn/accessibilite/Accessibility.mdx +15 -0
  177. package/src/components/Logo/accessibilite/Accessibility.mdx +17 -0
  178. package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +12 -0
  179. package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +10 -0
  180. package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
  181. package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
  182. package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +70 -0
  183. package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
  184. package/src/components/MaintenancePage/locales.ts +24 -3
  185. package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
  186. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
  187. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
  188. package/src/components/NirField/accessibilite/Accessibility.mdx +15 -0
  189. package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
  190. package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
  191. package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
  192. package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +87 -0
  193. package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
  194. package/src/components/NotFoundPage/locales.ts +24 -4
  195. package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
  196. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
  197. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
  198. package/src/components/NotificationBar/Notification/Notification.vue +1 -1
  199. package/src/components/NotificationBar/NotificationBar.mdx +2 -2
  200. package/src/components/NotificationBar/accessibilite/Accessibility.mdx +75 -0
  201. package/src/components/PageContainer/{AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +7 -4
  202. package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
  203. package/src/components/PaginatedTable/PaginatedTable.vue +27 -47
  204. package/src/components/PaginatedTable/Pagination.vue +93 -0
  205. package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +12 -0
  206. package/src/components/PasswordField/PasswordField.vue +2 -1
  207. package/src/components/PasswordField/accessibilite/Accessibility.mdx +108 -0
  208. package/src/components/PeriodField/accessibilite/Accessibility.mdx +12 -0
  209. package/src/components/PhoneField/PhoneField.stories.ts +46 -38
  210. package/src/components/PhoneField/accessibilite/Accessibility.mdx +15 -0
  211. package/src/components/RangeField/accessibilite/Accessibility.mdx +15 -0
  212. package/src/components/RatingPicker/accessibilite/Accessibility.mdx +15 -0
  213. package/src/components/SearchListField/SearchListField.vue +6 -3
  214. package/src/components/SearchListField/accessibilite/Accessibility.mdx +15 -0
  215. package/src/components/SkipLink/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +7 -4
  216. package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
  217. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
  218. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
  219. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
  220. package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +67 -0
  221. package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
  222. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
  223. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
  224. package/src/components/StatusPage/StatusPage.mdx +22 -0
  225. package/src/components/StatusPage/StatusPage.stories.ts +193 -0
  226. package/src/components/StatusPage/StatusPage.vue +145 -0
  227. package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
  228. package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
  229. package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
  230. package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
  231. package/src/components/SubHeader/accessibilite/Accessibility.mdx +15 -0
  232. package/src/components/SyAlert/SyAlert.vue +6 -6
  233. package/src/components/SyAlert/accessibilite/Accessibility.mdx +12 -0
  234. package/src/components/SyTextArea/accessibilite/Accessibility.mdx +10 -0
  235. package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
  236. package/src/components/TableToolbar/TableToolbar.vue +7 -4
  237. package/src/components/TableToolbar/accessibilite/Accessibility.mdx +12 -0
  238. package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
  239. package/src/components/Tables/SyServerTable/SyServerTable.mdx +4 -1
  240. package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +10 -0
  241. package/src/components/Tables/SyTable/SyTable.mdx +4 -1
  242. package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +10 -0
  243. package/src/components/Tables/common/TableHeader.vue +3 -1
  244. package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +18 -14
  245. package/src/components/ToolbarContainer/ToolbarContainer.mdx +2 -1
  246. package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +563 -420
  247. package/src/components/ToolbarContainer/accessibilite/Accessibility.mdx +69 -0
  248. package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
  249. package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
  250. package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
  251. package/src/components/UploadWorkflow/accessibilite/Accessibility.mdx +12 -0
  252. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
  253. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
  254. package/src/components/UploadWorkflow/useFileList.ts +7 -0
  255. package/src/components/Usages/Usages.vue +3 -2
  256. package/src/components/UserMenuBtn/UserMenuBtn.vue +7 -5
  257. package/src/components/UserMenuBtn/accessibilite/Accessibility.mdx +12 -0
  258. package/src/components/index.ts +5 -0
  259. package/src/components/types.ts +10 -0
  260. package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
  261. package/src/composables/rules/useFieldValidation.ts +31 -9
  262. package/src/composables/useFormFieldErrorHandling.ts +141 -0
  263. package/src/modules.d.ts +6 -0
  264. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
  265. package/src/utils/theme/index.ts +19 -0
  266. package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
  267. package/dist/components/MaintenancePage/index.d.ts +0 -2
  268. package/src/components/BackBtn/Accessibilite.mdx +0 -14
  269. package/src/components/BackBtn/Accessibilite.stories.ts +0 -30
  270. package/src/components/BackToTopBtn/Accessibilite.mdx +0 -14
  271. package/src/components/BackToTopBtn/Accessibilite.stories.ts +0 -31
  272. package/src/components/ChipList/Accessibilite.mdx +0 -14
  273. package/src/components/ChipList/Accessibilite.stories.ts +0 -31
  274. package/src/components/CollapsibleList/Accessibilite.stories.ts +0 -29
  275. package/src/components/ContextualMenu/Accessibilite.mdx +0 -13
  276. package/src/components/ContextualMenu/Accessibilite.stories.ts +0 -29
  277. package/src/components/CookieBanner/Accessibilite.mdx +0 -13
  278. package/src/components/CookieBanner/Accessibilite.stories.ts +0 -30
  279. package/src/components/CopyBtn/Accessibilite.mdx +0 -13
  280. package/src/components/CopyBtn/Accessibilite.stories.ts +0 -29
  281. package/src/components/Customs/Selects/SelectBtnField/Accessibilite.mdx +0 -14
  282. package/src/components/Customs/Selects/SelectBtnField/Accessibilite.stories.ts +0 -29
  283. package/src/components/Customs/Selects/SyInputSelect/Accessibilite.mdx +0 -13
  284. package/src/components/Customs/Selects/SyInputSelect/Accessibilite.stories.ts +0 -25
  285. package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
  286. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
  287. package/src/components/Customs/SyTextField/Accessibilite.mdx +0 -14
  288. package/src/components/Customs/SyTextField/Accessibilite.stories.ts +0 -34
  289. package/src/components/DataList/Accessibilite.mdx +0 -13
  290. package/src/components/DataList/Accessibilite.stories.ts +0 -29
  291. package/src/components/DataListGroup/Accessibilite.mdx +0 -13
  292. package/src/components/DataListGroup/Accessibilite.stories.ts +0 -29
  293. package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
  294. package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
  295. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
  296. package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
  297. package/src/components/DialogBox/Accessibilite.mdx +0 -14
  298. package/src/components/DialogBox/Accessibilite.stories.ts +0 -29
  299. package/src/components/DownloadBtn/Accessibilite.mdx +0 -14
  300. package/src/components/DownloadBtn/Accessibilite.stories.ts +0 -29
  301. package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
  302. package/src/components/ErrorPage/Accessibilite.mdx +0 -13
  303. package/src/components/ErrorPage/Accessibilite.stories.ts +0 -36
  304. package/src/components/ExternalLinks/Accessibilite.mdx +0 -18
  305. package/src/components/ExternalLinks/Accessibilite.stories.ts +0 -62
  306. package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
  307. package/src/components/FileList/Accessibilite.mdx +0 -13
  308. package/src/components/FileList/Accessibilite.stories.ts +0 -26
  309. package/src/components/FilePreview/Accessibilite.mdx +0 -14
  310. package/src/components/FilePreview/Accessibilite.stories.ts +0 -26
  311. package/src/components/FileUpload/Accessibilite.mdx +0 -13
  312. package/src/components/FileUpload/Accessibilite.stories.ts +0 -26
  313. package/src/components/FilterInline/Accessibilite.mdx +0 -15
  314. package/src/components/FilterInline/Accessibilite.stories.ts +0 -26
  315. package/src/components/FilterSideBar/Accessibilite.mdx +0 -13
  316. package/src/components/FilterSideBar/Accessibilite.stories.ts +0 -30
  317. package/src/components/FooterBar/Accessibilite.stories.ts +0 -26
  318. package/src/components/FranceConnectBtn/Accessibilite.mdx +0 -13
  319. package/src/components/FranceConnectBtn/Accessibilite.stories.ts +0 -30
  320. package/src/components/HeaderBar/Accessibilite.mdx +0 -13
  321. package/src/components/HeaderBar/Accessibilite.stories.ts +0 -31
  322. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +0 -13
  323. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +0 -30
  324. package/src/components/HeaderLoading/Accessibilite.stories.ts +0 -31
  325. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
  326. package/src/components/HeaderToolbar/Accessibilite.mdx +0 -13
  327. package/src/components/HeaderToolbar/Accessibilite.stories.ts +0 -36
  328. package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
  329. package/src/components/LangBtn/Accessibilite.mdx +0 -13
  330. package/src/components/LangBtn/Accessibilite.stories.ts +0 -32
  331. package/src/components/Logo/Accessibilite.mdx +0 -13
  332. package/src/components/Logo/Accessibilite.stories.ts +0 -30
  333. package/src/components/LogoBrandSection/Accessibilite.mdx +0 -13
  334. package/src/components/LogoBrandSection/Accessibilite.stories.ts +0 -26
  335. package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
  336. package/src/components/MaintenancePage/Accessibilite.mdx +0 -13
  337. package/src/components/MaintenancePage/Accessibilite.stories.ts +0 -36
  338. package/src/components/MaintenancePage/index.ts +0 -3
  339. package/src/components/NirField/Accessibilite.mdx +0 -13
  340. package/src/components/NirField/Accessibilite.stories.ts +0 -31
  341. package/src/components/NotFoundPage/Accessibilite.mdx +0 -13
  342. package/src/components/NotFoundPage/Accessibilite.stories.ts +0 -36
  343. package/src/components/NotificationBar/Accessibilite.mdx +0 -13
  344. package/src/components/NotificationBar/Accessibilite.stories.ts +0 -30
  345. package/src/components/PageContainer/Accessibilite.mdx +0 -13
  346. package/src/components/PageContainer/Accessibilite.stories.ts +0 -30
  347. package/src/components/PaginatedTable/Accessibilite.mdx +0 -13
  348. package/src/components/PaginatedTable/Accessibilite.stories.ts +0 -26
  349. package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
  350. package/src/components/PasswordField/Accessibilite.mdx +0 -13
  351. package/src/components/PasswordField/Accessibilite.stories.ts +0 -121
  352. package/src/components/PeriodField/Accessibilite.mdx +0 -13
  353. package/src/components/PeriodField/Accessibilite.stories.ts +0 -27
  354. package/src/components/PhoneField/Accessibilite.mdx +0 -13
  355. package/src/components/PhoneField/Accessibilite.stories.ts +0 -32
  356. package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
  357. package/src/components/RangeField/Accessibilite.mdx +0 -13
  358. package/src/components/RangeField/Accessibilite.stories.ts +0 -32
  359. package/src/components/RatingPicker/Accessibilite.mdx +0 -13
  360. package/src/components/RatingPicker/Accessibilite.stories.ts +0 -30
  361. package/src/components/SearchListField/Accessibilite.mdx +0 -13
  362. package/src/components/SearchListField/Accessibilite.stories.ts +0 -30
  363. package/src/components/SkipLink/Accessibilite.stories.ts +0 -36
  364. package/src/components/SocialMediaLinks/Accessibilite.mdx +0 -13
  365. package/src/components/SocialMediaLinks/Accessibilite.stories.ts +0 -36
  366. package/src/components/SubHeader/Accessibilite.mdx +0 -13
  367. package/src/components/SubHeader/Accessibilite.stories.ts +0 -36
  368. package/src/components/SyAlert/Accessibilite.mdx +0 -13
  369. package/src/components/SyAlert/Accessibilite.stories.ts +0 -30
  370. package/src/components/TableToolbar/Accessibilite.mdx +0 -13
  371. package/src/components/TableToolbar/Accessibilite.stories.ts +0 -26
  372. package/src/components/UploadWorkflow/Accessibilite.mdx +0 -13
  373. package/src/components/UploadWorkflow/Accessibilite.stories.ts +0 -26
  374. package/src/components/UserMenuBtn/Accessibilite.mdx +0 -13
  375. package/src/components/UserMenuBtn/Accessibilite.stories.ts +0 -25
  376. /package/src/components/HeaderBar/{Usages.stories.ts → usages/Usages.stories.ts} +0 -0
  377. /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
  378. /package/src/components/SyBtnMenu/accessibilite/{AccessibilityGuide.mdx → Accessibility.mdx} +0 -0
@@ -1,17 +1,443 @@
1
- import { mount } from '@vue/test-utils'
2
- import { expect, describe, it } from 'vitest'
1
+ import { VueWrapper, mount, shallowMount } from '@vue/test-utils'
2
+ import { beforeEach, describe, expect, it } from 'vitest'
3
3
  import AmeliproClickableTile from '../AmeliproClickableTile.vue'
4
+ import type { ComponentProps } from 'vue-component-type-helpers'
5
+ import type { ExpectedPropOptions } from '@tests/types'
6
+ import type { PropType } from 'vue'
7
+ import type { RouteLocationRaw } from 'vue-router'
8
+ import TestHelper from '@tests/helpers/TestHelper'
9
+
10
+ // Stub VBtn qui préserve les attributs comme aria-label
11
+ const VBtnStub = {
12
+ template: '<button v-bind="$attrs"><slot /></button>',
13
+ inheritAttrs: false,
14
+ }
15
+
16
+ const expectedPropOptions: ExpectedPropOptions<typeof AmeliproClickableTile> = {
17
+ borderedIcon: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ href: {
26
+ type: String,
27
+ default: undefined,
28
+ },
29
+ icon: {
30
+ type: String,
31
+ default: undefined,
32
+ },
33
+ imgMaxWidth: {
34
+ type: String,
35
+ default: undefined,
36
+ },
37
+ imgMinWidth: {
38
+ type: String,
39
+ default: undefined,
40
+ },
41
+ imgSrc: {
42
+ type: String,
43
+ default: undefined,
44
+ },
45
+ imgWidth: {
46
+ type: String,
47
+ default: '100px',
48
+ },
49
+ tileTitle: {
50
+ type: String,
51
+ default: undefined,
52
+ },
53
+ tileWidth: {
54
+ type: String,
55
+ default: '100%',
56
+ },
57
+ to: {
58
+ type: Object as PropType<RouteLocationRaw>,
59
+ default: undefined,
60
+ },
61
+ uniqueId: {
62
+ type: String,
63
+ default: undefined,
64
+ },
65
+ onlyIconIsClickable: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ }
70
+
71
+ // Values pour les props "required"
72
+ const requiredPropValues = (): ComponentProps<typeof AmeliproClickableTile> => ({
73
+ icon: 'utilisateur',
74
+ tileTitle: 'titre de la tuile',
75
+ uniqueId: 'required-unique-id',
76
+ })
77
+
78
+ // Valeurs pour les props "modified"
79
+ const modifiedPropValues = (): ComponentProps<typeof AmeliproClickableTile> => ({
80
+ icon: 'document',
81
+ tileTitle: 'titre modifié',
82
+ uniqueId: 'modified-unique-id',
83
+ })
84
+
85
+ const testHelper = new TestHelper(AmeliproClickableTile)
86
+ testHelper.setExpectedPropOptions(expectedPropOptions)
87
+ .setRequiredPropValues(requiredPropValues)
88
+ .setModifiedPropValues(modifiedPropValues)
4
89
 
5
90
  describe('AmeliproClickableTile', () => {
6
- it('render correctly', async () => {
7
- const wrapper = mount(AmeliproClickableTile, {
8
- props: {
91
+ describe('Snapshots', () => {
92
+ testHelper.snapshots()
93
+ })
94
+
95
+ describe('Main container', () => {
96
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
97
+
98
+ beforeEach(() => {
99
+ vueWrapper = mount(AmeliproClickableTile, {
100
+ props: {
101
+ icon: 'utilisateur',
102
+ tileTitle: 'Test',
103
+ uniqueId: 'test-tile',
104
+ },
105
+ global: { stubs: { VBtn: VBtnStub } },
106
+ })
107
+ })
108
+
109
+ it('prop uniqueId sets attribute id on container', async () => {
110
+ expect(vueWrapper.attributes('id')).toBe('test-tile')
111
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
112
+ expect(vueWrapper.attributes('id')).toBe('new-id')
113
+ })
114
+
115
+ it('prop tileWidth sets width attribute', async () => {
116
+ expect(vueWrapper.find('button').attributes('width')).toBe('100%')
117
+ await vueWrapper.setProps({ tileWidth: '50%' })
118
+ expect(vueWrapper.find('button').attributes('width')).toBe('50%')
119
+ })
120
+
121
+ it('prop disabled disables the button', async () => {
122
+ expect(vueWrapper.find('button').attributes('disabled')).toBeUndefined()
123
+ await vueWrapper.setProps({ disabled: true })
124
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
125
+ })
126
+
127
+ it('prop href sets href attribute', async () => {
128
+ expect(vueWrapper.find('button').attributes('href')).toBeUndefined()
129
+ await vueWrapper.setProps({ href: 'https://example.com' })
130
+ expect(vueWrapper.find('button').attributes('href')).toBe('https://example.com')
131
+ })
132
+
133
+ it('prop to sets to attribute', async () => {
134
+ expect(vueWrapper.find('button').attributes('to')).toBeUndefined()
135
+ await vueWrapper.setProps({ to: '/dashboard' })
136
+ expect(vueWrapper.find('button').attributes('to')).toBe('/dashboard')
137
+ })
138
+ })
139
+
140
+ describe('Icon or Image display', () => {
141
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
142
+
143
+ beforeEach(() => {
144
+ vueWrapper = mount(AmeliproClickableTile, {
145
+ props: {
146
+ icon: 'utilisateur',
147
+ tileTitle: 'Test',
148
+ },
149
+ global: { stubs: { VBtn: VBtnStub } },
150
+ })
151
+ })
152
+
153
+ it('displays icon when icon prop is provided', async () => {
154
+ expect(vueWrapper.findComponent({ name: 'AmeliproIcon' }).exists()).toBe(true)
155
+ })
156
+
157
+ it('displays image when imgSrc prop is provided', async () => {
158
+ await vueWrapper.setProps({ icon: undefined, imgSrc: 'https://example.com/image.png' })
159
+ expect(vueWrapper.find('img').exists()).toBe(true)
160
+ expect(vueWrapper.find('img').attributes('src')).toBe('https://example.com/image.png')
161
+ })
162
+
163
+ it('prop imgWidth sets image width style', async () => {
164
+ await vueWrapper.setProps({ icon: undefined, imgSrc: 'https://example.com/image.png' })
165
+ expect(vueWrapper.find('img').attributes('style')).toContain('width: 100px')
166
+ await vueWrapper.setProps({ imgWidth: '150px' })
167
+ expect(vueWrapper.find('img').attributes('style')).toContain('width: 150px')
168
+ })
169
+
170
+ it('prop imgMaxWidth sets image maxWidth style', async () => {
171
+ await vueWrapper.setProps({
172
+ icon: undefined,
173
+ imgSrc: 'https://example.com/image.png',
174
+ imgMaxWidth: '200px',
175
+ })
176
+ expect(vueWrapper.find('img').attributes('style')).toContain('max-width: 200px')
177
+ })
178
+
179
+ it('prop imgMinWidth sets image minWidth style', async () => {
180
+ await vueWrapper.setProps({
181
+ icon: undefined,
182
+ imgSrc: 'https://example.com/image.png',
183
+ imgMinWidth: '50px',
184
+ })
185
+ expect(vueWrapper.find('img').attributes('style')).toContain('min-width: 50px')
186
+ })
187
+
188
+ it('does not display both icon and image', async () => {
189
+ await vueWrapper.setProps({
9
190
  icon: 'utilisateur',
10
- tileTitle: 'titre de la tuile',
11
- uniqueId: 'my-clickable-tile-id',
12
- },
191
+ imgSrc: 'https://example.com/image.png',
192
+ })
193
+ const images = vueWrapper.findAll('img')
194
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
195
+ expect(images.length === 0 || icons.length === 0).toBe(true)
196
+ })
197
+ })
198
+
199
+ describe('Title display', () => {
200
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
201
+
202
+ beforeEach(() => {
203
+ vueWrapper = mount(AmeliproClickableTile, {
204
+ props: {
205
+ icon: 'utilisateur',
206
+ tileTitle: 'titre de la tuile',
207
+ },
208
+ global: { stubs: { VBtn: VBtnStub } },
209
+ })
210
+ })
211
+
212
+ it('prop tileTitle displays title text', async () => {
213
+ expect(vueWrapper.text()).toContain('titre de la tuile')
214
+ await vueWrapper.setProps({ tileTitle: 'nouveau titre' })
215
+ expect(vueWrapper.text()).toContain('nouveau titre')
216
+ })
217
+
218
+ it('displays slot content when provided', async () => {
219
+ const slotWrapper = mount(AmeliproClickableTile, {
220
+ props: { icon: 'utilisateur' },
221
+ slots: {
222
+ default: 'Slot content',
223
+ },
224
+ global: { stubs: { VBtn: VBtnStub } },
225
+ })
226
+ expect(slotWrapper.text()).toContain('Slot content')
227
+ })
228
+ })
229
+
230
+ describe('Icon styling', () => {
231
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
232
+
233
+ beforeEach(() => {
234
+ vueWrapper = mount(AmeliproClickableTile, {
235
+ props: {
236
+ icon: 'utilisateur',
237
+ tileTitle: 'Test',
238
+ },
239
+ global: { stubs: { VBtn: VBtnStub } },
240
+ })
241
+ })
242
+
243
+ it('prop borderedIcon changes icon style', async () => {
244
+ let icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
245
+ expect(icons.length).toBeGreaterThan(0)
246
+ expect(icons[0]?.props('bordered')).toBe(false)
247
+
248
+ await vueWrapper.setProps({ borderedIcon: true })
249
+ icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
250
+ expect(icons[0]?.props('bordered')).toBe(true)
251
+ })
252
+
253
+ it('icon has correct size', async () => {
254
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
255
+ expect(icons.length).toBeGreaterThan(0)
256
+ expect(icons[0]?.props('size')).toBe('32px')
13
257
  })
14
258
 
15
- expect(wrapper.html()).toMatchSnapshot()
259
+ it('arrow icon has correct size', async () => {
260
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
261
+ expect(icons.length).toBeGreaterThan(0)
262
+ const arrowIcon = icons[icons.length - 1]
263
+ expect(arrowIcon?.props('size')).toBe('16px')
264
+ expect(arrowIcon?.props('icon')).toBe('chevronRight')
265
+ })
266
+ })
267
+
268
+ describe('onlyIconIsClickable mode', () => {
269
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
270
+
271
+ beforeEach(() => {
272
+ vueWrapper = mount(AmeliproClickableTile, {
273
+ props: {
274
+ icon: 'utilisateur',
275
+ tileTitle: 'Test',
276
+ uniqueId: 'test-tile',
277
+ onlyIconIsClickable: true,
278
+ },
279
+ global: { stubs: { VBtn: VBtnStub } },
280
+ })
281
+ })
282
+
283
+ it('renders span wrapper instead of VBtn when onlyIconIsClickable is true', () => {
284
+ expect(vueWrapper.find('span.amelipro-clickable-tile').exists()).toBe(true)
285
+ })
286
+
287
+ it('prop uniqueId sets attribute id on span wrapper', async () => {
288
+ expect(vueWrapper.find('span.amelipro-clickable-tile').attributes('id')).toBe('test-tile')
289
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
290
+ expect(vueWrapper.find('span.amelipro-clickable-tile').attributes('id')).toBe('new-id')
291
+ })
292
+
293
+ it('contains a VBtn for icon button only', () => {
294
+ const buttons = vueWrapper.findAll('button')
295
+ expect(buttons.length > 0).toBe(true)
296
+ })
297
+
298
+ it('icon button has uniqueId suffix', async () => {
299
+ const buttons = vueWrapper.findAll('button')
300
+ expect(buttons.length).toBeGreaterThan(0)
301
+ expect(buttons[0]?.attributes('id')).toBe('test-tile-icon-button')
302
+ })
303
+
304
+ it('content is not clickable, only icon button is', () => {
305
+ const span = vueWrapper.find('span.amelipro-clickable-tile')
306
+ // Span should not have onclick handler
307
+ expect(span.attributes('onclick')).toBeUndefined()
308
+ })
309
+ })
310
+
311
+ describe('Events', () => {
312
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
313
+
314
+ beforeEach(() => {
315
+ vueWrapper = shallowMount(AmeliproClickableTile, {
316
+ props: {
317
+ icon: 'utilisateur',
318
+ tileTitle: 'Test',
319
+ uniqueId: 'test-id',
320
+ },
321
+ })
322
+ })
323
+
324
+ it('emits click event when clicked in normal mode', async () => {
325
+ expect(vueWrapper.emitted('click')).toBeUndefined()
326
+ await vueWrapper.trigger('click')
327
+ expect(vueWrapper.emitted('click')).toBeTruthy()
328
+ expect(vueWrapper.emitted('click')?.[0]).toEqual(['test-id'])
329
+ })
330
+
331
+ it('emits click event with uniqueId', async () => {
332
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
333
+ await vueWrapper.trigger('click')
334
+ expect(vueWrapper.emitted('click')?.[0]).toEqual(['new-id'])
335
+ })
336
+
337
+ it('does not emit click when disabled', async () => {
338
+ await vueWrapper.setProps({ disabled: true })
339
+ // VBtn with disabled prop should not emit click
340
+ })
341
+ })
342
+
343
+ describe('Hover and Focus states', () => {
344
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
345
+
346
+ beforeEach(() => {
347
+ vueWrapper = mount(AmeliproClickableTile, {
348
+ props: {
349
+ icon: 'utilisateur',
350
+ tileTitle: 'Test',
351
+ },
352
+ global: { stubs: { VBtn: VBtnStub } },
353
+ })
354
+ })
355
+
356
+ it('applies hover class on hover', async () => {
357
+ const btn = vueWrapper.find('button')
358
+ await btn.trigger('mouseenter')
359
+ // Check that the hover class is applied to the container
360
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
361
+ })
362
+
363
+ it('applies focus class on focus', async () => {
364
+ const btn = vueWrapper.find('button')
365
+ await btn.trigger('focus')
366
+ // Check that the hover/focus class is applied to the container
367
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
368
+ })
369
+
370
+ it('removes hover state on mouseleave', async () => {
371
+ const btn = vueWrapper.find('button')
372
+ await btn.trigger('mouseenter')
373
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
374
+ await btn.trigger('mouseleave')
375
+ // State should be reset
376
+ expect(vueWrapper.classes()).not.toContain('amelipro-clickable-tile--hover')
377
+ })
378
+
379
+ it('removes focus state on blur', async () => {
380
+ const btn = vueWrapper.find('button')
381
+ await btn.trigger('focus')
382
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
383
+ await btn.trigger('blur')
384
+ // State should be reset
385
+ expect(vueWrapper.classes()).not.toContain('amelipro-clickable-tile--hover')
386
+ })
387
+ })
388
+
389
+ describe('Disabled state styling', () => {
390
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
391
+
392
+ beforeEach(() => {
393
+ vueWrapper = mount(AmeliproClickableTile, {
394
+ props: {
395
+ icon: 'utilisateur',
396
+ tileTitle: 'Test',
397
+ disabled: true,
398
+ },
399
+ global: { stubs: { VBtn: VBtnStub } },
400
+ })
401
+ })
402
+
403
+ it('applies disabled styling to button', () => {
404
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
405
+ })
406
+
407
+ it('button has disabled attribute when disabled prop is true', async () => {
408
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
409
+ await vueWrapper.setProps({ disabled: false })
410
+ expect(vueWrapper.find('button').attributes('disabled')).toBeUndefined()
411
+ })
412
+ })
413
+
414
+ describe('ID generation', () => {
415
+ it('generates proper IDs for all elements when uniqueId is provided', () => {
416
+ const vueWrapper = mount(AmeliproClickableTile, {
417
+ props: {
418
+ icon: 'utilisateur',
419
+ tileTitle: 'Test',
420
+ uniqueId: 'test-tile',
421
+ },
422
+ global: { stubs: { VBtn: VBtnStub } },
423
+ })
424
+
425
+ expect(vueWrapper.attributes('id')).toBe('test-tile')
426
+ expect(vueWrapper.find('#test-tile-icon').exists()).toBe(true)
427
+ expect(vueWrapper.find('#test-tile-icon-arrow').exists()).toBe(true)
428
+ })
429
+
430
+ it('works without uniqueId', () => {
431
+ const vueWrapper = mount(AmeliproClickableTile, {
432
+ props: {
433
+ icon: 'utilisateur',
434
+ tileTitle: 'Test',
435
+ },
436
+ global: { stubs: { VBtn: VBtnStub } },
437
+ })
438
+
439
+ expect(vueWrapper.attributes('id')).toBeUndefined()
440
+ expect(vueWrapper.find('[id*="-icon"]').exists()).toBe(false)
441
+ })
16
442
  })
17
443
  })
@@ -1,5 +1,65 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
+ exports[`AmeliproClickableTile > Snapshots > renders the component with all properties filled in 1`] = `
4
+ <v-btn-stub
5
+ block="false"
6
+ border="false"
7
+ class="
8
+ amelipro-clickable-tile
9
+ text-none
10
+ "
11
+ density="default"
12
+ disabled="false"
13
+ elevation="0"
14
+ exact="false"
15
+ flat="false"
16
+ height="auto"
17
+ icon="false"
18
+ id="modified-unique-id"
19
+ loading="false"
20
+ replace="false"
21
+ ripple="false"
22
+ size="default"
23
+ slim="false"
24
+ stacked="false"
25
+ symbol="Symbol(vuetify:v-btn-toggle)"
26
+ tag="button"
27
+ tile="false"
28
+ variant="elevated"
29
+ width="100%"
30
+ ></v-btn-stub>
31
+ `;
32
+
33
+ exports[`AmeliproClickableTile > Snapshots > renders the component with only required properties filled in 1`] = `
34
+ <v-btn-stub
35
+ block="false"
36
+ border="false"
37
+ class="
38
+ amelipro-clickable-tile
39
+ text-none
40
+ "
41
+ density="default"
42
+ disabled="false"
43
+ elevation="0"
44
+ exact="false"
45
+ flat="false"
46
+ height="auto"
47
+ icon="false"
48
+ id="required-unique-id"
49
+ loading="false"
50
+ replace="false"
51
+ ripple="false"
52
+ size="default"
53
+ slim="false"
54
+ stacked="false"
55
+ symbol="Symbol(vuetify:v-btn-toggle)"
56
+ tag="button"
57
+ tile="false"
58
+ variant="elevated"
59
+ width="100%"
60
+ ></v-btn-stub>
61
+ `;
62
+
3
63
  exports[`AmeliproClickableTile > render correctly 1`] = `
4
64
  <button
5
65
  class="
@@ -348,7 +348,7 @@ describe('AmeliproIcon', () => {
348
348
  })
349
349
 
350
350
  it('themeIcon returns the good values', () => {
351
- const expectedResult = `<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 1823 1823" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd">
351
+ const expectedResult = `<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 1823 1823">
352
352
  <circle class="circle-color" cx="912" cy="912" r="912"></circle>
353
353
  <path class="shape-color" d="M962 454c117 0 125 154 125 154v145s1 111-73 152c-2 10-3 20-1 30 4-2-21 146 106 165 92 15 178 57 247 120 23 23 40 186 40 186H418s-2-132 40-186c73-62 162-104 257-120 128-19 85-160 89-158 2-10 1-21-1-31 0 0-69-89-68-169 1-81 0-134 0-134s-4-190 126-190l101 36z"></path>
354
354
  </svg>`
@@ -110,6 +110,8 @@ export const iconList: IconItem[] = [
110
110
  { name: 'shieldPlus' },
111
111
  { name: 'delegation' },
112
112
  { name: 'attele' },
113
+ { name: 'cookie' },
114
+ { name: 'parametres' },
113
115
  {
114
116
  name: 'chevronLeft',
115
117
  noBackground: true,
@@ -2,6 +2,7 @@
2
2
  import { mdiArrowLeft } from '@mdi/js'
3
3
  import { computed } from 'vue'
4
4
  import { locales } from './locales'
5
+ import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
5
6
 
6
7
  const props = withDefaults(defineProps<{
7
8
  hideBackIcon?: boolean
@@ -35,14 +36,14 @@
35
36
  :style="{ backgroundColor: buttonBgColor }"
36
37
  >
37
38
  <slot name="icon">
38
- <VIcon
39
+ <SyIcon
39
40
  v-if="!props.hideBackIcon"
41
+ :icon="mdiArrowLeft"
42
+ decorative
40
43
  :color="iconColor"
41
44
  :class="{ 'ml-n1': isDark }"
42
45
  class="mr-1"
43
- >
44
- {{ mdiArrowLeft }}
45
- </VIcon>
46
+ />
46
47
  </slot>
47
48
 
48
49
  <slot>
@@ -0,0 +1,15 @@
1
+ import { Meta, Story } from '@storybook/addon-docs';
2
+ import * as Stories from '../BackBtn.stories.ts';
3
+ import '@/stories/styles/shared.css';
4
+
5
+ <Meta of={Stories} />
6
+
7
+ <div className="header">
8
+ <h1>Accessibilité</h1>
9
+ </div>
10
+
11
+
12
+ <div class="mt-2">
13
+ <p>Rapport d’audit manuel : <a href="/audits/BackBtn.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
14
+ <p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/4006" target="_blank" style={{color:'#0C41BD'}}>issue #4006</a>)</p>
15
+ </div>
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { locales } from './locales'
10
10
  import { config } from './config'
11
+ import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
11
12
 
12
13
  import { type VBtn } from 'vuetify/components'
13
14
 
@@ -116,9 +117,11 @@
116
117
  </span>
117
118
 
118
119
  <slot name="icon">
119
- <VIcon v-bind="options.icon">
120
- {{ mdiArrowUp }}
121
- </VIcon>
120
+ <SyIcon
121
+ v-bind="options.icon"
122
+ :icon="mdiArrowUp"
123
+ decorative
124
+ />
122
125
  </slot>
123
126
  </VBtn>
124
127
  </VFadeTransition>
@@ -0,0 +1,15 @@
1
+ import { Meta, Story } from '@storybook/addon-docs';
2
+ import * as Stories from '../BackToTopBtn.stories.ts';
3
+ import '@/stories/styles/shared.css';
4
+
5
+ <Meta of={Stories} />
6
+
7
+ <div className="header">
8
+ <h1>Accessibilité</h1>
9
+ </div>
10
+
11
+
12
+ <div class="mt-2">
13
+ <p>Rapport d’audit manuel : <a href="/audits/BackToTopBtn.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
14
+ <p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/4022" target="_blank" style={{color:'#0C41BD'}}>issue #4022</a>)</p>
15
+ </div>
@@ -11,6 +11,7 @@
11
11
  import volumeUp from './icons/volumeUp.vue'
12
12
  import { locales as defaultLocales } from './locales'
13
13
  import { type CaptchaType, type StateType } from './types'
14
+ import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
14
15
 
15
16
  const props = withDefaults(defineProps<{
16
17
  urlCreate: string
@@ -202,7 +203,10 @@
202
203
  @click="toggleAudio"
203
204
  >
204
205
  <span v-if="isPlaying">
205
- <VIcon>{{ mdiPause }}</VIcon>
206
+ <SyIcon
207
+ :icon="mdiPause"
208
+ decorative
209
+ />
206
210
  {{ locales.pause }}
207
211
  </span>
208
212
 
@@ -2,6 +2,7 @@
2
2
  import { mdiAlertCircleOutline, mdiAutorenew } from '@mdi/js'
3
3
  import { useAttrs } from 'vue'
4
4
  import type { locales as defaultLocales } from './locales'
5
+ import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
5
6
 
6
7
  defineProps<{
7
8
  locales: typeof defaultLocales
@@ -22,12 +23,12 @@
22
23
  v-bind="attrs"
23
24
  >
24
25
  <template #prepend>
25
- <VIcon
26
+ <SyIcon
26
27
  color="error"
27
28
  class="mr-2"
28
- >
29
- {{ errorIcon }}
30
- </VIcon>
29
+ :icon="errorIcon"
30
+ decorative
31
+ />
31
32
  </template>
32
33
 
33
34
  <span>
@@ -44,9 +45,10 @@
44
45
  <p class="d-sr-only">
45
46
  {{ locales.renew }}
46
47
  </p>
47
- <VIcon>
48
- {{ renewIcon }}
49
- </VIcon>
48
+ <SyIcon
49
+ :icon="renewIcon"
50
+ decorative
51
+ />
50
52
  </VBtn>
51
53
  </template>
52
54
  </VAlert>
@@ -0,0 +1,10 @@
1
+ import { Meta, Story } from '@storybook/addon-docs';
2
+ import * as CaptchaStorie from '../Captcha.stories';
3
+ import '@/stories/styles/shared.css';
4
+
5
+ <Meta of={CaptchaStorie} />
6
+
7
+ <div className="header">
8
+ <h1>Accessibilité</h1>
9
+ <p>Cette page sera bientôt disponible</p>
10
+ </div>