@cnamts/synapse 1.0.24 → 1.0.26

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 (493) hide show
  1. package/README.md +27 -5
  2. package/dist/{AutocompleteFilter-BWLR3U7W.js → AutocompleteFilter-BPR-a55G.js} +1 -1
  3. package/dist/{DateFilter-BpwFexzi.js → DateFilter-CknrJWs2.js} +2 -2
  4. package/dist/{NumberFilter-Bz_NTdX9.js → NumberFilter-DJ-yNlzv.js} +1 -1
  5. package/dist/{PeriodFilter-DX_wy9g-.js → PeriodFilter-CiB5Oa9Z.js} +1 -1
  6. package/dist/{SelectFilter-xqiPtPgX.js → SelectFilter-EiafX97M.js} +2 -2
  7. package/dist/{TextFilter-BBl3JFqK.js → TextFilter-BzOmpdxj.js} +1 -1
  8. package/dist/{apLightTheme-D1P4jcD0.js → apLightTheme-DS0Uy44H.js} +446 -723
  9. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +14 -8
  10. package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +60 -289
  11. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +1 -0
  12. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +4 -0
  13. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1 -0
  14. package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
  15. package/dist/components/Customs/SyTextField/SyTextField.d.ts +0 -2
  16. package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +54 -73
  17. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +31 -40
  18. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +9 -14
  19. package/dist/components/DatePicker/composables/useDatePickerState.d.ts +4 -3
  20. package/dist/components/DatePicker/composables/useDateTextField.d.ts +2 -2
  21. package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +2 -2
  22. package/dist/components/DatePicker/types.d.ts +1 -2
  23. package/dist/components/FileList/FileList.d.ts +6 -0
  24. package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
  25. package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +13 -13
  26. package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
  27. package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +1 -0
  28. package/dist/components/MonthPicker/MonthPicker.d.ts +2 -7
  29. package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +2 -7
  30. package/dist/components/NirField/NirField.d.ts +12 -20
  31. package/dist/components/NirField/useNirValidation.d.ts +6 -2
  32. package/dist/components/PeriodField/PeriodField.d.ts +110 -150
  33. package/dist/components/PhoneField/PhoneField.d.ts +12 -7
  34. package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +0 -3
  35. package/dist/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +3 -1
  36. package/dist/components/RatingPicker/NumberPicker/NumberPicker.d.ts +4 -3
  37. package/dist/components/RatingPicker/RatingPicker.d.ts +18 -5
  38. package/dist/components/RatingPicker/StarsPicker/StarsPicker.d.ts +3 -1
  39. package/dist/components/RatingPicker/tests/RatingPicker.a11y.spect.d.ts +1 -0
  40. package/dist/components/RatingPicker/useRatingFocus.d.ts +18 -0
  41. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
  42. package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
  43. package/dist/components/Tables/common/SyTablePagination.d.ts +154 -364
  44. package/dist/components/Tables/common/TableHeader.d.ts +6 -1
  45. package/dist/components/Tables/common/filters/DateFilter.d.ts +4 -4
  46. package/dist/components/Tables/common/locales.d.ts +3 -0
  47. package/dist/components/Tables/common/types.d.ts +2 -0
  48. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +1 -0
  49. package/dist/composables/date/useDateInitializationDayjs.d.ts +3 -1
  50. package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
  51. package/dist/composables/unifyValidation/useCustomValidation.d.ts +3 -1
  52. package/dist/composables/unifyValidation/useValidation.d.ts +12 -6
  53. package/dist/composables/unifyValidation/useVuetifyValidation.d.ts +1 -1
  54. package/dist/composables/validation/useValidation.d.ts +6 -1
  55. package/dist/design-system-v3.js +2 -2
  56. package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
  57. package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
  58. package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
  59. package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +2 -0
  60. package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
  61. package/dist/designTokens/tokens/baseColors.d.ts +127 -0
  62. package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
  63. package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
  64. package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +2 -0
  65. package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
  66. package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
  67. package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
  68. package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
  69. package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
  70. package/dist/designTokens/utils/index.d.ts +2 -2
  71. package/dist/{main-BtTqyn4z.js → main-BsJ9ec3i.js} +16021 -15715
  72. package/dist/synapse.css +1 -1
  73. package/dist/utils/functions/classToHex.d.ts +1 -1
  74. package/dist/utils/functions/createHexResolver.d.ts +16 -0
  75. package/dist/vuetifyConfig.js +113 -152
  76. package/package.json +35 -23
  77. package/src/assets/amelipro/apTokens2026.scss +5 -5
  78. package/src/assets/overrides/_breakpoints.scss +25 -0
  79. package/src/assets/overrides/_btns.scss +0 -2
  80. package/src/assets/overrides/_forms.scss +1 -3
  81. package/src/assets/overrides/_icons.scss +5 -22
  82. package/src/assets/overrides/_otp.scss +40 -0
  83. package/src/assets/overrides/_tables.scss +11 -20
  84. package/src/assets/overrides/_tooltips.scss +17 -7
  85. package/src/assets/overrides/_typography.scss +35 -37
  86. package/src/assets/overrides/_utilities.scss +43 -47
  87. package/src/assets/themes.scss +1 -0
  88. package/src/components/Accordion/Accordion.vue +2 -0
  89. package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
  90. package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
  91. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
  92. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
  93. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
  94. package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
  95. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
  96. package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
  97. package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
  98. package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
  99. package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
  100. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
  101. package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
  102. package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
  103. package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
  104. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
  105. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
  106. package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
  107. package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
  108. package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
  109. package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
  110. package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
  111. package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
  112. package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
  113. package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
  114. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
  115. package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
  116. package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
  117. package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
  118. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
  119. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
  120. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
  121. package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
  122. package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
  123. package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
  124. package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
  125. package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
  126. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
  127. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
  128. package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
  129. package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
  130. package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
  131. package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
  132. package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
  133. package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
  134. package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
  135. package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
  136. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
  137. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
  138. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
  139. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
  140. package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
  141. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
  142. package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
  143. package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
  144. package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
  145. package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
  146. package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
  147. package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
  148. package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
  149. package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
  150. package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
  151. package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
  152. package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
  153. package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
  154. package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
  155. package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
  156. package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
  157. package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
  158. package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
  159. package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
  160. package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
  161. package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
  162. package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
  163. package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
  164. package/src/components/Captcha/Captcha.vue +1 -3
  165. package/src/components/ChipList/ChipList.vue +14 -16
  166. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +2 -3
  167. package/src/components/CookiesSelection/CookiesSelection.vue +2 -1
  168. package/src/components/CopyBtn/CopyBtn.vue +10 -3
  169. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
  170. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
  171. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
  172. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +8 -4
  173. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
  174. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +66 -0
  175. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +4 -6
  176. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +414 -135
  177. package/src/components/Customs/Selects/SySelect/SySelect.vue +502 -257
  178. package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
  179. package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +278 -4
  180. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +3 -3
  181. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
  182. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +52 -2
  183. package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +18 -3
  184. package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
  185. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +23 -5
  186. package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
  187. package/src/components/Customs/SyTabs/SyTabs.stories.ts +34 -35
  188. package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
  189. package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
  190. package/src/components/Customs/SyTabs/config.ts +3 -3
  191. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
  192. package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
  193. package/src/components/Customs/SyTextField/SyTextField.stories.ts +21 -41
  194. package/src/components/Customs/SyTextField/SyTextField.vue +34 -9
  195. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +1 -1
  196. package/src/components/DatePicker/CalendarMode/DatePicker.vue +29 -28
  197. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1 -1
  198. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +28 -23
  199. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +24 -1
  200. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
  201. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +65 -33
  202. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +1 -1
  203. package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
  204. package/src/components/DatePicker/composables/useDatePickerState.ts +56 -13
  205. package/src/components/DatePicker/composables/useDateRangeInput.ts +2 -1
  206. package/src/components/DatePicker/composables/useDateSelection.ts +2 -1
  207. package/src/components/DatePicker/composables/useDateTextField.ts +2 -3
  208. package/src/components/DatePicker/composables/useInputBlurHandler.ts +2 -2
  209. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
  210. package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
  211. package/src/components/DatePicker/types.ts +1 -2
  212. package/src/components/DialogBox/DialogBox.stories.ts +8 -8
  213. package/src/components/DialogBox/DialogBox.vue +3 -5
  214. package/src/components/DialogBox/accessibilite/Accessibility.mdx +86 -22
  215. package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
  216. package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
  217. package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
  218. package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
  219. package/src/components/FileList/FileList.vue +9 -2
  220. package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
  221. package/src/components/FileList/tests/FileList.spec.ts +47 -0
  222. package/src/components/FileUpload/FileUpload.vue +3 -5
  223. package/src/components/FileUpload/FileUploadContent.vue +3 -5
  224. package/src/components/FilterInline/FilterInline.vue +1 -3
  225. package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
  226. package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
  227. package/src/components/FilterSideBar/FilterSideBar.vue +9 -1
  228. package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
  229. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
  230. package/src/components/FooterBar/FooterBar.vue +9 -13
  231. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
  232. package/src/components/HeaderBar/HeaderBar.vue +2 -3
  233. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
  234. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
  235. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
  236. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
  237. package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
  238. package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
  239. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
  240. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
  241. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
  242. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
  243. package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
  244. package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
  245. package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
  246. package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
  247. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
  248. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
  249. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
  250. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
  251. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
  252. package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
  253. package/src/components/LangBtn/LangBtn.vue +4 -5
  254. package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
  255. package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
  256. package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
  257. package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
  258. package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
  259. package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
  260. package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
  261. package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
  262. package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
  263. package/src/components/NirField/NirField.stories.ts +2 -2
  264. package/src/components/NirField/NirField.vue +3 -5
  265. package/src/components/NirField/accessibilite/Accessibility.mdx +100 -5
  266. package/src/components/NirField/tests/NirField.spec.ts +118 -0
  267. package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
  268. package/src/components/NirField/useNirValidation.ts +38 -32
  269. package/src/components/NotificationBar/Notification/Notification.vue +7 -9
  270. package/src/components/NotificationBar/NotificationBar.vue +1 -3
  271. package/src/components/PaginatedTable/PaginatedTable.vue +3 -4
  272. package/src/components/PaginatedTable/Pagination.vue +4 -6
  273. package/src/components/PasswordField/PasswordField.vue +15 -13
  274. package/src/components/PhoneField/PhoneField.vue +7 -5
  275. package/src/components/RangeField/RangeSlider/RangeSlider.vue +11 -20
  276. package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
  277. package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
  278. package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
  279. package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
  280. package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
  281. package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
  282. package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
  283. package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +38 -56
  284. package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +5 -0
  285. package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +48 -53
  286. package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +2 -1
  287. package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +40 -13
  288. package/src/components/RatingPicker/RatingPicker.stories.ts +65 -88
  289. package/src/components/RatingPicker/RatingPicker.vue +71 -15
  290. package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +31 -42
  291. package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +1 -1
  292. package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +5 -0
  293. package/src/components/RatingPicker/accessibilite/Accessibility.mdx +137 -9
  294. package/src/components/RatingPicker/tests/RatingPicker.a11y.spect.ts +123 -0
  295. package/src/components/RatingPicker/tests/RatingPicker.spec.ts +3 -2
  296. package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +40 -11
  297. package/src/components/RatingPicker/useRatingFocus.ts +97 -0
  298. package/src/components/SearchListField/SearchListField.vue +0 -2
  299. package/src/components/SkipLink/SkipLink.vue +2 -4
  300. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
  301. package/src/components/SubHeader/SubHeader.vue +1 -1
  302. package/src/components/SyAlert/SyAlert.vue +7 -9
  303. package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
  304. package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
  305. package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
  306. package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
  307. package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
  308. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
  309. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
  310. package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
  311. package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
  312. package/src/components/SyTextArea/SyTextArea.vue +32 -1
  313. package/src/components/TableToolbar/TableToolbar.vue +6 -8
  314. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +166 -0
  315. package/src/components/Tables/SyServerTable/SyServerTable.vue +10 -8
  316. package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +23 -0
  317. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +268 -0
  318. package/src/components/Tables/SyTable/SyTable.stories.ts +104 -0
  319. package/src/components/Tables/SyTable/SyTable.vue +10 -8
  320. package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +22 -0
  321. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +274 -0
  322. package/src/components/Tables/common/SyTableFilter.vue +31 -6
  323. package/src/components/Tables/common/SyTablePagination.vue +143 -19
  324. package/src/components/Tables/common/TableHeader.vue +41 -4
  325. package/src/components/Tables/common/filters/DateFilter.vue +2 -2
  326. package/src/components/Tables/common/filters/SelectFilter.vue +1 -1
  327. package/src/components/Tables/common/locales.ts +3 -0
  328. package/src/components/Tables/common/tableStyles.scss +16 -19
  329. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
  330. package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
  331. package/src/components/Tables/common/types.ts +2 -0
  332. package/src/components/Tables/common/useTableHeaders.ts +49 -27
  333. package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
  334. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
  335. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
  336. package/src/components/UploadWorkflow/useFileList.ts +3 -0
  337. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
  338. package/src/composables/date/tests/useDateFormatDayjs.spec.ts +81 -0
  339. package/src/composables/date/tests/{useDateInitialization.spec.ts → useDateInitializationDayjs.spec.ts} +39 -3
  340. package/src/composables/date/useDateInitializationDayjs.ts +4 -1
  341. package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
  342. package/src/composables/unifyValidation/tests/useCustomValidation.spec.ts +2 -1
  343. package/src/composables/unifyValidation/tests/useValidation.spec.ts +22 -0
  344. package/src/composables/unifyValidation/useCustomValidation.ts +16 -4
  345. package/src/composables/unifyValidation/useValidation.ts +46 -15
  346. package/src/composables/unifyValidation/useVuetifyValidation.ts +2 -2
  347. package/src/composables/useFormFieldErrorHandling.ts +4 -1
  348. package/src/composables/validation/tests/useValidation.spec.ts +2 -2
  349. package/src/composables/validation/useValidation.ts +32 -4
  350. package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
  351. package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
  352. package/src/composantsVuetify/VCard/VCard.mdx +59 -0
  353. package/src/composantsVuetify/VCard/v-card.stories.ts +279 -0
  354. package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
  355. package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
  356. package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
  357. package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
  358. package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
  359. package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
  360. package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
  361. package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
  362. package/src/designTokens/tests/themeUtils.spec.ts +53 -0
  363. package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
  364. package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
  365. package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
  366. package/src/designTokens/tokens/amelipro/apLightTheme.ts +4 -1
  367. package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
  368. package/src/designTokens/tokens/baseColors.ts +129 -0
  369. package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
  370. package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
  371. package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
  372. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +4 -1
  373. package/src/designTokens/tokens/cnam/cnamSemantic.ts +1 -1
  374. package/src/designTokens/tokens/pa/paColors.ts +2 -166
  375. package/src/designTokens/tokens/pa/paContextual.ts +3 -48
  376. package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
  377. package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
  378. package/src/designTokens/utils/buildColorClassMap.ts +34 -0
  379. package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
  380. package/src/designTokens/utils/createFlattenTheme.ts +15 -7
  381. package/src/designTokens/utils/index.ts +2 -2
  382. package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +61 -91
  383. package/src/stories/Accessibilite/AuditDesignSystem.mdx +5 -19
  384. package/src/stories/Accessibilite/AuditEtContreAudit/Exemptions-derogations.mdx +1 -1
  385. package/src/stories/Accessibilite/AuditEtContreAudit/Introduction.mdx +11 -8
  386. package/src/stories/Accessibilite/AuditEtContreAudit/RGAA.mdx +6 -7
  387. package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
  388. package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
  389. package/src/stories/Accessibilite/Introduction.mdx +30 -30
  390. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +176 -79
  391. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +67 -19
  392. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +78 -50
  393. package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +23 -49
  394. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/FauxPositifs.stories.ts +6 -0
  395. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/Utilisation.mdx +7 -19
  396. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +55 -67
  397. package/src/stories/Components/Components.stories.ts +92 -4
  398. package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
  399. package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
  400. package/src/stories/Demarrer/Releases.stories.ts +48 -5
  401. package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
  402. package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
  403. package/src/stories/DesignTokens/colors.stories.ts +5 -6
  404. package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
  405. package/src/stories/GuideDuDev/Theme.mdx +36 -26
  406. package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
  407. package/src/stories/styles/accessibility-guide.css +3 -3
  408. package/src/utils/functions/classToHex.ts +6 -34
  409. package/src/utils/functions/createHexResolver.ts +45 -0
  410. package/src/utils/functions/tests/classToHex.spec.ts +36 -0
  411. package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
  412. package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
  413. package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
  414. package/dist/AutocompleteFilter-D9jzRzAL.cjs +0 -1
  415. package/dist/DateFilter-DTUl8hb1.cjs +0 -1
  416. package/dist/NumberFilter-MAEojdk0.cjs +0 -1
  417. package/dist/PeriodFilter-CC4WgIhl.cjs +0 -1
  418. package/dist/SelectFilter-BR3fvl-a.cjs +0 -1
  419. package/dist/TextFilter-CCfYFl5F.cjs +0 -1
  420. package/dist/apLightTheme-CFSRrjv2.cjs +0 -1
  421. package/dist/composables/date/useDateFormat.d.ts +0 -26
  422. package/dist/composables/date/useDateInitialization.d.ts +0 -18
  423. package/dist/design-system-v3.umd.cjs +0 -1
  424. package/dist/designTokens/utils/convertGaps.d.ts +0 -5
  425. package/dist/main-C1e3eoxd.cjs +0 -1067
  426. package/dist/tooth-11-D3sLWv2n.cjs +0 -1
  427. package/dist/tooth-12-CXrLuH03.cjs +0 -1
  428. package/dist/tooth-13-BSfo5fpT.cjs +0 -1
  429. package/dist/tooth-14-DMzulx0h.cjs +0 -1
  430. package/dist/tooth-15-BKRFVi-9.cjs +0 -1
  431. package/dist/tooth-16-CpuxAbuM.cjs +0 -1
  432. package/dist/tooth-17-BPoahUdg.cjs +0 -1
  433. package/dist/tooth-18-DhHJz8sy.cjs +0 -1
  434. package/dist/tooth-21-Dgd5hn_X.cjs +0 -1
  435. package/dist/tooth-22-C2Tn19sB.cjs +0 -1
  436. package/dist/tooth-23-C9uaaSGb.cjs +0 -1
  437. package/dist/tooth-24-BrK9UGpf.cjs +0 -1
  438. package/dist/tooth-25-CE_EfGNp.cjs +0 -1
  439. package/dist/tooth-26-Ctv4i9Fy.cjs +0 -1
  440. package/dist/tooth-27-C5J7JkWM.cjs +0 -1
  441. package/dist/tooth-28-Z9oWqjo0.cjs +0 -1
  442. package/dist/tooth-31-BrYqmkTi.cjs +0 -1
  443. package/dist/tooth-32-BNNR0oCZ.cjs +0 -1
  444. package/dist/tooth-33-DuxvqO2J.cjs +0 -1
  445. package/dist/tooth-34-BCSCXMB6.cjs +0 -1
  446. package/dist/tooth-35-BLUXkX88.cjs +0 -1
  447. package/dist/tooth-36-IrKHYqlA.cjs +0 -1
  448. package/dist/tooth-37-BYqpdMwo.cjs +0 -1
  449. package/dist/tooth-38-B_eNXXdu.cjs +0 -1
  450. package/dist/tooth-41-Ddva4Ot8.cjs +0 -1
  451. package/dist/tooth-42-szcDqlM0.cjs +0 -1
  452. package/dist/tooth-43-B3ka6rQm.cjs +0 -1
  453. package/dist/tooth-44-CazyQucj.cjs +0 -1
  454. package/dist/tooth-45-B4HQtc8n.cjs +0 -1
  455. package/dist/tooth-46-BPM40gbG.cjs +0 -1
  456. package/dist/tooth-47-Dvr20dlh.cjs +0 -1
  457. package/dist/tooth-48-Bd8ljGsF.cjs +0 -1
  458. package/dist/tooth-51-OBpwCOF3.cjs +0 -1
  459. package/dist/tooth-52-aKxyHcmq.cjs +0 -1
  460. package/dist/tooth-53-vCwJjTOc.cjs +0 -1
  461. package/dist/tooth-54-DsWu2iFy.cjs +0 -1
  462. package/dist/tooth-55-BxC1X2Dn.cjs +0 -1
  463. package/dist/tooth-61-BbLvxMQi.cjs +0 -1
  464. package/dist/tooth-62-CmTkWczP.cjs +0 -1
  465. package/dist/tooth-63-DI7l_2qI.cjs +0 -1
  466. package/dist/tooth-64-B21sOsJh.cjs +0 -1
  467. package/dist/tooth-65-D2ZC2VEr.cjs +0 -1
  468. package/dist/tooth-71-D473PPO5.cjs +0 -1
  469. package/dist/tooth-72-Drh1wnNu.cjs +0 -1
  470. package/dist/tooth-73-DzlwYI23.cjs +0 -1
  471. package/dist/tooth-74-8aGvcZPg.cjs +0 -1
  472. package/dist/tooth-75-BFK7At_r.cjs +0 -1
  473. package/dist/tooth-81-BZmR-I0M.cjs +0 -1
  474. package/dist/tooth-82-euVfUUZV.cjs +0 -1
  475. package/dist/tooth-83-KV010j64.cjs +0 -1
  476. package/dist/tooth-84-BBg1RjhZ.cjs +0 -1
  477. package/dist/tooth-85-Cr-kc1wM.cjs +0 -1
  478. package/dist/vuetifyConfig.umd.cjs +0 -1
  479. package/src/assets/apTokens.scss +0 -343
  480. package/src/assets/overrides/_container.scss +0 -36
  481. package/src/assets/tokens.scss +0 -388
  482. package/src/composables/date/tests/useDateFormat.spec.ts +0 -67
  483. package/src/composables/date/useDateFormat.ts +0 -110
  484. package/src/composables/date/useDateInitialization.ts +0 -92
  485. package/src/designTokens/apColors.md +0 -66
  486. package/src/designTokens/cnamColors.md +0 -193
  487. package/src/designTokens/paColors.md +0 -66
  488. package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
  489. package/src/designTokens/tokens/json/primitives.json +0 -209
  490. package/src/designTokens/tokens/json/semantic.json +0 -120
  491. package/src/designTokens/utils/convertGaps.ts +0 -11
  492. package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
  493. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
@@ -12,7 +12,7 @@
12
12
  import {
13
13
  useDateInitialization,
14
14
  type DateInput,
15
- type DateValue,
15
+ type DateModelValue,
16
16
  } from '@/composables/date/useDateInitializationDayjs'
17
17
  import {
18
18
  useAsteriskDisplay,
@@ -130,6 +130,7 @@
130
130
  defineProps<{
131
131
  autoClamp?: boolean
132
132
  bgColor?: string
133
+ /** @deprecated Utilisez isBirthDate à la place */
133
134
  birthDate?: boolean
134
135
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- sorry
135
136
  customRules?: { type: string, options: any }[]
@@ -212,12 +213,12 @@
212
213
  )
213
214
 
214
215
  const emit = defineEmits<{
215
- (e: 'update:modelValue', value: DateValue): void
216
+ (e: 'update:modelValue', value: DateModelValue): void
216
217
  (e: 'closed'): void
217
218
  (e: 'focus'): void
218
219
  (e: 'blur'): void
219
220
  (e: 'input', value: string): void
220
- (e: 'date-selected', value: DateValue): void
221
+ (e: 'date-selected', value: DateModelValue): void
221
222
  }>()
222
223
 
223
224
  /**
@@ -313,14 +314,14 @@
313
314
  emitFocus: () => emit('focus'),
314
315
  })
315
316
 
316
- const updateModel = (value: DateValue) => {
317
+ const updateModel = (value: DateModelValue) => {
317
318
  // Prevent redundant emits
318
319
  if (JSON.stringify(value) === JSON.stringify(props.modelValue)) return
319
320
  withInternalUpdate(() => emit('update:modelValue', value))
320
321
  }
321
322
 
322
323
  // Keep and expose this so consumers can listen to `date-selected`
323
- const handleDateSelected = (value: DateValue) => {
324
+ const handleDateSelected = (value: DateModelValue) => {
324
325
  if (props.readonly) return
325
326
 
326
327
  // 1) Update v-model
@@ -334,7 +335,12 @@
334
335
  const dateObjects = value
335
336
  .map(dateStr => parseDate(dateStr, returnFormat.value))
336
337
  .filter(Boolean) as Date[]
337
- selectedDates.value = dateObjects
338
+ if (props.displayRange && dateObjects.length >= 2) {
339
+ selectedDates.value = dateSelectionResult.generateDateRange(dateObjects[0]!, dateObjects[dateObjects.length - 1]!)
340
+ }
341
+ else {
342
+ selectedDates.value = dateObjects
343
+ }
338
344
  }
339
345
  else {
340
346
  const dateObject = parseDate(value, returnFormat.value)
@@ -390,6 +396,7 @@
390
396
  initializeSelectedDates,
391
397
  validateDates,
392
398
  updateModel,
399
+ generateDateRange: dateSelectionResult.generateDateRange,
393
400
  })
394
401
 
395
402
  // Display helpers (centralised in useDatePickerState)
@@ -703,7 +710,7 @@
703
710
  validateField: (value, rules, warningRules) =>
704
711
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- sorry
705
712
  validateField(value, rules as any[], warningRules as any[]),
706
- updateModel: value => updateModel(value as DateValue),
713
+ updateModel: value => updateModel(value as DateModelValue),
707
714
  emitInput: value => emit('input', value),
708
715
  inputRef: dateCalendarTextInputRef as Ref<ComponentPublicInstance | null>,
709
716
  })
@@ -772,7 +779,7 @@
772
779
  const startDate = parseDate(startDateStr, props.format)
773
780
  const endDate = parseDate(endDateStr, props.format)
774
781
  if (startDate && endDate) {
775
- selectedDates.value = [startDate, endDate]
782
+ selectedDates.value = dateSelectionResult.generateDateRange(startDate, endDate)
776
783
  validateDates()
777
784
  }
778
785
  }
@@ -842,7 +849,7 @@
842
849
  /**
843
850
  * Gère les mises à jour de DateTextInput avec contrôle
844
851
  */
845
- const handleDateTextInputUpdate = (value: DateValue) => {
852
+ const handleDateTextInputUpdate = (value: DateModelValue) => {
846
853
  // Ne pas traiter les mises à jour internes pour éviter les boucles
847
854
  if (isUpdatingFromInternal.value) return
848
855
 
@@ -866,7 +873,7 @@
866
873
  const endDate = endStr ? parseDate(endStr, rf) || parseDate(endStr, props.format) : null
867
874
 
868
875
  if (startDate && endDate) {
869
- selectedDates.value = [startDate, endDate]
876
+ selectedDates.value = dateSelectionResult.generateDateRange(startDate, endDate)
870
877
  displayFormattedDate.value
871
878
  = `${formatDate(startDate, props.format)} - ${formatDate(endDate, props.format)}`
872
879
  }
@@ -1222,8 +1229,6 @@
1222
1229
  </template>
1223
1230
 
1224
1231
  <style lang="scss" scoped>
1225
- @use '@/assets/tokens';
1226
-
1227
1232
  .date-picker-title {
1228
1233
  display: block;
1229
1234
  text-transform: lowercase;
@@ -1249,7 +1254,7 @@
1249
1254
  /* Style pour les jours fériés */
1250
1255
  :deep(.holiday-day) {
1251
1256
  background-color: rgb(255 193 7 / 10%);
1252
- border: 2px dotted tokens.$neutral-black;
1257
+ border: 2px dotted rgb(var(--v-theme-grey-darken60));
1253
1258
  border-radius: 50%;
1254
1259
  }
1255
1260
 
@@ -1268,45 +1273,45 @@
1268
1273
  .v-messages__message--success {
1269
1274
  :deep(.v-input__control),
1270
1275
  :deep(.v-messages__message) {
1271
- color: tokens.$colors-text-success !important;
1276
+ color: rgb(var(--v-theme-textSuccess)) !important;
1272
1277
 
1273
1278
  --v-medium-emphasis-opacity: 1;
1274
1279
  }
1275
1280
 
1276
1281
  .v-field--active & {
1277
- color: tokens.$colors-border-success !important;
1282
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1278
1283
  }
1279
1284
  }
1280
1285
 
1281
1286
  .v-messages__message--error {
1282
1287
  :deep(.v-input__control),
1283
1288
  :deep(.v-messages__message) {
1284
- color: tokens.$colors-text-error !important;
1289
+ color: rgb(var(--v-theme-textError)) !important;
1285
1290
  }
1286
1291
 
1287
1292
  .v-field--active & {
1288
- color: tokens.$colors-border-error !important;
1293
+ color: rgb(var(--v-theme-borderError)) !important;
1289
1294
  }
1290
1295
  }
1291
1296
 
1292
1297
  .v-messages__message--warning {
1293
1298
  :deep(.v-input__control) {
1294
- color: tokens.$colors-text-warning !important;
1299
+ color: rgb(var(--v-theme-textWarning)) !important;
1295
1300
 
1296
1301
  --v-medium-emphasis-opacity: 1;
1297
1302
  }
1298
1303
 
1299
1304
  :deep(.v-messages__message) {
1300
- color: tokens.$colors-text-warning !important;
1305
+ color: rgb(var(--v-theme-textWarning)) !important;
1301
1306
  }
1302
1307
 
1303
1308
  .v-field--active & {
1304
- color: tokens.$colors-text-warning !important;
1309
+ color: rgb(var(--v-theme-textWarning)) !important;
1305
1310
  }
1306
1311
  }
1307
1312
 
1308
1313
  :deep(.v-btn__content) {
1309
- font-size: tokens.$font-size-body-text + 3;
1314
+ font-size: var(--v-fontSize-corpsDeTexte) + 3;
1310
1315
  font-weight: bold;
1311
1316
  }
1312
1317
 
@@ -1337,7 +1342,7 @@
1337
1342
  }
1338
1343
 
1339
1344
  :deep(.v-date-picker-month__day .v-btn:hover) {
1340
- background-color: tokens.$colors-background-main;
1345
+ background-color: rgb(var(--v-theme-backgroundMain));
1341
1346
  }
1342
1347
 
1343
1348
  :deep(.v-date-picker-month__day--selected, .v-date-picker-month__day--adjacent) {
@@ -1345,7 +1350,7 @@
1345
1350
  }
1346
1351
 
1347
1352
  :deep(.v-date-picker-month__day--selected .v-btn:hover) {
1348
- background-color: tokens.$colors-background-accent-primary-contrasted !important;
1353
+ background-color: rgb(var(--v-theme-backgroundAccentContrasted)) !important;
1349
1354
  }
1350
1355
 
1351
1356
  :deep(.weekend .v-date-picker-month__day--week-end .v-btn) {
@@ -157,7 +157,30 @@ describe('ComplexDatePicker.clean', () => {
157
157
  expect(wrapper.vm.selectedDates).not.toBeNull()
158
158
 
159
159
  const input = wrapper.find('input')
160
- expect((input.element as HTMLInputElement).value).toBe('01/01/2025 - ')
160
+ expect((input.element as HTMLInputElement).value).toBe('01/01/2025 - 10/01/2025')
161
+ })
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')
161
184
  })
162
185
 
163
186
  it('formatDateInput formats raw digits according to the format and computes cursor position', () => {
@@ -76,7 +76,7 @@ ValidationExamples.parameters = {
76
76
  <script setup>
77
77
  import { computed, ref, watch } from 'vue';vue'
78
78
  import DatePicker from '@/components/DatePicker/CalendarMode/DatePicker.vue'
79
- import { useDateFormat } from '@/composables/date/useDateFormat';vue'
79
+ import { useDateFormat } from '@/composables/date/useDateFormatDayjs'
80
80
 
81
81
  // Exemple 1: Validation de base (required)
82
82
  const date1 = ref('')
@@ -16,7 +16,7 @@
16
16
  import { useValidatable } from '@/composables/validation/useValidatable'
17
17
  import { useDateFormat } from '@/composables/date/useDateFormatDayjs'
18
18
  import { DATE_PICKER_MESSAGES } from '../constants/messages'
19
- import type { DateValue } from '@/composables/date/useDateInitializationDayjs'
19
+ import type { DateModelValue } from '@/composables/date/useDateInitializationDayjs'
20
20
  import type { DateObjectValue } from '../types'
21
21
 
22
22
  dayjs.extend(customParseFormat)
@@ -40,7 +40,7 @@
40
40
  isOutlined?: boolean
41
41
  isValidateOnBlur?: boolean
42
42
  label: string
43
- modelValue?: DateValue
43
+ modelValue?: DateModelValue
44
44
  noIcon?: boolean
45
45
  persistentHint?: boolean
46
46
  placeholder?: string
@@ -77,11 +77,11 @@
77
77
  })
78
78
 
79
79
  const emit = defineEmits<{
80
- (e: 'update:model-value', value: DateValue): void
80
+ (e: 'update:model-value', value: DateModelValue): void
81
81
  (e: 'focus'): void
82
82
  (e: 'blur'): void
83
83
  (e: 'input', value: string): void
84
- (e: 'date-selected', value: DateValue): void
84
+ (e: 'date-selected', value: DateModelValue): void
85
85
  }>()
86
86
 
87
87
  /**
@@ -111,6 +111,7 @@
111
111
  errors: ref<string[]>([]),
112
112
  warnings: ref<string[]>([]),
113
113
  successes: ref<string[]>([]),
114
+ displaySuccesses: computed(() => []),
114
115
  hasError: ref(false),
115
116
  clearValidation: () => {},
116
117
  validateField: () => ({
@@ -153,7 +154,8 @@
153
154
  // Agrégation des erreurs internes et externes
154
155
  const errorMessages = computed(() => [...errors.value, ...props.externalErrorMessages])
155
156
  const warningMessages = warnings
156
- const successMessages = successes
157
+ const displaySuccesses = computed(() => (validationApi.value as typeof baseValidation).displaySuccesses?.value ?? [])
158
+ const successMessages = displaySuccesses
157
159
 
158
160
  /**
159
161
  * Safe validate utility
@@ -576,7 +578,7 @@
576
578
  return formatDate(date, returnFormat.value)
577
579
  }
578
580
 
579
- function emitModel(val: DateValue) {
581
+ function emitModel(val: DateModelValue) {
580
582
  emit('update:model-value', val)
581
583
  }
582
584
 
@@ -688,12 +690,31 @@
688
690
 
689
691
  if (formatValidationResult.isValid && !customRulesValidationResult.hasError && !isRange.value) {
690
692
  const parsedDate = dayjs(inputValue.value, displayFormat.value, true).toDate()
693
+ // Guard isFormatting to prevent the modelValue watcher from
694
+ // rewriting inputValue in reaction to our own emit.
695
+ isFormatting.value = true
691
696
  emitModel(returnFormat.value !== displayFormat.value ? dayjs(parsedDate).format(returnFormat.value) : inputValue.value)
692
697
  }
693
698
  else if (formatValidationResult.isValid && !customRulesValidationResult.hasError && isRange.value) {
694
699
  if (typeof inputValue.value === 'string' && inputValue.value.includes(' - ')) {
695
700
  const dateRangeParts = inputValue.value.split(' - ')
696
- if (dateRangeParts.length === 2) emitModel([dateRangeParts[0]!, dateRangeParts[1]!])
701
+ if (dateRangeParts.length === 2) {
702
+ const sd = dayjs(dateRangeParts[0]!, displayFormat.value, true)
703
+ const ed = dayjs(dateRangeParts[1]!, displayFormat.value, true)
704
+ // Guard isFormatting to prevent the modelValue watcher from
705
+ // rewriting inputValue in reaction to our own emit.
706
+ isFormatting.value = true
707
+ if (sd.isValid() && ed.isValid()) {
708
+ const emittedRange: [string, string] = [
709
+ returnFormat.value !== displayFormat.value ? sd.format(returnFormat.value) : dateRangeParts[0]!,
710
+ returnFormat.value !== displayFormat.value ? ed.format(returnFormat.value) : dateRangeParts[1]!,
711
+ ]
712
+ emitModel(emittedRange)
713
+ }
714
+ else {
715
+ emitModel([dateRangeParts[0]!, dateRangeParts[1]!])
716
+ }
717
+ }
697
718
  else emitModel(inputValue.value)
698
719
  }
699
720
  else emitModel(inputValue.value)
@@ -701,29 +722,40 @@
701
722
  else {
702
723
  runRules(inputValue.value)
703
724
  if (!props.disableErrorHandling && formatValidationResult.message) errors.value.push(formatValidationResult.message)
704
- // Only emit null for format errors, not for custom rule errors
705
- if (!formatValidationResult.isValid) {
706
- emitModel(null)
707
- }
708
- // For custom rule errors with valid format, keep the current value
725
+ // Keep the invalid input visible so the user can correct it.
726
+ // Do NOT emit null — that would trigger the modelValue watcher
727
+ // which clears inputValue and hides the error message.
728
+ return
709
729
  }
710
730
  }
711
731
 
712
732
  // autoClamp au blur
713
- if (props.autoClamp) inputValue.value = clampIfNeeded(inputValue.value)
733
+ if (props.autoClamp) {
734
+ const clamped = clampIfNeeded(inputValue.value)
735
+ if (clamped !== inputValue.value) {
736
+ inputValue.value = clamped
714
737
 
715
- // Sync model après clamp
716
- if (isRange.value) {
717
- const [startDate, endDate] = parseRangeInput(inputValue.value)
718
- if (startDate && endDate) emitModel([toReturnFormat(startDate), toReturnFormat(endDate)])
719
- else if (startDate) emit('date-selected', toReturnFormat(startDate))
720
- }
721
- else {
722
- const parsedDate = parseDate(inputValue.value, displayFormat.value)
723
- if (parsedDate) emitModel(returnFormat.value !== displayFormat.value ? toReturnFormat(parsedDate) : formatDate(parsedDate, displayFormat.value))
738
+ // Sync model après clamp uniquement si la valeur a changé
739
+ isFormatting.value = true
740
+ if (isRange.value) {
741
+ const [startDate, endDate] = parseRangeInput(inputValue.value)
742
+ if (startDate && endDate) emitModel([toReturnFormat(startDate), toReturnFormat(endDate)])
743
+ else if (startDate) emit('date-selected', toReturnFormat(startDate))
744
+ }
745
+ else {
746
+ const parsedDate = parseDate(inputValue.value, displayFormat.value)
747
+ if (parsedDate) emitModel(returnFormat.value !== displayFormat.value ? toReturnFormat(parsedDate) : formatDate(parsedDate, displayFormat.value))
748
+ }
749
+ }
724
750
  }
725
751
 
726
752
  runRules(inputValue.value)
753
+
754
+ // Release isFormatting after the current microtask so that
755
+ // the modelValue watcher (triggered synchronously by emitModel)
756
+ // stays blocked, but future external changes are allowed.
757
+ await nextTick()
758
+ isFormatting.value = false
727
759
  }
728
760
 
729
761
  /**
@@ -1092,7 +1124,9 @@
1092
1124
  :readonly="props.readonly"
1093
1125
  :variant-style="props.isOutlined ? 'outlined' : 'underlined'"
1094
1126
  :warning-messages="warningMessages"
1095
- :success-messages="props.showSuccessMessages ? successMessages : []"
1127
+ :success-messages="successMessages"
1128
+ :has-success="isOnSuccess"
1129
+ :show-success-messages="props.showSuccessMessages"
1096
1130
  :bg-color="props.bgColor"
1097
1131
  color="primary"
1098
1132
  :is-clearable="!props.readonly"
@@ -1110,8 +1144,6 @@
1110
1144
  </template>
1111
1145
 
1112
1146
  <style lang="scss" scoped>
1113
- @use '@/assets/tokens';
1114
-
1115
1147
  :deep(.v-icon__svg) { cursor: default; }
1116
1148
 
1117
1149
  .warning-field {
@@ -1122,10 +1154,10 @@
1122
1154
  }
1123
1155
 
1124
1156
  :deep(.v-field) {
1125
- color: tokens.$colors-border-warning !important;
1157
+ color: rgb(var(--v-theme-borderWarning)) !important;
1126
1158
 
1127
1159
  .v-field__outline {
1128
- color: tokens.$colors-border-warning !important;
1160
+ color: rgb(var(--v-theme-borderWarning)) !important;
1129
1161
  }
1130
1162
  }
1131
1163
 
@@ -1133,7 +1165,7 @@
1133
1165
  opacity: 1 !important;
1134
1166
 
1135
1167
  .v-messages__message {
1136
- color: tokens.$colors-border-warning !important;
1168
+ color: rgb(var(--v-theme-borderWarning)) !important;
1137
1169
  }
1138
1170
  }
1139
1171
  }
@@ -1141,11 +1173,11 @@
1141
1173
  .error-field {
1142
1174
  :deep(.v-input__control),
1143
1175
  :deep(.v-messages__message) {
1144
- color: tokens.$colors-text-error !important;
1176
+ color: rgb(var(--v-theme-textError)) !important;
1145
1177
  }
1146
1178
 
1147
1179
  .v-field--active & {
1148
- color: tokens.$colors-border-error !important;
1180
+ color: rgb(var(--v-theme-borderError)) !important;
1149
1181
  }
1150
1182
  }
1151
1183
 
@@ -1157,10 +1189,10 @@
1157
1189
  }
1158
1190
 
1159
1191
  :deep(.v-field) {
1160
- color: tokens.$colors-border-success !important;
1192
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1161
1193
 
1162
1194
  .v-field__outline {
1163
- color: tokens.$colors-border-success !important;
1195
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1164
1196
  }
1165
1197
  }
1166
1198
 
@@ -1168,7 +1200,7 @@
1168
1200
  opacity: 1 !important;
1169
1201
 
1170
1202
  .v-messages__message {
1171
- color: tokens.$colors-border-success !important;
1203
+ color: rgb(var(--v-theme-borderSuccess)) !important;
1172
1204
  }
1173
1205
  }
1174
1206
  }
@@ -196,7 +196,7 @@ const meta = {
196
196
  },
197
197
  'birthDate': {
198
198
  control: 'boolean',
199
- description: 'Alias pour isBirthDate (pour compatibilité avec l\'attribut kebab-case birth-date dans les templates). ⚠️ Utiliser soit birthDate soit isBirthDate, mais pas les deux.',
199
+ description: '⚠️ **DEPRECATED** Utilisez `isBirthDate` à la place.',
200
200
  defaultValue: false,
201
201
  },
202
202
  'isBirthDate': {
@@ -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
+ })
@@ -1,5 +1,6 @@
1
1
  import { computed, ref, watch, type Ref, type ComputedRef } from 'vue'
2
- import type { DateInput, DateValue } from '@/composables/date/useDateInitializationDayjs'
2
+ import type { DateInput, DateModelValue } from '@/composables/date/useDateInitializationDayjs'
3
+ import { DATE_PICKER_MESSAGES } from '../constants/messages'
3
4
 
4
5
  export interface UseDatePickerStateOptions {
5
6
  selectedDates: Ref<Date | (Date | null)[] | null>
@@ -11,7 +12,8 @@ export interface UseDatePickerStateOptions {
11
12
  formatDate: (date: Date | null, format: string) => string
12
13
  initializeSelectedDates: (value: DateInput | null, format: string, dateFormatReturn?: string) => Date | (Date | null)[] | null
13
14
  validateDates: (forceValidation?: boolean) => void
14
- updateModel: (value: DateValue) => void
15
+ updateModel: (value: DateModelValue) => void
16
+ generateDateRange?: (start: Date, end: Date) => Date[]
15
17
  }
16
18
 
17
19
  export interface UseDatePickerStateResult {
@@ -19,7 +21,7 @@ export interface UseDatePickerStateResult {
19
21
  rangeBoundaryDates?: Ref<[Date | null, Date | null] | null>
20
22
  textInputValue: Ref<string>
21
23
  displayFormattedDate: Ref<string>
22
- formattedDate: Ref<DateValue>
24
+ formattedDate: Ref<DateModelValue>
23
25
  displayFormattedFromSelectedDates: ComputedRef<string | null>
24
26
  syncFromModelValue: (newValue: DateInput | undefined) => void
25
27
  syncTextInputFromSelection: () => void
@@ -37,12 +39,13 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
37
39
  initializeSelectedDates,
38
40
  validateDates,
39
41
  // updateModel,
42
+ generateDateRange,
40
43
  } = options
41
44
 
42
45
  const textInputValue = ref('')
43
46
  const displayFormattedDate = ref('')
44
47
 
45
- const formattedDate = computed<DateValue>(() => {
48
+ const formattedDate = computed<DateModelValue>(() => {
46
49
  if (!selectedDates.value) return ''
47
50
  const rf = dateFormatReturn || format
48
51
 
@@ -71,7 +74,7 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
71
74
 
72
75
  if (Array.isArray(selectedDates.value)) {
73
76
  if (selectedDates.value.length >= 2) {
74
- return `${formatDate(selectedDates.value[0]!, format)} - ${formatDate(
77
+ return `${formatDate(selectedDates.value[0]!, format)}${DATE_PICKER_MESSAGES.RANGE_SEPARATOR}${formatDate(
75
78
  selectedDates.value[selectedDates.value.length - 1]!,
76
79
  format,
77
80
  )}`
@@ -89,7 +92,17 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
89
92
  textInputValue.value = ''
90
93
  return
91
94
  }
92
- if (typeof newValue === 'string') {
95
+ if (Array.isArray(newValue) && newValue.length === 2) {
96
+ // Mode plage : afficher "startDate - endDate" dans l'input
97
+ const startStr = dateFormatReturn
98
+ ? formatDate(parseDate(newValue[0]!, dateFormatReturn), format)
99
+ : newValue[0]!
100
+ const endStr = dateFormatReturn
101
+ ? formatDate(parseDate(newValue[1]!, dateFormatReturn), format)
102
+ : newValue[1]!
103
+ textInputValue.value = `${startStr}${DATE_PICKER_MESSAGES.RANGE_SEPARATOR}${endStr}`
104
+ }
105
+ else if (typeof newValue === 'string') {
93
106
  if (dateFormatReturn) {
94
107
  const date = parseDate(newValue, dateFormatReturn)
95
108
  if (date) {
@@ -115,17 +128,35 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
115
128
  }
116
129
 
117
130
  selectedDates.value = initializeSelectedDates(newValue ?? null, format, dateFormatReturn)
131
+
132
+ if (displayRange && Array.isArray(selectedDates.value) && selectedDates.value.length === 2) {
133
+ const startDate = selectedDates.value[0]
134
+ const endDate = selectedDates.value[1]
135
+ if (startDate && endDate && generateDateRange) {
136
+ // Regenerate intermediate dates for Vuetify range selection
137
+ selectedDates.value = generateDateRange(startDate, endDate)
138
+ }
139
+ }
140
+
118
141
  if (selectedDates.value) {
119
- const firstDate = Array.isArray(selectedDates.value)
120
- ? selectedDates.value[0]
121
- : selectedDates.value
122
- if (firstDate) {
123
- const formattedForInput = formatDate(firstDate, format)
124
- textInputValue.value = formattedForInput
142
+ if (displayRange && Array.isArray(selectedDates.value) && selectedDates.value.length >= 2) {
143
+ const startDate = selectedDates.value[0]
144
+ const endDate = selectedDates.value[selectedDates.value.length - 1]
145
+ if (startDate && endDate) {
146
+ textInputValue.value = `${formatDate(startDate, format)}${DATE_PICKER_MESSAGES.RANGE_SEPARATOR}${formatDate(endDate, format)}`
147
+ }
148
+ }
149
+ else {
150
+ const firstDate = Array.isArray(selectedDates.value)
151
+ ? selectedDates.value[0]
152
+ : selectedDates.value
153
+ if (firstDate) {
154
+ textInputValue.value = formatDate(firstDate, format)
155
+ }
125
156
  }
126
157
  if (Array.isArray(formattedDate.value)) {
127
158
  // Pour les plages, formater avec le séparateur standard " - "
128
- displayFormattedDate.value = formattedDate.value.join(' - ')
159
+ displayFormattedDate.value = formattedDate.value.join(DATE_PICKER_MESSAGES.RANGE_SEPARATOR)
129
160
  }
130
161
  else {
131
162
  displayFormattedDate.value = (formattedDate.value as string) || ''
@@ -141,6 +172,18 @@ export const useDatePickerState = (options: UseDatePickerStateOptions): UseDateP
141
172
  return
142
173
  }
143
174
 
175
+ if (displayRange && Array.isArray(value) && value.length >= 2) {
176
+ const startDate = value[0]
177
+ const endDate = value[value.length - 1]
178
+ if (startDate && endDate) {
179
+ const formattedForInput = `${formatDate(startDate, format)}${DATE_PICKER_MESSAGES.RANGE_SEPARATOR}${formatDate(endDate, format)}`
180
+ if (textInputValue.value !== formattedForInput) {
181
+ textInputValue.value = formattedForInput
182
+ }
183
+ return
184
+ }
185
+ }
186
+
144
187
  const firstDate = Array.isArray(value) ? (value[0] ?? null) : value
145
188
  if (!firstDate) return
146
189
 
@@ -2,6 +2,7 @@ import { ref, computed } from 'vue'
2
2
  import dayjs from 'dayjs'
3
3
  import customParseFormat from 'dayjs/plugin/customParseFormat'
4
4
  import { extractRangeParts as extractRangePartsUtil, hasRangeSeparator as hasRangeSeparatorUtil, isValidDateRange } from '../utils/dateFormattingUtils'
5
+ import { DATE_PICKER_MESSAGES } from '../constants/messages'
5
6
 
6
7
  // Initialiser les plugins dayjs
7
8
  dayjs.extend(customParseFormat)
@@ -23,7 +24,7 @@ export function useDateRangeInput(
23
24
  // Stockage temporaire pour la deuxième date saisie
24
25
  const secondDate = ref<Date | null>(null)
25
26
  // Séparateur de plage
26
- const rangeSeparator = ' - '
27
+ const rangeSeparator = DATE_PICKER_MESSAGES.RANGE_SEPARATOR
27
28
 
28
29
  /**
29
30
  * Vérifie si une chaîne de caractères contient un séparateur de plage