@cnamts/synapse 0.0.4-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 (150) hide show
  1. package/dist/design-system-v3.d.ts +932 -224
  2. package/dist/design-system-v3.js +3374 -1502
  3. package/dist/design-system-v3.umd.cjs +6 -6
  4. package/dist/style.css +1 -1
  5. package/package.json +2 -1
  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/constants/ExpertiseLevelEnum.ts +4 -0
  11. package/src/components/BackBtn/Accessibilite.mdx +14 -0
  12. package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
  13. package/src/components/BackBtn/AccessibiliteItems.ts +132 -0
  14. package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
  15. package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
  16. package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
  17. package/src/components/BackToTopBtn/AccessibiliteItems.ts +82 -0
  18. package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
  19. package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
  20. package/src/components/CollapsibleList/Accessibilite.stories.ts +166 -0
  21. package/src/components/CollapsibleList/AccessibiliteItems.ts +129 -0
  22. package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
  23. package/src/components/CopyBtn/Accessibilite.mdx +14 -0
  24. package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
  25. package/src/components/CopyBtn/AccessibiliteItems.ts +135 -0
  26. package/src/components/CopyBtn/config.ts +2 -0
  27. package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
  28. package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +44 -0
  29. package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +606 -0
  30. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +246 -0
  31. package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
  32. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +40 -0
  33. package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +29 -29
  34. package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +10 -2
  35. package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
  36. package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +8 -8
  37. package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -25
  38. package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +9 -5
  39. package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
  40. package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
  41. package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +34 -34
  42. package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
  43. package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +3 -5
  44. package/src/components/DialogBox/DialogBox.mdx +14 -0
  45. package/src/components/DialogBox/DialogBox.stories.ts +798 -0
  46. package/src/components/DialogBox/DialogBox.vue +181 -0
  47. package/src/components/DialogBox/config.ts +25 -0
  48. package/src/components/DialogBox/locales.ts +5 -0
  49. package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
  50. package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
  51. package/src/components/ErrorPage/ErrorPage.mdx +21 -0
  52. package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
  53. package/src/components/ErrorPage/ErrorPage.vue +93 -0
  54. package/src/components/ErrorPage/locales.ts +5 -0
  55. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
  56. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
  57. package/src/components/FooterBar/FooterBar.stories.ts +556 -8
  58. package/src/components/FooterBar/config.ts +2 -3
  59. package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
  60. package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
  61. package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +2 -2
  62. package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
  63. package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
  64. package/src/components/FranceConnectBtn/AccessibiliteItems.ts +199 -0
  65. package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
  66. package/src/components/HeaderBar/HeaderBar.stories.ts +60 -2
  67. package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +6 -6
  68. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
  69. package/src/components/HeaderToolbar/HeaderToolbar.vue +2 -2
  70. package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
  71. package/src/components/LangBtn/Accessibilite.mdx +14 -0
  72. package/src/components/LangBtn/Accessibilite.stories.ts +166 -0
  73. package/src/components/LangBtn/AccessibiliteItems.ts +132 -0
  74. package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
  75. package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
  76. package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
  77. package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
  78. package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
  79. package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
  80. package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
  81. package/src/components/MaintenancePage/index.ts +3 -0
  82. package/src/components/MaintenancePage/locales.ts +5 -0
  83. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
  84. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
  85. package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
  86. package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
  87. package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
  88. package/src/components/NotFoundPage/assets/not-found.svg +1 -0
  89. package/src/components/NotFoundPage/locales.ts +6 -0
  90. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
  91. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
  92. package/src/components/NotificationBar/Accessibilite.mdx +14 -0
  93. package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
  94. package/src/components/NotificationBar/AccessibiliteItems.ts +174 -0
  95. package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
  96. package/src/components/NotificationBar/options.ts +1 -0
  97. package/src/components/PageContainer/Accessibilite.mdx +14 -0
  98. package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
  99. package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
  100. package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
  101. package/src/components/PhoneField/PhoneField.vue +5 -5
  102. package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
  103. package/src/components/SkipLink/Accessibilite.mdx +14 -0
  104. package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
  105. package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
  106. package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
  107. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +17 -13
  108. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +2 -1
  109. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
  110. package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
  111. package/src/components/SubHeader/SubHeader.vue +1 -1
  112. package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
  113. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +438 -0
  114. package/src/components/UserMenuBtn/UserMenuBtn.vue +105 -0
  115. package/src/components/UserMenuBtn/config.ts +24 -0
  116. package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
  117. package/src/components/index.ts +12 -3
  118. package/src/composables/index.ts +8 -0
  119. package/src/composables/rules/tests/useFieldValidation.spec.ts +82 -0
  120. package/src/composables/rules/useFieldValidation.ts +53 -0
  121. package/src/designTokens/index.ts +2 -0
  122. package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
  123. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
  124. package/src/main.ts +2 -0
  125. package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
  126. package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
  127. package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
  128. package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
  129. package/src/stories/Fondamentaux/Elevations.mdx +14 -0
  130. package/src/stories/Fondamentaux/Espacements.mdx +29 -0
  131. package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
  132. package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
  133. package/src/stories/Fondamentaux/Typographie.mdx +58 -0
  134. package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +132 -0
  135. package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
  136. package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
  137. package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
  138. package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
  139. package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
  140. package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
  141. package/src/stories/Guidelines/Typo.mdx +0 -53
  142. /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
  143. /package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +0 -0
  144. /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
  145. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
  146. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
  147. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
  148. /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
  149. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
  150. /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
@@ -0,0 +1,52 @@
1
+ import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
2
+
3
+ export const AccessibiliteItemsIndeterminate = [
4
+ {
5
+ title: 'Catégorie 9 : Structuration de l’information',
6
+ subtitle: '9.1 Dans chaque page web, l’information est-elle structurée par l’utilisation appropriée de titres',
7
+ items: [
8
+ {
9
+
10
+ precision: '9.1.1 Dans chaque page web, la hiérarchie entre les titres (balise <hx> ou balise possédant un attribut WAI-ARIA role="heading" associé à un attribut WAI-ARIA aria-level) est-elle pertinente ?',
11
+ link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#9.1.1',
12
+ solution: [{
13
+ info1: '1. Retrouver dans le document les titres (balise <hx> ou balise possédant un attribut WAI-ARIA role="heading" associé à un attribut WAI-ARIA aria-level) ;',
14
+ info2: '2. Vérifier que la hiérarchie entre les titres est pertinente ;',
15
+ info3: '3. Si c’est le cas, le test est validé',
16
+ }],
17
+ expertise: ExpertiseLevelEnum.DEV,
18
+
19
+ },
20
+
21
+ ],
22
+ },
23
+
24
+ ]
25
+
26
+ export const AccessibiliteItemsValidated = [
27
+
28
+ {
29
+ title: 'Catégorie 3 : Couleurs',
30
+ subtitle: '3.2 Dans chaque page web, le contraste entre la couleur du texte et la couleur de son arrière-plan est-il suffisamment élevé?',
31
+ items: [
32
+ {
33
+
34
+ precision: '3.2.4 Dans chaque page web, le texte et le texte en image en gras d’une taille restituée supérieure ou égale à 18,5px vérifient-ils une de ces conditions ?'
35
+ + 'Le rapport de contraste entre le texte et son arrière-plan est de 3:1, au moins ; '
36
+ + 'Un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 3:1, au moins.',
37
+ link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.4',
38
+ solution: [{
39
+ info1: '1. Retrouver dans le document les textes et les textes en image en gras d’une taille restituée supérieure ou égale à 18,5px qui pourraient poser des problèmes de contraste ;',
40
+ info2: '2. Pour chacun de ces textes, vérifier que : '
41
+ + 'Soit le rapport de contraste entre le texte et son arrière-plan est de 3:1, au moins ; '
42
+ + 'Soit un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 3:1, au moins.',
43
+ info3: '3. Si c’est le cas pour chaque texte, le test est validé',
44
+ }],
45
+ expertise: ExpertiseLevelEnum.DESIGN,
46
+
47
+ },
48
+
49
+ ],
50
+ },
51
+
52
+ ]
@@ -0,0 +1,4 @@
1
+ export enum ExpertiseLevelEnum {
2
+ DEV = 'dev',
3
+ DESIGN = 'design',
4
+ }
@@ -7,8 +7,8 @@
7
7
  import { indicatifs } from './indicatifs'
8
8
  import { vMaska } from 'maska/vue'
9
9
  import { locales } from './locales'
10
- import CustomSelect from '@/components/Customs/CustomSelect/CustomSelect.vue'
11
- import CustomTextField from '@/components/Customs/CustomTextField/CustomTextField.vue'
10
+ import SySelect from '@/components/Customs/SySelect/SySelect.vue'
11
+ import SyTextField from '@/components/Customs/SyTextField/SyTextField.vue'
12
12
 
13
13
  type DisplayFormat = 'code' | 'code-abbreviation' | 'code-country' | 'country' | 'abbreviation'
14
14
  type Indicatif = {
@@ -142,7 +142,7 @@
142
142
 
143
143
  <template>
144
144
  <div class="phone-field-container">
145
- <CustomSelect
145
+ <SySelect
146
146
  v-if="props.withCountryCode"
147
147
  v-model="dialCode"
148
148
  :items="dialCodeOptions"
@@ -153,7 +153,7 @@
153
153
  class="custom-select"
154
154
  :outlined="outlinedIndicatif"
155
155
  />
156
- <CustomTextField
156
+ <SyTextField
157
157
  v-maska="phoneMask"
158
158
  :model-value="computedValue"
159
159
  :rules="validationRules"
@@ -178,7 +178,7 @@
178
178
  {{ mdiInformation }}
179
179
  </VIcon>
180
180
  </template>
181
- </CustomTextField>
181
+ </SyTextField>
182
182
  </div>
183
183
  </template>
184
184
 
@@ -9,7 +9,7 @@ const vuetify = createVuetify({
9
9
  components,
10
10
  directives,
11
11
  })
12
- describe('PhoneField.vue', () => {
12
+ describe('PhoneField', () => {
13
13
  it('renders correctly with default props', () => {
14
14
  const wrapper = mount(PhoneField, {
15
15
  global: {
@@ -44,14 +44,14 @@ describe('PhoneField.vue', () => {
44
44
  expect(wrapper.vm.computedValue).toBe('06 19 12 34 56')
45
45
  })
46
46
 
47
- it('renders CustomSelect when withCountryCode is true', () => {
47
+ it('renders SySelect when withCountryCode is true', () => {
48
48
  const wrapper = mount(PhoneField, {
49
49
  global: {
50
50
  plugins: [vuetify],
51
51
  },
52
52
  props: { withCountryCode: true },
53
53
  })
54
- expect(wrapper.findComponent({ name: 'CustomSelect' }).exists()).toBe(true)
54
+ expect(wrapper.findComponent({ name: 'SySelect' }).exists()).toBe(true)
55
55
  })
56
56
 
57
57
  it('validates country code when countryCodeRequired is true', async () => {
@@ -0,0 +1,14 @@
1
+ import { Meta, Story } from '@storybook/addon-docs';
2
+ import * as AccessStories from './Accessibilite.stories.ts';
3
+
4
+ <Meta of={AccessStories} />
5
+
6
+ Accessibilité
7
+ =============
8
+ <Story of={AccessStories.Legende} />
9
+ <br />
10
+
11
+ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12
+
13
+ <Story of={AccessStories.AccessibilitePanel} />
14
+ <br />
@@ -0,0 +1,167 @@
1
+ import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon } from 'vuetify/components'
2
+ import type { StoryObj } from '@storybook/vue3'
3
+ import { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated } from './AccessibiliteItems'
4
+ import { mdiCheckboxMarkedCircle, mdiLink, mdiEye } from '@mdi/js'
5
+
6
+ const checkIcon = mdiCheckboxMarkedCircle
7
+ const iconEye = mdiEye
8
+ const linkICon = mdiLink
9
+
10
+ export default {
11
+ title: 'Composants/Navigation/SkipLink/Accessibilité',
12
+ }
13
+
14
+ export const AccessibilitePanel: StoryObj = {
15
+
16
+ render: () => {
17
+ return {
18
+ components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon },
19
+
20
+ setup() {
21
+ const icon = checkIcon
22
+
23
+ return { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated, icon, linkICon, iconEye }
24
+ },
25
+ template: `
26
+ <div class="accessibiliteItems" style="display:flex; max-width: none !important;">
27
+ <v-col cols="6">
28
+ <div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
29
+ <h5>{{ AccessibiliteItemsIndeterminate.length }} critères à prendre en charge par le projet</h5>
30
+ <div style="display: flex; align-items: center;">
31
+ <v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
32
+ rounded>Tanaguru
33
+ </v-btn>
34
+ </div>
35
+ </div>
36
+
37
+ <v-expansion-panels value="opened" multiple>
38
+ <v-expansion-panel v-for="(item, index) in AccessibiliteItemsIndeterminate" :key="index" style="background-color: rgba(42, 96, 158, 0.1); margin-bottom: 10px;">
39
+ <v-expansion-panel-title>
40
+ <VIcon :icon="iconEye" style="margin-right: 5px; color:#5778b7;"/>
41
+ {{ item.title }}
42
+ </v-expansion-panel-title>
43
+ <v-expansion-panel-text>
44
+ <v-expansion-panels>
45
+ <v-expansion-panel>
46
+ <v-expansion-panel-title
47
+ style="font-weight: bold; font-size: 13px; line-height: 16px;">
48
+ {{ item.subtitle }}
49
+ </v-expansion-panel-title>
50
+ <v-expansion-panel-text>
51
+ <div v-for="(value, i) in item.items" :key="i">
52
+ <p style="font-size: 13px;line-height: 16px;">
53
+ {{ value.precision }}
54
+ </p>
55
+ <div v-for="element in value.solution"
56
+ style="margin-top:15px; font-size: 13px;line-height: 16px;">
57
+ <p style="font-weight: bold;">Méthodologie du test : <a
58
+ href="value.link" target="blank">
59
+ <VIcon :icon="linkICon"/>
60
+ </a></p>
61
+
62
+ <p>{{ element.info1 }}</p>
63
+ <p>{{ element.info2 }}</p>
64
+ <p>{{ element.info3 }}</p>
65
+
66
+ </div>
67
+ <span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
68
+ </div>
69
+ </v-expansion-panel-text>
70
+ </v-expansion-panel>
71
+ </v-expansion-panels>
72
+ </v-expansion-panel-text>
73
+ </v-expansion-panel>
74
+ </v-expansion-panels>
75
+ </v-col>
76
+ <v-col cols="6">
77
+ <div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
78
+ <h5>{{ AccessibiliteItemsValidated.length }} critères pris en charge par l'équipe Design System</h5>
79
+ <div style="display: flex; align-items: center;">
80
+ <v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
81
+ rounded>Tanaguru
82
+ </v-btn>
83
+ </div>
84
+ </div>
85
+ <v-expansion-panels v-if="AccessibiliteItemsValidated.length > 0" value="opened" multiple>
86
+ <v-expansion-panel
87
+ v-for="(item, index) in AccessibiliteItemsValidated"
88
+ :key="index" style="background-color: rgba(53,135,0,0.1); margin-bottom: 10px;">
89
+ <v-expansion-panel-title>
90
+ <VIcon color="green" :icon="icon" style="margin-right: 5px;"/>
91
+ {{ item.title }}
92
+ </v-expansion-panel-title>
93
+ <v-expansion-panel-text>
94
+ <v-expansion-panels>
95
+ <v-expansion-panel>
96
+ <v-expansion-panel-title style="font-weight: bold;font-size: 13px; line-height: 16px;">
97
+ {{ item.subtitle }}
98
+ </v-expansion-panel-title>
99
+ <v-expansion-panel-text>
100
+ <div v-for="(value, i) in item.items" :key="i">
101
+ <p style="font-size: 13px;line-height: 16px;">
102
+ {{ value.precision }}
103
+ </p>
104
+ <div v-for="element in value.solution"
105
+ style="margin-top:15px; font-size: 13px;line-height: 16px;">
106
+ <p style="font-weight: bold;">Méthodologie du test : <a
107
+ href="value.link" target="blank">
108
+ <VIcon :icon="linkICon"/>
109
+ </a></p>
110
+ <p>{{ element.info1 }}</p>
111
+ <p>{{ element.info2 }}</p>
112
+ <p>{{ element.info3 }}</p>
113
+ </div>
114
+ <span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
115
+ </div>
116
+ </v-expansion-panel-text>
117
+ </v-expansion-panel>
118
+ </v-expansion-panels>
119
+ </v-expansion-panel-text>
120
+ </v-expansion-panel>
121
+ </v-expansion-panels>
122
+ <div style="display: flex;justify-content: center;"><span style="text-align:center;" v-else >Pas de critère d'accessibilité bloquant</span></div>
123
+ </v-col>
124
+ </div>
125
+ `,
126
+ }
127
+ },
128
+ tags: ['!dev'],
129
+ }
130
+
131
+ export const Legende: StoryObj = {
132
+ args: {
133
+ icon: checkIcon,
134
+ },
135
+ render: (args) => {
136
+ return {
137
+ components: { VIcon },
138
+ setup() {
139
+ return { args }
140
+ },
141
+ template: `
142
+ <p style="color: grey;font-size: 11px; margin-bottom: 12px;">Date de conception: 20/11/2024</p>
143
+ <div>
144
+ <p>Le tableau ci-dessous liste nos recommandations suivant les <a target="blank" style="color:#0C41BD;" href="https://www.numerique.gouv.fr/publications/rgaa-accessibilite/#contenu">catégories du RGAA</a>.</p>
145
+ <p style="margin-bottom: 12px;font-weight:bold;">Pour rappel le composant seul ne garantie pas
146
+ l'accessibilité du site.</p>
147
+ <div style="font-size: 14px">
148
+ <p>Nous avons deux façons de relever les problèmes d'accessibilité des composants :</p>
149
+ <div>
150
+ <v-btn variant="tonal" color="grey" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
151
+ Audit
152
+ </v-btn>
153
+ Problèmes relevés par le projet
154
+ </div>
155
+ <div>
156
+ <v-btn variant="tonal" color="red" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
157
+ Tanaguru
158
+ </v-btn>
159
+ Problèmes relevés par Tanaguru
160
+ </div>
161
+ </div>
162
+ </div>
163
+ `,
164
+ }
165
+ },
166
+ tags: ['!dev'],
167
+ }
@@ -0,0 +1,77 @@
1
+ import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
2
+
3
+ export const AccessibiliteItemsIndeterminate = [
4
+ {
5
+ title: 'Catégorie 6 : Liens',
6
+ subtitle: ' 6.1 Chaque lien est-il explicite',
7
+ items: [
8
+ {
9
+
10
+ precision: ' 6.1.1 Chaque lien texte vérifie-t-il une de ces conditions (hors cas particuliers) ? '
11
+ + 'L’intitulé de lien seul permet d’en comprendre la fonction et la destination ; '
12
+ + 'L’intitulé de lien additionné au contexte du lien permet d’en comprendre la fonction et la destination.',
13
+ link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#6.1.1',
14
+ solution: [{
15
+ info1: '1. Retrouver dans le document les liens texte ;',
16
+ info2: '2. Pour chaque lien texte, vérifier que ce qui permet d’en comprendre la fonction et la destination est : '
17
+ + ' Soit l’intitulé du lien seul, soit le contexte du lien.',
18
+ info3: '3. Si c’est le cas pour chaque lien texte, le test est validé.',
19
+ }],
20
+ expertise: ExpertiseLevelEnum.DEV,
21
+
22
+ },
23
+
24
+ ],
25
+ },
26
+ {
27
+ title: 'Catégorie 10 : Présentation de l\'information',
28
+ subtitle: '10.8 Pour chaque page web, les contenus cachés ont-ils vocation à être ignorés par les technologies d’assistance',
29
+ items: [
30
+ {
31
+
32
+ precision: '10.8.1 Le contenu caché a vocation à être ignoré par les technologies d’assistance , il n’a pas vocation à être ignoré par les technologies d’assistance et est rendu restituable par les technologies d’assistance suite à une action de l’utilisateur réalisable au clavier ou par tout dispositif de pointage sur un élément précédent le contenu caché ou suite à un repositionnement du focus dessus',
33
+ link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#10.8.1',
34
+ solution: [{
35
+ info1: '1. Retrouver les contenus cachés (éléments pourvus de l’attribut hidden ou de l’attribut WAI-ARIA aria-hidden, ou bien d’une classe ou d’un ensemble de styles CSS susceptibles de masquer le contenu)',
36
+ info2: '2. Pour chaque contenu caché, vérifier que :'
37
+ + 'Soit le contenu caché a vocation à être ignoré par les technologies d’assistance (un élément statistique de visites par exemple) ;'
38
+ + 'Soit le contenu caché n’a pas vocation à être ignoré par les technologies d’assistance, et dans ce cas il est rendu restituable par les technologies d’assistance au moyen :'
39
+ + 'Soit d’une action de l’utilisateur réalisable au clavier ou par tout dispositif de pointage sur un élément précédent le contenu caché ;'
40
+ + 'Soit d’une fonction de programmation qui repositionne le focus sur le contenu',
41
+ info3: '3. Si c’est le cas pour chaque contenu caché, le test est validé',
42
+ }],
43
+ expertise: ExpertiseLevelEnum.DEV,
44
+
45
+ },
46
+
47
+ ],
48
+ },
49
+ {
50
+ title: 'Catégorie 12 : Navigation',
51
+ subtitle: '12.9 Dans chaque page web, la navigation ne doit pas contenir de piège au clavier. Cette règle est-elle respectée ?',
52
+ items: [
53
+ {
54
+
55
+ precision: '12.9.1 Dans chaque page web, chaque élément recevant le focus vérifie-t-il une de ces conditions ? '
56
+ + 'Il est possible d’atteindre l’élément suivant ou précédent pouvant recevoir le focus avec la touche de tabulation ;'
57
+ + 'L’utilisateur est informé d’un mécanisme fonctionnel permettant d’atteindre au clavier l’élément suivant ou précédent pouvant recevoir le focus.',
58
+ link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#12.9.1',
59
+ solution: [{
60
+ info1: '1. Retrouver dans le document l’ensemble des éléments d’interface susceptibles de recevoir le focus (au moyen de la tabulation ou au moyen d’un script) ;',
61
+ info2: '2. Pour chaque élément d’interface, vérifier que l’utilisateur peut atteindre l’élément suivant ou précédent pouvant recevoir le focus : '
62
+ + 'Soit au moyen de la touche de tabulation (Tab ou Maj+Tab) ;'
63
+ + 'Soit au moyen d’une autre interaction clavier dont l’utilisateur est informé (par exemple, les flèches de direction).',
64
+ info3: '3. Si c’est le cas pour chaque élément d’interface, le test est validé.',
65
+ }],
66
+ expertise: ExpertiseLevelEnum.DEV,
67
+
68
+ },
69
+
70
+ ],
71
+ },
72
+
73
+ ]
74
+
75
+ export const AccessibiliteItemsValidated = [
76
+
77
+ ]
@@ -0,0 +1,4 @@
1
+ export enum ExpertiseLevelEnum {
2
+ DEV = 'dev',
3
+ DESIGN = 'design',
4
+ }
@@ -6,7 +6,7 @@ import * as SocialMediaLinksStories from './SocialMediaLinks.stories.ts';
6
6
 
7
7
  # SocialMediaLinks
8
8
 
9
- Le composant `SocialMediaLinks` est utilisé pour afficher des liens de reseaux sociaux dans le componant `Footer`.
9
+ Le composant `SocialMediaLinks` est utilisé pour afficher des liens de réseaux sociaux dans le composant `Footer`.
10
10
 
11
11
  <Canvas of={SocialMediaLinksStories.Default} />
12
12
 
@@ -19,20 +19,24 @@ Le composant `SocialMediaLinks` est utilisé pour afficher des liens de reseaux
19
19
  <Source dark code={`
20
20
  <script setup lang="ts">
21
21
  import SocialMediaLinks from '@cnamts/synapse'
22
+ import { mdiFacebook, mdiLinkedin, mdiTwitter } from '@mdi/js'
22
23
 
23
24
  const links = [
24
- {
25
- name: 'Facebook',
26
- url: 'https://www.facebook.com/cnamts',
27
- },
28
- {
29
- name: 'Twitter',
30
- url: 'https://twitter.com/cnamts',
31
- },
32
- {
33
- name: 'Linkedin',
34
- url: 'https://www.linkedin.com/company/cnamts',
35
- }
25
+ {
26
+ icon: mdiLinkedin,
27
+ name: 'LinkedIn',
28
+ href: 'https://www.linkedin.com/company/assurance-maladie/',
29
+ },
30
+ {
31
+ icon: mdiFacebook,
32
+ name: 'Facebook',
33
+ href: 'https://twitter.com/Assur_Maladie',
34
+ },
35
+ {
36
+ icon: mdiTwitter,
37
+ name: 'Twitter',
38
+ href: 'https://twitter.com/Assur_Maladie',
39
+ },
36
40
  ]
37
41
  </script>
38
42
 
@@ -42,7 +42,7 @@ export const Default: Story = {
42
42
  {
43
43
  name: 'Template',
44
44
  code: `<template>
45
- <SocialMediaLinks :links=":links" />
45
+ <SocialMediaLinks :links="links" />
46
46
  </template>
47
47
  `,
48
48
  },
@@ -50,6 +50,7 @@ export const Default: Story = {
50
50
  name: 'Script',
51
51
  code: `<script setup lang="ts">
52
52
  import SocialMediaLinks from '@cnamts/synapse'
53
+ import { mdiFacebook, mdiLinkedin, mdiTwitter } from '@mdi/js'
53
54
 
54
55
  const links = [
55
56
  {
@@ -10,7 +10,7 @@ const vuetify = createVuetify({
10
10
  directives,
11
11
  })
12
12
 
13
- describe('SocialMediaLinks.vue', () => {
13
+ describe('SocialMediaLinks', () => {
14
14
  let wrapper: VueWrapper
15
15
 
16
16
  afterEach(() => {
@@ -1,12 +1,12 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`SocialMediaLinks.vue > renders correctly with default props 1`] = `
3
+ exports[`SocialMediaLinks > renders correctly with default props 1`] = `
4
4
  "<div data-v-9d3df26f="" class="d-flex flex-column"><span data-v-9d3df26f="" class="vd-social-media-links-label text-subtitle-2 text--primary">Suivez-nous :</span>
5
5
  <ul data-v-9d3df26f="" class="d-flex max-width-none"></ul>
6
6
  </div>"
7
7
  `;
8
8
 
9
- exports[`SocialMediaLinks.vue > renders correctly with provided links 1`] = `
9
+ exports[`SocialMediaLinks > renders correctly with provided links 1`] = `
10
10
  "<div data-v-9d3df26f="" class="d-flex flex-column"><span data-v-9d3df26f="" class="vd-social-media-links-label text-subtitle-2 text--primary">Suivez-nous :</span>
11
11
  <ul data-v-9d3df26f="" class="d-flex max-width-none">
12
12
  <li data-v-9d3df26f=""><a data-v-9d3df26f="" class="v-btn v-btn--icon v-theme--light v-btn--density-default v-btn--size-default v-btn--variant-text" href="https://twitter.com" id="social-btn-0" target="_blank" rel="noopener noreferrer" aria-label="Lien vers Twitter"><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
@@ -13,7 +13,7 @@
13
13
  import type { DataListActionEvent, DataListGroupItems } from '../DataListGroup/types'
14
14
 
15
15
  const props = withDefaults(defineProps<CustomizableOptions & Widthable & {
16
- hideBackBtn: boolean
16
+ hideBackBtn?: boolean
17
17
  backBtnText?: string
18
18
  titleText?: string
19
19
  subTitleText?: string
@@ -0,0 +1,35 @@
1
+ import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
2
+ import * as UserMenuBtnStories from './UserMenuBtn.stories';
3
+
4
+ <Meta of={UserMenuBtnStories}/>
5
+
6
+ # UserMenuBtn
7
+
8
+ The `UserMenuBtn` component is used to display a user menu button with a dropdown menu.
9
+
10
+ <Canvas of={UserMenuBtnStories.Default}/>
11
+
12
+ # API
13
+
14
+ <Controls of={UserMenuBtnStories.Default}/>
15
+
16
+ # Usage Example
17
+
18
+ <Source dark code={`
19
+ <script setup lang="ts">
20
+ import UserMenuBtn from './UserMenuBtn.vue';
21
+
22
+ const menuItems = [
23
+ { text: 'Administration', value: 'Administration' },
24
+ { text: 'Profil', value: 'Profil' },
25
+ { text: 'Paramètres', value: 'Paramètres' },
26
+ ];
27
+ </script>
28
+
29
+ <template>
30
+ <UserMenuBtn
31
+ :items="menuItems"
32
+ />
33
+ </template>
34
+ `}
35
+ />