@cnamts/synapse 1.0.24 → 1.0.25

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 (367) hide show
  1. package/README.md +27 -5
  2. package/dist/{AutocompleteFilter-BWLR3U7W.js → AutocompleteFilter-D7qBuCAP.js} +1 -1
  3. package/dist/{AutocompleteFilter-D9jzRzAL.cjs → AutocompleteFilter-Df9i5mAl.cjs} +1 -1
  4. package/dist/{DateFilter-DTUl8hb1.cjs → DateFilter-BJD6FMev.cjs} +1 -1
  5. package/dist/{DateFilter-BpwFexzi.js → DateFilter-BitMWrMU.js} +1 -1
  6. package/dist/{NumberFilter-Bz_NTdX9.js → NumberFilter-BTLUxw0a.js} +1 -1
  7. package/dist/{NumberFilter-MAEojdk0.cjs → NumberFilter-DGCzCXzI.cjs} +1 -1
  8. package/dist/{PeriodFilter-DX_wy9g-.js → PeriodFilter-B5rUIPAC.js} +1 -1
  9. package/dist/{PeriodFilter-CC4WgIhl.cjs → PeriodFilter-DO_ecTZW.cjs} +1 -1
  10. package/dist/{SelectFilter-BR3fvl-a.cjs → SelectFilter-CGwcKWLm.cjs} +1 -1
  11. package/dist/{SelectFilter-xqiPtPgX.js → SelectFilter-l4QnRcuk.js} +2 -2
  12. package/dist/{TextFilter-CCfYFl5F.cjs → TextFilter-B8nf7xoK.cjs} +1 -1
  13. package/dist/{TextFilter-BBl3JFqK.js → TextFilter-C9hj6Qrp.js} +1 -1
  14. package/dist/apLightTheme-CEK4iY3f.cjs +1 -0
  15. package/dist/{apLightTheme-D1P4jcD0.js → apLightTheme-DnIM24Lv.js} +441 -722
  16. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +10 -6
  17. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +3 -0
  18. package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
  19. package/dist/components/Customs/SyTextField/SyTextField.d.ts +4 -4
  20. package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4 -24
  21. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +2 -12
  22. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +1 -6
  23. package/dist/components/DatePicker/composables/useDatePickerState.d.ts +1 -0
  24. package/dist/components/FileList/FileList.d.ts +6 -0
  25. package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
  26. package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +13 -13
  27. package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
  28. package/dist/components/MonthPicker/MonthPicker.d.ts +1 -6
  29. package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +1 -6
  30. package/dist/components/NirField/NirField.d.ts +4 -16
  31. package/dist/components/PeriodField/PeriodField.d.ts +8 -48
  32. package/dist/components/PhoneField/PhoneField.d.ts +1 -6
  33. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +1 -0
  34. package/dist/components/Tables/SyTable/SyTable.d.ts +1 -0
  35. package/dist/components/Tables/common/SyTablePagination.d.ts +2 -0
  36. package/dist/components/Tables/common/TableHeader.d.ts +5 -0
  37. package/dist/components/Tables/common/locales.d.ts +3 -0
  38. package/dist/components/Tables/common/types.d.ts +2 -0
  39. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +1 -0
  40. package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
  41. package/dist/composables/validation/useValidation.d.ts +5 -1
  42. package/dist/design-system-v3.js +2 -2
  43. package/dist/design-system-v3.umd.cjs +1 -1
  44. package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
  45. package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
  46. package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
  47. package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
  48. package/dist/designTokens/tokens/baseColors.d.ts +127 -0
  49. package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
  50. package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
  51. package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
  52. package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
  53. package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
  54. package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
  55. package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
  56. package/dist/designTokens/utils/index.d.ts +2 -2
  57. package/dist/main-ByDPHpae.cjs +1067 -0
  58. package/dist/main-Cpx8Co6H.js +38869 -0
  59. package/dist/synapse.css +1 -1
  60. package/dist/utils/functions/classToHex.d.ts +1 -1
  61. package/dist/utils/functions/createHexResolver.d.ts +16 -0
  62. package/dist/vuetifyConfig.js +113 -152
  63. package/dist/vuetifyConfig.umd.cjs +1 -1
  64. package/package.json +29 -18
  65. package/src/assets/amelipro/apTokens2026.scss +5 -5
  66. package/src/assets/overrides/_breakpoints.scss +25 -0
  67. package/src/assets/overrides/_btns.scss +0 -2
  68. package/src/assets/overrides/_forms.scss +1 -3
  69. package/src/assets/overrides/_icons.scss +7 -11
  70. package/src/assets/overrides/_otp.scss +41 -0
  71. package/src/assets/overrides/_tables.scss +11 -20
  72. package/src/assets/overrides/_tooltips.scss +17 -7
  73. package/src/assets/overrides/_typography.scss +35 -37
  74. package/src/assets/overrides/_utilities.scss +43 -47
  75. package/src/assets/themes.scss +1 -0
  76. package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
  77. package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
  78. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
  79. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
  80. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
  81. package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
  82. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
  83. package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
  84. package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
  85. package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
  86. package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
  87. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
  88. package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
  89. package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
  90. package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
  91. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
  92. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
  93. package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
  94. package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
  95. package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
  96. package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
  97. package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
  98. package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
  99. package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
  100. package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
  101. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
  102. package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
  103. package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
  104. package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
  105. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
  106. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
  107. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
  108. package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
  109. package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
  110. package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
  111. package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
  112. package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
  113. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
  114. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
  115. package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
  116. package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
  117. package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
  118. package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
  119. package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
  120. package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
  121. package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
  122. package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
  123. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
  124. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
  125. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
  126. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
  127. package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
  128. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
  129. package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
  130. package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
  131. package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
  132. package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
  133. package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
  134. package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
  135. package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
  136. package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
  137. package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
  138. package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
  139. package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
  140. package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
  141. package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
  142. package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
  143. package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
  144. package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
  145. package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
  146. package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
  147. package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
  148. package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
  149. package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
  150. package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
  151. package/src/components/Captcha/Captcha.vue +1 -3
  152. package/src/components/ChipList/ChipList.vue +14 -16
  153. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +0 -2
  154. package/src/components/CopyBtn/CopyBtn.vue +1 -3
  155. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
  156. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
  157. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
  158. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +7 -3
  159. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
  160. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +66 -0
  161. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +4 -6
  162. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +1 -39
  163. package/src/components/Customs/Selects/SySelect/SySelect.vue +263 -63
  164. package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
  165. package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +35 -0
  166. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
  167. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +29 -0
  168. package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +18 -3
  169. package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
  170. package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
  171. package/src/components/Customs/SyTabs/SyTabs.stories.ts +32 -33
  172. package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
  173. package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
  174. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
  175. package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
  176. package/src/components/Customs/SyTextField/SyTextField.stories.ts +21 -41
  177. package/src/components/Customs/SyTextField/SyTextField.vue +4 -6
  178. package/src/components/DatePicker/CalendarMode/DatePicker.vue +12 -14
  179. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +20 -16
  180. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +23 -0
  181. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +8 -10
  182. package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
  183. package/src/components/DatePicker/composables/useDatePickerState.ts +24 -0
  184. package/src/components/DatePicker/composables/useDateTextField.ts +0 -1
  185. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
  186. package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
  187. package/src/components/DialogBox/DialogBox.vue +3 -5
  188. package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
  189. package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
  190. package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
  191. package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
  192. package/src/components/FileList/FileList.vue +9 -2
  193. package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
  194. package/src/components/FileList/tests/FileList.spec.ts +47 -0
  195. package/src/components/FileUpload/FileUpload.vue +3 -5
  196. package/src/components/FileUpload/FileUploadContent.vue +3 -5
  197. package/src/components/FilterInline/FilterInline.vue +1 -3
  198. package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
  199. package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
  200. package/src/components/FilterSideBar/FilterSideBar.vue +7 -0
  201. package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
  202. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
  203. package/src/components/FooterBar/FooterBar.vue +9 -13
  204. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
  205. package/src/components/HeaderBar/HeaderBar.vue +2 -3
  206. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
  207. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
  208. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
  209. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
  210. package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
  211. package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
  212. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
  213. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
  214. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
  215. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
  216. package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
  217. package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
  218. package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
  219. package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
  220. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
  221. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
  222. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
  223. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
  224. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
  225. package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
  226. package/src/components/LangBtn/LangBtn.vue +2 -4
  227. package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
  228. package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
  229. package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
  230. package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
  231. package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
  232. package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
  233. package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
  234. package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
  235. package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
  236. package/src/components/NirField/NirField.stories.ts +2 -2
  237. package/src/components/NirField/NirField.vue +3 -5
  238. package/src/components/NirField/accessibilite/Accessibility.mdx +100 -5
  239. package/src/components/NirField/tests/NirField.spec.ts +118 -0
  240. package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
  241. package/src/components/NirField/useNirValidation.ts +38 -32
  242. package/src/components/NotificationBar/Notification/Notification.vue +5 -7
  243. package/src/components/NotificationBar/NotificationBar.vue +1 -3
  244. package/src/components/PaginatedTable/PaginatedTable.vue +2 -3
  245. package/src/components/PaginatedTable/Pagination.vue +3 -5
  246. package/src/components/PasswordField/PasswordField.vue +8 -10
  247. package/src/components/PhoneField/PhoneField.vue +3 -3
  248. package/src/components/RangeField/RangeSlider/RangeSlider.vue +0 -2
  249. package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
  250. package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
  251. package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
  252. package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
  253. package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
  254. package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
  255. package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
  256. package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +6 -8
  257. package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +3 -5
  258. package/src/components/SearchListField/SearchListField.vue +0 -2
  259. package/src/components/SkipLink/SkipLink.vue +2 -4
  260. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
  261. package/src/components/SubHeader/SubHeader.vue +1 -1
  262. package/src/components/SyAlert/SyAlert.vue +7 -9
  263. package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
  264. package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
  265. package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
  266. package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
  267. package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
  268. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
  269. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
  270. package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
  271. package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
  272. package/src/components/TableToolbar/TableToolbar.vue +6 -8
  273. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +166 -0
  274. package/src/components/Tables/SyServerTable/SyServerTable.vue +9 -7
  275. package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +23 -0
  276. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +268 -0
  277. package/src/components/Tables/SyTable/SyTable.stories.ts +104 -0
  278. package/src/components/Tables/SyTable/SyTable.vue +9 -7
  279. package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +22 -0
  280. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +274 -0
  281. package/src/components/Tables/common/SyTableFilter.vue +27 -2
  282. package/src/components/Tables/common/SyTablePagination.vue +142 -19
  283. package/src/components/Tables/common/TableHeader.vue +40 -3
  284. package/src/components/Tables/common/filters/SelectFilter.vue +1 -1
  285. package/src/components/Tables/common/locales.ts +3 -0
  286. package/src/components/Tables/common/tableStyles.scss +16 -19
  287. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
  288. package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
  289. package/src/components/Tables/common/types.ts +2 -0
  290. package/src/components/Tables/common/useTableHeaders.ts +49 -27
  291. package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
  292. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
  293. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
  294. package/src/components/UploadWorkflow/useFileList.ts +3 -0
  295. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
  296. package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
  297. package/src/composables/validation/useValidation.ts +17 -1
  298. package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
  299. package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
  300. package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
  301. package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
  302. package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
  303. package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
  304. package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
  305. package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
  306. package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
  307. package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
  308. package/src/designTokens/tests/themeUtils.spec.ts +53 -0
  309. package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
  310. package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
  311. package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
  312. package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -1
  313. package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
  314. package/src/designTokens/tokens/baseColors.ts +129 -0
  315. package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
  316. package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
  317. package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
  318. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -1
  319. package/src/designTokens/tokens/cnam/cnamSemantic.ts +1 -1
  320. package/src/designTokens/tokens/pa/paColors.ts +2 -166
  321. package/src/designTokens/tokens/pa/paContextual.ts +3 -48
  322. package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
  323. package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
  324. package/src/designTokens/utils/buildColorClassMap.ts +34 -0
  325. package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
  326. package/src/designTokens/utils/createFlattenTheme.ts +15 -7
  327. package/src/designTokens/utils/index.ts +2 -2
  328. package/src/stories/Accessibilite/AuditDesignSystem.mdx +0 -11
  329. package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
  330. package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
  331. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +8 -1
  332. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +51 -10
  333. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +16 -9
  334. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +48 -58
  335. package/src/stories/Components/Components.stories.ts +40 -1
  336. package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
  337. package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
  338. package/src/stories/Demarrer/Releases.stories.ts +48 -5
  339. package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
  340. package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
  341. package/src/stories/DesignTokens/colors.stories.ts +5 -6
  342. package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
  343. package/src/stories/GuideDuDev/Theme.mdx +36 -26
  344. package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
  345. package/src/stories/styles/accessibility-guide.css +3 -3
  346. package/src/utils/functions/classToHex.ts +6 -34
  347. package/src/utils/functions/createHexResolver.ts +45 -0
  348. package/src/utils/functions/tests/classToHex.spec.ts +36 -0
  349. package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
  350. package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
  351. package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
  352. package/dist/apLightTheme-CFSRrjv2.cjs +0 -1
  353. package/dist/designTokens/utils/convertGaps.d.ts +0 -5
  354. package/dist/main-BtTqyn4z.js +0 -38648
  355. package/dist/main-C1e3eoxd.cjs +0 -1067
  356. package/src/assets/apTokens.scss +0 -343
  357. package/src/assets/overrides/_container.scss +0 -36
  358. package/src/assets/tokens.scss +0 -388
  359. package/src/designTokens/apColors.md +0 -66
  360. package/src/designTokens/cnamColors.md +0 -193
  361. package/src/designTokens/paColors.md +0 -66
  362. package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
  363. package/src/designTokens/tokens/json/primitives.json +0 -209
  364. package/src/designTokens/tokens/json/semantic.json +0 -120
  365. package/src/designTokens/utils/convertGaps.ts +0 -11
  366. package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
  367. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
@@ -352,8 +352,6 @@
352
352
  </template>
353
353
 
354
354
  <style lang="scss" scoped>
355
- @use '@/assets/tokens';
356
-
357
355
  .sy-pagination {
358
356
  display: flex;
359
357
  align-items: center;
@@ -9,16 +9,6 @@ import * as SyTabsStories from "./SyTabs.stories";
9
9
  <p>Le composant `SyTabs` est un système de navigation par onglets conforme au Design System qui respecte les règles d'accessibilité <abbr title="Référentiel Général d'Amélioration de l'Accessibilité">RGAA</abbr>. Il permet d'organiser le contenu en sections navigables facilement via une interface à onglets.</p>
10
10
  </div>
11
11
 
12
- Il implémente les fonctionnalités suivantes :
13
-
14
- - Navigation complète au clavier
15
- - Attributs ARIA appropriés
16
- - Gestion du focus accessible
17
- - Structure HTML sémantique
18
- - Design personnalisable
19
-
20
- <Canvas of={SyTabsStories.Default} />
21
-
22
12
  ## API
23
13
 
24
14
  <Controls of={SyTabsStories.Default} />
@@ -36,54 +26,6 @@ export interface TabItem {
36
26
  }
37
27
  ```
38
28
 
39
- <div className="header">
40
- <h1>Accessibilité</h1>
41
- </div>
42
-
43
- Le composant `SyTabs` respecte les critères d'accessibilité RGAA suivants :
44
-
45
- ### Structure sémantique
46
-
47
- - Utilise les éléments `<nav>`, `<ul>` et `<li>` pour une structure de navigation sémantique
48
- - Associe chaque onglet à son panneau de contenu via les attributs `aria-controls` et `aria-labelledby`
49
- - Utilise l'attribut `aria-label="Onglets de navigation"` sur l'élément `<nav>` pour identifier la navigation
50
-
51
- ### Rôles ARIA
52
-
53
- - `role="tablist"` sur le conteneur de navigation
54
- - `role="presentation"` sur les éléments de liste
55
- - `role="tab"` sur les boutons d'onglets
56
- - `role="tabpanel"` sur les panneaux de contenu
57
-
58
- ### États et propriétés
59
-
60
- - `aria-selected="true|false"` indique l'onglet actif
61
- - Attribut `hidden` sur les panneaux non actifs
62
- - Focus visible avec outline adapté au design system
63
-
64
- ### Navigation au clavier
65
-
66
- Le composant implémente toutes les interactions clavier recommandées par les [Pratiques Authoring WAI-ARIA 1.2](https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/) :
67
-
68
- - **Flèches gauche/droite** : Navigation entre les onglets
69
- - **Touches Home/End** : Accès au premier/dernier onglet
70
- - **Entrée/Espace** : Activation de l'onglet
71
- - **Échap** : Gestion du focus
72
-
73
- ### Contraste et visibilité
74
-
75
- - Contraste suffisant entre le texte et le fond (minimum 4.5:1)
76
- - Indication visuelle claire de l'onglet actif (changement de couleur et bordure)
77
- - Focus visible conforme aux exigences RGAA
78
-
79
- ### Tests d'accessibilité
80
-
81
- Le composant a été testé avec :
82
- - Lecteurs d'écran (NVDA, VoiceOver)
83
- - Navigation clavier
84
- - Outils de vérification de contraste
85
-
86
- <Canvas of={SyTabsStories.Default} />
87
29
 
88
30
  ## Personnalisation
89
31
 
@@ -51,9 +51,6 @@ type Story = StoryObj<typeof meta>
51
51
  export const Default: Story = {
52
52
  args: {},
53
53
  parameters: {
54
- a11y: {
55
- disable: true,
56
- },
57
54
  sourceCode: [
58
55
  {
59
56
  name: 'Template',
@@ -85,9 +82,6 @@ export const Disabled: Story = {
85
82
  ],
86
83
  },
87
84
  parameters: {
88
- a11y: {
89
- disable: true,
90
- },
91
85
  sourceCode: [
92
86
  {
93
87
  name: 'Template',
@@ -134,9 +128,6 @@ export const WithVModel: Story = {
134
128
  `,
135
129
  }),
136
130
  parameters: {
137
- a11y: {
138
- disable: true,
139
- },
140
131
  sourceCode: [
141
132
  {
142
133
  name: 'Template',
@@ -194,9 +185,6 @@ export const WithTabsPrependSlot: Story = {
194
185
  `,
195
186
  }),
196
187
  parameters: {
197
- a11y: {
198
- disable: true,
199
- },
200
188
  sourceCode: [
201
189
  {
202
190
  name: 'Template',
@@ -234,9 +222,6 @@ export const WithTabsAppendSlot: Story = {
234
222
  `,
235
223
  }),
236
224
  parameters: {
237
- a11y: {
238
- disable: true,
239
- },
240
225
  sourceCode: [
241
226
  {
242
227
  name: 'Template',
@@ -277,9 +262,6 @@ export const WithTabPrependSlot: Story = {
277
262
  `,
278
263
  }),
279
264
  parameters: {
280
- a11y: {
281
- disable: true,
282
- },
283
265
  sourceCode: [
284
266
  {
285
267
  name: 'Template',
@@ -328,9 +310,6 @@ export const WithTabAppendSlot: Story = {
328
310
  `,
329
311
  }),
330
312
  parameters: {
331
- a11y: {
332
- disable: true,
333
- },
334
313
  sourceCode: [
335
314
  {
336
315
  name: 'Template',
@@ -383,9 +362,6 @@ export const WithCustomContent: Story = {
383
362
  `,
384
363
  }),
385
364
  parameters: {
386
- a11y: {
387
- disable: true,
388
- },
389
365
  sourceCode: [
390
366
  {
391
367
  name: 'Template',
@@ -422,9 +398,6 @@ export const ManyTabs: Story = {
422
398
  })),
423
399
  },
424
400
  parameters: {
425
- a11y: {
426
- disable: true,
427
- },
428
401
  sourceCode: [
429
402
  {
430
403
  name: 'Template',
@@ -466,9 +439,6 @@ export const CustomTheme: Story = {
466
439
  `,
467
440
  }),
468
441
  parameters: {
469
- a11y: {
470
- disable: true,
471
- },
472
442
  sourceCode: [
473
443
  {
474
444
  name: 'Template',
@@ -499,6 +469,38 @@ const items = [
499
469
  },
500
470
  }
501
471
 
472
+ /**
473
+ * Exemple de SyTabs utilisé comme menu de navigation (Routing).
474
+ * La sémantique d'accessibilité s'adapte automatiquement (utilisation d'une balise <nav> et retrait des rôles ARIA d'onglets).
475
+ */
476
+ export const NavigationMode: Story = {
477
+ args: {
478
+ items: [
479
+ { label: 'Accueil', value: 'home', href: '#' },
480
+ { label: 'Profil', value: 'profile', href: '#profile' },
481
+ { label: 'Paramètres', value: 'settings', href: '#settings' },
482
+ ],
483
+ },
484
+ parameters: {
485
+ sourceCode: [
486
+ {
487
+ name: 'Template',
488
+ code: `<SyTabs :items="items" />`,
489
+ },
490
+ {
491
+ name: 'Script',
492
+ code: `
493
+ const items = [
494
+ { label: 'Accueil', value: 'home', href: '#' },
495
+ { label: 'Profil', value: 'profile', href: '#profile' },
496
+ { label: 'Paramètres', value: 'settings', href: '#settings' },
497
+ ]
498
+ `,
499
+ },
500
+ ],
501
+ },
502
+ }
503
+
502
504
  /**
503
505
  * Exemple avec confirmation avant changement d'onglet.
504
506
  * Démontre comment utiliser la propriété confirmTabChange et gérer l'événement confirm-tab-change.
@@ -533,9 +535,6 @@ export const WithTabConfirmation: Story = {
533
535
  `,
534
536
  }),
535
537
  parameters: {
536
- a11y: {
537
- disable: true,
538
- },
539
538
  sourceCode: [
540
539
  {
541
540
  name: 'Template',
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import useCustomizableOptions from '@/composables/useCustomizableOptions'
3
- import { getCurrentInstance, onMounted, onUnmounted, ref, watch } from 'vue'
3
+ import { computed, getCurrentInstance, onMounted, onUnmounted, ref, watch } from 'vue'
4
4
  import type { Router } from 'vue-router'
5
5
  import { config } from './config'
6
6
  import type { TabItem } from './types'
@@ -12,8 +12,9 @@
12
12
  /** Si activé, une confirmation sera demandée avant de changer d'onglet */
13
13
  confirmTabChange?: boolean
14
14
  /** Message affiché dans la boîte de dialogue de confirmation */
15
- confirmationMessage?: boolean
16
- /** Options personnalisées pour les composants Vuetify */
15
+ confirmationMessage?: string
16
+ /** Si activé, le contenu des onglets ne sera rendu que lorsqu'ils deviendront actifs */
17
+ lazy?: boolean
17
18
  vuetifyOptions?: {
18
19
  sheet?: {
19
20
  theme?: string
@@ -34,7 +35,8 @@
34
35
  }>(), {
35
36
  modelValue: undefined,
36
37
  confirmTabChange: false,
37
- confirmationMessage: false,
38
+ confirmationMessage: 'Voulez-vous vraiment changer d\'onglet ?',
39
+ lazy: false,
38
40
  vuetifyOptions: () => ({}),
39
41
  })
40
42
 
@@ -43,7 +45,11 @@
43
45
  inheritAttrs: false,
44
46
  })
45
47
 
46
- const emit = defineEmits(['update:modelValue', 'cancel-navigation', 'confirm-tab-change'])
48
+ const emit = defineEmits<{
49
+ 'update:modelValue': [value: number | string]
50
+ 'cancel-navigation': []
51
+ 'confirm-tab-change': [message: string, resolve: (confirmed: boolean) => void]
52
+ }>()
47
53
 
48
54
  defineSlots<{
49
55
  'tabs-prepend': () => unknown
@@ -55,6 +61,9 @@
55
61
 
56
62
  const options = useCustomizableOptions(config, { vuetifyOptions: props.vuetifyOptions })
57
63
 
64
+ // Détecte automatiquement si le composant est utilisé pour la navigation
65
+ const isNavigationMode = computed(() => props.items.some(item => !!item.to || !!item.href))
66
+
58
67
  // Safely get router through getCurrentInstance - it might not be available in all contexts
59
68
  const instance = getCurrentInstance()
60
69
  const router = instance?.appContext.config.globalProperties.$router as Router | null || null
@@ -64,6 +73,16 @@
64
73
  // Élément actuellement focusé (pour la navigation clavier)
65
74
  const focusedItemIndex = ref<number>(-1)
66
75
 
76
+ // Keep track of rendered panels for lazy loading
77
+ const renderedPanels = ref<Set<number>>(new Set([0]))
78
+
79
+ // Observer les changements pour le lazy loading
80
+ watch(activeItemIndex, (newIndex) => {
81
+ if (props.lazy && !renderedPanels.value.has(newIndex)) {
82
+ renderedPanels.value.add(newIndex)
83
+ }
84
+ }, { immediate: true })
85
+
67
86
  // Émet un événement pour gérer la confirmation de changement d'onglet
68
87
  async function handleTabChangeConfirmation(message: string): Promise<boolean> {
69
88
  // Émettre l'événement avec le message et retourner une promesse
@@ -91,10 +110,8 @@
91
110
  // Ne rien faire si l'élément est désactivé
92
111
  if (item?.disabled) return
93
112
 
94
- const hasHref = item && (item.href || item.to)
95
-
96
113
  // Si la confirmation est activée, demander confirmation
97
- if (props.confirmTabChange && hasHref) {
114
+ if (props.confirmTabChange) {
98
115
  const confirmMessage = props.confirmationMessage
99
116
  const confirmed = await handleTabChangeConfirmation(confirmMessage.toString())
100
117
 
@@ -103,7 +120,6 @@
103
120
  emit('cancel-navigation')
104
121
  return
105
122
  }
106
- // Si confirmé, laisser la navigation se faire naturellement (RouterLink ou href)
107
123
  }
108
124
 
109
125
  // Mettre à jour l'onglet actif
@@ -118,16 +134,23 @@
118
134
  function handleKeyPress(event: KeyboardEvent, index: number) {
119
135
  if (event.key === 'Enter' || event.key === ' ') {
120
136
  const item = props.items[index] as TabItem | undefined
121
- // Ne rien faire si l'élément est désactivé
122
137
  if (item?.disabled) {
123
138
  event.preventDefault()
124
139
  return
125
140
  }
126
- // Don't prevent default for external links - let them navigate naturally
127
- if (!item?.href) {
141
+
142
+ if (isNavigationMode.value) {
143
+ // En mode navigation, Enter active le lien nativement.
144
+ // Espace doit forcer le clic pour éviter le scroll
145
+ if (event.key === ' ') {
146
+ event.preventDefault()
147
+ document.getElementById(`tab-${index}`)?.click()
148
+ }
149
+ }
150
+ else {
128
151
  event.preventDefault()
152
+ void setActiveItem(index)
129
153
  }
130
- void setActiveItem(index) // void pour ignorer la promesse
131
154
  }
132
155
  }
133
156
 
@@ -178,12 +201,14 @@
178
201
  // Mettre à jour l'index de l'élément focusé et actif
179
202
  focusedItemIndex.value = newIndex
180
203
 
181
- // Focus sur le nouvel élément et l'activer
182
- // Vérifier si l'élément existe et se focaliser sur le bouton
204
+ // Focus sur le nouvel élément
183
205
  const tabButton = document.getElementById(`tab-${newIndex}`)
184
206
  if (tabButton) {
185
207
  tabButton.focus()
186
- setActiveItem(newIndex)
208
+ // Activer automatiquement seulement en mode onglets locaux
209
+ if (!isNavigationMode.value) {
210
+ setActiveItem(newIndex)
211
+ }
187
212
  }
188
213
  }
189
214
 
@@ -192,8 +217,8 @@
192
217
  // Configurer l'accessibilité
193
218
  setupAccessibilityFeatures()
194
219
 
195
- // Si les items ne sont pas un tableau ou vides, ne rien faire
196
- if (!Array.isArray(props.items) || props.items.length === 0) return
220
+ // Si les items sont vides, ne rien faire
221
+ if (!props.items?.length) return
197
222
 
198
223
  // Si modelValue est défini, utiliser cette valeur pour déterminer l'index actif
199
224
  if (props.modelValue !== undefined) {
@@ -319,20 +344,17 @@
319
344
  <div class="sy-tabs px-xl-0 px-4">
320
345
  <slot name="tabs-prepend" />
321
346
  <slot>
322
- <nav
323
- role="tablist"
324
- aria-label="Onglets de navigation"
325
- class="sy-tabs__nav"
326
- >
327
- <ul
347
+ <div class="sy-tabs__nav">
348
+ <component
349
+ :is="isNavigationMode ? 'nav' : 'div'"
328
350
  ref="tablist"
351
+ :role="isNavigationMode ? 'navigation' : 'tablist'"
352
+ :aria-label="isNavigationMode ? 'Menu de navigation' : 'Onglets de navigation'"
329
353
  class="sy-tabs__list"
330
354
  >
331
- <li
332
- v-for="(item, index) in Array.isArray(items) ? items : []"
355
+ <template
356
+ v-for="(item, index) in items"
333
357
  :key="item.label || index"
334
- class="sy-tabs__item"
335
- role="presentation"
336
358
  >
337
359
  <!-- Use RouterLink for internal navigation -->
338
360
  <RouterLink
@@ -344,11 +366,12 @@
344
366
  'sy-tabs__button--active': activeItemIndex === index,
345
367
  'sy-tabs__button--disabled': item.disabled
346
368
  }"
347
- role="tab"
348
- :aria-selected="activeItemIndex === index"
349
- :aria-controls="`panel-${index}`"
369
+ :role="isNavigationMode ? undefined : 'tab'"
370
+ :aria-current="isNavigationMode && activeItemIndex === index ? 'page' : undefined"
371
+ :aria-selected="!isNavigationMode ? activeItemIndex === index : undefined"
372
+ :aria-controls="!isNavigationMode ? `panel-${index}` : undefined"
350
373
  :aria-disabled="item.disabled || undefined"
351
- :tabindex="item.disabled ? -1 : 0"
374
+ :tabindex="(activeItemIndex === index && !item.disabled) ? 0 : -1"
352
375
  @click="item.disabled ? undefined : setActiveItem(index)"
353
376
  @keydown="(event) => {
354
377
  if (!item.disabled) {
@@ -381,11 +404,12 @@
381
404
  'sy-tabs__button--active': activeItemIndex === index,
382
405
  'sy-tabs__button--disabled': item.disabled
383
406
  }"
384
- role="tab"
385
- :aria-selected="activeItemIndex === index"
386
- :aria-controls="`panel-${index}`"
407
+ :role="isNavigationMode ? undefined : 'tab'"
408
+ :aria-current="isNavigationMode && activeItemIndex === index ? 'page' : undefined"
409
+ :aria-selected="!isNavigationMode ? activeItemIndex === index : undefined"
410
+ :aria-controls="!isNavigationMode ? `panel-${index}` : undefined"
387
411
  :aria-disabled="item.disabled || undefined"
388
- :tabindex="item.disabled ? -1 : 0"
412
+ :tabindex="(activeItemIndex === index && !item.disabled) ? 0 : -1"
389
413
  @click="(event) => {
390
414
  if (item.disabled) {
391
415
  event.preventDefault();
@@ -425,9 +449,10 @@
425
449
  'sy-tabs__button--active': activeItemIndex === index,
426
450
  'sy-tabs__button--disabled': true
427
451
  }"
428
- role="tab"
429
- :aria-selected="activeItemIndex === index"
430
- :aria-controls="`panel-${index}`"
452
+ :role="isNavigationMode ? undefined : 'tab'"
453
+ :aria-current="isNavigationMode && activeItemIndex === index ? 'page' : undefined"
454
+ :aria-selected="!isNavigationMode ? activeItemIndex === index : undefined"
455
+ :aria-controls="!isNavigationMode ? `panel-${index}` : undefined"
431
456
  aria-disabled="true"
432
457
  tabindex="-1"
433
458
  disabled
@@ -455,9 +480,10 @@
455
480
  'sy-tabs__button--active': activeItemIndex === index,
456
481
  'sy-tabs__button--disabled': true
457
482
  }"
458
- role="tab"
459
- :aria-selected="activeItemIndex === index"
460
- :aria-controls="`panel-${index}`"
483
+ :role="isNavigationMode ? undefined : 'tab'"
484
+ :aria-current="isNavigationMode && activeItemIndex === index ? 'page' : undefined"
485
+ :aria-selected="!isNavigationMode ? activeItemIndex === index : undefined"
486
+ :aria-controls="!isNavigationMode ? `panel-${index}` : undefined"
461
487
  aria-disabled="true"
462
488
  tabindex="-1"
463
489
  disabled
@@ -485,11 +511,12 @@
485
511
  'sy-tabs__button--active': activeItemIndex === index,
486
512
  'sy-tabs__button--disabled': item.disabled
487
513
  }"
488
- role="tab"
489
- :aria-selected="activeItemIndex === index"
490
- :aria-controls="`panel-${index}`"
514
+ :role="isNavigationMode ? undefined : 'tab'"
515
+ :aria-current="isNavigationMode && activeItemIndex === index ? 'page' : undefined"
516
+ :aria-selected="!isNavigationMode ? activeItemIndex === index : undefined"
517
+ :aria-controls="!isNavigationMode ? `panel-${index}` : undefined"
491
518
  :aria-disabled="item.disabled || undefined"
492
- :tabindex="item.disabled ? -1 : 0"
519
+ :tabindex="(activeItemIndex === index && !item.disabled) ? 0 : -1"
493
520
  :disabled="item.disabled"
494
521
  @click="setActiveItem(index)"
495
522
  @keydown="(event) => {
@@ -513,9 +540,9 @@
513
540
  :is-active="activeItemIndex === index"
514
541
  />
515
542
  </button>
516
- </li>
517
- </ul>
518
- </nav>
543
+ </template>
544
+ </component>
545
+ </div>
519
546
  </slot>
520
547
  <slot name="tabs-append" />
521
548
  </div>
@@ -524,27 +551,27 @@
524
551
  <!-- Panneau de contenu des onglets -->
525
552
  <div class="sy-tabs-panels">
526
553
  <div
527
- v-for="(item, index) in Array.isArray(items) ? items : []"
554
+ v-for="(item, index) in items"
528
555
  :id="`panel-${index}`"
529
556
  :key="`panel-${index}`"
530
557
  class="sy-tabs-panel"
531
- role="tabpanel"
532
- :aria-labelledby="`tab-${index}`"
558
+ :role="!isNavigationMode ? 'tabpanel' : undefined"
559
+ :aria-labelledby="!isNavigationMode ? `tab-${index}` : undefined"
533
560
  :hidden="activeItemIndex !== index"
534
561
  >
535
- <slot
536
- :name="`panel-${index}`"
537
- :active="activeItemIndex === index"
538
- >
539
- {{ item.content || '' }}
540
- </slot>
562
+ <template v-if="!lazy || renderedPanels.has(index)">
563
+ <slot
564
+ :name="`panel-${index}`"
565
+ :active="activeItemIndex === index"
566
+ >
567
+ {{ item.content || '' }}
568
+ </slot>
569
+ </template>
541
570
  </div>
542
571
  </div>
543
572
  </template>
544
573
 
545
574
  <style lang="scss" scoped>
546
- @use '@/assets/tokens.scss' as *;
547
-
548
575
  .sy-tabs {
549
576
  display: flex;
550
577
  align-items: center;
@@ -558,7 +585,6 @@
558
585
  .sy-tabs__list {
559
586
  display: flex;
560
587
  position: relative;
561
- list-style-type: none;
562
588
  padding: 0;
563
589
  margin: 0;
564
590
  width: 100%;
@@ -576,12 +602,6 @@
576
602
  background-color: v-bind("options.tab['slider-color']");
577
603
  }
578
604
 
579
- .sy-tabs__item {
580
- cursor: pointer;
581
- display: flex;
582
- align-items: stretch;
583
- }
584
-
585
605
  .sy-tabs__button {
586
606
  display: flex;
587
607
  align-items: center;