@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,540 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import UserMenuBtn from './UserMenuBtn.vue'
3
+
4
+ const meta = {
5
+ title: 'Composants/Boutons/UserMenuBtn',
6
+ component: UserMenuBtn,
7
+ parameters: {
8
+ controls: { exclude: ['logout'] },
9
+ },
10
+ argTypes: {
11
+ 'modelValue': {
12
+ control: false,
13
+ description: 'Élément sélectionné dans le menu',
14
+ table: {
15
+ category: 'props',
16
+ type: { summary: '{ text: string, value: string } | null | undefined' },
17
+ },
18
+ },
19
+ 'hideLogoutBtn': {
20
+ control: 'boolean',
21
+ description: 'Masque le bouton de déconnexion',
22
+ table: {
23
+ type: { summary: 'boolean' },
24
+ },
25
+ },
26
+ 'hideUserIcon': {
27
+ control: 'boolean',
28
+ description: 'Masque l\'icône utilisateur',
29
+ table: {
30
+ type: { summary: 'boolean' },
31
+ },
32
+ },
33
+ 'isMobileView': {
34
+ control: 'boolean',
35
+ description: 'Affiche le menu en version mobile',
36
+ table: {
37
+ type: { summary: 'boolean' },
38
+ },
39
+ },
40
+ 'fullName': {
41
+ control: 'text',
42
+ description: 'Nom complet de l\'utilisateur',
43
+ table: {
44
+ type: { summary: 'string' },
45
+ },
46
+ },
47
+ 'additionalInformation': {
48
+ control: 'text',
49
+ description: 'Informations supplémentaires sur l\'utilisateur (ex: rôle, service, etc.)',
50
+ table: {
51
+ type: { summary: 'string' },
52
+ },
53
+ },
54
+ 'menuItems': {
55
+ control: 'object',
56
+ description: 'Liste des éléments du menu utilisateur',
57
+ table: {
58
+ type: {
59
+ summary: '{ text: string, value: string, link?: string }[]',
60
+ },
61
+ },
62
+ },
63
+ 'vuetifyOptions': {
64
+ control: 'object',
65
+ description: 'Options de personnalisation des éléments Vuetify',
66
+ table: {
67
+ category: 'props',
68
+ type: {
69
+ summary: 'object',
70
+ detail: `{
71
+ menu: Record<string, any>,
72
+ btn: Record<string, any>,
73
+ icon: Record<string, any>,
74
+ logoutListItem: Record<string, any>,
75
+ logoutIcon: Record<string, any>,
76
+ }`,
77
+ },
78
+ defaultValue: {
79
+ summary: 'object',
80
+ detail: `{
81
+ menu: {
82
+ offsetY: true,
83
+ zIndex: 4,
84
+ minWidth: '198px',
85
+ maxWidth: 'auto',
86
+ nudgeRight: 0,
87
+ },
88
+ btn: {
89
+ variant: 'text',
90
+ height: 'auto',
91
+ },
92
+ icon: {
93
+ color: 'avatar',
94
+ },
95
+ logoutListItem: {
96
+ class: 'text-primary',
97
+ minWidth: '198px',
98
+ },
99
+ logoutIcon: {
100
+ color: 'primary',
101
+ class: 'mr-4',
102
+ },
103
+ }`,
104
+ },
105
+ },
106
+ },
107
+ 'onLogout': {
108
+ action: 'logout',
109
+ description: 'Événement déclenché lors de la déconnexion de l\'utilisateur',
110
+ table: {
111
+ category: 'events',
112
+ type: { summary: 'void' },
113
+ },
114
+ },
115
+ 'onUpdate:modelValue': {
116
+ action: 'update:modelValue',
117
+ description: 'Événement déclenché lors de la selection d\'un élément du menu',
118
+ table: {
119
+ category: 'events',
120
+ type: { summary: '{ text: string, value: string }' },
121
+ },
122
+ },
123
+ },
124
+ } satisfies Meta<typeof UserMenuBtn>
125
+
126
+ export default meta
127
+
128
+ type Story = StoryObj<typeof meta>
129
+
130
+ export const Default: Story = {
131
+ parameters: {
132
+ sourceCode: [
133
+ {
134
+ name: 'Template',
135
+ code: `<template>
136
+ <UserMenuBtn
137
+ v-model="selected"
138
+ :menuItems="menuItems"
139
+ />
140
+ </template>`,
141
+ },
142
+ {
143
+ name: 'Script',
144
+ code: `<script setup lang="ts">
145
+ import { ref } from 'vue'
146
+ import { UserMenuBtn } from '@cnamts/synapse'
147
+
148
+ const selected = ref(null)
149
+ const menuItems = ref([
150
+ { text: 'Administration', value: 'Administration' },
151
+ { text: 'Profil', value: 'Profil' },
152
+ { text: 'Paramètres', value: 'Paramètres' },
153
+ ])
154
+ </script>`,
155
+ },
156
+ ],
157
+ },
158
+ args: {
159
+ menuItems: [
160
+ { text: 'Administration', value: 'Administration' },
161
+ { text: 'Profil', value: 'Profil' },
162
+ { text: 'Paramètres', value: 'Paramètres' },
163
+ ],
164
+ modelValue: null,
165
+ hideLogoutBtn: false,
166
+ hideUserIcon: false,
167
+ isMobileView: false,
168
+ vuetifyOptions: undefined,
169
+ },
170
+ render: (args) => {
171
+ return {
172
+ components: { UserMenuBtn },
173
+ setup() {
174
+ return { args }
175
+ },
176
+ template: `
177
+ <div class="pa-4">
178
+ <UserMenuBtn v-bind="args"/>
179
+ </div>`,
180
+ }
181
+ },
182
+ }
183
+ export const HideLogoutButton: Story = {
184
+ parameters: {
185
+ sourceCode: [
186
+ {
187
+ name: 'Template',
188
+ code: `<template>
189
+ <UserMenuBtn
190
+ v-model="selected"
191
+ :menuItems="menuItems"
192
+ :hide-logout-btn="hideLogOut"
193
+ />
194
+ </template>`,
195
+ },
196
+ {
197
+ name: 'Script',
198
+ code: `<script setup lang="ts">
199
+ import { ref } from 'vue'
200
+ import { UserMenuBtn } from '@cnamts/synapse'
201
+
202
+ const selected = ref(null)
203
+ const menuItems = ref([
204
+ { text: 'Administration', value: 'Administration' },
205
+ { text: 'Profil', value: 'Profil' },
206
+ { text: 'Paramètres', value: 'Paramètres' },
207
+ ])
208
+
209
+ const hideLogOut = ref(true)
210
+ </script>`,
211
+ },
212
+ ],
213
+ },
214
+ args: {
215
+ ...Default.args,
216
+ hideLogoutBtn: true,
217
+ },
218
+ render: (args) => {
219
+ return {
220
+ components: { UserMenuBtn },
221
+ setup() {
222
+ return { args }
223
+ },
224
+ template: `
225
+ <div class="pa-4">
226
+ <UserMenuBtn v-bind="args"/>
227
+ </div>`,
228
+ }
229
+ },
230
+ }
231
+
232
+ export const HideUserIcon: Story = {
233
+ parameters: {
234
+ sourceCode: [
235
+ {
236
+ name: 'Template',
237
+ code: `<template>
238
+ <UserMenuBtn
239
+ v-model="selected"
240
+ :menuItems="menuItems"
241
+ :hide-user-icon="hideUserIcon"
242
+ />
243
+ </template>`,
244
+ },
245
+ {
246
+ name: 'Script',
247
+ code: `<script setup lang="ts">
248
+ import { ref } from 'vue'
249
+ import { UserMenuBtn } from '@cnamts/synapse'
250
+
251
+ const selected = ref(null)
252
+ const menuItems = ref([
253
+ { text: 'Administration', value: 'Administration' },
254
+ { text: 'Profil', value: 'Profil' },
255
+ { text: 'Paramètres', value: 'Paramètres' },
256
+ ])
257
+
258
+ const hideUserIcon = ref(true)
259
+ </script>`,
260
+ },
261
+ ],
262
+ },
263
+ args: {
264
+ ...Default.args,
265
+ hideUserIcon: true,
266
+ },
267
+ render: (args) => {
268
+ return {
269
+ components: { UserMenuBtn },
270
+ setup() {
271
+ return { args }
272
+ },
273
+ template: `
274
+ <div class="pa-4">
275
+ <UserMenuBtn v-bind="args"/>
276
+ </div>`,
277
+ }
278
+ },
279
+ }
280
+
281
+ export const MobileVersion: Story = {
282
+ parameters: {
283
+ sourceCode: [
284
+ {
285
+ name: 'Template',
286
+ code: `<template>
287
+ <UserMenuBtn
288
+ v-model="selected"
289
+ :menuItems="menuItems"
290
+ :is-mobile-view="isMobileVersion"
291
+ />
292
+ </template>`,
293
+ },
294
+ {
295
+ name: 'Script',
296
+ code: `<script setup lang="ts">
297
+ import { ref } from 'vue'
298
+ import { UserMenuBtn } from '@cnamts/synapse'
299
+
300
+ const selected = ref(null)
301
+ const menuItems = ref([
302
+ { text: 'Administration', value: 'Administration' },
303
+ { text: 'Profil', value: 'Profil' },
304
+ { text: 'Paramètres', value: 'Paramètres' },
305
+ ])
306
+
307
+ const isMobileVersion = ref(true)
308
+ </script>`,
309
+ },
310
+ ],
311
+ },
312
+ args: {
313
+ ...Default.args,
314
+ isMobileView: true,
315
+ },
316
+ render: (args) => {
317
+ return {
318
+ components: { UserMenuBtn },
319
+ setup() {
320
+ return { args }
321
+ },
322
+ template: `
323
+ <div class="pa-4">
324
+ <UserMenuBtn v-bind="args"/>
325
+ </div>`,
326
+ }
327
+ },
328
+ }
329
+
330
+ export const CustomFullName: Story = {
331
+ parameters: {
332
+ sourceCode: [
333
+ {
334
+ name: 'Template',
335
+ code: `<template>
336
+ <UserMenuBtn
337
+ v-model="selected"
338
+ :menuItems="menuItems"
339
+ :fullName="fullName"
340
+ />
341
+ </template>`,
342
+ },
343
+ {
344
+ name: 'Script',
345
+ code: `<script setup lang="ts">
346
+ import { ref } from 'vue'
347
+ import { UserMenuBtn } from '@cnamts/synapse'
348
+
349
+ const selected = ref(null)
350
+ const menuItems = ref([
351
+ { text: 'Administration', value: 'Administration' },
352
+ { text: 'Profil', value: 'Profil' },
353
+ { text: 'Paramètres', value: 'Paramètres' },
354
+ ])
355
+
356
+ const fullName = ref('John Doe')
357
+ </script>`,
358
+ },
359
+ ],
360
+ },
361
+ args: {
362
+ ...Default.args,
363
+ fullName: 'John Doe',
364
+ },
365
+ render: (args) => {
366
+ return {
367
+ components: { UserMenuBtn },
368
+ setup() {
369
+ return { args }
370
+ },
371
+ template: `
372
+ <div class="pa-4">
373
+ <UserMenuBtn v-bind="args"/>
374
+ </div>`,
375
+ }
376
+ },
377
+ }
378
+
379
+ export const CustomAdditionalInformation: Story = {
380
+ parameters: {
381
+ sourceCode: [
382
+ {
383
+ name: 'Template',
384
+ code: `<template>
385
+ <UserMenuBtn
386
+ v-model="selected"
387
+ :menuItems="menuItems"
388
+ :additionalInformation="additionalInformation"
389
+ />
390
+ </template>`,
391
+ },
392
+ {
393
+ name: 'Script',
394
+ code: `<script setup lang="ts">
395
+ import { ref } from 'vue'
396
+ import { UserMenuBtn } from '@cnamts/synapse'
397
+
398
+ const selected = ref(null)
399
+ const menuItems = ref([
400
+ { text: 'Administration', value: 'Administration' },
401
+ { text: 'Profil', value: 'Profil' },
402
+ { text: 'Paramètres', value: 'Paramètres' },
403
+ ])
404
+
405
+ const additionalInformation = ref('Custom Information')
406
+ </script>`,
407
+ },
408
+ ],
409
+ },
410
+ args: {
411
+ ...Default.args,
412
+ additionalInformation: 'Custom Information',
413
+ },
414
+ render: (args) => {
415
+ return {
416
+ components: { UserMenuBtn },
417
+ setup() {
418
+ return { args }
419
+ },
420
+ template: `
421
+ <div class="pa-4">
422
+ <UserMenuBtn v-bind="args"/>
423
+ </div>`,
424
+ }
425
+ },
426
+ }
427
+
428
+ export const WithVuetifyOptions: Story = {
429
+ parameters: {
430
+ sourceCode: [
431
+ {
432
+ name: 'Template',
433
+ code: `<template>
434
+ <UserMenuBtn
435
+ v-model="selected"
436
+ :menuItems="menuItems"
437
+ :vuetify-options="vuetifyOptions"
438
+ />
439
+ </template>`,
440
+ },
441
+ {
442
+ name: 'Script',
443
+ code: `<script setup lang="ts">
444
+ import { ref } from 'vue'
445
+ import { UserMenuBtn } from '@cnamts/synapse'
446
+
447
+ const selected = ref(null)
448
+ const menuItems = ref([
449
+ { text: 'Administration', value: 'Administration' },
450
+ { text: 'Profil', value: 'Profil' },
451
+ { text: 'Paramètres', value: 'Paramètres' },
452
+ ])
453
+
454
+ const vuetifyOptions = ref({
455
+ menu: { minWidth: '250px' },
456
+ btn: { variant: 'outlined' },
457
+ icon: { color: 'warning' },
458
+ logoutListItem: { class: 'text-warning' },
459
+ logoutIcon: { color: 'warning' },
460
+ })
461
+ </script>`,
462
+ },
463
+ ],
464
+ },
465
+ args: {
466
+ ...Default.args,
467
+ vuetifyOptions: {
468
+ menu: { minWidth: '250px' },
469
+ btn: { variant: 'outlined' },
470
+ icon: { color: 'warning' },
471
+ logoutListItem: { class: 'text-warning' },
472
+ logoutIcon: { color: 'warning' },
473
+ },
474
+ },
475
+ render: (args) => {
476
+ return {
477
+ components: { UserMenuBtn },
478
+ setup() {
479
+ return { args }
480
+ },
481
+ template: `
482
+ <div class="pa-4">
483
+ <UserMenuBtn v-bind="args"/>
484
+ </div>`,
485
+ }
486
+ },
487
+ }
488
+
489
+ export const LogoutEvent: Story = {
490
+ parameters: {
491
+ sourceCode: [
492
+ {
493
+ name: 'Template',
494
+ code: `<template>
495
+ <UserMenuBtn
496
+ v-model="selected"
497
+ :menuItems="menuItems"
498
+ @logout="handleLogout"
499
+ />
500
+ </template>`,
501
+ },
502
+ {
503
+ name: 'Script',
504
+ code: `<script setup lang="ts">
505
+ import { ref } from 'vue'
506
+ import { UserMenuBtn } from '@cnamts/synapse'
507
+
508
+ const selected = ref(null)
509
+ const menuItems = ref([
510
+ { text: 'Administration', value: 'Administration' },
511
+ { text: 'Profil', value: 'Profil' },
512
+ { text: 'Paramètres', value: 'Paramètres' },
513
+ ])
514
+
515
+ const handleLogout = () => {
516
+ alert('Logout event triggered')
517
+ }
518
+ </script>`,
519
+ },
520
+ ],
521
+ },
522
+ args: {
523
+ ...Default.args,
524
+ },
525
+ render: (args) => {
526
+ return {
527
+ components: { UserMenuBtn },
528
+ setup() {
529
+ const handleLogout = () => {
530
+ alert('Logout event triggered')
531
+ }
532
+ return { args, handleLogout }
533
+ },
534
+ template: `
535
+ <div class="pa-4">
536
+ <UserMenuBtn v-bind="args" @logout="handleLogout"/>
537
+ </div>`,
538
+ }
539
+ },
540
+ }
@@ -0,0 +1,101 @@
1
+ <script lang="ts" setup>
2
+ import { computed } from 'vue'
3
+ import SyBtnSelect from '../Customs/SyBtnSelect/SyBtnSelect.vue'
4
+ import { useDisplay } from 'vuetify'
5
+ import { mdiAccount, mdiLoginVariant } from '@mdi/js'
6
+ import useCustomizableOptions, { type CustomizableOptions } from '@/composables/useCustomizableOptions'
7
+ import { defaultOptions } from './config'
8
+
9
+ type MenuItem = { text: string, value: string, link?: string }
10
+
11
+ const props = withDefaults(defineProps<CustomizableOptions & {
12
+ menuItems?: MenuItem[]
13
+ additionalInformation?: string
14
+ fullName?: string
15
+ hideLogoutBtn?: boolean
16
+ isMobileView?: boolean
17
+ hideUserIcon?: boolean
18
+ }>(), {
19
+ menuItems: () => [],
20
+ additionalInformation: 'Information supplémentaire',
21
+ fullName: 'Prénom Nom',
22
+ hideLogoutBtn: false,
23
+ isMobileView: false,
24
+ hideUserIcon: false,
25
+ })
26
+
27
+ const modelValue = defineModel<MenuItem | null>({
28
+ default: null,
29
+ })
30
+
31
+ defineEmits(['logout'])
32
+
33
+ const { smAndDown } = useDisplay()
34
+
35
+ const options = useCustomizableOptions(defaultOptions, props)
36
+
37
+ const isMobileView = computed(() => {
38
+ return props.isMobileView || smAndDown.value
39
+ })
40
+ </script>
41
+
42
+ <template>
43
+ <SyBtnSelect
44
+ v-model="modelValue"
45
+ :hide-icon="hideUserIcon"
46
+ :icon-only="isMobileView"
47
+ :is-mobile-view="isMobileView"
48
+ :menu-items="menuItems"
49
+ :options="options"
50
+ :primary-info="fullName"
51
+ :secondary-info="additionalInformation"
52
+ class="user-menu-btn"
53
+ >
54
+ <template #append-icon>
55
+ <VIcon
56
+ v-if="!hideUserIcon"
57
+ :size="isMobileView ? 'x-large' : 'default'"
58
+ class="vd-user-icon mr-0 pa-2"
59
+ v-bind="options['icon']"
60
+ >
61
+ {{ mdiAccount }}
62
+ </VIcon>
63
+ </template>
64
+ <template #footer-list-item>
65
+ <VListItem
66
+ v-if="!hideLogoutBtn"
67
+ class="logout"
68
+ v-bind="options['logoutListItem']"
69
+ @click="$emit('logout')"
70
+ >
71
+ <div class="d-flex">
72
+ <VIcon
73
+ :icon="mdiLoginVariant"
74
+ class="mr-4"
75
+ v-bind="options['logoutIcon']"
76
+ />
77
+ <VListItemTitle>
78
+ Logout
79
+ </VListItemTitle>
80
+ </div>
81
+ </VListItem>
82
+ </template>
83
+ </SyBtnSelect>
84
+ </template>
85
+
86
+ <style scoped lang="scss">
87
+ @use '@/assets/tokens.scss';
88
+
89
+ .vd-user-icon {
90
+ width: 40px;
91
+ height: 40px;
92
+ background: tokens.$grey-lighten-90;
93
+ border-radius: 50%;
94
+
95
+ svg,
96
+ .v-icon__svg {
97
+ width: 24px;
98
+ height: 24px;
99
+ }
100
+ }
101
+ </style>
@@ -0,0 +1,24 @@
1
+ export const defaultOptions = {
2
+ menu: {
3
+ offsetY: true,
4
+ zIndex: 4,
5
+ minWidth: '198px',
6
+ maxWidth: 'auto',
7
+ nudgeRight: 0,
8
+ },
9
+ btn: {
10
+ variant: 'text',
11
+ height: 'auto',
12
+ },
13
+ icon: {
14
+ color: 'avatar',
15
+ },
16
+ logoutListItem: {
17
+ class: 'text-primary',
18
+ minWidth: '198px',
19
+ },
20
+ logoutIcon: {
21
+ color: 'primary',
22
+ class: 'mr-4',
23
+ },
24
+ } as const
@@ -0,0 +1,4 @@
1
+ export enum ExpertiseLevelEnum {
2
+ DEV = 'dev',
3
+ DESIGN = 'design',
4
+ }