@cnamts/synapse 0.0.7-alpha → 0.0.9-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 (198) hide show
  1. package/dist/design-system-v3.d.ts +785 -372
  2. package/dist/design-system-v3.js +4993 -3357
  3. package/dist/design-system-v3.umd.cjs +1 -10
  4. package/dist/style.css +1 -1
  5. package/package.json +10 -2
  6. package/src/assets/settings.scss +2 -2
  7. package/src/assets/tokens.scss +107 -112
  8. package/src/components/BackBtn/BackBtn.vue +4 -4
  9. package/src/components/BackToTopBtn/BackToTopBtn.vue +1 -0
  10. package/src/components/CollapsibleList/CollapsibleList.mdx +1 -1
  11. package/src/components/CollapsibleList/CollapsibleList.vue +43 -44
  12. package/src/components/ContextualMenu/Accessibilite.mdx +14 -0
  13. package/src/components/ContextualMenu/Accessibilite.stories.ts +191 -0
  14. package/src/components/ContextualMenu/AccessibiliteItems.ts +89 -0
  15. package/src/components/ContextualMenu/ContextualMenu.mdx +118 -0
  16. package/src/components/ContextualMenu/ContextualMenu.stories.ts +430 -0
  17. package/src/components/ContextualMenu/ContextualMenu.vue +101 -0
  18. package/src/components/ContextualMenu/constants/ExpertiseLevelEnum.ts +4 -0
  19. package/src/components/ContextualMenu/tests/ContextualMenu.spec.ts +115 -0
  20. package/src/components/ContextualMenu/tests/__snapshots__/ContextualMenu.spec.ts.snap +10 -0
  21. package/src/components/ContextualMenu/types.ts +5 -0
  22. package/src/components/CookieBanner/CookieBanner.stories.ts +1 -2
  23. package/src/components/CookieBanner/CookieBanner.vue +13 -10
  24. package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +17 -15
  25. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +6 -1
  26. package/src/components/CookiesSelection/CookiesInformation/locales.ts +1 -0
  27. package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +1 -0
  28. package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +17 -15
  29. package/src/components/CopyBtn/CopyBtn.vue +7 -7
  30. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +26 -26
  31. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +24 -24
  32. package/src/components/Customs/SySelect/SySelect.stories.ts +7 -7
  33. package/src/components/Customs/SySelect/SySelect.vue +36 -30
  34. package/src/components/Customs/SySelect/tests/SySelect.spec.ts +2 -2
  35. package/src/components/Customs/SyTextField/SyTextField.stories.ts +187 -2
  36. package/src/components/Customs/SyTextField/SyTextField.vue +185 -16
  37. package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +2 -4
  38. package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +18 -16
  39. package/src/components/Customs/SyTextField/types.d.ts +2 -2
  40. package/src/components/DataList/DataList.stories.ts +3 -2
  41. package/src/components/DataList/DataList.vue +1 -1
  42. package/src/components/DataListGroup/DataListGroup.stories.ts +3 -2
  43. package/src/components/DataListItem/DataListItem.vue +12 -12
  44. package/src/components/DatePicker/DatePicker.mdx +191 -0
  45. package/src/components/DatePicker/DatePicker.stories.ts +787 -0
  46. package/src/components/DatePicker/DatePicker.vue +560 -0
  47. package/src/components/DatePicker/DateTextInput.vue +409 -0
  48. package/src/components/DatePicker/tests/DatePicker.spec.ts +266 -0
  49. package/src/components/DialogBox/DialogBox.mdx +28 -2
  50. package/src/components/DialogBox/DialogBox.stories.ts +2 -2
  51. package/src/components/DialogBox/DialogBox.vue +3 -2
  52. package/src/components/DownloadBtn/DownloadBtn.vue +2 -1
  53. package/src/components/ExternalLinks/Accessibilite.mdx +14 -0
  54. package/src/components/ExternalLinks/Accessibilite.stories.ts +191 -0
  55. package/src/components/ExternalLinks/AccessibiliteItems.ts +197 -0
  56. package/src/components/ExternalLinks/ExternalLinks.mdx +86 -0
  57. package/src/components/ExternalLinks/ExternalLinks.stories.ts +553 -0
  58. package/src/components/ExternalLinks/ExternalLinks.vue +200 -0
  59. package/src/components/ExternalLinks/config.ts +34 -0
  60. package/src/components/ExternalLinks/constants/ExpertiseLevelEnum.ts +4 -0
  61. package/src/components/ExternalLinks/locales.ts +4 -0
  62. package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +154 -0
  63. package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +159 -0
  64. package/src/components/FileUpload/FileUpload.mdx +165 -0
  65. package/src/components/FileUpload/FileUpload.stories.ts +429 -0
  66. package/src/components/FileUpload/FileUpload.vue +195 -0
  67. package/src/components/FileUpload/FileUploadContent.vue +109 -0
  68. package/src/components/FileUpload/locales.ts +10 -0
  69. package/src/components/FileUpload/tests/FileUpload.spec.ts +332 -0
  70. package/src/components/FileUpload/tests/__snapshots__/FileUpload.spec.ts.snap +7 -0
  71. package/src/components/FileUpload/useFileDrop.ts +23 -0
  72. package/src/components/FileUpload/validateFiles.ts +39 -0
  73. package/src/components/FooterBar/FooterBar.vue +105 -80
  74. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +14 -13
  75. package/src/components/HeaderBar/HeaderBar.vue +3 -3
  76. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +11 -7
  77. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +5 -5
  78. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +2 -2
  79. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +10 -8
  80. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -2
  81. package/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.vue +2 -1
  82. package/src/components/HeaderBar/HeaderLogo/logos/Logo.vue +2 -1
  83. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +10 -10
  84. package/src/components/HeaderBar/consts.scss +1 -1
  85. package/src/components/HeaderLoading/HeaderLoading.vue +12 -11
  86. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
  87. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +9 -9
  88. package/src/components/HeaderToolbar/HeaderToolbar.vue +215 -202
  89. package/src/components/LangBtn/LangBtn.vue +8 -6
  90. package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +2 -2
  91. package/src/components/NirField/NirField.stories.ts +8 -8
  92. package/src/components/NirField/NirField.vue +46 -48
  93. package/src/components/NotFoundPage/NotFoundPage.stories.ts +33 -2
  94. package/src/components/NotFoundPage/NotFoundPage.vue +17 -0
  95. package/src/components/NotificationBar/NotificationBar.mdx +5 -5
  96. package/src/components/NotificationBar/NotificationBar.stories.ts +410 -314
  97. package/src/components/NotificationBar/NotificationBar.vue +43 -41
  98. package/src/components/PageContainer/PageContainer.vue +4 -4
  99. package/src/components/PasswordField/Accessibilite.mdx +14 -0
  100. package/src/components/PasswordField/Accessibilite.stories.ts +191 -0
  101. package/src/components/PasswordField/AccessibiliteItems.ts +184 -0
  102. package/src/components/PasswordField/PasswordField.mdx +70 -0
  103. package/src/components/PasswordField/PasswordField.stories.ts +213 -0
  104. package/src/components/PasswordField/PasswordField.vue +189 -0
  105. package/src/components/PasswordField/config.ts +11 -0
  106. package/src/components/PasswordField/constants/ExpertiseLevelEnum.ts +4 -0
  107. package/src/components/PasswordField/locales.ts +4 -0
  108. package/src/components/PasswordField/tests/PasswordField.spec.ts +96 -0
  109. package/src/components/PhoneField/PhoneField.mdx +0 -2
  110. package/src/components/PhoneField/PhoneField.stories.ts +10 -50
  111. package/src/components/PhoneField/PhoneField.vue +77 -93
  112. package/src/components/PhoneField/tests/PhoneField.spec.ts +0 -15
  113. package/src/components/RangeField/RangeField.mdx +54 -0
  114. package/src/components/RangeField/RangeField.stories.ts +189 -0
  115. package/src/components/RangeField/RangeField.vue +157 -0
  116. package/src/components/RangeField/RangeSlider/RangeSlider.vue +387 -0
  117. package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +64 -0
  118. package/src/components/RangeField/RangeSlider/tests/__snapshots__/rangeSlider.spec.ts.snap +27 -0
  119. package/src/components/RangeField/RangeSlider/tests/rangeSlider.spec.ts +100 -0
  120. package/src/components/RangeField/RangeSlider/tests/useDoubleSlider.spec.ts +246 -0
  121. package/src/components/RangeField/RangeSlider/tests/useMouseSlide.spec.ts +204 -0
  122. package/src/components/RangeField/RangeSlider/tests/useThumb.spec.ts +22 -0
  123. package/src/components/RangeField/RangeSlider/tests/useThumbKeyboard.spec.ts +233 -0
  124. package/src/components/RangeField/RangeSlider/tests/useTooltipsNudge.spec.ts +150 -0
  125. package/src/components/RangeField/RangeSlider/tests/useTrack.spec.ts +314 -0
  126. package/src/components/RangeField/RangeSlider/tests/vAnimateClick.spec.ts +32 -0
  127. package/src/components/RangeField/RangeSlider/types.ts +15 -0
  128. package/src/components/RangeField/RangeSlider/useMouseSlide.ts +109 -0
  129. package/src/components/RangeField/RangeSlider/useRangeSlider.ts +126 -0
  130. package/src/components/RangeField/RangeSlider/useThumb.ts +18 -0
  131. package/src/components/RangeField/RangeSlider/useThumbKeyboard.ts +84 -0
  132. package/src/components/RangeField/RangeSlider/useTooltipsNudge.ts +92 -0
  133. package/src/components/RangeField/RangeSlider/useTrack.ts +116 -0
  134. package/src/components/RangeField/RangeSlider/vAnimateClick.ts +19 -0
  135. package/src/components/RangeField/config.ts +7 -0
  136. package/src/components/RangeField/locales.ts +4 -0
  137. package/src/components/RangeField/tests/RangeField.spec.ts +224 -0
  138. package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +379 -0
  139. package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +205 -0
  140. package/src/components/RatingPicker/EmotionPicker/locales.ts +3 -0
  141. package/src/components/RatingPicker/EmotionPicker/tests/EmotionPicker.spec.ts +104 -0
  142. package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +66 -0
  143. package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +159 -0
  144. package/src/components/RatingPicker/NumberPicker/locales.ts +4 -0
  145. package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +73 -0
  146. package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +105 -0
  147. package/src/components/RatingPicker/Rating.ts +45 -0
  148. package/src/components/RatingPicker/RatingPicker.mdx +56 -0
  149. package/src/components/RatingPicker/RatingPicker.stories.ts +515 -0
  150. package/src/components/RatingPicker/RatingPicker.vue +122 -0
  151. package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +116 -0
  152. package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +95 -0
  153. package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +36 -0
  154. package/src/components/RatingPicker/locales.ts +3 -0
  155. package/src/components/RatingPicker/tests/Rating.spec.ts +104 -0
  156. package/src/components/RatingPicker/tests/RatingPicker.spec.ts +187 -0
  157. package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +108 -0
  158. package/src/components/SearchListField/SearchListField.mdx +74 -0
  159. package/src/components/SearchListField/SearchListField.stories.ts +126 -0
  160. package/src/components/SearchListField/SearchListField.vue +194 -0
  161. package/src/components/SearchListField/locales.ts +5 -0
  162. package/src/components/SearchListField/tests/SearchListField.spec.ts +323 -0
  163. package/src/components/SearchListField/types.d.ts +4 -0
  164. package/src/components/SelectBtnField/SelectBtnField.mdx +50 -0
  165. package/src/components/SelectBtnField/SelectBtnField.stories.ts +763 -0
  166. package/src/components/SelectBtnField/SelectBtnField.vue +283 -0
  167. package/src/components/SelectBtnField/config.ts +11 -0
  168. package/src/components/SelectBtnField/tests/SelectBtnField.spec.ts +327 -0
  169. package/src/components/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +125 -0
  170. package/src/components/SelectBtnField/types.d.ts +11 -0
  171. package/src/components/SkipLink/SkipLink.vue +10 -10
  172. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +28 -26
  173. package/src/components/SubHeader/SubHeader.vue +32 -31
  174. package/src/components/SyAlert/SyAlert.vue +12 -12
  175. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -1
  176. package/src/components/UserMenuBtn/config.ts +1 -1
  177. package/src/components/index.ts +17 -7
  178. package/src/composables/rules/useFieldValidation.ts +172 -44
  179. package/src/designTokens/index.ts +6 -4
  180. package/src/designTokens/{bootstrapColors.md → paColors.md} +1 -1
  181. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -0
  182. package/src/designTokens/tokens/pa/paColors.ts +171 -0
  183. package/src/designTokens/tokens/pa/paContextual.ts +58 -0
  184. package/src/designTokens/tokens/pa/paDarkTheme.ts +5 -0
  185. package/src/designTokens/tokens/pa/paLightTheme.ts +123 -0
  186. package/src/designTokens/tokens/pa/paSemantic.ts +87 -0
  187. package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +52 -2
  188. package/src/stories/GuideDuDev/CreerUneIssue.mdx +64 -0
  189. package/src/stories/GuideDuDev/{CommentUtiliserLesRules.mdx → UtiliserLesRules.mdx} +2 -2
  190. package/src/stories/GuideDuDev/components.stories.ts +9 -7
  191. package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +163 -88
  192. package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +250 -23
  193. package/src/temp/TestDTComponent.vue +5 -6
  194. package/src/utils/calcHumanFileSize/index.ts +12 -0
  195. package/src/utils/calcHumanFileSize/tests/calcHumanFileSize.spec.ts +21 -0
  196. package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +0 -158
  197. package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +0 -22
  198. package/src/stories/GuideDuDev/CommentContribuer.mdx +0 -22
@@ -0,0 +1,87 @@
1
+ export const paSemanticTokens = {
2
+ colors: {
3
+ background: {
4
+ main: '#e7ecf5',
5
+ surface: '#ffffff',
6
+ mainAlt: '#ffffff',
7
+ surfaceAlt: '#e7ecf5',
8
+ raised: '#f8f9fc',
9
+ accent: '#0c419a',
10
+ accentContrasted: '#07275c',
11
+ accentAlt: '#111212',
12
+ info: '#ced9eb',
13
+ infoSubdued: '#e7ecf5',
14
+ infoContrasted: '#0c419a',
15
+ success: '#cceee8',
16
+ successSubdued: '#e5f7f4',
17
+ successContrasted: '#56c271',
18
+ warning: '#fcf0d3',
19
+ warningSubdued: '#fdf7e9',
20
+ warningContrasted: '#f0b323',
21
+ error: '#f9dcd7',
22
+ errorSubdued: '#fcedeb',
23
+ errorContrasted: '#b33f2e',
24
+ disabled: '#dddede',
25
+ disabledOnDark: 'rgba(255, 255, 255, 0.0800)',
26
+ assure: '#ed76b3',
27
+ professionnel: '#66c9ec',
28
+ entreprise: '#f0b323',
29
+ },
30
+ border: {
31
+ darker: '#222324',
32
+ base: '#989b9b',
33
+ subdued: '#dddede',
34
+ accent: '#0c419a',
35
+ accentContrasted: '#07275c',
36
+ accentOnDark: '#ffffff',
37
+ info: '#0c419a',
38
+ success: '#224e2d',
39
+ warning: '#60480e',
40
+ error: '#b33f2e',
41
+ onDark: 'rgba(255, 255, 255, 0.7)',
42
+ disabled: '#dddede',
43
+ disabledOnDark: 'rgba(255, 255, 255, 0.4)',
44
+ },
45
+ text: {
46
+ base: '#222324',
47
+ accent: '#0c419a',
48
+ accentContrasted: '#07275c',
49
+ subdued: '#545859',
50
+ info: '#0c419a',
51
+ success: '#224e2d',
52
+ warning: '#60480e',
53
+ error: '#b33f2e',
54
+ disabled: '#989b9b',
55
+ onDark: '#ffffff',
56
+ subduedOnDark: 'rgba(255, 255, 255, 0.7)',
57
+ disabledOnDark: 'rgba(255, 255, 255, 0.4)',
58
+ },
59
+ icon: {
60
+ base: '#222324',
61
+ subdued: '#545859',
62
+ subduedOnDark: 'rgba(255, 255, 255, 0.7)',
63
+ accent: '#0c419a',
64
+ accentContrasted: '#07275c',
65
+ info: '#0c419a',
66
+ success: '#224e2d',
67
+ warning: '#60480e',
68
+ error: '#b33f2e',
69
+ onDark: '#ffffff',
70
+ disabled: '#989b9b',
71
+ disabledOnDark: 'rgba(255, 255, 255, 0.4)',
72
+ },
73
+ overlay: {
74
+ fullpage: '#989b9b',
75
+ onDark: '#ffffff',
76
+ onLight: '#0c419a',
77
+ },
78
+ interactive: {
79
+ default: 'rgba(255, 255, 255, 0.0000)',
80
+ hover: '#e7ecf5',
81
+ pressed: '#ced9eb',
82
+ focus: '#e7ecf5',
83
+ disabled: 'rgba(255, 255, 255, 0.0000)',
84
+ hoverOnSelected: '#ced9eb',
85
+ },
86
+ },
87
+ }
@@ -1,7 +1,57 @@
1
- import { Meta } from '@storybook/addon-docs';
1
+ import {Meta, Source} from '@storybook/addon-docs/blocks';
2
2
 
3
3
  <Meta title="Fondamentaux/Customisation et thèmes" />
4
4
 
5
5
  # Customisation et thèmes
6
6
 
7
- Contenu à définir
7
+ ## Étapes pour changer le thème du Design System aux couleurs Portail Agent
8
+
9
+ ### 1. Modification du fichier nuxt.config.ts
10
+
11
+ 1. Ouvrez le fichier nuxt.config.ts dans votre éditeur de code.
12
+ 2. Remplacer les valeurs des thèmes `cnamLightTheme` et `cnamDarkTheme` par les valeurs de la charte PA : `paLightTheme` et `paDarkTheme`.
13
+
14
+ <Source dark code={`
15
+ import {paLightTheme} from '@cnamts/synapse/designTokens/tokens/pa/paLightTheme'
16
+ import {paDarkTheme} from '@cnamts/synapse/designTokens/tokens/pa/paDarkTheme'
17
+ `}
18
+ />
19
+
20
+ 3. Localisez la configuration de base de Vuetify (ligne 31 dans le fichier `nuxt.config.ts`).
21
+ 4. Mettez à jour le thème en configurant les couleurs selon la charte PA si nécessaire :
22
+
23
+ <Source dark code={`
24
+ theme: {
25
+ defaultTheme: 'light',
26
+ themes: {
27
+ light: {
28
+ colors: {
29
+ ...paLightTheme,
30
+ // ...customLightTheme
31
+ },
32
+ },
33
+ dark: {
34
+ colors: {
35
+ ...paDarkTheme,
36
+ //...customDarkTheme,
37
+ },
38
+ },
39
+ },
40
+ },
41
+ `}
42
+ />
43
+
44
+ NB : les thèmes `customLightTheme` et `customDarkTheme` sont à votre disposition pour ajouter des couleurs supplémentaires.
45
+
46
+ ### 2. Relancer le projet
47
+
48
+ Après avoir effectué les modifications dans le fichier de configuration, relancez le serveur de développement pour appliquer les changements :
49
+
50
+ <Source dark code={`
51
+ pnpm dev
52
+ `}
53
+ />
54
+
55
+ ### 3. Vérification
56
+
57
+ Une fois le projet redémarré, vérifiez que la charte PA est bien appliquée.
@@ -0,0 +1,64 @@
1
+ import {Meta, Story} from '@storybook/addon-docs/blocks';
2
+ import * as ComponentStories from './components.stories.ts';
3
+
4
+ <Meta of={ComponentStories}/>
5
+
6
+ # Créer une issue
7
+
8
+ ## Introduction
9
+
10
+ Les issues sont un moyen essentiel de suivre les bugs, les améliorations et les nouvelles fonctionnalités dans notre
11
+ design system.
12
+ Lorsque vous constatez un bug, vous pouvez créer un rapport de bug pour notifier l’équipe de celui-ci.
13
+ Ce guide vous explique comment créer une issue efficace.
14
+
15
+ ## Étapes pour créer une issue
16
+
17
+ ### 1. Choisissez le type d'issue approprié :
18
+
19
+ - 🐛 Bug
20
+ Report - [Créer un rapport de bug](https://github.com/assurance-maladie-digital/design-system-v3/issues/new?template=bug_report.md)
21
+ - ✨ Feature
22
+ Request - [Proposer une nouvelle fonctionnalité](https://github.com/assurance-maladie-digital/design-system-v3/issues/new?template=feature_request.md)
23
+ - 📝
24
+ Documentation - [Améliorer la documentation](https://github.com/assurance-maladie-digital/design-system-v3/issues/new?template=documentation.md)
25
+ - ♿
26
+ Accessibilité - [Signaler un problème d'accessibilité](https://github.com/assurance-maladie-digital/design-system-v3/issues/new?template=accessibility.md)
27
+
28
+ ### 2. Priorisation :
29
+
30
+ 🟢 Peu prioritaire : Améliorations mineures, bugs non bloquants
31
+
32
+ 🟡 Prioritaire : Bugs impactant l'expérience utilisateur, nouvelles fonctionnalités importantes
33
+
34
+ 🔴 Très prioritaire : Bugs critiques, problèmes de sécurité, fonctionnalités essentielles
35
+
36
+
37
+ <Story of={ComponentStories.Info}/>
38
+
39
+ ## Bonnes pratiques
40
+
41
+ 1. **Soyez précis** : Donnez autant de détails pertinents que possible
42
+ 2. **Un problème par issue** : Ne mélangez pas plusieurs problèmes dans une seule issue
43
+ 3. **Utilisez les labels** : Ajoutez les labels appropriés pour faciliter le tri et la priorisation
44
+ 4. **Vérifiez les doublons** : Avant de créer une nouvelle issue, vérifiez si elle n'existe pas déjà en cherchant dans
45
+ les [rapports existants](https://github.com/assurance-maladie-digital/design-system-v3/issues)
46
+ 5. **Soyez constructif** : Restez professionnel et focalisé sur la résolution du problème
47
+ 6. **Vérifiez la version du package utilisé** : Le bug est il toujours présent dans la dernière version du package
48
+ concerné?
49
+
50
+ ## Labels couramment utilisés
51
+
52
+ - `bug` : Pour les problèmes qui doivent être corrigés
53
+ - `enhancement` : Pour les nouvelles fonctionnalités ou améliorations
54
+ - `documentation` : Pour les mises à jour de la documentation
55
+ - `help wanted` : Pour les issues qui nécessitent de l'aide supplémentaire
56
+ - `good first issue` : Pour les issues adaptées aux nouveaux contributeurs
57
+
58
+ ## Suivi
59
+
60
+ Après avoir créé une issue :
61
+
62
+ 1. Restez à l'écoute des commentaires et questions
63
+ 2. Mettez à jour l'issue avec toute nouvelle information pertinente
64
+ 3. Fermez l'issue une fois résolue en référençant le commit ou la PR qui l'a résolue
@@ -1,8 +1,8 @@
1
1
  import {Meta, Source} from '@storybook/addon-docs/blocks';
2
2
 
3
- <Meta title="Guide Du Dev/Comment utiliser les rules"/>
3
+ <Meta title="Guide Du Dev/Utiliser les rules"/>
4
4
 
5
- # Comment utiliser les règles de validation
5
+ # Utiliser les règles de validation
6
6
 
7
7
  Ce guide décrit comment utiliser le composable `useFieldValidation` pour créer des règles de validation flexibles et personnalisées dans votre projet Vue.js.
8
8
 
@@ -1,7 +1,7 @@
1
1
  import SyAlert from '@/components/SyAlert/SyAlert.vue'
2
2
 
3
3
  export default {
4
- title: 'Guide Du Dev/Rapport de bug',
4
+ title: 'Guide Du Dev/Créer une issue',
5
5
  component: SyAlert,
6
6
  }
7
7
  export const Info = {
@@ -9,14 +9,16 @@ export const Info = {
9
9
  return {
10
10
  components: { SyAlert },
11
11
  setup() {
12
- return { }
12
+ return {}
13
13
  },
14
14
  template: `
15
- <SyAlert type="info" variant="tonal" :closable="false">
16
- <template #default>Lorsque vous créez une reproduction minimale, supprimez tous les éléments, propriétés, variables, données et autres qui ne sont pas nécessaires pour reproduire le bug. Cela facilitera le traitement du rapport et le temps qu’il faudra pour identifier puis résoudre le bug.
17
- </template>
18
- </SyAlert>
19
- `,
15
+ <SyAlert type="info" variant="tonal" :closable="false">
16
+ <template #default>Lorsque vous créez une reproduction minimale, supprimez tous les éléments,
17
+ propriétés, variables, données et autres qui ne sont pas nécessaires pour reproduire le bug. Cela
18
+ facilitera le traitement du rapport et le temps qu’il faudra pour identifier puis résoudre le bug.
19
+ </template>
20
+ </SyAlert>
21
+ `,
20
22
  }
21
23
  },
22
24
  tags: ['!dev'],
@@ -1,11 +1,13 @@
1
- import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon, VRow, VCol } from 'vuetify/components'
1
+ import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon, VRow, VCol, VSelect, VBtn, VCombobox, VContainer, VListItem } from 'vuetify/components'
2
2
  import type { StoryObj } from '@storybook/vue3'
3
- import { VuetifyItems } from './VuetifyItems'
3
+ import { VuetifyItems, itemsChips } from './VuetifyItems'
4
4
  import { mdiCheckboxMarkedCircleOutline, mdiLinkVariant, mdiAlertCircleOutline } from '@mdi/js'
5
+ import { computed, ref } from 'vue'
5
6
 
6
7
  const checkIcon = mdiCheckboxMarkedCircleOutline
7
8
  const linkICon = mdiLinkVariant
8
9
  const iconAlert = mdiAlertCircleOutline
10
+
9
11
  export default {
10
12
  title: 'Guidelines/Vuetify',
11
13
  }
@@ -13,89 +15,168 @@ export default {
13
15
  export const VuetifyPanel: StoryObj = {
14
16
  render: () => {
15
17
  return {
16
- components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon },
18
+ components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VListItem, VDataTable, VIcon, VContainer, VSelect, VBtn, VCombobox },
17
19
  setup() {
18
- return { VuetifyItems, checkIcon, iconAlert, linkICon }
20
+ const menuProps = ref({ top: false })
21
+ const itemValue = ref(0)
22
+ const activeBtnIndex = ref('null')
23
+ const search = ref([])
24
+ const searchString = ref('')
25
+ const items = computed(() => {
26
+ return itemsChips.sort((a, b) => a.text.toLowerCase().localeCompare(b.text.toLowerCase()))
27
+ },
28
+ )
29
+
30
+ const itemsString = computed(() => {
31
+ const items = itemsChips.sort((a, b) => a.text.toLowerCase().localeCompare(b.text.toLowerCase()))
32
+ return items.map(o => o.text)
33
+ },
34
+ )
35
+
36
+ const cardItem = computed(() => {
37
+ return VuetifyItems[0].items[itemValue.value - 1]
38
+ },
39
+ )
40
+ return { VuetifyItems, menuProps, items, itemsString, checkIcon, iconAlert, linkICon, itemValue, cardItem, activeBtnIndex, search, searchString }
19
41
  },
20
42
  template: `
21
- <div v-for="(item, index) in VuetifyItems" :key="index">
22
- <v-data-table
23
- :items="item.items"
24
- :items-per-page="23"
25
- hide-default-footer>
26
- <template v-slot:header.name="{ header }">
27
- Composant Vuetify
28
- </template>
29
-
30
- <template v-slot:header.errorImportants="{ header }">
31
- Erreurs bloquantes (Tanaguru)
32
- </template>
33
- <template v-slot:item.name="{ item }">
34
- <v-chip v-if="item.errorImportants == 0 && item.errorIndeterminated == 0"
35
- style="font-size: 12px; line-height: 15px;">
36
- <VIcon style="margin-right: 2px;" :icon="checkIcon"/>
37
- {{ item.name }}
38
- </v-chip>
39
- <v-chip v-else style="font-size: 12px; line-height: 15px;">
43
+ <VSheet :elevation="1" class="mt-6 pa-4">
44
+ <VRow cols="12" class="d-flex align-items justify-between ">
45
+ <VCol cols="12" sm="6" >
46
+ <v-combobox
47
+ :menu-props="menuProps"
48
+ variant="outlined"
49
+ color="primary"
50
+ v-model="search"
51
+ clearable
52
+ dense
53
+ :items="items"
54
+ item-value="value"
55
+ item-title="text"
56
+ :selected="search ? itemValue = search.value : itemValue = 0"
57
+ label="Rechercher un composant"
58
+ hide-selected
59
+ return-object
60
+ style="margin-bottom: -20px"
61
+ />
62
+ </VCol>
63
+ <VCol cols="12" sm="6" class="v-col-auto">
64
+ <p style="font-size: 13px;">
40
65
  <VIcon style="margin-right: 2px;" :icon="iconAlert"/>
41
- {{ item.name }}
42
- </v-chip>
43
- </template>
44
-
45
- <template v-slot:item.solution="{ item }">
46
- <div v-if="item.solution.length > 0">
47
- <span v-for="(item, index) in item.solution"
48
- style="display:flex; align-items: center; font-size: 12px; line-height: 15px; font-weight: bold">
66
+ Composant non conforme par défaut.
67
+ </p>
68
+ <p style="font-size: 13px;">
69
+ <VIcon style="margin-right: 2px;" :icon="checkIcon"/>
70
+ Composant conforme.
71
+ </p>
72
+ </VCol>
73
+ </VRow>
74
+ </VSheet>
75
+
76
+ <div style="display: flex; justify-content: center;" class="mt-12">
77
+ <v-card v-if="cardItem && itemValue !==0 " class="w-100 w-md-75">
78
+ <v-card-item>
79
+ <v-card-title>
80
+ <div style="align-items: center;display: flex;">
81
+ <VIcon
82
+ v-if="cardItem.errorImportants.length > 0 && cardItem.errorIndeterminated.length > 0"
83
+ style="margin-right: 5px;font-size: 25px;" :icon="iconAlert"/>
84
+ <VIcon v-else style="margin-right: 5px;font-size: 25px;" :icon="checkIcon"/>
85
+
86
+ {{ cardItem.name }}
87
+ </div>
88
+ </v-card-title>
89
+
90
+ <v-card-text style="margin-top:20px;">
91
+ <v-expansion-panels multiple>
92
+
93
+ <v-expansion-panel>
94
+ <v-expansion-panel-title>Erreurs bloquantes
95
+ <v-btn variant="tonal" size="x-small"
96
+ style="margin-left: 3px;font-size: 9px;" rounded> Tanaguru
97
+ </v-btn>
98
+ </v-expansion-panel-title>
99
+ <v-expansion-panel-text>
100
+ <div v-if="cardItem.errorImportants.length == 0">
101
+ <p style="margin-top: 5px; margin-bottom: 5px; font-size: 12px;">Pas
102
+ d'erreur
103
+ d'accessibilité relevée à ce jour</p>
104
+ </div>
105
+ <div v-for="item in cardItem.errorImportants" :key="index"
106
+ style="width: 100% !important; font-size: 12px; line-height: 15px;">
107
+ <p style="margin-top: 5px; margin-bottom: 5px;">
108
+ <span
109
+ style="font-weight: bold;">{{ item.match('[0-9.]+')?.join('') || '' }} </span>
110
+ {{ item.replace(/[0-9.]/g, '') }}
111
+ </p>
112
+ </div>
113
+ <v-divider class="mt-4 mb-2" v-if="cardItem.errorImportants.length != 0"
114
+ style="display: flex; justify-content:center"></v-divider>
115
+ <div style="display: flex;align-items: center;"
116
+ v-if="cardItem.errorSolutionImportant && cardItem.errorSolutionImportant.length > 0">
117
+ <span style="line-height: 15px; font-weight: bold; margin-right:5px;">Recommandation : </span>
118
+ <div v-for="item in cardItem.errorSolutionImportant" :key="index"
119
+ style="line-height: 15px;">
120
+ <p style="margin-top: 5px; margin-bottom: 5px;">
121
+ <span> {{ item }} </span>
122
+
123
+ </p>
124
+ </div>
125
+ </div>
126
+ </v-expansion-panel-text>
127
+ </v-expansion-panel>
128
+
129
+ <v-expansion-panel style="margin-top:10px;">
130
+ <v-expansion-panel-title>Erreurs indéterminées
131
+ <v-btn variant="tonal" size="x-small"
132
+ style="margin-left: 3px;font-size: 9px;" rounded> Tanaguru
133
+ </v-btn>
134
+
135
+ </v-expansion-panel-title>
136
+ <v-expansion-panel-text>
137
+ <div v-if="cardItem.errorIndeterminated.length == 0">
138
+ <p style="margin-top: 5px; margin-bottom: 5px; font-size: 12px;">Pas
139
+ d'erreur
140
+ d'accessibilité relevée à ce jour</p>
141
+ </div>
142
+ <div v-for="item in cardItem.errorIndeterminated" :key="index"
143
+ style="width: 100% !important; font-size: 12px; line-height: 15px;">
144
+
145
+ <p style="margin-top: 5px; margin-bottom: 5px;">
146
+ <span
147
+ style="font-weight: bold;">{{ item.match('[0-9.]+')?.join('') || '' }} </span>
148
+ {{ item.replace(/[0-9.]/g, '') }}
149
+ </p>
150
+ </div>
151
+
152
+ <v-divider class="mt-4 mb-2" v-if="cardItem.errorIndeterminated.length != 0" style="display: flex; justify-content:center" />
153
+
154
+ <div style="align-items: center;"
155
+ v-if="cardItem.errorSolutionIndeterminated && cardItem.errorSolutionIndeterminated.length > 0">
156
+ <span style="line-height: 15px; font-weight: bold; margin-right:5px;">Recommandation : </span>
157
+ <div v-for="item in cardItem.errorSolutionIndeterminated" :key="index"
158
+ style="line-height: 15px;">
159
+ <p style="margin-top: 5px; margin-bottom: 5px;">
160
+ <span> {{ item }} </span>
161
+ </p>
162
+ </div>
163
+ </div>
164
+ </v-expansion-panel-text>
165
+ </v-expansion-panel>
166
+ </v-expansion-panels>
167
+
168
+ </v-card-text>
169
+ <v-card-actions>
170
+ <p v-if="cardItem.solution.length > 0">Solution :</p>
171
+ <span v-for="(item, index) in cardItem.solution"
172
+ style="display:flex; align-items: center; line-height: 15px; font-weight: bold">
49
173
  {{ item.name }} <a :href="item.href" v-if="item.href">
50
174
  <VBtn color="primary" style="margin-left: 5px;" :icon="linkICon" size="small"
51
175
  variant="text"/></a>
52
176
  </span>
53
- </div>
54
- </template>
55
-
56
- <template v-slot:item.errorImportants="{ item }">
57
- <div v-if="item.errorImportants.length === 0">
58
- <p style="margin-top: 5px; margin-bottom: 5px; font-size: 12px;">Pas d'erreur
59
- d'accessibilité relevée à ce jour</p>
60
- </div>
61
- <div v-else v-for="item in item.errorImportants" :key="index"
62
- style="width: 100% !important; font-size: 12px; line-height: 15px;">
63
- <p style="margin-top: 5px; margin-bottom: 5px;">
64
- <span style="font-weight: bold;">{{ item.match('[0-9.]+')?.join('') || '' }} </span>
65
- {{ item.replace(/[0-9.]/g, '') }}
66
- </p>
67
- </div>
68
- </template>
69
-
70
- <template v-slot:item.errorIndeterminated="{ item }">
71
- <div v-if="item.errorIndeterminated.length === 0">
72
- <p style="margin-top: 5px; margin-bottom: 5px; font-size: 12px;">Pas d'erreur
73
- d'accessibilité relevée à ce jour</p>
74
- </div>
75
- <div v-else v-for="item in item.errorIndeterminated" :key="index"
76
- style="width: 100% !important; font-size: 12px; line-height: 15px;">
77
- <p style="margin-top: 5px; margin-bottom: 5px;">
78
- <span style="font-weight: bold;">{{ item.match('[0-9.]+')?.join('') || '' }} </span>
79
- {{ item.replace(/[0-9.]/g, '') }}
80
- </p>
81
- </div>
82
- </template>
83
-
84
- <template v-slot:header.errorIndeterminated="{ header }">
85
- Erreurs indéterminées (Tanaguru)
86
- </template>
87
- <template v-slot:header.solution="{ header }">
88
- Solution
89
- </template>
90
-
91
- <template v-slot:header.href="{ header }" style="display:none">
92
- <th v-if="false" style="display:none"></th>
93
- </template>
94
-
95
- <template v-slot:item.href="{ item }" style="display:none">
96
- <td v-if="false">{{ item.someColumn }}</td>
97
- </template>
98
- </v-data-table>
177
+ </v-card-actions>
178
+ </v-card-item>
179
+ </v-card>
99
180
  </div>
100
181
  `,
101
182
  }
@@ -113,24 +194,18 @@ export const Legende: StoryObj = {
113
194
  return { args, checkIcon, iconAlert }
114
195
  },
115
196
  template: `
116
- <p style="color: grey;font-size: 11px; margin-bottom: 12px;">Date de conception: 13/12/2024</p>
197
+ <p class="mb-2" style="color: grey;font-size: 11px;">L'étude porte sur 25 composants à date du 13/12/2024</p>
117
198
 
118
- <VRow class="mt-2 mb-5">
119
- <VCol cols="12" sm="12" class="m-2 p-2 v-col-auto">
199
+ <VRow >
200
+ <VCol cols="12" sm="12">
120
201
  <div style="font-size: 13px;">
121
- <p>L'étude relève que la majorité des composants garantissent l'accessibilité numérique par défaut tel que défini par le RGAA. <br />Nous identifions néanmoins pour certains composants qu'un travail d'ajustement est nécessaire. Ce travail peut être réalisé directement par les produits.<br />Dans une démarche d'accélération de la fabrication, nous proposons pour chaque composant relevant d'un manque sur le sujet des solutions afin d'en faciliter la mise en conformité. Ces solutions peuvent être de nature : composant ou recommandation.</p>
202
+ <p>L'étude relève que la majorité des composants garantissent l'accessibilité numérique par défaut tel que défini par le RGAA. <br />Nous identifions néanmoins pour certains composants qu'un travail d'ajustement est nécessaire. Ce travail peut être réalisé directement par les produits.<br />Dans une démarche d'accélération de la fabrication, nous proposons pour chaque composant relevant d'un manque sur le sujet des solutions afin d'en faciliter <br /> la mise en conformité. Ces solutions peuvent être de nature : composant ou recommandation.</p>
122
203
  <br />
123
204
  <p>Pour chaque composant, nous indiquons les erreurs remontées par l'outil Tanaguru : Erreurs bloquantes et indéterminées.<br />Ces erreurs doivent être analysées contextuellement. Pour rappel, l'accessibilité numérique ne se mesure par sur des composants seuls dénués de contexte.<br />Une appréciation de la part du développeur est nécessaire pour en évaluer la pertinence.</p>
124
205
  </div>
125
206
  </VCol>
126
-
127
- <VCol cols="12" sm="4" class="m-2 p-2 v-col-auto">
128
- <p style="font-size: 13px;"><VIcon style="margin-right: 2px;" :icon="iconAlert" /> Composant non conforme par défaut.</p>
129
- <p style="font-size: 13px;"><VIcon style="margin-right: 2px;" :icon="checkIcon" /> Composant conforme.</p>
130
- </VCol>
131
-
207
+
132
208
  </VRow>
133
-
134
209
  `,
135
210
  }
136
211
  },