@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
@@ -334,7 +334,12 @@
334
334
  const dateObjects = value
335
335
  .map(dateStr => parseDate(dateStr, returnFormat.value))
336
336
  .filter(Boolean) as Date[]
337
- selectedDates.value = dateObjects
337
+ if (props.displayRange && dateObjects.length >= 2) {
338
+ selectedDates.value = dateSelectionResult.generateDateRange(dateObjects[0]!, dateObjects[dateObjects.length - 1]!)
339
+ }
340
+ else {
341
+ selectedDates.value = dateObjects
342
+ }
338
343
  }
339
344
  else {
340
345
  const dateObject = parseDate(value, returnFormat.value)
@@ -390,6 +395,7 @@
390
395
  initializeSelectedDates,
391
396
  validateDates,
392
397
  updateModel,
398
+ generateDateRange: dateSelectionResult.generateDateRange,
393
399
  })
394
400
 
395
401
  // Display helpers (centralised in useDatePickerState)
@@ -772,7 +778,7 @@
772
778
  const startDate = parseDate(startDateStr, props.format)
773
779
  const endDate = parseDate(endDateStr, props.format)
774
780
  if (startDate && endDate) {
775
- selectedDates.value = [startDate, endDate]
781
+ selectedDates.value = dateSelectionResult.generateDateRange(startDate, endDate)
776
782
  validateDates()
777
783
  }
778
784
  }
@@ -866,7 +872,7 @@
866
872
  const endDate = endStr ? parseDate(endStr, rf) || parseDate(endStr, props.format) : null
867
873
 
868
874
  if (startDate && endDate) {
869
- selectedDates.value = [startDate, endDate]
875
+ selectedDates.value = dateSelectionResult.generateDateRange(startDate, endDate)
870
876
  displayFormattedDate.value
871
877
  = `${formatDate(startDate, props.format)} - ${formatDate(endDate, props.format)}`
872
878
  }
@@ -1222,8 +1228,6 @@
1222
1228
  </template>
1223
1229
 
1224
1230
  <style lang="scss" scoped>
1225
- @use '@/assets/tokens';
1226
-
1227
1231
  .date-picker-title {
1228
1232
  display: block;
1229
1233
  text-transform: lowercase;
@@ -1249,7 +1253,7 @@
1249
1253
  /* Style pour les jours fériés */
1250
1254
  :deep(.holiday-day) {
1251
1255
  background-color: rgb(255 193 7 / 10%);
1252
- border: 2px dotted tokens.$neutral-black;
1256
+ border: 2px dotted rgb(var(--v-theme-grey-darken60));
1253
1257
  border-radius: 50%;
1254
1258
  }
1255
1259
 
@@ -1268,45 +1272,45 @@
1268
1272
  .v-messages__message--success {
1269
1273
  :deep(.v-input__control),
1270
1274
  :deep(.v-messages__message) {
1271
- color: tokens.$colors-text-success !important;
1275
+ color: rgb(var(--v-theme-textSuccess)) !important;
1272
1276
 
1273
1277
  --v-medium-emphasis-opacity: 1;
1274
1278
  }
1275
1279
 
1276
1280
  .v-field--active & {
1277
- color: tokens.$colors-border-success !important;
1281
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1278
1282
  }
1279
1283
  }
1280
1284
 
1281
1285
  .v-messages__message--error {
1282
1286
  :deep(.v-input__control),
1283
1287
  :deep(.v-messages__message) {
1284
- color: tokens.$colors-text-error !important;
1288
+ color: rgb(var(--v-theme-textError)) !important;
1285
1289
  }
1286
1290
 
1287
1291
  .v-field--active & {
1288
- color: tokens.$colors-border-error !important;
1292
+ color: rgb(var(--v-theme-borderError)) !important;
1289
1293
  }
1290
1294
  }
1291
1295
 
1292
1296
  .v-messages__message--warning {
1293
1297
  :deep(.v-input__control) {
1294
- color: tokens.$colors-text-warning !important;
1298
+ color: rgb(var(--v-theme-textWarning)) !important;
1295
1299
 
1296
1300
  --v-medium-emphasis-opacity: 1;
1297
1301
  }
1298
1302
 
1299
1303
  :deep(.v-messages__message) {
1300
- color: tokens.$colors-text-warning !important;
1304
+ color: rgb(var(--v-theme-textWarning)) !important;
1301
1305
  }
1302
1306
 
1303
1307
  .v-field--active & {
1304
- color: tokens.$colors-text-warning !important;
1308
+ color: rgb(var(--v-theme-textWarning)) !important;
1305
1309
  }
1306
1310
  }
1307
1311
 
1308
1312
  :deep(.v-btn__content) {
1309
- font-size: tokens.$font-size-body-text + 3;
1313
+ font-size: var(--v-fontSize-corpsDeTexte) + 3;
1310
1314
  font-weight: bold;
1311
1315
  }
1312
1316
 
@@ -1337,7 +1341,7 @@
1337
1341
  }
1338
1342
 
1339
1343
  :deep(.v-date-picker-month__day .v-btn:hover) {
1340
- background-color: tokens.$colors-background-main;
1344
+ background-color: rgb(var(--v-theme-backgroundMain));
1341
1345
  }
1342
1346
 
1343
1347
  :deep(.v-date-picker-month__day--selected, .v-date-picker-month__day--adjacent) {
@@ -1345,7 +1349,7 @@
1345
1349
  }
1346
1350
 
1347
1351
  :deep(.v-date-picker-month__day--selected .v-btn:hover) {
1348
- background-color: tokens.$colors-background-accent-primary-contrasted !important;
1352
+ background-color: rgb(var(--v-theme-backgroundAccentContrasted)) !important;
1349
1353
  }
1350
1354
 
1351
1355
  :deep(.weekend .v-date-picker-month__day--week-end .v-btn) {
@@ -160,6 +160,29 @@ describe('ComplexDatePicker.clean', () => {
160
160
  expect((input.element as HTMLInputElement).value).toBe('01/01/2025 - ')
161
161
  })
162
162
 
163
+ it('generates all intermediate dates when selecting a range in range mode', async () => {
164
+ const wrapper = mountComponent({
165
+ label: 'Date Field',
166
+ format: 'DD/MM/YYYY',
167
+ displayRange: true,
168
+ })
169
+
170
+ await wrapper.vm.handleDateSelected(['01/01/2025', '05/01/2025'])
171
+ await flushPromises()
172
+
173
+ const selection = wrapper.vm.selectedDates as Date[]
174
+ expect(Array.isArray(selection)).toBe(true)
175
+ // Should contain 5 dates: 01/01, 02/01, 03/01, 04/01, 05/01
176
+ expect(selection).toHaveLength(5)
177
+
178
+ // Verify start and end dates are correct (handle timezone differences)
179
+ expect(selection[0]).toBeInstanceOf(Date)
180
+ expect(selection[selection.length - 1]).toBeInstanceOf(Date)
181
+ // Use local date string to avoid timezone issues
182
+ expect(selection[0]?.toLocaleDateString('fr-FR')).toContain('01/01/2025')
183
+ expect(selection[selection.length - 1]?.toLocaleDateString('fr-FR')).toContain('05/01/2025')
184
+ })
185
+
163
186
  it('formatDateInput formats raw digits according to the format and computes cursor position', () => {
164
187
  const wrapper = mountComponent({
165
188
  label: 'Date Field',
@@ -1110,8 +1110,6 @@
1110
1110
  </template>
1111
1111
 
1112
1112
  <style lang="scss" scoped>
1113
- @use '@/assets/tokens';
1114
-
1115
1113
  :deep(.v-icon__svg) { cursor: default; }
1116
1114
 
1117
1115
  .warning-field {
@@ -1122,10 +1120,10 @@
1122
1120
  }
1123
1121
 
1124
1122
  :deep(.v-field) {
1125
- color: tokens.$colors-border-warning !important;
1123
+ color: rgb(var(--v-theme-borderWarning)) !important;
1126
1124
 
1127
1125
  .v-field__outline {
1128
- color: tokens.$colors-border-warning !important;
1126
+ color: rgb(var(--v-theme-borderWarning)) !important;
1129
1127
  }
1130
1128
  }
1131
1129
 
@@ -1133,7 +1131,7 @@
1133
1131
  opacity: 1 !important;
1134
1132
 
1135
1133
  .v-messages__message {
1136
- color: tokens.$colors-border-warning !important;
1134
+ color: rgb(var(--v-theme-borderWarning)) !important;
1137
1135
  }
1138
1136
  }
1139
1137
  }
@@ -1141,11 +1139,11 @@
1141
1139
  .error-field {
1142
1140
  :deep(.v-input__control),
1143
1141
  :deep(.v-messages__message) {
1144
- color: tokens.$colors-text-error !important;
1142
+ color: rgb(var(--v-theme-textError)) !important;
1145
1143
  }
1146
1144
 
1147
1145
  .v-field--active & {
1148
- color: tokens.$colors-border-error !important;
1146
+ color: rgb(var(--v-theme-borderError)) !important;
1149
1147
  }
1150
1148
  }
1151
1149
 
@@ -1157,10 +1155,10 @@
1157
1155
  }
1158
1156
 
1159
1157
  :deep(.v-field) {
1160
- color: tokens.$colors-border-success !important;
1158
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1161
1159
 
1162
1160
  .v-field__outline {
1163
- color: tokens.$colors-border-success !important;
1161
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1164
1162
  }
1165
1163
  }
1166
1164
 
@@ -1168,7 +1166,7 @@
1168
1166
  opacity: 1 !important;
1169
1167
 
1170
1168
  .v-messages__message {
1171
- color: tokens.$colors-border-success !important;
1169
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1172
1170
  }
1173
1171
  }
1174
1172
  }
@@ -0,0 +1,53 @@
1
+ import { describe, it, expect, vi, beforeEach } from 'vitest'
2
+ import { ref } from 'vue'
3
+ import { useDatePickerState } from '../useDatePickerState'
4
+
5
+ describe('useDatePickerState', () => {
6
+ const mockParseDate = vi.fn()
7
+ const mockFormatDate = vi.fn()
8
+ const mockInitializeSelectedDates = vi.fn()
9
+ const mockValidateDates = vi.fn()
10
+ const mockUpdateModel = vi.fn()
11
+ const mockGenerateDateRange = vi.fn()
12
+
13
+ const format = 'DD/MM/YYYY'
14
+
15
+ beforeEach(() => {
16
+ vi.clearAllMocks()
17
+ })
18
+
19
+ describe('syncFromModelValue', () => {
20
+ it('devrait initialiser selectedDates et générer les dates intermédiaires en mode plage', () => {
21
+ const selectedDates = ref<Date | (Date | null)[] | null>(null)
22
+ const startDate = new Date('2023-01-01')
23
+ const endDate = new Date('2023-01-05')
24
+ const intermediateDate = new Date('2023-01-03')
25
+
26
+ mockInitializeSelectedDates.mockReturnValue([startDate, endDate])
27
+ mockFormatDate.mockImplementation((date) => {
28
+ if (date === startDate) return '01/01/2023'
29
+ if (date === endDate) return '05/01/2023'
30
+ return ''
31
+ })
32
+ mockGenerateDateRange.mockReturnValue([startDate, intermediateDate, endDate])
33
+
34
+ const { syncFromModelValue } = useDatePickerState({
35
+ selectedDates,
36
+ format,
37
+ displayRange: true,
38
+ parseDate: mockParseDate,
39
+ formatDate: mockFormatDate,
40
+ initializeSelectedDates: mockInitializeSelectedDates,
41
+ validateDates: mockValidateDates,
42
+ updateModel: mockUpdateModel,
43
+ generateDateRange: mockGenerateDateRange,
44
+ })
45
+
46
+ syncFromModelValue(['01/01/2023', '05/01/2023'])
47
+
48
+ expect(mockInitializeSelectedDates).toHaveBeenCalled()
49
+ expect(mockGenerateDateRange).toHaveBeenCalledWith(startDate, endDate)
50
+ expect(selectedDates.value).toEqual([startDate, intermediateDate, endDate])
51
+ })
52
+ })
53
+ })
@@ -12,6 +12,7 @@ export interface UseDatePickerStateOptions {
12
12
  initializeSelectedDates: (value: DateInput | null, format: string, dateFormatReturn?: string) => Date | (Date | null)[] | null
13
13
  validateDates: (forceValidation?: boolean) => void
14
14
  updateModel: (value: DateValue) => void
15
+ generateDateRange?: (start: Date, end: Date) => Date[]
15
16
  }
16
17
 
17
18
  export interface UseDatePickerStateResult {
@@ -37,6 +38,7 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
37
38
  initializeSelectedDates,
38
39
  validateDates,
39
40
  // updateModel,
41
+ generateDateRange,
40
42
  } = options
41
43
 
42
44
  const textInputValue = ref('')
@@ -115,6 +117,16 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
115
117
  }
116
118
 
117
119
  selectedDates.value = initializeSelectedDates(newValue ?? null, format, dateFormatReturn)
120
+
121
+ if (displayRange && Array.isArray(selectedDates.value) && selectedDates.value.length === 2) {
122
+ const startDate = selectedDates.value[0]
123
+ const endDate = selectedDates.value[1]
124
+ if (startDate && endDate && generateDateRange) {
125
+ // Regenerate intermediate dates for Vuetify range selection
126
+ selectedDates.value = generateDateRange(startDate, endDate)
127
+ }
128
+ }
129
+
118
130
  if (selectedDates.value) {
119
131
  const firstDate = Array.isArray(selectedDates.value)
120
132
  ? selectedDates.value[0]
@@ -141,6 +153,18 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
141
153
  return
142
154
  }
143
155
 
156
+ if (displayRange && Array.isArray(value) && value.length >= 2) {
157
+ const startDate = value[0]
158
+ const endDate = value[value.length - 1]
159
+ if (startDate && endDate) {
160
+ const formattedForInput = `${formatDate(startDate, format)} - ${formatDate(endDate, format)}`
161
+ if (textInputValue.value !== formattedForInput) {
162
+ textInputValue.value = formattedForInput
163
+ }
164
+ return
165
+ }
166
+ }
167
+
144
168
  const firstDate = Array.isArray(value) ? (value[0] ?? null) : value
145
169
  if (!firstDate) return
146
170
 
@@ -80,7 +80,6 @@ export const useDateTextField = (options: UseDateTextFieldOptions) => {
80
80
  isValidating.value = true
81
81
  hasInteracted.value = true
82
82
  const ok = await runRules(inputValue.value)
83
- console.log('ok from validateOnSubmit:', ok)
84
83
  isValidating.value = false
85
84
  return ok
86
85
  }
@@ -14,6 +14,7 @@ export function useMonthButtonCustomization(
14
14
  const monthButtonText = ref('')
15
15
  const yearText = ref('')
16
16
  const monthButtonObservers: MutationObserver[] = []
17
+ const primaryThemeColor = 'rgb(var(--v-theme-primary, 12, 65, 154))'
17
18
 
18
19
  onBeforeUnmount(() => {
19
20
  monthButtonObservers.forEach(observer => observer.disconnect())
@@ -111,12 +112,12 @@ export function useMonthButtonCustomization(
111
112
  )
112
113
  monthBtnElement.setAttribute('data-ripple', 'false')
113
114
  monthBtnElement.setAttribute('aria-label', monthText)
114
- monthBtnElement.style.color = 'var(--v-theme-primary)'
115
+ monthBtnElement.style.color = primaryThemeColor
115
116
 
116
117
  const buttonContentHTML = `
117
- <div class="v-btn__content" data-no-activator="" style="color: var(--v-theme-primary);">
118
- <span style="color: var(--v-theme-primary);">${monthText}</span>
119
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" class="ms-1" style="fill: var(--v-theme-primary);" aria-hidden="true"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /></svg>
118
+ <div class="v-btn__content" data-no-activator="" style="color: ${primaryThemeColor};">
119
+ <span style="color: ${primaryThemeColor};">${monthText}</span>
120
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" class="ms-1" style="fill: ${primaryThemeColor};" aria-hidden="true"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /></svg>
120
121
  </div>
121
122
  `
122
123
 
@@ -167,12 +168,12 @@ export function useMonthButtonCustomization(
167
168
  )
168
169
  yearBtnElement.setAttribute('data-ripple', 'false')
169
170
  yearBtnElement.setAttribute('aria-label', displayedYear)
170
- yearBtnElement.style.color = 'var(--v-theme-primary)'
171
+ yearBtnElement.style.color = primaryThemeColor
171
172
 
172
173
  const yearButtonContentHTML = `
173
- <div class="v-btn__content" data-no-activator="" style="color: var(--v-theme-primary);">
174
- <span style="color: var(--v-theme-primary);">${displayedYear}</span>
175
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" class="ms-1" style="fill: var(--v-theme-primary);" aria-hidden="true"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /></svg>
174
+ <div class="v-btn__content" data-no-activator="" style="color: ${primaryThemeColor};">
175
+ <span style="color: ${primaryThemeColor};">${displayedYear}</span>
176
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" class="ms-1" style="fill: ${primaryThemeColor};" aria-hidden="true"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /></svg>
176
177
  </div>
177
178
  `
178
179
 
@@ -135,7 +135,7 @@
135
135
  .holiday-list {
136
136
  max-height: 200px;
137
137
  overflow-y: auto;
138
- background-color: #fff;
138
+ background-color: rgb(var(--v-theme-surface));
139
139
  padding: 10px;
140
140
  border-radius: 4px;
141
141
  border: 1px solid #e0e0e0;
@@ -244,8 +244,6 @@
244
244
  </template>
245
245
 
246
246
  <style lang="scss" scoped>
247
- @use '@/assets/tokens' as *;
248
-
249
247
  .sy-dialog-box-actions :deep(.v-btn) {
250
248
  box-shadow: none;
251
249
  }
@@ -255,7 +253,7 @@
255
253
  }
256
254
 
257
255
  .v-btn--icon {
258
- color: $colors-icon-base;
256
+ color: rgb(var(--v-theme-iconBase));
259
257
  position: absolute;
260
258
  right: 24px;
261
259
  }
@@ -285,7 +283,7 @@ h2 {
285
283
  display: flex;
286
284
  flex-direction: column;
287
285
  justify-content: stretch;
288
- gap: $spacing-small;
286
+ gap: 16px;
289
287
  }
290
288
 
291
289
  .sy-dialog-box-draggable .sy-dialog-box-title {
@@ -303,7 +301,7 @@ h2 {
303
301
  user-select: none;
304
302
  }
305
303
 
306
- @media screen and (min-width: $container-mobile-max-width) {
304
+ @media screen and (width >= 600px) {
307
305
  .sy-dialog-box-actions-ctn {
308
306
  flex-direction: row;
309
307
  }
@@ -0,0 +1,76 @@
1
+ import { h } from 'vue'
2
+ import DialogBox from '../DialogBox.vue'
3
+
4
+ const dialogTransitionOptions = {
5
+ global: {
6
+ stubs: {
7
+ 'transition': false,
8
+ 'transition-group': false,
9
+ },
10
+ },
11
+ } as const
12
+
13
+ function waitForDialogTransitionEnd() {
14
+ cy.get('.v-overlay__content')
15
+ .should('be.visible')
16
+ .and('not.have.class', 'dialog-transition-enter-active')
17
+ }
18
+
19
+ describe('DialogBox - Visual regression tests', () => {
20
+ it('displays the opened dialog box', () => {
21
+ cy.mountWithVuetify(DialogBox, {
22
+ ...dialogTransitionOptions,
23
+ props: {
24
+ 'modelValue': true,
25
+ 'title': 'Confirmer la suppression',
26
+ 'onUpdate:modelValue': () => {},
27
+ },
28
+ slots: {
29
+ default: () => h('p', 'Êtes-vous sûr de vouloir supprimer cet élément ?'),
30
+ },
31
+ })
32
+
33
+ cy.get('.v-dialog').should('be.visible')
34
+ waitForDialogTransitionEnd()
35
+ cy.matchImageSnapshot('dialog-box-default')
36
+ })
37
+
38
+ it('displays the dialog box without actions', () => {
39
+ cy.mountWithVuetify(DialogBox, {
40
+ ...dialogTransitionOptions,
41
+ props: {
42
+ 'modelValue': true,
43
+ 'title': 'Information',
44
+ 'hideActions': true,
45
+ 'onUpdate:modelValue': () => {},
46
+ },
47
+ slots: {
48
+ default: () => h('p', 'Ceci est un message informatif.'),
49
+ },
50
+ })
51
+
52
+ cy.get('.v-dialog').should('be.visible')
53
+ waitForDialogTransitionEnd()
54
+ cy.matchImageSnapshot('dialog-box-no-actions')
55
+ })
56
+
57
+ it('displays the dialog box with custom texts', () => {
58
+ cy.mountWithVuetify(DialogBox, {
59
+ ...dialogTransitionOptions,
60
+ props: {
61
+ 'modelValue': true,
62
+ 'title': 'Valider le formulaire',
63
+ 'cancelBtnText': 'Annuler',
64
+ 'confirmBtnText': 'Valider',
65
+ 'onUpdate:modelValue': () => {},
66
+ },
67
+ slots: {
68
+ default: () => h('p', 'Souhaitez-vous valider ce formulaire ?'),
69
+ },
70
+ })
71
+
72
+ cy.get('.v-dialog').should('be.visible')
73
+ waitForDialogTransitionEnd()
74
+ cy.matchImageSnapshot('dialog-box-custom-texts')
75
+ })
76
+ })
@@ -19,8 +19,14 @@
19
19
  const props = withDefaults(defineProps<{
20
20
  uploadList: Item[]
21
21
  locales?: typeof defaultLocales
22
+ seeLabel?: string
23
+ importLabel?: string
24
+ deleteLabel?: string
22
25
  } & Widthable>(), {
23
26
  locales: () => defaultLocales,
27
+ seeLabel: undefined,
28
+ importLabel: undefined,
29
+ deleteLabel: undefined,
24
30
  })
25
31
 
26
32
  const { widthStyles } = useWidthable(props)
@@ -51,6 +57,9 @@
51
57
  :show-delete-btn="item.showDeleteBtn"
52
58
  tag="li"
53
59
  :locales="locales"
60
+ :see-label="seeLabel"
61
+ :import-label="importLabel"
62
+ :delete-label="deleteLabel"
54
63
  @upload="() => $emit('upload', uploadList.find((i) => i.id === item.id) as Item)"
55
64
  @preview="() => $emit('preview', uploadList.find((i) => i.id === item.id) as Item)"
56
65
  @delete="() => $emit('delete', uploadList.find((i) => i.id === item.id) as Item)"
@@ -66,8 +75,6 @@
66
75
  </template>
67
76
 
68
77
  <style lang="scss" scoped>
69
- @use '@/assets/tokens';
70
-
71
78
  .upload-list {
72
79
  display: flex;
73
80
  flex-direction: column;
@@ -206,14 +206,12 @@
206
206
  </template>
207
207
 
208
208
  <style lang="scss" scoped>
209
- @use '@/assets/tokens';
210
-
211
209
  .file-item {
212
210
  display: flex;
213
211
  flex-direction: column;
214
- gap: tokens.$gap-3;
215
- padding-block: tokens.$padding-4;
216
- border-bottom: 1px solid tokens.$colors-border-subdued;
212
+ gap: var(--v-gap-3);
213
+ padding-block: var(--v-padding-4);
214
+ border-bottom: 1px solid rgb(var(--v-theme-borderSubdued));
217
215
 
218
216
  &:first-child:last-child {
219
217
  border-bottom: none;
@@ -221,12 +219,12 @@
221
219
  }
222
220
 
223
221
  .file-item__title {
224
- font-size: tokens.$font-size-body-text;
222
+ font-size: var(--v-fontSize-corpsDeTexte);
225
223
  }
226
224
 
227
225
  .file-item__name {
228
226
  font-size: 0.875rem;
229
- color: tokens.$colors-text-base;
227
+ color: rgb(var(--v-theme-textBase));
230
228
  }
231
229
 
232
230
  .file-item__description {
@@ -252,7 +250,7 @@
252
250
 
253
251
  .file-item__content {
254
252
  display: flex;
255
- gap: tokens.$gap-4;
253
+ gap: var(--v-gap-4);
256
254
  align-items: center;
257
255
  }
258
256
 
@@ -263,9 +261,9 @@
263
261
  justify-content: center;
264
262
  margin-left: auto;
265
263
  height: 100%;
266
- gap: tokens.$gap-1;
264
+ gap: var(--v-gap-1);
267
265
 
268
- @media screen and (min-width: tokens.$container-tablet-max-width) {
266
+ @media screen and (width >= 960px) {
269
267
  flex-direction: row;
270
268
  }
271
269
  }
@@ -280,18 +278,18 @@
280
278
 
281
279
  .file-item__message {
282
280
  font-size: 0.875rem;
283
- color: tokens.$colors-text-subdued;
281
+ color: rgb(var(--v-theme-textSubdued));
284
282
  }
285
283
 
286
284
  .file-item__message-success,
287
285
  .file-item__message-error {
288
- margin-top: tokens.$gap-3;
286
+ margin-top: var(--v-gap-3);
289
287
  }
290
288
 
291
289
  .file-item__message-error {
292
290
  display: flex;
293
291
  align-items: center;
294
- gap: tokens.$gap-4;
292
+ gap: var(--v-gap-4);
295
293
  }
296
294
 
297
295
  </style>
@@ -135,6 +135,53 @@ describe('FileList', () => {
135
135
  expect(wrapper.emitted('preview')?.[0]?.[0]).toEqual(fileItem2)
136
136
  })
137
137
 
138
+ it('forwards seeLabel, importLabel, deleteLabel to all items', () => {
139
+ const wrapper = mount(FileList, {
140
+ props: {
141
+ uploadList: [
142
+ { id: 'file1', title: 'file1', state: 'initial' },
143
+ { id: 'file2', title: 'file2', state: 'success', showDeleteBtn: true, showPreviewBtn: true },
144
+ ],
145
+ importLabel: 'Ajouter',
146
+ seeLabel: 'Consulter',
147
+ deleteLabel: 'Retirer',
148
+ },
149
+ })
150
+
151
+ const item1 = wrapper.findAll('.file-item').at(0)
152
+ expect(item1!.find('.file-item__action-upload').text()).toContain('Ajouter')
153
+
154
+ const item2 = wrapper.findAll('.file-item').at(1)
155
+ expect(item2!.find('.file-item__action-preview').text()).toContain('Consulter')
156
+ expect(item2!.find('.file-item__action-delete').text()).toContain('Retirer')
157
+ })
158
+
159
+ it('uses locales for button labels when individual label props are not passed', () => {
160
+ const customLocales = {
161
+ ...locales,
162
+ import: 'Déposer',
163
+ see: 'Afficher',
164
+ delete: 'Effacer',
165
+ }
166
+
167
+ const wrapper = mount(FileList, {
168
+ props: {
169
+ uploadList: [
170
+ { id: 'file1', title: 'file1', state: 'initial' },
171
+ { id: 'file2', title: 'file2', state: 'success', showDeleteBtn: true, showPreviewBtn: true },
172
+ ],
173
+ locales: customLocales,
174
+ },
175
+ })
176
+
177
+ const item1 = wrapper.findAll('.file-item').at(0)
178
+ expect(item1!.find('.file-item__action-upload').text()).toContain('Importer le fichier')
179
+
180
+ const item2 = wrapper.findAll('.file-item').at(1)
181
+ expect(item2!.find('.file-item__action-preview').text()).toContain('Voir le fichier')
182
+ expect(item2!.find('.file-item__action-delete').text()).toContain('Supprimer le fichier')
183
+ })
184
+
138
185
  it('shows when a file is optional', () => {
139
186
  const wrapper = mount(FileList, {
140
187
  props: {