@cnamts/synapse 1.0.18 → 1.0.20

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 (294) hide show
  1. package/dist/{DateFilter-C0qj2Xp4.js → DateFilter-XURUmpMl.js} +1 -1
  2. package/dist/{NumberFilter-DLlqjkwg.js → NumberFilter-BZc0O8wV.js} +1 -1
  3. package/dist/{PeriodFilter-BQCGbydv.js → PeriodFilter-ZNdXcl3p.js} +1 -1
  4. package/dist/{SelectFilter-CPnShk0h.js → SelectFilter-DshYU5OK.js} +1 -1
  5. package/dist/{TextFilter-6N05mkcs.js → TextFilter-D_c5dRPl.js} +1 -1
  6. package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +4 -4
  7. package/dist/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.d.ts +1 -1
  8. package/dist/components/Amelipro/AmeliproCard/AmeliproCard.d.ts +1 -1
  9. package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +18 -8
  10. package/dist/components/Amelipro/AmeliproFilters/types.d.ts +6 -0
  11. package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +4 -4
  12. package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +4 -4
  13. package/dist/components/Captcha/Captcha.d.ts +1 -1
  14. package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +2416 -0
  15. package/dist/components/Customs/Selects/SyAutocomplete/types.d.ts +5 -0
  16. package/dist/components/Customs/Selects/SyAutocomplete/utils/ariaManager.d.ts +14 -0
  17. package/dist/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.d.ts +16 -0
  18. package/dist/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.d.ts +28 -0
  19. package/dist/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.d.ts +12 -0
  20. package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +2 -0
  21. package/dist/components/Customs/SyIcon/SyIcon.d.ts +2 -1
  22. package/dist/components/DatePicker/composables/useDateSelection.d.ts +1 -0
  23. package/dist/components/PaginatedTable/PaginatedTable.d.ts +1 -1
  24. package/dist/components/PaginatedTable/Pagination.d.ts +17 -0
  25. package/dist/components/{Customs/Selects/SyBtnSelect/SyBtnSelect.d.ts → SyBtnMenu/SyBtnMenu.d.ts} +2 -17
  26. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -5
  27. package/dist/components/Tables/SyTable/SyTable.d.ts +5 -5
  28. package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +2 -2
  29. package/dist/components/index.d.ts +22 -21
  30. package/dist/components/types.d.ts +15 -0
  31. package/dist/composables/useFormFieldErrorHandling.d.ts +31 -0
  32. package/dist/design-system-v3.js +70 -69
  33. package/dist/design-system-v3.umd.cjs +321 -310
  34. package/dist/{main-CY1bof-3.js → main-CuI6xaPq.js} +14328 -13576
  35. package/dist/modules.d.ts +6 -0
  36. package/dist/style.css +1 -1
  37. package/package.json +9 -10
  38. package/src/assets/amelipro/icons.ts +166 -153
  39. package/src/components/Accordion/Accordion.mdx +4 -1
  40. package/src/components/Accordion/{Accessibilite/AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +3 -3
  41. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +73 -14
  42. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +119 -27
  43. package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.a11y.spec.ts +304 -0
  44. package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +435 -9
  45. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +60 -0
  46. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.mdx +14 -0
  47. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.stories.ts +106 -0
  48. package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +218 -0
  49. package/src/components/Amelipro/AmeliproFilters/__tests__/AmeliproFilters.spec.ts +180 -0
  50. package/src/components/Amelipro/AmeliproFilters/types.d.ts +6 -0
  51. package/src/components/Amelipro/AmeliproIcon/__tests__/AmeliproIcon.spec.ts +1 -1
  52. package/src/components/Amelipro/AmeliproIcon/iconList.ts +2 -0
  53. package/src/components/BackBtn/BackBtn.vue +5 -4
  54. package/src/components/BackBtn/accessibilite/Accessibility.mdx +15 -0
  55. package/src/components/BackToTopBtn/BackToTopBtn.vue +6 -3
  56. package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +15 -0
  57. package/src/components/Captcha/Captcha.vue +5 -1
  58. package/src/components/Captcha/CaptchaAlert.vue +9 -7
  59. package/src/components/Captcha/accessibilite/Accessibility.mdx +10 -0
  60. package/src/components/ChipList/accessibilite/Accessibility.mdx +15 -0
  61. package/src/components/CollapsibleList/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +8 -6
  62. package/src/components/Common/IconSlot/IconSlot.vue +1 -1
  63. package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +15 -0
  64. package/src/components/CookieBanner/accessibilite/Accessibility.mdx +15 -0
  65. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +5 -4
  66. package/src/components/CopyBtn/CopyBtn.vue +6 -3
  67. package/src/components/CopyBtn/accessibilite/Accessibility.mdx +15 -0
  68. package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +15 -0
  69. package/src/components/Customs/Selects/SelectOverview.mdx +61 -18
  70. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.mdx +52 -0
  71. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +979 -0
  72. package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +653 -0
  73. package/src/components/Customs/Selects/{SySelect → SyAutocomplete/accessibilite}/Accessibilite.stories.ts +7 -38
  74. package/src/components/Customs/Selects/{SySelect/Accessibilite.mdx → SyAutocomplete/accessibilite/Accessibility.mdx} +15 -20
  75. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +72 -0
  76. package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +345 -0
  77. package/src/components/Customs/Selects/SyAutocomplete/types.ts +7 -0
  78. package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +180 -0
  79. package/src/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.ts +46 -0
  80. package/src/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.ts +107 -0
  81. package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +74 -0
  82. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +13 -9
  83. package/src/components/Customs/Selects/SyInputSelect/accessibilite/Accessibility.mdx +12 -0
  84. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +43 -34
  85. package/src/components/Customs/Selects/SySelect/SySelect.vue +19 -2
  86. package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +274 -0
  87. package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +21 -16
  88. package/src/components/Customs/SyCheckbox/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  89. package/src/components/Customs/SyForm/accessibilite/Accessibility.mdx +10 -0
  90. package/src/components/Customs/SyIcon/SyIcon.mdx +4 -1
  91. package/src/components/Customs/SyIcon/SyIcon.vue +4 -3
  92. package/src/components/Customs/SyIcon/{Accessibilite.stories.ts → accessibilite/Accessibilite.stories.ts} +3 -3
  93. package/src/components/Customs/SyIcon/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  94. package/src/components/Customs/SyPagination/SyPagination.mdx +4 -2
  95. package/src/components/Customs/SyPagination/accessibilite/Accessibility.mdx +10 -0
  96. package/src/components/Customs/SyRadioGroup/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  97. package/src/components/Customs/SyTabs/SyTabs.mdx +4 -2
  98. package/src/components/Customs/SyTabs/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
  99. package/src/components/Customs/SyTextField/SyTextField.mdx +1 -2
  100. package/src/components/Customs/SyTextField/SyTextField.vue +13 -0
  101. package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +15 -0
  102. package/src/components/DataList/accessibilite/Accessibility.mdx +15 -0
  103. package/src/components/DataListGroup/accessibilite/Accessibility.mdx +14 -0
  104. package/src/components/DatePicker/Accessibilite.mdx +1 -1
  105. package/src/components/DatePicker/Accessibilite.stories.ts +1 -1
  106. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +7 -4
  107. package/src/components/DatePicker/CalendarMode/DatePicker.vue +14 -2
  108. package/src/components/DatePicker/CalendarMode/tests/DatePicker.spec.ts +19 -6
  109. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +297 -0
  110. package/src/components/DatePicker/composables/useDateSelection.ts +5 -0
  111. package/src/components/DatePicker/docExamples/BidirectionalComplexValidation.vue +273 -0
  112. package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
  113. package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +10 -0
  114. package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +10 -0
  115. package/src/components/DialogBox/accessibilite/Accessibility.mdx +15 -0
  116. package/src/components/DownloadBtn/DownloadBtn.vue +5 -4
  117. package/src/components/DownloadBtn/accessibilite/Accessibility.mdx +15 -0
  118. package/src/components/ErrorPage/accessibilite/Accessibility.mdx +15 -0
  119. package/src/components/ExternalLinks/accessibilite/Accessibility.mdx +15 -0
  120. package/src/components/FileList/UploadItem/UploadItem.vue +25 -20
  121. package/src/components/FileList/accessibilite/Accessibility.mdx +12 -0
  122. package/src/components/FilePreview/accessibilite/Accessibility.mdx +12 -0
  123. package/src/components/FileUpload/FileUploadContent.vue +5 -4
  124. package/src/components/FileUpload/accessibilite/Accessibility.mdx +12 -0
  125. package/src/components/FilterInline/FilterInline.vue +5 -4
  126. package/src/components/FilterInline/accessibilite/Accessibility.mdx +12 -0
  127. package/src/components/FilterSideBar/accessibilite/Accessibility.mdx +15 -0
  128. package/src/components/FooterBar/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -4
  129. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +6 -5
  130. package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +15 -0
  131. package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +3 -0
  132. package/src/components/HeaderBar/HeaderBurgerMenu/accessibilite/Accessibility.mdx +15 -0
  133. package/src/components/HeaderBar/accessibilite/Accessibility.mdx +15 -0
  134. package/src/components/HeaderBar/{Usages.mdx → usages/Usages.mdx} +2 -2
  135. package/src/components/HeaderLoading/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +9 -5
  136. package/src/components/HeaderToolbar/accessibilite/Accessibility.mdx +15 -0
  137. package/src/components/LangBtn/LangBtn.vue +5 -4
  138. package/src/components/LangBtn/accessibilite/Accessibility.mdx +15 -0
  139. package/src/components/Logo/accessibilite/Accessibility.mdx +17 -0
  140. package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +12 -0
  141. package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +10 -0
  142. package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +15 -0
  143. package/src/components/NirField/accessibilite/Accessibility.mdx +15 -0
  144. package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +15 -0
  145. package/src/components/NotificationBar/Notification/Notification.vue +1 -1
  146. package/src/components/NotificationBar/accessibilite/Accessibility.mdx +15 -0
  147. package/src/components/PageContainer/{AccessibilityGuide.mdx → Accessibilite/Accessibility.mdx} +7 -4
  148. package/src/components/PageContainer/Accessibilite/AccessibilityGuide.mdx +0 -0
  149. package/src/components/PaginatedTable/PaginatedTable.vue +27 -47
  150. package/src/components/PaginatedTable/Pagination.vue +93 -0
  151. package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +12 -0
  152. package/src/components/PasswordField/PasswordField.vue +2 -1
  153. package/src/components/PasswordField/accessibilite/Accessibility.mdx +108 -0
  154. package/src/components/PeriodField/accessibilite/Accessibility.mdx +12 -0
  155. package/src/components/PhoneField/accessibilite/Accessibility.mdx +15 -0
  156. package/src/components/RangeField/accessibilite/Accessibility.mdx +15 -0
  157. package/src/components/RatingPicker/accessibilite/Accessibility.mdx +15 -0
  158. package/src/components/SearchListField/SearchListField.vue +6 -3
  159. package/src/components/SearchListField/accessibilite/Accessibility.mdx +15 -0
  160. package/src/components/SkipLink/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +7 -4
  161. package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +15 -0
  162. package/src/components/SubHeader/accessibilite/Accessibility.mdx +15 -0
  163. package/src/components/SyAlert/SyAlert.vue +6 -6
  164. package/src/components/SyAlert/accessibilite/Accessibility.mdx +12 -0
  165. package/src/components/{Customs/Selects/SyBtnSelect/SyBtnSelect.mdx → SyBtnMenu/SyBtnMenu.mdx} +8 -9
  166. package/src/components/{Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts → SyBtnMenu/SyBtnMenu.stories.ts} +80 -78
  167. package/src/components/{Customs/Selects/SyBtnSelect/SyBtnSelect.vue → SyBtnMenu/SyBtnMenu.vue} +84 -24
  168. package/src/components/SyBtnMenu/accessibilite/Accessibility.mdx +77 -0
  169. package/src/components/{Customs/Selects/SyBtnSelect/tests/SyBtnSelect.spec.ts → SyBtnMenu/tests/SyBtnMenu.spec.ts} +38 -11
  170. package/src/components/SyTextArea/accessibilite/Accessibility.mdx +10 -0
  171. package/src/components/TableToolbar/TableToolbar.vue +6 -3
  172. package/src/components/TableToolbar/accessibilite/Accessibility.mdx +12 -0
  173. package/src/components/Tables/SyServerTable/SyServerTable.mdx +4 -1
  174. package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +10 -0
  175. package/src/components/Tables/SyTable/SyTable.mdx +4 -1
  176. package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +10 -0
  177. package/src/components/Tables/common/TableHeader.vue +3 -1
  178. package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +18 -14
  179. package/src/components/ToolbarContainer/ToolbarContainer.mdx +2 -1
  180. package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +563 -420
  181. package/src/components/ToolbarContainer/accessibilite/Accessibility.mdx +69 -0
  182. package/src/components/UploadWorkflow/accessibilite/Accessibility.mdx +12 -0
  183. package/src/components/Usages/Usages.vue +3 -2
  184. package/src/components/UserMenuBtn/UserMenuBtn.vue +10 -8
  185. package/src/components/UserMenuBtn/accessibilite/Accessibility.mdx +12 -0
  186. package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +3 -3
  187. package/src/components/index.ts +23 -21
  188. package/src/components/types.ts +10 -0
  189. package/src/composables/date/tests/useDateFormatDayjs.spec.ts +19 -0
  190. package/src/composables/date/useDateFormatDayjs.ts +4 -4
  191. package/src/composables/rules/useFieldValidation.ts +7 -0
  192. package/src/composables/useFormFieldErrorHandling.ts +141 -0
  193. package/src/modules.d.ts +6 -0
  194. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +1 -1
  195. package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +0 -4
  196. package/src/stories/Components/Components.stories.ts +2 -2
  197. package/src/stories/GuideDuDev/PortailAgent.stories.ts +0 -1
  198. package/src/components/BackBtn/Accessibilite.mdx +0 -14
  199. package/src/components/BackBtn/Accessibilite.stories.ts +0 -30
  200. package/src/components/BackToTopBtn/Accessibilite.mdx +0 -14
  201. package/src/components/BackToTopBtn/Accessibilite.stories.ts +0 -31
  202. package/src/components/ChipList/Accessibilite.mdx +0 -14
  203. package/src/components/ChipList/Accessibilite.stories.ts +0 -31
  204. package/src/components/CollapsibleList/Accessibilite.stories.ts +0 -29
  205. package/src/components/ContextualMenu/Accessibilite.mdx +0 -13
  206. package/src/components/ContextualMenu/Accessibilite.stories.ts +0 -29
  207. package/src/components/CookieBanner/Accessibilite.mdx +0 -13
  208. package/src/components/CookieBanner/Accessibilite.stories.ts +0 -30
  209. package/src/components/CopyBtn/Accessibilite.mdx +0 -13
  210. package/src/components/CopyBtn/Accessibilite.stories.ts +0 -29
  211. package/src/components/Customs/Selects/SelectBtnField/Accessibilite.mdx +0 -14
  212. package/src/components/Customs/Selects/SelectBtnField/Accessibilite.stories.ts +0 -29
  213. package/src/components/Customs/Selects/SyBtnSelect/Accessibilite.mdx +0 -13
  214. package/src/components/Customs/Selects/SyBtnSelect/Accessibilite.stories.ts +0 -25
  215. package/src/components/Customs/Selects/SyInputSelect/Accessibilite.mdx +0 -13
  216. package/src/components/Customs/Selects/SyInputSelect/Accessibilite.stories.ts +0 -25
  217. package/src/components/Customs/SyTextField/Accessibilite.mdx +0 -14
  218. package/src/components/Customs/SyTextField/Accessibilite.stories.ts +0 -34
  219. package/src/components/DataList/Accessibilite.mdx +0 -13
  220. package/src/components/DataList/Accessibilite.stories.ts +0 -29
  221. package/src/components/DataListGroup/Accessibilite.mdx +0 -13
  222. package/src/components/DataListGroup/Accessibilite.stories.ts +0 -29
  223. package/src/components/DialogBox/Accessibilite.mdx +0 -14
  224. package/src/components/DialogBox/Accessibilite.stories.ts +0 -29
  225. package/src/components/DownloadBtn/Accessibilite.mdx +0 -14
  226. package/src/components/DownloadBtn/Accessibilite.stories.ts +0 -29
  227. package/src/components/ErrorPage/Accessibilite.mdx +0 -13
  228. package/src/components/ErrorPage/Accessibilite.stories.ts +0 -36
  229. package/src/components/ExternalLinks/Accessibilite.mdx +0 -18
  230. package/src/components/ExternalLinks/Accessibilite.stories.ts +0 -62
  231. package/src/components/FileList/Accessibilite.mdx +0 -13
  232. package/src/components/FileList/Accessibilite.stories.ts +0 -26
  233. package/src/components/FilePreview/Accessibilite.mdx +0 -14
  234. package/src/components/FilePreview/Accessibilite.stories.ts +0 -26
  235. package/src/components/FileUpload/Accessibilite.mdx +0 -13
  236. package/src/components/FileUpload/Accessibilite.stories.ts +0 -26
  237. package/src/components/FilterInline/Accessibilite.mdx +0 -15
  238. package/src/components/FilterInline/Accessibilite.stories.ts +0 -26
  239. package/src/components/FilterSideBar/Accessibilite.mdx +0 -13
  240. package/src/components/FilterSideBar/Accessibilite.stories.ts +0 -30
  241. package/src/components/FooterBar/Accessibilite.stories.ts +0 -26
  242. package/src/components/FranceConnectBtn/Accessibilite.mdx +0 -13
  243. package/src/components/FranceConnectBtn/Accessibilite.stories.ts +0 -30
  244. package/src/components/HeaderBar/Accessibilite.mdx +0 -13
  245. package/src/components/HeaderBar/Accessibilite.stories.ts +0 -31
  246. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +0 -13
  247. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +0 -30
  248. package/src/components/HeaderLoading/Accessibilite.stories.ts +0 -31
  249. package/src/components/HeaderToolbar/Accessibilite.mdx +0 -13
  250. package/src/components/HeaderToolbar/Accessibilite.stories.ts +0 -36
  251. package/src/components/LangBtn/Accessibilite.mdx +0 -13
  252. package/src/components/LangBtn/Accessibilite.stories.ts +0 -32
  253. package/src/components/Logo/Accessibilite.mdx +0 -13
  254. package/src/components/Logo/Accessibilite.stories.ts +0 -30
  255. package/src/components/LogoBrandSection/Accessibilite.mdx +0 -13
  256. package/src/components/LogoBrandSection/Accessibilite.stories.ts +0 -26
  257. package/src/components/MaintenancePage/Accessibilite.mdx +0 -13
  258. package/src/components/MaintenancePage/Accessibilite.stories.ts +0 -36
  259. package/src/components/NirField/Accessibilite.mdx +0 -13
  260. package/src/components/NirField/Accessibilite.stories.ts +0 -31
  261. package/src/components/NotFoundPage/Accessibilite.mdx +0 -13
  262. package/src/components/NotFoundPage/Accessibilite.stories.ts +0 -36
  263. package/src/components/NotificationBar/Accessibilite.mdx +0 -13
  264. package/src/components/NotificationBar/Accessibilite.stories.ts +0 -30
  265. package/src/components/PageContainer/Accessibilite.mdx +0 -13
  266. package/src/components/PageContainer/Accessibilite.stories.ts +0 -30
  267. package/src/components/PaginatedTable/Accessibilite.mdx +0 -13
  268. package/src/components/PaginatedTable/Accessibilite.stories.ts +0 -26
  269. package/src/components/PasswordField/Accessibilite.mdx +0 -13
  270. package/src/components/PasswordField/Accessibilite.stories.ts +0 -121
  271. package/src/components/PeriodField/Accessibilite.mdx +0 -13
  272. package/src/components/PeriodField/Accessibilite.stories.ts +0 -27
  273. package/src/components/PhoneField/Accessibilite.mdx +0 -13
  274. package/src/components/PhoneField/Accessibilite.stories.ts +0 -32
  275. package/src/components/RangeField/Accessibilite.mdx +0 -13
  276. package/src/components/RangeField/Accessibilite.stories.ts +0 -32
  277. package/src/components/RatingPicker/Accessibilite.mdx +0 -13
  278. package/src/components/RatingPicker/Accessibilite.stories.ts +0 -30
  279. package/src/components/SearchListField/Accessibilite.mdx +0 -13
  280. package/src/components/SearchListField/Accessibilite.stories.ts +0 -30
  281. package/src/components/SkipLink/Accessibilite.stories.ts +0 -36
  282. package/src/components/SocialMediaLinks/Accessibilite.mdx +0 -13
  283. package/src/components/SocialMediaLinks/Accessibilite.stories.ts +0 -36
  284. package/src/components/SubHeader/Accessibilite.mdx +0 -13
  285. package/src/components/SubHeader/Accessibilite.stories.ts +0 -36
  286. package/src/components/SyAlert/Accessibilite.mdx +0 -13
  287. package/src/components/SyAlert/Accessibilite.stories.ts +0 -30
  288. package/src/components/TableToolbar/Accessibilite.mdx +0 -13
  289. package/src/components/TableToolbar/Accessibilite.stories.ts +0 -26
  290. package/src/components/UploadWorkflow/Accessibilite.mdx +0 -13
  291. package/src/components/UploadWorkflow/Accessibilite.stories.ts +0 -26
  292. package/src/components/UserMenuBtn/Accessibilite.mdx +0 -13
  293. package/src/components/UserMenuBtn/Accessibilite.stories.ts +0 -25
  294. /package/src/components/HeaderBar/{Usages.stories.ts → usages/Usages.stories.ts} +0 -0
@@ -1,17 +1,443 @@
1
- import { mount } from '@vue/test-utils'
2
- import { expect, describe, it } from 'vitest'
1
+ import { VueWrapper, mount, shallowMount } from '@vue/test-utils'
2
+ import { beforeEach, describe, expect, it } from 'vitest'
3
3
  import AmeliproClickableTile from '../AmeliproClickableTile.vue'
4
+ import type { ComponentProps } from 'vue-component-type-helpers'
5
+ import type { ExpectedPropOptions } from '@tests/types'
6
+ import type { PropType } from 'vue'
7
+ import type { RouteLocationRaw } from 'vue-router'
8
+ import TestHelper from '@tests/helpers/TestHelper'
9
+
10
+ // Stub VBtn qui préserve les attributs comme aria-label
11
+ const VBtnStub = {
12
+ template: '<button v-bind="$attrs"><slot /></button>',
13
+ inheritAttrs: false,
14
+ }
15
+
16
+ const expectedPropOptions: ExpectedPropOptions<typeof AmeliproClickableTile> = {
17
+ borderedIcon: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ href: {
26
+ type: String,
27
+ default: undefined,
28
+ },
29
+ icon: {
30
+ type: String,
31
+ default: undefined,
32
+ },
33
+ imgMaxWidth: {
34
+ type: String,
35
+ default: undefined,
36
+ },
37
+ imgMinWidth: {
38
+ type: String,
39
+ default: undefined,
40
+ },
41
+ imgSrc: {
42
+ type: String,
43
+ default: undefined,
44
+ },
45
+ imgWidth: {
46
+ type: String,
47
+ default: '100px',
48
+ },
49
+ tileTitle: {
50
+ type: String,
51
+ default: undefined,
52
+ },
53
+ tileWidth: {
54
+ type: String,
55
+ default: '100%',
56
+ },
57
+ to: {
58
+ type: Object as PropType<RouteLocationRaw>,
59
+ default: undefined,
60
+ },
61
+ uniqueId: {
62
+ type: String,
63
+ default: undefined,
64
+ },
65
+ onlyIconIsClickable: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ }
70
+
71
+ // Values pour les props "required"
72
+ const requiredPropValues = (): ComponentProps<typeof AmeliproClickableTile> => ({
73
+ icon: 'utilisateur',
74
+ tileTitle: 'titre de la tuile',
75
+ uniqueId: 'required-unique-id',
76
+ })
77
+
78
+ // Valeurs pour les props "modified"
79
+ const modifiedPropValues = (): ComponentProps<typeof AmeliproClickableTile> => ({
80
+ icon: 'document',
81
+ tileTitle: 'titre modifié',
82
+ uniqueId: 'modified-unique-id',
83
+ })
84
+
85
+ const testHelper = new TestHelper(AmeliproClickableTile)
86
+ testHelper.setExpectedPropOptions(expectedPropOptions)
87
+ .setRequiredPropValues(requiredPropValues)
88
+ .setModifiedPropValues(modifiedPropValues)
4
89
 
5
90
  describe('AmeliproClickableTile', () => {
6
- it('render correctly', async () => {
7
- const wrapper = mount(AmeliproClickableTile, {
8
- props: {
91
+ describe('Snapshots', () => {
92
+ testHelper.snapshots()
93
+ })
94
+
95
+ describe('Main container', () => {
96
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
97
+
98
+ beforeEach(() => {
99
+ vueWrapper = mount(AmeliproClickableTile, {
100
+ props: {
101
+ icon: 'utilisateur',
102
+ tileTitle: 'Test',
103
+ uniqueId: 'test-tile',
104
+ },
105
+ global: { stubs: { VBtn: VBtnStub } },
106
+ })
107
+ })
108
+
109
+ it('prop uniqueId sets attribute id on container', async () => {
110
+ expect(vueWrapper.attributes('id')).toBe('test-tile')
111
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
112
+ expect(vueWrapper.attributes('id')).toBe('new-id')
113
+ })
114
+
115
+ it('prop tileWidth sets width attribute', async () => {
116
+ expect(vueWrapper.find('button').attributes('width')).toBe('100%')
117
+ await vueWrapper.setProps({ tileWidth: '50%' })
118
+ expect(vueWrapper.find('button').attributes('width')).toBe('50%')
119
+ })
120
+
121
+ it('prop disabled disables the button', async () => {
122
+ expect(vueWrapper.find('button').attributes('disabled')).toBeUndefined()
123
+ await vueWrapper.setProps({ disabled: true })
124
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
125
+ })
126
+
127
+ it('prop href sets href attribute', async () => {
128
+ expect(vueWrapper.find('button').attributes('href')).toBeUndefined()
129
+ await vueWrapper.setProps({ href: 'https://example.com' })
130
+ expect(vueWrapper.find('button').attributes('href')).toBe('https://example.com')
131
+ })
132
+
133
+ it('prop to sets to attribute', async () => {
134
+ expect(vueWrapper.find('button').attributes('to')).toBeUndefined()
135
+ await vueWrapper.setProps({ to: '/dashboard' })
136
+ expect(vueWrapper.find('button').attributes('to')).toBe('/dashboard')
137
+ })
138
+ })
139
+
140
+ describe('Icon or Image display', () => {
141
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
142
+
143
+ beforeEach(() => {
144
+ vueWrapper = mount(AmeliproClickableTile, {
145
+ props: {
146
+ icon: 'utilisateur',
147
+ tileTitle: 'Test',
148
+ },
149
+ global: { stubs: { VBtn: VBtnStub } },
150
+ })
151
+ })
152
+
153
+ it('displays icon when icon prop is provided', async () => {
154
+ expect(vueWrapper.findComponent({ name: 'AmeliproIcon' }).exists()).toBe(true)
155
+ })
156
+
157
+ it('displays image when imgSrc prop is provided', async () => {
158
+ await vueWrapper.setProps({ icon: undefined, imgSrc: 'https://example.com/image.png' })
159
+ expect(vueWrapper.find('img').exists()).toBe(true)
160
+ expect(vueWrapper.find('img').attributes('src')).toBe('https://example.com/image.png')
161
+ })
162
+
163
+ it('prop imgWidth sets image width style', async () => {
164
+ await vueWrapper.setProps({ icon: undefined, imgSrc: 'https://example.com/image.png' })
165
+ expect(vueWrapper.find('img').attributes('style')).toContain('width: 100px')
166
+ await vueWrapper.setProps({ imgWidth: '150px' })
167
+ expect(vueWrapper.find('img').attributes('style')).toContain('width: 150px')
168
+ })
169
+
170
+ it('prop imgMaxWidth sets image maxWidth style', async () => {
171
+ await vueWrapper.setProps({
172
+ icon: undefined,
173
+ imgSrc: 'https://example.com/image.png',
174
+ imgMaxWidth: '200px',
175
+ })
176
+ expect(vueWrapper.find('img').attributes('style')).toContain('max-width: 200px')
177
+ })
178
+
179
+ it('prop imgMinWidth sets image minWidth style', async () => {
180
+ await vueWrapper.setProps({
181
+ icon: undefined,
182
+ imgSrc: 'https://example.com/image.png',
183
+ imgMinWidth: '50px',
184
+ })
185
+ expect(vueWrapper.find('img').attributes('style')).toContain('min-width: 50px')
186
+ })
187
+
188
+ it('does not display both icon and image', async () => {
189
+ await vueWrapper.setProps({
9
190
  icon: 'utilisateur',
10
- tileTitle: 'titre de la tuile',
11
- uniqueId: 'my-clickable-tile-id',
12
- },
191
+ imgSrc: 'https://example.com/image.png',
192
+ })
193
+ const images = vueWrapper.findAll('img')
194
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
195
+ expect(images.length === 0 || icons.length === 0).toBe(true)
196
+ })
197
+ })
198
+
199
+ describe('Title display', () => {
200
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
201
+
202
+ beforeEach(() => {
203
+ vueWrapper = mount(AmeliproClickableTile, {
204
+ props: {
205
+ icon: 'utilisateur',
206
+ tileTitle: 'titre de la tuile',
207
+ },
208
+ global: { stubs: { VBtn: VBtnStub } },
209
+ })
210
+ })
211
+
212
+ it('prop tileTitle displays title text', async () => {
213
+ expect(vueWrapper.text()).toContain('titre de la tuile')
214
+ await vueWrapper.setProps({ tileTitle: 'nouveau titre' })
215
+ expect(vueWrapper.text()).toContain('nouveau titre')
216
+ })
217
+
218
+ it('displays slot content when provided', async () => {
219
+ const slotWrapper = mount(AmeliproClickableTile, {
220
+ props: { icon: 'utilisateur' },
221
+ slots: {
222
+ default: 'Slot content',
223
+ },
224
+ global: { stubs: { VBtn: VBtnStub } },
225
+ })
226
+ expect(slotWrapper.text()).toContain('Slot content')
227
+ })
228
+ })
229
+
230
+ describe('Icon styling', () => {
231
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
232
+
233
+ beforeEach(() => {
234
+ vueWrapper = mount(AmeliproClickableTile, {
235
+ props: {
236
+ icon: 'utilisateur',
237
+ tileTitle: 'Test',
238
+ },
239
+ global: { stubs: { VBtn: VBtnStub } },
240
+ })
241
+ })
242
+
243
+ it('prop borderedIcon changes icon style', async () => {
244
+ let icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
245
+ expect(icons.length).toBeGreaterThan(0)
246
+ expect(icons[0]?.props('bordered')).toBe(false)
247
+
248
+ await vueWrapper.setProps({ borderedIcon: true })
249
+ icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
250
+ expect(icons[0]?.props('bordered')).toBe(true)
251
+ })
252
+
253
+ it('icon has correct size', async () => {
254
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
255
+ expect(icons.length).toBeGreaterThan(0)
256
+ expect(icons[0]?.props('size')).toBe('32px')
13
257
  })
14
258
 
15
- expect(wrapper.html()).toMatchSnapshot()
259
+ it('arrow icon has correct size', async () => {
260
+ const icons = vueWrapper.findAllComponents({ name: 'AmeliproIcon' })
261
+ expect(icons.length).toBeGreaterThan(0)
262
+ const arrowIcon = icons[icons.length - 1]
263
+ expect(arrowIcon?.props('size')).toBe('16px')
264
+ expect(arrowIcon?.props('icon')).toBe('chevronRight')
265
+ })
266
+ })
267
+
268
+ describe('onlyIconIsClickable mode', () => {
269
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
270
+
271
+ beforeEach(() => {
272
+ vueWrapper = mount(AmeliproClickableTile, {
273
+ props: {
274
+ icon: 'utilisateur',
275
+ tileTitle: 'Test',
276
+ uniqueId: 'test-tile',
277
+ onlyIconIsClickable: true,
278
+ },
279
+ global: { stubs: { VBtn: VBtnStub } },
280
+ })
281
+ })
282
+
283
+ it('renders span wrapper instead of VBtn when onlyIconIsClickable is true', () => {
284
+ expect(vueWrapper.find('span.amelipro-clickable-tile').exists()).toBe(true)
285
+ })
286
+
287
+ it('prop uniqueId sets attribute id on span wrapper', async () => {
288
+ expect(vueWrapper.find('span.amelipro-clickable-tile').attributes('id')).toBe('test-tile')
289
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
290
+ expect(vueWrapper.find('span.amelipro-clickable-tile').attributes('id')).toBe('new-id')
291
+ })
292
+
293
+ it('contains a VBtn for icon button only', () => {
294
+ const buttons = vueWrapper.findAll('button')
295
+ expect(buttons.length > 0).toBe(true)
296
+ })
297
+
298
+ it('icon button has uniqueId suffix', async () => {
299
+ const buttons = vueWrapper.findAll('button')
300
+ expect(buttons.length).toBeGreaterThan(0)
301
+ expect(buttons[0]?.attributes('id')).toBe('test-tile-icon-button')
302
+ })
303
+
304
+ it('content is not clickable, only icon button is', () => {
305
+ const span = vueWrapper.find('span.amelipro-clickable-tile')
306
+ // Span should not have onclick handler
307
+ expect(span.attributes('onclick')).toBeUndefined()
308
+ })
309
+ })
310
+
311
+ describe('Events', () => {
312
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
313
+
314
+ beforeEach(() => {
315
+ vueWrapper = shallowMount(AmeliproClickableTile, {
316
+ props: {
317
+ icon: 'utilisateur',
318
+ tileTitle: 'Test',
319
+ uniqueId: 'test-id',
320
+ },
321
+ })
322
+ })
323
+
324
+ it('emits click event when clicked in normal mode', async () => {
325
+ expect(vueWrapper.emitted('click')).toBeUndefined()
326
+ await vueWrapper.trigger('click')
327
+ expect(vueWrapper.emitted('click')).toBeTruthy()
328
+ expect(vueWrapper.emitted('click')?.[0]).toEqual(['test-id'])
329
+ })
330
+
331
+ it('emits click event with uniqueId', async () => {
332
+ await vueWrapper.setProps({ uniqueId: 'new-id' })
333
+ await vueWrapper.trigger('click')
334
+ expect(vueWrapper.emitted('click')?.[0]).toEqual(['new-id'])
335
+ })
336
+
337
+ it('does not emit click when disabled', async () => {
338
+ await vueWrapper.setProps({ disabled: true })
339
+ // VBtn with disabled prop should not emit click
340
+ })
341
+ })
342
+
343
+ describe('Hover and Focus states', () => {
344
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
345
+
346
+ beforeEach(() => {
347
+ vueWrapper = mount(AmeliproClickableTile, {
348
+ props: {
349
+ icon: 'utilisateur',
350
+ tileTitle: 'Test',
351
+ },
352
+ global: { stubs: { VBtn: VBtnStub } },
353
+ })
354
+ })
355
+
356
+ it('applies hover class on hover', async () => {
357
+ const btn = vueWrapper.find('button')
358
+ await btn.trigger('mouseenter')
359
+ // Check that the hover class is applied to the container
360
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
361
+ })
362
+
363
+ it('applies focus class on focus', async () => {
364
+ const btn = vueWrapper.find('button')
365
+ await btn.trigger('focus')
366
+ // Check that the hover/focus class is applied to the container
367
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
368
+ })
369
+
370
+ it('removes hover state on mouseleave', async () => {
371
+ const btn = vueWrapper.find('button')
372
+ await btn.trigger('mouseenter')
373
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
374
+ await btn.trigger('mouseleave')
375
+ // State should be reset
376
+ expect(vueWrapper.classes()).not.toContain('amelipro-clickable-tile--hover')
377
+ })
378
+
379
+ it('removes focus state on blur', async () => {
380
+ const btn = vueWrapper.find('button')
381
+ await btn.trigger('focus')
382
+ expect(vueWrapper.classes()).toContain('amelipro-clickable-tile--hover')
383
+ await btn.trigger('blur')
384
+ // State should be reset
385
+ expect(vueWrapper.classes()).not.toContain('amelipro-clickable-tile--hover')
386
+ })
387
+ })
388
+
389
+ describe('Disabled state styling', () => {
390
+ let vueWrapper: VueWrapper<InstanceType<typeof AmeliproClickableTile>>
391
+
392
+ beforeEach(() => {
393
+ vueWrapper = mount(AmeliproClickableTile, {
394
+ props: {
395
+ icon: 'utilisateur',
396
+ tileTitle: 'Test',
397
+ disabled: true,
398
+ },
399
+ global: { stubs: { VBtn: VBtnStub } },
400
+ })
401
+ })
402
+
403
+ it('applies disabled styling to button', () => {
404
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
405
+ })
406
+
407
+ it('button has disabled attribute when disabled prop is true', async () => {
408
+ expect(vueWrapper.find('button').attributes('disabled')).toBeDefined()
409
+ await vueWrapper.setProps({ disabled: false })
410
+ expect(vueWrapper.find('button').attributes('disabled')).toBeUndefined()
411
+ })
412
+ })
413
+
414
+ describe('ID generation', () => {
415
+ it('generates proper IDs for all elements when uniqueId is provided', () => {
416
+ const vueWrapper = mount(AmeliproClickableTile, {
417
+ props: {
418
+ icon: 'utilisateur',
419
+ tileTitle: 'Test',
420
+ uniqueId: 'test-tile',
421
+ },
422
+ global: { stubs: { VBtn: VBtnStub } },
423
+ })
424
+
425
+ expect(vueWrapper.attributes('id')).toBe('test-tile')
426
+ expect(vueWrapper.find('#test-tile-icon').exists()).toBe(true)
427
+ expect(vueWrapper.find('#test-tile-icon-arrow').exists()).toBe(true)
428
+ })
429
+
430
+ it('works without uniqueId', () => {
431
+ const vueWrapper = mount(AmeliproClickableTile, {
432
+ props: {
433
+ icon: 'utilisateur',
434
+ tileTitle: 'Test',
435
+ },
436
+ global: { stubs: { VBtn: VBtnStub } },
437
+ })
438
+
439
+ expect(vueWrapper.attributes('id')).toBeUndefined()
440
+ expect(vueWrapper.find('[id*="-icon"]').exists()).toBe(false)
441
+ })
16
442
  })
17
443
  })
@@ -1,5 +1,65 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
+ exports[`AmeliproClickableTile > Snapshots > renders the component with all properties filled in 1`] = `
4
+ <v-btn-stub
5
+ block="false"
6
+ border="false"
7
+ class="
8
+ amelipro-clickable-tile
9
+ text-none
10
+ "
11
+ density="default"
12
+ disabled="false"
13
+ elevation="0"
14
+ exact="false"
15
+ flat="false"
16
+ height="auto"
17
+ icon="false"
18
+ id="modified-unique-id"
19
+ loading="false"
20
+ replace="false"
21
+ ripple="false"
22
+ size="default"
23
+ slim="false"
24
+ stacked="false"
25
+ symbol="Symbol(vuetify:v-btn-toggle)"
26
+ tag="button"
27
+ tile="false"
28
+ variant="elevated"
29
+ width="100%"
30
+ ></v-btn-stub>
31
+ `;
32
+
33
+ exports[`AmeliproClickableTile > Snapshots > renders the component with only required properties filled in 1`] = `
34
+ <v-btn-stub
35
+ block="false"
36
+ border="false"
37
+ class="
38
+ amelipro-clickable-tile
39
+ text-none
40
+ "
41
+ density="default"
42
+ disabled="false"
43
+ elevation="0"
44
+ exact="false"
45
+ flat="false"
46
+ height="auto"
47
+ icon="false"
48
+ id="required-unique-id"
49
+ loading="false"
50
+ replace="false"
51
+ ripple="false"
52
+ size="default"
53
+ slim="false"
54
+ stacked="false"
55
+ symbol="Symbol(vuetify:v-btn-toggle)"
56
+ tag="button"
57
+ tile="false"
58
+ variant="elevated"
59
+ width="100%"
60
+ ></v-btn-stub>
61
+ `;
62
+
3
63
  exports[`AmeliproClickableTile > render correctly 1`] = `
4
64
  <button
5
65
  class="
@@ -0,0 +1,14 @@
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import * as AmeliproFiltersStories from './AmeliproFilters.stories'
3
+
4
+ <Meta of={AmeliproFiltersStories}/>
5
+
6
+ # AmeliproFilters
7
+
8
+ Le composant `AmeliproFilters` permet de sélectionner un ou plusieurs filtres.
9
+
10
+ <Canvas of={AmeliproFiltersStories.Default}/>
11
+
12
+ ## API
13
+
14
+ <Controls of={AmeliproFiltersStories.Default}/>
@@ -0,0 +1,106 @@
1
+ import type { StoryObj } from '@storybook/vue3'
2
+ import AmeliproFilters from '../AmeliproFilters/AmeliproFilters.vue'
3
+
4
+ const meta = {
5
+ argTypes: {
6
+ 'groupId': { description: 'Identifiant unique du groupe de filtres' },
7
+ 'groupLabel': { description: 'Libellé du groupe de filtres' },
8
+ 'hiddenLabel': { description: 'Cache le libellé du groupe de filtres' },
9
+ 'value': { description: 'Liste des filtres du du groupe' },
10
+ 'unique': { description: 'Pour avoir seulement un filtre sélectionnable' },
11
+ 'input': {
12
+ description: 'Event émis au click sur le bouton',
13
+ },
14
+ 'change:selected': {
15
+ description: 'Evènement émis au changement du v-model',
16
+ },
17
+ },
18
+ title: 'Composants/Amelipro/AmeliproFilters',
19
+ component: AmeliproFilters,
20
+ }
21
+
22
+ export default meta
23
+ type Story = StoryObj<typeof AmeliproFilters>
24
+
25
+ const value = [
26
+ { id: 'f1', label: 'Filtre 1', value: 'f1', isChecked: false },
27
+ { id: 'f2', label: 'Filtre 2', value: 'f2', isChecked: true },
28
+ { id: 'f3', label: 'Filtre 3', value: 'f3', isChecked: false },
29
+ { id: 'f4', label: 'Filtre 4', value: 'f4', isChecked: false },
30
+ ]
31
+
32
+ export const Default: Story = {
33
+ args: {
34
+ groupId: 'filters-group',
35
+ groupLabel: 'Filtres',
36
+ hiddenLabel: false,
37
+ unique: false,
38
+ value: value,
39
+ },
40
+ parameters: {
41
+ sourceCode: [
42
+ {
43
+ name: 'Template',
44
+ code: `<template>
45
+ <AmeliproFilters
46
+ group-id="filter-group"
47
+ group-label="Filtres"
48
+ :hidden-label="false"
49
+ :unique="false"
50
+ :value="value"
51
+ />
52
+ </template>
53
+ `,
54
+ },
55
+ ],
56
+ },
57
+ render: args => ({
58
+ components: { AmeliproFilters },
59
+ setup() {
60
+ return { args }
61
+ },
62
+ template: `
63
+ <AmeliproFilters
64
+ v-bind="args"
65
+ />
66
+ `,
67
+ }),
68
+ }
69
+
70
+ export const SelectionUnique: Story = {
71
+ args: {
72
+ groupId: 'filters-group',
73
+ groupLabel: 'Filtres',
74
+ hiddenLabel: false,
75
+ unique: true,
76
+ value: value,
77
+ },
78
+ parameters: {
79
+ sourceCode: [
80
+ {
81
+ name: 'Template',
82
+ code: `<template>
83
+ <AmeliproFilters
84
+ group-id="filter-group"
85
+ group-label="Filtres"
86
+ :hidden-label="false"
87
+ :unique="true"
88
+ :value="value"
89
+ />
90
+ </template>
91
+ `,
92
+ },
93
+ ],
94
+ },
95
+ render: args => ({
96
+ components: { AmeliproFilters },
97
+ setup() {
98
+ return { args }
99
+ },
100
+ template: `
101
+ <AmeliproFilters
102
+ v-bind="args"
103
+ />
104
+ `,
105
+ }),
106
+ }