@cnamts/synapse 0.0.11-alpha → 0.0.13-alpha

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 (315) hide show
  1. package/dist/design-system-v3.js +5394 -3813
  2. package/dist/design-system-v3.umd.cjs +1 -1
  3. package/dist/src/components/Amelipro/types/types.d.ts +38 -0
  4. package/dist/src/components/CookieBanner/CookieBanner.d.ts +1 -1
  5. package/dist/src/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
  6. package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +31 -23
  7. package/dist/src/components/Customs/SyTextField/types.d.ts +1 -0
  8. package/dist/src/components/DatePicker/DatePicker.d.ts +105 -102
  9. package/dist/src/components/DatePicker/DateTextInput.d.ts +82 -74
  10. package/dist/src/components/ErrorPage/ErrorPage.d.ts +1 -1
  11. package/dist/src/components/FileList/FileList.d.ts +1 -0
  12. package/dist/src/components/FileList/UploadItem/UploadItem.d.ts +1 -1
  13. package/dist/src/components/FilterInline/AccessibiliteItems.d.ts +30 -0
  14. package/dist/src/components/FilterInline/constants/ExpertiseLevelEnum.d.ts +4 -0
  15. package/dist/src/components/FilterSideBar/AccessibiliteItems.d.ts +29 -0
  16. package/dist/src/components/FilterSideBar/FilterSideBar.d.ts +31 -0
  17. package/dist/src/components/FilterSideBar/constants/ExpertiseLevelEnum.d.ts +4 -0
  18. package/dist/src/components/FilterSideBar/locales.d.ts +7 -0
  19. package/dist/src/components/LangBtn/LangBtn.d.ts +2 -2
  20. package/dist/src/components/NirField/NirField.d.ts +952 -0
  21. package/dist/src/components/NotificationBar/NotificationBar.d.ts +6 -6
  22. package/dist/src/components/PasswordField/PasswordField.d.ts +42 -8
  23. package/dist/src/components/PeriodField/PeriodField.d.ts +259 -235
  24. package/dist/src/components/PhoneField/PhoneField.d.ts +33 -3
  25. package/dist/src/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +1 -1
  26. package/dist/src/components/RatingPicker/NumberPicker/NumberPicker.d.ts +1 -1
  27. package/dist/src/components/RatingPicker/StarsPicker/StarsPicker.d.ts +1 -1
  28. package/dist/src/components/UploadWorkflow/AccessibiliteItems.d.ts +29 -0
  29. package/dist/src/components/UploadWorkflow/config.d.ts +29 -0
  30. package/dist/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.d.ts +4 -0
  31. package/dist/src/components/UploadWorkflow/locales.d.ts +7 -0
  32. package/dist/src/components/UploadWorkflow/types.d.ts +19 -0
  33. package/dist/src/components/UploadWorkflow/useFileList.d.ts +10 -0
  34. package/dist/src/components/UploadWorkflow/useFileUploadJourney.d.ts +9 -0
  35. package/dist/src/components/Usages/Usages.d.ts +10 -0
  36. package/dist/src/components/index.d.ts +5 -0
  37. package/dist/src/composables/date/tests/useDateFormat.spec.d.ts +1 -0
  38. package/dist/src/composables/date/tests/useDateInitialization.spec.d.ts +1 -0
  39. package/dist/src/composables/date/tests/useDatePickerAccessibility.spec.d.ts +1 -0
  40. package/dist/src/composables/date/useDateFormat.d.ts +26 -0
  41. package/dist/src/composables/date/useDateInitialization.d.ts +18 -0
  42. package/dist/src/composables/date/useDatePickerAccessibility.d.ts +8 -0
  43. package/dist/src/composables/rules/useFieldValidation.d.ts +1 -0
  44. package/dist/src/composables/useFilterable/useFilterable.d.ts +1 -1
  45. package/dist/src/composables/validation/tests/useValidation.spec.d.ts +1 -0
  46. package/dist/src/composables/validation/useValidation.d.ts +40 -0
  47. package/dist/src/designTokens/index.d.ts +3 -1
  48. package/dist/src/main.d.ts +1 -0
  49. package/dist/src/utils/formatDate/index.d.ts +3 -0
  50. package/dist/src/utils/formatDate/tests/formatDate.spec.d.ts +1 -0
  51. package/dist/src/utils/functions/validation/isDateAfter/index.d.ts +2 -0
  52. package/dist/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.d.ts +1 -0
  53. package/dist/src/utils/functions/validation/isDateBefore/index.d.ts +2 -0
  54. package/dist/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.d.ts +1 -0
  55. package/dist/src/utils/functions/validation/isDateInRange/index.d.ts +3 -0
  56. package/dist/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.d.ts +1 -0
  57. package/dist/src/utils/functions/validation/isDateValid/index.d.ts +9 -0
  58. package/dist/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.d.ts +1 -0
  59. package/dist/src/utils/functions/validation/isEmailValid/tests/isEmailValid.spec.d.ts +1 -0
  60. package/dist/src/utils/functions/validation/isWeekend/index.d.ts +3 -0
  61. package/dist/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.d.ts +1 -0
  62. package/dist/src/utils/parseDate/index.d.ts +3 -0
  63. package/dist/src/utils/parseDate/tests/parseDate.spec.d.ts +1 -0
  64. package/dist/src/utils/rules/doMatchPattern/index.d.ts +3 -0
  65. package/dist/src/utils/rules/doMatchPattern/tests/matchPattern.spec.d.ts +1 -0
  66. package/dist/src/utils/rules/index.d.ts +11 -0
  67. package/dist/src/utils/rules/isDateValid/index.d.ts +4 -0
  68. package/dist/src/utils/rules/isDateValid/tests/isDateValid.spec.d.ts +1 -0
  69. package/dist/src/utils/rules/isExactLength/index.d.ts +3 -0
  70. package/dist/src/utils/rules/isExactLength/locales.d.ts +2 -0
  71. package/dist/src/utils/rules/isExactLength/tests/exactLength.spec.d.ts +1 -0
  72. package/dist/src/utils/rules/isMaxLength/index.d.ts +3 -0
  73. package/dist/src/utils/rules/isMaxLength/locales.d.ts +2 -0
  74. package/dist/src/utils/rules/isMaxLength/tests/isMaxLength.spec.d.ts +1 -0
  75. package/dist/src/utils/rules/isMinLength/index.d.ts +3 -0
  76. package/dist/src/utils/rules/isMinLength/locales.d.ts +2 -0
  77. package/dist/src/utils/rules/isMinLength/tests/isMinLength.spec.d.ts +1 -0
  78. package/dist/src/utils/rules/isNotAfterDate/index.d.ts +3 -0
  79. package/dist/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.d.ts +1 -0
  80. package/dist/src/utils/rules/isNotAfterToday/index.d.ts +4 -0
  81. package/dist/src/utils/rules/isNotAfterToday/locales.d.ts +2 -0
  82. package/dist/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.d.ts +1 -0
  83. package/dist/src/utils/rules/isNotBeforeDate/index.d.ts +3 -0
  84. package/dist/src/utils/rules/isNotBeforeDate/locales.d.ts +2 -0
  85. package/dist/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.d.ts +1 -0
  86. package/dist/src/utils/rules/isNotBeforeToday/index.d.ts +4 -0
  87. package/dist/src/utils/rules/isNotBeforeToday/locales.d.ts +2 -0
  88. package/dist/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.d.ts +1 -0
  89. package/dist/src/utils/rules/isRequired/index.d.ts +4 -0
  90. package/dist/src/utils/rules/isRequired/locales.d.ts +2 -0
  91. package/dist/src/utils/rules/isRequired/tests/isRequred.spec.d.ts +1 -0
  92. package/dist/src/utils/rules/isValidEmail/index.d.ts +4 -0
  93. package/dist/src/utils/rules/isValidEmail/locales.d.ts +2 -0
  94. package/dist/src/utils/rules/isValidEmail/tests/isValidEmail.spec.d.ts +1 -0
  95. package/dist/src/vuetifyConfig.d.ts +81 -0
  96. package/dist/style.css +1 -1
  97. package/package.json +3 -1
  98. package/src/assets/_elevations.scss +89 -0
  99. package/src/assets/_fonts.scss +6 -0
  100. package/src/assets/_radius.scss +92 -0
  101. package/src/assets/_spacers.scss +149 -0
  102. package/src/assets/settings.scss +15 -3
  103. package/src/assets/tokens.scss +32 -29
  104. package/src/components/Amelipro/types/types.ts +40 -0
  105. package/src/components/ChipList/ChipList.stories.ts +26 -27
  106. package/src/components/ChipList/ChipList.vue +5 -1
  107. package/src/components/ChipList/config.ts +1 -0
  108. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +2 -2
  109. package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +1 -1
  110. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +1 -1
  111. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +65 -0
  112. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +13 -3
  113. package/src/components/Customs/SySelect/SySelect.mdx +1 -1
  114. package/src/components/Customs/SySelect/SySelect.stories.ts +88 -5
  115. package/src/components/Customs/SySelect/SySelect.vue +55 -14
  116. package/src/components/Customs/SySelect/tests/SySelect.spec.ts +135 -2
  117. package/src/components/Customs/SyTextField/SyTextField.mdx +2 -2
  118. package/src/components/Customs/SyTextField/SyTextField.stories.ts +809 -79
  119. package/src/components/Customs/SyTextField/SyTextField.vue +135 -104
  120. package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +190 -38
  121. package/src/components/Customs/SyTextField/types.d.ts +1 -0
  122. package/src/components/DatePicker/DatePicker.stories.ts +177 -5
  123. package/src/components/DatePicker/DatePicker.vue +302 -233
  124. package/src/components/DatePicker/DateTextInput.vue +101 -246
  125. package/src/components/DatePicker/tests/DatePicker.spec.ts +123 -60
  126. package/src/components/DatePicker/tests/DateTextInput.spec.ts +202 -6
  127. package/src/components/FileList/Accessibilite.stories.ts +1 -1
  128. package/src/components/FileList/AccessibiliteItems.ts +22 -0
  129. package/src/components/FileList/FileList.vue +2 -1
  130. package/src/components/FileList/UploadItem/UploadItem.vue +10 -0
  131. package/src/components/FileUpload/FileUpload.stories.ts +93 -7
  132. package/src/components/FileUpload/FileUpload.vue +1 -0
  133. package/src/components/FileUpload/tests/FileUpload.spec.ts +4 -4
  134. package/src/components/FilterInline/Accessibilite.mdx +14 -0
  135. package/src/components/FilterInline/Accessibilite.stories.ts +216 -0
  136. package/src/components/FilterInline/AccessibiliteItems.ts +132 -0
  137. package/src/components/FilterInline/FilterInline.mdx +180 -34
  138. package/src/components/FilterInline/FilterInline.stories.ts +363 -6
  139. package/src/components/FilterInline/constants/ExpertiseLevelEnum.ts +4 -0
  140. package/src/components/FilterSideBar/Accessibilite.mdx +14 -0
  141. package/src/components/FilterSideBar/Accessibilite.stories.ts +216 -0
  142. package/src/components/FilterSideBar/AccessibiliteItems.ts +153 -0
  143. package/src/components/FilterSideBar/FilterSideBar.mdx +237 -0
  144. package/src/components/FilterSideBar/FilterSideBar.stories.ts +798 -0
  145. package/src/components/FilterSideBar/FilterSideBar.vue +193 -0
  146. package/src/components/FilterSideBar/constants/ExpertiseLevelEnum.ts +4 -0
  147. package/src/components/FilterSideBar/locales.ts +8 -0
  148. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +305 -0
  149. package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +39 -0
  150. package/src/components/HeaderBar/Usages.mdx +1 -1
  151. package/src/components/NirField/NirField.stories.ts +738 -29
  152. package/src/components/NirField/NirField.vue +401 -359
  153. package/src/components/NirField/examples//342/200/257dataset/342/200/257.md +12 -0
  154. package/src/components/NirField/tests/NirField.spec.ts +88 -52
  155. package/src/components/NirField/tests/config.spec.ts +65 -0
  156. package/src/components/NotificationBar/Accessibilite.stories.ts +4 -0
  157. package/src/components/NotificationBar/NotificationBar.mdx +2 -2
  158. package/src/components/NotificationBar/NotificationBar.stories.ts +66 -13
  159. package/src/components/NotificationBar/NotificationBar.vue +42 -114
  160. package/src/components/NotificationBar/tests/NotificationBar.spec.ts +28 -33
  161. package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +1 -1
  162. package/src/components/PaginatedTable/PaginatedTable.vue +6 -10
  163. package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +4 -4
  164. package/src/components/PasswordField/PasswordField.mdx +129 -47
  165. package/src/components/PasswordField/PasswordField.stories.ts +1111 -120
  166. package/src/components/PasswordField/PasswordField.vue +212 -99
  167. package/src/components/PasswordField/tests/PasswordField.spec.ts +138 -9
  168. package/src/components/PeriodField/PeriodField.stories.ts +214 -118
  169. package/src/components/PeriodField/PeriodField.vue +238 -190
  170. package/src/components/PeriodField/tests/PeriodField.spec.ts +146 -0
  171. package/src/components/PhoneField/PhoneField.stories.ts +170 -0
  172. package/src/components/PhoneField/PhoneField.vue +76 -17
  173. package/src/components/PhoneField/indicatifs.ts +1 -1
  174. package/src/components/PhoneField/tests/PhoneField.spec.ts +40 -0
  175. package/src/components/RatingPicker/RatingPicker.stories.ts +7 -7
  176. package/src/components/SearchListField/SearchListField.stories.ts +1 -1
  177. package/src/components/UploadWorkflow/Accessibilite.mdx +14 -0
  178. package/src/components/UploadWorkflow/Accessibilite.stories.ts +216 -0
  179. package/src/components/UploadWorkflow/AccessibiliteItems.ts +192 -0
  180. package/src/components/UploadWorkflow/UploadWorkflow.mdx +75 -0
  181. package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +943 -0
  182. package/src/components/UploadWorkflow/UploadWorkflow.vue +230 -0
  183. package/src/components/UploadWorkflow/config.ts +29 -0
  184. package/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.ts +4 -0
  185. package/src/components/UploadWorkflow/locales.ts +8 -0
  186. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +257 -0
  187. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +54 -0
  188. package/src/components/UploadWorkflow/types.ts +21 -0
  189. package/src/components/UploadWorkflow/useFileList.ts +84 -0
  190. package/src/components/UploadWorkflow/useFileUploadJourney.ts +18 -0
  191. package/src/components/Usages/tests/Usages.spec.ts +183 -0
  192. package/src/components/index.ts +5 -0
  193. package/src/composables/date/tests/useDateFormat.spec.ts +67 -0
  194. package/src/composables/date/tests/useDateInitialization.spec.ts +89 -0
  195. package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +102 -0
  196. package/src/composables/date/useDateFormat.ts +94 -0
  197. package/src/composables/date/useDateInitialization.ts +92 -0
  198. package/src/composables/date/useDatePickerAccessibility.ts +78 -0
  199. package/src/composables/rules/tests/useFieldValidation.spec.ts +385 -4
  200. package/src/composables/rules/useFieldValidation.ts +5 -2
  201. package/src/composables/useFilterable/useFilterable.ts +5 -4
  202. package/src/composables/validation/tests/useValidation.spec.ts +154 -0
  203. package/src/composables/validation/useValidation.ts +180 -0
  204. package/src/designTokens/index.ts +4 -0
  205. package/src/main.ts +1 -0
  206. package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +28 -0
  207. package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +2 -2
  208. package/src/stories/Accessibilite/Audit/RGAA.mdx +6 -6
  209. package/src/stories/Accessibilite/Introduction.mdx +2 -1
  210. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +1 -1
  211. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +1 -1
  212. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +8 -11
  213. package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +77 -0
  214. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +9 -3
  215. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +2 -2
  216. package/src/stories/Demarrer/Accueil.mdx +1 -1
  217. package/src/stories/Demarrer/Introduction.stories.ts +3 -3
  218. package/src/stories/Demarrer/Releases.mdx +8 -0
  219. package/src/stories/Demarrer/Releases.stories.ts +66 -0
  220. package/src/stories/DesignTokens/Conteneurs.stories.ts +3 -3
  221. package/src/stories/DesignTokens/ThemePA.mdx +4 -30
  222. package/src/stories/GuideDuDev/LesBreackingChanges.mdx +36 -0
  223. package/src/stories/GuideDuDev/UtiliserLesRules.mdx +321 -78
  224. package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
  225. package/src/utils/formatDate/index.ts +6 -0
  226. package/src/utils/formatDate/tests/formatDate.spec.ts +18 -0
  227. package/src/utils/functions/validation/isDateAfter/index.ts +9 -0
  228. package/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.ts +18 -0
  229. package/src/utils/functions/validation/isDateBefore/index.ts +9 -0
  230. package/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.ts +23 -0
  231. package/src/utils/functions/validation/isDateInRange/index.ts +22 -0
  232. package/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.ts +28 -0
  233. package/src/utils/functions/validation/isDateValid/index.ts +67 -0
  234. package/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.ts +46 -0
  235. package/src/utils/functions/validation/isEmailValid/index.ts +9 -0
  236. package/src/utils/functions/validation/isWeekend/index.ts +10 -0
  237. package/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.ts +16 -0
  238. package/src/utils/parseDate/index.ts +29 -0
  239. package/src/utils/parseDate/tests/parseDate.spec.ts +52 -0
  240. package/src/utils/rules/Rules.mdx +16 -0
  241. package/src/utils/rules/doMatchPattern/DoMachPattern.mdx +66 -0
  242. package/src/utils/rules/doMatchPattern/DoMatchPattern.stories.ts +106 -0
  243. package/src/utils/rules/doMatchPattern/index.ts +28 -0
  244. package/src/utils/rules/doMatchPattern/locales.ts +5 -0
  245. package/src/utils/rules/doMatchPattern/tests/matchPattern.spec.ts +38 -0
  246. package/src/utils/rules/index.ts +11 -0
  247. package/src/utils/rules/isDateValid/IsDateValid.mdx +87 -0
  248. package/src/utils/rules/isDateValid/IsDateValid.stories.ts +113 -0
  249. package/src/utils/rules/isDateValid/index.ts +32 -0
  250. package/src/utils/rules/isDateValid/locales.ts +10 -0
  251. package/src/utils/rules/isDateValid/tests/isDateValid.spec.ts +27 -0
  252. package/src/utils/rules/isExactLength/IsExactLenght.mdx +68 -0
  253. package/src/utils/rules/isExactLength/IsExactLength.stories.ts +151 -0
  254. package/src/utils/rules/{exactLength → isExactLength}/index.ts +2 -4
  255. package/src/utils/rules/isExactLength/tests/exactLength.spec.ts +48 -0
  256. package/src/utils/rules/isMaxLength/IsMaxLength.mdx +68 -0
  257. package/src/utils/rules/isMaxLength/IsMaxLength.stories.ts +152 -0
  258. package/src/utils/rules/isMaxLength/index.ts +30 -0
  259. package/src/utils/rules/isMaxLength/locales.ts +6 -0
  260. package/src/utils/rules/isMaxLength/tests/isMaxLength.spec.ts +42 -0
  261. package/src/utils/rules/isMinLength/IsMinLength.mdx +68 -0
  262. package/src/utils/rules/isMinLength/IsMinLength.stories.ts +152 -0
  263. package/src/utils/rules/isMinLength/index.ts +30 -0
  264. package/src/utils/rules/isMinLength/locales.ts +6 -0
  265. package/src/utils/rules/isMinLength/tests/isMinLength.spec.ts +42 -0
  266. package/src/utils/rules/isNotAfterDate/IsNotAfterDate.mdx +68 -0
  267. package/src/utils/rules/isNotAfterDate/IsNotAfterDate.stories.ts +109 -0
  268. package/src/utils/rules/isNotAfterDate/index.ts +25 -0
  269. package/src/utils/rules/isNotAfterDate/locales.ts +6 -0
  270. package/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.ts +25 -0
  271. package/src/utils/rules/isNotAfterToday/IsNotAfterToday.mdx +83 -0
  272. package/src/utils/rules/isNotAfterToday/IsNotAfterToday.stories.ts +110 -0
  273. package/src/utils/rules/isNotAfterToday/index.ts +28 -0
  274. package/src/utils/rules/isNotAfterToday/locales.ts +5 -0
  275. package/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.ts +30 -0
  276. package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.mdx +68 -0
  277. package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.stories.ts +114 -0
  278. package/src/utils/rules/isNotBeforeDate/index.ts +25 -0
  279. package/src/utils/rules/isNotBeforeDate/locales.ts +6 -0
  280. package/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.ts +25 -0
  281. package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.mdx +83 -0
  282. package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.stories.ts +110 -0
  283. package/src/utils/rules/isNotBeforeToday/index.ts +28 -0
  284. package/src/utils/rules/isNotBeforeToday/locales.ts +5 -0
  285. package/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.ts +36 -0
  286. package/src/utils/rules/isRequired/IsRequired.mdx +81 -0
  287. package/src/utils/rules/isRequired/IsRequired.stories.ts +101 -0
  288. package/src/utils/rules/{required → isRequired}/index.ts +3 -3
  289. package/src/utils/rules/{required/tests/index.spec.ts → isRequired/tests/isRequred.spec.ts} +9 -9
  290. package/src/utils/rules/isValidEmail/IsValidEmail.mdx +81 -0
  291. package/src/utils/rules/isValidEmail/IsValidEmail.stories.ts +101 -0
  292. package/src/utils/rules/{email → isValidEmail}/index.ts +3 -5
  293. package/src/utils/rules/{email/tests/email.spec.ts → isValidEmail/tests/isValidEmail.spec.ts} +5 -5
  294. package/src/vuetifyConfig.ts +61 -0
  295. package/dist/src/utils/rules/email/index.d.ts +0 -4
  296. package/dist/src/utils/rules/exactLength/index.d.ts +0 -4
  297. package/dist/src/utils/rules/required/index.d.ts +0 -4
  298. package/dist/src/utils/rules/required/ruleMessageHelper.d.ts +0 -3
  299. package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +0 -58
  300. package/src/composables/useFilterable/__snapshots__/useFilterable.spec.ts.snap +0 -3
  301. package/src/utils/functions/isEmailValid/index.ts +0 -8
  302. package/src/utils/rules/required/ruleMessageHelper.ts +0 -14
  303. package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +0 -22
  304. /package/dist/src/{utils/functions/isEmailValid/tests/isEmailValid.spec.d.ts → components/FilterSideBar/tests/FilterSideBar.spec.d.ts} +0 -0
  305. /package/dist/src/{utils/rules/email/tests/email.spec.d.ts → components/NirField/tests/config.spec.d.ts} +0 -0
  306. /package/dist/src/{utils/rules/required/tests/index.spec.d.ts → components/UploadWorkflow/tests/UploadWorkflow.spec.d.ts} +0 -0
  307. /package/dist/src/{utils/rules/required/tests/rulesMessageHelper.spec.d.ts → components/Usages/tests/Usages.spec.d.ts} +0 -0
  308. /package/dist/src/utils/functions/{isEmailValid → validation/isEmailValid}/index.d.ts +0 -0
  309. /package/dist/src/utils/rules/{exactLength → doMatchPattern}/locales.d.ts +0 -0
  310. /package/dist/src/utils/rules/{email → isDateValid}/locales.d.ts +0 -0
  311. /package/dist/src/utils/rules/{required → isNotAfterDate}/locales.d.ts +0 -0
  312. /package/src/utils/functions/{isEmailValid → validation/isEmailValid}/tests/isEmailValid.spec.ts +0 -0
  313. /package/src/utils/rules/{exactLength → isExactLength}/locales.ts +0 -0
  314. /package/src/utils/rules/{required → isRequired}/locales.ts +0 -0
  315. /package/src/utils/rules/{email → isValidEmail}/locales.ts +0 -0
@@ -0,0 +1,27 @@
1
+ import { isDateValid, isDateValidFn } from '../'
2
+ import { describe, it, expect } from 'vitest'
3
+
4
+ const validDate = '14/09/2019'
5
+ const invalidDate = '99/99/9999'
6
+
7
+ describe('isDateValid', () => {
8
+ it('returns an error when the date is not valid', () => {
9
+ expect(typeof isDateValid(invalidDate)).toBe('string')
10
+ })
11
+
12
+ it('returns true when the date is valid', () => {
13
+ expect(isDateValid(validDate)).toBe(true)
14
+ })
15
+
16
+ it('returns true if the value is falsy', () => {
17
+ expect(isDateValid('')).toBe(true)
18
+ })
19
+
20
+ it('works with custom error messages', () => {
21
+ const rule = isDateValidFn({
22
+ default: 'test',
23
+ })
24
+
25
+ expect(rule(invalidDate)).toBe('test')
26
+ })
27
+ })
@@ -0,0 +1,68 @@
1
+ import { Meta, Canvas, Source } from '@storybook/blocks';
2
+ import * as IsExactLengthStories from './IsExactLength.stories';
3
+
4
+ <Meta of={IsExactLengthStories} />
5
+
6
+ # Règle de validation `isExactLength`
7
+
8
+ La règle de validation `isExactLength` permet d'imposer une longueur exacte à une chaîne de caractères dans un champs de formulaire.
9
+
10
+ ## Usage
11
+
12
+ Pour utiliser cette règle de validation, vous devez importer la fonction d'ordre supérieur `isExactLengthFn` depuis le package `@cnamts/synapse`.
13
+
14
+ <Source dark code={`
15
+ import { isExactLengthFn } from '@cnamts/synapse';
16
+ `} />
17
+
18
+ Vous devez ensuite faire appel à cette fonction en lui passant en paramètre la longueur exacte que vous souhaitez imposer.
19
+
20
+ <Source dark code={`
21
+ const length15 = isExactLengthFn(15);
22
+ `} />
23
+
24
+ Vous pouvez ensuite utiliser la fonction retournée comme règle d'un champs de formulaire.
25
+
26
+ <Source dark code={`
27
+ <script setup lang="ts">
28
+ import { isExactLengthFn } from '@cnamts/synapse';
29
+ import { VTextField } from 'vuetify/components';
30
+
31
+ const length15 = isExactLengthFn(15);
32
+
33
+ </script>
34
+
35
+ <template>
36
+ <VTextField
37
+ :rules="[length15]"
38
+ label="Max 15 characters"
39
+ />
40
+ </template>
41
+ `} />
42
+
43
+ ## API
44
+
45
+ `} />typescript
46
+ isExactLengthFn(
47
+ lengthValue: number,
48
+ ignoreSpaces?: boolean
49
+ errorMessages?: {
50
+ default?: (length: number) => string;
51
+ }
52
+ ): (value: string) => true | string;
53
+ `} />
54
+
55
+ ### Arguments
56
+
57
+ - `lengthValue` : nombre entier positif représentant la longueur exacte à imposer.
58
+ - `ignoreSpaces` : booléen optionnel permettant d'ignorer les espaces dans le calcul de la longueur. Par défaut, la valeur est `false`.
59
+ - `errorMessages` : objet optionnel permettant de personnaliser les messages d'erreur. Les clés disponibles sont :
60
+ - `default` : message d'erreur par défaut. Vous pouvez utiliser la variable `{{ length }}` pour afficher la longueur attendue.
61
+
62
+ ### Valeurs de retour
63
+
64
+ Retourne une fonction pouvant être utilisée comme règle de validation pour un champs de formulaire Vuetify.
65
+
66
+ ## Exemples
67
+
68
+ <Canvas of={IsExactLengthStories.Default} />
@@ -0,0 +1,151 @@
1
+ import type { StoryObj } from '@storybook/vue3'
2
+ import { VTextField } from 'vuetify/components'
3
+ import { isExactLengthFn } from './index'
4
+
5
+ export default {
6
+ title: 'Guide du dev/Règles De Validation/isExactLength',
7
+ component: isExactLengthFn,
8
+ }
9
+
10
+ export const Default: StoryObj<unknown> = {
11
+ render: () => {
12
+ return {
13
+ components: { VTextField },
14
+ setup() {
15
+ const length10 = isExactLengthFn(10)
16
+ return { length10 }
17
+ },
18
+ template: `
19
+ <VTextField
20
+ :rules="[length10]"
21
+ label="Max 10 characters"
22
+ variant="outlined"
23
+ />
24
+ `,
25
+ }
26
+ },
27
+ parameters: {
28
+ sourceCode: [
29
+ {
30
+ name: 'Script',
31
+ code: `
32
+ <script setup lang="ts">
33
+ import { VTextField } from 'vuetify/components'
34
+ import { isExactLengthFn } from '@cnamts/synapse'
35
+
36
+ const length10 = isExactLengthFn(10)
37
+ </script>
38
+ `,
39
+ },
40
+ {
41
+ name: 'Template',
42
+ code: `
43
+ <template>
44
+ <VTextField
45
+ :rules="[length10]"
46
+ label="Max 10 characters"
47
+ variant="outlined"
48
+ />
49
+ </template>
50
+ `,
51
+ },
52
+ ],
53
+ },
54
+ }
55
+
56
+ export const DoNotCountSpaces: StoryObj<unknown> = {
57
+ render: () => {
58
+ return {
59
+ components: { VTextField },
60
+ setup() {
61
+ const length10 = isExactLengthFn(10, true)
62
+ return { length10 }
63
+ },
64
+ template: `
65
+ <VTextField
66
+ :rules="[length10]"
67
+ label="Max 10 characters"
68
+ variant="outlined"
69
+ />
70
+ `,
71
+ }
72
+ },
73
+ parameters: {
74
+ sourceCode: [
75
+ {
76
+ name: 'Script',
77
+ code: `
78
+ <script setup lang="ts">
79
+ import { VTextField } from 'vuetify/components'
80
+ import { isExactLengthFn } from '@cnamts/synapse'
81
+
82
+ const length10 = isExactLengthFn(10, true)
83
+ </script>
84
+ `,
85
+ },
86
+ {
87
+ name: 'Template',
88
+ code: `
89
+ <template>
90
+ <VTextField
91
+ :rules="[length10]"
92
+ label="Max 10 characters"
93
+ variant="outlined"
94
+ />
95
+ </template>
96
+ `,
97
+ },
98
+ ],
99
+ },
100
+ }
101
+
102
+ export const CustomMessage: StoryObj<unknown> = {
103
+ render: () => {
104
+ return {
105
+ components: { VTextField },
106
+ setup() {
107
+ const messages = {
108
+ default: (length: number) => `The length of this field must be exactly ${length} characters.`,
109
+ }
110
+ const length10 = isExactLengthFn(10, false, messages)
111
+ return { length10 }
112
+ },
113
+ template: `
114
+ <VTextField
115
+ :rules="[length10]"
116
+ label="This field must be 10 characters long."
117
+ />
118
+ `,
119
+ }
120
+ },
121
+ parameters: {
122
+ sourceCode: [
123
+ {
124
+ name: 'Script',
125
+ code: `
126
+ <script setup lang="ts">
127
+ import { VTextField } from 'vuetify/components'
128
+ import { isExactLengthFn } from '@cnamts/synapse'
129
+
130
+ const messages = {
131
+ default: (length: number) => \`The length of this field must be exactly \${length} characters.\`,
132
+ }
133
+ const length10 = isExactLengthFn(10, false, messages)
134
+ </script>
135
+ `,
136
+ },
137
+ {
138
+ name: 'Template',
139
+ code: `
140
+ <template>
141
+ <VTextField
142
+ :rules="[length10]"
143
+ label="This field must be 10 characters long."
144
+ variant="outlined"
145
+ />
146
+ </template>
147
+ `,
148
+ },
149
+ ],
150
+ },
151
+ }
@@ -1,4 +1,4 @@
1
- import { ruleMessage } from '../required/ruleMessageHelper'
1
+ import { ruleMessage } from '@/utils/ruleMessage'
2
2
  import type {
3
3
  ValidationRule,
4
4
  ValidationResult,
@@ -9,7 +9,7 @@ import type {
9
9
  import { defaultErrorMessages } from './locales'
10
10
 
11
11
  /** Check that the value does not exceeds the specified length */
12
- export function exactLengthFn(
12
+ export function isExactLengthFn(
13
13
  lengthValue: number,
14
14
  ignoreSpaces = false,
15
15
  errorMessages: ErrorMessages<number> = defaultErrorMessages,
@@ -29,5 +29,3 @@ export function exactLengthFn(
29
29
  )
30
30
  }
31
31
  }
32
-
33
- export const exactLength = exactLengthFn
@@ -0,0 +1,48 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { isExactLengthFn } from '../'
3
+
4
+ describe('exactLength', () => {
5
+ it('returns an error when the value is longer than the exact length', () => {
6
+ const rule = isExactLengthFn(2)
7
+
8
+ expect(typeof rule('0 1')).toBe('string')
9
+ })
10
+
11
+ it('returns an error when the value is smaller than the exact length', () => {
12
+ const rule = isExactLengthFn(2)
13
+
14
+ expect(typeof rule('s')).toBe('string')
15
+ })
16
+
17
+ it('returns true when the value is the exact length without counting spaces', () => {
18
+ const rule = isExactLengthFn(2, true)
19
+
20
+ expect(rule('x x')).toBe(true)
21
+ })
22
+
23
+ it('returns true when the value is equal than the exact length', () => {
24
+ const rule = isExactLengthFn(2)
25
+
26
+ expect(rule('01')).toBe(true)
27
+ })
28
+
29
+ it('returns true if the value is empty', () => {
30
+ const rule = isExactLengthFn(10)
31
+
32
+ expect(rule('')).toBe(true)
33
+ })
34
+
35
+ it('returns true if the value is null', () => {
36
+ const rule = isExactLengthFn(10)
37
+
38
+ expect(rule(null)).toBe(true)
39
+ })
40
+
41
+ it('works with custom error messages', () => {
42
+ const rule = isExactLengthFn(1, false, {
43
+ default: 'test',
44
+ })
45
+
46
+ expect(rule('01')).toBe('test')
47
+ })
48
+ })
@@ -0,0 +1,68 @@
1
+ import { Meta, Canvas, Source } from '@storybook/blocks';
2
+ import * as IsMaxLengthStories from './IsMaxLength.stories';
3
+
4
+ <Meta of={IsMaxLengthStories} />
5
+
6
+ # Règle de validation `isMaxLength`
7
+
8
+ La règle de validation `isMaxLength` permet de limiter la longueur d'une chaîne de caractères dans un champs de formulaire.
9
+
10
+ ## Usage
11
+
12
+ Pour utiliser cette règle de validation, vous devez importer la fonction d'ordre supérieur `isMaxLengthFn` depuis le package `@cnamts/synapse`.
13
+
14
+ <Source dark code={`
15
+ import { isMaxLengthFn } from '@cnamts/synapse';
16
+ `} />
17
+
18
+ Vous devez ensuite faire appel à cette fonction en lui passant en paramètre la longueur maximale que vous souhaitez imposer.
19
+
20
+ <Source dark code={`
21
+ const max10 = isMaxLengthFn(10);
22
+ `} />
23
+
24
+ Vous pouvez ensuite utiliser la fonction retournée comme règle d'un champs de formulaire.
25
+
26
+ <Source dark code={`
27
+ <script setup lang="ts">
28
+ import { isMaxLengthFn } from '@cnamts/synapse';
29
+ import { VTextField } from 'vuetify/components';
30
+
31
+ const max10 = isMaxLengthFn(10);
32
+
33
+ </script>
34
+
35
+ <template>
36
+ <VTextField
37
+ :rules="[max10]"
38
+ label="Max 10 characters"
39
+ />
40
+ </template>
41
+ `} />
42
+
43
+ ## API
44
+
45
+ <Source dark code={`
46
+ isMaxLengthFn(
47
+ maxLength: number,
48
+ ignoreSpaces?: boolean,
49
+ errorMessages?: {
50
+ default?: (length: number) => string;
51
+ }
52
+ ): (value: string) => true | string;
53
+ `} />
54
+
55
+ ### Arguments
56
+
57
+ - `maxLength` : nombre entier positif représentant la longueur maximale à imposer.
58
+ - `ignoreSpaces` : booléen optionnel permettant d'ignorer les espaces dans le calcul de la longueur. Par défaut, la valeur est `false`.
59
+ - `errorMessages` : objet optionnel permettant de personnaliser les messages d'erreur. Les clés disponibles sont :
60
+ - `default` : message d'erreur par défaut. Vous pouvez utiliser la variable `{{ length }}` pour afficher la longueur maximale attendue.
61
+
62
+ ### Valeurs de retour
63
+
64
+ Retourne une fonction pouvant être utilisée comme règle de validation pour un champs de formulaire Vuetify.
65
+
66
+ ## Exemples
67
+
68
+ <Canvas of={IsMaxLengthStories.Default} />
@@ -0,0 +1,152 @@
1
+ import type { StoryObj } from '@storybook/vue3'
2
+ import { VTextField } from 'vuetify/components'
3
+ import { isMaxLengthFn } from './index'
4
+
5
+ export default {
6
+ title: 'Guide du dev/Règles De Validation/isMaxLength',
7
+ component: isMaxLengthFn,
8
+ }
9
+
10
+ export const Default: StoryObj<unknown> = {
11
+ render: () => {
12
+ return {
13
+ components: { VTextField },
14
+ setup() {
15
+ const max5 = isMaxLengthFn(5)
16
+ return { max5 }
17
+ },
18
+ template: `
19
+ <VTextField
20
+ :rules="[max5]"
21
+ label="Max 5 caractères"
22
+ variant="outlined"
23
+ />
24
+ `,
25
+ }
26
+ },
27
+ parameters: {
28
+ sourceCode: [
29
+ {
30
+ name: 'Script',
31
+ code: `
32
+ <script setup lang="ts">
33
+ import { VTextField } from 'vuetify/components'
34
+ import { isMaxLengthFn } from '@cnamts/synapse'
35
+
36
+ const max5 = isMaxLengthFn(5)
37
+ </script>
38
+ `,
39
+ },
40
+ {
41
+ name: 'Template',
42
+ code: `
43
+ <template>
44
+ <VTextField
45
+ :rules="[max5]"
46
+ label="Max 5 caractères"
47
+ variant="outlined"
48
+ />
49
+ </template>
50
+ `,
51
+ },
52
+ ],
53
+ },
54
+ }
55
+
56
+ export const ignoreSpaces: StoryObj<unknown> = {
57
+ render: () => {
58
+ return {
59
+ components: { VTextField },
60
+ setup() {
61
+ const max5 = isMaxLengthFn(5, true)
62
+ return { max5 }
63
+ },
64
+ template: `
65
+ <VTextField
66
+ :rules="[max5]"
67
+ label="Max 5 caractères, ignore les espaces"
68
+ variant="outlined"
69
+ />
70
+ `,
71
+ }
72
+ },
73
+ parameters: {
74
+ sourceCode: [
75
+ {
76
+ name: 'Script',
77
+ code: `
78
+ <script setup lang="ts">
79
+ import { VTextField } from 'vuetify/components'
80
+ import { isMaxLengthFn } from '@cnamts/synapse'
81
+
82
+ const max5 = isMaxLengthFn(5, true)
83
+ </script>
84
+ `,
85
+ },
86
+ {
87
+ name: 'Template',
88
+ code: `
89
+ <template>
90
+ <VTextField
91
+ :rules="[max5]"
92
+ label="Max 5 caractères, ignore les espaces"
93
+ variant="outlined"
94
+ />
95
+ </template>
96
+ `,
97
+ },
98
+ ],
99
+ },
100
+ }
101
+
102
+ export const CustomMessage: StoryObj<unknown> = {
103
+ render: () => {
104
+ return {
105
+ components: { VTextField },
106
+ setup() {
107
+ const messages = {
108
+ default: max => `The text entered is too long, it must be ${max} characters or less`,
109
+ }
110
+ const max5 = isMaxLengthFn(5, false, messages)
111
+ return { max5 }
112
+ },
113
+ template: `
114
+ <VTextField
115
+ :rules="[max5]"
116
+ label="Max 5 characters"
117
+ variant="outlined"
118
+ />
119
+ `,
120
+ }
121
+ },
122
+ parameters: {
123
+ sourceCode: [
124
+ {
125
+ name: 'Script',
126
+ code: `
127
+ <script setup lang="ts">
128
+ import { VTextField } from 'vuetify/components'
129
+ import { isMaxLengthFn } from '@cnamts/synapse'
130
+
131
+ const messages = {
132
+ default: max => \`The text entered is too long, it must be \${max} characters or less\`,
133
+ }
134
+ const max5 = isMaxLengthFn(5, false, messages)
135
+ </script>
136
+ `,
137
+ },
138
+ {
139
+ name: 'Template',
140
+ code: `
141
+ <template>
142
+ <VTextField
143
+ :rules="[max5]"
144
+ label="Max 5 characters"
145
+ variant="outlined"
146
+ />
147
+ </template>
148
+ `,
149
+ },
150
+ ],
151
+ },
152
+ }
@@ -0,0 +1,30 @@
1
+ import { ruleMessage } from '@/utils/ruleMessage'
2
+ import type {
3
+ ValidationRule,
4
+ ValidationResult,
5
+ ErrorMessages,
6
+ Value,
7
+ } from '../types'
8
+
9
+ import { defaultErrorMessages } from './locales'
10
+
11
+ /** Check that the value does not exceeds the specified length */
12
+ export function isMaxLengthFn(
13
+ max: number,
14
+ ignoreSpaces = false,
15
+ errorMessages: ErrorMessages<number> = defaultErrorMessages,
16
+ ): ValidationRule {
17
+ return (value: Value): ValidationResult => {
18
+ if (!value) {
19
+ return true
20
+ }
21
+
22
+ if (ignoreSpaces) {
23
+ value = value.replace(/\s/g, '')
24
+ }
25
+
26
+ return (
27
+ value.length <= max || ruleMessage(errorMessages, 'default', [max])
28
+ )
29
+ }
30
+ }
@@ -0,0 +1,6 @@
1
+ import type { ErrorMessages } from '../types'
2
+
3
+ export const defaultErrorMessages: ErrorMessages<number> = {
4
+ default: (max: number) =>
5
+ `La longueur maximale du champ doit être de ${max} caractères.`,
6
+ }
@@ -0,0 +1,42 @@
1
+ import { isMaxLengthFn } from '..'
2
+ import { describe, it, expect } from 'vitest'
3
+
4
+ describe('maxLength', () => {
5
+ it('returns an error when the value is longer than maximum', () => {
6
+ const rule = isMaxLengthFn(1)
7
+
8
+ expect(typeof rule('0123')).toBe('string')
9
+ })
10
+
11
+ it('returns true when the value is shorter than the maximum', () => {
12
+ const rule = isMaxLengthFn(10)
13
+
14
+ expect(rule('012345')).toBe(true)
15
+ })
16
+
17
+ it('returns true when the value equals the maximum', () => {
18
+ const rule = isMaxLengthFn(10)
19
+
20
+ expect(rule('0123456789')).toBe(true)
21
+ })
22
+
23
+ it('returns true when the value is shorter than the maximum without counting spaces', () => {
24
+ const rule = isMaxLengthFn(10, true)
25
+
26
+ expect(rule('0 1 2 3 4 5')).toBe(true)
27
+ })
28
+
29
+ it('returns true if the value is falsy', () => {
30
+ const rule = isMaxLengthFn(10)
31
+
32
+ expect(rule('')).toBe(true)
33
+ })
34
+
35
+ it('works with custom error messages', () => {
36
+ const rule = isMaxLengthFn(1, false, {
37
+ default: 'test',
38
+ })
39
+
40
+ expect(rule('0123')).toBe('test')
41
+ })
42
+ })
@@ -0,0 +1,68 @@
1
+ import { Meta, Canvas, Source } from '@storybook/blocks';
2
+ import * as IsMinLengthStories from './IsMinLength.stories';
3
+
4
+ <Meta of={IsMinLengthStories} />
5
+
6
+ # Règle de validation `isMinLength`
7
+
8
+ La règle de validation `isMinLength` permet de limiter la longueur d'une chaîne de caractères dans un champs de formulaire.
9
+
10
+ ## Usage
11
+
12
+ Pour utiliser cette règle de validation, vous devez importer la fonction d'ordre supérieur `isMinLengthFn` depuis le package `@cnamts/synapse`.
13
+
14
+ <Source dark code={`
15
+ import { isMinLengthFn } from '@cnamts/synapse';
16
+ `} />
17
+
18
+ Vous devez ensuite faire appel à cette fonction en lui passant en paramètre la longueur minimale que vous souhaitez imposer.
19
+
20
+ <Source dark code={`
21
+ const min10 = isMinLengthFn(10);
22
+ `} />
23
+
24
+ Vous pouvez ensuite utiliser la fonction retournée comme règle d'un champs de formulaire.
25
+
26
+ <Source dark code={`
27
+ <script setup lang="ts">
28
+ import { isMinLengthFn } from '@cnamts/synapse';
29
+ import { VTextField } from 'vuetify/components';
30
+
31
+ const min10 = isMinLengthFn(10);
32
+
33
+ </script>
34
+
35
+ <template>
36
+ <VTextField
37
+ :rules="[min10]"
38
+ label="Min 10 characters"
39
+ />
40
+ </template>
41
+ `} />
42
+
43
+ ## API
44
+
45
+ <Source dark code={`
46
+ isMinLengthFn(
47
+ minLength: number,
48
+ ignoreSpaces?: boolean,
49
+ errorMessages?: {
50
+ default?: (length: number) => string;
51
+ }
52
+ ): (value: string) => true | string;
53
+ `} />
54
+
55
+ ### Arguments
56
+
57
+ - `minLength` : nombre entier positif représentant la longueur minimale à imposer.
58
+ - `ignoreSpaces` : booléen optionnel permettant d'ignorer les espaces dans le calcul de la longueur. Par défaut, la valeur est `false`.
59
+ - `errorMessages` : objet optionnel permettant de personnaliser les messages d'erreur. Les clés disponibles sont :
60
+ - `default` : message d'erreur par défaut. Vous pouvez utiliser la variable `{{ length }}` pour afficher la longueur minimale attendue.
61
+
62
+ ### Valeurs de retour
63
+
64
+ Retourne une fonction pouvant être utilisée comme règle de validation pour un champs de formulaire Vuetify.
65
+
66
+ ## Exemples
67
+
68
+ <Canvas of={IsMinLengthStories.Default} />