@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,4 +1,5 @@
1
1
  import { Controls, Canvas, Meta, Source } from '@storybook/blocks';
2
+ import '@/stories/styles/shared.css';
2
3
 
3
4
  import * as AccordionStories from './Accordion.stories';
4
5
 
@@ -33,7 +34,9 @@ Vous pouvez également utiliser des slots pour personnaliser le rendu des titres
33
34
 
34
35
  <Canvas of={AccordionStories.WithSlots} />
35
36
 
36
- ## Accessibilité
37
+ <div className="header">
38
+ <h1>Accessibilité</h1>
39
+ </div>
37
40
 
38
41
  Le composant Accordion respecte les normes d'accessibilité ARIA :
39
42
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, Primary } from '@storybook/blocks';
2
- import * as AccordionStories from '../Accordion.stories';
2
+ import * as AccordionStories from '../Accordion.stories.ts';
3
3
  import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
4
4
  import {
5
5
  AccessibilityGuideLayout,
@@ -10,7 +10,7 @@ import {
10
10
  ResourcesSection,
11
11
  } from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
12
12
 
13
- <Meta of={AccordionStories} name="Accessibilité" />
13
+ <Meta of={AccordionStories}/>
14
14
 
15
15
  <AccessibilityGuideLayout
16
16
  componentName="Accordion"
@@ -1,25 +1,43 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3'
2
2
  import AmeliproClickableTile from './AmeliproClickableTile.vue'
3
+ import { fn } from '@storybook/test'
3
4
 
4
5
  const meta = {
6
+ parameters: {
7
+ controls: {
8
+ exclude: [
9
+ 'onClick',
10
+ 'click:clickable-tile',
11
+ ],
12
+ },
13
+ },
5
14
  argTypes: {
6
- borderedIcon: { description: 'change le style du pictogramme à gauche de la tuile' },
7
- click: {
15
+ 'borderedIcon': {
16
+ description: 'change le style du pictogramme à gauche de la tuile',
17
+ },
18
+ 'click': {
8
19
  table: { category: 'events' },
9
20
  description: 'Événement émis au click sur le bouton',
10
21
  },
11
- default: { description: 'slot permettant de remplacer la property `tileTitle`, ce slot ne doit contenir que des balises span' },
12
- disabled: { description: 'désactive la tuile' },
13
- href: { description: 'Url de destination du lien' },
14
- icon: { description: 'Nom de l\'icone à afficher' },
15
- imgMaxWidth: { description: 'Taille maximale de l’image du bouton' },
16
- imgMinWidth: { description: 'Taille minimale de l’image du bouton' },
17
- imgSrc: { description: 'Url de l’image du bouton' },
18
- imgWidth: { description: 'Taille de l’image du bouton' },
19
- tileTitle: { description: 'Texte à afficher sur la tuile' },
20
- tileWidth: { description: 'La largeur du bouton/lien' },
21
- to: { description: 'Route de destination du lien' },
22
- uniqueId: { description: 'Ajoute un id au bouton' },
22
+ 'default': {
23
+ description:
24
+ 'slot permettant de remplacer la property `tileTitle`, ce slot ne doit contenir que des balises span',
25
+ },
26
+ 'disabled': { description: 'désactive la tuile' },
27
+ 'href': { description: 'Url de destination du lien' },
28
+ 'icon': { description: 'Nom de l\'icone à afficher' },
29
+ 'imgMaxWidth': { description: 'Taille maximale de l’image du bouton' },
30
+ 'imgMinWidth': { description: 'Taille minimale de l’image du bouton' },
31
+ 'imgSrc': { description: 'Url de l’image du bouton' },
32
+ 'imgWidth': { description: 'Taille de l’image du bouton' },
33
+ 'tileTitle': { description: 'Texte à afficher sur la tuile' },
34
+ 'tileWidth': { description: 'La largeur du bouton/lien' },
35
+ 'to': { description: 'Route de destination du lien' },
36
+ 'uniqueId': { description: 'Ajoute un id au bouton' },
37
+ 'onlyIconIsClickable': {
38
+ description: 'Si true, seule l\'icône avec la flèche est cliquable',
39
+ },
40
+ 'click:clickable-tile': { description: 'Evénement émis au click sur la tuile cliquable' },
23
41
  },
24
42
  component: AmeliproClickableTile,
25
43
  title: 'Composants/Amelipro/Tuiles/AmeliproClickableTile',
@@ -34,6 +52,7 @@ export const Default: Story = {
34
52
  icon: 'utilisateur',
35
53
  tileTitle: 'Titre de la tuile',
36
54
  uniqueId: 'amelipro-tile-btn-unique-id',
55
+ onClick: fn(),
37
56
  },
38
57
  parameters: {
39
58
  sourceCode: [
@@ -50,6 +69,7 @@ export const Default: Story = {
50
69
  name: 'Scripts',
51
70
  code: `<script setup lang="ts">
52
71
  import { AmeliproClickableTile } from '@cnamts/synapse'
72
+ }
53
73
  </script>`,
54
74
  },
55
75
  ],
@@ -76,6 +96,7 @@ export const AvecImage: Story = {
76
96
  imgWidth: '40px',
77
97
  imgMinWidth: '40px',
78
98
  imgMaxWidth: '40px',
99
+ onClick: fn(),
79
100
  },
80
101
  parameters: {
81
102
  sourceCode: [
@@ -148,6 +169,7 @@ export const IconeAvecBordure: Story = {
148
169
  tileTitle: 'Icône avec bordure',
149
170
  uniqueId: 'amelipro-tile-bordered-icon',
150
171
  borderedIcon: true,
172
+ onClick: fn(),
151
173
  },
152
174
  parameters: {
153
175
  sourceCode: [
@@ -216,6 +238,7 @@ export const TitrePersonnalise: Story = {
216
238
  args: {
217
239
  icon: 'utilisateur',
218
240
  uniqueId: 'amelipro-tile-slot-title',
241
+ onClick: fn(),
219
242
  },
220
243
  parameters: {
221
244
  sourceCode: [
@@ -248,3 +271,39 @@ export const TitrePersonnalise: Story = {
248
271
  `,
249
272
  }),
250
273
  }
274
+
275
+ // --- Tuile avec seule l’icône cliquable ---
276
+ export const SeuleIconeCliquable: Story = {
277
+ name: 'Seule icône cliquable',
278
+ args: {
279
+ icon: 'utilisateur',
280
+ tileTitle: 'Tuile avec seule l’icône cliquable',
281
+ uniqueId: 'amelipro-tile-only-icon-clickable',
282
+ onlyIconIsClickable: true,
283
+ onClick: fn(),
284
+ },
285
+ parameters: {
286
+ sourceCode: [
287
+ {
288
+ name: 'Template',
289
+ code: `
290
+ <AmeliproClickableTile
291
+ icon="utilisateur"
292
+ tile-title="Tuile avec seule l’icône cliquable"
293
+ unique-id="amelipro-tile-only-icon-clickable"
294
+ :only-icon-is-clickable="true"
295
+ />`,
296
+ },
297
+ ],
298
+ },
299
+ render: args => ({
300
+ components: { AmeliproClickableTile },
301
+ setup() {
302
+ return { args }
303
+ },
304
+ template: `
305
+ <p class="mb-2">Seule l’icône avec la flèche est cliquable grâce à la prop <code>onlyIconIsClickable</code>.</p>
306
+ <AmeliproClickableTile v-bind="args"/>
307
+ `,
308
+ }),
309
+ }
@@ -2,8 +2,7 @@
2
2
  import { type PropType, computed, ref } from 'vue'
3
3
  import AmeliproIcon from '../AmeliproIcon/AmeliproIcon.vue'
4
4
  import type { IndexedObject } from '../types'
5
- import type { RouteLocationRaw } from 'vue-router'
6
- import { convertToHex } from '@/utils/functions/convertToHex'
5
+ import type { NavigationProps } from '@/components/types'
7
6
 
8
7
  const props = defineProps({
9
8
  borderedIcon: {
@@ -15,7 +14,7 @@
15
14
  default: false,
16
15
  },
17
16
  href: {
18
- type: String,
17
+ type: String as PropType<NavigationProps['href']>,
19
18
  default: undefined,
20
19
  },
21
20
  icon: {
@@ -47,36 +46,33 @@
47
46
  default: '100%',
48
47
  },
49
48
  to: {
50
- type: [Array, Object, String] as PropType<RouteLocationRaw>,
49
+ type: [Array, Object, String] as PropType<NavigationProps['to']>,
51
50
  default: undefined,
52
51
  },
53
52
  uniqueId: {
54
53
  type: String,
55
54
  default: undefined,
56
55
  },
56
+ onlyIconIsClickable: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
57
60
  })
58
61
 
59
62
  const hover = ref(false)
60
63
  const focus = ref(false)
61
64
 
62
- const tileStyles = computed<IndexedObject>(() => {
63
- const btnStyles: IndexedObject = {
64
- backgroundColor: convertToHex('ap-white'),
65
- border: `1px solid ${convertToHex('ap-blue-darken-1')} !important`,
66
- color: convertToHex('ap-grey-darken-1'),
67
- padding: '1rem',
68
- }
69
- if ((hover.value || focus.value) && !props.disabled) {
70
- btnStyles.border = `1px solid ${convertToHex('ap-blue-darken-2')} !important`
71
- }
72
- if (props.disabled) {
73
- btnStyles.color = `${convertToHex('ap-grey-darken-1')} !important`
74
- btnStyles.backgroundColor = `${convertToHex('ap-grey-lighten-2')} !important`
75
- btnStyles.border = `1px solid ${convertToHex('ap-grey-lighten-2')} !important`
76
- }
65
+ const tileClasses = computed(() => ({
66
+ 'amelipro-clickable-tile--hover': (hover.value || focus.value) && !props.disabled && !props.onlyIconIsClickable,
67
+ 'amelipro-clickable-tile--disabled': props.disabled,
68
+ 'amelipro-clickable-tile--only-icon-clickable': props.onlyIconIsClickable,
69
+ }))
77
70
 
78
- return btnStyles
79
- })
71
+ const containerClasses = computed(() => [
72
+ 'amelipro-clickable-tile',
73
+ 'text-none',
74
+ tileClasses.value,
75
+ ])
80
76
 
81
77
  const imgStyles = computed((): IndexedObject => {
82
78
  const styles: IndexedObject = { width: props.imgWidth }
@@ -131,14 +127,14 @@
131
127
 
132
128
  <template>
133
129
  <VBtn
130
+ v-if="!onlyIconIsClickable"
134
131
  :id="uniqueId"
135
- class="amelipro-clickable-tile text-none"
132
+ :class="containerClasses"
136
133
  :disabled="disabled"
137
134
  :elevation="0"
138
135
  height="auto"
139
136
  :href="href"
140
137
  :ripple="false"
141
- :style="tileStyles"
142
138
  :to="to"
143
139
  :width="tileWidth"
144
140
  @blur="focus = false"
@@ -168,9 +164,7 @@
168
164
  size="32px"
169
165
  />
170
166
 
171
- <span
172
- class="d-block ml-3 mr-6"
173
- >
167
+ <span class="d-block ml-3 mr-6">
174
168
  <slot name="default">
175
169
  {{ tileTitle }}
176
170
  </slot>
@@ -186,6 +180,65 @@
186
180
  size="16px"
187
181
  />
188
182
  </VBtn>
183
+ <span
184
+ v-else
185
+ :id="uniqueId"
186
+ :class="containerClasses"
187
+ >
188
+ <span class="d-flex align-center flex-grow-1">
189
+ <img
190
+ v-if="imgSrc && !icon"
191
+ :id="uniqueId ? `${uniqueId}-img` : undefined"
192
+ alt=""
193
+ class="amelipro-clickable-tile__img"
194
+ :src="imgSrc"
195
+ :style="imgStyles"
196
+ >
197
+
198
+ <AmeliproIcon
199
+ v-if="icon && !imgSrc"
200
+ :id="uniqueId ? `${uniqueId}-icon` : undefined"
201
+ :bordered="borderedIcon"
202
+ class="amelipro-clickable-tile__icon"
203
+ :icon="icon"
204
+ :icon-bg-color="iconBgColorValue"
205
+ :icon-color="iconColorValue"
206
+ size="32px"
207
+ />
208
+
209
+ <span class="d-block ml-3 mr-6">
210
+ <slot name="default">
211
+ {{ tileTitle }}
212
+ </slot>
213
+ </span>
214
+ </span>
215
+ <VBtn
216
+ :id="uniqueId ? `${uniqueId}-icon-button` : undefined"
217
+ :disabled="disabled"
218
+ class="amelipro-clickable-tile__icon-button no-padding"
219
+ :elevation="0"
220
+ height="auto"
221
+ :href="href"
222
+ :ripple="false"
223
+ padding="0.5rem"
224
+ :to="to"
225
+ :aria-label="`Ouvrir ${tileTitle}`"
226
+ @blur="focus = false"
227
+ @click="emitClickEvent"
228
+ @focus="focus = true"
229
+ @mouseenter="hover = true"
230
+ @mouseleave="hover = false"
231
+ >
232
+ <AmeliproIcon
233
+ :id="uniqueId ? `${uniqueId}-icon-arrow` : undefined"
234
+ class="amelipro-clickable-tile__icon-arrow"
235
+ icon="chevronRight"
236
+ icon-bg-color="transparent"
237
+ :icon-color="iconArrowColorValue"
238
+ size="16px"
239
+ />
240
+ </VBtn>
241
+ </span>
189
242
  </template>
190
243
 
191
244
  <style lang="scss" scoped>
@@ -195,11 +248,46 @@
195
248
  position: relative;
196
249
  display: flex;
197
250
  background-color: apTokens.$ap-white;
198
- border-radius: 0.5rem;
251
+ border: 1px solid apTokens.$ap-blue-darken1 !important;
252
+ border-radius: var(--radius-md) !important;
199
253
  white-space: normal;
200
254
  font-size: 1rem;
201
255
  font-weight: 600;
202
256
  text-align: left;
257
+ align-items: center;
258
+ justify-content: space-between;
259
+ color: apTokens.$ap-grey-darken1;
260
+ padding: 1rem;
261
+
262
+ &--hover {
263
+ border-color: apTokens.$ap-blue-darken2 !important;
264
+ }
265
+
266
+ &--disabled {
267
+ color: apTokens.$ap-grey-darken1 !important;
268
+ background-color: apTokens.$ap-grey-lighten2 !important;
269
+ border-color: apTokens.$ap-grey-lighten2 !important;
270
+ }
271
+
272
+ &__icon-button {
273
+ flex-shrink: 0;
274
+ padding: 0.5rem !important;
275
+ min-width: auto !important;
276
+ width: auto !important;
277
+ height: auto !important;
278
+ background-color: transparent !important;
279
+ border: none !important;
280
+
281
+ &:hover,
282
+ &:focus {
283
+ background-color: transparent !important;
284
+ border: none !important;
285
+ }
286
+
287
+ :deep(.v-btn__content) {
288
+ width: auto !important;
289
+ }
290
+ }
203
291
  }
204
292
 
205
293
  .v-btn {
@@ -230,4 +318,8 @@
230
318
  width: 100%;
231
319
  }
232
320
  }
321
+
322
+ .no-padding {
323
+ padding: 0 !important;
324
+ }
233
325
  </style>
@@ -0,0 +1,304 @@
1
+ // @vitest-environment jsdom
2
+
3
+ import { describe, it } from 'vitest'
4
+ import { mount } from '@vue/test-utils'
5
+ import { axe } from 'vitest-axe'
6
+ import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
7
+ import AmeliproClickableTile from '../AmeliproClickableTile.vue'
8
+
9
+ describe('AmeliproClickableTile – accessibility (axe)', () => {
10
+ describe('default state', () => {
11
+ it('has no obvious axe violations with icon in default state', async () => {
12
+ const wrapper = mount(AmeliproClickableTile, {
13
+ props: {
14
+ icon: 'utilisateur',
15
+ tileTitle: 'Mon profil',
16
+ },
17
+ attachTo: document.body,
18
+ })
19
+
20
+ const results = await axe(wrapper.element as HTMLElement)
21
+ assertNoA11yViolations(results, 'AmeliproClickableTile – icon default state')
22
+
23
+ wrapper.unmount()
24
+ })
25
+
26
+ it('has no obvious axe violations with image in default state', async () => {
27
+ const wrapper = mount(AmeliproClickableTile, {
28
+ props: {
29
+ imgSrc: 'https://via.placeholder.com/100',
30
+ tileTitle: 'Documents',
31
+ },
32
+ attachTo: document.body,
33
+ })
34
+
35
+ const results = await axe(wrapper.element as HTMLElement)
36
+ assertNoA11yViolations(results, 'AmeliproClickableTile – image default state')
37
+
38
+ wrapper.unmount()
39
+ })
40
+
41
+ it('has no obvious axe violations with href', async () => {
42
+ const wrapper = mount(AmeliproClickableTile, {
43
+ props: {
44
+ icon: 'utilisateur',
45
+ tileTitle: 'Lien externe',
46
+ href: 'https://example.com',
47
+ },
48
+ attachTo: document.body,
49
+ })
50
+
51
+ const results = await axe(wrapper.element as HTMLElement)
52
+ assertNoA11yViolations(results, 'AmeliproClickableTile – with href')
53
+
54
+ wrapper.unmount()
55
+ })
56
+
57
+ it('has no obvious axe violations with to (router link)', async () => {
58
+ const wrapper = mount(AmeliproClickableTile, {
59
+ props: {
60
+ icon: 'document',
61
+ tileTitle: 'Navigation interne',
62
+ to: '/dashboard',
63
+ },
64
+ attachTo: document.body,
65
+ })
66
+
67
+ const results = await axe(wrapper.element as HTMLElement)
68
+ assertNoA11yViolations(results, 'AmeliproClickableTile – with to')
69
+
70
+ wrapper.unmount()
71
+ })
72
+ })
73
+
74
+ describe('disabled state', () => {
75
+ it('has no obvious axe violations when disabled', async () => {
76
+ const wrapper = mount(AmeliproClickableTile, {
77
+ props: {
78
+ icon: 'utilisateur',
79
+ tileTitle: 'Tuile désactivée',
80
+ disabled: true,
81
+ },
82
+ attachTo: document.body,
83
+ })
84
+
85
+ const results = await axe(wrapper.element as HTMLElement)
86
+ assertNoA11yViolations(results, 'AmeliproClickableTile – disabled state')
87
+
88
+ wrapper.unmount()
89
+ })
90
+ })
91
+
92
+ describe('bordered icon state', () => {
93
+ it('has no obvious axe violations with bordered icon', async () => {
94
+ const wrapper = mount(AmeliproClickableTile, {
95
+ props: {
96
+ icon: 'utilisateur',
97
+ tileTitle: 'Icône bordée',
98
+ borderedIcon: true,
99
+ },
100
+ attachTo: document.body,
101
+ })
102
+
103
+ const results = await axe(wrapper.element as HTMLElement)
104
+ assertNoA11yViolations(results, 'AmeliproClickableTile – bordered icon')
105
+
106
+ wrapper.unmount()
107
+ })
108
+ })
109
+
110
+ describe('onlyIconIsClickable mode', () => {
111
+ it('has no obvious axe violations when onlyIconIsClickable is true', async () => {
112
+ const wrapper = mount(AmeliproClickableTile, {
113
+ props: {
114
+ icon: 'utilisateur',
115
+ tileTitle: 'Seule icône cliquable',
116
+ onlyIconIsClickable: true,
117
+ },
118
+ attachTo: document.body,
119
+ })
120
+
121
+ const results = await axe(wrapper.element as HTMLElement)
122
+ assertNoA11yViolations(results, 'AmeliproClickableTile – onlyIconIsClickable mode')
123
+
124
+ wrapper.unmount()
125
+ })
126
+
127
+ it('has no obvious axe violations when onlyIconIsClickable with href', async () => {
128
+ const wrapper = mount(AmeliproClickableTile, {
129
+ props: {
130
+ icon: 'document',
131
+ tileTitle: 'Mode spécial avec lien',
132
+ onlyIconIsClickable: true,
133
+ href: 'https://example.com',
134
+ },
135
+ attachTo: document.body,
136
+ })
137
+
138
+ const results = await axe(wrapper.element as HTMLElement)
139
+ assertNoA11yViolations(results, 'AmeliproClickableTile – onlyIconIsClickable with href')
140
+
141
+ wrapper.unmount()
142
+ })
143
+ })
144
+
145
+ describe('with uniqueId', () => {
146
+ it('has no obvious axe violations with uniqueId', async () => {
147
+ const wrapper = mount(AmeliproClickableTile, {
148
+ props: {
149
+ icon: 'utilisateur',
150
+ tileTitle: 'Avec ID unique',
151
+ uniqueId: 'profile-tile',
152
+ },
153
+ attachTo: document.body,
154
+ })
155
+
156
+ const results = await axe(wrapper.element as HTMLElement)
157
+ assertNoA11yViolations(results, 'AmeliproClickableTile – with uniqueId')
158
+
159
+ wrapper.unmount()
160
+ })
161
+
162
+ it('has no obvious axe violations with uniqueId in onlyIconIsClickable mode', async () => {
163
+ const wrapper = mount(AmeliproClickableTile, {
164
+ props: {
165
+ icon: 'utilisateur',
166
+ tileTitle: 'Avec ID unique en mode spécial',
167
+ uniqueId: 'special-tile',
168
+ onlyIconIsClickable: true,
169
+ },
170
+ attachTo: document.body,
171
+ })
172
+
173
+ const results = await axe(wrapper.element as HTMLElement)
174
+ assertNoA11yViolations(results, 'AmeliproClickableTile – uniqueId with onlyIconIsClickable')
175
+
176
+ wrapper.unmount()
177
+ })
178
+ })
179
+
180
+ describe('image sizing', () => {
181
+ it('has no obvious axe violations with image sizing props', async () => {
182
+ const wrapper = mount(AmeliproClickableTile, {
183
+ props: {
184
+ imgSrc: 'https://via.placeholder.com/100',
185
+ tileTitle: 'Image avec tailles',
186
+ imgWidth: '80px',
187
+ imgMaxWidth: '150px',
188
+ imgMinWidth: '50px',
189
+ },
190
+ attachTo: document.body,
191
+ })
192
+
193
+ const results = await axe(wrapper.element as HTMLElement)
194
+ assertNoA11yViolations(results, 'AmeliproClickableTile – image with sizing')
195
+
196
+ wrapper.unmount()
197
+ })
198
+ })
199
+
200
+ describe('with custom width', () => {
201
+ it('has no obvious axe violations with custom tileWidth', async () => {
202
+ const wrapper = mount(AmeliproClickableTile, {
203
+ props: {
204
+ icon: 'utilisateur',
205
+ tileTitle: 'Largeur personnalisée',
206
+ tileWidth: '50%',
207
+ },
208
+ attachTo: document.body,
209
+ })
210
+
211
+ const results = await axe(wrapper.element as HTMLElement)
212
+ assertNoA11yViolations(results, 'AmeliproClickableTile – custom width')
213
+
214
+ wrapper.unmount()
215
+ })
216
+ })
217
+
218
+ describe('with slot content', () => {
219
+ it('has no obvious axe violations with slot content', async () => {
220
+ const wrapper = mount(AmeliproClickableTile, {
221
+ props: {
222
+ icon: 'utilisateur',
223
+ },
224
+ slots: {
225
+ default: '<span>Contenu du slot</span>',
226
+ },
227
+ attachTo: document.body,
228
+ })
229
+
230
+ const results = await axe(wrapper.element as HTMLElement)
231
+ assertNoA11yViolations(results, 'AmeliproClickableTile – with slot content')
232
+
233
+ wrapper.unmount()
234
+ })
235
+ })
236
+
237
+ describe('multiple instances', () => {
238
+ it('has no obvious axe violations with multiple instances on same page', async () => {
239
+ const container = document.createElement('div')
240
+ container.id = 'test-container'
241
+ document.body.appendChild(container)
242
+
243
+ const wrapper1 = mount(AmeliproClickableTile, {
244
+ props: {
245
+ icon: 'utilisateur',
246
+ tileTitle: 'Tuile 1',
247
+ uniqueId: 'tile-1',
248
+ },
249
+ attachTo: container,
250
+ })
251
+
252
+ const wrapper2 = mount(AmeliproClickableTile, {
253
+ props: {
254
+ icon: 'document',
255
+ tileTitle: 'Tuile 2',
256
+ uniqueId: 'tile-2',
257
+ },
258
+ attachTo: container,
259
+ })
260
+
261
+ const results = await axe(container as HTMLElement)
262
+ assertNoA11yViolations(results, 'AmeliproClickableTile – multiple instances')
263
+
264
+ wrapper1.unmount()
265
+ wrapper2.unmount()
266
+ document.body.removeChild(container)
267
+ })
268
+ })
269
+
270
+ describe('color contrast', () => {
271
+ it('has no obvious axe violations with default colors', async () => {
272
+ const wrapper = mount(AmeliproClickableTile, {
273
+ props: {
274
+ icon: 'utilisateur',
275
+ tileTitle: 'Contraste de couleur par défaut',
276
+ },
277
+ attachTo: document.body,
278
+ })
279
+
280
+ const results = await axe(wrapper.element as HTMLElement)
281
+ assertNoA11yViolations(results, 'AmeliproClickableTile – color contrast default')
282
+
283
+ wrapper.unmount()
284
+ })
285
+ })
286
+
287
+ describe('keyboard navigation', () => {
288
+ it('has no obvious axe violations for keyboard navigation', async () => {
289
+ const wrapper = mount(AmeliproClickableTile, {
290
+ props: {
291
+ icon: 'utilisateur',
292
+ tileTitle: 'Navigation au clavier',
293
+ uniqueId: 'keyboard-test',
294
+ },
295
+ attachTo: document.body,
296
+ })
297
+
298
+ const results = await axe(wrapper.element as HTMLElement)
299
+ assertNoA11yViolations(results, 'AmeliproClickableTile – keyboard navigation')
300
+
301
+ wrapper.unmount()
302
+ })
303
+ })
304
+ })