@cnamts/synapse 1.0.20 → 1.0.21

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 (135) hide show
  1. package/dist/{DateFilter-XURUmpMl.js → DateFilter-uN8OURoP.js} +1 -1
  2. package/dist/{NumberFilter-BZc0O8wV.js → NumberFilter-sm1dQNQi.js} +1 -1
  3. package/dist/{PeriodFilter-ZNdXcl3p.js → PeriodFilter-Cklsxnh9.js} +1 -1
  4. package/dist/{SelectFilter-DshYU5OK.js → SelectFilter-CWefj27Z.js} +1 -1
  5. package/dist/{TextFilter-D_c5dRPl.js → TextFilter-Ddyj885L.js} +1 -1
  6. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
  7. package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
  8. package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
  9. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
  10. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
  11. package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
  12. package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
  13. package/dist/components/ErrorPage/locales.d.ts +18 -3
  14. package/dist/components/FileUpload/FileUpload.d.ts +2 -0
  15. package/dist/components/MaintenancePage/locales.d.ts +18 -2
  16. package/dist/components/NotFoundPage/locales.d.ts +20 -4
  17. package/dist/components/StatusPage/StatusPage.d.ts +39 -0
  18. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
  19. package/dist/components/index.d.ts +3 -0
  20. package/dist/design-system-v3.js +126 -123
  21. package/dist/design-system-v3.umd.cjs +163 -163
  22. package/dist/{main-CuI6xaPq.js → main-CWniLr0s.js} +15191 -14668
  23. package/dist/style.css +1 -1
  24. package/dist/utils/theme/index.d.ts +6 -0
  25. package/package.json +7 -4
  26. package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
  27. package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +67 -11
  28. package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
  29. package/src/components/CookieBanner/CookieBanner.vue +20 -5
  30. package/src/components/CookieBanner/accessibilite/Accessibility.mdx +67 -11
  31. package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
  32. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
  33. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
  34. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
  35. package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
  36. package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
  37. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
  38. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
  39. package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
  40. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
  41. package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +1 -1
  42. package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
  43. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
  44. package/src/components/DatePicker/CalendarMode/DatePicker.vue +35 -11
  45. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
  46. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
  47. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
  48. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
  49. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
  50. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
  51. package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
  52. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
  53. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
  54. package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
  55. package/src/components/ErrorPage/ErrorPage.mdx +6 -16
  56. package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
  57. package/src/components/ErrorPage/ErrorPage.vue +38 -125
  58. package/src/components/ErrorPage/accessibilite/Accessibility.mdx +68 -6
  59. package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
  60. package/src/components/ErrorPage/locales.ts +21 -3
  61. package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
  62. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
  63. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
  64. package/src/components/FileUpload/FileUpload.vue +5 -0
  65. package/src/components/FooterBar/FooterBar.stories.ts +18 -14
  66. package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
  67. package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
  68. package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
  69. package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +61 -6
  70. package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
  71. package/src/components/MaintenancePage/locales.ts +24 -3
  72. package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
  73. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
  74. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
  75. package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
  76. package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
  77. package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
  78. package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +78 -6
  79. package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
  80. package/src/components/NotFoundPage/locales.ts +24 -4
  81. package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
  82. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
  83. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
  84. package/src/components/NotificationBar/NotificationBar.mdx +2 -2
  85. package/src/components/NotificationBar/accessibilite/Accessibility.mdx +68 -8
  86. package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
  87. package/src/components/PhoneField/PhoneField.stories.ts +46 -38
  88. package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
  89. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
  90. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
  91. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
  92. package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +63 -11
  93. package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
  94. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
  95. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
  96. package/src/components/StatusPage/StatusPage.mdx +22 -0
  97. package/src/components/StatusPage/StatusPage.stories.ts +193 -0
  98. package/src/components/StatusPage/StatusPage.vue +145 -0
  99. package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
  100. package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
  101. package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
  102. package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
  103. package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
  104. package/src/components/TableToolbar/TableToolbar.vue +1 -1
  105. package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
  106. package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
  107. package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
  108. package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
  109. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
  110. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
  111. package/src/components/UploadWorkflow/useFileList.ts +7 -0
  112. package/src/components/index.ts +3 -0
  113. package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
  114. package/src/composables/rules/useFieldValidation.ts +24 -9
  115. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
  116. package/src/utils/theme/index.ts +19 -0
  117. package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
  118. package/dist/components/MaintenancePage/index.d.ts +0 -2
  119. package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
  120. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
  121. package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
  122. package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
  123. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
  124. package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
  125. package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
  126. package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
  127. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
  128. package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
  129. package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
  130. package/src/components/MaintenancePage/index.ts +0 -3
  131. package/src/components/PageContainer/Accessibilite/AccessibilityGuide.mdx +0 -0
  132. package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
  133. package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
  134. /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
  135. /package/src/components/PageContainer/{Accessibilite → accessibilite}/Accessibility.mdx +0 -0
@@ -1,5 +1,23 @@
1
+ import imgUrlAp from './assets/error-ap.svg'
2
+
1
3
  export const locales = {
2
- errorCodeText: 'Code d\'erreur\xa0: ',
3
- supportIdMessage: 'Votre identifiant de support\xa0:',
4
- btnText: 'Retour à l’accueil',
4
+ default: {
5
+ pageTitle: 'Une erreur est survenue',
6
+ message: 'Une erreur est survenue de notre côté, veuillez réessayer plus tard.',
7
+ src: undefined,
8
+ code: '500',
9
+ },
10
+ cnam: {
11
+ pageTitle: 'Une erreur est survenue',
12
+ message: 'Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646',
13
+ src: undefined,
14
+ code: '500',
15
+ },
16
+ ap: {
17
+ pageTitle: 'Les services amelipro sont indisponibles !',
18
+ message:
19
+ 'Nous mettons en œuvre les mesures nécessaires pour rétablir rapidement votre accès. Veuillez nous excuser pour la gêne occasionnée.',
20
+ src: imgUrlAp,
21
+ code: '500',
22
+ },
5
23
  }
@@ -6,23 +6,15 @@ import { axe } from 'vitest-axe'
6
6
  import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
7
7
  import ErrorPage from '../ErrorPage.vue'
8
8
 
9
- // Scénario d’accessibilité : page derreur avec titre, message, code
10
- // et bouton de retour vers la page d’accueil.
9
+ // Scénario d’accessibilité : page d'erreur basée sur StatusPage,
10
+ // sans bouton d’action, avec illustration décorative masquée.
11
11
 
12
12
  describe('ErrorPage – accessibility (axe)', () => {
13
- it('has no obvious axe violations with title, message and action button', async () => {
14
- const wrapper = mount(ErrorPage, {
15
- props: {
16
- pageTitle: 'Une erreur est survenue',
17
- message: 'Un problème technique est survenu. Merci de réessayer plus tard.',
18
- code: '500',
19
- btnText: 'Retour à l\'accueil',
20
- btnHref: 'https://www.ameli.fr',
21
- },
22
- })
13
+ it('has no obvious axe violations in default state', async () => {
14
+ const wrapper = mount(ErrorPage)
23
15
 
24
16
  const results = await axe(wrapper.element as HTMLElement)
25
- assertNoA11yViolations(results, 'ErrorPage – default error page', {
17
+ assertNoA11yViolations(results, 'ErrorPage – default state', {
26
18
  ignoreRules: ['region'],
27
19
  })
28
20
  })
@@ -1,50 +1,11 @@
1
1
  import { describe, it, expect } from 'vitest'
2
- import { mount } from '@vue/test-utils'
2
+ import { shallowMount } from '@vue/test-utils'
3
3
  import ErrorPage from '../ErrorPage.vue'
4
4
 
5
5
  describe('ErrorPage', () => {
6
6
  it('renders correctly', () => {
7
- const wrapper = mount(ErrorPage, {
8
- props: {
9
- pageTitle: 'Something went wrong',
10
- message: 'Error message',
11
- },
12
- })
7
+ const wrapper = shallowMount(ErrorPage)
13
8
 
14
- expect(wrapper.text()).toContain('Something went wrong')
15
- expect(wrapper.text()).toContain('Error message')
16
9
  expect(wrapper.html()).toMatchSnapshot()
17
10
  })
18
-
19
- it('renders correctly with undefined route', () => {
20
- const wrapper = mount(ErrorPage, {
21
- props: {
22
- code: '501',
23
- pageTitle: 'Error',
24
- message: 'Error message',
25
- btnText: 'Go to...',
26
- btnHref: 'https://google.com',
27
- },
28
- })
29
-
30
- expect(wrapper.find('a').exists()).toBe(true)
31
- expect(wrapper.html()).toMatchSnapshot()
32
- })
33
-
34
- it('uses href without router navigation when only btnHref is provided', () => {
35
- const wrapper = mount(ErrorPage, {
36
- props: {
37
- code: '401',
38
- pageTitle: 'Auth error',
39
- message: 'You are not authorized',
40
- btnText: 'Logout',
41
- btnHref: 'https://google.com',
42
- },
43
- })
44
-
45
- const link = wrapper.find('a')
46
- expect(link.exists()).toBe(true)
47
- expect(link.attributes('href')).toBe('https://google.com')
48
- expect(link.attributes('to')).toBeUndefined()
49
- })
50
11
  })
@@ -1,270 +1,12 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`ErrorPage > renders correctly 1`] = `
4
- <div class="
5
- d-flex
6
- justify-center
7
- px-14
8
- py-10
9
- vd-page-container
10
- ">
11
- <div
12
- class="
13
- bg-transparent
14
- v-sheet
15
- v-theme--light
16
- "
17
- style="width: 800px;"
18
- >
19
- <div class="
20
- elevation-0
21
- pa-6
22
- pa-sm-16
23
- v-card
24
- v-card--density-default
25
- v-card--variant-elevated
26
- v-theme--light
27
- ">
28
- <!---->
29
- <div class="v-card__loader">
30
- <div
31
- aria-hidden="true"
32
- aria-valuemax="100"
33
- aria-valuemin="0"
34
- class="
35
- v-locale--is-ltr
36
- v-progress-linear
37
- v-theme--light
38
- "
39
- role="progressbar"
40
- style="
41
- top: 0px;
42
- height: 0px;
43
- --v-progress-linear-height: 2px;
44
- "
45
- >
46
- <!---->
47
- <div
48
- class="v-progress-linear__background"
49
- style="opacity: NaN;"
50
- ></div>
51
- <div
52
- class="v-progress-linear__buffer"
53
- style="
54
- opacity: NaN;
55
- width: 0%;
56
- "
57
- ></div>
58
- <transition-stub
59
- appear="false"
60
- css="true"
61
- name="fade-transition"
62
- persisted="false"
63
- >
64
- <div class="v-progress-linear__indeterminate">
65
- <div class="
66
- long
67
- v-progress-linear__indeterminate
68
- "></div>
69
- <div class="
70
- short
71
- v-progress-linear__indeterminate
72
- "></div>
73
- </div>
74
- </transition-stub>
75
- <!---->
76
- </div>
77
- </div>
78
- <!---->
79
- <!---->
80
- <div class="
81
- max-width-none
82
- v-row
83
- ">
84
- <div class="
85
- align-sm-start
86
- d-flex
87
- flex-column
88
- justify-center
89
- order-last
90
- order-sm-first
91
- text-center
92
- text-sm-left
93
- v-col-12
94
- v-col-sm-12
95
- ">
96
- <!-- v-if -->
97
- <h1 class="
98
- font-weight-bold
99
- mb-2
100
- mb-4
101
- text-h5
102
- ">
103
- Something went wrong
104
- </h1>
105
- <p>
106
- <span>
107
- Error message
108
- </span>
109
- </p>
110
- <!-- v-if -->
111
- </div>
112
- <!-- v-if -->
113
- </div>
114
- <!---->
115
- <!---->
116
- <span class="v-card__underlay"></span>
117
- </div>
118
- </div>
119
- </div>
120
- `;
121
-
122
- exports[`ErrorPage > renders correctly with undefined route 1`] = `
123
- <div class="
124
- d-flex
125
- justify-center
126
- px-14
127
- py-10
128
- vd-page-container
129
- ">
130
- <div
131
- class="
132
- bg-transparent
133
- v-sheet
134
- v-theme--light
135
- "
136
- style="width: 800px;"
137
- >
138
- <div class="
139
- elevation-0
140
- pa-6
141
- pa-sm-16
142
- v-card
143
- v-card--density-default
144
- v-card--variant-elevated
145
- v-theme--light
146
- ">
147
- <!---->
148
- <div class="v-card__loader">
149
- <div
150
- aria-hidden="true"
151
- aria-valuemax="100"
152
- aria-valuemin="0"
153
- class="
154
- v-locale--is-ltr
155
- v-progress-linear
156
- v-theme--light
157
- "
158
- role="progressbar"
159
- style="
160
- top: 0px;
161
- height: 0px;
162
- --v-progress-linear-height: 2px;
163
- "
164
- >
165
- <!---->
166
- <div
167
- class="v-progress-linear__background"
168
- style="opacity: NaN;"
169
- ></div>
170
- <div
171
- class="v-progress-linear__buffer"
172
- style="
173
- opacity: NaN;
174
- width: 0%;
175
- "
176
- ></div>
177
- <transition-stub
178
- appear="false"
179
- css="true"
180
- name="fade-transition"
181
- persisted="false"
182
- >
183
- <div class="v-progress-linear__indeterminate">
184
- <div class="
185
- long
186
- v-progress-linear__indeterminate
187
- "></div>
188
- <div class="
189
- short
190
- v-progress-linear__indeterminate
191
- "></div>
192
- </div>
193
- </transition-stub>
194
- <!---->
195
- </div>
196
- </div>
197
- <!---->
198
- <!---->
199
- <div class="
200
- max-width-none
201
- v-row
202
- ">
203
- <div class="
204
- align-sm-start
205
- d-flex
206
- flex-column
207
- justify-center
208
- order-last
209
- order-sm-first
210
- text-center
211
- text-sm-left
212
- v-col-12
213
- v-col-sm-12
214
- ">
215
- <div class="
216
- mb-4
217
- sy-code
218
- text-primary
219
- ">
220
- <span class="d-sr-only">
221
- Code d'erreur&nbsp;:
222
- </span>
223
- 501
224
- </div>
225
- <h1 class="
226
- font-weight-bold
227
- mb-2
228
- mb-4
229
- text-h5
230
- ">
231
- Error
232
- </h1>
233
- <p>
234
- <span>
235
- Error message
236
- </span>
237
- </p>
238
- <a
239
- class="
240
- bg-primary
241
- mt-6
242
- v-btn
243
- v-btn--density-default
244
- v-btn--elevated
245
- v-btn--size-default
246
- v-btn--variant-elevated
247
- v-theme--light
248
- "
249
- href="https://google.com"
250
- ><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
251
-
252
- <!----><span
253
- class="v-btn__content"
254
- data-no-activator=""
255
- >Go to...</span>
256
-
257
- <!---->
258
-
259
- <!---->
260
- </a>
261
- </div>
262
- <!-- v-if -->
263
- </div>
264
- <!---->
265
- <!---->
266
- <span class="v-card__underlay"></span>
267
- </div>
268
- </div>
269
- </div>
4
+ <status-page-stub
5
+ btnlink="/"
6
+ code="500"
7
+ codeerrortext="Code d'erreur : "
8
+ hidebtn="false"
9
+ message="Une erreur est survenue de notre côté, veuillez réessayer plus tard."
10
+ pagetitle="Une erreur est survenue"
11
+ ></status-page-stub>
270
12
  `;
@@ -40,8 +40,13 @@
40
40
  const fileList = ref<File[]>([])
41
41
  const isDarkMode = useTheme().current.value.dark
42
42
 
43
+ function openFileDialog() {
44
+ fileInput.value?.click()
45
+ }
46
+
43
47
  defineExpose({
44
48
  fileInput,
49
+ openFileDialog,
45
50
  })
46
51
 
47
52
  watch(() => props.modelValue, (value) => {
@@ -2,7 +2,9 @@ import FooterBar from '../FooterBar/FooterBar.vue'
2
2
  import Logo from '../Logo/Logo.vue'
3
3
  import CollapsibleList from '../CollapsibleList/CollapsibleList.vue'
4
4
  import type { Meta, StoryObj } from '@storybook/vue3'
5
- import { mdiTwitter, mdiLinkedin, mdiFacebook, mdiYoutube } from '@mdi/js'
5
+ import { mdiLinkedin, mdiFacebook, mdiYoutube } from '@mdi/js'
6
+
7
+ const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
6
8
 
7
9
  const items = [
8
10
  {
@@ -246,9 +248,9 @@ export const Default: Story = {
246
248
  href: 'https://www.facebook.com',
247
249
  },
248
250
  {
249
- icon: mdiTwitter,
250
- name: 'Twitter',
251
- href: 'https://www.twitter.com',
251
+ icon: xIcon,
252
+ name: 'X',
253
+ href: 'https://x.com',
252
254
  },
253
255
  {
254
256
  icon: mdiLinkedin,
@@ -944,7 +946,9 @@ export const customSocialMediaLinks: Story = {
944
946
  name: 'Script',
945
947
  code: `<script setup lang="ts">
946
948
  import { FooterBar } from '@cnamts/synapse'
947
- import { mdiFacebook, mdiTwitter, mdiLinkedin, mdiYoutube } from '@mdi/js'
949
+ import { mdiFacebook, mdiLinkedin, mdiYoutube } from '@mdi/js'
950
+
951
+ const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
948
952
 
949
953
  const items = [
950
954
  {
@@ -972,8 +976,8 @@ export const customSocialMediaLinks: Story = {
972
976
  href: 'https://www.facebook.com',
973
977
  },
974
978
  {
975
- icon: mdiTwitter,
976
- name: 'Twitter',
979
+ icon: xIcon,
980
+ name: 'X',
977
981
  href: 'https://www.twitter.com',
978
982
  },
979
983
  {
@@ -996,21 +1000,21 @@ export const customSocialMediaLinks: Story = {
996
1000
  args: {
997
1001
  items: items,
998
1002
  socialMediaLinks: [
1003
+ {
1004
+ icon: mdiLinkedin,
1005
+ name: 'LinkedIn',
1006
+ href: 'https://www.linkedin.com',
1007
+ },
999
1008
  {
1000
1009
  icon: mdiFacebook,
1001
1010
  name: 'Facebook',
1002
1011
  href: 'https://www.facebook.com',
1003
1012
  },
1004
1013
  {
1005
- icon: mdiTwitter,
1006
- name: 'Twitter',
1014
+ icon: xIcon,
1015
+ name: 'X',
1007
1016
  href: 'https://www.twitter.com',
1008
1017
  },
1009
- {
1010
- icon: mdiLinkedin,
1011
- name: 'LinkedIn',
1012
- href: 'https://www.linkedin.com',
1013
- },
1014
1018
  {
1015
1019
  icon: mdiYoutube,
1016
1020
  name: 'YouTube',
@@ -1,7 +1,9 @@
1
- import { mdiTwitter, mdiLinkedin, mdiFacebook } from '@mdi/js'
1
+ import { mdiLinkedin, mdiFacebook } from '@mdi/js'
2
2
 
3
3
  import type { SocialMediaLink } from '@/components/SocialMediaLinks/types'
4
4
 
5
+ const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
6
+
5
7
  export const defaultSocialMediaLinks: SocialMediaLink[] = [
6
8
  {
7
9
  icon: mdiLinkedin,
@@ -14,8 +16,8 @@ export const defaultSocialMediaLinks: SocialMediaLink[] = [
14
16
  href: 'https://www.facebook.com/AssurMaladie/',
15
17
  },
16
18
  {
17
- icon: mdiTwitter,
18
- name: 'Twitter',
19
- href: 'https://twitter.com/Assur_Maladie',
19
+ icon: xIcon,
20
+ name: 'X',
21
+ href: 'https://x.com/Assur_Maladie',
20
22
  },
21
23
  ]
@@ -7,7 +7,7 @@ import * as MaintenancePageStories from "./MaintenancePage.stories";
7
7
  <div className="header">
8
8
  <h1>MaintenancePage</h1>
9
9
  <p>Le composant `MaintenancePage` permet d'afficher une page de maintenance.
10
- Il est basé sur le composant `ErrorPage` du design system.</p>
10
+ Il est basé sur le composant `StatusPage` du design system.</p>
11
11
  </div>
12
12
 
13
13
  <Canvas of={MaintenancePageStories.Default} />
@@ -1,24 +1,32 @@
1
1
  <script setup lang="ts">
2
+ import StatusPage from '../StatusPage/StatusPage.vue'
2
3
  import { locales } from './locales'
3
- import ErrorPage from '../ErrorPage/ErrorPage.vue'
4
+ import { useThemeLocales } from '@/utils/theme'
5
+
6
+ const { themeLocales } = useThemeLocales(locales)
4
7
  </script>
5
8
 
6
9
  <template>
7
- <ErrorPage
8
- :page-title="locales.pageTitle"
9
- :message="locales.message"
10
+ <StatusPage
11
+ :page-title="themeLocales.pageTitle"
12
+ :message="themeLocales.message"
13
+ :code="themeLocales.code"
10
14
  :hide-btn="true"
11
15
  >
12
- <template #illustration>
16
+ <template
17
+ v-if="themeLocales.src || $slots.illustration"
18
+ #illustration
19
+ >
13
20
  <slot name="illustration">
14
21
  <img
15
- src="./assets/maintenance.svg"
22
+ v-if="themeLocales.src"
23
+ :src="themeLocales.src"
16
24
  alt=""
17
25
  aria-hidden="true"
18
26
  >
19
27
  </slot>
20
28
  </template>
21
- </ErrorPage>
29
+ </StatusPage>
22
30
  </template>
23
31
 
24
32
  <style lang="scss" scoped>
@@ -1,15 +1,70 @@
1
1
  import { Meta, Story } from '@storybook/addon-docs';
2
2
  import * as Stories from '../MaintenancePage.stories.ts';
3
+ import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
3
4
  import '@/stories/styles/shared.css';
5
+ import {
6
+ AccessibilityGuideLayout,
7
+ CriteriaSection,
8
+ CriteriaCard,
9
+ DemoSection,
10
+ BestPracticesSection,
11
+ ResourcesSection,
12
+ } from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
4
13
 
5
14
  <Meta of={Stories} />
6
15
 
7
- <div className="header">
8
- <h1>Accessibilité</h1>
16
+ <AccessibilityGuideLayout
17
+ componentName="MaintenancePage"
18
+ iconSrc={AccessibilityIcon}
19
+ >
20
+
21
+ <div class="mt-2">
22
+ <p>Rapport d'audit manuel : <a href="/audits/MaintenancePage.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
23
+ <p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/653" target="_blank" style={{color:'#0C41BD'}}>issue #653</a>)</p>
9
24
  </div>
10
25
 
26
+ <CriteriaSection>
27
+ <CriteriaCard icon="🔍" title="Structure sémantique">
28
+ <ul>
29
+ <li><strong>Titre de page</strong> : rendu dans une balise <code>h1</code> via <code>StatusPage</code>, sa valeur provient des locales du thème via <code>useThemeLocales</code></li>
30
+ <li><strong>Code d'erreur</strong> : le code est précédé du texte masqué visuellement <code>codeErrorText</code> (par défaut <em>"Code d'erreur : "</em>) pour les lecteurs d'écran</li>
31
+ <li><strong>Valeurs par défaut</strong> : <code>pageTitle</code>, <code>message</code> et <code>code</code> proviennent des locales du thème via <code>useThemeLocales</code></li>
32
+ </ul>
33
+ </CriteriaCard>
11
34
 
12
- <div class="mt-2">
13
- <p>Rapport d’audit manuel : <a href="/audits/MaintenancePage.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
14
- <p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/653" target="_blank" style={{color:'#0C41BD'}}>issue #653</a>)</p>
15
- </div>
35
+ <CriteriaCard icon="🔗" title="Navigation">
36
+ <ul>
37
+ <li><strong>Bouton masqué par défaut</strong> : la prop <code>hide-btn</code> est fixée à <code>true</code> la page de maintenance ne propose pas de navigation vers une autre page</li>
38
+ <li><strong>Pas de lien de retour</strong> : intentionnel car l'application est indisponible, évitant ainsi de rediriger vers une page inaccessible</li>
39
+ </ul>
40
+ </CriteriaCard>
41
+
42
+ <CriteriaCard icon="🖼️" title="Illustration">
43
+ <ul>
44
+ <li><strong>Image décorative</strong> : l'illustration par défaut possède <code>alt=""</code> et <code>aria-hidden="true"</code> car elle est purement décorative</li>
45
+ <li><strong>Source thémable</strong> : l'image source provient des locales du thème via <code>useThemeLocales</code></li>
46
+ <li><strong>Slot <code>#illustration</code></strong> : si une illustration personnalisée est fournie, les mêmes règles d'accessibilité s'appliquent</li>
47
+ <li><strong>Mise en page adaptive</strong> : la colonne illustration n'est affichée que si <code>src</code> ou le slot <code>#illustration</code> est fourni</li>
48
+ </ul>
49
+ </CriteriaCard>
50
+ </CriteriaSection>
51
+
52
+ <BestPracticesSection>
53
+ <ul>
54
+ <li>Les valeurs par défaut de <code>page-title</code>, <code>message</code> et <code>code</code> proviennent du thème — les surcharger uniquement si le contexte métier le nécessite</li>
55
+ <li>Ne pas afficher de bouton de retour (<code>hide-btn="true"</code> par défaut) — l'application étant indisponible, un lien de retour serait inutile voire trompeur</li>
56
+ <li>Les illustrations doivent toujours être décoratives (<code>aria-hidden="true"</code>) — ne jamais y placer d'information essentielle</li>
57
+ <li>Le slot <code>#illustration</code> personnalisé doit respecter les mêmes règles : <code>alt=""</code> et <code>aria-hidden="true"</code> si l'image est décorative</li>
58
+ </ul>
59
+ </BestPracticesSection>
60
+
61
+ <ResourcesSection>
62
+ <ul>
63
+ <li><a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html" target="_blank" style={{ color: '#0C41BD' }}>WCAG 1.3.1 – Info and Relationships</a></li>
64
+ <li><a href="https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-in-context.html" target="_blank" style={{ color: '#0C41BD' }}>WCAG 2.4.4 – Link Purpose</a></li>
65
+ <li><a href="https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html" target="_blank" style={{ color: '#0C41BD' }}>WCAG 1.1.1 – Non-text Content</a></li>
66
+ <li><a href="https://www.w3.org/WAI/ARIA/apg/patterns/" target="_blank" style={{ color: '#0C41BD' }}>ARIA Authoring Practices Guide</a></li>
67
+ </ul>
68
+ </ResourcesSection>
69
+
70
+ </AccessibilityGuideLayout>