@cnamts/synapse 0.0.3-alpha → 0.0.5-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 (300) hide show
  1. package/dist/design-system-v3.d.ts +1461 -68
  2. package/dist/design-system-v3.js +4775 -1673
  3. package/dist/design-system-v3.umd.cjs +10 -1
  4. package/dist/style.css +1 -1
  5. package/package.json +6 -2
  6. package/src/assets/tokens.scss +0 -1
  7. package/src/components/Alert/Accessibilite.mdx +14 -0
  8. package/src/components/Alert/Accessibilite.stories.ts +166 -0
  9. package/src/components/Alert/AccessibiliteItems.ts +152 -0
  10. package/src/components/Alert/Alert.mdx +1 -1
  11. package/src/components/Alert/Alert.stories.ts +91 -1
  12. package/src/components/Alert/constants/ExpertiseLevelEnum.ts +4 -0
  13. package/src/components/BackBtn/Accessibilite.mdx +14 -0
  14. package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
  15. package/src/components/BackBtn/AccessibiliteItems.ts +132 -0
  16. package/src/components/BackBtn/BackBtn.mdx +1 -1
  17. package/src/components/BackBtn/BackBtn.stories.ts +84 -1
  18. package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
  19. package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
  20. package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
  21. package/src/components/BackToTopBtn/AccessibiliteItems.ts +82 -0
  22. package/src/components/BackToTopBtn/BackToTopBtn.mdx +3 -3
  23. package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +172 -11
  24. package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
  25. package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
  26. package/src/components/CollapsibleList/Accessibilite.stories.ts +166 -0
  27. package/src/components/CollapsibleList/AccessibiliteItems.ts +129 -0
  28. package/src/components/CollapsibleList/CollapsibleList.mdx +2 -2
  29. package/src/components/CollapsibleList/CollapsibleList.stories.ts +37 -1
  30. package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
  31. package/src/components/CopyBtn/Accessibilite.mdx +14 -0
  32. package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
  33. package/src/components/CopyBtn/AccessibiliteItems.ts +135 -0
  34. package/src/components/CopyBtn/CopyBtn.mdx +1 -1
  35. package/src/components/CopyBtn/CopyBtn.stories.ts +120 -1
  36. package/src/components/CopyBtn/CopyBtn.vue +1 -1
  37. package/src/components/CopyBtn/config.ts +2 -0
  38. package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
  39. package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +44 -0
  40. package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +606 -0
  41. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +246 -0
  42. package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
  43. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +40 -0
  44. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +420 -0
  45. package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +89 -54
  46. package/src/components/Customs/SyInputSelect/config.ts +10 -0
  47. package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
  48. package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +10 -10
  49. package/src/components/Customs/SySelect/SySelect.stories.ts +338 -0
  50. package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +34 -11
  51. package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
  52. package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
  53. package/src/components/Customs/SyTextField/SyTextField.stories.ts +403 -0
  54. package/src/components/Customs/SyTextField/SyTextField.vue +110 -0
  55. package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +93 -0
  56. package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +57 -0
  57. package/src/components/Customs/SyTextField/types.d.ts +3 -0
  58. package/src/components/DataList/DataList.mdx +77 -0
  59. package/src/components/DataList/DataList.stories.ts +960 -0
  60. package/src/components/DataList/DataList.vue +140 -0
  61. package/src/components/DataList/DataListLoading/DataListLoading.vue +56 -0
  62. package/src/components/DataList/DataListLoading/tests/DataListLoading.spec.ts +23 -0
  63. package/src/components/DataList/locales.ts +3 -0
  64. package/src/components/DataList/tests/DataList.spec.ts +194 -0
  65. package/src/components/DataList/types.d.ts +23 -0
  66. package/src/components/DataListGroup/DataListGroup.mdx +77 -0
  67. package/src/components/DataListGroup/DataListGroup.stories.ts +987 -0
  68. package/src/components/DataListGroup/DataListGroup.vue +59 -0
  69. package/src/components/DataListGroup/tests/DataListGroup.spec.ts +54 -0
  70. package/src/components/DataListGroup/tests/data/dataListGroupItems.ts +41 -0
  71. package/src/components/DataListGroup/types.d.ts +15 -0
  72. package/src/components/DataListItem/DataListItem.vue +135 -0
  73. package/src/components/DataListItem/config.ts +17 -0
  74. package/src/components/DataListItem/locales.ts +3 -0
  75. package/src/components/DataListItem/tests/DataListItem.spec.ts +156 -0
  76. package/src/components/DataListItem/types.d.ts +23 -0
  77. package/src/components/DialogBox/DialogBox.mdx +14 -0
  78. package/src/components/DialogBox/DialogBox.stories.ts +798 -0
  79. package/src/components/DialogBox/DialogBox.vue +181 -0
  80. package/src/components/DialogBox/config.ts +25 -0
  81. package/src/components/DialogBox/locales.ts +5 -0
  82. package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
  83. package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
  84. package/src/components/DownloadBtn/Accessibilite.mdx +14 -0
  85. package/src/components/DownloadBtn/Accessibilite.stories.ts +166 -0
  86. package/src/components/DownloadBtn/AccessibiliteItems.ts +129 -0
  87. package/src/components/DownloadBtn/DownloadBtn.mdx +5 -6
  88. package/src/components/DownloadBtn/DownloadBtn.stories.ts +207 -2
  89. package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +4 -0
  90. package/src/components/ErrorPage/ErrorPage.mdx +21 -0
  91. package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
  92. package/src/components/ErrorPage/ErrorPage.vue +93 -0
  93. package/src/components/ErrorPage/locales.ts +5 -0
  94. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
  95. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
  96. package/src/components/FooterBar/FooterBar.mdx +2 -2
  97. package/src/components/FooterBar/FooterBar.stories.ts +557 -9
  98. package/src/components/FooterBar/config.ts +2 -3
  99. package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
  100. package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
  101. package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +2 -2
  102. package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
  103. package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
  104. package/src/components/FranceConnectBtn/AccessibiliteItems.ts +199 -0
  105. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
  106. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +58 -1
  107. package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
  108. package/src/components/HeaderBar/HeaderBar.mdx +164 -45
  109. package/src/components/HeaderBar/HeaderBar.stories.ts +618 -16
  110. package/src/components/HeaderBar/HeaderBar.vue +60 -22
  111. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.mdx +433 -0
  112. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +1089 -0
  113. package/src/components/HeaderBar/{HeaderComplexMenu/HeaderComplexMenu.vue → HeaderBurgerMenu/HeaderBurgerMenu.vue} +74 -45
  114. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.mdx +38 -0
  115. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +89 -0
  116. package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/__snapshots__/HeaderMenuItem.spec.ts.snap +1 -1
  117. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.mdx +17 -0
  118. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +121 -0
  119. package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/HeaderMenuSection.vue +2 -2
  120. package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/tests/HeaderMenuSection.spec.ts +1 -3
  121. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.mdx +43 -0
  122. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +261 -0
  123. package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/HeaderSubMenu.vue +17 -3
  124. package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/tests/HeaderSubMenu.spec.ts +1 -1
  125. package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +180 -0
  126. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +13 -0
  127. package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +13 -0
  128. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +62 -25
  129. package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +49 -1
  130. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +19 -23
  131. package/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.ts +70 -0
  132. package/src/components/HeaderBar/Usages.mdx +85 -0
  133. package/src/components/HeaderBar/consts.scss +0 -1
  134. package/src/components/HeaderBar/tests/HeaderBar.spec.ts +8 -2
  135. package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +5 -10
  136. package/src/components/HeaderLoading/HeaderLoading.mdx +28 -0
  137. package/src/components/HeaderLoading/HeaderLoading.stories.ts +62 -0
  138. package/src/components/HeaderLoading/HeaderLoading.vue +45 -0
  139. package/src/components/HeaderLoading/tests/HeaderLoading.spec.ts +22 -0
  140. package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +128 -0
  141. package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +784 -0
  142. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +194 -0
  143. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +74 -0
  144. package/src/components/HeaderNavigationBar/HorizontalNavbar/config.ts +18 -0
  145. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +127 -0
  146. package/src/components/HeaderNavigationBar/types.ts +7 -0
  147. package/src/components/HeaderToolbar/HeaderToolbar.mdx +31 -0
  148. package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +343 -0
  149. package/src/components/HeaderToolbar/HeaderToolbar.vue +487 -0
  150. package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +230 -0
  151. package/src/components/HeaderToolbar/types.d.ts +20 -0
  152. package/src/components/LangBtn/Accessibilite.mdx +14 -0
  153. package/src/components/LangBtn/Accessibilite.stories.ts +166 -0
  154. package/src/components/LangBtn/AccessibiliteItems.ts +132 -0
  155. package/src/components/LangBtn/LangBtn.mdx +1 -1
  156. package/src/components/LangBtn/LangBtn.stories.ts +125 -8
  157. package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
  158. package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
  159. package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
  160. package/src/components/Logo/Logo.mdx +2 -2
  161. package/src/components/Logo/Logo.stories.ts +147 -1
  162. package/src/components/LogoBrandSection/LogoBrandSection.mdx +14 -0
  163. package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +158 -0
  164. package/src/components/LogoBrandSection/LogoBrandSection.vue +312 -0
  165. package/src/components/LogoBrandSection/assets/ameli-pro.svg +1 -0
  166. package/src/components/LogoBrandSection/assets/ameli.svg +1 -0
  167. package/src/components/LogoBrandSection/assets/cnam.svg +1 -0
  168. package/src/components/LogoBrandSection/assets/compte-ameli.svg +1 -0
  169. package/src/components/LogoBrandSection/dividerDimensionsMapping.ts +14 -0
  170. package/src/components/LogoBrandSection/locales.ts +14 -0
  171. package/src/components/LogoBrandSection/secondaryLogoMapping.ts +24 -0
  172. package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +365 -0
  173. package/src/components/LogoBrandSection/tests/__snapshots__/LogoBrandSection.spec.ts.snap +14 -0
  174. package/src/components/LogoBrandSection/types.ts +8 -0
  175. package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
  176. package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
  177. package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
  178. package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
  179. package/src/components/MaintenancePage/index.ts +3 -0
  180. package/src/components/MaintenancePage/locales.ts +5 -0
  181. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
  182. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
  183. package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
  184. package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
  185. package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
  186. package/src/components/NotFoundPage/assets/not-found.svg +1 -0
  187. package/src/components/NotFoundPage/locales.ts +6 -0
  188. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
  189. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
  190. package/src/components/NotificationBar/Accessibilite.mdx +14 -0
  191. package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
  192. package/src/components/NotificationBar/AccessibiliteItems.ts +174 -0
  193. package/src/components/NotificationBar/NotificationBar.mdx +6 -6
  194. package/src/components/NotificationBar/NotificationBar.stories.ts +1 -1
  195. package/src/components/NotificationBar/NotificationBar.vue +2 -2
  196. package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
  197. package/src/components/NotificationBar/options.ts +1 -0
  198. package/src/components/NotificationBar/tests/NotificationBar.spec.ts +1 -1
  199. package/src/components/PageContainer/Accessibilite.mdx +14 -0
  200. package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
  201. package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
  202. package/src/components/PageContainer/PageContainer.mdx +1 -1
  203. package/src/components/PageContainer/PageContainer.stories.ts +86 -1
  204. package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
  205. package/src/components/PhoneField/PhoneField.mdx +49 -0
  206. package/src/components/PhoneField/PhoneField.stories.ts +869 -0
  207. package/src/components/PhoneField/PhoneField.vue +230 -0
  208. package/src/components/PhoneField/indicatifs.ts +104 -0
  209. package/src/components/PhoneField/locales.ts +4 -0
  210. package/src/components/PhoneField/tests/PhoneField.spec.ts +179 -0
  211. package/src/components/SkipLink/Accessibilite.mdx +14 -0
  212. package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
  213. package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
  214. package/src/components/SkipLink/SkipLink.stories.ts +50 -1
  215. package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
  216. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +33 -2
  217. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +38 -1
  218. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
  219. package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
  220. package/src/components/SubHeader/SubHeader.mdx +31 -0
  221. package/src/components/SubHeader/SubHeader.stories.ts +1032 -0
  222. package/src/components/SubHeader/SubHeader.vue +185 -0
  223. package/src/components/SubHeader/config.ts +12 -0
  224. package/src/components/SubHeader/locales.ts +3 -0
  225. package/src/components/SubHeader/tests/SubHeader.spec.ts +144 -0
  226. package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
  227. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +438 -0
  228. package/src/components/UserMenuBtn/UserMenuBtn.vue +105 -0
  229. package/src/components/UserMenuBtn/config.ts +24 -0
  230. package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
  231. package/src/components/index.ts +33 -7
  232. package/src/composables/index.ts +8 -0
  233. package/src/composables/rules/tests/useFieldValidation.spec.ts +82 -0
  234. package/src/composables/rules/useFieldValidation.ts +53 -0
  235. package/src/composables/widthable/index.ts +29 -0
  236. package/src/composables/widthable/tests/widthable.spec.ts +52 -0
  237. package/src/designTokens/index.ts +2 -0
  238. package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
  239. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +3 -2
  240. package/src/main.ts +3 -0
  241. package/src/modules.d.ts +4 -0
  242. package/src/services/index.ts +1 -0
  243. package/src/stories/Demarrer/Accueil.mdx +10 -0
  244. package/src/stories/Demarrer/Accueil.stories.ts +76 -0
  245. package/src/stories/Demarrer/PolitiqueDeConfidentialite.mdx +9 -0
  246. package/src/stories/Demarrer/PolitiqueDeConfidentialite.stories.ts +20 -0
  247. package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
  248. package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
  249. package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
  250. package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
  251. package/src/stories/Fondamentaux/Elevations.mdx +14 -0
  252. package/src/stories/Fondamentaux/Espacements.mdx +29 -0
  253. package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
  254. package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
  255. package/src/stories/Fondamentaux/Typographie.mdx +58 -0
  256. package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +132 -0
  257. package/src/stories/GuideDuDev/moduleDeNotification.mdx +52 -48
  258. package/src/stories/GuideDuDev/vuetifyOptions.mdx +31 -28
  259. package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +1 -2
  260. package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
  261. package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
  262. package/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.ts +47 -0
  263. package/src/utils/functions/throttleDisplayFn/throttleDisplayFn.ts +26 -0
  264. package/src/utils/rules/exactLength/index.ts +33 -0
  265. package/src/utils/rules/exactLength/locales.ts +6 -0
  266. package/src/utils/rules/required/index.ts +25 -0
  267. package/src/utils/rules/required/locales.ts +5 -0
  268. package/src/utils/rules/required/ruleMessageHelper.ts +14 -0
  269. package/src/utils/rules/required/tests/index.spec.ts +47 -0
  270. package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +22 -0
  271. package/src/utils/rules/types.d.ts +15 -0
  272. package/src/components/Beta/beta.mdx +0 -5
  273. package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -42
  274. package/src/components/Customs/CustomInputSelect/CustomInputSelect.stories.ts +0 -154
  275. package/src/components/Customs/CustomSelect/CustomSelect.stories.ts +0 -182
  276. package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
  277. package/src/components/Deprecated/deprecated.mdx +0 -5
  278. package/src/components/HeaderBar/HeaderComplexMenu/HeaderComplexMenu.stories.ts +0 -272
  279. package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +0 -49
  280. package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +0 -56
  281. package/src/components/HeaderBar/HeaderComplexMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +0 -137
  282. package/src/components/HeaderBar/HeaderComplexMenu/tests/HeaderComplexMenu.spec.ts +0 -129
  283. package/src/components/HeaderBar/HeaderComplexMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +0 -18
  284. package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
  285. package/src/stories/Guidelines/Typo.mdx +0 -53
  286. package/src/stories/Home/Accueil.mdx +0 -7
  287. package/src/stories/Home/PolitiqueDeConfidentialite.mdx +0 -4
  288. package/src/stories/Home/synapse.webp +0 -0
  289. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/HeaderMenuItem.vue +0 -0
  290. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/HeaderMenuItem.spec.ts +0 -0
  291. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/conts.ts +0 -0
  292. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/locals.ts +0 -0
  293. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/tests/useHandleSubMenus.spec.ts +0 -0
  294. /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/useHandleSubMenus.ts +0 -0
  295. /package/src/components/Logo/{types.d.ts → types.ts} +0 -0
  296. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
  297. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
  298. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
  299. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
  300. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
@@ -1,14 +1,40 @@
1
- export { default as PageContainer } from './PageContainer/PageContainer.vue'
2
1
  export { default as Alert } from './Alert/Alert.vue'
3
- export { default as CopyBtn } from './CopyBtn/CopyBtn.vue'
4
- export { default as SkipLink } from './SkipLink/SkipLink.vue'
5
- export { default as BackToTopBtn } from './BackToTopBtn/BackToTopBtn.vue'
6
2
  export { default as BackBtn } from './BackBtn/BackBtn.vue'
3
+ export { default as BackToTopBtn } from './BackToTopBtn/BackToTopBtn.vue'
4
+ export { default as CollapsibleList } from './CollapsibleList/CollapsibleList.vue'
5
+ export { default as CopyBtn } from './CopyBtn/CopyBtn.vue'
6
+ export { default as SyBtnSelect } from './Customs/SyBtnSelect/SyBtnSelect.vue'
7
+ export { default as SyInputSelect } from '@/components/Customs/SyInputSelect/SyInputSelect.vue'
8
+ export { default as SySelect } from '@/components/Customs/SySelect/SySelect.vue'
9
+ export { default as SyTextField } from '@/components/Customs/SyTextField/SyTextField.vue'
10
+ export { default as DataList } from './DataList/DataList.vue'
11
+ export { default as DataListGroup } from './DataListGroup/DataListGroup.vue'
12
+ export { default as DataListItem } from './DataListItem/DataListItem.vue'
13
+ export { default as DialogBox } from './DialogBox/DialogBox.vue'
7
14
  export { default as DownloadBtn } from './DownloadBtn/DownloadBtn.vue'
15
+ export { default as ErrorPage } from './ErrorPage/ErrorPage.vue'
16
+ export { default as FooterBar } from './FooterBar/FooterBar.vue'
8
17
  export { default as FranceConnectBtn } from './FranceConnectBtn/FranceConnectBtn.vue'
9
- export { default as NotificationBar } from './NotificationBar/NotificationBar.vue'
18
+ export { default as HeaderBar } from './HeaderBar/HeaderBar.vue'
19
+ export { default as HeaderBurgerMenu } from './HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue'
20
+ export { default as HeaderMenuItem } from './HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue'
21
+ export { default as HeaderMenuSection } from './HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue'
22
+ export { default as HeaderSubMenu } from './HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue'
23
+ export { default as HeaderLogo } from './HeaderBar/HeaderLogo/HeaderLogo.vue'
24
+ export { default as HeaderMenuBtn } from './HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue'
25
+ export { default as HeaderLoading } from './HeaderLoading/HeaderLoading.vue'
26
+ export { default as HeaderNavigationBar } from './HeaderNavigationBar/HeaderNavigationBar.vue'
27
+ export { default as HeaderToolbar } from './HeaderToolbar/HeaderToolbar.vue'
10
28
  export { default as LangBtn } from './LangBtn/LangBtn.vue'
11
29
  export { default as Logo } from './Logo/Logo.vue'
12
- export { default as CollapsibleList } from './CollapsibleList/CollapsibleList.vue'
30
+ export { default as LogoBrandSection } from './LogoBrandSection/LogoBrandSection.vue'
31
+ export { default as MaintenancePage } from './MaintenancePage/MaintenancePage.vue'
32
+ export { default as NotFoundPage } from './NotFoundPage/NotFoundPage.vue'
33
+ export { default as NotificationBar } from './NotificationBar/NotificationBar.vue'
34
+ export * from './NotificationBar/types'
35
+ export { default as PageContainer } from './PageContainer/PageContainer.vue'
36
+ export { default as PhoneField } from './PhoneField/PhoneField.vue'
37
+ export { default as SkipLink } from './SkipLink/SkipLink.vue'
13
38
  export { default as SocialMediaLinks } from './SocialMediaLinks/SocialMediaLinks.vue'
14
- export { default as FooterBar } from './FooterBar/FooterBar.vue'
39
+ export { default as SubHeader } from './SubHeader/SubHeader.vue'
40
+ export { default as UserMenuBtn } from './UserMenuBtn/UserMenuBtn.vue'
@@ -0,0 +1,8 @@
1
+ // rules
2
+ export * from './rules/useFieldValidation'
3
+
4
+ // vuetifyOptions
5
+ export * from './useCustomizableOptions'
6
+
7
+ // withable
8
+ export * from './widthable'
@@ -0,0 +1,82 @@
1
+ import { useFieldValidation } from '../useFieldValidation'
2
+ import { describe, it, expect } from 'vitest'
3
+
4
+ describe('useFieldValidation', () => {
5
+ const { generateRules } = useFieldValidation()
6
+
7
+ describe('createRule', () => {
8
+ it('should validate required rule', () => {
9
+ const rules = generateRules([{ type: 'required', options: { fieldName: 'Nom' } }])
10
+ const requiredRule = rules[0]
11
+
12
+ expect(requiredRule('')).toBe('Vous devez renseigner Nom.')
13
+ expect(requiredRule('Test')).toBe(true)
14
+ })
15
+
16
+ it('should validate min rule', () => {
17
+ const rules = generateRules([{ type: 'min', options: { value: 5 } }])
18
+ const minRule = rules[0]
19
+
20
+ expect(minRule(3)).toBe('La valeur doit être supérieure ou égale à 5.')
21
+ expect(minRule(5)).toBe(true)
22
+ expect(minRule(10)).toBe(true)
23
+ })
24
+
25
+ it('should validate minLength rule', () => {
26
+ const rules = generateRules([{ type: 'minLength', options: { length: 3 } }])
27
+ const minLengthRule = rules[0]
28
+
29
+ expect(minLengthRule('ab')).toBe('Ce champ doit avoir au moins 3 caractères.')
30
+ expect(minLengthRule('abc')).toBe(true)
31
+ })
32
+
33
+ it('should validate max rule', () => {
34
+ const rules = generateRules([{ type: 'max', options: { value: 10 } }])
35
+ const maxRule = rules[0]
36
+
37
+ expect(maxRule(15)).toBe('La valeur doit être inférieure ou égale à 10.')
38
+ expect(maxRule(10)).toBe(true)
39
+ expect(maxRule(5)).toBe(true)
40
+ })
41
+
42
+ it('should validate maxLength rule', () => {
43
+ const rules = generateRules([{ type: 'maxLength', options: { length: 5 } }])
44
+ const maxLengthRule = rules[0]
45
+
46
+ expect(maxLengthRule('abcdef')).toBe('Ce champ ne doit pas dépasser 5 caractères.')
47
+ expect(maxLengthRule('abc')).toBe(true)
48
+ })
49
+
50
+ it('should validate exactLength rule', () => {
51
+ const rules = generateRules([{ type: 'exactLength', options: { length: 4 } }])
52
+ const exactLengthRule = rules[0]
53
+
54
+ expect(exactLengthRule('abc')).toBe('Ce champ doit avoir exactement 4 caractères.')
55
+ expect(exactLengthRule('abcd')).toBe(true)
56
+ })
57
+
58
+ it('should validate email rule', () => {
59
+ const rules = generateRules([{ type: 'email' }])
60
+ const emailRule = rules[0]
61
+
62
+ expect(emailRule('invalid-email')).toBe('Veuillez entrer un email valide.')
63
+ expect(emailRule('test@example.com')).toBe(true)
64
+ })
65
+
66
+ it('should validate matchPattern rule', () => {
67
+ const rules = generateRules([{ type: 'matchPattern', options: { pattern: /^[a-z]+$/ } }])
68
+ const matchPatternRule = rules[0]
69
+
70
+ expect(matchPatternRule('123')).toBe('Format invalide.')
71
+ expect(matchPatternRule('abc')).toBe(true)
72
+ })
73
+
74
+ it('should handle ignoreSpace option in length rules', () => {
75
+ const rules = generateRules([{ type: 'minLength', options: { length: 3, ignoreSpace: true } }])
76
+ const minLengthRule = rules[0]
77
+
78
+ expect(minLengthRule('a b')).toBe('Ce champ doit avoir au moins 3 caractères.')
79
+ expect(minLengthRule('ab c')).toBe(true)
80
+ })
81
+ })
82
+ })
@@ -0,0 +1,53 @@
1
+ type RuleOptions = {
2
+ fieldName?: string
3
+ message?: string
4
+ length?: number
5
+ value?: number
6
+ pattern?: RegExp
7
+ ignoreSpace?: boolean
8
+ }
9
+
10
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
11
+ type ValidationRule = (value: any) => string | boolean
12
+
13
+ export function useFieldValidation() {
14
+ const createRule = (type: string, options: RuleOptions = {}): ValidationRule => {
15
+ const getValueLength = (value: string) => {
16
+ return options.ignoreSpace ? value.replace(/\s/g, '').length : value.length
17
+ }
18
+
19
+ switch (type) {
20
+ case 'required':
21
+ return (value: string) =>
22
+ !!value || options.message || `Vous devez renseigner ${options.fieldName || 'ce champ'}.`
23
+ case 'min':
24
+ return (value: number) =>
25
+ value >= (options.value ?? 0) || options.message || `La valeur doit être supérieure ou égale à ${options.value}.`
26
+ case 'minLength':
27
+ return (value: string) =>
28
+ getValueLength(value) >= (options.length ?? 0) || options.message || `Ce champ doit avoir au moins ${options.length} caractères.`
29
+ case 'max':
30
+ return (value: number) =>
31
+ value <= (options.value ?? Infinity) || options.message || `La valeur doit être inférieure ou égale à ${options.value}.`
32
+ case 'maxLength':
33
+ return (value: string) =>
34
+ getValueLength(value) <= (options.length ?? Infinity) || options.message || `Ce champ ne doit pas dépasser ${options.length} caractères.`
35
+ case 'exactLength':
36
+ return (value: string) =>
37
+ getValueLength(value) === (options.length ?? 0) || options.message || `Ce champ doit avoir exactement ${options.length} caractères.`
38
+ case 'email':
39
+ return (value: string) =>
40
+ /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value) || options.message || `Veuillez entrer un email valide.`
41
+ case 'matchPattern':
42
+ return (value: string) =>
43
+ options.pattern ? options.pattern.test(value) || options.message || `Format invalide.` : `Format invalide.`
44
+ default:
45
+ return () => `La règle spécifiée n'existe pas.`
46
+ }
47
+ }
48
+ const generateRules = (fieldRules: Array<{ type: string, options?: RuleOptions }>) => {
49
+ return fieldRules.map(rule => createRule(rule.type, rule.options))
50
+ }
51
+
52
+ return { generateRules }
53
+ }
@@ -0,0 +1,29 @@
1
+ import { computed } from 'vue'
2
+ import { convertToUnit } from '@/utils/convertToUnit'
3
+
4
+ export type NumberOrNumberString = string | number | undefined
5
+
6
+ export function useWidthable(props: {
7
+ maxWidth?: NumberOrNumberString
8
+ minWidth?: NumberOrNumberString
9
+ width?: NumberOrNumberString
10
+ }) {
11
+ // Computed style properties
12
+ const widthStyles = computed<Record<string, string | undefined>>(() => {
13
+ return {
14
+ maxWidth: convertToUnit(props.maxWidth),
15
+ minWidth: convertToUnit(props.minWidth),
16
+ width: convertToUnit(props.width ?? '100%'),
17
+ }
18
+ })
19
+
20
+ return {
21
+ widthStyles,
22
+ }
23
+ }
24
+
25
+ export interface Widthable {
26
+ maxWidth?: NumberOrNumberString
27
+ minWidth?: NumberOrNumberString
28
+ width?: NumberOrNumberString
29
+ }
@@ -0,0 +1,52 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { useWidthable } from '../'
3
+
4
+ describe('useWidthable', () => {
5
+ it('returns correct styles for default props', () => {
6
+ const props = {
7
+ maxWidth: undefined,
8
+ minWidth: undefined,
9
+ width: undefined,
10
+ }
11
+
12
+ const { widthStyles } = useWidthable(props)
13
+
14
+ expect(widthStyles.value).toEqual({
15
+ maxWidth: undefined,
16
+ minWidth: undefined,
17
+ width: '100%',
18
+ })
19
+ })
20
+
21
+ it('returns correct styles for specific width values', () => {
22
+ const props = {
23
+ maxWidth: '500px',
24
+ minWidth: '200px',
25
+ width: 300,
26
+ }
27
+
28
+ const { widthStyles } = useWidthable(props)
29
+
30
+ expect(widthStyles.value).toEqual({
31
+ maxWidth: '500px',
32
+ minWidth: '200px',
33
+ width: '300px',
34
+ })
35
+ })
36
+
37
+ it('handles numeric and string values correctly', () => {
38
+ const props = {
39
+ maxWidth: 600,
40
+ minWidth: '50%',
41
+ width: '75%',
42
+ }
43
+
44
+ const { widthStyles } = useWidthable(props)
45
+
46
+ expect(widthStyles.value).toEqual({
47
+ maxWidth: '600px',
48
+ minWidth: '50%',
49
+ width: '75%',
50
+ })
51
+ })
52
+ })
@@ -2,6 +2,7 @@ import { cnamSemanticTokens } from './tokens/cnam/cnamSemantic'
2
2
  import { cnamContextualTokens } from './tokens/cnam/cnamContextual'
3
3
  import { cnamColorsTokens } from './tokens/cnam/cnamColors'
4
4
  import { cnamLightTheme } from './tokens/cnam/cnamLightTheme'
5
+ import { cnamDarkTheme } from './tokens/cnam/cnamDarkTheme'
5
6
  import { bootstrapColorsTokens } from './tokens/bootstrap/bootstrapColors'
6
7
  import { bootstrapLightTheme } from './tokens/bootstrap/bootstrapLightTheme'
7
8
 
@@ -10,6 +11,7 @@ export {
10
11
  cnamSemanticTokens,
11
12
  cnamContextualTokens,
12
13
  cnamLightTheme,
14
+ cnamDarkTheme,
13
15
  bootstrapColorsTokens,
14
16
  bootstrapLightTheme,
15
17
  }
@@ -0,0 +1,5 @@
1
+ import { cnamColorsTokens } from './cnamColors'
2
+
3
+ export const cnamDarkTheme = {
4
+ backgroundSurface: cnamColorsTokens.parma.darken60,
5
+ }
@@ -7,8 +7,9 @@ export const cnamLightTheme = {
7
7
  accent: cnamColorsTokens.cyan.base,
8
8
  error: cnamColorsTokens.orange.darken20,
9
9
  info: cnamColorsTokens.blue.base,
10
- success: cnamColorsTokens.green.base,
11
- warning: cnamColorsTokens.yellow.base,
10
+ avatar: cnamColorsTokens.cyan.darken20,
11
+ success: cnamColorsTokens.turquoise.darken60,
12
+ warning: cnamColorsTokens.yellow.darken60,
12
13
  risquePro: cnamColorsTokens.brick.base,
13
14
  onBackground: cnamSemanticTokens.colors.background.surface,
14
15
  onSurfaceAlt: cnamSemanticTokens.colors.background.surfaceAlt,
package/src/main.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  import '../src/assets/tokens.scss'
2
+
2
3
  export * from './components'
4
+ export * from './services'
5
+ export * from './composables'
@@ -0,0 +1,4 @@
1
+ declare module '*.svg' {
2
+ const content: string
3
+ export default content
4
+ }
@@ -0,0 +1 @@
1
+ export * as NotificationService from './NotificationService'
@@ -0,0 +1,10 @@
1
+ import {Story, Meta} from '@storybook/blocks';
2
+ import * as AccueilStories from './Accueil.stories';
3
+
4
+ <Meta of={AccueilStories} />
5
+
6
+ <Story of={AccueilStories.Header} />
7
+
8
+ <p>Au service des équipes-produits de la Caisse Nationale de l’Assurance Maladie, cette boîte à outil met à disposition un ensemble de principes et de composants d’interfaces pour harmoniser et accélérer la fabrication des produits.</p>
9
+
10
+ <Story of={AccueilStories.List} />
@@ -0,0 +1,76 @@
1
+ import { VBtn, VIcon, VRow, VCol } from 'vuetify/components'
2
+ import type { StoryObj } from '@storybook/vue3'
3
+
4
+ import { mdiGithub } from '@mdi/js'
5
+
6
+ import { version } from '../../../package.json'
7
+
8
+ export default {
9
+ title: 'Démarrer/Accueil',
10
+ }
11
+
12
+ export const Header: StoryObj = {
13
+ render: () => {
14
+ return {
15
+ components: { VBtn, VIcon },
16
+ setup() {
17
+ return {
18
+ githubIcon: mdiGithub,
19
+ version,
20
+ }
21
+ },
22
+ template: `
23
+ <div class="d-flex justify-space-between align-center">
24
+ <h1 class="title font-weight-medium">Un Design System<br/>pour l’Assurance Maladie</h1>
25
+ <VBtn
26
+ :icon="githubIcon"
27
+ aria-label="GitHub"
28
+ href="https://github.com/assurance-maladie-digital/design-system-v3"
29
+ target="_blank"
30
+ rel="noopener noreferrer"
31
+ class="d-xs-none d-sm-flex"
32
+ />
33
+ </div>
34
+ <p class="mt-4 mb-8">
35
+ <b>v{{ version }}</b>
36
+ </p>
37
+ `,
38
+ }
39
+ },
40
+ tags: ['!dev'],
41
+ }
42
+
43
+ export const List: StoryObj = {
44
+ render: () => {
45
+ return {
46
+ components: { VRow, VCol },
47
+ setup() {
48
+ return {
49
+ githubIcon: mdiGithub,
50
+ version,
51
+ }
52
+ },
53
+ template: `
54
+ <VRow class="mt-8">
55
+ <VCol cols="12" sm="6" class="m-2 p-2 v-col-auto background-list">
56
+ <p class="font-weight-bold mb-2">Qui sont nos principaux utilisateurs ?</p>
57
+ <p>Respectant les règles graphiques de la charte graphique de la CNAM, ce design system couvre prioritairement les produits à destination des assurés, des entreprises et des agents.</p>
58
+ </VCol>
59
+ <VCol cols="12" sm="6" class="m-2 p-2 v-col-auto background-list">
60
+ <p class="font-weight-bold mb-2">Comment accéder au design system ?</p>
61
+ <p>Afin d’améliorer la collaboration, il est disponible pour les développeurs depuis GitHub (accès open source) et pour les designers depuis Figma (accès sur demande).</p>
62
+ </VCol>
63
+ <VCol cols="12" sm="6" class="m-2 p-2 v-col-auto background-list">
64
+ <p class="font-weight-bold mb-2">Est-ce que le design system est complet ?</p>
65
+ <p>Face à l’ampleur des composants et des fonctionnalités nécessaires au bon fonctionnement d’un produit, le design system ne suffit pas seul. Vous devez composer avec la librairie vuetify et le framework vue.js.</p>
66
+ </VCol>
67
+ <VCol cols="12" sm="6" class="m-2 p-2 v-col-auto background-list">
68
+ <p class="font-weight-bold mb-2">Quels sont les bénéfices du design system ?</p>
69
+ <p>Utiliser un design system permet d’accélérer la fabrication, la collaboration et la prise de décision puisqu’il suffit à l’équipe-produit de piocher directement dans une collection de composants déjà adaptés aux besoins de CNAM.</p>
70
+ </VCol>
71
+ </VRow>
72
+ `,
73
+ }
74
+ },
75
+ tags: ['!dev'],
76
+ }
@@ -0,0 +1,9 @@
1
+ import {Story, Meta} from '@storybook/blocks';
2
+ import * as PolitiqueDeConfidentialiteStories from './PolitiqueDeConfidentialite.stories';
3
+
4
+ <Meta of={PolitiqueDeConfidentialiteStories} />
5
+
6
+ # Politique de confidentialité
7
+
8
+ <Story of={PolitiqueDeConfidentialiteStories.Default} />
9
+
@@ -0,0 +1,20 @@
1
+ import type { StoryObj } from '@storybook/vue3'
2
+ import { VCard } from 'vuetify/components'
3
+
4
+ export default {
5
+ title: 'Démarrer/Politique de confidentialité',
6
+ }
7
+
8
+ export const Default: StoryObj = {
9
+ render: () => {
10
+ return {
11
+ components: { VCard },
12
+ template: `
13
+ <VCard class="mt-4 pa-2">
14
+ <iframe src="https://assurancemaladiesec.github.io/abuse/reporting/" width="100%" height="800px" frameBorder="0"></iframe>
15
+ </VCard>
16
+ `,
17
+ }
18
+ },
19
+ tags: ['!dev'],
20
+ }
@@ -0,0 +1,24 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ <Meta title="Fondamentaux/Arrondis" />
4
+
5
+ # Arrondis
6
+
7
+ Les angles des éléments permettent de créer du contraste entre les formes et de suggérer l’utilisation des composants
8
+
9
+ Il existe 4 radius disponibles :
10
+
11
+ - <b>rounded-0 : 0px</b><br/>
12
+ Dès lors que l’on ne souhaite pas utiliser de radius
13
+
14
+ - <b>rounded : 4px</b><br/>
15
+ Ce radius peut être utilisé sur des éléments interactifs tels que les boutons, les inputs, les alerts,
16
+
17
+ - <b>rounded-lg : 8px</b><br/>
18
+ Ce radius peut être utilisé sur des blocs de structure (cards, tableaux...)
19
+
20
+ - <b>rounded-pill : 96px</b><br/>
21
+ Ce radius peut être utilisé sur des éléments (intéractifs ou non) présentant de la donnée, comme des tags, des filtres, des status...
22
+
23
+ <br />
24
+ <img alt="Radius" src={'/radius.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
@@ -2,7 +2,7 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs';
2
2
  import { cnamLightTheme } from "@/designTokens/tokens/cnam/cnamLightTheme.ts";
3
3
  import { cnamColorsTokens } from '@/designTokens/tokens/cnam/cnamColors.ts'
4
4
 
5
- <Meta title="Guidelines/Couleurs" />
5
+ <Meta title="Fondamentaux/Couleurs" />
6
6
 
7
7
  # Couleurs
8
8
 
@@ -0,0 +1,7 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ <Meta title="Fondamentaux/Conteneurs de page" />
4
+
5
+ # Conteneurs de page
6
+
7
+ Maquettes à mettre à jour
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta title="Fondamentaux/Customisation et thèmes" />
4
+
5
+ # Customisation et thèmes
6
+
7
+ Contenu à définir
@@ -0,0 +1,14 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ <Meta title="Fondamentaux/Elévations" />
4
+
5
+ # Elévations
6
+
7
+ <b>Les plateformes de l’Assurance Maladie n’utilisent pas d’élévations à but esthétiques.</b><br/>
8
+ L’élévation est à utiliser pour représenter des interactions avec superposition, comme un élément fixe se positionnant au-dessus d’un élément scrollable, un bouton flottant...
9
+
10
+ <b>Le style d’élévation est issu de la librairie Vuetify.</b><br/>
11
+ Pour des raisons de cohérence et d’esthétique, des 24 élévations différentes, nous avons retenue la <b>02</b> qui sera la seule et unique utilisée sur les plateformes.
12
+
13
+ <br />
14
+ <img alt="Elevation" src={'/elevation.jpg'} style={{marginLeft: '-5px'}} />
@@ -0,0 +1,29 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ <Meta title="Fondamentaux/Espacements" />
4
+
5
+ # Espacements
6
+
7
+ Le design système de la CNAM est basé sur des multiples de 4 pour définir la taille des éléments, placer des espacements et disposer des composants.<br/>
8
+ Ce système d’espacement permet de garantir une homogénéité, cohérence et consistance des interfaces conçues. Cela dans le but d'améliorer l’UX et de faciliter la conception et le développement.
9
+
10
+ Chaque partie de l'interface utilisateur doit être intentionnellement conçue, y compris l'espace vide entre les éléments. Les espacements permettent de :
11
+
12
+ - <b>Créer des relations</b>
13
+ Utilisez des espacements faibles entre plusieurs composants pour signaler qu’ils sont liés, ou font partie d’un même groupe (exemple : champs de formulaire) ;
14
+ Utilisez des espacements importants pour mettre en évidence un élément indépendant du reste de la page (exemple : call to action).
15
+
16
+ - <b>Créer des hiérarchies</b>
17
+ Augmentez les espacements autour d’un composant clé de votre page permet d’améliorer sa visibilité.
18
+
19
+ ## Les espacements verticaux
20
+ <br />
21
+ <img alt="Les espacements verticaux" src={'/espacements-verticaux.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
22
+
23
+ ## Les espacements horizontaux
24
+ <br />
25
+ <img alt="Les espacements horizontaux" src={'/espacements-horizontaux.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
26
+
27
+ ## Mise en situation
28
+ <br />
29
+ <img alt="Mise en situation" src={'/espacements-situation.jpg'} style={{ border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
@@ -1,6 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs';
2
2
 
3
- <Meta title="Guidelines/Introduction" />
3
+ <Meta title="Fondamentaux/Introduction" />
4
4
 
5
5
  Principes de design
6
6
  ===================
@@ -0,0 +1,33 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ <Meta title="Fondamentaux/Styles typographiques" />
4
+
5
+ # Styles typographiques
6
+
7
+ ## Styles de titres
8
+
9
+ Les titres sont utilisés pour créer une hiérarchie visuelle dans la page, et permettent de trouver facilement une information.
10
+
11
+ <img alt="Styles de titres" src={'/font-titres.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
12
+
13
+
14
+ ## Styles de titres alternatifs
15
+
16
+ Pour donner une plus grande liberté éditoriale et graphique, sans nuire à la hiérarchie de l’information et au référencement nous vous proposons plusieurs niveaux de titres alternatifs (display). Vous pourrez les utiliser pour les mise en avant, les bannières, etc..
17
+ Les titres alternatifs peuvent être associés selon votre besoin à un h1, un h2, un h3 ou un h4.
18
+
19
+ <img alt="Styles de titres alternatifs" src={'/font-titres-alt.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
20
+
21
+
22
+ ## Corps de texte
23
+
24
+ Les styles de texte sont là pour vous aider à concevoir vos interfaces efficacement et assurer l’homogénéité entre les différents sites.
25
+
26
+ <img alt="Corps de texte" src={'/font-corps.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
27
+
28
+
29
+ ## Liens et libellés
30
+
31
+ <br />
32
+
33
+ <img alt="Liens et libellés" src={'/font-liens.jpg'} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
@@ -0,0 +1,58 @@
1
+ import { Meta, Typeset } from '@storybook/addon-docs';
2
+
3
+ <Meta title="Fondamentaux/Typographie" />
4
+
5
+ export const typography = {
6
+ type: {
7
+ primary: 'Arial',
8
+ },
9
+ weight: {
10
+ regular: '400',
11
+ bold: '700',
12
+ extrabold: '800',
13
+ black: '900',
14
+ },
15
+ size: {
16
+ s1: 12,
17
+ s2: 14,
18
+ s3: 16,
19
+ m1: 18,
20
+ m2: 20,
21
+ m3: 24,
22
+ l1: 28,
23
+ l2: 30,
24
+ l3: 32,
25
+ l4:40,
26
+ },
27
+ };
28
+
29
+ export const SampleText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
30
+
31
+ # Typographie
32
+
33
+ <img alt="Arial" src={'/font-arial.jpg'} style={{ border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' }} />
34
+
35
+ **Weights:** 400(regular), 700(bold), 900(black)
36
+
37
+ <Typeset
38
+ fontSizes={[
39
+ Number(typography.size.s1),
40
+ Number(typography.size.s2),
41
+ Number(typography.size.s3),
42
+ Number(typography.size.m1),
43
+ Number(typography.size.m2),
44
+ Number(typography.size.m3),
45
+ Number(typography.size.l1),
46
+ Number(typography.size.l2),
47
+ Number(typography.size.l3),
48
+ Number(typography.size.l4),
49
+ ]}
50
+ fontWeight={typography.weight.regular}
51
+ sampleText={SampleText}
52
+ fontFamily={typography.type.primary}
53
+ />
54
+
55
+ **Interlignage:** 2 ratio de line-height :
56
+
57
+ - 130% quand le `font-size` est supérieur à 18px
58
+ - 150% quand le `font-size` est inférieur ou égal à 18px