@cnamts/synapse 0.0.4-alpha → 0.0.6-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/dist/design-system-v3.d.ts +1277 -499
  2. package/dist/design-system-v3.js +4193 -1573
  3. package/dist/design-system-v3.umd.cjs +8 -8
  4. package/dist/style.css +1 -1
  5. package/package.json +18 -17
  6. package/src/assets/settings.scss +3 -0
  7. package/src/assets/tokens.scss +16 -17
  8. package/src/components/BackBtn/Accessibilite.mdx +14 -0
  9. package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
  10. package/src/components/BackBtn/AccessibiliteItems.ts +102 -0
  11. package/src/components/BackBtn/BackBtn.mdx +1 -1
  12. package/src/components/BackBtn/BackBtn.stories.ts +8 -8
  13. package/src/components/BackBtn/BackBtn.vue +0 -1
  14. package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
  15. package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
  16. package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
  17. package/src/components/BackToTopBtn/AccessibiliteItems.ts +52 -0
  18. package/src/components/BackToTopBtn/BackToTopBtn.mdx +1 -1
  19. package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
  20. package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
  21. package/src/components/CollapsibleList/Accessibilite.stories.ts +170 -0
  22. package/src/components/CollapsibleList/AccessibiliteItems.ts +122 -0
  23. package/src/components/CollapsibleList/CollapsibleList.stories.ts +1 -1
  24. package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
  25. package/src/components/CookieBanner/Accessibilite.mdx +14 -0
  26. package/src/components/CookieBanner/Accessibilite.stories.ts +219 -0
  27. package/src/components/CookieBanner/AccessibiliteItems.ts +356 -0
  28. package/src/components/CookieBanner/CookieBanner.mdx +219 -0
  29. package/src/components/CookieBanner/CookieBanner.stories.ts +678 -0
  30. package/src/components/CookieBanner/CookieBanner.vue +225 -0
  31. package/src/components/CookieBanner/config.ts +38 -0
  32. package/src/components/CookieBanner/constants/ExpertiseLevelEnum.ts +4 -0
  33. package/src/components/CookieBanner/locales.ts +12 -0
  34. package/src/components/CookieBanner/tests/CookieBanner.spec.ts +129 -0
  35. package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +197 -0
  36. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +123 -0
  37. package/src/components/CookiesSelection/CookiesInformation/locales.ts +21 -0
  38. package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.ts +121 -0
  39. package/src/components/CookiesSelection/CookiesSelection.vue +127 -0
  40. package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +47 -0
  41. package/src/components/CookiesSelection/CookiesTable/headers.ts +14 -0
  42. package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.ts +30 -0
  43. package/src/components/CookiesSelection/CookiesTable/tests/__snapshots__/CookiesTable.spec.ts.snap +3 -0
  44. package/src/components/CookiesSelection/locales.ts +10 -0
  45. package/src/components/CookiesSelection/tests/CookiesSelection.spec.ts +184 -0
  46. package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +192 -0
  47. package/src/components/CookiesSelection/types.ts +15 -0
  48. package/src/components/CopyBtn/Accessibilite.mdx +14 -0
  49. package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
  50. package/src/components/CopyBtn/AccessibiliteItems.ts +105 -0
  51. package/src/components/CopyBtn/CopyBtn.mdx +1 -1
  52. package/src/components/CopyBtn/CopyBtn.stories.ts +4 -4
  53. package/src/components/CopyBtn/CopyBtn.vue +0 -1
  54. package/src/components/CopyBtn/config.ts +2 -0
  55. package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
  56. package/src/components/Customs/SyBtnSelect/Accessibilite.mdx +14 -0
  57. package/src/components/Customs/SyBtnSelect/Accessibilite.stories.ts +193 -0
  58. package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +139 -0
  59. package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +45 -0
  60. package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +662 -0
  61. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +254 -0
  62. package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +4 -0
  63. package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
  64. package/src/components/Customs/SyInputSelect/Accessibilite.mdx +14 -0
  65. package/src/components/Customs/SyInputSelect/Accessibilite.stories.ts +166 -0
  66. package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +96 -0
  67. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +41 -0
  68. package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +30 -83
  69. package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +46 -6
  70. package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +4 -0
  71. package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
  72. package/src/components/Customs/SySelect/Accessibilite.mdx +14 -0
  73. package/src/components/Customs/SySelect/Accessibilite.stories.ts +217 -0
  74. package/src/components/Customs/SySelect/AccessibiliteItems.ts +173 -0
  75. package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +9 -8
  76. package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -79
  77. package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +44 -13
  78. package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +4 -0
  79. package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
  80. package/src/components/Customs/SyTextField/Accessibilite.mdx +14 -0
  81. package/src/components/Customs/SyTextField/Accessibilite.stories.ts +224 -0
  82. package/src/components/Customs/SyTextField/AccessibiliteItems.ts +198 -0
  83. package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
  84. package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +145 -34
  85. package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +27 -7
  86. package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +4 -0
  87. package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
  88. package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +5 -6
  89. package/src/components/DataList/Accessibilite.mdx +14 -0
  90. package/src/components/DataList/Accessibilite.stories.ts +166 -0
  91. package/src/components/DataList/AccessibiliteItems.ts +47 -0
  92. package/src/components/DataList/DataList.mdx +1 -1
  93. package/src/components/DataList/DataList.stories.ts +10 -10
  94. package/src/components/DataList/constants/ExpertiseLevelEnum.ts +4 -0
  95. package/src/components/DataListGroup/Accessibilite.mdx +14 -0
  96. package/src/components/DataListGroup/Accessibilite.stories.ts +225 -0
  97. package/src/components/DataListGroup/AccessibiliteItems.ts +79 -0
  98. package/src/components/DataListGroup/DataListGroup.mdx +1 -1
  99. package/src/components/DataListGroup/DataListGroup.stories.ts +7 -7
  100. package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +4 -0
  101. package/src/components/DialogBox/Accessibilite.mdx +14 -0
  102. package/src/components/DialogBox/Accessibilite.stories.ts +189 -0
  103. package/src/components/DialogBox/AccessibiliteItems.ts +167 -0
  104. package/src/components/DialogBox/DialogBox.mdx +14 -0
  105. package/src/components/DialogBox/DialogBox.stories.ts +798 -0
  106. package/src/components/DialogBox/DialogBox.vue +181 -0
  107. package/src/components/DialogBox/config.ts +25 -0
  108. package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +4 -0
  109. package/src/components/DialogBox/locales.ts +5 -0
  110. package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
  111. package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
  112. package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -31
  113. package/src/components/DownloadBtn/DownloadBtn.mdx +3 -3
  114. package/src/components/DownloadBtn/DownloadBtn.stories.ts +6 -6
  115. package/src/components/ErrorPage/Accessibilite.mdx +14 -0
  116. package/src/components/ErrorPage/Accessibilite.stories.ts +189 -0
  117. package/src/components/ErrorPage/AccessibiliteItems.ts +205 -0
  118. package/src/components/ErrorPage/ErrorPage.mdx +21 -0
  119. package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
  120. package/src/components/ErrorPage/ErrorPage.vue +93 -0
  121. package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +4 -0
  122. package/src/components/ErrorPage/locales.ts +5 -0
  123. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
  124. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
  125. package/src/components/FooterBar/Accessibilite.mdx +14 -0
  126. package/src/components/FooterBar/Accessibilite.stories.ts +223 -0
  127. package/src/components/FooterBar/AccessibiliteItems.ts +257 -0
  128. package/src/components/FooterBar/FooterBar.mdx +2 -2
  129. package/src/components/FooterBar/FooterBar.stories.ts +556 -8
  130. package/src/components/FooterBar/FooterBar.vue +80 -73
  131. package/src/components/FooterBar/config.ts +2 -3
  132. package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +4 -0
  133. package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
  134. package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
  135. package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +24 -22
  136. package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
  137. package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
  138. package/src/components/FranceConnectBtn/AccessibiliteItems.ts +169 -0
  139. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
  140. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +3 -3
  141. package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
  142. package/src/components/HeaderBar/Accessibilite.mdx +14 -0
  143. package/src/components/HeaderBar/Accessibilite.stories.ts +223 -0
  144. package/src/components/HeaderBar/AccessibiliteItems.ts +194 -0
  145. package/src/components/HeaderBar/HeaderBar.stories.ts +60 -2
  146. package/src/components/HeaderBar/HeaderBar.vue +1 -9
  147. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +14 -0
  148. package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +223 -0
  149. package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +174 -0
  150. package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +4 -0
  151. package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +4 -0
  152. package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +1 -1
  153. package/src/components/HeaderLoading/Accessibilite.mdx +14 -0
  154. package/src/components/HeaderLoading/Accessibilite.stories.ts +167 -0
  155. package/src/components/HeaderLoading/AccessibiliteItems.ts +29 -0
  156. package/src/components/HeaderLoading/HeaderLoading.mdx +1 -1
  157. package/src/components/HeaderLoading/HeaderLoading.stories.ts +1 -1
  158. package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +4 -0
  159. package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +6 -6
  160. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +35 -33
  161. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
  162. package/src/components/HeaderToolbar/Accessibilite.mdx +14 -0
  163. package/src/components/HeaderToolbar/Accessibilite.stories.ts +203 -0
  164. package/src/components/HeaderToolbar/AccessibiliteItems.ts +200 -0
  165. package/src/components/HeaderToolbar/HeaderToolbar.mdx +1 -1
  166. package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +2 -2
  167. package/src/components/HeaderToolbar/HeaderToolbar.vue +3 -2
  168. package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +4 -0
  169. package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
  170. package/src/components/LangBtn/Accessibilite.mdx +14 -0
  171. package/src/components/LangBtn/Accessibilite.stories.ts +168 -0
  172. package/src/components/LangBtn/AccessibiliteItems.ts +101 -0
  173. package/src/components/LangBtn/LangBtn.mdx +1 -1
  174. package/src/components/LangBtn/LangBtn.stories.ts +4 -4
  175. package/src/components/LangBtn/LangBtn.vue +3 -2
  176. package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
  177. package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
  178. package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
  179. package/src/components/Logo/Accessibilite.mdx +14 -0
  180. package/src/components/Logo/Accessibilite.stories.ts +223 -0
  181. package/src/components/Logo/AccessibiliteItems.ts +155 -0
  182. package/src/components/Logo/Logo.mdx +1 -1
  183. package/src/components/Logo/Logo.stories.ts +8 -8
  184. package/src/components/Logo/constants/ExpertiseLevelEnum.ts +4 -0
  185. package/src/components/LogoBrandSection/Accessibilite.mdx +14 -0
  186. package/src/components/LogoBrandSection/Accessibilite.stories.ts +223 -0
  187. package/src/components/LogoBrandSection/AccessibiliteItems.ts +194 -0
  188. package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +4 -0
  189. package/src/components/MaintenancePage/Accessibilite.mdx +14 -0
  190. package/src/components/MaintenancePage/Accessibilite.stories.ts +189 -0
  191. package/src/components/MaintenancePage/AccessibiliteItems.ts +173 -0
  192. package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
  193. package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
  194. package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
  195. package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
  196. package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +4 -0
  197. package/src/components/MaintenancePage/index.ts +3 -0
  198. package/src/components/MaintenancePage/locales.ts +5 -0
  199. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
  200. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
  201. package/src/components/NirField/Accessibilite.mdx +14 -0
  202. package/src/components/NirField/Accessibilite.stories.ts +214 -0
  203. package/src/components/NirField/AccessibiliteItems.ts +243 -0
  204. package/src/components/NirField/NirField.mdx +216 -0
  205. package/src/components/NirField/NirField.stories.ts +359 -0
  206. package/src/components/NirField/NirField.vue +450 -0
  207. package/src/components/NirField/config.ts +16 -0
  208. package/src/components/NirField/constants/ExpertiseLevelEnum.ts +4 -0
  209. package/src/components/NirField/locales.ts +12 -0
  210. package/src/components/NirField/nirValidation.ts +42 -0
  211. package/src/components/NirField/tests/NirField.spec.ts +119 -0
  212. package/src/components/NotFoundPage/Accessibilite.mdx +14 -0
  213. package/src/components/NotFoundPage/Accessibilite.stories.ts +190 -0
  214. package/src/components/NotFoundPage/AccessibiliteItems.ts +205 -0
  215. package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
  216. package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
  217. package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
  218. package/src/components/NotFoundPage/assets/not-found.svg +1 -0
  219. package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +4 -0
  220. package/src/components/NotFoundPage/locales.ts +6 -0
  221. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
  222. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
  223. package/src/components/NotificationBar/Accessibilite.mdx +14 -0
  224. package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
  225. package/src/components/NotificationBar/AccessibiliteItems.ts +144 -0
  226. package/src/components/NotificationBar/NotificationBar.mdx +1 -1
  227. package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
  228. package/src/components/NotificationBar/options.ts +1 -0
  229. package/src/components/PageContainer/Accessibilite.mdx +14 -0
  230. package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
  231. package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
  232. package/src/components/PageContainer/PageContainer.mdx +1 -1
  233. package/src/components/PageContainer/PageContainer.stories.ts +4 -4
  234. package/src/components/PageContainer/PageContainer.vue +16 -15
  235. package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
  236. package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
  237. package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +2 -2
  238. package/src/components/PhoneField/Accessibilite.mdx +14 -0
  239. package/src/components/PhoneField/Accessibilite.stories.ts +216 -0
  240. package/src/components/PhoneField/AccessibiliteItems.ts +238 -0
  241. package/src/components/PhoneField/PhoneField.mdx +1 -1
  242. package/src/components/PhoneField/PhoneField.stories.ts +2 -2
  243. package/src/components/PhoneField/PhoneField.vue +5 -6
  244. package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +4 -0
  245. package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
  246. package/src/components/SkipLink/Accessibilite.mdx +14 -0
  247. package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
  248. package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
  249. package/src/components/SkipLink/SkipLink.stories.ts +2 -2
  250. package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
  251. package/src/components/SocialMediaLinks/Accessibilite.mdx +14 -0
  252. package/src/components/SocialMediaLinks/Accessibilite.stories.ts +170 -0
  253. package/src/components/SocialMediaLinks/AccessibiliteItems.ts +160 -0
  254. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +18 -14
  255. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +3 -2
  256. package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +4 -0
  257. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
  258. package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
  259. package/src/components/SubHeader/Accessibilite.mdx +14 -0
  260. package/src/components/SubHeader/Accessibilite.stories.ts +166 -0
  261. package/src/components/SubHeader/AccessibiliteItems.ts +146 -0
  262. package/src/components/SubHeader/SubHeader.mdx +1 -1
  263. package/src/components/SubHeader/SubHeader.stories.ts +11 -11
  264. package/src/components/SubHeader/SubHeader.vue +1 -1
  265. package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +4 -0
  266. package/src/components/SyAlert/Accessibilite.mdx +14 -0
  267. package/src/components/SyAlert/Accessibilite.stories.ts +166 -0
  268. package/src/components/SyAlert/AccessibiliteItems.ts +122 -0
  269. package/src/components/{Alert/Alert.mdx → SyAlert/SyAlert.mdx} +9 -9
  270. package/src/components/{Alert/Alert.stories.ts → SyAlert/SyAlert.stories.ts} +22 -22
  271. package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +4 -0
  272. package/src/components/{Alert/tests/Alert.spec.ts → SyAlert/tests/SyAlert.spec.ts} +5 -5
  273. package/src/components/{Alert/tests/__snapshots__/Alert.spec.ts.snap → SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap} +2 -2
  274. package/src/components/UserMenuBtn/Accessibilite.mdx +14 -0
  275. package/src/components/UserMenuBtn/Accessibilite.stories.ts +189 -0
  276. package/src/components/UserMenuBtn/AccessibiliteItems.ts +155 -0
  277. package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
  278. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +540 -0
  279. package/src/components/UserMenuBtn/UserMenuBtn.vue +101 -0
  280. package/src/components/UserMenuBtn/config.ts +24 -0
  281. package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +4 -0
  282. package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
  283. package/src/components/index.ts +19 -4
  284. package/src/composables/index.ts +8 -0
  285. package/src/composables/rules/tests/useFieldValidation.spec.ts +84 -0
  286. package/src/composables/rules/useFieldValidation.ts +90 -0
  287. package/src/designTokens/index.ts +2 -0
  288. package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
  289. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
  290. package/src/main.ts +3 -0
  291. package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
  292. package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
  293. package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
  294. package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
  295. package/src/stories/Fondamentaux/Elevations.mdx +14 -0
  296. package/src/stories/Fondamentaux/Espacements.mdx +29 -0
  297. package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
  298. package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
  299. package/src/stories/Fondamentaux/Typographie.mdx +58 -0
  300. package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +120 -0
  301. package/src/stories/GuideDuDev/components.stories.ts +5 -5
  302. package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
  303. package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
  304. package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
  305. package/src/stories/Guidelines/Vuetify/Vuetify.mdx +11 -0
  306. package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +138 -0
  307. package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +350 -0
  308. package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
  309. package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
  310. package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
  311. package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
  312. package/src/stories/Guidelines/Typo.mdx +0 -53
  313. /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
  314. /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
  315. /package/src/components/{Alert/Alert.vue → SyAlert/SyAlert.vue} +0 -0
  316. /package/src/components/{Alert → SyAlert}/locales.ts +0 -0
  317. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
  318. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
  319. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
  320. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
  321. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
  322. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
@@ -0,0 +1,678 @@
1
+ import { type Meta, type StoryObj } from '@storybook/vue3'
2
+ import CookieBanner from './CookieBanner.vue'
3
+ import { fn } from '@storybook/test'
4
+ import { VBtn } from 'vuetify/components'
5
+ import { ref, watch } from 'vue'
6
+
7
+ const meta = {
8
+ title: 'Composants/Feedback/CookieBanner',
9
+ component: CookieBanner,
10
+ argTypes: {
11
+ 'modelValue': {
12
+ description: 'V-model, control la visibilité de la bannière',
13
+ control: { type: 'boolean' },
14
+ table: {
15
+ defaultValue: { summary: 'true' },
16
+ category: 'props',
17
+ },
18
+ },
19
+ 'items': {
20
+ description: 'Liste des cookies à afficher',
21
+ control: 'object',
22
+ table: {
23
+ type: {
24
+ summary: 'CookiesItems',
25
+ detail: `{
26
+ essentials?: {
27
+ name: string
28
+ description?: string
29
+ conservation: string
30
+ }[],
31
+ functional?: {
32
+ name: string
33
+ description?: string
34
+ conservation: string
35
+ }[],
36
+ analytics?: {
37
+ name: string
38
+ description?: string
39
+ conservation: string
40
+ }[],
41
+ }`,
42
+ },
43
+ category: 'props',
44
+ },
45
+ },
46
+
47
+ 'onAccept': {
48
+ action: 'accept',
49
+ description: 'Événement émis lors de l\'acceptation des cookies',
50
+ table: {
51
+ category: 'Events',
52
+ type: { summary: '' },
53
+ },
54
+ },
55
+ 'onReject': {
56
+ action: 'reject',
57
+ description: 'Événement émis lors du refus des cookies',
58
+ table: {
59
+ category: 'Events',
60
+ type: { summary: '' },
61
+ },
62
+ },
63
+ 'onCustomize': {
64
+ action: 'customize',
65
+ description: 'Événement émis lors de la personnalisation des cookies',
66
+ table: {
67
+ category: 'Events',
68
+ type: { summary: '' },
69
+ },
70
+ },
71
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
72
+ // @ts-ignore- Object literal may only specify known properties
73
+ 'onUpdate:modelValue': {
74
+ action: 'update:modelValue',
75
+ description: 'Événement émis lors de la mise à jour de la visibilité de la bannière',
76
+ table: {
77
+ category: 'Events',
78
+ type: { summary: 'Boolean' },
79
+ },
80
+ },
81
+ 'vuetifyOptions': {
82
+ description: 'Options de personnalisation des composants Vuetify internes',
83
+ control: { type: 'object' },
84
+ table: {
85
+ defaultValue: {
86
+ summary: '{}',
87
+ detail: `{
88
+ banner: {
89
+ width: '800px',
90
+ maxWidth: '100%',
91
+ rounded: true,
92
+ elevation: 2,
93
+ class: 'pa-8 ma-8',
94
+ stacked: true,
95
+ location: 'bottom',
96
+ position: 'fixed',
97
+ maxHeight: 'calc(100dvh - 64px)',
98
+ density: 'compact',
99
+ },
100
+ closeBtn: {
101
+ icon: true,
102
+ variant: 'text',
103
+ width: '32px',
104
+ height: '32px',
105
+ class: 'ml-4',
106
+ },
107
+ backBtn: {
108
+ icon: true,
109
+ variant: 'text',
110
+ width: '32px',
111
+ height: '32px',
112
+ class: 'ml-4',
113
+ },
114
+ customizeBtn: {
115
+ color: 'primary',
116
+ height: 'auto',
117
+ minHeight: '44px',
118
+ class: 'text-wrap ma-2',
119
+ variant: 'outlined',
120
+ },
121
+ rejectBtn: {
122
+ color: 'primary',
123
+ height: 'auto',
124
+ minHeight: '44px',
125
+ class: 'text-wrap ma-2',
126
+ },
127
+ acceptBtn: {
128
+ color: 'primary',
129
+ height: 'auto',
130
+ minHeight: '44px',
131
+ class: 'text-wrap ma-2',
132
+ },
133
+ }`,
134
+ },
135
+ type: {
136
+ summary: 'Record<string, Record<string, unknown>>',
137
+ detail: `{
138
+ banner: VSheetOptions,
139
+ closeBtn: VBtnOptions,
140
+ customizeBtn: VBtnOptions,
141
+ rejectBtn: VBtnOptions,
142
+ acceptBtn: VBtnOptions,
143
+ }`,
144
+ },
145
+ category: 'props',
146
+ },
147
+ },
148
+ 'default': {
149
+ description: 'Description de la bannière',
150
+ control: { type: 'text' },
151
+ table: {
152
+ defaultValue: { summary: 'undefined' },
153
+ type: { summary: '{}' },
154
+ category: 'slots',
155
+ },
156
+ },
157
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
158
+ // @ts-ignore - 'cookie-description-${cookieName}' storybook can't infer dynamic slot name
159
+ 'cookie-description-${cookieName}': {
160
+ description: 'Slot pour personnaliser la description d’un cookie',
161
+ control: 'none',
162
+ table: {
163
+ category: 'slots',
164
+ type: {
165
+ summary: 'Cookie',
166
+ detail: `{
167
+ name: string
168
+ description?: string
169
+ conservation: string
170
+ }`,
171
+ },
172
+ },
173
+ },
174
+ },
175
+ parameters: {
176
+ layout: 'fullscreen',
177
+ controls: {
178
+ exclude: ['reject', 'accept', 'customize', 'submit'],
179
+ },
180
+ docs: {
181
+ controls: { exclude: ['submit', 'slotName'] },
182
+ },
183
+ },
184
+ args: {
185
+ modelValue: false,
186
+ },
187
+ } satisfies Meta<typeof CookieBanner>
188
+
189
+ export default meta
190
+
191
+ type Story = StoryObj<typeof meta>
192
+
193
+ const items = {
194
+ essentials: [
195
+ {
196
+ name: 'session',
197
+ description: 'Sauvegarde la session pour rester connecté.',
198
+ conservation: '20 heures',
199
+ },
200
+ {
201
+ name: 'cookie_policy',
202
+ description: 'Sauvegarde les préférences de cookies.',
203
+ conservation: '1 an',
204
+ },
205
+ ],
206
+ functional: [
207
+ {
208
+ name: 'contrast',
209
+ description: 'Sauvegarde la personnalisation de l’affichage.',
210
+ conservation: '1 an',
211
+ },
212
+ ],
213
+ analytics: [
214
+ {
215
+ name: 'user_id',
216
+ description: 'Sauvegarde l’identifiant unique de visiteur.',
217
+ conservation: '6 mois',
218
+ },
219
+ ],
220
+ }
221
+
222
+ export const Default: Story = {
223
+ argTypes: {
224
+ onAccept: { action: 'accept' },
225
+ onReject: { action: 'reject' },
226
+ onCustomize: { action: 'customize' },
227
+ },
228
+ args: {
229
+ items,
230
+ onAccept: fn(),
231
+ onReject: fn(),
232
+ onCustomize: fn(),
233
+ },
234
+
235
+ render: (args) => {
236
+ return {
237
+ components: { CookieBanner, VBtn },
238
+ setup() {
239
+ const open = ref(false)
240
+ watch(() => args.modelValue, (value) => {
241
+ open.value = !!value
242
+ }, { immediate: true })
243
+ return { args, open }
244
+ },
245
+ template: `
246
+ <div style="height: 150px; display: flex; align-items: center; justify-content: center;">
247
+ <VBtn @click="open = true" v-if="!open">Ouvrir la bannière</VBtn>
248
+ <CookieBanner v-bind="args" v-model="open">
249
+ <template #default v-if="args.default">
250
+ {{ args.default }}
251
+ </template>
252
+ </CookieBanner>
253
+ </div>
254
+ `,
255
+ }
256
+ },
257
+
258
+ parameters: {
259
+ sourceCode: [
260
+ {
261
+ name: 'Template',
262
+ code: `<template>
263
+ <CookieBanner
264
+ :items
265
+ @accept="onAccept"
266
+ @reject="onReject"
267
+ @customize="onCustomize"
268
+ v-model="modelValue"
269
+ />
270
+ </template>`,
271
+ },
272
+ {
273
+ name: 'Script',
274
+ code: `<script setup lang="ts">
275
+ import { CookieBanner } from '@cnamts/synapse'
276
+
277
+ const modelValue = ref(true)
278
+
279
+ const onAccept = () => {
280
+ console.log('Accept')
281
+ }
282
+
283
+ const onReject = () => {
284
+ console.log('Reject')
285
+ }
286
+
287
+ const onCustomize = () => {
288
+ console.log('Customize')
289
+ }
290
+
291
+ const items = {
292
+ essentials: [
293
+ {
294
+ name: 'session',
295
+ description: 'Sauvegarde la session pour rester connecté.',
296
+ conservation: '20 heures',
297
+ },
298
+ {
299
+ name: 'cookie_policy',
300
+ description: 'Sauvegarde les préférences de cookies.',
301
+ conservation: '1 an',
302
+ },
303
+ ],
304
+ functional: [
305
+ {
306
+ name: 'contrast',
307
+ description: 'Sauvegarde la personnalisation de l’affichage.',
308
+ conservation: '1 an',
309
+ },
310
+ ],
311
+ analytics: [
312
+ {
313
+ name: 'user_id',
314
+ description: 'Sauvegarde l’identifiant unique de visiteur.',
315
+ conservation: '6 mois',
316
+ },
317
+ ],
318
+ }
319
+ </script>`,
320
+ },
321
+ ],
322
+ },
323
+ }
324
+
325
+ export const WithoutCookiesItems: Story = {
326
+ args: {
327
+ onAccept: fn(),
328
+ onReject: fn(),
329
+ onCustomize: fn(),
330
+ },
331
+ render: (args) => {
332
+ return {
333
+ components: { CookieBanner, VBtn },
334
+ setup() {
335
+ const open = ref(false)
336
+ watch(() => args.modelValue, (value) => {
337
+ open.value = !!value
338
+ }, { immediate: true })
339
+ return { args, open }
340
+ },
341
+ template: `
342
+ <div style="height: 150px; display: flex; align-items: center; justify-content: center;">
343
+ <VBtn @click="open = true" v-if="!open">Ouvrir la bannière</VBtn>
344
+ <CookieBanner v-bind="args" v-model="open" >
345
+ <template #default v-if="args.default">
346
+ {{ args.default }}
347
+ </template>
348
+ </CookieBanner>
349
+ </div>
350
+ `,
351
+ }
352
+ },
353
+ parameters: {
354
+ sourceCode: [
355
+ {
356
+ name: 'Template',
357
+ code: `<template>
358
+ <CookieBanner
359
+ @accept="onAccept"
360
+ @reject="onReject"
361
+ @customize="onCustomize"
362
+ v-model="modelValue"
363
+ />
364
+ </template>`,
365
+ },
366
+ {
367
+ name: 'Script',
368
+ code: `<script setup lang="ts">
369
+ import { CookieBanner } from '@cnamts/synapse'
370
+
371
+ const modelValue = ref(true)
372
+ </script>`,
373
+ },
374
+ ],
375
+ },
376
+ }
377
+
378
+ export const BannerDescriptionSlot: Story = {
379
+ args: {
380
+ onAccept: fn(),
381
+ onReject: fn(),
382
+ onCustomize: fn(),
383
+ items,
384
+ },
385
+ render: (args) => {
386
+ return {
387
+ components: { CookieBanner, VBtn },
388
+ setup() {
389
+ const open = ref(false)
390
+ watch(() => args.modelValue, (value) => {
391
+ open.value = !!value
392
+ }, { immediate: true })
393
+ return { args, open }
394
+ },
395
+ template: `
396
+ <div style="height: 150px; display: flex; align-items: center; justify-content: center;">
397
+ <VBtn @click="open = true" v-if="!open">Ouvrir la bannière</VBtn>
398
+ <CookieBanner v-bind="args" v-model="open">
399
+ <p><b>Custom</b> description</p>
400
+ </CookieBanner>
401
+ </div>
402
+ `,
403
+ }
404
+ },
405
+ parameters: {
406
+ sourceCode: [
407
+ {
408
+ name: 'Template',
409
+ code: `<template>
410
+ <CookieBanner
411
+ :items
412
+ @accept="onAccept"
413
+ @reject="onReject"
414
+ @customize="onCustomize"
415
+ v-model="modelValue"
416
+ >
417
+ <p><b>Custom</b> description</p>
418
+ </CookieBanner>
419
+ </template>`,
420
+ },
421
+ {
422
+ name: 'Script',
423
+ code: `<script setup lang="ts">
424
+ import { CookieBanner } from '@cnamts/synapse'
425
+
426
+ const modelValue = ref(true)
427
+
428
+ const items = {
429
+ essentials: [
430
+ {
431
+ name: 'session',
432
+ description: 'Sauvegarde la session pour rester connecté.',
433
+ conservation: '20 heures',
434
+ },
435
+ {
436
+ name: 'cookie_policy',
437
+ description: 'Sauvegarde les préférences de cookies.',
438
+ conservation: '1 an',
439
+ },
440
+ ],
441
+ functional: [
442
+ {
443
+ name: 'contrast',
444
+ description: 'Sauvegarde la personnalisation de l’affichage.',
445
+ conservation: '1 an',
446
+ },
447
+ ],
448
+ analytics: [
449
+ {
450
+ name: 'user_id',
451
+ description: 'Sauvegarde l’identifiant unique de visiteur.',
452
+ conservation: '6 mois',
453
+ },
454
+ ],
455
+ }
456
+ </script>`,
457
+ },
458
+ ],
459
+ },
460
+ }
461
+
462
+ export const CookiesDescriptionSlots: Story = {
463
+ args: {
464
+ onAccept: fn(),
465
+ onReject: fn(),
466
+ onCustomize: fn(),
467
+ items: {
468
+ functional: [
469
+ {
470
+ name: 'contrast',
471
+ conservation: '1 an',
472
+ },
473
+ {
474
+ name: 'privacy',
475
+ conservation: '1 an',
476
+ },
477
+ {
478
+ name: 'cookie_policy',
479
+ description: 'Sauvegarde les préférences de cookies.',
480
+ conservation: '1 an',
481
+ },
482
+ ],
483
+ },
484
+ },
485
+ render: (args) => {
486
+ return {
487
+ components: { CookieBanner, VBtn },
488
+ setup() {
489
+ const open = ref(false)
490
+ watch(() => args.modelValue, (value) => {
491
+ open.value = !!value
492
+ }, { immediate: true })
493
+ return { args, open }
494
+ },
495
+ template: `
496
+ <div style="height: 150px; display: flex; align-items: center; justify-content: center;">
497
+ <VBtn @click="open = true" v-if="!open">Ouvrir la bannière</VBtn>
498
+ <CookieBanner v-bind="args" v-model="open">
499
+ <template #cookie-description-contrast="{ cookie }">
500
+ voir : <a href="#">En savoir plus</a>
501
+ </template>
502
+
503
+ <template #cookie-description-privacy="{ cookie }">
504
+ <a href="#">Politique de confidentialité</a>
505
+ </template>
506
+ </CookieBanner>
507
+ </div>
508
+ `,
509
+ }
510
+ },
511
+ parameters: {
512
+ sourceCode: [
513
+ {
514
+ name: 'Template',
515
+ code: `<template>
516
+ <CookieBanner
517
+ :items
518
+ @accept="onAccept"
519
+ @reject="onReject"
520
+ @customize="onCustomize"
521
+ v-model="modelValue"
522
+ >
523
+ <template #cookie-description-contrast="{ cookie }">
524
+ voir : <a href="#">En savoir plus</a>
525
+ </template>
526
+
527
+ <template #cookie-description-privacy="{ cookie }">
528
+ <a href="#">Politique de confidentialité</a>
529
+ </template>
530
+ </CookieBanner>
531
+ </template>`,
532
+ },
533
+ {
534
+ name: 'Script',
535
+ code: `<script setup lang="ts">
536
+ import { CookieBanner } from '@cnamts/synapse'
537
+
538
+ const modelValue = ref(true)
539
+
540
+ const items = {
541
+ functional: [
542
+ {
543
+ name: 'contrast',
544
+ conservation: '1 an',
545
+ },
546
+ {
547
+ name: 'privacy',
548
+ conservation: '1 an',
549
+ },
550
+ {
551
+ name: 'cookie_policy',
552
+ description: 'Sauvegarde les préférences de cookies.',
553
+ conservation: '1 an',
554
+ },
555
+ ],
556
+ },
557
+ </script>`,
558
+ },
559
+ ],
560
+ },
561
+ }
562
+
563
+ export const Customization: Story = {
564
+ args: {
565
+ items,
566
+ onAccept: fn(),
567
+ onReject: fn(),
568
+ onCustomize: fn(),
569
+ vuetifyOptions: {
570
+ banner: {
571
+ color: '#ced9eb',
572
+ },
573
+ customizeBtn: {
574
+ variant: 'text',
575
+ color: 'orange',
576
+ },
577
+ rejectBtn: {
578
+ variant: 'outlined',
579
+ },
580
+ acceptBtn: {
581
+ variant: 'outlined',
582
+ },
583
+ },
584
+ },
585
+ render: (args) => {
586
+ return {
587
+ components: { CookieBanner, VBtn },
588
+ setup() {
589
+ const open = ref(false)
590
+ watch(() => args.modelValue, (value) => {
591
+ open.value = !!value
592
+ }, { immediate: true })
593
+ return { args, open }
594
+ },
595
+ template: `
596
+ <div style="height: 150px; display: flex; align-items: center; justify-content: center;">
597
+ <VBtn @click="open = true" v-if="!open">Ouvrir la bannière</VBtn>
598
+ <CookieBanner v-bind="args" v-model="open" >
599
+ <template #default v-if="args.default">
600
+ {{ args.default }}
601
+ </template>
602
+ </CookieBanner>
603
+ </div>
604
+ `,
605
+ }
606
+ },
607
+ parameters: {
608
+ sourceCode: [
609
+ {
610
+ name: 'Template',
611
+ code: `<template>
612
+ <CookieBanner
613
+ :items
614
+ @accept="onAccept"
615
+ @reject="onReject"
616
+ @customize="onCustomize"
617
+ v-model="modelValue"
618
+ :cookiesRoute="cookiesRoute"
619
+ :vuetifyOptions="vuetifyOptions"
620
+ />
621
+ </template>`,
622
+ },
623
+ {
624
+ name: 'Script',
625
+ code: `<script setup lang="ts">
626
+ import { CookieBanner } from '@cnamts/synapse'
627
+
628
+ const modelValue = ref(true)
629
+
630
+ const items = {
631
+ essentials: [
632
+ {
633
+ name: 'session',
634
+ description: 'Sauvegarde la session pour rester connecté.',
635
+ conservation: '20 heures',
636
+ },
637
+ {
638
+ name: 'cookie_policy',
639
+ description: 'Sauvegarde les préférences de cookies.',
640
+ conservation: '1 an',
641
+ },
642
+ ],
643
+ functional: [
644
+ {
645
+ name: 'contrast',
646
+ description: 'Sauvegarde la personnalisation de l’affichage.',
647
+ conservation: '1 an',
648
+ },
649
+ ],
650
+ analytics: [
651
+ {
652
+ name: 'user_id',
653
+ description: 'Sauvegarde l’identifiant unique de visiteur.',
654
+ conservation: '6 mois',
655
+ },
656
+ ],
657
+ }
658
+
659
+ const vuetifyOptions = {
660
+ sheet: {
661
+ color: '#ced9eb',
662
+ },
663
+ customizeBtn: {
664
+ variant: 'text',
665
+ color: 'orange',
666
+ },
667
+ rejectBtn: {
668
+ variant: 'outlined',
669
+ },
670
+ acceptBtn: {
671
+ variant: 'outlined',
672
+ },
673
+ }
674
+ </script>`,
675
+ },
676
+ ],
677
+ },
678
+ }