@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
@@ -0,0 +1,1032 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import SubHeader from './SubHeader.vue'
3
+ import { ref } from 'vue'
4
+ import { mdiStepBackward, mdiClose, mdiContentCopy } from '@mdi/js'
5
+
6
+ const meta = {
7
+ title: 'Composants/Structure/SubHeader',
8
+ component: SubHeader,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ argTypes: {
13
+ 'hideBackBtn': {
14
+ type: 'boolean',
15
+ control: { type: 'boolean' },
16
+ default: false,
17
+ },
18
+ 'backBtnText': {
19
+ type: 'string',
20
+ control: { type: 'text' },
21
+ default: 'Retour',
22
+ },
23
+ 'titleText': {
24
+ type: 'string',
25
+ control: { type: 'text' },
26
+ default: undefined,
27
+ },
28
+ 'subTitleText': {
29
+ type: 'string',
30
+ control: { type: 'text' },
31
+ default: undefined,
32
+ },
33
+ 'dataListGroupItems': {
34
+ control: { type: 'object' },
35
+ },
36
+ 'loading': {
37
+ type: 'boolean',
38
+ control: { type: 'boolean' },
39
+ default: false,
40
+ },
41
+ 'renderHtmlValue': {
42
+ type: 'boolean',
43
+ control: { type: 'boolean' },
44
+ default: false,
45
+ },
46
+ 'additional-informations': {
47
+ type: 'string',
48
+ control: { type: 'text' },
49
+ default: undefined,
50
+ },
51
+ 'back-btn': {
52
+ type: 'string',
53
+ control: { type: 'text' },
54
+ default: undefined,
55
+ },
56
+ 'back-btn-icon': {
57
+ type: 'string',
58
+ control: { type: 'text' },
59
+ default: undefined,
60
+ },
61
+ 'title': {
62
+ type: 'string',
63
+ control: { type: 'text' },
64
+ default: undefined,
65
+ },
66
+ 'sub-title': {
67
+ type: 'string',
68
+ control: { type: 'text' },
69
+ default: undefined,
70
+ },
71
+ 'right-content': {
72
+ type: 'string',
73
+ control: { type: 'text' },
74
+ default: undefined,
75
+ },
76
+ 'vuetifyOptions': {
77
+ control: { type: 'object' },
78
+ default: () => ({
79
+ menu: {
80
+ location: 'end center',
81
+ offset: 16,
82
+ zIndex: 8,
83
+ contentClass: 'vd-copy-tooltip-menu text-white text-body-2 ml-2',
84
+ },
85
+ btn: {
86
+ icon: true,
87
+ variant: 'text',
88
+ density: 'comfortable',
89
+ },
90
+ icon: {
91
+ color: 'grey-darken-20',
92
+ },
93
+ }),
94
+ },
95
+ },
96
+ } satisfies Meta<typeof SubHeader>
97
+
98
+ export default meta
99
+
100
+ type Story = StoryObj<typeof meta>
101
+
102
+ export const Default: Story = {
103
+ parameters: {
104
+ sourceCode: [
105
+ {
106
+ name: 'Template',
107
+ code: `
108
+ <template>
109
+ <SubHeader
110
+ title-text="Paul Dupont"
111
+ sub-title-text="1 69 08 75 125 456 75"
112
+ />
113
+ </template>
114
+ `,
115
+ },
116
+ {
117
+ name: 'Script',
118
+ code: `
119
+ <script setup lang="ts">
120
+ import SubHeader from '@cnamts/synapse'
121
+ </script>
122
+ `,
123
+ },
124
+ ],
125
+ },
126
+ args: {
127
+ 'backBtnText': 'Retour',
128
+ 'hideBackBtn': false,
129
+ 'titleText': 'Paul Dupont',
130
+ 'subTitleText': '1 69 08 75 125 456 75',
131
+ 'loading': false,
132
+ 'renderHtmlValue': false,
133
+ 'dataListGroupItems': [],
134
+ 'additional-informations': undefined,
135
+ 'back-btn': undefined,
136
+ 'back-btn-icon': undefined,
137
+ 'title': undefined,
138
+ 'sub-title': undefined,
139
+ 'right-content': undefined,
140
+ 'vuetifyOptions': {
141
+ sheet: {
142
+ color: 'secondary',
143
+ },
144
+ backBtn: {
145
+ size: 'small',
146
+ variant: 'text',
147
+ class: 'font-weight-regular white--text px-1',
148
+ },
149
+ },
150
+ },
151
+ render: (args) => {
152
+ return {
153
+ components: { SubHeader },
154
+ setup() {
155
+ return { args }
156
+ },
157
+ template: `
158
+ <SubHeader
159
+ v-bind="args"
160
+ :back-btn-text="args.backBtnText"
161
+ :title-text="args.titleText"
162
+ :hide-back-btn="args.hideBackBtn"
163
+ :sub-title-text="args.subTitleText"
164
+ :loading="args.loading"
165
+ :render-html-value="args.renderHtmlValue"
166
+ :data-list-group-items="args.dataListGroupItems"
167
+ :additional-informations="args.additionalInformations"
168
+ :back-btn="args.backBtn"
169
+ :back-btn-icon="args.backBtnIcon"
170
+ :title="args.title"
171
+ :sub-title="args.subTitle"
172
+ :right-content="args.rightContent"
173
+ :vuetify-options="args.vuetifyOptions"
174
+ />
175
+ `,
176
+ }
177
+ },
178
+ }
179
+
180
+ export const DataList: Story = {
181
+ parameters: {
182
+ controls: { exclude: ['vuetifyOptions', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'back-btn', 'back-btn-icon', 'title', 'sub-title', 'additional-informations', 'right-content'] },
183
+ sourceCode: [
184
+ {
185
+ name: 'Template',
186
+ code: `
187
+ <template>
188
+ <SubHeader
189
+ title-text="Paul Dupont"
190
+ sub-title-text="1 69 08 75 125 456 75"
191
+ :data-list-group-items="items"
192
+ />
193
+ </template>
194
+ `,
195
+ },
196
+ {
197
+ name: 'Script',
198
+ code: `
199
+ <script setup lang="ts">
200
+ import SubHeader from '@cnamts/synapse'
201
+
202
+ const items = [
203
+ {
204
+ title: 'Informations patient',
205
+ items: [
206
+ { key: 'Date de naissance', value: '24/09/1970' },
207
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
208
+ ],
209
+ },
210
+ {
211
+ title: 'Médecin traitant',
212
+ items: [
213
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
214
+ { key: 'N° RPPS', value: 'XXXXX' },
215
+ ],
216
+ },
217
+ {
218
+ title: 'Autres informations',
219
+ items: [
220
+ { key: 'Dernière modification', value: '04/06/2020' },
221
+ ],
222
+ },
223
+ ]
224
+ </script>
225
+ `,
226
+ },
227
+ ],
228
+ },
229
+ args: {
230
+ backBtnText: 'Retour',
231
+ hideBackBtn: false,
232
+ titleText: 'Paul Dupont',
233
+ subTitleText: '1 69 08 75 125 456 75',
234
+ loading: false,
235
+ renderHtmlValue: false,
236
+ dataListGroupItems: [
237
+ {
238
+ title: 'Informations patient',
239
+ items: [
240
+ { key: 'Date de naissance', value: '24/09/1970' },
241
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
242
+ ],
243
+ },
244
+ {
245
+ title: 'Médecin traitant',
246
+ items: [
247
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
248
+ { key: 'N° RPPS', value: 'XXXXX' },
249
+ ],
250
+ },
251
+ {
252
+ title: 'Autres informations',
253
+ items: [
254
+ { key: 'Dernière modification', value: '04/06/2020' },
255
+ ],
256
+ },
257
+ ],
258
+
259
+ },
260
+ render: (args) => {
261
+ return {
262
+ components: { SubHeader },
263
+ setup() {
264
+ return { args }
265
+ },
266
+ template: `
267
+ <SubHeader
268
+ v-bind="args"
269
+ :data-list-group-items="args.dataListGroupItems"
270
+ />
271
+ `,
272
+ }
273
+ },
274
+ }
275
+
276
+ export const ActionBtn: Story = {
277
+ parameters: {
278
+ controls: { exclude: ['vuetifyOptions', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'back-btn', 'back-btn-icon', 'title', 'sub-title', 'additional-informations', 'right-content'] },
279
+ sourceCode: [
280
+ {
281
+ name: 'Template',
282
+ code: `
283
+ <template>
284
+ <SubHeader
285
+ title-text="Paul Dupont"
286
+ sub-title-text="1 69 08 75 125 456 75"
287
+ :data-list-group-items="items"
288
+ @click:list-item="updateInfo"
289
+ />
290
+ </template>
291
+ `,
292
+ },
293
+ {
294
+ name: 'Script',
295
+ code: `
296
+ <script setup lang="ts">
297
+ import SubHeader from '@cnamts/synapse'
298
+
299
+ const items = [
300
+ {
301
+ title: 'Informations patient',
302
+ items: [
303
+ { key: 'Date de naissance', value: '24/09/1970', action: 'Modifier' },
304
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
305
+ ],
306
+ },
307
+ {
308
+ title: 'Médecin traitant',
309
+ items: [
310
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
311
+ { key: 'N° RPPS', value: 'XXXXX' },
312
+ ],
313
+ },
314
+ {
315
+ title: 'Autres informations',
316
+ items: [
317
+ { key: 'Dernière modification', value: '04/06/2020' },
318
+ ],
319
+ },
320
+ ]
321
+
322
+ const updateInfo = (eventValue: { dataListIndex: number, itemIndex: number }) => {
323
+ items[eventValue.dataListIndex].items[eventValue.itemIndex].value = '25/09/1970'
324
+ }
325
+ </script>
326
+ `,
327
+ },
328
+ ],
329
+ },
330
+ args: {
331
+ backBtnText: 'Retour',
332
+ hideBackBtn: false,
333
+ titleText: 'Paul Dupont',
334
+ subTitleText: '1 69 08 75 125 456 75',
335
+ loading: false,
336
+ renderHtmlValue: false,
337
+ dataListGroupItems: [
338
+ {
339
+ title: 'Informations patient',
340
+ items: [
341
+ { key: 'Date de naissance', value: '24/09/1970', action: 'Modifier' },
342
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
343
+ ],
344
+ },
345
+ {
346
+ title: 'Médecin traitant',
347
+ items: [
348
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
349
+ { key: 'N° RPPS', value: 'XXXXX' },
350
+ ],
351
+ },
352
+ {
353
+ title: 'Autres informations',
354
+ items: [
355
+ { key: 'Dernière modification', value: '04/06/2020' },
356
+ ],
357
+ },
358
+ ],
359
+
360
+ },
361
+ render: (args) => {
362
+ return {
363
+ components: { SubHeader },
364
+ setup() {
365
+ const updateInfo = (eventValue: { dataListIndex: number, itemIndex: number }) => {
366
+ if (args.dataListGroupItems) {
367
+ args.dataListGroupItems[eventValue.dataListIndex].items[eventValue.itemIndex].value = '25/09/1970'
368
+ }
369
+ }
370
+ return { args, updateInfo }
371
+ },
372
+ template: `
373
+ <SubHeader
374
+ v-bind="args"
375
+ :data-list-group-items="args.dataListGroupItems"
376
+ @click:list-item="updateInfo"
377
+ />
378
+ `,
379
+ }
380
+ },
381
+ }
382
+
383
+ export const HtmlValue: Story = {
384
+ parameters: {
385
+ controls: { exclude: ['vuetifyOptions', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'back-btn', 'back-btn-icon', 'title', 'sub-title', 'additional-informations', 'right-content'] },
386
+ sourceCode: [
387
+ {
388
+ name: 'Template',
389
+ code: `
390
+ <template>
391
+ <SubHeader
392
+ title-text="Paul Dupont"
393
+ sub-title-text="1 69 08 75 125 456 75"
394
+ :data-list-group-items="items"
395
+ render-html-value
396
+ />
397
+ </template>
398
+ `,
399
+ },
400
+ {
401
+ name: 'Script',
402
+ code: `
403
+ <script setup lang="ts">
404
+ import SubHeader from '@cnamts/synapse'
405
+
406
+ const items = [
407
+ {
408
+ title: 'Informations patient',
409
+ items: [
410
+ { key: 'Date de naissance', value: '24/09/1970' },
411
+ { key: 'Adresse', value: '<b>50 Avenue du Professeur André Lemierre</b><br/>75020 Paris' },
412
+ ],
413
+ },
414
+ {
415
+ title: 'Médecin traitant',
416
+ items: [
417
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
418
+ { key: 'N° RPPS', value: 'XXXXX' },
419
+ ],
420
+ },
421
+ {
422
+ title: 'Autres informations',
423
+ items: [
424
+ { key: 'Dernière modification', value: '04/06/2020' },
425
+ ],
426
+ },
427
+ ]
428
+ </script>
429
+ `,
430
+ },
431
+ ],
432
+ },
433
+ args: {
434
+ backBtnText: 'Retour',
435
+ hideBackBtn: false,
436
+ titleText: 'Paul Dupont',
437
+ subTitleText: '1 69 08 75 125 456 75',
438
+ loading: false,
439
+ renderHtmlValue: true,
440
+ dataListGroupItems: [
441
+ {
442
+ title: 'Informations patient',
443
+ items: [
444
+ { key: 'Date de naissance', value: '24/09/1970' },
445
+ { key: 'Adresse', value: '<b>50 Avenue du Professeur André Lemierre</b><br/>75020 Paris' },
446
+ ],
447
+ },
448
+ {
449
+ title: 'Médecin traitant',
450
+ items: [
451
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
452
+ { key: 'N° RPPS', value: 'XXXXX' },
453
+ ],
454
+ },
455
+ {
456
+ title: 'Autres informations',
457
+ items: [
458
+ { key: 'Dernière modification', value: '04/06/2020' },
459
+ ],
460
+ },
461
+ ],
462
+
463
+ },
464
+ render: (args) => {
465
+ return {
466
+ components: { SubHeader },
467
+ setup() {
468
+ return { args }
469
+ },
470
+ template: `
471
+ <SubHeader
472
+ v-bind="args"
473
+ :data-list-group-items="args.dataListGroupItems"
474
+ :render-html-value="args.renderHtmlValue"
475
+ />
476
+ `,
477
+ }
478
+ },
479
+ }
480
+
481
+ export const Loading: Story = {
482
+ parameters: {
483
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'additional-informations', 'renderHtmlValue', 'back', 'click:list-item', 'back-btn', 'back-btn-icon', 'title', 'sub-title', 'right-content'] },
484
+ sourceCode: [
485
+ {
486
+ name: 'Template',
487
+ code: `
488
+ <template>
489
+ <SubHeader
490
+ title-text="Paul Dupont"
491
+ sub-title-text="1 69 08 75 125 456 75"
492
+ :data-list-group-items="items"
493
+ loading
494
+ >
495
+ </template>
496
+ `,
497
+ },
498
+ {
499
+ name: 'Script',
500
+ code: `
501
+ <script setup lang="ts">
502
+ import SubHeader from '@cnamts/synapse'
503
+
504
+ const items = [
505
+ {
506
+ title: 'Informations patient',
507
+ items: [
508
+ { key: 'Date de naissance', value: '24/09/1970' },
509
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
510
+ ],
511
+ },
512
+ {
513
+ title: 'Médecin traitant',
514
+ items: [
515
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
516
+ { key: 'N° RPPS', value: 'XXXXX' },
517
+ ],
518
+ },
519
+ {
520
+ title: 'Autres informations',
521
+ items: [
522
+ { key: 'Dernière modification', value: '04/06/2020' },
523
+ ],
524
+ },
525
+ ]
526
+ </script>
527
+ `,
528
+ },
529
+ ],
530
+ },
531
+ args: {
532
+ backBtnText: 'Retour',
533
+ hideBackBtn: false,
534
+ titleText: 'Paul Dupont',
535
+ subTitleText: '1 69 08 75 125 456 75',
536
+ loading: true,
537
+ renderHtmlValue: false,
538
+ dataListGroupItems: [
539
+ {
540
+ title: 'Informations patient',
541
+ items: [
542
+ { key: 'Date de naissance', value: '24/09/1970' },
543
+ { key: 'Adresse', value: '50 Avenue du Professeur André Lemierre 75020 Paris' },
544
+ ],
545
+ },
546
+ {
547
+ title: 'Médecin traitant',
548
+ items: [
549
+ { key: 'Nom du praticien', value: 'Gérard Leblanc' },
550
+ { key: 'N° RPPS', value: 'XXXXX' },
551
+ ],
552
+ },
553
+ {
554
+ title: 'Autres informations',
555
+ items: [
556
+ { key: 'Dernière modification', value: '04/06/2020' },
557
+ ],
558
+ },
559
+ ],
560
+ },
561
+ render: (args) => {
562
+ return {
563
+ components: { SubHeader },
564
+ setup() {
565
+ return { args }
566
+ },
567
+ template: `
568
+ <SubHeader
569
+ v-bind="args"
570
+ :data-list-group-items="args.dataListGroupItems"
571
+ :loading="args.loading"
572
+ />
573
+ `,
574
+ }
575
+ },
576
+ }
577
+
578
+ export const SlotAdditionalInformations: Story = {
579
+ parameters: {
580
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'back-btn', 'back-btn-icon', 'title', 'sub-title', 'right-content'] },
581
+ sourceCode: [
582
+ {
583
+ name: 'Template',
584
+ code: `
585
+ <template>
586
+ <SubHeader
587
+ title-text="Paul Dupont"
588
+ sub-title-text="1 69 08 75 125 456 75"
589
+ >
590
+ <template #additional-informations>
591
+ <VSpacer />
592
+ <p class="white--text mt-8 mb-0">
593
+ Profil complété à 50%
594
+ </p>
595
+ <VProgressLinear
596
+ :model-value="50"
597
+ color="#fff"
598
+ height="8px"
599
+ class="mt-2 mb-1"
600
+ background-color="#fff"
601
+ background-opacity=".24"
602
+ />
603
+ </template>
604
+ </SubHeader>
605
+ </template>
606
+ `,
607
+ },
608
+ {
609
+ name: 'Script',
610
+ code: `
611
+ <script setup lang="ts">
612
+ import SubHeader from '@cnamts/synapse'
613
+ </script>
614
+ `,
615
+ },
616
+ ],
617
+ },
618
+ args: {
619
+ 'backBtnText': 'Retour',
620
+ 'hideBackBtn': false,
621
+ 'titleText': 'Paul Dupont',
622
+ 'subTitleText': '1 69 08 75 125 456 75',
623
+ 'loading': false,
624
+ 'renderHtmlValue': false,
625
+ 'additional-informations': `<template #additional-informations>
626
+ <VSpacer />
627
+ <p class="white--text mt-8 mb-0">
628
+ Profil complété à 50%
629
+ </p>
630
+ <VProgressLinear
631
+ :model-value="50"
632
+ color="#fff"
633
+ height="8px"
634
+ class="mt-2 mb-1"
635
+ background-color="#fff"
636
+ background-opacity=".24"
637
+ />
638
+ </template>`,
639
+ },
640
+ render: (args) => {
641
+ return {
642
+ components: { SubHeader },
643
+ setup() {
644
+ return { args }
645
+ },
646
+ template: `
647
+ <SubHeader v-bind="args">
648
+ <template #additional-informations>
649
+ <VSpacer />
650
+ <p class="white--text mt-8 mb-0">
651
+ Profil complété à 50%
652
+ </p>
653
+ <VProgressLinear
654
+ :model-value="50"
655
+ color="#fff"
656
+ height="8px"
657
+ class="mt-2 mb-1"
658
+ background-color="#fff"
659
+ background-opacity=".24"
660
+ />
661
+ </template>
662
+ </SubHeader>
663
+ `,
664
+ }
665
+ },
666
+ }
667
+
668
+ export const SlotBackBtn: Story = {
669
+ parameters: {
670
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'additional-informations', 'back-btn-icon', 'title', 'sub-title', 'right-content'] },
671
+ sourceCode: [
672
+ {
673
+ name: 'Template',
674
+ code: `
675
+ <template>
676
+ <SubHeader
677
+ title-text="Paul Dupont"
678
+ sub-title-text="1 69 08 75 125 456 75"
679
+ >
680
+ <template #back-btn>
681
+ <VBtn
682
+ color="white"
683
+ variant="tonal"
684
+ class="mb-4"
685
+ >
686
+ Retour
687
+ </VBtn>
688
+ </template>
689
+ </SubHeader>
690
+ </template>
691
+ `,
692
+ },
693
+ {
694
+ name: 'Script',
695
+ code: `
696
+ <script setup lang="ts">
697
+ import SubHeader from '@cnamts/synapse'
698
+ </script>
699
+ `,
700
+ },
701
+ ],
702
+ },
703
+ args: {
704
+ 'backBtnText': 'Retour',
705
+ 'hideBackBtn': false,
706
+ 'titleText': 'Paul Dupont',
707
+ 'subTitleText': '1 69 08 75 125 456 75',
708
+ 'loading': false,
709
+ 'renderHtmlValue': false,
710
+ 'back-btn': `<template #back-btn>
711
+ <VBtn
712
+ color="white"
713
+ variant="tonal"
714
+ class="mb-4"
715
+ >
716
+ Retour
717
+ </VBtn>
718
+ </template>`,
719
+ },
720
+ render: (args) => {
721
+ return {
722
+ components: { SubHeader },
723
+ setup() {
724
+ return { args }
725
+ },
726
+ template: `
727
+ <SubHeader v-bind="args">
728
+ <template #back-btn>
729
+ <VBtn
730
+ color="white"
731
+ variant="tonal"
732
+ class="mb-4"
733
+ >
734
+ Retour
735
+ </VBtn>
736
+ </template>
737
+ </SubHeader>
738
+ `,
739
+ }
740
+ },
741
+ }
742
+
743
+ export const SlotBackBtnIcon: Story = {
744
+ parameters: {
745
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'additional-informations', 'back-btn', 'title', 'sub-title', 'right-content'] },
746
+ sourceCode: [
747
+ {
748
+ name: 'Template',
749
+ code: `
750
+ <template>
751
+ <SubHeader
752
+ title-text="Paul Dupont"
753
+ sub-title-text="1 69 08 75 125 456 75"
754
+ >
755
+ <template #back-btn-icon>
756
+ <VIcon class="mr-2">
757
+ {{ backArrowIcon }}
758
+ </VIcon>
759
+ </template>
760
+ </SubHeader>
761
+ </template>
762
+ `,
763
+ },
764
+ {
765
+ name: 'Script',
766
+ code: `
767
+ <script setup lang="ts">
768
+ import SubHeader from '@cnamts/synapse'
769
+ import { mdiStepBackward } from '@mdi/js'
770
+
771
+ const backArrowIcon = ref(mdiStepBackward)
772
+ </script>
773
+ `,
774
+ },
775
+ ],
776
+ },
777
+ args: {
778
+ 'backBtnText': 'Retour',
779
+ 'hideBackBtn': false,
780
+ 'titleText': 'Paul Dupont',
781
+ 'subTitleText': '1 69 08 75 125 456 75',
782
+ 'loading': false,
783
+ 'renderHtmlValue': false,
784
+ 'back-btn-icon': `<template #back-btn-icon>
785
+ <VIcon class="mr-2">
786
+ {{ backArrowIcon }}
787
+ </VIcon>
788
+ </template>`,
789
+ },
790
+ render: (args) => {
791
+ return {
792
+ components: { SubHeader },
793
+ setup() {
794
+ const backArrowIcon = ref(mdiStepBackward)
795
+ return { args, backArrowIcon }
796
+ },
797
+ template: `
798
+ <SubHeader v-bind="args">
799
+ <template #back-btn-icon>
800
+ <VIcon class="mr-2">
801
+ {{ backArrowIcon }}
802
+ </VIcon>
803
+ </template>
804
+ </SubHeader>
805
+ `,
806
+ }
807
+ },
808
+ }
809
+
810
+ export const SlotTitle: Story = {
811
+ parameters: {
812
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'additional-informations', 'back-btn', 'back-btn-icon', 'sub-title', 'right-content'] },
813
+ sourceCode: [
814
+ {
815
+ name: 'Template',
816
+ code: `
817
+ <template>
818
+ <SubHeader sub-title-text="1 69 08 75 125 456 75">
819
+ <template #title>
820
+ <h3 class="headline font-weight-bold mt-2">
821
+ Dossier n°42
822
+ </h3>
823
+ </template>
824
+ </SubHeader>
825
+ </template>
826
+ `,
827
+ },
828
+ {
829
+ name: 'Script',
830
+ code: `
831
+ <script setup lang="ts">
832
+ import SubHeader from '@cnamts/synapse'
833
+ </script>
834
+ `,
835
+ },
836
+ ],
837
+ },
838
+ args: {
839
+ backBtnText: 'Retour',
840
+ hideBackBtn: false,
841
+ titleText: 'Paul Dupont',
842
+ subTitleText: '1 69 08 75 125 456 75',
843
+ loading: false,
844
+ renderHtmlValue: false,
845
+ title: `<template #title>
846
+ <h3 class="headline font-weight-bold mt-2">
847
+ Dossier n°42
848
+ </h3>
849
+ </template>`,
850
+ },
851
+ render: (args) => {
852
+ return {
853
+ components: { SubHeader },
854
+ setup() {
855
+ return { args }
856
+ },
857
+ template: `
858
+ <SubHeader v-bind="args">
859
+ <template #title>
860
+ <h3 class="headline font-weight-bold mt-2">
861
+ Dossier n°42
862
+ </h3>
863
+ </template>
864
+ </SubHeader>
865
+ `,
866
+ }
867
+ },
868
+ }
869
+
870
+ export const SlotSubTitle: Story = {
871
+ parameters: {
872
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'additional-informations', 'back-btn', 'back-btn-icon', 'title', 'right-content'] },
873
+ sourceCode: [
874
+ {
875
+ name: 'Template',
876
+ code: `
877
+ <template>
878
+ <SubHeader
879
+ title-text="Paul Dupont"
880
+ >
881
+ <template #sub-title>
882
+ <h4 class="title mt-1">
883
+ Traité par Paul Dupont
884
+ </h4>
885
+ </template>
886
+ </SubHeader>
887
+ </template>
888
+ `,
889
+ },
890
+ {
891
+ name: 'Script',
892
+ code: `
893
+ <script setup lang="ts">
894
+ import SubHeader from '@cnamts/synapse'
895
+ </script>
896
+ `,
897
+ },
898
+ ],
899
+ },
900
+ args: {
901
+ 'backBtnText': 'Retour',
902
+ 'hideBackBtn': false,
903
+ 'titleText': 'Paul Dupont',
904
+ 'subTitleText': '1 69 08 75 125 456 75',
905
+ 'loading': false,
906
+ 'renderHtmlValue': false,
907
+ 'sub-title': `<template #sub-title>
908
+ <h4 class="title mt-1">
909
+ Traité par Jean Lunel
910
+ </h4>
911
+ </template>`,
912
+ },
913
+ render: (args) => {
914
+ return {
915
+ components: { SubHeader },
916
+ setup() {
917
+ return { args }
918
+ },
919
+ template: `
920
+ <SubHeader v-bind="args">
921
+ <template #sub-title>
922
+ <h4 class="title mt-1">
923
+ Traité par Jean Lunel
924
+ </h4>
925
+ </template>
926
+ </SubHeader>
927
+ `,
928
+ }
929
+ },
930
+ }
931
+
932
+ export const SlotRightContent: Story = {
933
+ parameters: {
934
+ controls: { exclude: ['vuetifyOptions', 'dataListGroupItems', 'backBtnText', 'hideBackBtn', 'titleText', 'subTitleText', 'loading', 'renderHtmlValue', 'back', 'click:list-item', 'additional-informations', 'back-btn', 'back-btn-icon', 'title', 'sub-title'] },
935
+ sourceCode: [
936
+ {
937
+ name: 'Template',
938
+ code: `
939
+ <template>
940
+ <SubHeader
941
+ title-text="Paul Dupont"
942
+ sub-title-text="1 69 08 75 125 456 75"
943
+ >
944
+ <template #sub-title>
945
+ <h4 class="title mt-1">
946
+ Traité par Paul Dupont
947
+ </h4>
948
+ </template>
949
+ </SubHeader>
950
+ </template>
951
+ `,
952
+ },
953
+ {
954
+ name: 'Script',
955
+ code: `
956
+ <script setup lang="ts">
957
+ import SubHeader from '@cnamts/synapse'
958
+
959
+ import { mdiClose, mdiContentCopy } from '@mdi/js'
960
+ </script>
961
+ `,
962
+ },
963
+ ],
964
+ },
965
+ args: {
966
+ 'backBtnText': 'Retour',
967
+ 'hideBackBtn': false,
968
+ 'titleText': 'Paul Dupont',
969
+ 'subTitleText': '1 69 08 75 125 456 75',
970
+ 'loading': false,
971
+ 'renderHtmlValue': false,
972
+ 'right-content': `<template #right-content>
973
+ <div class="d-flex flex-column align-start flex-grow-0 ml-auto mt-auto">
974
+ <VBtn
975
+ variant="text"
976
+ color="white"
977
+ >
978
+ <VIcon class="mr-2">
979
+ {{ cancelIcon }}
980
+ </VIcon>
981
+ Clore le dossier
982
+ </VBtn>
983
+ <VBtn
984
+ variant="text"
985
+ color="white"
986
+ >
987
+ <VIcon class="mr-2">
988
+ {{ copyIcon }}
989
+ </VIcon>
990
+ Dupliquer le dossier
991
+ </VBtn>
992
+ </div>
993
+ </template>`,
994
+ },
995
+ render: (args) => {
996
+ return {
997
+ components: { SubHeader },
998
+ setup() {
999
+ const cancelIcon = ref(mdiClose)
1000
+ const copyIcon = ref(mdiContentCopy)
1001
+
1002
+ return { args, cancelIcon, copyIcon }
1003
+ },
1004
+ template: `
1005
+ <SubHeader v-bind="args">
1006
+ <template #right-content>
1007
+ <div class="d-flex flex-column align-start flex-grow-0 ml-auto mt-auto">
1008
+ <VBtn
1009
+ variant="text"
1010
+ color="white"
1011
+ >
1012
+ <VIcon class="mr-2">
1013
+ {{ cancelIcon }}
1014
+ </VIcon>
1015
+ Clore le dossier
1016
+ </VBtn>
1017
+ <VBtn
1018
+ variant="text"
1019
+ color="white"
1020
+ >
1021
+ <VIcon class="mr-2">
1022
+ {{ copyIcon }}
1023
+ </VIcon>
1024
+ Dupliquer le dossier
1025
+ </VBtn>
1026
+ </div>
1027
+ </template>
1028
+ </SubHeader>
1029
+ `,
1030
+ }
1031
+ },
1032
+ }