@cnamts/synapse 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +27 -5
  2. package/dist/{AutocompleteFilter-BWLR3U7W.js → AutocompleteFilter-BPR-a55G.js} +1 -1
  3. package/dist/{DateFilter-BpwFexzi.js → DateFilter-CknrJWs2.js} +2 -2
  4. package/dist/{NumberFilter-Bz_NTdX9.js → NumberFilter-DJ-yNlzv.js} +1 -1
  5. package/dist/{PeriodFilter-DX_wy9g-.js → PeriodFilter-CiB5Oa9Z.js} +1 -1
  6. package/dist/{SelectFilter-xqiPtPgX.js → SelectFilter-EiafX97M.js} +2 -2
  7. package/dist/{TextFilter-BBl3JFqK.js → TextFilter-BzOmpdxj.js} +1 -1
  8. package/dist/{apLightTheme-D1P4jcD0.js → apLightTheme-DS0Uy44H.js} +446 -723
  9. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +14 -8
  10. package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +60 -289
  11. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +1 -0
  12. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +4 -0
  13. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1 -0
  14. package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
  15. package/dist/components/Customs/SyTextField/SyTextField.d.ts +0 -2
  16. package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +54 -73
  17. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +31 -40
  18. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +9 -14
  19. package/dist/components/DatePicker/composables/useDatePickerState.d.ts +4 -3
  20. package/dist/components/DatePicker/composables/useDateTextField.d.ts +2 -2
  21. package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +2 -2
  22. package/dist/components/DatePicker/types.d.ts +1 -2
  23. package/dist/components/FileList/FileList.d.ts +6 -0
  24. package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
  25. package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +13 -13
  26. package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
  27. package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +1 -0
  28. package/dist/components/MonthPicker/MonthPicker.d.ts +2 -7
  29. package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +2 -7
  30. package/dist/components/NirField/NirField.d.ts +12 -20
  31. package/dist/components/NirField/useNirValidation.d.ts +6 -2
  32. package/dist/components/PeriodField/PeriodField.d.ts +110 -150
  33. package/dist/components/PhoneField/PhoneField.d.ts +12 -7
  34. package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +0 -3
  35. package/dist/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +3 -1
  36. package/dist/components/RatingPicker/NumberPicker/NumberPicker.d.ts +4 -3
  37. package/dist/components/RatingPicker/RatingPicker.d.ts +18 -5
  38. package/dist/components/RatingPicker/StarsPicker/StarsPicker.d.ts +3 -1
  39. package/dist/components/RatingPicker/tests/RatingPicker.a11y.spect.d.ts +1 -0
  40. package/dist/components/RatingPicker/useRatingFocus.d.ts +18 -0
  41. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
  42. package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
  43. package/dist/components/Tables/common/SyTablePagination.d.ts +154 -364
  44. package/dist/components/Tables/common/TableHeader.d.ts +6 -1
  45. package/dist/components/Tables/common/filters/DateFilter.d.ts +4 -4
  46. package/dist/components/Tables/common/locales.d.ts +3 -0
  47. package/dist/components/Tables/common/types.d.ts +2 -0
  48. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +1 -0
  49. package/dist/composables/date/useDateInitializationDayjs.d.ts +3 -1
  50. package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
  51. package/dist/composables/unifyValidation/useCustomValidation.d.ts +3 -1
  52. package/dist/composables/unifyValidation/useValidation.d.ts +12 -6
  53. package/dist/composables/unifyValidation/useVuetifyValidation.d.ts +1 -1
  54. package/dist/composables/validation/useValidation.d.ts +6 -1
  55. package/dist/design-system-v3.js +2 -2
  56. package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
  57. package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
  58. package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
  59. package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +2 -0
  60. package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
  61. package/dist/designTokens/tokens/baseColors.d.ts +127 -0
  62. package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
  63. package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
  64. package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +2 -0
  65. package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
  66. package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
  67. package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
  68. package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
  69. package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
  70. package/dist/designTokens/utils/index.d.ts +2 -2
  71. package/dist/{main-BtTqyn4z.js → main-BsJ9ec3i.js} +16021 -15715
  72. package/dist/synapse.css +1 -1
  73. package/dist/utils/functions/classToHex.d.ts +1 -1
  74. package/dist/utils/functions/createHexResolver.d.ts +16 -0
  75. package/dist/vuetifyConfig.js +113 -152
  76. package/package.json +35 -23
  77. package/src/assets/amelipro/apTokens2026.scss +5 -5
  78. package/src/assets/overrides/_breakpoints.scss +25 -0
  79. package/src/assets/overrides/_btns.scss +0 -2
  80. package/src/assets/overrides/_forms.scss +1 -3
  81. package/src/assets/overrides/_icons.scss +5 -22
  82. package/src/assets/overrides/_otp.scss +40 -0
  83. package/src/assets/overrides/_tables.scss +11 -20
  84. package/src/assets/overrides/_tooltips.scss +17 -7
  85. package/src/assets/overrides/_typography.scss +35 -37
  86. package/src/assets/overrides/_utilities.scss +43 -47
  87. package/src/assets/themes.scss +1 -0
  88. package/src/components/Accordion/Accordion.vue +2 -0
  89. package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
  90. package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
  91. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
  92. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
  93. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
  94. package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
  95. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
  96. package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
  97. package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
  98. package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
  99. package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
  100. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
  101. package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
  102. package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
  103. package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
  104. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
  105. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
  106. package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
  107. package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
  108. package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
  109. package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
  110. package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
  111. package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
  112. package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
  113. package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
  114. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
  115. package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
  116. package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
  117. package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
  118. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
  119. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
  120. package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
  121. package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
  122. package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
  123. package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
  124. package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
  125. package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
  126. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
  127. package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
  128. package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
  129. package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
  130. package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
  131. package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
  132. package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
  133. package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
  134. package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
  135. package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
  136. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
  137. package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
  138. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
  139. package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
  140. package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
  141. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
  142. package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
  143. package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
  144. package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
  145. package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
  146. package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
  147. package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
  148. package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
  149. package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
  150. package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
  151. package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
  152. package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
  153. package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
  154. package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
  155. package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
  156. package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
  157. package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
  158. package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
  159. package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
  160. package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
  161. package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
  162. package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
  163. package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
  164. package/src/components/Captcha/Captcha.vue +1 -3
  165. package/src/components/ChipList/ChipList.vue +14 -16
  166. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +2 -3
  167. package/src/components/CookiesSelection/CookiesSelection.vue +2 -1
  168. package/src/components/CopyBtn/CopyBtn.vue +10 -3
  169. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
  170. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
  171. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
  172. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +8 -4
  173. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
  174. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +66 -0
  175. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +4 -6
  176. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +414 -135
  177. package/src/components/Customs/Selects/SySelect/SySelect.vue +502 -257
  178. package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
  179. package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +278 -4
  180. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +3 -3
  181. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
  182. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +52 -2
  183. package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +18 -3
  184. package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
  185. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +23 -5
  186. package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
  187. package/src/components/Customs/SyTabs/SyTabs.stories.ts +34 -35
  188. package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
  189. package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
  190. package/src/components/Customs/SyTabs/config.ts +3 -3
  191. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
  192. package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
  193. package/src/components/Customs/SyTextField/SyTextField.stories.ts +21 -41
  194. package/src/components/Customs/SyTextField/SyTextField.vue +34 -9
  195. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +1 -1
  196. package/src/components/DatePicker/CalendarMode/DatePicker.vue +29 -28
  197. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1 -1
  198. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +28 -23
  199. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +24 -1
  200. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
  201. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +65 -33
  202. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +1 -1
  203. package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
  204. package/src/components/DatePicker/composables/useDatePickerState.ts +56 -13
  205. package/src/components/DatePicker/composables/useDateRangeInput.ts +2 -1
  206. package/src/components/DatePicker/composables/useDateSelection.ts +2 -1
  207. package/src/components/DatePicker/composables/useDateTextField.ts +2 -3
  208. package/src/components/DatePicker/composables/useInputBlurHandler.ts +2 -2
  209. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
  210. package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
  211. package/src/components/DatePicker/types.ts +1 -2
  212. package/src/components/DialogBox/DialogBox.stories.ts +8 -8
  213. package/src/components/DialogBox/DialogBox.vue +3 -5
  214. package/src/components/DialogBox/accessibilite/Accessibility.mdx +86 -22
  215. package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
  216. package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
  217. package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
  218. package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
  219. package/src/components/FileList/FileList.vue +9 -2
  220. package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
  221. package/src/components/FileList/tests/FileList.spec.ts +47 -0
  222. package/src/components/FileUpload/FileUpload.vue +3 -5
  223. package/src/components/FileUpload/FileUploadContent.vue +3 -5
  224. package/src/components/FilterInline/FilterInline.vue +1 -3
  225. package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
  226. package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
  227. package/src/components/FilterSideBar/FilterSideBar.vue +9 -1
  228. package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
  229. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
  230. package/src/components/FooterBar/FooterBar.vue +9 -13
  231. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
  232. package/src/components/HeaderBar/HeaderBar.vue +2 -3
  233. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
  234. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
  235. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
  236. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
  237. package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
  238. package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
  239. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
  240. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
  241. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
  242. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
  243. package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
  244. package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
  245. package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
  246. package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
  247. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
  248. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
  249. package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
  250. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
  251. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
  252. package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
  253. package/src/components/LangBtn/LangBtn.vue +4 -5
  254. package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
  255. package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
  256. package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
  257. package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
  258. package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
  259. package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
  260. package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
  261. package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
  262. package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
  263. package/src/components/NirField/NirField.stories.ts +2 -2
  264. package/src/components/NirField/NirField.vue +3 -5
  265. package/src/components/NirField/accessibilite/Accessibility.mdx +100 -5
  266. package/src/components/NirField/tests/NirField.spec.ts +118 -0
  267. package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
  268. package/src/components/NirField/useNirValidation.ts +38 -32
  269. package/src/components/NotificationBar/Notification/Notification.vue +7 -9
  270. package/src/components/NotificationBar/NotificationBar.vue +1 -3
  271. package/src/components/PaginatedTable/PaginatedTable.vue +3 -4
  272. package/src/components/PaginatedTable/Pagination.vue +4 -6
  273. package/src/components/PasswordField/PasswordField.vue +15 -13
  274. package/src/components/PhoneField/PhoneField.vue +7 -5
  275. package/src/components/RangeField/RangeSlider/RangeSlider.vue +11 -20
  276. package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
  277. package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
  278. package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
  279. package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
  280. package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
  281. package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
  282. package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
  283. package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +38 -56
  284. package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +5 -0
  285. package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +48 -53
  286. package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +2 -1
  287. package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +40 -13
  288. package/src/components/RatingPicker/RatingPicker.stories.ts +65 -88
  289. package/src/components/RatingPicker/RatingPicker.vue +71 -15
  290. package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +31 -42
  291. package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +1 -1
  292. package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +5 -0
  293. package/src/components/RatingPicker/accessibilite/Accessibility.mdx +137 -9
  294. package/src/components/RatingPicker/tests/RatingPicker.a11y.spect.ts +123 -0
  295. package/src/components/RatingPicker/tests/RatingPicker.spec.ts +3 -2
  296. package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +40 -11
  297. package/src/components/RatingPicker/useRatingFocus.ts +97 -0
  298. package/src/components/SearchListField/SearchListField.vue +0 -2
  299. package/src/components/SkipLink/SkipLink.vue +2 -4
  300. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
  301. package/src/components/SubHeader/SubHeader.vue +1 -1
  302. package/src/components/SyAlert/SyAlert.vue +7 -9
  303. package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
  304. package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
  305. package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
  306. package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
  307. package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
  308. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
  309. package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
  310. package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
  311. package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
  312. package/src/components/SyTextArea/SyTextArea.vue +32 -1
  313. package/src/components/TableToolbar/TableToolbar.vue +6 -8
  314. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +166 -0
  315. package/src/components/Tables/SyServerTable/SyServerTable.vue +10 -8
  316. package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +23 -0
  317. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +268 -0
  318. package/src/components/Tables/SyTable/SyTable.stories.ts +104 -0
  319. package/src/components/Tables/SyTable/SyTable.vue +10 -8
  320. package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +22 -0
  321. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +274 -0
  322. package/src/components/Tables/common/SyTableFilter.vue +31 -6
  323. package/src/components/Tables/common/SyTablePagination.vue +143 -19
  324. package/src/components/Tables/common/TableHeader.vue +41 -4
  325. package/src/components/Tables/common/filters/DateFilter.vue +2 -2
  326. package/src/components/Tables/common/filters/SelectFilter.vue +1 -1
  327. package/src/components/Tables/common/locales.ts +3 -0
  328. package/src/components/Tables/common/tableStyles.scss +16 -19
  329. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
  330. package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
  331. package/src/components/Tables/common/types.ts +2 -0
  332. package/src/components/Tables/common/useTableHeaders.ts +49 -27
  333. package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
  334. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
  335. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
  336. package/src/components/UploadWorkflow/useFileList.ts +3 -0
  337. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
  338. package/src/composables/date/tests/useDateFormatDayjs.spec.ts +81 -0
  339. package/src/composables/date/tests/{useDateInitialization.spec.ts → useDateInitializationDayjs.spec.ts} +39 -3
  340. package/src/composables/date/useDateInitializationDayjs.ts +4 -1
  341. package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
  342. package/src/composables/unifyValidation/tests/useCustomValidation.spec.ts +2 -1
  343. package/src/composables/unifyValidation/tests/useValidation.spec.ts +22 -0
  344. package/src/composables/unifyValidation/useCustomValidation.ts +16 -4
  345. package/src/composables/unifyValidation/useValidation.ts +46 -15
  346. package/src/composables/unifyValidation/useVuetifyValidation.ts +2 -2
  347. package/src/composables/useFormFieldErrorHandling.ts +4 -1
  348. package/src/composables/validation/tests/useValidation.spec.ts +2 -2
  349. package/src/composables/validation/useValidation.ts +32 -4
  350. package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
  351. package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
  352. package/src/composantsVuetify/VCard/VCard.mdx +59 -0
  353. package/src/composantsVuetify/VCard/v-card.stories.ts +279 -0
  354. package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
  355. package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
  356. package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
  357. package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
  358. package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
  359. package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
  360. package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
  361. package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
  362. package/src/designTokens/tests/themeUtils.spec.ts +53 -0
  363. package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
  364. package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
  365. package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
  366. package/src/designTokens/tokens/amelipro/apLightTheme.ts +4 -1
  367. package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
  368. package/src/designTokens/tokens/baseColors.ts +129 -0
  369. package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
  370. package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
  371. package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
  372. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +4 -1
  373. package/src/designTokens/tokens/cnam/cnamSemantic.ts +1 -1
  374. package/src/designTokens/tokens/pa/paColors.ts +2 -166
  375. package/src/designTokens/tokens/pa/paContextual.ts +3 -48
  376. package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
  377. package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
  378. package/src/designTokens/utils/buildColorClassMap.ts +34 -0
  379. package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
  380. package/src/designTokens/utils/createFlattenTheme.ts +15 -7
  381. package/src/designTokens/utils/index.ts +2 -2
  382. package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +61 -91
  383. package/src/stories/Accessibilite/AuditDesignSystem.mdx +5 -19
  384. package/src/stories/Accessibilite/AuditEtContreAudit/Exemptions-derogations.mdx +1 -1
  385. package/src/stories/Accessibilite/AuditEtContreAudit/Introduction.mdx +11 -8
  386. package/src/stories/Accessibilite/AuditEtContreAudit/RGAA.mdx +6 -7
  387. package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
  388. package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
  389. package/src/stories/Accessibilite/Introduction.mdx +30 -30
  390. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +176 -79
  391. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +67 -19
  392. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +78 -50
  393. package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +23 -49
  394. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/FauxPositifs.stories.ts +6 -0
  395. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/Utilisation.mdx +7 -19
  396. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +55 -67
  397. package/src/stories/Components/Components.stories.ts +92 -4
  398. package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
  399. package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
  400. package/src/stories/Demarrer/Releases.stories.ts +48 -5
  401. package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
  402. package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
  403. package/src/stories/DesignTokens/colors.stories.ts +5 -6
  404. package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
  405. package/src/stories/GuideDuDev/Theme.mdx +36 -26
  406. package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
  407. package/src/stories/styles/accessibility-guide.css +3 -3
  408. package/src/utils/functions/classToHex.ts +6 -34
  409. package/src/utils/functions/createHexResolver.ts +45 -0
  410. package/src/utils/functions/tests/classToHex.spec.ts +36 -0
  411. package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
  412. package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
  413. package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
  414. package/dist/AutocompleteFilter-D9jzRzAL.cjs +0 -1
  415. package/dist/DateFilter-DTUl8hb1.cjs +0 -1
  416. package/dist/NumberFilter-MAEojdk0.cjs +0 -1
  417. package/dist/PeriodFilter-CC4WgIhl.cjs +0 -1
  418. package/dist/SelectFilter-BR3fvl-a.cjs +0 -1
  419. package/dist/TextFilter-CCfYFl5F.cjs +0 -1
  420. package/dist/apLightTheme-CFSRrjv2.cjs +0 -1
  421. package/dist/composables/date/useDateFormat.d.ts +0 -26
  422. package/dist/composables/date/useDateInitialization.d.ts +0 -18
  423. package/dist/design-system-v3.umd.cjs +0 -1
  424. package/dist/designTokens/utils/convertGaps.d.ts +0 -5
  425. package/dist/main-C1e3eoxd.cjs +0 -1067
  426. package/dist/tooth-11-D3sLWv2n.cjs +0 -1
  427. package/dist/tooth-12-CXrLuH03.cjs +0 -1
  428. package/dist/tooth-13-BSfo5fpT.cjs +0 -1
  429. package/dist/tooth-14-DMzulx0h.cjs +0 -1
  430. package/dist/tooth-15-BKRFVi-9.cjs +0 -1
  431. package/dist/tooth-16-CpuxAbuM.cjs +0 -1
  432. package/dist/tooth-17-BPoahUdg.cjs +0 -1
  433. package/dist/tooth-18-DhHJz8sy.cjs +0 -1
  434. package/dist/tooth-21-Dgd5hn_X.cjs +0 -1
  435. package/dist/tooth-22-C2Tn19sB.cjs +0 -1
  436. package/dist/tooth-23-C9uaaSGb.cjs +0 -1
  437. package/dist/tooth-24-BrK9UGpf.cjs +0 -1
  438. package/dist/tooth-25-CE_EfGNp.cjs +0 -1
  439. package/dist/tooth-26-Ctv4i9Fy.cjs +0 -1
  440. package/dist/tooth-27-C5J7JkWM.cjs +0 -1
  441. package/dist/tooth-28-Z9oWqjo0.cjs +0 -1
  442. package/dist/tooth-31-BrYqmkTi.cjs +0 -1
  443. package/dist/tooth-32-BNNR0oCZ.cjs +0 -1
  444. package/dist/tooth-33-DuxvqO2J.cjs +0 -1
  445. package/dist/tooth-34-BCSCXMB6.cjs +0 -1
  446. package/dist/tooth-35-BLUXkX88.cjs +0 -1
  447. package/dist/tooth-36-IrKHYqlA.cjs +0 -1
  448. package/dist/tooth-37-BYqpdMwo.cjs +0 -1
  449. package/dist/tooth-38-B_eNXXdu.cjs +0 -1
  450. package/dist/tooth-41-Ddva4Ot8.cjs +0 -1
  451. package/dist/tooth-42-szcDqlM0.cjs +0 -1
  452. package/dist/tooth-43-B3ka6rQm.cjs +0 -1
  453. package/dist/tooth-44-CazyQucj.cjs +0 -1
  454. package/dist/tooth-45-B4HQtc8n.cjs +0 -1
  455. package/dist/tooth-46-BPM40gbG.cjs +0 -1
  456. package/dist/tooth-47-Dvr20dlh.cjs +0 -1
  457. package/dist/tooth-48-Bd8ljGsF.cjs +0 -1
  458. package/dist/tooth-51-OBpwCOF3.cjs +0 -1
  459. package/dist/tooth-52-aKxyHcmq.cjs +0 -1
  460. package/dist/tooth-53-vCwJjTOc.cjs +0 -1
  461. package/dist/tooth-54-DsWu2iFy.cjs +0 -1
  462. package/dist/tooth-55-BxC1X2Dn.cjs +0 -1
  463. package/dist/tooth-61-BbLvxMQi.cjs +0 -1
  464. package/dist/tooth-62-CmTkWczP.cjs +0 -1
  465. package/dist/tooth-63-DI7l_2qI.cjs +0 -1
  466. package/dist/tooth-64-B21sOsJh.cjs +0 -1
  467. package/dist/tooth-65-D2ZC2VEr.cjs +0 -1
  468. package/dist/tooth-71-D473PPO5.cjs +0 -1
  469. package/dist/tooth-72-Drh1wnNu.cjs +0 -1
  470. package/dist/tooth-73-DzlwYI23.cjs +0 -1
  471. package/dist/tooth-74-8aGvcZPg.cjs +0 -1
  472. package/dist/tooth-75-BFK7At_r.cjs +0 -1
  473. package/dist/tooth-81-BZmR-I0M.cjs +0 -1
  474. package/dist/tooth-82-euVfUUZV.cjs +0 -1
  475. package/dist/tooth-83-KV010j64.cjs +0 -1
  476. package/dist/tooth-84-BBg1RjhZ.cjs +0 -1
  477. package/dist/tooth-85-Cr-kc1wM.cjs +0 -1
  478. package/dist/vuetifyConfig.umd.cjs +0 -1
  479. package/src/assets/apTokens.scss +0 -343
  480. package/src/assets/overrides/_container.scss +0 -36
  481. package/src/assets/tokens.scss +0 -388
  482. package/src/composables/date/tests/useDateFormat.spec.ts +0 -67
  483. package/src/composables/date/useDateFormat.ts +0 -110
  484. package/src/composables/date/useDateInitialization.ts +0 -92
  485. package/src/designTokens/apColors.md +0 -66
  486. package/src/designTokens/cnamColors.md +0 -193
  487. package/src/designTokens/paColors.md +0 -66
  488. package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
  489. package/src/designTokens/tokens/json/primitives.json +0 -209
  490. package/src/designTokens/tokens/json/semantic.json +0 -120
  491. package/src/designTokens/utils/convertGaps.ts +0 -11
  492. package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
  493. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
@@ -3,21 +3,21 @@ import SySelect from '@/components/Customs/Selects/SySelect/SySelect.vue'
3
3
  import SyAlert from '../../../SyAlert/SyAlert.vue'
4
4
  import SyForm from '../../SyForm/SyForm.vue'
5
5
  import { VBtn, VMenu, VList, VListItem, VListItemTitle } from 'vuetify/components'
6
- import { ref } from 'vue'
6
+ import { ref, onMounted } from 'vue'
7
7
  import { fn } from '@storybook/test'
8
+ import { getValidationDocumentation } from '@/composables/unifyValidation/documentationValidationProps'
8
9
 
9
10
  const meta: Meta<typeof SySelect> = {
10
11
  title: 'Composants/Formulaires/Selects/SySelect',
11
12
  component: SySelect,
12
13
  parameters: {
13
14
  layout: 'fullscreen',
14
- controls: { exclude: ['selectedValue', 'isOpen', 'closeList'] },
15
+ controls: { exclude: ['onUpdate:modelValue', 'selectedValue', 'isOpen', 'closeList'] },
15
16
  },
16
17
  argTypes: {
18
+ ...getValidationDocumentation('string'),
17
19
  selectedValue: { control: 'text' },
18
20
  items: { control: 'object' },
19
- errorMessages: { control: 'object' },
20
- required: { control: 'boolean' },
21
21
  displayAsterisk: { control: 'boolean' },
22
22
  textKey: {
23
23
  control: 'text',
@@ -51,10 +51,6 @@ const meta: Meta<typeof SySelect> = {
51
51
  control: 'boolean',
52
52
  description: 'Affiche les options sélectionnées sous forme de chips',
53
53
  },
54
- hideMessages: {
55
- control: 'boolean',
56
- description: 'Masque les messages d\'erreur',
57
- },
58
54
  variantStyle: {
59
55
  control: 'select',
60
56
  options: ['outlined', 'plain', 'underlined', 'filled', 'solo', 'solo-inverted', 'solo-filled'],
@@ -115,9 +111,6 @@ export default meta
115
111
  type Story = StoryObj<typeof meta>
116
112
  export const Default: Story = {
117
113
  parameters: {
118
- a11y: {
119
- disable: false,
120
- },
121
114
  sourceCode: [
122
115
  {
123
116
  name: 'Template',
@@ -166,21 +159,29 @@ export const Default: Story = {
166
159
  { text: 'Emensis itaque difficultatibus multis et nive obrutis callibus', value: 'Louis' },
167
160
  { text: 'Plurimis ubi prope Rauracum ventum est ad supercilia', value: 'Valentin' },
168
161
  ],
162
+ 'customSuccessRules': [{
163
+ type: 'custom',
164
+ options: {
165
+ validate: (v: unknown) => v !== null && v !== undefined,
166
+ successMessage: 'Option sélectionnée avec succès.',
167
+ },
168
+ }],
169
169
  'onUpdate:modelValue': fn(),
170
170
  },
171
171
  render: (args) => {
172
172
  return {
173
173
  components: { SySelect, VBtn, VMenu, VList, VListItem, VListItemTitle },
174
174
  setup() {
175
- return { args }
175
+ const value = ref(null)
176
+ return { args, value }
176
177
  },
177
178
  template: `
178
179
  <div class="pa-4">
179
180
  <SySelect
181
+ v-model="value"
180
182
  v-bind="args"
181
183
  />
182
184
  </div>
183
- <br/><br/><br/><br/>
184
185
  `,
185
186
  }
186
187
  },
@@ -188,9 +189,6 @@ export const Default: Story = {
188
189
 
189
190
  export const HelpText: Story = {
190
191
  parameters: {
191
- a11y: {
192
- disable: false,
193
- },
194
192
  sourceCode: [
195
193
  {
196
194
  name: 'Template',
@@ -241,23 +239,30 @@ export const HelpText: Story = {
241
239
  { text: 'Valentin', value: 'Valentin' },
242
240
  ],
243
241
  'helpText': 'Texte d\'aide à la saisie',
244
- 'hideMessages': false,
245
- 'required': true,
242
+ 'hideDetails': false,
243
+ 'customSuccessRules': [{
244
+ type: 'custom',
245
+ options: {
246
+ validate: (v: unknown) => v !== null && v !== undefined,
247
+ successMessage: 'Option sélectionnée avec succès.',
248
+ },
249
+ }],
246
250
  'onUpdate:modelValue': fn(),
247
251
  },
248
252
  render: (args) => {
249
253
  return {
250
254
  components: { SySelect, VBtn, VMenu, VList, VListItem, VListItemTitle },
251
255
  setup() {
252
- return { args }
256
+ const value = ref(null)
257
+ return { args, value }
253
258
  },
254
259
  template: `
255
260
  <div class="pa-4">
256
261
  <SySelect
262
+ v-model="value"
257
263
  v-bind="args"
258
264
  />
259
265
  </div>
260
- <br/><br/><br/><br/>
261
266
  `,
262
267
  }
263
268
  },
@@ -265,9 +270,6 @@ export const HelpText: Story = {
265
270
 
266
271
  export const Required: Story = {
267
272
  parameters: {
268
- a11y: {
269
- disable: false,
270
- },
271
273
  sourceCode: [
272
274
  {
273
275
  name: 'Template',
@@ -286,12 +288,13 @@ export const Required: Story = {
286
288
  name: 'Script',
287
289
  code: `
288
290
  <script setup lang="ts">
291
+ import { ref } from 'vue'
289
292
  import { SySelect } from '@cnamts/synapse'
290
-
293
+ const value = ref(null)
291
294
  const items = [
292
295
  { text: 'Option 1', value: '1' },
293
296
  { text: 'Option 2', value: '2' },
294
- ],
297
+ ]
295
298
  </script>
296
299
  `,
297
300
  },
@@ -309,14 +312,15 @@ export const Required: Story = {
309
312
  return {
310
313
  components: { SySelect },
311
314
  setup() {
312
- return { args }
315
+ const value = ref(null)
316
+ return { args, value }
313
317
  },
314
318
  template: `
315
319
  <div class="pa-4">
316
320
  <p class="mb-2 text-caption text-grey-darken-2">Ce champ est obligatoire</p>
317
321
  <SySelect
322
+ v-model="value"
318
323
  v-bind="args"
319
- :required="args.required"
320
324
  />
321
325
  </div>
322
326
  `,
@@ -326,9 +330,6 @@ export const Required: Story = {
326
330
 
327
331
  export const RequiredWithAsterisk: Story = {
328
332
  parameters: {
329
- a11y: {
330
- disable: false,
331
- },
332
333
  docs: {
333
334
  description: {
334
335
  story: 'Version du champ de sélection requis avec un astérisque visuel.',
@@ -377,14 +378,14 @@ const items = [
377
378
  return {
378
379
  components: { SySelect },
379
380
  setup() {
380
- return { args }
381
+ const value = ref(null)
382
+ return { args, value }
381
383
  },
382
384
  template: `
383
385
  <div class="pa-4">
384
386
  <SySelect
387
+ v-model="value"
385
388
  v-bind="args"
386
- :required="args.required"
387
- :display-asterisk="args.displayAsterisk"
388
389
  />
389
390
  </div>
390
391
  `,
@@ -392,11 +393,275 @@ const items = [
392
393
  },
393
394
  }
394
395
 
395
- export const SlotPrepend: Story = {
396
+ export const WithError: Story = {
396
397
  parameters: {
397
- a11y: {
398
- disable: false,
398
+ docs: {
399
+ description: {
400
+ story: '« Option 1 » est présélectionnée et déclenche une erreur bloquante au chargement.',
401
+ },
399
402
  },
403
+ sourceCode: [
404
+ {
405
+ name: 'Template',
406
+ code: `
407
+ <template>
408
+ <SySelect
409
+ ref="selectRef"
410
+ v-model="value"
411
+ :items="items"
412
+ label="Option"
413
+ :customRules="[
414
+ {
415
+ type: 'custom',
416
+ options: {
417
+ validate: (v) => v !== '1',
418
+ message: 'Option 1 n\\'est pas autorisée, choisissez Option 2 ou 3.'
419
+ }
420
+ }
421
+ ]"
422
+ />
423
+ </template>`,
424
+ },
425
+ {
426
+ name: 'Script',
427
+ code: `
428
+ <script setup lang="ts">
429
+ import { onMounted, ref } from 'vue'
430
+ import { SySelect } from '@cnamts/synapse'
431
+ const value = ref('1')
432
+ const items = [
433
+ { text: 'Option 1', value: '1' },
434
+ { text: 'Option 2', value: '2' },
435
+ { text: 'Option 3', value: '3' },
436
+ ]
437
+
438
+ const selectRef = ref(null)
439
+
440
+ onMounted(() => {
441
+ selectRef.value?.validateOnSubmit()
442
+ })
443
+ </script>`,
444
+ },
445
+ ],
446
+ },
447
+ args: {
448
+ 'items': [
449
+ { text: 'Option 1', value: '1' },
450
+ { text: 'Option 2', value: '2' },
451
+ { text: 'Option 3', value: '3' },
452
+ ],
453
+ 'label': 'Option',
454
+ 'onUpdate:modelValue': fn(),
455
+ },
456
+ render: args => ({
457
+ components: { SySelect },
458
+ setup() {
459
+ const value = ref('1')
460
+ const selectRef = ref<{ validateOnSubmit: () => Promise<boolean> } | null>(null)
461
+
462
+ onMounted(() => {
463
+ selectRef.value?.validateOnSubmit()
464
+ })
465
+
466
+ return { args, value, selectRef }
467
+ },
468
+ template: `
469
+ <div class="pa-4">
470
+ <SySelect
471
+ ref="selectRef"
472
+ v-model="value"
473
+ v-bind="args"
474
+ :customRules="[
475
+ {
476
+ type: 'custom',
477
+ options: {
478
+ validate: (v) => v !== '1',
479
+ message: 'Option 1 n\\'est pas autorisée, choisissez Option 2 ou 3.'
480
+ }
481
+ }
482
+ ]"
483
+ />
484
+ </div>
485
+ `,
486
+ }),
487
+ }
488
+
489
+ export const WithWarning: Story = {
490
+ parameters: {
491
+ docs: {
492
+ description: {
493
+ story: '« Option 1 » est présélectionnée et déclenche un avertissement (non bloquant) au chargement.',
494
+ },
495
+ },
496
+ sourceCode: [
497
+ {
498
+ name: 'Template',
499
+ code: `
500
+ <template>
501
+ <SySelect
502
+ v-model="value"
503
+ :items="items"
504
+ label="Option"
505
+ :customWarningRules="[
506
+ {
507
+ type: 'custom',
508
+ options: {
509
+ validate: (v) => v !== '1',
510
+ message: 'Option 1 est dépréciée, préférez Option 2 ou 3.'
511
+ }
512
+ }
513
+ ]"
514
+ />
515
+ </template>`,
516
+ },
517
+ {
518
+ name: 'Script',
519
+ code: `
520
+ <script setup lang="ts">
521
+ import { ref } from 'vue'
522
+ import { SySelect } from '@cnamts/synapse'
523
+ const value = ref(null)
524
+ const items = [
525
+ { text: 'Option 1', value: '1' },
526
+ { text: 'Option 2', value: '2' },
527
+ { text: 'Option 3', value: '3' },
528
+ ]
529
+ </script>`,
530
+ },
531
+ ],
532
+ },
533
+ args: {
534
+ 'items': [
535
+ { text: 'Option 1', value: '1' },
536
+ { text: 'Option 2', value: '2' },
537
+ { text: 'Option 3', value: '3' },
538
+ ],
539
+ 'label': 'Option',
540
+ 'onUpdate:modelValue': fn(),
541
+ },
542
+ render: args => ({
543
+ components: { SySelect },
544
+ setup() {
545
+ const value = ref('1')
546
+ const selectRef = ref<{ validateOnSubmit: () => Promise<boolean> } | null>(null)
547
+
548
+ onMounted(() => {
549
+ selectRef.value?.validateOnSubmit()
550
+ })
551
+
552
+ return { args, value, selectRef }
553
+ },
554
+ template: `
555
+ <div class="pa-4">
556
+ <SySelect
557
+ ref="selectRef"
558
+ v-model="value"
559
+ v-bind="args"
560
+ :customWarningRules="[
561
+ {
562
+ type: 'custom',
563
+ options: {
564
+ validate: (v) => v !== '1',
565
+ message: 'Option 1 est dépréciée, préférez Option 2 ou 3.'
566
+ }
567
+ }
568
+ ]"
569
+ />
570
+ </div>
571
+ `,
572
+ }),
573
+ }
574
+
575
+ export const WithSuccess: Story = {
576
+ parameters: {
577
+ docs: {
578
+ description: {
579
+ story: 'Une option est présélectionnée et déclenche la confirmation de succès au chargement.',
580
+ },
581
+ },
582
+ sourceCode: [
583
+ {
584
+ name: 'Template',
585
+ code: `
586
+ <template>
587
+ <SySelect
588
+ v-model="value"
589
+ :items="items"
590
+ label="Option"
591
+ show-success-messages
592
+ :customSuccessRules="[
593
+ {
594
+ type: 'custom',
595
+ options: {
596
+ validate: (v) => v !== null && v !== undefined,
597
+ message: 'Option sélectionnée avec succès.'
598
+ }
599
+ }
600
+ ]"
601
+ />
602
+ </template>`,
603
+ },
604
+ {
605
+ name: 'Script',
606
+ code: `
607
+ <script setup lang="ts">
608
+ import { ref } from 'vue'
609
+ import { SySelect } from '@cnamts/synapse'
610
+ const value = ref(null)
611
+ const items = [
612
+ { text: 'Option 1', value: '1' },
613
+ { text: 'Option 2', value: '2' },
614
+ { text: 'Option 3', value: '3' },
615
+ ]
616
+ </script>`,
617
+ },
618
+ ],
619
+ },
620
+ args: {
621
+ 'items': [
622
+ { text: 'Option 1', value: '1' },
623
+ { text: 'Option 2', value: '2' },
624
+ { text: 'Option 3', value: '3' },
625
+ ],
626
+ 'label': 'Option',
627
+ 'showSuccessMessages': true,
628
+ 'onUpdate:modelValue': fn(),
629
+ },
630
+ render: args => ({
631
+ components: { SySelect },
632
+ setup() {
633
+ const value = ref('1')
634
+ const selectRef = ref<{ validateOnSubmit: () => Promise<boolean> } | null>(null)
635
+
636
+ onMounted(() => {
637
+ selectRef.value?.validateOnSubmit()
638
+ })
639
+
640
+ return { args, value, selectRef }
641
+ },
642
+ template: `
643
+ <div class="pa-4">
644
+ <SySelect
645
+ ref="selectRef"
646
+ v-model="value"
647
+ v-bind="args"
648
+ :customSuccessRules="[
649
+ {
650
+ type: 'custom',
651
+ options: {
652
+ validate: (v) => v !== null && v !== undefined,
653
+ message: 'Option sélectionnée avec succès.'
654
+ }
655
+ }
656
+ ]"
657
+ />
658
+ </div>
659
+ `,
660
+ }),
661
+ }
662
+
663
+ export const SlotPrepend: Story = {
664
+ parameters: {
400
665
  sourceCode: [
401
666
  {
402
667
  name: 'Template',
@@ -461,9 +726,6 @@ export const SlotPrepend: Story = {
461
726
 
462
727
  export const SlotAppend: Story = {
463
728
  parameters: {
464
- a11y: {
465
- disable: false,
466
- },
467
729
  sourceCode: [
468
730
  {
469
731
  name: 'Template',
@@ -561,9 +823,6 @@ export const WithTooltips: Story = {
561
823
  }
562
824
  },
563
825
  parameters: {
564
- a11y: {
565
- disable: false,
566
- },
567
826
  docs: {
568
827
  description: {
569
828
  story: 'Exemple de champ avec des tooltips d\'information. Les icônes d\'information apparaissent automatiquement lorsque les props prependTooltip et/ou appendTooltip sont renseignées. La position des tooltips peut être contrôlée avec la prop tooltipLocation.',
@@ -606,9 +865,6 @@ export const WithTooltips: Story = {
606
865
 
607
866
  export const MultipleSelection: Story = {
608
867
  parameters: {
609
- a11y: {
610
- disable: true,
611
- },
612
868
  docs: {
613
869
  description: {
614
870
  story: 'Exemple de sélection multiple avec SySelect. Les options dans le menu déroulant sont affichées avec des cases à cocher pour faciliter la sélection multiple.',
@@ -678,7 +934,7 @@ const options = [
678
934
  return {
679
935
  components: { SySelect },
680
936
  setup() {
681
- const selectedOptions = ref([])
937
+ const selectedOptions = ref(null)
682
938
 
683
939
  return { args, selectedOptions }
684
940
  },
@@ -699,9 +955,6 @@ const options = [
699
955
 
700
956
  export const ChipsDisplay: Story = {
701
957
  parameters: {
702
- a11y: {
703
- disable: true,
704
- },
705
958
  docs: {
706
959
  description: {
707
960
  story: 'Exemple de sélection multiple avec affichage en chips. Les options sélectionnées sont affichées sous forme de chips dans le champ, et les options dans le menu déroulant sont affichées avec des cases à cocher.',
@@ -758,7 +1011,7 @@ const options = [
758
1011
  return {
759
1012
  components: { SySelect },
760
1013
  setup() {
761
- const selectedOptions = ref([])
1014
+ const selectedOptions = ref(null)
762
1015
 
763
1016
  return { args, selectedOptions }
764
1017
  },
@@ -774,89 +1027,8 @@ const options = [
774
1027
  },
775
1028
  }
776
1029
 
777
- export const withCustomError: Story = {
778
- parameters: {
779
- a11y: {
780
- disable: false,
781
- },
782
- sourceCode: [
783
- {
784
- name: 'Template',
785
- code: `
786
- <template>
787
- <SySelect
788
- v-model="value"
789
- :items="items"
790
- :error-messages="errorMessages"
791
- />
792
- <VBtn @click="triggerError">
793
- Trigger Error
794
- </VBtn>
795
- </template>
796
- `,
797
- },
798
- {
799
- name: 'Script',
800
- code: `
801
- <script setup lang="ts">
802
- import { SySelect } from '@cnamts/synapse'
803
- import { ref } from 'vue'
804
-
805
- const items = [
806
- { text: 'Option 1', value: '1' },
807
- { text: 'Option 2', value: '2' },
808
- ],
809
-
810
- const errorMessages = ref([])
811
-
812
- const triggerError = () => {
813
- errorMessages.value = ['This is a test error message']
814
- }
815
- </script>
816
- `,
817
- },
818
- ],
819
- },
820
- args: {
821
- 'items': [
822
- { text: 'Option 1', value: '1' },
823
- { text: 'Option 2', value: '2' },
824
- ],
825
- 'onUpdate:modelValue': fn(),
826
- },
827
- render: (args) => {
828
- return {
829
- components: { SySelect, VBtn, VMenu, VList, VListItem, VListItemTitle },
830
- setup() {
831
- const errorMessages = ref([])
832
- const triggerError = () => {
833
- // @ts-expect-error test error message
834
- errorMessages.value = ['This is a test error message']
835
- }
836
- return { args, errorMessages, triggerError }
837
- },
838
- template: `
839
- <div class="pa-4">
840
- <SySelect
841
- v-bind="args"
842
- :error-messages="errorMessages"
843
- />
844
- </div>
845
- <div class="px-4">
846
- <VBtn @click="triggerError">
847
- Trigger Error
848
- </VBtn>
849
- </div>
850
- `,
851
- }
852
- },
853
- }
854
-
855
1030
  export const withCustomKey: Story = {
856
1031
  parameters: {
857
- a11y: {
858
- disable: false,
859
- },
860
1032
  sourceCode: [
861
1033
  {
862
1034
  name: 'Template',
@@ -890,17 +1062,26 @@ export const withCustomKey: Story = {
890
1062
  { customKey: 'Choix 1', value: '1' },
891
1063
  { customKey: 'Choix 2', value: '2' },
892
1064
  ],
1065
+ 'customSuccessRules': [{
1066
+ type: 'custom',
1067
+ options: {
1068
+ validate: (v: unknown) => v !== null && v !== undefined,
1069
+ successMessage: 'Option sélectionnée avec succès.',
1070
+ },
1071
+ }],
893
1072
  'onUpdate:modelValue': fn(),
894
1073
  },
895
1074
  render: (args) => {
896
1075
  return {
897
1076
  components: { SySelect, VBtn, VMenu, VList, VListItem, VListItemTitle },
898
1077
  setup() {
899
- return { args }
1078
+ const value = ref(null)
1079
+ return { args, value }
900
1080
  },
901
1081
  template: `
902
1082
  <div class="pa-4">
903
1083
  <SySelect
1084
+ v-model="value"
904
1085
  v-bind="args"
905
1086
  text-key="customKey"
906
1087
  />
@@ -935,9 +1116,6 @@ export const Info: Story = {
935
1116
 
936
1117
  export const FormValidation: Story = {
937
1118
  parameters: {
938
- a11y: {
939
- disable: false,
940
- },
941
1119
  docs: {
942
1120
  description: {
943
1121
  story: 'Exemple d\'utilisation du SySelect dans un formulaire.',
@@ -1049,3 +1227,104 @@ const onSubmit = (event) => {
1049
1227
  }
1050
1228
  },
1051
1229
  }
1230
+
1231
+ export const VuetifyValidation: Story = {
1232
+ parameters: {
1233
+ docs: {
1234
+ description: {
1235
+ story: 'Exemple d\'utilisation de la validation native Vuetify via la prop `useVuetifyValidation`. Les règles sont définies au format Vuetify : des fonctions retournant `true` ou un message d\'erreur. Soumettez le formulaire pour déclencher la validation.',
1236
+ },
1237
+ },
1238
+ sourceCode: [
1239
+ {
1240
+ name: 'Template',
1241
+ code: `
1242
+ <template>
1243
+ <SyForm @submit="onSubmit">
1244
+ <SySelect
1245
+ v-model="value"
1246
+ :items="items"
1247
+ label="Option"
1248
+ use-vuetify-validation
1249
+ :show-success-messages="false"
1250
+ :rules="[v => !!v || 'Ce champ est requis']"
1251
+ />
1252
+ <VBtn type="submit" color="primary" class="mt-4">
1253
+ Soumettre
1254
+ </VBtn>
1255
+ </SyForm>
1256
+ </template>`,
1257
+ },
1258
+ {
1259
+ name: 'Script',
1260
+ code: `
1261
+ <script setup lang="ts">
1262
+ import { ref } from 'vue'
1263
+ import { SySelect, SyForm } from '@cnamts/synapse'
1264
+ import { VBtn } from 'vuetify/components'
1265
+
1266
+ const value = ref(null)
1267
+ const items = [
1268
+ { text: 'Option 1', value: '1' },
1269
+ { text: 'Option 2', value: '2' },
1270
+ { text: 'Option 3', value: '3' },
1271
+ ]
1272
+
1273
+ function onSubmit(event: { isValid: boolean }) {
1274
+ if (event.isValid) {
1275
+ alert('Formulaire valide : ' + value.value)
1276
+ } else {
1277
+ alert('Formulaire invalide : veuillez choisir une option.')
1278
+ }
1279
+ }
1280
+ </script>`,
1281
+ },
1282
+ ],
1283
+ },
1284
+ args: {
1285
+ 'items': [
1286
+ { text: 'Option 1', value: '1' },
1287
+ { text: 'Option 2', value: '2' },
1288
+ { text: 'Option 3', value: '3' },
1289
+ ],
1290
+ 'label': 'Option',
1291
+ 'useVuetifyValidation': true,
1292
+ 'showSuccessMessages': false,
1293
+ 'onUpdate:modelValue': fn(),
1294
+ },
1295
+ render: args => ({
1296
+ components: { SySelect, SyForm, VBtn },
1297
+ setup() {
1298
+ const value = ref(null)
1299
+
1300
+ function onSubmit(event: { isValid: boolean }) {
1301
+ if (event.isValid) {
1302
+ alert(`Formulaire valide : ${value.value}`)
1303
+ }
1304
+ else {
1305
+ alert('Formulaire invalide : veuillez choisir une option.')
1306
+ }
1307
+ }
1308
+
1309
+ return { args, value, onSubmit }
1310
+ },
1311
+ template: `
1312
+ <div class="pa-4">
1313
+ <SyForm @submit="onSubmit">
1314
+ <SySelect
1315
+ v-model="value"
1316
+ v-bind="args"
1317
+ :rules="[v => !!v || 'Ce champ est requis']"
1318
+ />
1319
+ <VBtn
1320
+ type="submit"
1321
+ color="primary"
1322
+ class="mt-4"
1323
+ >
1324
+ Soumettre
1325
+ </VBtn>
1326
+ </SyForm>
1327
+ </div>
1328
+ `,
1329
+ }),
1330
+ }