@cnamts/synapse 1.0.0 → 1.0.2

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 (533) hide show
  1. package/README.md +1 -1
  2. package/dist/DateFilter-YWOTbfeL.js +98 -0
  3. package/dist/NumberFilter-DMmMgALM.js +121 -0
  4. package/dist/PeriodFilter-Bok5BHcn.js +112 -0
  5. package/dist/SelectFilter-BKud2WhN.js +136 -0
  6. package/dist/TextFilter-DvMf2thH.js +114 -0
  7. package/dist/{components/BackBtn → common}/constants/ExpertiseLevelEnum.d.ts +3 -0
  8. package/dist/components/Accordion/Accordion.d.ts +2 -1
  9. package/dist/components/Accordion/composables/useAccordionGroupCommunication.d.ts +5 -0
  10. package/dist/components/Accordion/composables/useAccordionKeyboardNavigation.d.ts +12 -0
  11. package/dist/components/Accordion/composables/useAccordionState.d.ts +13 -0
  12. package/dist/components/BackBtn/AccessibiliteItems.d.ts +1 -1
  13. package/dist/components/BackToTopBtn/AccessibiliteItems.d.ts +1 -1
  14. package/dist/components/ChipList/AccessibiliteItems.d.ts +1 -1
  15. package/dist/components/CollapsibleList/AccessibiliteItems.d.ts +1 -1
  16. package/dist/components/ContextualMenu/AccessibiliteItems.d.ts +1 -1
  17. package/dist/components/CookieBanner/AccessibiliteItems.d.ts +1 -1
  18. package/dist/components/CopyBtn/AccessibiliteItems.d.ts +1 -1
  19. package/dist/components/Customs/SyBtnSelect/AccessibiliteItems.d.ts +1 -1
  20. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +85 -0
  21. package/dist/components/Customs/SyInputSelect/AccessibiliteItems.d.ts +1 -1
  22. package/dist/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
  23. package/dist/components/Customs/SySelect/AccessibiliteItems.d.ts +1 -1
  24. package/dist/components/Customs/SySelect/SySelect.d.ts +33 -13
  25. package/dist/components/Customs/SyTextField/AccessibiliteItems.d.ts +1 -1
  26. package/dist/components/Customs/SyTextField/SyTextField.d.ts +2 -2
  27. package/dist/components/DataList/AccessibiliteItems.d.ts +1 -1
  28. package/dist/components/DataListGroup/AccessibiliteItems.d.ts +1 -1
  29. package/dist/components/DatePicker/AccessibiliteItems.d.ts +1 -1
  30. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +4295 -0
  31. package/dist/components/DatePicker/{DatePicker.d.ts → DatePicker/DatePicker.d.ts} +158 -104
  32. package/dist/components/DatePicker/{DateTextInput.d.ts → DateTextInput/DateTextInput.d.ts} +35 -27
  33. package/dist/components/DatePicker/composables/index.d.ts +17 -0
  34. package/dist/components/DatePicker/composables/useAsteriskDisplay.d.ts +14 -0
  35. package/dist/components/DatePicker/composables/useDateAutoClamp.d.ts +16 -0
  36. package/dist/components/DatePicker/composables/useDateFormatValidation.d.ts +25 -0
  37. package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +33 -0
  38. package/dist/components/DatePicker/composables/useDatePickerViewMode.d.ts +16 -0
  39. package/dist/components/DatePicker/composables/useDatePickerVisibility.d.ts +27 -0
  40. package/dist/components/DatePicker/composables/useDateRangeInput.d.ts +29 -0
  41. package/dist/components/DatePicker/composables/useDateRangeValidation.d.ts +11 -0
  42. package/dist/components/DatePicker/composables/useDateSelection.d.ts +10 -0
  43. package/dist/components/DatePicker/composables/useDateValidation.d.ts +35 -0
  44. package/dist/components/DatePicker/composables/useDisplayedDateString.d.ts +19 -0
  45. package/dist/components/DatePicker/composables/useIconState.d.ts +17 -0
  46. package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +31 -0
  47. package/dist/components/DatePicker/composables/useInputHandler.d.ts +32 -0
  48. package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +33 -0
  49. package/dist/components/DatePicker/composables/useMonthButtonCustomization.d.ts +12 -0
  50. package/dist/components/DatePicker/composables/useTodayButton.d.ts +16 -0
  51. package/dist/components/DatePicker/composables/useWeekendDays.d.ts +11 -0
  52. package/dist/components/DatePicker/constants/messages.d.ts +29 -0
  53. package/dist/components/DatePicker/types.d.ts +13 -0
  54. package/dist/components/DialogBox/AccessibiliteItems.d.ts +1 -1
  55. package/dist/components/DownloadBtn/AccessibiliteItems.d.ts +1 -1
  56. package/dist/components/ErrorPage/AccessibiliteItems.d.ts +1 -1
  57. package/dist/components/ExternalLinks/AccessibiliteItems.d.ts +1 -1
  58. package/dist/components/FileList/AccessibiliteItems.d.ts +1 -1
  59. package/dist/components/FilePreview/AccessibiliteItems.d.ts +1 -1
  60. package/dist/components/FileUpload/AccessibiliteItems.d.ts +1 -1
  61. package/dist/components/FilterInline/AccessibiliteItems.d.ts +1 -1
  62. package/dist/components/FilterSideBar/AccessibiliteItems.d.ts +1 -1
  63. package/dist/components/FilterSideBar/FilterSideBar.d.ts +395 -1
  64. package/dist/components/FooterBar/AccessibiliteItems.d.ts +1 -1
  65. package/dist/components/FranceConnectBtn/AccessibiliteItems.d.ts +1 -1
  66. package/dist/components/HeaderBar/AccessibiliteItems.d.ts +1 -1
  67. package/dist/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.d.ts +1 -1
  68. package/dist/components/HeaderLoading/AccessibiliteItems.d.ts +1 -1
  69. package/dist/components/HeaderToolbar/AccessibiliteItems.d.ts +1 -1
  70. package/dist/components/LangBtn/AccessibiliteItems.d.ts +1 -1
  71. package/dist/components/Logo/AccessibiliteItems.d.ts +1 -1
  72. package/dist/components/LogoBrandSection/AccessibiliteItems.d.ts +1 -1
  73. package/dist/components/MaintenancePage/AccessibiliteItems.d.ts +1 -1
  74. package/dist/components/NirField/AccessibiliteItems.d.ts +1 -1
  75. package/dist/components/NirField/NirField.d.ts +7 -3
  76. package/dist/components/NirField/nirValidation.d.ts +1 -1
  77. package/dist/components/NotFoundPage/AccessibiliteItems.d.ts +1 -1
  78. package/dist/components/NotificationBar/AccessibiliteItems.d.ts +1 -1
  79. package/dist/components/PageContainer/AccessibiliteItems.d.ts +1 -1
  80. package/dist/components/PaginatedTable/AccessibiliteItems.d.ts +1 -1
  81. package/dist/components/PasswordField/AccessibiliteItems.d.ts +1 -1
  82. package/dist/components/PasswordField/PasswordField.d.ts +2 -0
  83. package/dist/components/PeriodField/AccessibiliteItems.d.ts +1 -1
  84. package/dist/components/PeriodField/PeriodField.d.ts +219 -41
  85. package/dist/components/PhoneField/AccessibiliteItems.d.ts +1 -1
  86. package/dist/components/PhoneField/PhoneField.d.ts +2 -2
  87. package/dist/components/RangeField/AccessibiliteItems.d.ts +1 -1
  88. package/dist/components/RangeField/RangeField.d.ts +2 -0
  89. package/dist/components/RatingPicker/AccessibiliteItems.d.ts +1 -1
  90. package/dist/components/SearchListField/AccessibiliteItems.d.ts +1 -1
  91. package/dist/components/SearchListField/SearchListField.d.ts +9 -0
  92. package/dist/components/SelectBtnField/AccessibiliteItems.d.ts +1 -1
  93. package/dist/components/SkipLink/AccessibiliteItems.d.ts +1 -1
  94. package/dist/components/SocialMediaLinks/AccessibiliteItems.d.ts +1 -1
  95. package/dist/components/SubHeader/AccessibiliteItems.d.ts +1 -1
  96. package/dist/components/SyAlert/AccessibiliteItems.d.ts +1 -1
  97. package/dist/components/SyTextArea/SyTextArea.d.ts +2 -0
  98. package/dist/components/TableToolbar/AccessibiliteItems.d.ts +1 -1
  99. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +652 -0
  100. package/dist/components/Tables/SyTable/SyTable.d.ts +671 -0
  101. package/dist/components/Tables/common/SyTableFilter.d.ts +126 -0
  102. package/dist/components/Tables/common/SyTablePagination.d.ts +1636 -0
  103. package/dist/components/Tables/common/TableHeader.d.ts +15 -0
  104. package/dist/components/Tables/common/constants/StateEnum.d.ts +6 -0
  105. package/dist/components/Tables/common/filters/DateFilter.d.ts +121 -0
  106. package/dist/components/Tables/common/filters/NumberFilter.d.ts +132 -0
  107. package/dist/components/Tables/common/filters/PeriodFilter.d.ts +135 -0
  108. package/dist/components/Tables/common/filters/SelectFilter.d.ts +120 -0
  109. package/dist/components/Tables/common/filters/TextFilter.d.ts +132 -0
  110. package/dist/components/Tables/common/filters/getFilterComponent.d.ts +1 -0
  111. package/dist/components/Tables/common/filters/locales.d.ts +4 -0
  112. package/dist/components/Tables/common/filters/logics/date.d.ts +1 -0
  113. package/dist/components/Tables/common/filters/logics/number.d.ts +1 -0
  114. package/dist/components/Tables/common/filters/logics/period.d.ts +1 -0
  115. package/dist/components/Tables/common/filters/logics/select.d.ts +1 -0
  116. package/dist/components/Tables/common/filters/logics/text.d.ts +1 -0
  117. package/dist/components/Tables/common/formatters.d.ts +17 -0
  118. package/dist/components/Tables/common/locales.d.ts +28 -0
  119. package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +267 -0
  120. package/dist/components/Tables/common/organizeColumns/sortHeaders.d.ts +2 -0
  121. package/dist/components/Tables/common/tableAccessibilityUtils.d.ts +8 -0
  122. package/dist/components/Tables/common/tableFilterUtils.d.ts +3 -0
  123. package/dist/components/Tables/common/tableStorageUtils.d.ts +69 -0
  124. package/dist/components/Tables/common/tableUtils.d.ts +79 -0
  125. package/dist/components/Tables/common/types.d.ts +91 -0
  126. package/dist/components/Tables/common/usePagination.d.ts +22 -0
  127. package/dist/components/Tables/common/useTableCheckbox.d.ts +20 -0
  128. package/dist/components/Tables/common/useTableFilter.d.ts +9 -0
  129. package/dist/components/Tables/common/useTableHeaders.d.ts +76 -0
  130. package/dist/components/Tables/common/useTableItems.d.ts +24 -0
  131. package/dist/components/Tables/common/useTableOptions.d.ts +18 -0
  132. package/dist/components/Tables/index.d.ts +2 -0
  133. package/dist/components/ToolbarContainer/ToolbarContainer.d.ts +11 -0
  134. package/dist/components/UploadWorkflow/AccessibiliteItems.d.ts +1 -1
  135. package/dist/components/UserMenuBtn/AccessibiliteItems.d.ts +1 -1
  136. package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +9 -2
  137. package/dist/components/index.d.ts +9 -5
  138. package/dist/design-system-v3.js +102 -11944
  139. package/dist/design-system-v3.umd.cjs +22 -4
  140. package/dist/designTokens/index.d.ts +3 -1
  141. package/dist/designTokens/tokens/cnam/cnamFonts.d.ts +140 -0
  142. package/dist/designTokens/tokens/pa/paFonts.d.ts +140 -0
  143. package/dist/designTokens/utils/createFontVariables.d.ts +39 -0
  144. package/dist/designTokens/utils/index.d.ts +2 -1
  145. package/dist/main-Cx8qG7YR.js +16344 -0
  146. package/dist/stories/Accessibilite/Vuetify/VuetifyItems.d.ts +14 -2
  147. package/dist/stories/DesignTokens/StylesTypographiques.stories.new.d.ts +8 -0
  148. package/dist/stories/DesignTokens/TypographyDisplay.d.ts +28 -0
  149. package/dist/stories/DesignTokens/vue-shims.d.ts +6 -0
  150. package/dist/style.css +1 -1
  151. package/dist/utils/rules/isRequired/index.d.ts +1 -1
  152. package/dist/vite-env.d.ts +12 -0
  153. package/package.json +3 -3
  154. package/src/assets/_spacers.scss +37 -1
  155. package/src/assets/_typography.scss +158 -0
  156. package/src/assets/settings.scss +7 -0
  157. package/src/common/constants/ExpertiseLevelEnum.ts +7 -0
  158. package/src/common/imgs/accessibility-svgrepo-com.svg +4 -0
  159. package/src/components/Accordion/Accessibilite/AccessibilityGuide.mdx +249 -0
  160. package/src/components/Accordion/Accordion.vue +48 -76
  161. package/src/components/Accordion/composables/__tests__/useAccordionGroupCommunication.spec.ts +146 -0
  162. package/src/components/Accordion/composables/__tests__/useAccordionKeyboardNavigation.spec.ts +209 -0
  163. package/src/components/Accordion/composables/__tests__/useAccordionState.spec.ts +144 -0
  164. package/src/components/Accordion/composables/useAccordionGroupCommunication.ts +52 -0
  165. package/src/components/Accordion/composables/useAccordionKeyboardNavigation.ts +111 -0
  166. package/src/components/Accordion/composables/useAccordionState.ts +59 -0
  167. package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +3 -0
  168. package/src/components/BackBtn/AccessibiliteItems.ts +1 -1
  169. package/src/components/BackToTopBtn/AccessibiliteItems.ts +1 -1
  170. package/src/components/ChipList/AccessibiliteItems.ts +1 -1
  171. package/src/components/CollapsibleList/AccessibiliteItems.ts +1 -1
  172. package/src/components/ContextualMenu/AccessibiliteItems.ts +1 -1
  173. package/src/components/CookieBanner/AccessibiliteItems.ts +1 -1
  174. package/src/components/CopyBtn/AccessibiliteItems.ts +1 -1
  175. package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +1 -1
  176. package/src/components/Customs/SyCheckbox/Accessibilite.mdx +303 -0
  177. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +50 -0
  178. package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +630 -0
  179. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +326 -0
  180. package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +201 -0
  181. package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +1 -1
  182. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +1 -0
  183. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +8 -1
  184. package/src/components/Customs/SySelect/AccessibiliteItems.ts +1 -1
  185. package/src/components/Customs/SySelect/SySelect.stories.ts +160 -0
  186. package/src/components/Customs/SySelect/SySelect.vue +292 -39
  187. package/src/components/Customs/SySelect/tests/SySelect.spec.ts +234 -2
  188. package/src/components/Customs/SyTextField/AccessibiliteItems.ts +1 -1
  189. package/src/components/Customs/SyTextField/SyTextField.stories.ts +3 -2
  190. package/src/components/Customs/SyTextField/SyTextField.vue +19 -8
  191. package/src/components/DataList/AccessibiliteItems.ts +1 -1
  192. package/src/components/DataListGroup/AccessibiliteItems.ts +1 -1
  193. package/src/components/DatePicker/AccessibiliteItems.ts +1 -1
  194. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.mdx +212 -0
  195. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1307 -0
  196. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +769 -204
  197. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.events.spec.ts +161 -0
  198. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +943 -0
  199. package/src/components/DatePicker/DatePicker/DatePicker.mdx +176 -0
  200. package/src/components/DatePicker/{DatePicker.stories.ts → DatePicker/DatePicker.stories.ts} +356 -519
  201. package/src/components/DatePicker/{DatePicker.vue → DatePicker/DatePicker.vue} +435 -89
  202. package/src/components/DatePicker/DatePicker/tests/DatePicker.events.spec.ts +189 -0
  203. package/src/components/DatePicker/{tests → DatePicker/tests}/DatePicker.spec.ts +0 -14
  204. package/src/components/DatePicker/DatePickerOverview.mdx +227 -0
  205. package/src/components/DatePicker/{DatePickerValidation.mdx → DatePickerValidationExample/DatePickerValidation.mdx} +3 -3
  206. package/src/components/DatePicker/{DatePickerValidation.stories.ts → DatePickerValidationExample/DatePickerValidation.stories.ts} +2 -2
  207. package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +320 -0
  208. package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +148 -0
  209. package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +278 -0
  210. package/src/components/DatePicker/{tests → DateTextInput}/DateTextInput.spec.ts +10 -7
  211. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +1111 -0
  212. package/src/components/DatePicker/DateTextInput/NoCalendar.mdx +64 -0
  213. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +782 -0
  214. package/src/components/DatePicker/composables/index.ts +24 -0
  215. package/src/components/DatePicker/composables/tests/useDateAutoClamp.spec.ts +190 -0
  216. package/src/components/DatePicker/composables/tests/useDateFormatValidation.spec.ts +165 -0
  217. package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +359 -0
  218. package/src/components/DatePicker/composables/tests/useDatePickerViewMode.spec.ts +160 -0
  219. package/src/components/DatePicker/composables/tests/useDatePickerVisibility.spec.ts +339 -0
  220. package/src/components/DatePicker/composables/tests/useDateRangeInput.spec.ts +277 -0
  221. package/src/components/DatePicker/composables/tests/useDateRangeValidation.spec.ts +107 -0
  222. package/src/components/DatePicker/composables/tests/useDateSelection.spec.ts +171 -0
  223. package/src/components/DatePicker/composables/tests/useDateValidation.spec.ts +245 -0
  224. package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +98 -0
  225. package/src/components/DatePicker/composables/tests/useIconState.spec.ts +130 -0
  226. package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +456 -0
  227. package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +233 -0
  228. package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +125 -0
  229. package/src/components/DatePicker/composables/tests/useTodayButton.spec.ts +97 -0
  230. package/src/components/DatePicker/composables/tests/useWeekendDays.spec.ts +28 -0
  231. package/src/components/DatePicker/composables/useAsteriskDisplay.ts +31 -0
  232. package/src/components/DatePicker/composables/useDateAutoClamp.ts +136 -0
  233. package/src/components/DatePicker/composables/useDateFormatValidation.ts +95 -0
  234. package/src/components/DatePicker/composables/useDateInputEditing.ts +326 -0
  235. package/src/components/DatePicker/composables/useDatePickerViewMode.ts +61 -0
  236. package/src/components/DatePicker/composables/useDatePickerVisibility.ts +146 -0
  237. package/src/components/DatePicker/composables/useDateRangeInput.ts +378 -0
  238. package/src/components/DatePicker/composables/useDateRangeValidation.ts +48 -0
  239. package/src/components/DatePicker/composables/useDateSelection.ts +121 -0
  240. package/src/components/DatePicker/composables/useDateValidation.ts +225 -0
  241. package/src/components/DatePicker/composables/useDisplayedDateString.ts +70 -0
  242. package/src/components/DatePicker/composables/useIconState.ts +53 -0
  243. package/src/components/DatePicker/composables/useInputBlurHandler.ts +165 -0
  244. package/src/components/DatePicker/composables/useInputHandler.ts +436 -0
  245. package/src/components/DatePicker/composables/useManualDateValidation.ts +161 -0
  246. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +187 -0
  247. package/src/components/DatePicker/composables/useTodayButton.ts +43 -0
  248. package/src/components/DatePicker/composables/useWeekendDays.ts +21 -0
  249. package/src/components/DatePicker/constants/messages.ts +50 -0
  250. package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
  251. package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +1 -1
  252. package/src/components/DatePicker/playground/ComplexDatePickerPlayground.vue +172 -0
  253. package/src/components/DatePicker/types.ts +15 -0
  254. package/src/components/DiacriticPicker/DiacriticPicker.stories.ts +10 -0
  255. package/src/components/DialogBox/AccessibiliteItems.ts +1 -1
  256. package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -1
  257. package/src/components/ErrorPage/Accessibilite.stories.ts +8 -0
  258. package/src/components/ErrorPage/AccessibiliteItems.ts +1 -1
  259. package/src/components/ErrorPage/ErrorPage.vue +12 -6
  260. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +4 -4
  261. package/src/components/ExternalLinks/AccessibiliteItems.ts +1 -1
  262. package/src/components/FileList/AccessibiliteItems.ts +1 -1
  263. package/src/components/FilePreview/AccessibiliteItems.ts +1 -1
  264. package/src/components/FileUpload/AccessibiliteItems.ts +1 -1
  265. package/src/components/FilterInline/AccessibiliteItems.ts +1 -1
  266. package/src/components/FilterSideBar/AccessibiliteItems.ts +1 -1
  267. package/src/components/FilterSideBar/FilterSideBar.vue +108 -90
  268. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +27 -0
  269. package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +114 -109
  270. package/src/components/FooterBar/AccessibiliteItems.ts +1 -1
  271. package/src/components/FooterBar/FooterBar.vue +2 -1
  272. package/src/components/FranceConnectBtn/AccessibiliteItems.ts +1 -1
  273. package/src/components/HeaderBar/AccessibiliteItems.ts +1 -1
  274. package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +1 -1
  275. package/src/components/HeaderLoading/AccessibiliteItems.ts +1 -1
  276. package/src/components/HeaderToolbar/AccessibiliteItems.ts +1 -1
  277. package/src/components/LangBtn/AccessibiliteItems.ts +1 -1
  278. package/src/components/Logo/Accessibilite.stories.ts +4 -0
  279. package/src/components/Logo/AccessibiliteItems.ts +1 -1
  280. package/src/components/LogoBrandSection/AccessibiliteItems.ts +1 -1
  281. package/src/components/MaintenancePage/AccessibiliteItems.ts +1 -1
  282. package/src/components/NirField/AccessibiliteItems.ts +1 -1
  283. package/src/components/NirField/NirField.mdx +22 -9
  284. package/src/components/NirField/NirField.stories.ts +26 -2
  285. package/src/components/NirField/NirField.vue +209 -22
  286. package/src/components/NirField/nirValidation.ts +17 -3
  287. package/src/components/NirField/tests/NirField.spec.ts +2 -2
  288. package/src/components/NotFoundPage/Accessibilite.stories.ts +8 -0
  289. package/src/components/NotFoundPage/AccessibiliteItems.ts +1 -1
  290. package/src/components/NotFoundPage/NotFoundPage.vue +2 -1
  291. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +8 -6
  292. package/src/components/NotificationBar/AccessibiliteItems.ts +1 -1
  293. package/src/components/PageContainer/AccessibiliteItems.ts +1 -1
  294. package/src/components/PaginatedTable/AccessibiliteItems.ts +1 -1
  295. package/src/components/PaginatedTable/PaginatedTable.mdx +2 -0
  296. package/src/components/PaginatedTable/PaginatedTable.stories.ts +19 -0
  297. package/src/components/PaginatedTable/PaginatedTable.vue +51 -13
  298. package/src/components/PaginatedTable/tests/PaginatedTable.spec.ts +0 -2
  299. package/src/components/PasswordField/AccessibiliteItems.ts +1 -1
  300. package/src/components/PasswordField/PasswordField.stories.ts +4 -0
  301. package/src/components/PasswordField/PasswordField.vue +3 -0
  302. package/src/components/PeriodField/AccessibiliteItems.ts +1 -1
  303. package/src/components/PeriodField/PeriodField.vue +15 -1
  304. package/src/components/PhoneField/AccessibiliteItems.ts +1 -1
  305. package/src/components/PhoneField/PhoneField.stories.ts +15 -15
  306. package/src/components/PhoneField/PhoneField.vue +1 -1
  307. package/src/components/RangeField/AccessibiliteItems.ts +1 -1
  308. package/src/components/RangeField/RangeField.stories.ts +9 -0
  309. package/src/components/RangeField/RangeField.vue +4 -0
  310. package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +12 -0
  311. package/src/components/RatingPicker/AccessibiliteItems.ts +1 -1
  312. package/src/components/SearchListField/AccessibiliteItems.ts +1 -1
  313. package/src/components/SearchListField/SearchListField.vue +5 -0
  314. package/src/components/SelectBtnField/AccessibiliteItems.ts +1 -1
  315. package/src/components/SkipLink/AccessibiliteItems.ts +1 -1
  316. package/src/components/SocialMediaLinks/AccessibiliteItems.ts +1 -1
  317. package/src/components/SubHeader/AccessibiliteItems.ts +1 -1
  318. package/src/components/SyAlert/AccessibiliteItems.ts +1 -1
  319. package/src/components/SyTextArea/SyTextArea.vue +3 -0
  320. package/src/components/SyTextArea/tests/SyTextArea.spec.ts +0 -1
  321. package/src/components/TableToolbar/AccessibiliteItems.ts +1 -1
  322. package/src/components/TableToolbar/TableToolbar.stories.ts +110 -56
  323. package/src/components/Tables/SyServerTable/FilterRules.stories.ts +700 -0
  324. package/src/components/Tables/SyServerTable/SyServerTable.mdx +170 -0
  325. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +4354 -0
  326. package/src/components/Tables/SyServerTable/SyServerTable.vue +391 -0
  327. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +702 -0
  328. package/src/components/Tables/SyTable/FilterRules.stories.ts +418 -0
  329. package/src/components/Tables/SyTable/SyTable.mdx +139 -0
  330. package/src/components/Tables/SyTable/SyTable.stories.ts +2754 -0
  331. package/src/components/Tables/SyTable/SyTable.vue +397 -0
  332. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +707 -0
  333. package/src/components/Tables/common/SyTableFilter.vue +289 -0
  334. package/src/components/Tables/common/SyTablePagination.vue +375 -0
  335. package/src/components/Tables/common/TableHeader.vue +205 -0
  336. package/src/components/Tables/common/constants/StateEnum.ts +6 -0
  337. package/src/components/Tables/common/filters/DateFilter.vue +140 -0
  338. package/src/components/Tables/common/filters/NumberFilter.vue +234 -0
  339. package/src/components/Tables/common/filters/PeriodFilter.vue +147 -0
  340. package/src/components/Tables/common/filters/SelectFilter.vue +235 -0
  341. package/src/components/Tables/common/filters/TextFilter.vue +191 -0
  342. package/src/components/Tables/common/filters/getFilterComponent.ts +54 -0
  343. package/src/components/Tables/common/filters/locales.ts +4 -0
  344. package/src/components/Tables/common/filters/logics/date.ts +12 -0
  345. package/src/components/Tables/common/filters/logics/number.ts +48 -0
  346. package/src/components/Tables/common/filters/logics/period.ts +25 -0
  347. package/src/components/Tables/common/filters/logics/select.ts +27 -0
  348. package/src/components/Tables/common/filters/logics/tests/TextFilterLogic.spec.ts +177 -0
  349. package/src/components/Tables/common/filters/logics/text.ts +62 -0
  350. package/src/components/Tables/common/filters/tests/DateFilter.spec.ts +187 -0
  351. package/src/components/Tables/common/filters/tests/NumberFilter.spec.ts +280 -0
  352. package/src/components/Tables/common/filters/tests/PeriodFilter.spec.ts +192 -0
  353. package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +219 -0
  354. package/src/components/Tables/common/filters/tests/TextFilter.spec.ts +260 -0
  355. package/src/components/Tables/common/formatters.ts +72 -0
  356. package/src/components/Tables/common/locales.ts +31 -0
  357. package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +269 -0
  358. package/src/components/Tables/common/organizeColumns/sortHeaders.ts +9 -0
  359. package/src/components/Tables/common/tableAccessibilityUtils.ts +61 -0
  360. package/src/components/Tables/common/tableFilterUtils.ts +75 -0
  361. package/src/components/Tables/common/tableStorageUtils.ts +127 -0
  362. package/src/components/Tables/common/tableStyles.scss +80 -0
  363. package/src/components/Tables/common/tableUtils.ts +102 -0
  364. package/src/components/Tables/common/tests/SyTableFilter.spec.ts +312 -0
  365. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +170 -0
  366. package/src/components/Tables/common/tests/filterByRange.spec.ts +215 -0
  367. package/src/components/Tables/common/tests/resize.spec.ts +161 -0
  368. package/src/components/Tables/common/tests/tableFilterUtils.spec.ts +92 -0
  369. package/src/components/Tables/common/tests/tableUtils.spec.ts +228 -0
  370. package/src/components/Tables/common/types.ts +92 -0
  371. package/src/components/Tables/common/usePagination.ts +83 -0
  372. package/src/components/Tables/common/useTableCheckbox.ts +58 -0
  373. package/src/components/Tables/common/useTableFilter.ts +19 -0
  374. package/src/components/Tables/common/useTableHeaders.ts +88 -0
  375. package/src/components/Tables/common/useTableItems.ts +87 -0
  376. package/src/components/Tables/common/useTableOptions.ts +93 -0
  377. package/src/components/Tables/index.ts +3 -0
  378. package/src/components/ToolbarContainer/ToolbarContainer.mdx +16 -0
  379. package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +675 -0
  380. package/src/components/ToolbarContainer/ToolbarContainer.vue +128 -0
  381. package/src/components/ToolbarContainer/tests/ToolbarContainer.spec.ts +156 -0
  382. package/src/components/UploadWorkflow/AccessibiliteItems.ts +1 -1
  383. package/src/components/UserMenuBtn/AccessibiliteItems.ts +1 -1
  384. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +74 -0
  385. package/src/components/UserMenuBtn/UserMenuBtn.vue +19 -17
  386. package/src/components/index.ts +9 -5
  387. package/src/composables/date/useDateFormatDayjs.ts +8 -3
  388. package/src/composables/date/useDateInitializationDayjs.ts +28 -36
  389. package/src/composables/rules/useFieldValidation.ts +1 -2
  390. package/src/designTokens/index.ts +4 -0
  391. package/src/designTokens/tokens/cnam/cnamFonts.ts +140 -0
  392. package/src/designTokens/tokens/pa/paFonts.ts +140 -0
  393. package/src/designTokens/utils/createFontVariables.ts +143 -0
  394. package/src/designTokens/utils/index.ts +2 -1
  395. package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +293 -20
  396. package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +448 -54
  397. package/src/stories/Accessibilite/Audit/RGAA.mdx +231 -23
  398. package/src/stories/Accessibilite/Avancement/Avancement.mdx +591 -7
  399. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +139 -38
  400. package/src/stories/Accessibilite/Introduction.mdx +258 -18
  401. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +221 -31
  402. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +204 -22
  403. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +537 -24
  404. package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +577 -70
  405. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +382 -31
  406. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +419 -81
  407. package/src/stories/Accessibilite/Vuetify/Vuetify.mdx +132 -6
  408. package/src/stories/Accessibilite/Vuetify/Vuetify.stories.ts +370 -146
  409. package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +35 -57
  410. package/src/stories/Demarrer/Accueil.stories.ts +32 -8
  411. package/src/stories/DesignTokens/StylesTypographiques.mdx +10 -9
  412. package/src/stories/DesignTokens/StylesTypographiques.stories.new.ts +397 -0
  413. package/src/stories/DesignTokens/StylesTypographiques.stories.ts +397 -0
  414. package/src/stories/DesignTokens/TypographyDisplay.vue +155 -0
  415. package/src/stories/DesignTokens/vue-shims.d.ts +6 -0
  416. package/src/stories/GuideDuDev/LesBreackingChanges.mdx +0 -2
  417. package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +1 -1
  418. package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +1 -1
  419. package/src/stories/GuideDuDev/PortailAgent.mdx +10 -0
  420. package/src/stories/GuideDuDev/PortailAgent.stories.ts +506 -0
  421. package/src/stories/GuideDuDev/Theme.mdx +41 -0
  422. package/src/utils/rules/isHolidayDay/IsHolidayDay.stories.ts +1 -1
  423. package/src/utils/rules/isRequired/index.ts +2 -1
  424. package/src/vite-env.d.ts +12 -0
  425. package/src/vuetifyConfig.ts +10 -3
  426. package/dist/components/BackToTopBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  427. package/dist/components/ChipList/constants/ExpertiseLevelEnum.d.ts +0 -4
  428. package/dist/components/CollapsibleList/constants/ExpertiseLevelEnum.d.ts +0 -4
  429. package/dist/components/ContextualMenu/constants/ExpertiseLevelEnum.d.ts +0 -4
  430. package/dist/components/CookieBanner/constants/ExpertiseLevelEnum.d.ts +0 -4
  431. package/dist/components/CopyBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  432. package/dist/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  433. package/dist/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  434. package/dist/components/Customs/SySelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  435. package/dist/components/Customs/SyTextField/constants/ExpertiseLevelEnum.d.ts +0 -4
  436. package/dist/components/DataList/constants/ExpertiseLevelEnum.d.ts +0 -4
  437. package/dist/components/DataListGroup/constants/ExpertiseLevelEnum.d.ts +0 -4
  438. package/dist/components/DatePicker/constants/ExpertiseLevelEnum.d.ts +0 -4
  439. package/dist/components/DialogBox/constants/ExpertiseLevelEnum.d.ts +0 -4
  440. package/dist/components/DownloadBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  441. package/dist/components/ErrorPage/constants/ExpertiseLevelEnum.d.ts +0 -4
  442. package/dist/components/ExternalLinks/constants/ExpertiseLevelEnum.d.ts +0 -4
  443. package/dist/components/FileList/constants/ExpertiseLevelEnum.d.ts +0 -4
  444. package/dist/components/FilePreview/constants/ExpertiseLevelEnum.d.ts +0 -4
  445. package/dist/components/FileUpload/constants/ExpertiseLevelEnum.d.ts +0 -4
  446. package/dist/components/FilterInline/constants/ExpertiseLevelEnum.d.ts +0 -4
  447. package/dist/components/FilterSideBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  448. package/dist/components/FooterBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  449. package/dist/components/FranceConnectBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  450. package/dist/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.d.ts +0 -4
  451. package/dist/components/HeaderBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  452. package/dist/components/HeaderLoading/constants/ExpertiseLevelEnum.d.ts +0 -4
  453. package/dist/components/HeaderToolbar/constants/ExpertiseLevelEnum.d.ts +0 -4
  454. package/dist/components/LangBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  455. package/dist/components/Logo/constants/ExpertiseLevelEnum.d.ts +0 -4
  456. package/dist/components/LogoBrandSection/constants/ExpertiseLevelEnum.d.ts +0 -4
  457. package/dist/components/MaintenancePage/constants/ExpertiseLevelEnum.d.ts +0 -4
  458. package/dist/components/NirField/constants/ExpertiseLevelEnum.d.ts +0 -4
  459. package/dist/components/NotFoundPage/constants/ExpertiseLevelEnum.d.ts +0 -4
  460. package/dist/components/NotificationBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  461. package/dist/components/PageContainer/constants/ExpertiseLevelEnum.d.ts +0 -4
  462. package/dist/components/PaginatedTable/constants/ExpertiseLevelEnum.d.ts +0 -4
  463. package/dist/components/PasswordField/constants/ExpertiseLevelEnum.d.ts +0 -4
  464. package/dist/components/PeriodField/constants/ExpertiseLevelEnum.d.ts +0 -4
  465. package/dist/components/PhoneField/constants/ExpertiseLevelEnum.d.ts +0 -4
  466. package/dist/components/RangeField/constants/ExpertiseLevelEnum.d.ts +0 -4
  467. package/dist/components/RatingPicker/constants/ExpertiseLevelEnum.d.ts +0 -4
  468. package/dist/components/SearchListField/constants/ExpertiseLevelEnum.d.ts +0 -4
  469. package/dist/components/SelectBtnField/constants/ExpertiseLevelEnum.d.ts +0 -4
  470. package/dist/components/SkipLink/constants/ExpertiseLevelEnum.d.ts +0 -4
  471. package/dist/components/SocialMediaLinks/constants/ExpertiseLevelEnum.d.ts +0 -4
  472. package/dist/components/SubHeader/constants/ExpertiseLevelEnum.d.ts +0 -4
  473. package/dist/components/SyAlert/constants/ExpertiseLevelEnum.d.ts +0 -4
  474. package/dist/components/TableToolbar/constants/ExpertiseLevelEnum.d.ts +0 -4
  475. package/dist/components/UploadWorkflow/constants/ExpertiseLevelEnum.d.ts +0 -4
  476. package/dist/components/UserMenuBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  477. package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +0 -4
  478. package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +0 -4
  479. package/src/components/ChipList/constants/ExpertiseLevelEnum.ts +0 -4
  480. package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +0 -4
  481. package/src/components/ContextualMenu/constants/ExpertiseLevelEnum.ts +0 -4
  482. package/src/components/CookieBanner/constants/ExpertiseLevelEnum.ts +0 -4
  483. package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +0 -4
  484. package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +0 -4
  485. package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +0 -4
  486. package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +0 -4
  487. package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +0 -4
  488. package/src/components/DataList/constants/ExpertiseLevelEnum.ts +0 -4
  489. package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +0 -4
  490. package/src/components/DatePicker/DatePicker.mdx +0 -222
  491. package/src/components/DatePicker/DateTextInput.vue +0 -504
  492. package/src/components/DatePicker/constants/ExpertiseLevelEnum.ts +0 -4
  493. package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +0 -4
  494. package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +0 -4
  495. package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +0 -4
  496. package/src/components/ExternalLinks/constants/ExpertiseLevelEnum.ts +0 -4
  497. package/src/components/FileList/constants/ExpertiseLevelEnum.ts +0 -4
  498. package/src/components/FilePreview/constants/ExpertiseLevelEnum.ts +0 -4
  499. package/src/components/FileUpload/constants/ExpertiseLevelEnum.ts +0 -4
  500. package/src/components/FilterInline/constants/ExpertiseLevelEnum.ts +0 -4
  501. package/src/components/FilterSideBar/constants/ExpertiseLevelEnum.ts +0 -4
  502. package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +0 -4
  503. package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +0 -4
  504. package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +0 -4
  505. package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +0 -4
  506. package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +0 -4
  507. package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +0 -4
  508. package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +0 -4
  509. package/src/components/Logo/constants/ExpertiseLevelEnum.ts +0 -4
  510. package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +0 -4
  511. package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +0 -4
  512. package/src/components/NirField/constants/ExpertiseLevelEnum.ts +0 -4
  513. package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +0 -4
  514. package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +0 -4
  515. package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +0 -4
  516. package/src/components/PaginatedTable/constants/ExpertiseLevelEnum.ts +0 -4
  517. package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +0 -886
  518. package/src/components/PasswordField/constants/ExpertiseLevelEnum.ts +0 -4
  519. package/src/components/PeriodField/constants/ExpertiseLevelEnum.ts +0 -4
  520. package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +0 -4
  521. package/src/components/RangeField/constants/ExpertiseLevelEnum.ts +0 -4
  522. package/src/components/RatingPicker/constants/ExpertiseLevelEnum.ts +0 -4
  523. package/src/components/SearchListField/constants/ExpertiseLevelEnum.ts +0 -4
  524. package/src/components/SelectBtnField/constants/ExpertiseLevelEnum.ts +0 -4
  525. package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +0 -4
  526. package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +0 -4
  527. package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +0 -4
  528. package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +0 -4
  529. package/src/components/TableToolbar/constants/ExpertiseLevelEnum.ts +0 -4
  530. package/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.ts +0 -4
  531. package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +0 -4
  532. package/src/stories/DesignTokens/ThemePA.mdx +0 -35
  533. /package/src/components/DatePicker/{examples → playground}/DatePickerHolidayRule.vue +0 -0
@@ -1,12 +1,33 @@
1
1
  <script lang="ts" setup>
2
- import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick, type ComponentPublicInstance } from 'vue'
2
+ import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick, type ComponentPublicInstance, type Ref } from 'vue'
3
3
  import SyTextField from '@/components/Customs/SyTextField/SyTextField.vue'
4
- import DateTextInput from '../DateTextInput.vue'
4
+ import DateTextInput from '../DateTextInput/DateTextInput.vue'
5
5
  import { VDatePicker } from 'vuetify/components'
6
+ import { useInputHandler } from '../composables/useInputHandler'
6
7
  import { useValidation } from '@/composables/validation/useValidation'
7
8
  import { useDateFormat } from '@/composables/date/useDateFormatDayjs'
8
- import { useDateInitialization, type DateValue, type DateInput } from '@/composables/date/useDateInitializationDayjs'
9
+ import { useDateInitialization, type DateInput, type DateValue } from '@/composables/date/useDateInitializationDayjs'
10
+ import type { DateObjectValue } from '../types'
9
11
  import { useDatePickerAccessibility } from '@/composables/date/useDatePickerAccessibility'
12
+ import { DATE_PICKER_MESSAGES } from '../constants/messages'
13
+ import { useMonthButtonCustomization } from '../composables'
14
+ import { mdiCalendar } from '@mdi/js'
15
+ import { useHolidayDay } from '@/composables/date/useHolidayDay'
16
+ import {
17
+ useTodayButton,
18
+ useDatePickerViewMode,
19
+ useDateSelection,
20
+ useDateRangeValidation,
21
+ useDateFormatValidation,
22
+ useIconState,
23
+ useDateValidation,
24
+ useManualDateValidation,
25
+ useInputBlurHandler,
26
+ useDatePickerVisibility,
27
+ useDisplayedDateString,
28
+ useAsteriskDisplay,
29
+ } from '../composables'
30
+
10
31
  import dayjs from 'dayjs'
11
32
  import customParseFormat from 'dayjs/plugin/customParseFormat'
12
33
 
@@ -17,12 +38,86 @@
17
38
  const { initializeSelectedDates } = useDateInitialization()
18
39
  const { updateAccessibility } = useDatePickerAccessibility()
19
40
 
41
+ // Variables pour suivre le mois et l'année actuellement affichés dans le DatePicker
42
+ const currentMonth = ref<string | null>(null)
43
+ const currentYear = ref<string | null>(null)
44
+ const currentMonthName = ref<string | null>(null)
45
+ const currentYearName = ref<string | null>(null)
46
+
47
+ const onUpdateMonth = (month: string) => {
48
+ // Éviter les mises à jour inutiles si le mois n'a pas changé
49
+ if (currentMonth.value === month) return
50
+
51
+ currentMonth.value = month
52
+ currentMonthName.value = dayjs().month(parseInt(month, 10)).format('MMMM')
53
+ handleMonthUpdate()
54
+ nextTick(() => {
55
+ if (isDatePickerVisible.value) {
56
+ customizeMonthButton()
57
+ markHolidayDays()
58
+ }
59
+ })
60
+ }
61
+
62
+ const onUpdateYear = (year: string) => {
63
+ const oldYear = currentYear.value
64
+ currentYear.value = year
65
+ currentYearName.value = year
66
+
67
+ // Gérer le changement d'année entre décembre et janvier
68
+ if (parseInt(year) > parseInt(oldYear || '0') && parseInt(currentMonth.value || '0') === 11) {
69
+ currentMonth.value = '0'
70
+ currentMonthName.value = dayjs().month(0).format('MMMM')
71
+ }
72
+ else if (parseInt(year) < parseInt(oldYear || '0') && parseInt(currentMonth.value || '0') === 0) {
73
+ currentMonth.value = '11'
74
+ currentMonthName.value = dayjs().month(11).format('MMMM')
75
+ }
76
+
77
+ handleYearUpdate()
78
+ handleMonthUpdate()
79
+ nextTick(() => {
80
+ if (isDatePickerVisible.value) {
81
+ customizeMonthButton()
82
+ markHolidayDays()
83
+ }
84
+ })
85
+ }
86
+
87
+ // Fonction pour gérer les dates sélectionnées depuis le DateTextInput
88
+ const handleDateSelected = (value: DateValue) => {
89
+ // Mettre à jour le modèle avec la nouvelle valeur
90
+ updateModel(value)
91
+
92
+ // Mettre à jour les dates sélectionnées
93
+ if (value === null) {
94
+ selectedDates.value = null
95
+ }
96
+ else if (Array.isArray(value)) {
97
+ // Pour les plages de dates
98
+ const dateObjects = value.map((dateStr) => {
99
+ return parseDate(dateStr, props.dateFormatReturn || props.format)
100
+ }).filter(Boolean) as Date[]
101
+ selectedDates.value = dateObjects
102
+ }
103
+ else {
104
+ // Pour une date unique
105
+ const dateObject = parseDate(value, props.dateFormatReturn || props.format)
106
+ selectedDates.value = dateObject
107
+ }
108
+
109
+ // Émettre l'événement date-selected
110
+ emit('date-selected', value)
111
+ }
112
+
20
113
  const props = withDefaults(defineProps<{
21
114
  modelValue?: DateInput
115
+ label?: string
22
116
  placeholder?: string
23
117
  format?: string
24
118
  dateFormatReturn?: string
25
119
  isBirthDate?: boolean
120
+ birthDate?: boolean // Alias pour isBirthDate pour compatibilité avec l'attribut kebab-case birth-date
26
121
  showWeekNumber?: boolean
27
122
  required?: boolean
28
123
  displayRange?: boolean
@@ -43,12 +138,22 @@
43
138
  showSuccessMessages?: boolean
44
139
  bgColor?: string
45
140
  textFieldActivator?: boolean
141
+ displayTodayButton?: boolean
142
+ displayWeekendDays?: boolean
143
+ displayHolidayDays?: boolean
144
+ displayAsterisk?: boolean
145
+ period?: {
146
+ min?: string
147
+ max?: string
148
+ }
149
+ autoClamp?: boolean
46
150
  }>(), {
47
151
  modelValue: undefined,
48
- placeholder: 'Sélectionner une date',
49
- format: 'DD/MM/YYYY',
152
+ placeholder: DATE_PICKER_MESSAGES.PLACEHOLDER_DEFAULT,
153
+ format: DATE_PICKER_MESSAGES.FORMAT_DEFAULT,
50
154
  dateFormatReturn: '',
51
155
  isBirthDate: false,
156
+ birthDate: false,
52
157
  showWeekNumber: false,
53
158
  required: false,
54
159
  displayRange: false,
@@ -65,21 +170,45 @@
65
170
  width: '100%',
66
171
  disableErrorHandling: false,
67
172
  showSuccessMessages: true,
68
- bgColor: undefined,
173
+ bgColor: 'white',
69
174
  textFieldActivator: false,
175
+ displayTodayButton: true,
176
+ displayWeekendDays: true,
177
+ displayHolidayDays: true,
178
+ displayAsterisk: false,
179
+ period: () => ({
180
+ min: '',
181
+ max: '',
182
+ }),
183
+ autoClamp: false,
184
+ label: DATE_PICKER_MESSAGES.PLACEHOLDER_DEFAULT,
70
185
  })
71
186
 
187
+ // Computed properties pour period
188
+ const minDate = computed(() =>
189
+ props.period?.min || dayjs().subtract(10, 'year').format(props.format),
190
+ )
191
+ const maxDate = computed(() =>
192
+ props.period?.max || dayjs().add(10, 'year').format(props.format),
193
+ )
194
+
72
195
  const emit = defineEmits<{
73
196
  (e: 'update:modelValue', value: DateValue): void
74
197
  (e: 'closed'): void
75
198
  (e: 'focus'): void
76
199
  (e: 'blur'): void
200
+ (e: 'input', value: string): void
201
+ (e: 'date-selected', value: DateValue): void
77
202
  }>()
78
203
 
79
- const selectedDates = ref<Date | Date[] | null>(
204
+ // Utilisation du composable pour la saisie manuelle des plages de dates
205
+ const selectedDates = ref<Date | (Date | null)[] | null>(
80
206
  initializeSelectedDates(props.modelValue as DateInput | null, props.format, props.dateFormatReturn),
81
207
  )
82
208
 
209
+ // Utilisation du composable pour la validation des plages de dates
210
+ const { currentRangeIsValid, getRangeValidationError } = useDateRangeValidation(selectedDates as Ref<DateObjectValue>, props.displayRange)
211
+
83
212
  const isDatePickerVisible = ref(false)
84
213
  const validation = useValidation({
85
214
  showSuccessMessages: props.showSuccessMessages,
@@ -90,61 +219,48 @@
90
219
  })
91
220
  const { errors, warnings, successes, validateField, clearValidation } = validation
92
221
 
93
- const errorMessages = errors
94
- const warningMessages = warnings
95
- const successMessages = successes
222
+ const errorMessages = computed(() => errors.value)
223
+ const warningMessages = computed(() => warnings.value)
224
+ const successMessages = computed(() => successes.value)
96
225
  const displayFormattedDate = ref('')
97
226
 
98
227
  const textInputValue = ref<string>('')
99
228
 
229
+ // Variables pour la gestion de la saisie manuelle
230
+ const isManualInputActive = ref(false)
231
+ const isFormatting = ref(false)
232
+
100
233
  // Variable pour éviter les mises à jour récursives
101
234
  const isUpdatingFromInternal = ref(false)
235
+ // Variable pour suivre si l'utilisateur a interagi avec le champ
236
+ const hasInteracted = ref(false)
237
+
238
+ const { validateDateFormat, isDateComplete } = useDateFormatValidation({
239
+ format: props.format,
240
+ dateFormatReturn: props.dateFormatReturn,
241
+ required: props.required,
242
+ hasInteracted,
243
+ disableErrorHandling: props.disableErrorHandling,
244
+ })
102
245
 
103
- // Fonction pour valider les dates
104
- const validateDates = (forceValidation = false) => {
105
- if (props.noCalendar) {
106
- // En mode no-calendar, on délègue la validation au DateTextInput
107
- return
108
- }
109
-
110
- // Réinitialiser la validation
111
- clearValidation()
112
-
113
- // Si la gestion des erreurs est désactivée, on effectue la validation interne
114
- // mais on n'ajoute pas les messages d'erreur
115
- const shouldDisplayErrors = !props.disableErrorHandling
116
-
117
- // Vérifier si le champ est requis et vide
118
- if ((forceValidation || !isUpdatingFromInternal.value) && props.required && (!selectedDates.value || (Array.isArray(selectedDates.value) && selectedDates.value.length === 0))) {
119
- if (shouldDisplayErrors) {
120
- errors.value.push('La date est requise.')
121
- }
122
- return
123
- }
124
-
125
- if (!selectedDates.value) return
126
-
127
- // Préparer les dates à valider
128
- const datesToValidate = Array.isArray(selectedDates.value)
129
- ? selectedDates.value
130
- : [selectedDates.value]
131
-
132
- // Valider chaque date
133
- if (shouldDisplayErrors) {
134
- datesToValidate.forEach((date) => {
135
- validateField(
136
- date,
137
- props.customRules,
138
- props.customWarningRules,
139
- )
140
- })
141
-
142
- // Dédoublonner les messages (au cas où plusieurs dates auraient les mêmes messages)
143
- errors.value = [...new Set(errors.value)]
144
- warnings.value = [...new Set(warnings.value)]
145
- successes.value = [...new Set(successes.value)]
146
- }
147
- }
246
+ // pour valider les dates
247
+ const { validateDates, validateOnSubmit } = useDateValidation({
248
+ noCalendar: props.noCalendar,
249
+ required: props.required,
250
+ displayRange: props.displayRange,
251
+ disableErrorHandling: props.disableErrorHandling,
252
+ customRules: props.customRules,
253
+ customWarningRules: props.customWarningRules,
254
+ selectedDates,
255
+ isUpdatingFromInternal,
256
+ currentRangeIsValid,
257
+ getRangeValidationError,
258
+ clearValidation,
259
+ validateField,
260
+ errors,
261
+ warnings,
262
+ successes,
263
+ })
148
264
 
149
265
  // Fonction centralisée pour mettre à jour le modèle
150
266
  const updateModel = (value: DateValue) => {
@@ -206,9 +322,30 @@
206
322
  'v-messages__message--warning': warningMessages.value.length > 0 && errorMessages.value.length < 1,
207
323
  })
208
324
 
209
- const inputStyle = computed(() => ({
210
- 'min-width': '100%',
211
- }))
325
+ // Déclaration des variables qui seront initialisées par le composable useDateSelection
326
+ const rangeBoundaryDates = ref<[Date | null, Date | null] | null>(null)
327
+ // Initialisation des variables après la déclaration de selectedDates
328
+ const dateSelectionResult = useDateSelection(
329
+ parseDate,
330
+ selectedDates,
331
+ props.format,
332
+ props.displayRange,
333
+ )
334
+
335
+ watch(() => dateSelectionResult.rangeBoundaryDates.value, (newValue) => {
336
+ rangeBoundaryDates.value = newValue
337
+ }, { immediate: true })
338
+
339
+ // Assignation des fonctions et variables retournées par le composable
340
+ // Utiliser une fonction pour wrapper updateSelectedDates afin de maintenir la compatibilité avec le template
341
+ const updateSelectedDates = (date: Date | null) => {
342
+ dateSelectionResult.updateSelectedDates(date)
343
+ }
344
+ // generateDateRange est maintenant utilisé via le composable useInputHandler
345
+ // Synchroniser notre référence locale avec celle du composable
346
+ watch(() => dateSelectionResult.rangeBoundaryDates.value, (newValue) => {
347
+ rangeBoundaryDates.value = newValue
348
+ }, { immediate: true })
212
349
 
213
350
  // Date(s) formatée(s) en chaîne de caractères pour la valeur de retour
214
351
  const formattedDate = computed<DateValue>(() => {
@@ -216,11 +353,18 @@
216
353
 
217
354
  const returnFormat = props.dateFormatReturn || props.format
218
355
 
219
- if (Array.isArray(selectedDates.value)) {
356
+ // Pour les plages de dates, utiliser rangeBoundaryDates s'il est disponible
357
+ if (props.displayRange && rangeBoundaryDates.value) {
358
+ return [
359
+ formatDate(rangeBoundaryDates.value[0], returnFormat),
360
+ formatDate(rangeBoundaryDates.value[1], returnFormat),
361
+ ] as [string, string]
362
+ }
363
+ else if (Array.isArray(selectedDates.value)) {
220
364
  if (selectedDates.value.length >= 2) {
221
365
  return [
222
366
  formatDate(selectedDates.value[0], returnFormat),
223
- formatDate(selectedDates.value[1], returnFormat),
367
+ formatDate(selectedDates.value[selectedDates.value.length - 1], returnFormat),
224
368
  ] as [string, string]
225
369
  }
226
370
  return ''
@@ -327,50 +471,132 @@
327
471
  }
328
472
  })
329
473
 
330
- // Fonction pour mettre à jour displayFormattedDate quand le VDatePicker change
474
+ /**
475
+ * Met à jour l'affichage formaté de la date lorsqu'une date est sélectionnée dans le calendrier
476
+ */
331
477
  const updateDisplayFormattedDate = () => {
332
- if (displayFormattedDateComputed.value) {
333
- displayFormattedDate.value = displayFormattedDateComputed.value
334
- }
335
- }
478
+ // Utiliser setTimeout pour s'assurer que toutes les mises à jour sont terminées
479
+ setTimeout(() => {
480
+ // Mettre à jour l'affichage formaté pour qu'il corresponde à la date sélectionnée
481
+ let formattedValue = ''
336
482
 
337
- const updateSelectedDates = (input: DateValue) => {
338
- if (Array.isArray(input)) {
339
- const dates = input
340
- .map(date => (date ? parseDate(date, props.format) : null))
341
- .filter((date): date is Date => date !== null)
483
+ // Gérer la fermeture du DatePicker en fonction du mode et de l'état de sélection
484
+ if (props.displayRange) {
485
+ // Priorité à rangeBoundaryDates pour les plages
486
+ if (rangeBoundaryDates.value && rangeBoundaryDates.value[0] && rangeBoundaryDates.value[1]) {
487
+ // Les deux dates de la plage sont disponibles dans rangeBoundaryDates
488
+ const startDate = formatDate(rangeBoundaryDates.value[0], props.format)
489
+ const endDate = formatDate(rangeBoundaryDates.value[1], props.format)
490
+
491
+ // Formater l'affichage de la plage
492
+ formattedValue = `${startDate} - ${endDate}`
493
+ displayFormattedDate.value = formattedValue
494
+ textInputValue.value = formattedValue
495
+
496
+ // Mettre à jour le modèle avec les dates formatées
497
+ const formattedDates = [
498
+ formatDate(rangeBoundaryDates.value[0], props.dateFormatReturn || props.format),
499
+ formatDate(rangeBoundaryDates.value[1], props.dateFormatReturn || props.format),
500
+ ] as [string, string]
501
+
502
+ updateModel(formattedDates)
503
+ emit('date-selected', formattedDates)
504
+
505
+ // Les deux dates de la plage sont sélectionnées, fermer le DatePicker
506
+ isDatePickerVisible.value = false
507
+ emit('closed')
508
+ }
509
+ // Fallback sur selectedDates si rangeBoundaryDates n'est pas complet
510
+ else if (Array.isArray(selectedDates.value) && selectedDates.value.length >= 2) {
511
+ // Émettre l'événement date-selected avec les dates formatées
512
+ const formattedDates = [
513
+ formatDate(selectedDates.value[0], props.format),
514
+ formatDate(selectedDates.value[selectedDates.value.length - 1], props.format),
515
+ ] as [string, string]
516
+
517
+ formattedValue = `${formattedDates[0]} - ${formattedDates[1]}`
518
+ displayFormattedDate.value = formattedValue
519
+ textInputValue.value = formattedValue
520
+
521
+ // Mettre à jour le modèle avec les dates formatées
522
+ updateModel(formattedDates)
523
+ emit('date-selected', formattedDates)
524
+
525
+ // Les deux dates de la plage sont sélectionnées, fermer le DatePicker
526
+ isDatePickerVisible.value = false
527
+ emit('closed')
528
+ }
529
+ else {
530
+ // Utiliser la valeur calculée par le computed si disponible
531
+ formattedValue = displayFormattedDateComputed.value || ''
532
+ displayFormattedDate.value = formattedValue
533
+ textInputValue.value = formattedValue
534
+ }
535
+ }
536
+ else {
537
+ // En mode date unique
538
+ formattedValue = displayFormattedDateComputed.value || ''
539
+ displayFormattedDate.value = formattedValue
540
+ textInputValue.value = formattedValue
342
541
 
343
- if (dates.length === 0) {
344
- selectedDates.value = null
345
- return
542
+ // En mode date unique, fermer le DatePicker après sélection
543
+ isDatePickerVisible.value = false
544
+ emit('closed')
545
+ emit('date-selected', formattedDate.value)
346
546
  }
347
547
 
348
- selectedDates.value = dates
349
- return
350
- }
548
+ // Valider les dates après mise à jour
549
+ validateDates()
550
+ }, 0) // setTimeout avec délai de 0ms pour s'exécuter après le cycle de rendu actuel
551
+ }
552
+
553
+ // Les variables useDateSelection sont maintenant déclarées et initialisées plus haut dans le code
351
554
 
352
- const date = input ? parseDate(input, props.format) : null
353
- selectedDates.value = date === null ? null : date
555
+ // Fonction pour émettre l'événement blur (utilisée pour les tests)
556
+ const emitBlurEvent = () => {
557
+ emit('blur')
354
558
  }
355
559
 
356
- // Gestionnaire de clic en dehors
357
- const handleClickOutside = (event: MouseEvent) => {
358
- if (!isDatePickerVisible.value) return
560
+ // Utilisation du composable pour les jours fériés
561
+ const { getJoursFeries } = useHolidayDay()
562
+
563
+ // Fonction pour marquer les jours fériés dans le calendrier
564
+ const markHolidayDays = () => {
565
+ // Si l'affichage des jours fériés est désactivé, ne rien faire
566
+ if (!props.displayHolidayDays) return
567
+
568
+ // Attendre que le DOM soit mis à jour
569
+ nextTick(() => {
570
+ // Récupérer l'année et le mois courants
571
+ const year = parseInt(currentYear.value || new Date().getFullYear().toString(), 10)
572
+ // Utiliser currentMonth.value !== null pour vérifier si la valeur est définie, même si c'est 0
573
+ const month = parseInt(currentMonth.value !== null ? currentMonth.value : new Date().getMonth().toString(), 10)
574
+
575
+ // Récupérer les jours fériés pour cette année
576
+ const joursFeries = getJoursFeries(year)
577
+ // Convertir les jours fériés en objets Date
578
+ const holidayDates = Array.from(joursFeries).map((dateStr) => {
579
+ const [day, monthStr, yearStr] = dateStr.split('/')
580
+ return new Date(parseInt(yearStr), parseInt(monthStr) - 1, parseInt(day))
581
+ })
359
582
 
360
- const target = event.target as HTMLElement
361
- const container = target.closest('.date-picker-container')
583
+ // Filtrer les jours fériés pour le mois courant
584
+ const monthHolidays = holidayDates.filter((holiday) => {
585
+ return holiday.getMonth() === month && holiday.getFullYear() === year
586
+ })
362
587
 
363
- // Si on clique dans le conteneur du DatePicker, on ne fait rien
364
- if (container) return
365
- emit('closed')
366
- // Déclencher la validation à la fermeture
367
- validateDates()
588
+ // Pour chaque jour férié, trouver l'élément DOM correspondant et ajouter la classe
589
+ monthHolidays.forEach((holiday) => {
590
+ const day = holiday.getDate()
591
+ const dateStr = `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`
592
+ const dayElements = document.querySelectorAll(`[data-v-date="${dateStr}"]`)
593
+ dayElements.forEach((element) => {
594
+ element.classList.add('holiday-day')
595
+ })
596
+ })
597
+ })
368
598
  }
369
599
 
370
- const todayInString = computed(() => {
371
- return dayjs().locale('fr').format('dddd D MMMM').replace(/\b\w/g, l => l.toUpperCase())
372
- })
373
-
374
600
  onMounted(() => {
375
601
  document.addEventListener('click', handleClickOutside)
376
602
 
@@ -381,6 +607,9 @@
381
607
 
382
608
  // Valider les dates au montage
383
609
  validateDates()
610
+
611
+ // Configurer l'observateur pour le bouton du mois
612
+ setupMonthButtonObserver()
384
613
  })
385
614
 
386
615
  onBeforeUnmount(() => {
@@ -389,66 +618,142 @@
389
618
 
390
619
  const dateTextInputRef = ref<null | ComponentPublicInstance<typeof DateTextInput>>()
391
620
  const dateCalendarTextInputRef = ref<null | ComponentPublicInstance<typeof SyTextField>>()
392
- const datePickerRef = ref<null | ComponentPublicInstance<typeof VDatePicker>>()
393
621
 
394
- const validateOnSubmit = () => {
395
- if (props.noCalendar) {
396
- return dateTextInputRef.value?.validateOnSubmit()
622
+ // Initialiser le composable useInputHandler pour gérer la saisie des dates
623
+ const inputHandler = useInputHandler({
624
+ format: props.format,
625
+ displayRange: props.displayRange,
626
+ dateFormatReturn: props.dateFormatReturn,
627
+ disableErrorHandling: props.disableErrorHandling,
628
+ parseDate,
629
+ formatDate,
630
+ generateDateRange: dateSelectionResult.generateDateRange,
631
+ isDateComplete: isDateComplete.value,
632
+ displayFormattedDate,
633
+ selectedDates,
634
+ isFormatting,
635
+ isManualInputActive,
636
+ isUpdatingFromInternal,
637
+ clearValidation,
638
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- validation rules
639
+ validateField: (value, rules, warningRules) => validateField(value, rules as any[], warningRules as any[]),
640
+ updateModel: value => updateModel(value as DateValue),
641
+ emitInput: value => emit('input', value),
642
+ inputRef: dateCalendarTextInputRef as Ref<ComponentPublicInstance | null>,
643
+ })
644
+
645
+ /**
646
+ * Gère l'entrée utilisateur dans le champ de saisie de date
647
+ * Adapté pour fonctionner avec DateTextInput qui émet une valeur string au lieu d'un Event
648
+ */
649
+ const handleInput = (eventOrValue: Event | string) => {
650
+ // Si c'est un événement standard, utiliser directement
651
+ if (eventOrValue instanceof Event) {
652
+ inputHandler.handleInput(eventOrValue)
653
+ return
397
654
  }
398
- // Forcer la validation pour ignorer les conditions de validation interactive
399
- validateDates(true)
400
- // Retourner directement un booléen pour maintenir la compatibilité avec les tests existants
401
- return errors.value.length === 0
402
- }
403
655
 
404
- const openDatePicker = () => {
405
- if (!isDatePickerVisible.value) {
406
- toggleDatePicker()
656
+ // Si c'est une valeur string (venant du DateTextInput)
657
+ const inputElement = dateCalendarTextInputRef.value?.$el?.querySelector('input')
658
+ if (!inputElement) return
659
+
660
+ // Mettre à jour la valeur du modèle directement
661
+ textInputValue.value = eventOrValue
662
+
663
+ // Traitement spécifique pour les plages de dates
664
+ if (props.displayRange && typeof eventOrValue === 'string') {
665
+ // Vérifier si la plage est complète (contient un séparateur et deux dates)
666
+ if (eventOrValue.includes(' - ')) {
667
+ const parts = eventOrValue.split(' - ')
668
+ const startDateStr = parts[0]?.trim() || ''
669
+ const endDateStr = parts[1]?.trim() || ''
670
+
671
+ // Si les deux dates sont présentes et valides, mettre à jour le modèle
672
+ if (startDateStr && endDateStr && !endDateStr.includes('_')) {
673
+ // Convertir les dates en objets Date
674
+ const startDate = parseDate(startDateStr, props.format)
675
+ const endDate = parseDate(endDateStr, props.format)
676
+
677
+ if (startDate && endDate) {
678
+ // Mettre à jour les dates sélectionnées
679
+ selectedDates.value = [startDate, endDate]
680
+ // Valider la plage de dates
681
+ validateDates()
682
+ }
683
+ }
684
+ }
685
+ }
686
+ else {
687
+ // Pour une date unique
688
+ validateDates()
407
689
  }
408
690
  }
691
+ const datePickerRef = ref<null | ComponentPublicInstance<typeof VDatePicker>>()
409
692
 
410
- type ViewMode = 'month' | 'year' | 'months' | undefined
411
-
412
- // Variable pour suivre le mode d'affichage actuel du DatePicker
413
- const currentViewMode = ref<ViewMode>(props.isBirthDate ? 'year' : 'month')
414
-
415
- watch(() => props.isBirthDate, (newValue) => {
416
- currentViewMode.value = newValue ? 'year' : 'month'
417
- })
693
+ // Utilisation du composable pour personnaliser les boutons du mois et de l'année
694
+ const { customizeMonthButton, setupMonthButtonObserver } = useMonthButtonCustomization(
695
+ () => isDatePickerVisible.value,
696
+ currentMonthName,
697
+ currentYearName,
698
+ )
418
699
 
419
- // Fonction pour gérer le changement de mode d'affichage
420
- const handleViewModeUpdate = (newMode: ViewMode) => {
421
- currentViewMode.value = newMode
422
- }
700
+ // Utilisation du composable pour gérer le mode d'affichage du DatePicker
701
+ const { currentViewMode, handleViewModeUpdate, handleYearUpdate, handleMonthUpdate, resetViewMode } = useDatePickerViewMode(
702
+ // Fonction qui retourne la valeur actuelle de isBirthDate (combinaison de isBirthDate et birthDate)
703
+ () => props.isBirthDate || props.birthDate,
704
+ )
423
705
 
424
- // Fonction pour gérer la sélection de l'année quand isBirthDate est true
425
- const handleYearUpdate = () => {
426
- if (props.isBirthDate) {
427
- // Après la sélection de l'année, passer automatiquement à la sélection du mois
428
- currentViewMode.value = 'months'
429
- }
430
- }
706
+ // La fonction isDateComplete est maintenant importée du composable useDateFormatValidation
431
707
 
432
- // Fonction pour gérer la sélection du mois quand isBirthDate est true
433
- const handleMonthUpdate = () => {
434
- if (props.isBirthDate) {
435
- // Après la sélection du mois, passer automatiquement à la sélection du jour
436
- currentViewMode.value = undefined
437
- }
438
- }
708
+ // Fonction pour valider la saisie manuelle, similaire à validateRules dans DateTextInput
709
+ const { validateManualInput } = useManualDateValidation({
710
+ format: props.format,
711
+ required: props.required,
712
+ disableErrorHandling: props.disableErrorHandling,
713
+ customRules: props.customRules,
714
+ customWarningRules: props.customWarningRules,
715
+ hasInteracted,
716
+ errors,
717
+ clearValidation,
718
+ validateDateFormat,
719
+ isDateComplete: isDateComplete.value,
720
+ parseDate,
721
+ validateField,
722
+ })
439
723
 
440
- const handleInputBlur = () => {
441
- emit('blur')
442
- validateDates(true)
443
- }
724
+ const { handleInputBlur } = useInputBlurHandler({
725
+ format: props.format,
726
+ dateFormatReturn: props.dateFormatReturn,
727
+ required: props.required,
728
+ displayFormattedDate,
729
+ hasInteracted,
730
+ isManualInputActive,
731
+ isUpdatingFromInternal,
732
+ selectedDates,
733
+ errors,
734
+ validateDateFormat,
735
+ parseDate,
736
+ formatDate,
737
+ updateModel,
738
+ validateManualInput,
739
+ emitBlur: emitBlurEvent,
740
+ })
444
741
 
445
742
  watch(isDatePickerVisible, async (isVisible) => {
446
743
  if (!isVisible && props.isBirthDate) {
447
744
  // Réinitialiser le mode d'affichage au type birthdate
448
- currentViewMode.value = 'year'
745
+ resetViewMode()
449
746
  }
450
747
 
451
748
  if (isVisible) {
749
+ // Personnaliser le bouton du mois
750
+ customizeMonthButton()
751
+
752
+ // Marquer les jours fériés lorsque le calendrier devient visible
753
+ if (props.displayHolidayDays) {
754
+ markHolidayDays()
755
+ }
756
+
452
757
  // set the focus on the date picker
453
758
  await nextTick()
454
759
  const firstButton = datePickerRef.value?.$el.querySelector('button')
@@ -471,21 +776,14 @@
471
776
  }
472
777
  })
473
778
 
474
- const getIcon = () => {
475
- if (props.noCalendar || props.disableErrorHandling) {
476
- return
477
- }
478
- switch (true) {
479
- case errorMessages.value.length > 0:
480
- return 'error'
481
- case warningMessages.value.length > 0:
482
- return 'warning'
483
- case successMessages.value.length > 0:
484
- return 'success'
485
- default:
486
- return
487
- }
488
- }
779
+ // Utilisation du composable useIconState pour déterminer l'icône à afficher
780
+ const { getIcon } = useIconState({
781
+ noCalendar: props.noCalendar,
782
+ disableErrorHandling: props.disableErrorHandling,
783
+ errorMessages,
784
+ warningMessages,
785
+ successMessages,
786
+ })
489
787
 
490
788
  const syncFromModelValue = (newValue: DateInput | undefined) => {
491
789
  if (!newValue || newValue === '') {
@@ -536,40 +834,220 @@
536
834
  }
537
835
  }, { immediate: true })
538
836
 
539
- const toggleDatePicker = () => {
540
- if (props.disabled || props.readonly) return
837
+ const {
838
+ toggleDatePicker,
839
+ openDatePicker,
840
+ openDatePickerOnClick,
841
+ openDatePickerOnFocus,
842
+ openDatePickerOnIconClick,
843
+ handleClickOutside,
844
+ handleKeyboardNavigation,
845
+ } = useDatePickerVisibility({
846
+ disabled: props.disabled,
847
+ readonly: props.readonly,
848
+ textFieldActivator: props.textFieldActivator,
849
+ isDatePickerVisible,
850
+ isManualInputActive,
851
+ hasInteracted,
852
+ updateAccessibility,
853
+ validateDates,
854
+ emitClosed: () => emit('closed'),
855
+ emitFocus: () => emit('focus'),
856
+ })
857
+
858
+ // Fonctions pour la gestion de la saisie manuelle
859
+ const formatDateInput = (input: string, cursorPosition?: number): { formatted: string, cursorPos: number } => {
860
+ // Conserver uniquement les chiffres de l'entrée
861
+ const cleanedInput = input.replace(/[^\d]/g, '')
541
862
 
542
- isDatePickerVisible.value = !isDatePickerVisible.value
863
+ // Déterminer le séparateur utilisé dans le format
864
+ const separator = props.format.match(/[^DMY]/)?.[0] || '/'
543
865
 
544
- if (isDatePickerVisible.value) {
545
- // Mettre à jour l'accessibilité après l'ouverture du DatePicker
546
- nextTick(() => {
547
- updateAccessibility()
548
- })
866
+ // Calculer la position du curseur dans l'entrée nettoyée (sans séparateurs)
867
+ // Pour cela, on compte combien de chiffres il y a avant la position du curseur
868
+ const inputBeforeCursor = input.substring(0, cursorPosition || 0)
869
+ const digitsBeforeCursor = inputBeforeCursor.replace(/[^\d]/g, '').length
870
+
871
+ // Construire la chaîne formatée
872
+ let result = ''
873
+ let digitIndex = 0
874
+
875
+ // Parcourir le format pour placer les chiffres et séparateurs
876
+ for (let i = 0; i < props.format.length && digitIndex < cleanedInput.length; i++) {
877
+ const formatChar = props.format[i].toUpperCase()
878
+
879
+ if (['D', 'M', 'Y'].includes(formatChar)) {
880
+ // Ajouter un chiffre
881
+ result += cleanedInput[digitIndex]
882
+ digitIndex++
883
+ }
884
+ else {
885
+ // Ajouter un séparateur
886
+ result += separator
887
+ }
549
888
  }
550
- else {
551
- emit('closed')
552
- validateDates()
889
+
890
+ // Calculer la nouvelle position du curseur
891
+ // Nombre de chiffres avant le curseur + nombre de séparateurs avant ces chiffres
892
+ let newCursorPos = digitsBeforeCursor
893
+
894
+ // Ajouter les séparateurs qui apparaissent avant la position du curseur
895
+ for (let i = 0, digitCount = 0; i < props.format.length && digitCount < digitsBeforeCursor; i++) {
896
+ if (!['D', 'M', 'Y'].includes(props.format[i].toUpperCase())) {
897
+ newCursorPos++
898
+ }
899
+ else {
900
+ digitCount++
901
+ }
902
+ }
903
+
904
+ return {
905
+ formatted: result,
906
+ cursorPos: Math.min(newCursorPos, result.length),
553
907
  }
554
908
  }
555
909
 
556
- const openDatePickerOnClick = () => {
557
- if (props.textFieldActivator) {
558
- openDatePicker()
910
+ const handleKeydown = (event: KeyboardEvent & { target: HTMLInputElement }) => {
911
+ // Déléguer la gestion de l'ouverture du calendrier au composable
912
+ if (!props.noCalendar && handleKeyboardNavigation(event)) {
913
+ return
914
+ }
915
+
916
+ // Gérer la suppression des séparateurs
917
+ if (event.key === 'Backspace') {
918
+ const input = event.target
919
+ if (!input.selectionStart || input.selectionStart !== input.selectionEnd) {
920
+ return
921
+ }
922
+
923
+ const cursorPos = input.selectionStart
924
+ const charBeforeCursor = input.value[cursorPos - 1]
925
+
926
+ if (!/\d/.test(charBeforeCursor)) {
927
+ // Si le caractère avant le curseur n'est pas un chiffre, on le supprime aussi
928
+ // et on supprime le chiffre avant le séparateur
929
+ event.preventDefault() // Empêcher le comportement par défaut
930
+
931
+ const newValue = input.value.substring(0, cursorPos - 2)
932
+ + input.value.substring(cursorPos)
933
+
934
+ // Mettre à jour la valeur
935
+ displayFormattedDate.value = newValue
936
+
937
+ // Positionner le curseur après un court délai
938
+ setTimeout(() => {
939
+ const newCursorPos = cursorPos - 2
940
+ input.setSelectionRange(newCursorPos, newCursorPos)
941
+ }, 0)
942
+ }
943
+ }
944
+
945
+ // Gérer les touches de direction pour éviter de se retrouver entre un séparateur et un chiffre
946
+ if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
947
+ const input = event.target
948
+ const cursorPos = input.selectionStart || 0
949
+
950
+ // Déterminer le séparateur utilisé dans le format
951
+ const separator = props.format.match(/[^DMY]/)?.[0] || '/'
952
+
953
+ if (event.key === 'ArrowLeft' && cursorPos > 0) {
954
+ const charBeforeCursor = input.value[cursorPos - 1]
955
+
956
+ if (charBeforeCursor === separator) {
957
+ // Si on se déplace à gauche et qu'on rencontre un séparateur, sauter par-dessus
958
+ event.preventDefault()
959
+ input.setSelectionRange(cursorPos - 2, cursorPos - 2)
960
+ }
961
+ }
962
+ else if (event.key === 'ArrowRight' && cursorPos < input.value.length) {
963
+ const charAtCursor = input.value[cursorPos]
964
+
965
+ if (charAtCursor === separator) {
966
+ // Si on se déplace à droite et qu'on rencontre un séparateur, sauter par-dessus
967
+ event.preventDefault()
968
+ input.setSelectionRange(cursorPos + 2, cursorPos + 2)
969
+ }
970
+ }
559
971
  }
560
972
  }
561
973
 
562
- const openDatePickerOnFocus = () => {
563
- // Only open the DatePicker if textFieldActivator is true
564
- if (props.textFieldActivator) {
565
- openDatePicker()
974
+ // Variable pour l'accessibilité
975
+ const accessibilityDescription = ref(DATE_PICKER_MESSAGES.ARIA_DATE_INPUT)
976
+
977
+ // Fonction pour créer une description accessible de la date pour les lecteurs d'écran
978
+ const getDateDescription = (dateStr: string, format: string): string => {
979
+ // Si la chaîne est vide, retourner un message simple
980
+ if (!dateStr || !dateStr.trim()) {
981
+ return 'Aucune date saisie'
566
982
  }
567
- // Always emit the focus event
568
- emit('focus')
983
+
984
+ // Déterminer le séparateur utilisé dans le format
985
+ const separator = format.match(/[^DMY]/)?.[0] || '/'
986
+
987
+ // Extraire les parties de la date
988
+ const dateParts = dateStr.split(separator)
989
+ const formatParts = format.split(separator)
990
+
991
+ // Créer une description en fonction du format
992
+ let description = 'Date en cours de saisie: '
993
+
994
+ for (let i = 0; i < formatParts.length; i++) {
995
+ if (i >= dateParts.length) break
996
+
997
+ const part = dateParts[i].trim()
998
+ const formatPart = formatParts[i].charAt(0).toUpperCase()
999
+
1000
+ // Ignorer les parties vides ou contenant uniquement des placeholders
1001
+ if (!part || part.replace(/_/g, '').length === 0) {
1002
+ continue
1003
+ }
1004
+
1005
+ switch (formatPart) {
1006
+ case 'D':
1007
+ description += `jour ${part}, `
1008
+ break
1009
+ case 'M':
1010
+ description += `mois ${part}, `
1011
+ break
1012
+ case 'Y':
1013
+ description += `année ${part}, `
1014
+ break
1015
+ }
1016
+ }
1017
+
1018
+ // Supprimer la virgule finale si elle existe
1019
+ return description.endsWith(', ')
1020
+ ? description.slice(0, -2)
1021
+ : description
569
1022
  }
570
1023
 
571
- const openDatePickerOnIconClick = () => {
572
- toggleDatePicker()
1024
+ // Mettre à jour la description accessible lorsque la valeur affichée change
1025
+ watch(displayFormattedDate, (newValue) => {
1026
+ if (newValue && typeof newValue === 'string') {
1027
+ // Créer une version accessible pour les lecteurs d'écran (sans les caractères de placeholder)
1028
+ const accessibleValue = newValue.replace(/_/g, ' ')
1029
+
1030
+ // Créer un message descriptif pour le lecteur d'écran
1031
+ accessibilityDescription.value = getDateDescription(accessibleValue, props.format)
1032
+ }
1033
+ else {
1034
+ accessibilityDescription.value = 'Aucune date saisie'
1035
+ }
1036
+ })
1037
+
1038
+ const { todayInString, selectToday } = useTodayButton(props)
1039
+ const { labelWithAsterisk } = useAsteriskDisplay(props)
1040
+
1041
+ // Utilisation du composable pour l'affichage formaté des dates
1042
+ const { displayedDateString } = useDisplayedDateString({
1043
+ selectedDates,
1044
+ rangeBoundaryDates,
1045
+ todayInString,
1046
+ })
1047
+
1048
+ // Wrapper pour la fonction selectToday du composable
1049
+ const handleSelectToday = () => {
1050
+ selectToday(selectedDates)
573
1051
  }
574
1052
 
575
1053
  defineExpose({
@@ -579,16 +1057,34 @@
579
1057
  errorMessages,
580
1058
  handleClickOutside,
581
1059
  initializeSelectedDates,
1060
+ handleSelectToday,
582
1061
  updateAccessibility,
583
1062
  openDatePicker,
1063
+ updateDisplayFormattedDate,
1064
+ currentMonth, // Exposer le mois actuellement affiché
1065
+ currentMonthName, // Exposer le nom du mois actuellement affiché
1066
+ toggleDatePicker,
1067
+ validateField,
1068
+ clearValidation,
1069
+ validateDates,
1070
+ formatDateInput,
1071
+ emitBlur: emitBlurEvent,
1072
+ validateDateFormat,
1073
+ displayFormattedDate,
584
1074
  })
585
1075
  </script>
586
1076
 
587
1077
  <template>
588
1078
  <div
589
1079
  class="date-picker-container"
590
- :style="inputStyle"
591
1080
  >
1081
+ <!-- Variable pour stocker la description accessible -->
1082
+ <span
1083
+ v-if="false"
1084
+ ref="accessibilityDescriptionRef"
1085
+ >
1086
+ {{ accessibilityDescription }}
1087
+ </span>
592
1088
  <template v-if="props.noCalendar">
593
1089
  <DateTextInput
594
1090
  ref="dateTextInputRef"
@@ -596,7 +1092,7 @@
596
1092
  :class="[getMessageClasses(), 'label-hidden-on-focus']"
597
1093
  :date-format-return="props.dateFormatReturn"
598
1094
  :format="props.format"
599
- :label="props.placeholder"
1095
+ :label="labelWithAsterisk || ''"
600
1096
  :placeholder="props.placeholder"
601
1097
  :required="props.required"
602
1098
  :custom-rules="props.customRules"
@@ -611,6 +1107,8 @@
611
1107
  :disable-error-handling="props.disableErrorHandling"
612
1108
  :show-success-messages="props.showSuccessMessages"
613
1109
  :bg-color="props.bgColor"
1110
+ :auto-clamp="props.autoClamp"
1111
+ :display-asterisk="props.displayAsterisk"
614
1112
  title="Date text input"
615
1113
  @focus="emit('focus')"
616
1114
  @blur="emit('blur')"
@@ -627,36 +1125,42 @@
627
1125
  :open-on-click="false"
628
1126
  scroll-strategy="none"
629
1127
  transition="fade-transition"
630
- attach="body"
631
- :offset="[-20, 5]"
1128
+ :offset="[0, 10]"
632
1129
  >
633
1130
  <template #activator="{ props: menuProps }">
634
- <SyTextField
1131
+ <DateTextInput
635
1132
  v-bind="menuProps"
636
1133
  ref="dateCalendarTextInputRef"
637
- v-model="displayFormattedDate"
638
- :append-icon="displayIcon && displayAppendIcon ? 'calendar' : undefined"
639
- :append-inner-icon="getIcon()"
640
- :class="[getMessageClasses(), 'label-hidden-on-focus']"
641
- :error-messages="errorMessages"
642
- :warning-messages="warningMessages"
643
- :success-messages="props.showSuccessMessages ? successMessages : []"
1134
+ v-model="textInputValue"
1135
+ :label="labelWithAsterisk || ''"
1136
+ :placeholder="props.placeholder"
1137
+ :format="props.format"
1138
+ :date-format-return="props.dateFormatReturn"
1139
+ :required="props.required"
644
1140
  :disabled="props.disabled"
645
- :disable-click-button="false"
646
- :readonly="true"
647
- :label="props.placeholder"
1141
+ :readonly="props.readonly"
1142
+ :is-outlined="props.isOutlined"
1143
+ :display-icon="props.displayIcon"
1144
+ :display-append-icon="props.displayAppendIcon"
1145
+ :display-prepend-icon="props.displayPrependIcon"
648
1146
  :no-icon="props.noIcon"
649
- :prepend-icon="displayIcon && !displayAppendIcon ? 'calendar' : undefined"
650
- :variant-style="props.isOutlined ? 'outlined' : 'underlined'"
651
- color="primary"
1147
+ :custom-rules="props.customRules"
1148
+ :custom-warning-rules="props.customWarningRules"
1149
+ :display-asterisk="props.displayAsterisk"
1150
+ :disable-error-handling="props.disableErrorHandling"
652
1151
  :show-success-messages="props.showSuccessMessages"
653
1152
  :bg-color="props.bgColor"
654
- is-clearable
655
- title="Date Picker"
1153
+ :display-range="props.displayRange"
1154
+ :display-persistent-placeholder="true"
1155
+ :class="[getMessageClasses(), 'label-hidden-on-focus']"
1156
+ :append-inner-icon="getIcon"
1157
+ :auto-clamp="props.autoClamp"
656
1158
  @click="openDatePickerOnClick"
657
1159
  @focus="openDatePickerOnFocus"
658
1160
  @blur="handleInputBlur"
659
- @update:model-value="updateSelectedDates"
1161
+ @input="handleInput"
1162
+ @keydown="handleKeydown"
1163
+ @date-selected="handleDateSelected"
660
1164
  @prepend-icon-click="openDatePickerOnIconClick"
661
1165
  @append-icon-click="openDatePickerOnIconClick"
662
1166
  />
@@ -666,24 +1170,55 @@
666
1170
  ref="datePickerRef"
667
1171
  v-model="selectedDates"
668
1172
  color="primary"
1173
+ :class="props.displayWeekendDays ? 'weekend' : ''"
669
1174
  :first-day-of-week="1"
670
1175
  :multiple="props.displayRange ? 'range' : false"
671
1176
  :show-adjacent-months="true"
672
1177
  :show-week="props.showWeekNumber"
673
1178
  :view-mode="currentViewMode"
674
- @update:view-mode="handleViewModeUpdate"
675
- @update:year="handleYearUpdate"
676
- @update:month="handleMonthUpdate"
1179
+ :max="maxDate"
1180
+ :min="minDate"
1181
+ :display-holiday-days="props.displayHolidayDays"
1182
+ :display-asterisk="props.displayAsterisk"
677
1183
  @update:model-value="updateDisplayFormattedDate"
1184
+ @update:view-mode="handleViewModeUpdate"
1185
+ @update:month="onUpdateMonth"
1186
+ @update:year="onUpdateYear"
1187
+ @click:date="updateSelectedDates"
1188
+ @focus="props.displayHolidayDays ? markHolidayDays : undefined"
1189
+ @update:month-year="props.displayHolidayDays ? markHolidayDays : undefined"
678
1190
  >
679
1191
  <template #title>
680
1192
  Sélectionnez une date
681
1193
  </template>
682
1194
  <template #header>
683
1195
  <h3 class="mx-auto my-auto ml-5 mb-4">
684
- {{ todayInString }}
1196
+ {{ displayedDateString }}
685
1197
  </h3>
686
1198
  </template>
1199
+ <template
1200
+ v-if="props.displayTodayButton"
1201
+ #actions
1202
+ >
1203
+ <div class="d-flex justify-center align-center w-100">
1204
+ <v-btn
1205
+ v-if="props.displayTodayButton"
1206
+ size="x-small"
1207
+ color="primary"
1208
+ :title="DATE_PICKER_MESSAGES.BUTTON_TODAY"
1209
+ class="my-2 pa-2 mt-2"
1210
+ :ripple="false"
1211
+ @click="handleSelectToday"
1212
+ >
1213
+ <VIcon
1214
+ class="mr-1"
1215
+ >
1216
+ {{ mdiCalendar }}
1217
+ </VIcon>
1218
+ {{ DATE_PICKER_MESSAGES.BUTTON_TODAY }}
1219
+ </v-btn>
1220
+ </div>
1221
+ </template>
687
1222
  </VDatePicker>
688
1223
  </VMenu>
689
1224
  </template>
@@ -693,6 +1228,29 @@
693
1228
  <style lang="scss" scoped>
694
1229
  @use '@/assets/tokens';
695
1230
 
1231
+ /* Disable ripple effect on month and year buttons */
1232
+ :deep(.v-date-picker-controls__month-btn),
1233
+ :deep(.v-date-picker-controls__mode-btn) {
1234
+ .v-ripple__container,
1235
+ .v-ripple__animation {
1236
+ display: none !important;
1237
+ opacity: 0 !important;
1238
+ background-color: transparent !important;
1239
+ pointer-events: none !important;
1240
+ }
1241
+ }
1242
+
1243
+ /* Style pour les jours fériés */
1244
+ :deep(.holiday-day) {
1245
+ background-color: rgb(255 193 7 / 10%);
1246
+ border: 2px dotted tokens.$neutral-black;
1247
+ border-radius: 50%;
1248
+ }
1249
+
1250
+ :deep(.v-date-picker-controls .v-btn:last-child) {
1251
+ margin-inline-start: 0;
1252
+ }
1253
+
696
1254
  .label-hidden-on-focus:focus + label {
697
1255
  display: none;
698
1256
  }
@@ -763,7 +1321,7 @@
763
1321
  }
764
1322
 
765
1323
  .date-picker-container {
766
- max-width: 100%;
1324
+ width: 100%;
767
1325
  position: relative;
768
1326
 
769
1327
  :deep(.v-date-picker) {
@@ -783,13 +1341,20 @@
783
1341
  opacity: 1;
784
1342
  }
785
1343
 
786
- .fade-enter-active,
787
- .fade-leave-active {
788
- transition: opacity 0.5s ease;
1344
+ :deep(.weekend .v-date-picker-month__day--week-end .v-btn) {
1345
+ background-color: #afb1b1;
1346
+ }
1347
+
1348
+ /* div avant la class .v-date-picker-month__day--week-end */
1349
+ :deep(.weekend .v-date-picker-month__day:has(+ .v-date-picker-month__day--week-end) .v-btn) {
1350
+ background-color: #afb1b1;
1351
+ }
1352
+
1353
+ :deep(.v-date-picker-controls__mode-btn) {
1354
+ transform: none !important;
789
1355
  }
790
1356
 
791
- .fade-enter-from,
792
- .fade-leave-to {
793
- opacity: 0;
1357
+ :deep(.v-btn--variant-text .v-btn__overlay) {
1358
+ padding: 13px;
794
1359
  }
795
1360
  </style>