@cnamts/synapse 1.0.27 → 1.1.1

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 (621) hide show
  1. package/README.md +1 -1
  2. package/dist/{AutocompleteFilter-C9eLKyW8.js → AutocompleteFilter-CGF33skz.js} +3 -3
  3. package/dist/{DateFilter-y-GLkAkn.js → DateFilter-D7-MsKtx.js} +8 -8
  4. package/dist/{NumberFilter-DN6hIBS7.js → NumberFilter-bjQPPfsj.js} +1 -1
  5. package/dist/{PeriodFilter-MoUUp9qS.js → PeriodFilter-B3wJpK8-.js} +1 -1
  6. package/dist/{SelectFilter-bCbrdLmu.js → SelectFilter-BN6DbKAV.js} +1 -1
  7. package/dist/{TextFilter-CvjgEaoM.js → TextFilter-BffP0J2f.js} +4 -4
  8. package/dist/{apLightTheme2026-ug4Y23ns.js → apLightTheme2026-C4ygwMHC.js} +23 -22
  9. package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +10 -10
  10. package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +4 -4
  11. package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +6 -6
  12. package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +10 -10
  13. package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +10 -10
  14. package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +4 -4
  15. package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +4 -4
  16. package/dist/components/Captcha/Captcha.d.ts +27 -16
  17. package/dist/components/Captcha/CaptchaForm.d.ts +29 -3
  18. package/dist/components/Captcha/types.d.ts +14 -0
  19. package/dist/components/Captcha/useCaptchaValidation.d.ts +37 -0
  20. package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +2 -2
  21. package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +33 -13
  22. package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts +23 -0
  23. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +85 -313
  24. package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts +4 -4
  25. package/dist/components/Customs/Selects/SyInputSelect/SyInputSelect.d.ts +1 -1
  26. package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +9 -11
  27. package/dist/components/Customs/Selects/SySelect/composables/useSySelectValidation.d.ts +7 -7
  28. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +18 -49
  29. package/dist/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.d.ts +29 -0
  30. package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +46 -0
  31. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +19 -54
  32. package/dist/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.d.ts +27 -0
  33. package/dist/components/Customs/SyCheckbox/types.d.ts +49 -0
  34. package/dist/components/Customs/SyIcon/SyIcon.d.ts +77 -1
  35. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +10 -10
  36. package/dist/components/Customs/SyTextField/FieldState.d.ts +5 -0
  37. package/dist/components/Customs/SyTextField/SyTextField.d.ts +19 -79
  38. package/dist/components/Customs/SyTextField/locales.d.ts +7 -0
  39. package/dist/components/Customs/SyTextField/types.d.ts +67 -4
  40. package/dist/components/Customs/SyTextField/useNumberField.d.ts +23 -0
  41. package/dist/components/Customs/SyTextField/useSyTextFieldValidation.d.ts +38 -0
  42. package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +170 -622
  43. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +85 -311
  44. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +39 -152
  45. package/dist/components/DialogBox/DialogBox.d.ts +2 -0
  46. package/dist/components/DialogBox/locales.d.ts +1 -0
  47. package/dist/components/FilterInline/FilterInline.d.ts +3 -3
  48. package/dist/components/FilterSideBar/FilterSideBar.d.ts +8 -4
  49. package/dist/components/LunarCalendar/LunarCalendar.d.ts +43 -14
  50. package/dist/components/LunarCalendar/types.d.ts +35 -0
  51. package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +11 -12
  52. package/dist/components/MonthPicker/MonthPicker.d.ts +72 -1860
  53. package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +21 -1846
  54. package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +5 -0
  55. package/dist/components/MonthPicker/locales.d.ts +1 -0
  56. package/dist/components/MonthPicker/types.d.ts +11 -0
  57. package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +37 -24
  58. package/dist/components/NirField/NirField.d.ts +96 -325
  59. package/dist/components/NirField/useNirValidation.d.ts +17 -25
  60. package/dist/components/PageContainer/PageContainer.d.ts +8 -0
  61. package/dist/components/PasswordField/PasswordField.d.ts +18 -37
  62. package/dist/components/PasswordField/locales.d.ts +2 -0
  63. package/dist/components/PasswordField/types.d.ts +16 -0
  64. package/dist/components/PasswordField/usePasswordFieldValidation.d.ts +38 -0
  65. package/dist/components/PeriodField/PeriodField.d.ts +349 -1253
  66. package/dist/components/PhoneField/PhoneField.d.ts +960 -2051
  67. package/dist/components/PhoneField/indicatifs.d.ts +715 -8
  68. package/dist/components/PhoneField/locales.d.ts +7 -0
  69. package/dist/components/PhoneField/types.d.ts +29 -0
  70. package/dist/components/PhoneField/usePhoneFieldValidation.d.ts +45 -0
  71. package/dist/components/PhoneField/usePhoneIndicatifs.d.ts +947 -0
  72. package/dist/components/SearchListField/SearchListField.d.ts +3 -3
  73. package/dist/components/SyTextArea/SyTextArea.d.ts +14 -11
  74. package/dist/components/SyTextArea/composables/useSyTextAreaValidation.d.ts +7 -7
  75. package/dist/components/Tables/common/SyTablePagination.d.ts +19 -20
  76. package/dist/composables/unifyValidation/documentationValidationProps.d.ts +2 -2
  77. package/dist/composables/unifyValidation/useValidation.d.ts +4 -13
  78. package/dist/composables/useFilterable/useFilterable.d.ts +1 -2
  79. package/dist/design-system-v3.js +19 -19
  80. package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +11 -10
  81. package/dist/designTokens/tokens/baseTokens.d.ts +18 -18
  82. package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +10 -10
  83. package/dist/designTokens/tokens/pa/paLightTheme.d.ts +11 -10
  84. package/dist/designTokens/tokens/semanticTokens.d.ts +14 -14
  85. package/dist/{main-CI6Q9nmO.js → main-C4wAktOs.js} +14999 -14025
  86. package/dist/synapse.css +1 -1
  87. package/dist/vuetifyConfig.js +27 -25
  88. package/package.json +12 -11
  89. package/src/assets/compat/_legacy-tokens.scss +91 -0
  90. package/src/assets/overrides/_utilities.scss +23 -0
  91. package/src/components/Accordion/Accordion.stories.ts +121 -1
  92. package/src/components/Accordion/tests/Accordion.visual.cy.ts +44 -0
  93. package/src/components/Accordion/tests/__snapshots__/accordion-default.snap.png +0 -0
  94. package/src/components/Accordion/tests/__snapshots__/accordion-disabled-item.snap.png +0 -0
  95. package/src/components/Accordion/tests/__snapshots__/accordion-open-first.snap.png +0 -0
  96. package/src/components/BackBtn/BackBtn.mdx +1 -1
  97. package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
  98. package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
  99. package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
  100. package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
  101. package/src/components/BackToTopBtn/BackToTopBtn.mdx +0 -1
  102. package/src/components/BackToTopBtn/tests/BackToTopBtn.visual.cy.ts +34 -0
  103. package/src/components/BackToTopBtn/tests/__snapshots__/back-to-top-btn-custom-nudge.snap.png +0 -0
  104. package/src/components/BackToTopBtn/tests/__snapshots__/back-to-top-btn-default.snap.png +0 -0
  105. package/src/components/Captcha/Captcha.stories.ts +134 -31
  106. package/src/components/Captcha/Captcha.vue +95 -28
  107. package/src/components/Captcha/CaptchaForm.vue +51 -22
  108. package/src/components/Captcha/tests/Captcha.focus.spec.ts +214 -0
  109. package/src/components/Captcha/tests/Captcha.spec.ts +233 -24
  110. package/src/components/Captcha/tests/Captcha.visual.cy.ts +45 -0
  111. package/src/components/Captcha/tests/CaptchaForm.spec.ts +82 -0
  112. package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +20 -42
  113. package/src/components/Captcha/tests/__snapshots__/captcha-audio-type.snap.png +0 -0
  114. package/src/components/Captcha/tests/__snapshots__/captcha-image-type.snap.png +0 -0
  115. package/src/components/Captcha/tests/__snapshots__/captcha-no-helpdesk.snap.png +0 -0
  116. package/src/components/Captcha/types.ts +15 -0
  117. package/src/components/Captcha/useCaptchaValidation.ts +87 -0
  118. package/src/components/Captcha/validation/validation.stories.ts +1194 -0
  119. package/src/components/ChipList/ChipList.mdx +0 -1
  120. package/src/components/ChipList/tests/ChipList.visual.cy.ts +46 -0
  121. package/src/components/ChipList/tests/__snapshots__/chip-list-default.snap.png +0 -0
  122. package/src/components/ChipList/tests/__snapshots__/chip-list-readonly.snap.png +0 -0
  123. package/src/components/ChipList/tests/__snapshots__/chip-list-state-icons.snap.png +0 -0
  124. package/src/components/CollapsibleList/CollapsibleList.mdx +0 -1
  125. package/src/components/CollapsibleList/tests/CollapsibleList.visual.cy.ts +33 -0
  126. package/src/components/CollapsibleList/tests/__snapshots__/collapsible-list-default.snap.png +0 -0
  127. package/src/components/CollapsibleList/tests/__snapshots__/collapsible-list-no-title.snap.png +0 -0
  128. package/src/components/ContextualMenu/tests/ContextualMenu.visual.cy.ts +35 -0
  129. package/src/components/ContextualMenu/tests/__snapshots__/contextual-menu-default.snap.png +0 -0
  130. package/src/components/ContextualMenu/tests/__snapshots__/contextual-menu-selected.snap.png +0 -0
  131. package/src/components/CookieBanner/CookieBanner.mdx +0 -1
  132. package/src/components/CookieBanner/tests/CookieBanner.visual.cy.ts +29 -0
  133. package/src/components/CookieBanner/tests/__snapshots__/cookie-banner-default.snap.png +0 -0
  134. package/src/components/CookieBanner/tests/__snapshots__/cookie-banner-with-items.snap.png +0 -0
  135. package/src/components/CookiesSelection/tests/CookiesSelection.visual.cy.ts +21 -0
  136. package/src/components/CookiesSelection/tests/__snapshots__/cookies-selection-default.snap.png +0 -0
  137. package/src/components/CopyBtn/CopyBtn.mdx +0 -1
  138. package/src/components/CopyBtn/tests/CopyBtn.visual.cy.ts +24 -0
  139. package/src/components/CopyBtn/tests/__snapshots__/copy-btn-default.snap.png +0 -0
  140. package/src/components/CopyBtn/tests/__snapshots__/copy-btn-no-tooltip.snap.png +0 -0
  141. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +123 -439
  142. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +147 -41
  143. package/src/components/Customs/Selects/SelectBtnField/Validation/Validation.stories.ts +600 -0
  144. package/src/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.ts +87 -0
  145. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +402 -33
  146. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.visual.cy.ts +60 -0
  147. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +52 -38
  148. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-default.snap.png +0 -0
  149. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-inline.snap.png +0 -0
  150. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-readonly.snap.png +0 -0
  151. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-selected.snap.png +0 -0
  152. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +1 -1
  153. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +2 -0
  154. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.visual.cy.ts +63 -0
  155. package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-default.snap.png +0 -0
  156. package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-loading.snap.png +0 -0
  157. package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-multiple.snap.png +0 -0
  158. package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-with-value.snap.png +0 -0
  159. package/src/components/Customs/Selects/SyAutocomplete/validation/Validation.stories.ts +0 -93
  160. package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.visual.cy.ts +48 -0
  161. package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-default.snap.png +0 -0
  162. package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-required.snap.png +0 -0
  163. package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-with-value.snap.png +0 -0
  164. package/src/components/Customs/Selects/SySelect/SySelect.vue +22 -47
  165. package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +3 -3
  166. package/src/components/Customs/Selects/SySelect/tests/SySelect.visual.cy.ts +77 -0
  167. package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-clearable.snap.png +0 -0
  168. package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-default.snap.png +0 -0
  169. package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-multiple-chips.snap.png +0 -0
  170. package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-required.snap.png +0 -0
  171. package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-with-value.snap.png +0 -0
  172. package/src/components/Customs/Selects/SySelect/validation/Validation.stories.ts +1 -92
  173. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +342 -162
  174. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +77 -129
  175. package/src/components/Customs/SyCheckBoxGroup/Validation/Validation.stories.ts +1008 -0
  176. package/src/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.ts +107 -0
  177. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +180 -7
  178. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.visual.cy.ts +55 -0
  179. package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-default.snap.png +0 -0
  180. package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-disabled.snap.png +0 -0
  181. package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-selected.snap.png +0 -0
  182. package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-with-label.snap.png +0 -0
  183. package/src/components/Customs/SyCheckBoxGroup/types.ts +49 -0
  184. package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +41 -161
  185. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +71 -156
  186. package/src/components/Customs/SyCheckbox/Validation/Validation.stories.ts +654 -0
  187. package/src/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.ts +105 -0
  188. package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +106 -0
  189. package/src/components/Customs/SyCheckbox/tests/SyCheckbox.visual.cy.ts +61 -0
  190. package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-checked.snap.png +0 -0
  191. package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-disabled.snap.png +0 -0
  192. package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-indeterminate.snap.png +0 -0
  193. package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-required.snap.png +0 -0
  194. package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-unchecked.snap.png +0 -0
  195. package/src/components/Customs/SyCheckbox/tests/useSyCheckboxValidation.spec.ts +98 -0
  196. package/src/components/Customs/SyCheckbox/types.ts +51 -0
  197. package/src/components/Customs/SyIcon/SyIcon.vue +19 -1
  198. package/src/components/Customs/SyIcon/tests/SyIcon.visual.cy.ts +83 -0
  199. package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-color-error.snap.png +0 -0
  200. package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-decorative.snap.png +0 -0
  201. package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-informative.snap.png +0 -0
  202. package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-role-button.snap.png +0 -0
  203. package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-size-large.snap.png +0 -0
  204. package/src/components/Customs/SyIconButton/tests/SyIconButton.visual.cy.ts +55 -0
  205. package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-default.snap.png +0 -0
  206. package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-disabled.snap.png +0 -0
  207. package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-error.snap.png +0 -0
  208. package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-large.snap.png +0 -0
  209. package/src/components/Customs/SyPagination/tests/SyPagination.visual.cy.ts +40 -0
  210. package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-first-page.snap.png +0 -0
  211. package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-middle-page.snap.png +0 -0
  212. package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-with-label.snap.png +0 -0
  213. package/src/components/Customs/SyRadioGroup/SyRadioGroup.stories.ts +0 -1
  214. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +4 -3
  215. package/src/components/Customs/SyRadioGroup/composables/useSyRadioGroupValidation.ts +1 -1
  216. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-asterisk.snap.png +0 -0
  217. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-comfortable.snap.png +0 -0
  218. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-compact.snap.png +0 -0
  219. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-default.snap.png +0 -0
  220. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-disabled.snap.png +0 -0
  221. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-error.snap.png +0 -0
  222. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-no-details.snap.png +0 -0
  223. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-readonly.snap.png +0 -0
  224. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-selected.snap.png +0 -0
  225. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-success.snap.png +0 -0
  226. package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-warning.snap.png +0 -0
  227. package/src/components/Customs/SyRadioGroup/validation/Validation.stories.ts +63 -27
  228. package/src/components/Customs/SyTabs/tests/SyTabs.visual.cy.ts +30 -0
  229. package/src/components/Customs/SyTabs/tests/__snapshots__/sy-tabs-default.snap.png +0 -0
  230. package/src/components/Customs/SyTabs/tests/__snapshots__/sy-tabs-second-active.snap.png +0 -0
  231. package/src/components/Customs/SyTextField/FieldState.vue +50 -0
  232. package/src/components/Customs/SyTextField/SyTextField.stories.ts +160 -778
  233. package/src/components/Customs/SyTextField/SyTextField.vue +178 -160
  234. package/src/components/Customs/SyTextField/Validation/Validation.stories.ts +1164 -0
  235. package/src/components/Customs/SyTextField/locales.ts +12 -0
  236. package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +174 -8
  237. package/src/components/Customs/SyTextField/tests/SyTextField.visual.cy.ts +116 -0
  238. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-clearable.snap.png +0 -0
  239. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-default.snap.png +0 -0
  240. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number-disabled.snap.png +0 -0
  241. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number-no-spinner.snap.png +0 -0
  242. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number.snap.png +0 -0
  243. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-prepend-icon.snap.png +0 -0
  244. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-readonly.snap.png +0 -0
  245. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-required.snap.png +0 -0
  246. package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-with-value.snap.png +0 -0
  247. package/src/components/Customs/SyTextField/types.ts +70 -0
  248. package/src/components/Customs/SyTextField/useNumberField.ts +93 -0
  249. package/src/components/Customs/SyTextField/useSyTextFieldValidation.ts +95 -0
  250. package/src/components/DataList/DataList.mdx +0 -1
  251. package/src/components/DataList/tests/DataList.visual.cy.ts +85 -0
  252. package/src/components/DataList/tests/__snapshots__/data-list-default.snap.png +0 -0
  253. package/src/components/DataList/tests/__snapshots__/data-list-loading.snap.png +0 -0
  254. package/src/components/DataList/tests/__snapshots__/data-list-row.snap.png +0 -0
  255. package/src/components/DataList/tests/__snapshots__/data-list-with-icons.snap.png +0 -0
  256. package/src/components/DataList/tests/__snapshots__/data-list-with-title.snap.png +0 -0
  257. package/src/components/DataListGroup/DataListGroup.mdx +0 -1
  258. package/src/components/DataListGroup/tests/DataListGroup.visual.cy.ts +51 -0
  259. package/src/components/DataListGroup/tests/__snapshots__/data-list-group-default.snap.png +0 -0
  260. package/src/components/DataListGroup/tests/__snapshots__/data-list-group-loading.snap.png +0 -0
  261. package/src/components/DataListItem/tests/DataListItem.visual.cy.ts +53 -0
  262. package/src/components/DataListItem/tests/__snapshots__/data-list-item-chip.snap.png +0 -0
  263. package/src/components/DataListItem/tests/__snapshots__/data-list-item-default.snap.png +0 -0
  264. package/src/components/DataListItem/tests/__snapshots__/data-list-item-placeholder.snap.png +0 -0
  265. package/src/components/DataListItem/tests/__snapshots__/data-list-item-row.snap.png +0 -0
  266. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +1 -1
  267. package/src/components/DatePicker/CalendarMode/DatePicker.vue +7 -7
  268. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1 -1
  269. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +7 -8
  270. package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +1 -1
  271. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +2 -2
  272. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +1 -1
  273. package/src/components/DatePicker/composables/tests/useTodayButton.spec.ts +10 -10
  274. package/src/components/DatePicker/composables/useCalendarKeyboardNavigation.ts +11 -2
  275. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.visual.cy.ts +35 -0
  276. package/src/components/DeclarationAccessibilityPage/tests/__snapshots__/declaration-a11y-page-default.snap.png +0 -0
  277. package/src/components/DeclarationAccessibilityPage/tests/__snapshots__/declaration-a11y-page-full.snap.png +0 -0
  278. package/src/components/DiacriticPicker/DiacriticPicker.mdx +0 -1
  279. package/src/components/DiacriticPicker/tests/DiacriticPicker.visual.cy.ts +24 -0
  280. package/src/components/DiacriticPicker/tests/__snapshots__/diacritic-picker-custom-title.snap.png +0 -0
  281. package/src/components/DiacriticPicker/tests/__snapshots__/diacritic-picker-default.snap.png +0 -0
  282. package/src/components/DialogBox/DialogBox.mdx +0 -1
  283. package/src/components/DialogBox/DialogBox.stories.ts +399 -4
  284. package/src/components/DialogBox/DialogBox.vue +20 -0
  285. package/src/components/DialogBox/locales.ts +1 -0
  286. package/src/components/DialogBox/tests/DialogBox.spec.ts +73 -0
  287. package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +24 -0
  288. package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
  289. package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
  290. package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
  291. package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +2 -2
  292. package/src/components/DownloadBtn/tests/DownloadBtn.visual.cy.ts +38 -0
  293. package/src/components/DownloadBtn/tests/__snapshots__/download-btn-dark.snap.png +0 -0
  294. package/src/components/DownloadBtn/tests/__snapshots__/download-btn-idle.snap.png +0 -0
  295. package/src/components/ErrorPage/ErrorPage.mdx +1 -1
  296. package/src/components/ErrorPage/tests/ErrorPage.visual.cy.ts +32 -0
  297. package/src/components/ErrorPage/tests/__snapshots__/error-page-custom.snap.png +0 -0
  298. package/src/components/ErrorPage/tests/__snapshots__/error-page-default.snap.png +0 -0
  299. package/src/components/ErrorPage/tests/__snapshots__/error-page-no-btn.snap.png +0 -0
  300. package/src/components/ExternalLinks/ExternalLinks.mdx +0 -1
  301. package/src/components/ExternalLinks/tests/ExternalLinks.visual.cy.ts +30 -0
  302. package/src/components/ExternalLinks/tests/__snapshots__/external-links-default.snap.png +0 -0
  303. package/src/components/ExternalLinks/tests/__snapshots__/external-links-fixed.snap.png +0 -0
  304. package/src/components/FileList/FileList.mdx +0 -1
  305. package/src/components/FileList/tests/FileList.visual.cy.ts +31 -0
  306. package/src/components/FileList/tests/__snapshots__/file-list-default.snap.png +0 -0
  307. package/src/components/FileList/tests/__snapshots__/file-list-with-delete.snap.png +0 -0
  308. package/src/components/FilePreview/accessibilite/Accessibility.mdx +86 -8
  309. package/src/components/FileUpload/tests/FileUpload.visual.cy.ts +36 -0
  310. package/src/components/FileUpload/tests/__snapshots__/file-upload-default.snap.png +0 -0
  311. package/src/components/FileUpload/tests/__snapshots__/file-upload-disabled.snap.png +0 -0
  312. package/src/components/FileUpload/tests/__snapshots__/file-upload-multiple.snap.png +0 -0
  313. package/src/components/FilterInline/FilterInline.mdx +0 -1
  314. package/src/components/FilterInline/FilterInline.stories.ts +2 -0
  315. package/src/components/FilterInline/FilterInline.vue +10 -5
  316. package/src/components/FilterInline/tests/FilterInline.visual.cy.ts +25 -0
  317. package/src/components/FilterInline/tests/__snapshots__/filter-inline-default.snap.png +0 -0
  318. package/src/components/FilterSideBar/FilterSideBar.mdx +8 -1
  319. package/src/components/FilterSideBar/FilterSideBar.stories.ts +136 -1
  320. package/src/components/FilterSideBar/FilterSideBar.vue +30 -8
  321. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +55 -0
  322. package/src/components/FilterSideBar/tests/FilterSideBar.visual.cy.ts +37 -0
  323. package/src/components/FilterSideBar/tests/__snapshots__/filter-sidebar-default.snap.png +0 -0
  324. package/src/components/FilterSideBar/tests/__snapshots__/filter-sidebar-modale.snap.png +0 -0
  325. package/src/components/FooterBar/FooterBar.mdx +0 -1
  326. package/src/components/FooterBar/tests/FooterBar.visual.cy.ts +37 -0
  327. package/src/components/FooterBar/tests/__snapshots__/footer-bar-default.snap.png +0 -0
  328. package/src/components/FooterBar/tests/__snapshots__/footer-bar-no-logo.snap.png +0 -0
  329. package/src/components/FooterBar/tests/__snapshots__/footer-bar-no-social.snap.png +0 -0
  330. package/src/components/FooterBar/tests/__snapshots__/footer-bar-version.snap.png +0 -0
  331. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +0 -1
  332. package/src/components/FranceConnectBtn/tests/FranceConnectBtn.visual.cy.ts +38 -0
  333. package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-dark.snap.png +0 -0
  334. package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-default.snap.png +0 -0
  335. package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-plus.snap.png +0 -0
  336. package/src/components/HeaderBar/HeaderBar.mdx +0 -1
  337. package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +4 -4
  338. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
  339. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
  340. package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
  341. package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
  342. package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
  343. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
  344. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
  345. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
  346. package/src/components/HeaderLoading/HeaderLoading.mdx +0 -1
  347. package/src/components/HeaderLoading/tests/HeaderLoading.visual.cy.ts +34 -0
  348. package/src/components/HeaderLoading/tests/__snapshots__/header-loading-custom-size.snap.png +0 -0
  349. package/src/components/HeaderLoading/tests/__snapshots__/header-loading-default.snap.png +0 -0
  350. package/src/components/HeaderLoading/tests/__snapshots__/header-loading-standalone.snap.png +0 -0
  351. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +4 -4
  352. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.visual.cy.ts +34 -0
  353. package/src/components/HeaderNavigationBar/tests/__snapshots__/header-navigation-bar-default.snap.png +0 -0
  354. package/src/components/HeaderNavigationBar/tests/__snapshots__/header-navigation-bar-subtitle.snap.png +0 -0
  355. package/src/components/HeaderToolbar/tests/HeaderToolbar.visual.cy.ts +25 -0
  356. package/src/components/HeaderToolbar/tests/__snapshots__/header-toolbar-custom.snap.png +0 -0
  357. package/src/components/HeaderToolbar/tests/__snapshots__/header-toolbar-default.snap.png +0 -0
  358. package/src/components/LangBtn/LangBtn.mdx +0 -1
  359. package/src/components/LangBtn/tests/LangBtn.visual.cy.ts +33 -0
  360. package/src/components/LangBtn/tests/__snapshots__/lang-btn-default.snap.png +0 -0
  361. package/src/components/LangBtn/tests/__snapshots__/lang-btn-english.snap.png +0 -0
  362. package/src/components/LangBtn/tests/__snapshots__/lang-btn-no-arrow.snap.png +0 -0
  363. package/src/components/Logo/Logo.mdx +1 -1
  364. package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
  365. package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
  366. package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
  367. package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
  368. package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
  369. package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
  370. package/src/components/LogoBrandSection/tests/LogoBrandSection.visual.cy.ts +43 -0
  371. package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-default.snap.png +0 -0
  372. package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-mobile.snap.png +0 -0
  373. package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-reduced.snap.png +0 -0
  374. package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-with-title.snap.png +0 -0
  375. package/src/components/LunarCalendar/LunarCalendar.mdx +6 -9
  376. package/src/components/LunarCalendar/LunarCalendar.stories.ts +243 -46
  377. package/src/components/LunarCalendar/LunarCalendar.vue +61 -26
  378. package/src/components/LunarCalendar/Validation/Validation.stories.ts +717 -0
  379. package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +1 -1
  380. package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +197 -6
  381. package/src/components/LunarCalendar/tests/LunarCalendar.visual.cy.ts +36 -0
  382. package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-default.snap.png +0 -0
  383. package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-required.snap.png +0 -0
  384. package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-with-value.snap.png +0 -0
  385. package/src/components/LunarCalendar/tests/useLunarCalendarValidation.spec.ts +287 -0
  386. package/src/components/LunarCalendar/types.ts +39 -0
  387. package/src/components/LunarCalendar/useLunarCalendarValidation.ts +115 -39
  388. package/src/components/MaintenancePage/tests/MaintenancePage.visual.cy.ts +22 -0
  389. package/src/components/MaintenancePage/tests/__snapshots__/maintenance-page-custom.snap.png +0 -0
  390. package/src/components/MaintenancePage/tests/__snapshots__/maintenance-page-default.snap.png +0 -0
  391. package/src/components/MonthPicker/MonthPicker.stories.ts +38 -281
  392. package/src/components/MonthPicker/MonthPicker.vue +66 -17
  393. package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +44 -20
  394. package/src/components/MonthPicker/MonthPickerText/useTextField.ts +5 -0
  395. package/src/components/MonthPicker/Validation/Validation.stories.ts +1117 -0
  396. package/src/components/MonthPicker/locales.ts +1 -0
  397. package/src/components/MonthPicker/tests/MonthPicker.spec.ts +353 -2
  398. package/src/components/MonthPicker/tests/MonthPicker.visual.cy.ts +37 -0
  399. package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +14 -8
  400. package/src/components/MonthPicker/tests/__snapshots__/month-picker-default.snap.png +0 -0
  401. package/src/components/MonthPicker/tests/__snapshots__/month-picker-disabled.snap.png +0 -0
  402. package/src/components/MonthPicker/tests/__snapshots__/month-picker-readonly.snap.png +0 -0
  403. package/src/components/MonthPicker/tests/__snapshots__/month-picker-with-value.snap.png +0 -0
  404. package/src/components/MonthPicker/types.ts +16 -0
  405. package/src/components/MonthPicker/useMonthPickerValidation.ts +64 -27
  406. package/src/components/NirField/NirField.mdx +120 -66
  407. package/src/components/NirField/NirField.stories.ts +256 -682
  408. package/src/components/NirField/NirField.vue +98 -32
  409. package/src/components/NirField/tests/NirField.spec.ts +135 -14
  410. package/src/components/NirField/tests/NirField.visual.cy.ts +28 -0
  411. package/src/components/NirField/tests/__snapshots__/nir-field-complex.snap.png +0 -0
  412. package/src/components/NirField/tests/__snapshots__/nir-field-default.snap.png +0 -0
  413. package/src/components/NirField/tests/__snapshots__/nir-field-with-key.snap.png +0 -0
  414. package/src/components/NirField/tests/useNirValidation.spec.ts +168 -0
  415. package/src/components/NirField/useNirValidation.ts +44 -19
  416. package/src/components/NirField/validation/Validation.stories.ts +866 -0
  417. package/src/components/NotFoundPage/tests/NotFoundPage.visual.cy.ts +28 -0
  418. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +263 -245
  419. package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-custom-btn.snap.png +0 -0
  420. package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-default.snap.png +0 -0
  421. package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-no-btn.snap.png +0 -0
  422. package/src/components/NotificationBar/NotificationBar.mdx +0 -1
  423. package/src/components/NotificationBar/tests/NotificationBar.visual.cy.ts +54 -0
  424. package/src/components/NotificationBar/tests/__snapshots__/notification-bar-bottom.snap.png +0 -0
  425. package/src/components/NotificationBar/tests/__snapshots__/notification-bar-info.snap.png +0 -0
  426. package/src/components/NotificationBar/tests/__snapshots__/notification-bar-multiple.snap.png +0 -0
  427. package/src/components/PageContainer/PageContainer.mdx +0 -1
  428. package/src/components/PageContainer/PageContainer.stories.ts +170 -2
  429. package/src/components/PageContainer/PageContainer.vue +63 -8
  430. package/src/components/PageContainer/tests/PageContainer.visual.cy.ts +33 -0
  431. package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +19 -11
  432. package/src/components/PageContainer/tests/__snapshots__/page-container-color.snap.png +0 -0
  433. package/src/components/PageContainer/tests/__snapshots__/page-container-default.snap.png +0 -0
  434. package/src/components/PageContainer/tests/__snapshots__/page-container-md.snap.png +0 -0
  435. package/src/components/PaginatedTable/PaginatedTable.mdx +0 -1
  436. package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +99 -7
  437. package/src/components/PaginatedTable/tests/PaginatedTable.visual.cy.ts +41 -0
  438. package/src/components/PaginatedTable/tests/__snapshots__/paginated-table-default.snap.png +0 -0
  439. package/src/components/PaginatedTable/tests/__snapshots__/paginated-table-server.snap.png +0 -0
  440. package/src/components/PasswordField/PasswordField.mdx +5 -52
  441. package/src/components/PasswordField/PasswordField.stories.ts +74 -931
  442. package/src/components/PasswordField/PasswordField.vue +120 -191
  443. package/src/components/PasswordField/Validation/Validation.stories.ts +1295 -0
  444. package/src/components/PasswordField/locales.ts +2 -0
  445. package/src/components/PasswordField/tests/PasswordField.spec.ts +144 -106
  446. package/src/components/PasswordField/tests/PasswordField.visual.cy.ts +49 -0
  447. package/src/components/PasswordField/tests/__snapshots__/password-field-default.snap.png +0 -0
  448. package/src/components/PasswordField/tests/__snapshots__/password-field-disabled.snap.png +0 -0
  449. package/src/components/PasswordField/tests/__snapshots__/password-field-required.snap.png +0 -0
  450. package/src/components/PasswordField/tests/__snapshots__/password-field-underlined.snap.png +0 -0
  451. package/src/components/PasswordField/types.ts +17 -0
  452. package/src/components/PasswordField/usePasswordFieldValidation.ts +100 -0
  453. package/src/components/PeriodField/PeriodField.mdx +0 -1
  454. package/src/components/PeriodField/PeriodField.stories.ts +3 -1
  455. package/src/components/PeriodField/PeriodField.vue +1 -1
  456. package/src/components/PeriodField/tests/PeriodField.visual.cy.ts +39 -0
  457. package/src/components/PeriodField/tests/__snapshots__/period-field-default.snap.png +0 -0
  458. package/src/components/PeriodField/tests/__snapshots__/period-field-no-calendar.snap.png +0 -0
  459. package/src/components/PeriodField/tests/__snapshots__/period-field-required.snap.png +0 -0
  460. package/src/components/PeriodField/tests/__snapshots__/period-field-with-value.snap.png +0 -0
  461. package/src/components/PhoneField/PhoneField.mdx +2 -3
  462. package/src/components/PhoneField/PhoneField.stories.ts +227 -410
  463. package/src/components/PhoneField/PhoneField.vue +205 -439
  464. package/src/components/PhoneField/indicatifs.ts +1 -1
  465. package/src/components/PhoneField/locales.ts +7 -0
  466. package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -1
  467. package/src/components/PhoneField/tests/PhoneField.spec.ts +518 -220
  468. package/src/components/PhoneField/tests/PhoneField.visual.cy.ts +28 -0
  469. package/src/components/PhoneField/tests/__snapshots__/phone-field-default.snap.png +0 -0
  470. package/src/components/PhoneField/tests/__snapshots__/phone-field-with-country-code.snap.png +0 -0
  471. package/src/components/PhoneField/tests/__snapshots__/phone-field-with-value.snap.png +0 -0
  472. package/src/components/PhoneField/types.ts +30 -0
  473. package/src/components/PhoneField/usePhoneFieldValidation.ts +119 -0
  474. package/src/components/PhoneField/usePhoneIndicatifs.ts +89 -0
  475. package/src/components/PhoneField/validation/validation.stories.ts +717 -0
  476. package/src/components/RangeField/RangeField.mdx +0 -1
  477. package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
  478. package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
  479. package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
  480. package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
  481. package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
  482. package/src/components/RatingPicker/RatingPicker.mdx +0 -1
  483. package/src/components/RatingPicker/tests/RatingPicker.visual.cy.ts +52 -0
  484. package/src/components/RatingPicker/tests/__snapshots__/rating-picker-emotion.snap.png +0 -0
  485. package/src/components/RatingPicker/tests/__snapshots__/rating-picker-number.snap.png +0 -0
  486. package/src/components/RatingPicker/tests/__snapshots__/rating-picker-readonly.snap.png +0 -0
  487. package/src/components/RatingPicker/tests/__snapshots__/rating-picker-stars.snap.png +0 -0
  488. package/src/components/SearchListField/SearchListField.mdx +1 -1
  489. package/src/components/SearchListField/SearchListField.stories.ts +1 -1
  490. package/src/components/SearchListField/SearchListField.vue +9 -4
  491. package/src/components/SearchListField/tests/SearchListField.spec.ts +127 -0
  492. package/src/components/SearchListField/tests/SearchListField.visual.cy.ts +35 -0
  493. package/src/components/SearchListField/tests/__snapshots__/search-list-field-default.snap.png +0 -0
  494. package/src/components/SearchListField/tests/__snapshots__/search-list-field-with-selection.snap.png +0 -0
  495. package/src/components/SkipLink/tests/SkipLink.visual.cy.ts +16 -0
  496. package/src/components/SkipLink/tests/__snapshots__/skip-link-focused.snap.png +0 -0
  497. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +0 -1
  498. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.visual.cy.ts +33 -0
  499. package/src/components/SocialMediaLinks/tests/__snapshots__/social-media-links-default.snap.png +0 -0
  500. package/src/components/SocialMediaLinks/tests/__snapshots__/social-media-links-no-native-heading.snap.png +0 -0
  501. package/src/components/StatusPage/StatusPage.vue +1 -0
  502. package/src/components/StatusPage/tests/StatusPage.visual.cy.ts +47 -0
  503. package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +248 -230
  504. package/src/components/StatusPage/tests/__snapshots__/status-page-default.snap.png +0 -0
  505. package/src/components/StatusPage/tests/__snapshots__/status-page-full.snap.png +0 -0
  506. package/src/components/StatusPage/tests/__snapshots__/status-page-no-btn.snap.png +0 -0
  507. package/src/components/SubHeader/SubHeader.mdx +5 -6
  508. package/src/components/SubHeader/tests/SubHeader.visual.cy.ts +48 -0
  509. package/src/components/SubHeader/tests/__snapshots__/sub-header-default.snap.png +0 -0
  510. package/src/components/SubHeader/tests/__snapshots__/sub-header-loading.snap.png +0 -0
  511. package/src/components/SubHeader/tests/__snapshots__/sub-header-no-back-btn.snap.png +0 -0
  512. package/src/components/SubHeader/tests/__snapshots__/sub-header-with-subtitle.snap.png +0 -0
  513. package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
  514. package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
  515. package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
  516. package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
  517. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
  518. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
  519. package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
  520. package/src/components/SyHeading/tests/SyHeading.visual.cy.ts +33 -0
  521. package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-1.snap.png +0 -0
  522. package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-2.snap.png +0 -0
  523. package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-3.snap.png +0 -0
  524. package/src/components/SyTextArea/SyTextArea.stories.ts +25 -0
  525. package/src/components/SyTextArea/SyTextArea.vue +7 -0
  526. package/src/components/SyTextArea/composables/useSyTextAreaValidation.ts +1 -1
  527. package/src/components/SyTextArea/tests/SyTextArea.a11y.spec.ts +18 -0
  528. package/src/components/SyTextArea/tests/SyTextArea.spec.ts +135 -1
  529. package/src/components/SyTextArea/tests/SyTextArea.visual.cy.ts +48 -0
  530. package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-default.snap.png +0 -0
  531. package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-filled.snap.png +0 -0
  532. package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-required.snap.png +0 -0
  533. package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-with-value.snap.png +0 -0
  534. package/src/components/SyTextArea/validation/Validation.stories.ts +6 -86
  535. package/src/components/TableToolbar/tests/TableToolbar.visual.cy.ts +49 -0
  536. package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-default.snap.png +0 -0
  537. package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-filtered.snap.png +0 -0
  538. package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-loading.snap.png +0 -0
  539. package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-with-add-btn.snap.png +0 -0
  540. package/src/components/Tables/SyServerTable/SyServerTable.vue +3 -3
  541. package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +114 -7
  542. package/src/components/Tables/SyServerTable/tests/SyServerTable.visual.cy.ts +58 -0
  543. package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-default.snap.png +0 -0
  544. package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-loading.snap.png +0 -0
  545. package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-with-select.snap.png +0 -0
  546. package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +116 -7
  547. package/src/components/Tables/SyTable/tests/SyTable.visual.cy.ts +70 -0
  548. package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-compact.snap.png +0 -0
  549. package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-default.snap.png +0 -0
  550. package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-striped.snap.png +0 -0
  551. package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-with-select.snap.png +0 -0
  552. package/src/components/Tables/common/tableStyles.scss +4 -4
  553. package/src/components/Tables/common/tests/SyTableFilter.spec.ts +19 -13
  554. package/src/components/Tables/common/tests/filterByRange.spec.ts +23 -22
  555. package/src/components/ToolbarContainer/tests/ToolbarContainer.visual.cy.ts +34 -0
  556. package/src/components/ToolbarContainer/tests/__snapshots__/toolbar-container-default.snap.png +0 -0
  557. package/src/components/ToolbarContainer/tests/__snapshots__/toolbar-container-links.snap.png +0 -0
  558. package/src/components/UploadWorkflow/UploadWorkflow.mdx +0 -1
  559. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +1 -2
  560. package/src/components/UploadWorkflow/tests/UploadWorkflow.visual.cy.ts +39 -0
  561. package/src/components/UploadWorkflow/tests/__snapshots__/upload-workflow-default.snap.png +0 -0
  562. package/src/components/UploadWorkflow/tests/__snapshots__/upload-workflow-with-title.snap.png +0 -0
  563. package/src/components/UserMenuBtn/UserMenuBtn.mdx +0 -1
  564. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +177 -0
  565. package/src/components/UserMenuBtn/tests/UserMenuBtn.visual.cy.ts +42 -0
  566. package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-default.snap.png +0 -0
  567. package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-no-logout.snap.png +0 -0
  568. package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-with-name.snap.png +0 -0
  569. package/src/composables/unifyValidation/documentationValidationProps.ts +2 -2
  570. package/src/composables/unifyValidation/tests/documentationValidationProps.spec.ts +2 -2
  571. package/src/composables/unifyValidation/tests/useValidation.spec.ts +13 -1
  572. package/src/composables/unifyValidation/useValidation.ts +41 -31
  573. package/src/composables/useFilterable/useFilterable.spec.ts +105 -142
  574. package/src/composables/useFilterable/useFilterable.ts +6 -17
  575. package/src/composables/useFormFieldErrorHandling.ts +1 -1
  576. package/src/composables/validation/tests/useFormValidation.spec.ts +11 -2
  577. package/src/composables/validation/tests/useValidatable.spec.ts +16 -6
  578. package/src/composables/validation/tests/useValidation.spec.ts +2 -2
  579. package/src/composables/validation/useValidation.ts +1 -1
  580. package/src/composantsVuetify/VCard/VCard.mdx +12 -0
  581. package/src/composantsVuetify/VCard/v-card.stories.ts +283 -1
  582. package/src/composantsVuetify/VCarousel/VCarousel.mdx +74 -0
  583. package/src/composantsVuetify/VCarousel/v-carousel.stories.ts +531 -0
  584. package/src/composantsVuetify/VNavigationDrawer/VNavgationDrawer.mdx +53 -0
  585. package/src/composantsVuetify/VNavigationDrawer/v-navigation-drawer.stories.ts +310 -0
  586. package/src/composantsVuetify/VSlideGroup/VSlideGroup.mdx +105 -0
  587. package/src/composantsVuetify/VSlideGroup/v-slide-group.stories.ts +463 -0
  588. package/src/composantsVuetify/VStepper/VStepper.mdx +56 -0
  589. package/src/composantsVuetify/VStepper/v-stepper.stories.ts +563 -0
  590. package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -0
  591. package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
  592. package/src/designTokens/tokens/baseColors.ts +1 -1
  593. package/src/designTokens/tokens/baseTokens.ts +18 -18
  594. package/src/designTokens/tokens/pa/paLightTheme.ts +1 -0
  595. package/src/stories/Accessibilite/DesignSystem/a11y-status.json +1 -1
  596. package/src/stories/Components/Components.stories.ts +95 -11
  597. package/src/stories/Demarrer/Releases.stories.ts +59 -2
  598. package/src/stories/DesignTokens/Arrondis.mdx +1 -1
  599. package/src/stories/DesignTokens/Colors.mdx +2 -0
  600. package/src/stories/DesignTokens/Correspondances.mdx +219 -0
  601. package/src/stories/DesignTokens/UtiliserLesTokens.mdx +235 -0
  602. package/src/stories/DesignTokens/colors.stories.ts +582 -569
  603. package/src/stories/EcoConception/EcoBestPracticesDoc.vue +930 -0
  604. package/src/stories/EcoConception/EcoBestPratices.mdx +38 -0
  605. package/src/stories/EcoConception/Introduction.mdx +8 -1
  606. package/src/stories/EcoConception/datas/bonnes_pratiques_essentielles.json +1018 -0
  607. package/src/stories/EcoConception/ecoconception-best-practices.stories.ts +20 -0
  608. package/src/stories/GuideDuDev/Amelipro.mdx +9 -1
  609. package/src/stories/GuideDuDev/Amelipro.stories.ts +1023 -168
  610. package/src/stories/GuideDuDev/PortailAgent.stories.ts +0 -1
  611. package/src/utils/functions/deepCopy/index.ts +2 -3
  612. package/dist/components/Customs/SyCheckbox/locales.d.ts +0 -3
  613. package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +0 -5
  614. package/dist/components/PhoneField/tests/types.d.ts +0 -18
  615. package/dist/components/SyHeading/SyHeading.a11y.test.d.ts +0 -1
  616. package/dist/components/SyHeading/SyHeading.test.d.ts +0 -1
  617. package/src/components/Customs/SyCheckbox/locales.ts +0 -3
  618. package/src/components/Customs/SyTextField/types.d.ts +0 -4
  619. package/src/components/LunarCalendar/tests/useLunarCalendarRules.spec.ts +0 -184
  620. package/src/components/LunarCalendar/useLunarCalendarRules.ts +0 -96
  621. package/src/components/PhoneField/tests/types.d.ts +0 -19
@@ -45,7 +45,7 @@ export const validationPropsDefaults = {
45
45
  disabled: false,
46
46
  required: false,
47
47
  isValidateOnBlur: true,
48
- showSuccessMessages: true,
48
+ showSuccessMessages: false,
49
49
  disableErrorHandling: false,
50
50
  customRules: () => [],
51
51
  customWarningRules: () => [],
@@ -76,13 +76,13 @@ export function useValidation(params: {
76
76
  hasErrorProp?: Ref<boolean>
77
77
  hasWarningProp?: Ref<boolean>
78
78
  hasSuccessProp?: Ref<boolean>
79
+ maxErrors?: Ref<number>
79
80
  } & ({
80
81
  useVuetifyValidation: true
81
82
  rules: Ref<VuetifyValidationRule[] | undefined>
82
83
  customRules?: never
83
84
  customWarningRules?: never
84
85
  customSuccessRules?: never
85
- maxErrors?: Ref<number>
86
86
  } | {
87
87
  useVuetifyValidation: false
88
88
  customRules: Ref<SyValidationRule[]>
@@ -95,20 +95,7 @@ export function useValidation(params: {
95
95
  customWarningRules?: Ref<SyValidationRule[]>
96
96
  customSuccessRules?: Ref<SyValidationRule[]>
97
97
  rules: Ref<VuetifyValidationRule[] | undefined>
98
- maxErrors?: Ref<number>
99
98
  })) {
100
- if (params.disableErrorHandling.value) {
101
- return {
102
- errors: ref<string[]>([]),
103
- warnings: ref<string[]>([]),
104
- successes: ref<string[]>([]),
105
- hasError: computed(() => params.hasErrorProp?.value ?? false),
106
- hasWarning: computed(() => params.hasWarningProp?.value ?? false),
107
- hasSuccess: computed(() => params.hasSuccessProp?.value ?? false),
108
- validate: async () => true,
109
- clearValidation: () => {},
110
- }
111
- }
112
99
  const vuetifyErrors = ref<string[]>([])
113
100
  const customErrors = ref<string[]>([])
114
101
  const innerWarnings = ref<string[]>([])
@@ -126,7 +113,7 @@ export function useValidation(params: {
126
113
  computed(() => params.errorMessages?.value || []),
127
114
  params.focused,
128
115
  params.maxErrors,
129
- params.label,
116
+ computed(() => toValue(params.useVuetifyValidation) ? params.label?.value : undefined),
130
117
  params.label,
131
118
  params.readonly,
132
119
  computed(() => params.isValidateOnBlur.value ? 'blur' : 'input'),
@@ -171,23 +158,45 @@ export function useValidation(params: {
171
158
  }
172
159
  }
173
160
 
174
- const errors = computed(() => [...new Set([
175
- ...vuetifyErrors.value,
176
- ...customErrors.value,
177
- ...(params.errorMessages?.value || []),
178
- ])])
179
- const warnings = computed(() => [...new Set([
180
- ...innerWarnings.value,
181
- ...(params.warningMessages?.value || []),
182
- ])])
183
- const successes = computed(() => [...new Set([
184
- ...(params.showSuccessMessages.value ? innerSuccesses.value : []),
185
- ...(params.successMessages?.value || []),
186
- ])])
161
+ const errors = computed(() => {
162
+ const errorslist = [...params.errorMessages?.value || []]
163
+ if (toValue(params.disableErrorHandling) !== true) {
164
+ errorslist.push(...vuetifyErrors.value)
165
+ errorslist.push(...customErrors.value)
166
+ }
167
+
168
+ const max = params.maxErrors?.value
169
+ return max && max > 0 ? [...new Set(errorslist)].slice(0, max) : [...new Set(errorslist)]
170
+ })
171
+
172
+ const warnings = computed(() => {
173
+ const warningsList = [...params.warningMessages?.value || []]
174
+ if (toValue(params.disableErrorHandling) !== true) {
175
+ warningsList.push(...innerWarnings.value)
176
+ }
177
+ const max = params.maxErrors?.value
178
+ return max && max > 0 ? [...new Set(warningsList)].slice(0, max) : [...new Set(warningsList)]
179
+ })
180
+ const successes = computed(() => {
181
+ const successesList = [...params.successMessages?.value || []]
182
+ if (toValue(params.disableErrorHandling) !== true) {
183
+ successesList.push(...innerSuccesses.value)
184
+ }
185
+ const max = params.maxErrors?.value
186
+ return max && max > 0 ? [...new Set(successesList)].slice(0, max) : [...new Set(successesList)]
187
+ })
187
188
  const internalHasSuccess = computed(() => customValidator.hasSuccess.value)
188
189
 
189
- const hasError = computed(() => errors.value.length > 0 || params.hasErrorProp?.value)
190
- const hasWarning = computed(() => warnings.value.length > 0 || params.hasWarningProp?.value)
190
+ const hasError = computed(() => errors.value.length > 0 || Boolean(params.hasErrorProp?.value))
191
+ const hasWarning = computed(() => warnings.value.length > 0 || Boolean(params.hasWarningProp?.value))
192
+
193
+ const state = computed(() => {
194
+ if (hasError.value) return 'error'
195
+ if (hasWarning.value) return 'warning'
196
+ if (hasSuccess.value) return 'success'
197
+ return 'default'
198
+ })
199
+
191
200
  // TODO: vérifier si c'est la meilleure approche pour supprimer le succès en mode Vuetify
192
201
  const hasSuccess = computed(() => {
193
202
  if (toValue(params.useVuetifyValidation)) {
@@ -212,6 +221,7 @@ export function useValidation(params: {
212
221
  hasError,
213
222
  hasWarning,
214
223
  hasSuccess,
224
+ state,
215
225
  validate,
216
226
  clearValidation,
217
227
  }
@@ -1,4 +1,4 @@
1
- import { describe, it, expect, vi } from 'vitest'
1
+ import { describe, it, expect } from 'vitest'
2
2
  import useFilterable, { type FilterItem, type FilterProp } from './useFilterable'
3
3
  import type { ChipItem } from '@/components/ChipList/types'
4
4
  import { nextTick, ref } from 'vue'
@@ -6,10 +6,7 @@ import { nextTick, ref } from 'vue'
6
6
  describe('Filterable', () => {
7
7
  describe('formatFilterName', () => {
8
8
  it('preserves existing behavior for names with spaces', () => {
9
- const { formatFilterName } = useFilterable(
10
- ref([]),
11
- () => {},
12
- )
9
+ const { formatFilterName } = useFilterable(ref([]))
13
10
 
14
11
  const name = formatFilterName('Test Name')
15
12
  expect(name).toBe('test-name')
@@ -19,10 +16,7 @@ describe('Filterable', () => {
19
16
  })
20
17
 
21
18
  it('preserves existing behavior for names with special characters', () => {
22
- const { formatFilterName } = useFilterable(
23
- ref([]),
24
- () => {},
25
- )
19
+ const { formatFilterName } = useFilterable(ref([]))
26
20
 
27
21
  const nameWithSpecialChars = formatFilterName('Filter@Name#Test')
28
22
  expect(nameWithSpecialChars).toBe('filternametest')
@@ -32,10 +26,7 @@ describe('Filterable', () => {
32
26
  })
33
27
 
34
28
  it('fixes camelCase issue by preserving case for single words', () => {
35
- const { formatFilterName } = useFilterable(
36
- ref([]),
37
- () => {},
38
- )
29
+ const { formatFilterName } = useFilterable(ref([]))
39
30
 
40
31
  const camelCaseName = formatFilterName('totoCase')
41
32
  expect(camelCaseName).toBe('totoCase')
@@ -48,10 +39,7 @@ describe('Filterable', () => {
48
39
  })
49
40
 
50
41
  it('handles edge cases correctly', () => {
51
- const { formatFilterName } = useFilterable(
52
- ref([]),
53
- () => {},
54
- )
42
+ const { formatFilterName } = useFilterable(ref([]))
55
43
 
56
44
  // Single lowercase word
57
45
  expect(formatFilterName('name')).toBe('name')
@@ -69,10 +57,7 @@ describe('Filterable', () => {
69
57
 
70
58
  describe('getChips', () => {
71
59
  it('uses the formatChip function to compute the chip', () => {
72
- const { getChips, getFilterCount } = useFilterable(
73
- ref([]),
74
- () => {},
75
- )
60
+ const { getChips, getFilterCount } = useFilterable(ref([]))
76
61
 
77
62
  const filter = {
78
63
  name: 'Test',
@@ -100,10 +85,7 @@ describe('Filterable', () => {
100
85
  })
101
86
 
102
87
  it('returns an empty array when the value is an empty string', () => {
103
- const { getChips, getFilterCount } = useFilterable(
104
- ref([]),
105
- () => {},
106
- )
88
+ const { getChips, getFilterCount } = useFilterable(ref([]))
107
89
 
108
90
  const filter = {
109
91
  name: 'Test',
@@ -118,10 +100,7 @@ describe('Filterable', () => {
118
100
  })
119
101
 
120
102
  it('returns the correct text when the value is a string', () => {
121
- const { getChips, getFilterCount } = useFilterable(
122
- ref([]),
123
- () => {},
124
- )
103
+ const { getChips, getFilterCount } = useFilterable(ref([]))
125
104
 
126
105
  const filter = {
127
106
  name: 'Test',
@@ -141,10 +120,7 @@ describe('Filterable', () => {
141
120
  })
142
121
 
143
122
  it('returns the correct text when the value is a number', () => {
144
- const { getChips, getFilterCount } = useFilterable(
145
- ref([]),
146
- () => {},
147
- )
123
+ const { getChips, getFilterCount } = useFilterable(ref([]))
148
124
 
149
125
  const filter = {
150
126
  name: 'Test',
@@ -164,10 +140,7 @@ describe('Filterable', () => {
164
140
  })
165
141
 
166
142
  it('returns the correct text when the value is a period field object', () => {
167
- const { getChips, getFilterCount } = useFilterable(
168
- ref([]),
169
- () => {},
170
- )
143
+ const { getChips, getFilterCount } = useFilterable(ref([]))
171
144
 
172
145
  const filter = {
173
146
  name: 'Test',
@@ -193,10 +166,7 @@ describe('Filterable', () => {
193
166
  })
194
167
 
195
168
  it('returns an empty array when the value is a period field object with null values', () => {
196
- const { getChips, getFilterCount } = useFilterable(
197
- ref([]),
198
- () => {},
199
- )
169
+ const { getChips, getFilterCount } = useFilterable(ref([]))
200
170
 
201
171
  const filter = {
202
172
  name: 'Test',
@@ -214,10 +184,7 @@ describe('Filterable', () => {
214
184
  })
215
185
 
216
186
  it('returns a chip when only from is set', () => {
217
- const { getChips, getFilterCount } = useFilterable(
218
- ref([]),
219
- () => {},
220
- )
187
+ const { getChips, getFilterCount } = useFilterable(ref([]))
221
188
 
222
189
  const filter = {
223
190
  name: 'Test',
@@ -235,10 +202,7 @@ describe('Filterable', () => {
235
202
  })
236
203
 
237
204
  it('returns a chip when only to is set', () => {
238
- const { getChips, getFilterCount } = useFilterable(
239
- ref([]),
240
- () => {},
241
- )
205
+ const { getChips, getFilterCount } = useFilterable(ref([]))
242
206
 
243
207
  const filter = {
244
208
  name: 'Test',
@@ -256,10 +220,7 @@ describe('Filterable', () => {
256
220
  })
257
221
 
258
222
  it('returns the correct text when the value is an object', () => {
259
- const { getChips, getFilterCount } = useFilterable(
260
- ref([]),
261
- () => {},
262
- )
223
+ const { getChips, getFilterCount } = useFilterable(ref([]))
263
224
 
264
225
  const filter = {
265
226
  name: 'Test',
@@ -290,10 +251,7 @@ describe('Filterable', () => {
290
251
  })
291
252
 
292
253
  it('returns the correct text when the value is an array', () => {
293
- const { getChips, getFilterCount } = useFilterable(
294
- ref([]),
295
- () => {},
296
- )
254
+ const { getChips, getFilterCount } = useFilterable(ref([]))
297
255
 
298
256
  const filter = {
299
257
  name: 'Test',
@@ -317,10 +275,7 @@ describe('Filterable', () => {
317
275
  })
318
276
 
319
277
  it('returns the correct text when the value is an array of objects', () => {
320
- const { getChips, getFilterCount } = useFilterable(
321
- ref([]),
322
- () => {},
323
- )
278
+ const { getChips, getFilterCount } = useFilterable(ref([]))
324
279
 
325
280
  const filter = {
326
281
  name: 'Test',
@@ -355,10 +310,7 @@ describe('Filterable', () => {
355
310
  })
356
311
 
357
312
  it('returns the correct text when the value is an array of objects with text properties', () => {
358
- const { getChips, getFilterCount } = useFilterable(
359
- ref([]),
360
- () => {},
361
- )
313
+ const { getChips, getFilterCount } = useFilterable(ref([]))
362
314
 
363
315
  const filter = {
364
316
  name: 'Test',
@@ -393,10 +345,7 @@ describe('Filterable', () => {
393
345
  })
394
346
 
395
347
  it('returns the correct text when the value is an array of objects with text and value properties', () => {
396
- const { getChips, getFilterCount } = useFilterable(
397
- ref([]),
398
- () => {},
399
- )
348
+ const { getChips, getFilterCount } = useFilterable(ref([]))
400
349
 
401
350
  const filter = {
402
351
  name: 'Test',
@@ -435,10 +384,7 @@ describe('Filterable', () => {
435
384
  })
436
385
 
437
386
  it('returns an empty array when the value is undefined', () => {
438
- const { getChips, getFilterCount } = useFilterable(
439
- ref([]),
440
- () => {},
441
- )
387
+ const { getChips, getFilterCount } = useFilterable(ref([]))
442
388
 
443
389
  const filter = {} as FilterItem
444
390
 
@@ -452,10 +398,7 @@ describe('Filterable', () => {
452
398
 
453
399
  describe('removeChip', () => {
454
400
  it('removes the chip from the filter', () => {
455
- const { removeChip } = useFilterable(
456
- ref([]),
457
- () => {},
458
- )
401
+ const { removeChip } = useFilterable(ref([]))
459
402
 
460
403
  const filter = {
461
404
  name: 'Test',
@@ -473,10 +416,7 @@ describe('Filterable', () => {
473
416
  })
474
417
 
475
418
  it('removes the chip from the filter when the value is a number', () => {
476
- const { removeChip } = useFilterable(
477
- ref([]),
478
- () => {},
479
- )
419
+ const { removeChip } = useFilterable(ref([]))
480
420
 
481
421
  const filter = {
482
422
  name: 'Test',
@@ -494,10 +434,7 @@ describe('Filterable', () => {
494
434
  })
495
435
 
496
436
  it('removes the chip from the filter when the value is an object', () => {
497
- const { removeChip } = useFilterable(
498
- ref([]),
499
- () => {},
500
- )
437
+ const { removeChip } = useFilterable(ref([]))
501
438
 
502
439
  const filter = {
503
440
  name: 'Test',
@@ -524,10 +461,7 @@ describe('Filterable', () => {
524
461
  })
525
462
 
526
463
  it('removes the chip from the filter when the value is a period field object', () => {
527
- const { removeChip } = useFilterable(
528
- ref([]),
529
- () => {},
530
- )
464
+ const { removeChip } = useFilterable(ref([]))
531
465
 
532
466
  const periodFilter = {
533
467
  name: 'Test',
@@ -551,10 +485,7 @@ describe('Filterable', () => {
551
485
  })
552
486
 
553
487
  it('removes the chip from the filter when the value is a period field object with null values', () => {
554
- const { removeChip } = useFilterable(
555
- ref([]),
556
- () => {},
557
- )
488
+ const { removeChip } = useFilterable(ref([]))
558
489
 
559
490
  const periodFilter = {
560
491
  name: 'Test',
@@ -578,10 +509,7 @@ describe('Filterable', () => {
578
509
  })
579
510
 
580
511
  it('removes the chip from the filter when the value is an array', () => {
581
- const { removeChip } = useFilterable(
582
- ref([]),
583
- () => {},
584
- )
512
+ const { removeChip } = useFilterable(ref([]))
585
513
 
586
514
  const arrayFilter = {
587
515
  name: 'Test',
@@ -599,10 +527,7 @@ describe('Filterable', () => {
599
527
  })
600
528
 
601
529
  it('removes the chip from the filter when the value is an array of objects', () => {
602
- const { removeChip } = useFilterable(
603
- ref([]),
604
- () => {},
605
- )
530
+ const { removeChip } = useFilterable(ref([]))
606
531
 
607
532
  const arrayFilter = {
608
533
  name: 'Test',
@@ -633,10 +558,7 @@ describe('Filterable', () => {
633
558
  })
634
559
 
635
560
  it('removes the chip from the filter when the value is an empty array', () => {
636
- const { removeChip } = useFilterable(
637
- ref([]),
638
- () => {},
639
- )
561
+ const { removeChip } = useFilterable(ref([]))
640
562
 
641
563
  const arrayFilter = {
642
564
  name: 'Test',
@@ -654,10 +576,7 @@ describe('Filterable', () => {
654
576
  })
655
577
 
656
578
  it('removes the chip from the filter when the value is an array of strings', () => {
657
- const { removeChip } = useFilterable(
658
- ref([]),
659
- () => {},
660
- )
579
+ const { removeChip } = useFilterable(ref([]))
661
580
 
662
581
  const arrayFilter = {
663
582
  name: 'Test',
@@ -677,10 +596,7 @@ describe('Filterable', () => {
677
596
 
678
597
  describe('resetFilter', () => {
679
598
  it('resets the filter', () => {
680
- const { resetFilter } = useFilterable(
681
- ref([]),
682
- () => {},
683
- )
599
+ const { resetFilter } = useFilterable(ref([]))
684
600
 
685
601
  const filter = {
686
602
  name: 'Test',
@@ -694,42 +610,89 @@ describe('Filterable', () => {
694
610
  })
695
611
 
696
612
  describe('resetAllFilters', () => {
697
- it('resets all filters', async () => {
698
- const filters = ref<FilterProp>([])
699
- const emitsFunction = vi.fn()
700
- const { resetAllFilters } = useFilterable(
701
- filters,
702
- emitsFunction,
703
- )
704
-
705
- filters.value = [
706
- {
707
- name: 'Test',
708
- value: 'test',
709
- },
710
- {
711
- name: 'Test 2',
712
- value: 'test 2',
713
- },
613
+ it('sets all filter values to undefined', async () => {
614
+ const model = ref<FilterProp>([
615
+ { name: 'Test', value: 'test' },
616
+ { name: 'Test 2', value: 'test 2' },
617
+ ])
618
+ const { filters, resetAllFilters } = useFilterable(model)
619
+
620
+ resetAllFilters()
621
+
622
+ expect(filters.value.every(f => f.value === undefined)).toBe(true)
623
+ })
624
+ })
625
+
626
+ describe('model sync (full replacement)', () => {
627
+ it('initializes filters with a deep copy of the model on mount', () => {
628
+ const model = ref<FilterProp>([
629
+ { name: 'folder', value: ['cardio'] },
630
+ ])
631
+
632
+ const { filters } = useFilterable(model)
633
+
634
+ expect(filters.value).toEqual([{ name: 'folder', value: ['cardio'] }])
635
+ // Ensure it is a deep copy, not the same object reference
636
+ expect(filters.value[0]).not.toBe(model.value[0])
637
+ })
638
+
639
+ it('replaces local pending state when model updates another filter externally', async () => {
640
+ const model = ref<FilterProp>([
641
+ { name: 'folder', value: undefined },
642
+ { name: 'profession', value: undefined },
643
+ ])
644
+
645
+ const { filters } = useFilterable(model)
646
+
647
+ // Simulate a local pending selection in FilterSideBar (not yet applied)
648
+ filters.value.find(f => f.name === 'profession')!.value = ['infirmier']
649
+
650
+ // FilterInline updates 'folder' in the shared model
651
+ model.value = [
652
+ { name: 'folder', value: ['cardiologie'] },
653
+ { name: 'profession', value: undefined },
714
654
  ]
655
+ await nextTick()
656
+
657
+ // Current behavior: full model deep-copy on external change resets local pending state
658
+ expect(filters.value.find(f => f.name === 'profession')?.value).toBeUndefined()
659
+ // 'folder' must reflect the external change
660
+ expect(filters.value.find(f => f.name === 'folder')?.value).toEqual(['cardiologie'])
661
+ })
662
+
663
+ it('replaces local state when the model externally changes the same filter', async () => {
664
+ const model = ref<FilterProp>([
665
+ { name: 'folder', value: ['old-value'] },
666
+ ])
667
+
668
+ const { filters } = useFilterable(model)
715
669
 
670
+ // User has a local pending selection (not yet applied)
671
+ filters.value.find(f => f.name === 'folder')!.value = ['local-pending']
672
+
673
+ // External update changes the same filter
674
+ model.value = [{ name: 'folder', value: ['new-external'] }]
716
675
  await nextTick()
717
676
 
718
- resetAllFilters()
677
+ expect(filters.value.find(f => f.name === 'folder')?.value).toEqual(['new-external'])
678
+ })
679
+
680
+ it('replaces local pending state even when model content is identical', async () => {
681
+ const model = ref<FilterProp>([
682
+ { name: 'folder', value: undefined },
683
+ ])
719
684
 
720
- expect(emitsFunction).toHaveBeenCalledTimes(1)
721
- const emittedCall = emitsFunction.mock.calls[0]
722
- expect(emittedCall?.[0]).toBe('update:modelValue')
685
+ const { filters } = useFilterable(model)
723
686
 
724
- // Use JSON serialization for robust comparison in CI environments
725
- const emittedArray = emittedCall?.[1]
726
- const expectedArray = [
727
- { name: 'Test', value: undefined },
728
- { name: 'Test 2', value: undefined },
729
- ]
687
+ // User has local pending state
688
+ filters.value.find(f => f.name === 'folder')!.value = ['local']
689
+
690
+ // Re-assign the model with the same content (e.g. echo from own emit)
691
+ model.value = [{ name: 'folder', value: undefined }]
692
+ await nextTick()
730
693
 
731
- // Compare as JSON strings to avoid reference/prototype issues
732
- expect(JSON.stringify(emittedArray)).toBe(JSON.stringify(expectedArray))
694
+ // Current behavior: update is applied from model, local pending state is replaced
695
+ expect(filters.value.find(f => f.name === 'folder')?.value).toBeUndefined()
733
696
  })
734
697
  })
735
698
  })
@@ -1,4 +1,4 @@
1
- import { ref, watch, type Ref } from 'vue'
1
+ import { ref, toRaw, watch, type Ref } from 'vue'
2
2
  import type { ChipItem } from '@/components/ChipList/types'
3
3
  import slugify from 'slugify'
4
4
  import { deepCopy } from '@/utils/functions/deepCopy'
@@ -13,11 +13,11 @@ export type FilterItem = {
13
13
 
14
14
  export type FilterProp = FilterItem[]
15
15
 
16
- export default function useFilterable(model: Ref<FilterProp>, emits) {
16
+ export default function useFilterable(model: Ref<FilterProp>) {
17
17
  const filters = ref<FilterProp>([])
18
18
 
19
19
  watch(model, (newFilters) => {
20
- filters.value = deepCopy(newFilters)
20
+ filters.value = deepCopy(toRaw(newFilters))
21
21
  }, { deep: true, immediate: true })
22
22
 
23
23
  function getFilterCount(filter: FilterItem): number {
@@ -172,7 +172,6 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
172
172
  : undefined
173
173
 
174
174
  filter.value = newValue
175
- updateValue()
176
175
 
177
176
  return
178
177
  }
@@ -187,7 +186,6 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
187
186
 
188
187
  if (isPeriodField) {
189
188
  filter.value = undefined
190
- updateValue()
191
189
 
192
190
  return
193
191
  }
@@ -197,7 +195,7 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
197
195
  if (hasSelectStructure) {
198
196
  // For single select objects, clear the entire value
199
197
  filter.value = undefined
200
- updateValue()
198
+
201
199
  return
202
200
  }
203
201
 
@@ -205,29 +203,20 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
205
203
  delete typedValue[chipValue]
206
204
  filter.value = typedValue
207
205
  }
208
- updateValue()
209
206
  }
210
207
 
211
208
  function resetFilter(filter: FilterItem): void {
212
209
  filter.value = undefined
213
- updateValue()
214
210
  }
215
211
 
216
212
  function resetAllFilters(): void {
217
- filters.value.forEach((filter) => {
218
- filter.value = undefined
213
+ filters.value.forEach((filter: FilterItem) => {
214
+ resetFilter(filter)
219
215
  })
220
-
221
- updateValue()
222
- }
223
-
224
- function updateValue(): void {
225
- emits('update:modelValue', filters.value)
226
216
  }
227
217
 
228
218
  return {
229
219
  filters,
230
- updateValue,
231
220
  removeChip,
232
221
  resetFilter,
233
222
  resetAllFilters,
@@ -38,7 +38,7 @@ export const useFormFieldErrorHandling = (
38
38
  emitUpdate?: () => void,
39
39
  ): UseFormFieldErrorHandlingReturn => {
40
40
  const validation = useValidation({
41
- showSuccessMessages: props.showSuccessMessages ?? true,
41
+ showSuccessMessages: props.showSuccessMessages ?? false,
42
42
  fieldIdentifier: props.label,
43
43
  disableErrorHandling: props.disableErrorHandling ?? false,
44
44
  })
@@ -1,6 +1,6 @@
1
- import { describe, it, expect, vi } from 'vitest'
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
2
2
  import { defineComponent, h } from 'vue'
3
- import { mount } from '@vue/test-utils'
3
+ import { mount, flushPromises } from '@vue/test-utils'
4
4
  import { useFormValidation, useValidatableComponent } from '../useFormValidation'
5
5
  import type { ValidatableComponent } from '../useFormValidation'
6
6
 
@@ -35,6 +35,15 @@ const ParentWithForm = defineComponent({
35
35
  })
36
36
 
37
37
  describe('useFormValidation', () => {
38
+ beforeEach(() => {
39
+ lastChildApi = null
40
+ vi.clearAllMocks()
41
+ })
42
+
43
+ afterEach(async () => {
44
+ await flushPromises()
45
+ })
46
+
38
47
  it('registers components and avoids duplicates', () => {
39
48
  lastChildApi = null
40
49