@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.
- package/dist/{DateFilter-XURUmpMl.js → DateFilter-uN8OURoP.js} +1 -1
- package/dist/{NumberFilter-BZc0O8wV.js → NumberFilter-sm1dQNQi.js} +1 -1
- package/dist/{PeriodFilter-ZNdXcl3p.js → PeriodFilter-Cklsxnh9.js} +1 -1
- package/dist/{SelectFilter-DshYU5OK.js → SelectFilter-CWefj27Z.js} +1 -1
- package/dist/{TextFilter-D_c5dRPl.js → TextFilter-Ddyj885L.js} +1 -1
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
- package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
- package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
- package/dist/components/ErrorPage/locales.d.ts +18 -3
- package/dist/components/FileUpload/FileUpload.d.ts +2 -0
- package/dist/components/MaintenancePage/locales.d.ts +18 -2
- package/dist/components/NotFoundPage/locales.d.ts +20 -4
- package/dist/components/StatusPage/StatusPage.d.ts +39 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
- package/dist/components/index.d.ts +3 -0
- package/dist/design-system-v3.js +126 -123
- package/dist/design-system-v3.umd.cjs +163 -163
- package/dist/{main-CuI6xaPq.js → main-CWniLr0s.js} +15191 -14668
- package/dist/style.css +1 -1
- package/dist/utils/theme/index.d.ts +6 -0
- package/package.json +7 -4
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
- package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +67 -11
- package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
- package/src/components/CookieBanner/CookieBanner.vue +20 -5
- package/src/components/CookieBanner/accessibilite/Accessibility.mdx +67 -11
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
- package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
- package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
- package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +1 -1
- package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +35 -11
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
- package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
- package/src/components/ErrorPage/ErrorPage.mdx +6 -16
- package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
- package/src/components/ErrorPage/ErrorPage.vue +38 -125
- package/src/components/ErrorPage/accessibilite/Accessibility.mdx +68 -6
- package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
- package/src/components/ErrorPage/locales.ts +21 -3
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
- package/src/components/FileUpload/FileUpload.vue +5 -0
- package/src/components/FooterBar/FooterBar.stories.ts +18 -14
- package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
- package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
- package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
- package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +61 -6
- package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
- package/src/components/MaintenancePage/locales.ts +24 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
- package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
- package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
- package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +78 -6
- package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
- package/src/components/NotFoundPage/locales.ts +24 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/accessibilite/Accessibility.mdx +68 -8
- package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
- package/src/components/PhoneField/PhoneField.stories.ts +46 -38
- package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
- package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +63 -11
- package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
- package/src/components/StatusPage/StatusPage.mdx +22 -0
- package/src/components/StatusPage/StatusPage.stories.ts +193 -0
- package/src/components/StatusPage/StatusPage.vue +145 -0
- package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
- package/src/components/TableToolbar/TableToolbar.vue +1 -1
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
- package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
- package/src/components/UploadWorkflow/useFileList.ts +7 -0
- package/src/components/index.ts +3 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
- package/src/composables/rules/useFieldValidation.ts +24 -9
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
- package/src/utils/theme/index.ts +19 -0
- package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
- package/dist/components/MaintenancePage/index.d.ts +0 -2
- package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
- package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
- package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
- package/src/components/MaintenancePage/index.ts +0 -3
- package/src/components/PageContainer/Accessibilite/AccessibilityGuide.mdx +0 -0
- package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
- /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
- /package/src/components/PageContainer/{Accessibilite → accessibilite}/Accessibility.mdx +0 -0
|
@@ -8,47 +8,54 @@ const meta = {
|
|
|
8
8
|
component: PhoneField,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'fullscreen',
|
|
11
|
+
actions: {
|
|
12
|
+
handles: ['update:modelValue', 'update:selectedDialCode', 'update:dialCodeModel', 'change'],
|
|
13
|
+
},
|
|
11
14
|
controls: { exclude: ['computedValue', 'phoneMask', 'counter', 'hasError', 'phoneNumber', 'mergedDialCodes'] },
|
|
12
15
|
},
|
|
13
16
|
argTypes: {
|
|
14
|
-
modelValue: { control: false },
|
|
15
|
-
dialCodeModel: { control: false },
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
'modelValue': { control: false },
|
|
18
|
+
'dialCodeModel': { control: false },
|
|
19
|
+
'onUpdate:modelValue': { action: 'update:modelValue' },
|
|
20
|
+
'onUpdate:selectedDialCode': { action: 'update:selectedDialCode' },
|
|
21
|
+
'onUpdate:dialCodeModel': { action: 'update:dialCodeModel' },
|
|
22
|
+
'onChange': { action: 'change' },
|
|
23
|
+
'required': { control: 'boolean' },
|
|
24
|
+
'outlined': { control: 'boolean' },
|
|
25
|
+
'outlinedIndicatif': { control: 'boolean' },
|
|
26
|
+
'withCountryCode': { control: 'boolean' },
|
|
27
|
+
'countryCodeRequired': { control: 'boolean' },
|
|
28
|
+
'displayFormat': {
|
|
22
29
|
control: { type: 'select' },
|
|
23
30
|
description: 'Format d\'affichage des items',
|
|
24
31
|
options: ['code', 'code-abbreviation', 'code-country', 'country', 'abbreviation'],
|
|
25
32
|
},
|
|
26
|
-
customIndicatifs: {
|
|
33
|
+
'customIndicatifs': {
|
|
27
34
|
control: 'object',
|
|
28
35
|
description: 'Permet d\'ajouter des indicatifs à la liste pre-existante',
|
|
29
36
|
},
|
|
30
|
-
useCustomIndicatifsOnly: {
|
|
37
|
+
'useCustomIndicatifsOnly': {
|
|
31
38
|
control: 'boolean',
|
|
32
39
|
description: 'Permet d\'utiliser uniquement les indicatifs que vous renseignez dans la props customIndicatifs',
|
|
33
40
|
},
|
|
34
|
-
helpText: {
|
|
41
|
+
'helpText': {
|
|
35
42
|
control: 'text',
|
|
36
43
|
description: 'Texte d\'aide affiché sous le champ. Lorsque présent, les messages d\'erreur incluent un exemple concret distinct du texte d\'aide.',
|
|
37
44
|
},
|
|
38
|
-
autocompleteCountryCode: {
|
|
45
|
+
'autocompleteCountryCode': {
|
|
39
46
|
control: 'text',
|
|
40
47
|
description: 'Valeur de l\'attribut autocomplete pour le champ indicatif pays (par défaut: "tel-country-code")',
|
|
41
48
|
},
|
|
42
|
-
autocompletePhone: {
|
|
49
|
+
'autocompletePhone': {
|
|
43
50
|
control: 'text',
|
|
44
51
|
description: 'Valeur de l\'attribut autocomplete pour le champ numéro de téléphone (par défaut: "tel-national")',
|
|
45
52
|
},
|
|
46
|
-
isValidatedOnBlur: { control: 'boolean' },
|
|
47
|
-
displayAsterisk: { control: 'boolean' },
|
|
48
|
-
disableErrorHandling: { control: 'boolean' },
|
|
49
|
-
disabled: { control: 'boolean' },
|
|
50
|
-
readonly: { control: 'boolean' },
|
|
51
|
-
},
|
|
53
|
+
'isValidatedOnBlur': { control: 'boolean' },
|
|
54
|
+
'displayAsterisk': { control: 'boolean' },
|
|
55
|
+
'disableErrorHandling': { control: 'boolean' },
|
|
56
|
+
'disabled': { control: 'boolean' },
|
|
57
|
+
'readonly': { control: 'boolean' },
|
|
58
|
+
} as Record<string, unknown>,
|
|
52
59
|
} satisfies Meta<typeof PhoneField>
|
|
53
60
|
|
|
54
61
|
export default meta
|
|
@@ -1254,7 +1261,7 @@ export const DisplayModels: Story = {
|
|
|
1254
1261
|
code: `
|
|
1255
1262
|
<template>
|
|
1256
1263
|
<span>
|
|
1257
|
-
{{
|
|
1264
|
+
Indicatif: {{ selectedDialCode }}<br/>Numéro: {{ modelValue }}
|
|
1258
1265
|
</span>
|
|
1259
1266
|
<PhoneField
|
|
1260
1267
|
v-model="modelValue"
|
|
@@ -1305,24 +1312,25 @@ export const DisplayModels: Story = {
|
|
|
1305
1312
|
readonly: false,
|
|
1306
1313
|
bgColor: 'white',
|
|
1307
1314
|
},
|
|
1308
|
-
render:
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1315
|
+
render: args => ({
|
|
1316
|
+
components: { PhoneField },
|
|
1317
|
+
setup() {
|
|
1318
|
+
return { args }
|
|
1319
|
+
},
|
|
1320
|
+
template: `
|
|
1321
|
+
<div class="pa-4">
|
|
1322
|
+
<div class="pa-4">
|
|
1323
|
+
Indicatif: {{ args.dialCodeModel }}<br/>Numéro: {{ args.modelValue }}
|
|
1324
|
+
</div>
|
|
1325
|
+
|
|
1326
|
+
<PhoneField
|
|
1327
|
+
v-bind="args"
|
|
1328
|
+
@update:modelValue="args.modelValue = $event"
|
|
1329
|
+
@update:selectedDialCode="args.dialCodeModel = $event"
|
|
1330
|
+
/>
|
|
1331
|
+
</div>
|
|
1332
|
+
`,
|
|
1333
|
+
}),
|
|
1326
1334
|
}
|
|
1327
1335
|
|
|
1328
1336
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
2
2
|
|
|
3
3
|
import type { SocialMediaLink } from './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:
|
|
18
|
-
name: '
|
|
19
|
-
href: 'https://
|
|
19
|
+
icon: xIcon,
|
|
20
|
+
name: 'X',
|
|
21
|
+
href: 'https://x.com/Assur_Maladie',
|
|
20
22
|
},
|
|
21
23
|
]
|
|
@@ -20,7 +20,9 @@ import * as SocialMediaLinksStories from './SocialMediaLinks.stories.ts';
|
|
|
20
20
|
<Source dark code={`
|
|
21
21
|
<script setup lang="ts">
|
|
22
22
|
import { SocialMediaLinks } from '@cnamts/synapse'
|
|
23
|
-
import { mdiFacebook, mdiLinkedin
|
|
23
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
24
|
+
|
|
25
|
+
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'
|
|
24
26
|
|
|
25
27
|
const links = [
|
|
26
28
|
{
|
|
@@ -31,12 +33,12 @@ const links = [
|
|
|
31
33
|
{
|
|
32
34
|
icon: mdiFacebook,
|
|
33
35
|
name: 'Facebook',
|
|
34
|
-
href: 'https://
|
|
36
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
|
-
icon:
|
|
38
|
-
name: '
|
|
39
|
-
href: 'https://
|
|
39
|
+
icon: xIcon,
|
|
40
|
+
name: 'X',
|
|
41
|
+
href: 'https://x.com/Assur_Maladie',
|
|
40
42
|
},
|
|
41
43
|
]
|
|
42
44
|
</script>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import SocialMediaLinks from './SocialMediaLinks.vue'
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
|
-
import { mdiFacebook, mdiLinkedin
|
|
3
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
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'
|
|
4
6
|
|
|
5
7
|
const meta = {
|
|
6
8
|
title: 'Composants/Navigation/SocialMediaLinks',
|
|
@@ -22,11 +24,11 @@ const meta = {
|
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
icon: mdiFacebook,
|
|
25
|
-
href: 'https://
|
|
27
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
26
28
|
},
|
|
27
29
|
{
|
|
28
|
-
icon:
|
|
29
|
-
href: 'https://
|
|
30
|
+
icon: xIcon,
|
|
31
|
+
href: 'https://x.com/Assur_Maladie',
|
|
30
32
|
},
|
|
31
33
|
],
|
|
32
34
|
headingLevel: 6,
|
|
@@ -78,7 +80,9 @@ export const Default: Story = {
|
|
|
78
80
|
name: 'Script',
|
|
79
81
|
code: `<script setup lang="ts">
|
|
80
82
|
import { SocialMediaLinks } from '@cnamts/synapse'
|
|
81
|
-
import { mdiFacebook, mdiLinkedin
|
|
83
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
84
|
+
|
|
85
|
+
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'
|
|
82
86
|
|
|
83
87
|
const links = [
|
|
84
88
|
{
|
|
@@ -89,12 +93,12 @@ export const Default: Story = {
|
|
|
89
93
|
{
|
|
90
94
|
icon: mdiFacebook,
|
|
91
95
|
name: 'Facebook',
|
|
92
|
-
href: 'https://
|
|
96
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
93
97
|
},
|
|
94
98
|
{
|
|
95
|
-
icon:
|
|
96
|
-
name: '
|
|
97
|
-
href: 'https://
|
|
99
|
+
icon: xIcon,
|
|
100
|
+
name: 'X',
|
|
101
|
+
href: 'https://x.com/Assur_Maladie',
|
|
98
102
|
},
|
|
99
103
|
]
|
|
100
104
|
</script>
|
|
@@ -112,12 +116,12 @@ export const Default: Story = {
|
|
|
112
116
|
{
|
|
113
117
|
icon: mdiFacebook,
|
|
114
118
|
name: 'Facebook',
|
|
115
|
-
href: 'https://
|
|
119
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
116
120
|
},
|
|
117
121
|
{
|
|
118
|
-
icon:
|
|
119
|
-
name: '
|
|
120
|
-
href: 'https://
|
|
122
|
+
icon: xIcon,
|
|
123
|
+
name: 'X',
|
|
124
|
+
href: 'https://x.com/Assur_Maladie',
|
|
121
125
|
},
|
|
122
126
|
],
|
|
123
127
|
},
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
<SyIcon
|
|
50
50
|
:icon="social.icon"
|
|
51
51
|
size="30px"
|
|
52
|
-
class="
|
|
52
|
+
:class="{
|
|
53
|
+
'vd-social-media-links-icon': true,
|
|
54
|
+
'vd-social-media-links-icon--x': social.name === 'X',
|
|
55
|
+
}"
|
|
53
56
|
decorative
|
|
54
57
|
/>
|
|
55
58
|
</VBtn>
|
|
@@ -91,6 +94,11 @@ li {
|
|
|
91
94
|
color: tokens.$grey-base;
|
|
92
95
|
}
|
|
93
96
|
|
|
97
|
+
.vd-social-media-links-icon--x {
|
|
98
|
+
transform: scale(0.75);
|
|
99
|
+
transform-origin: center;
|
|
100
|
+
}
|
|
101
|
+
|
|
94
102
|
.v-btn--icon {
|
|
95
103
|
width: calc(var(--v-btn-height) + 5px);
|
|
96
104
|
height: calc(var(--v-btn-height) + 5px);
|
|
@@ -1,15 +1,67 @@
|
|
|
1
|
-
import { Meta, Story } from '@storybook/
|
|
2
|
-
import * as
|
|
3
|
-
import '@/
|
|
1
|
+
import { Meta, Story } from '@storybook/blocks';
|
|
2
|
+
import * as SocialMediaLinksStories from '../SocialMediaLinks.stories';
|
|
3
|
+
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
+
import {
|
|
5
|
+
AccessibilityGuideLayout,
|
|
6
|
+
CriteriaSection,
|
|
7
|
+
CriteriaCard,
|
|
8
|
+
DemoSection,
|
|
9
|
+
BestPracticesSection,
|
|
10
|
+
ResourcesSection,
|
|
11
|
+
AuditSection,
|
|
12
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
|
|
4
13
|
|
|
5
|
-
<Meta of={
|
|
14
|
+
<Meta of={SocialMediaLinksStories} />
|
|
6
15
|
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
<AccessibilityGuideLayout
|
|
17
|
+
componentName="SocialMediaLinks"
|
|
18
|
+
iconSrc={AccessibilityIcon}
|
|
19
|
+
>
|
|
20
|
+
<AuditSection>
|
|
21
|
+
<div>Rapport d’audit manuel : <a href="/audits/SocialMediaLinks.xlsx" style={{ color: '#0C41BD' }}>Voir le rapport</a></div>
|
|
22
|
+
<div style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>
|
|
23
|
+
Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/790" target="_blank" style={{ color: '#0C41BD' }}>issue #790</a>)
|
|
24
|
+
</div>
|
|
25
|
+
</AuditSection>
|
|
26
|
+
|
|
27
|
+
<CriteriaSection>
|
|
28
|
+
<CriteriaCard icon="🏷️" title="Structure et rôles">
|
|
29
|
+
<ul>
|
|
30
|
+
<li><strong>Titre accessible</strong> : utilise un heading natif (<code>h1–h6</code>) ou un <code>role="heading"</code> + <code>aria-level</code> via <code>use-native-heading</code>.</li>
|
|
31
|
+
<li><strong>Liens</strong> : chaque bouton est un lien <code><a></code> avec <code>aria-label</code> explicite « Lien vers <nom> ».</li>
|
|
32
|
+
<li><strong>Icônes décoratives</strong> : <code>SyIcon</code> marqué décoratif pour ne pas polluer le lecteur d’écran.</li>
|
|
33
|
+
<li><strong>Ouverture externe</strong> : <code>target="_blank"</code> avec <code>rel="noopener noreferrer"</code> pour la sécurité.</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</CriteriaCard>
|
|
10
36
|
|
|
37
|
+
<CriteriaCard icon="⌨️" title="Navigation clavier">
|
|
38
|
+
<ul>
|
|
39
|
+
<li><strong>Focus visible</strong> : halo visible sur <code>.v-btn--icon:focus-visible</code>, contrasté en clair/sombre.</li>
|
|
40
|
+
<li><strong>Ordre logique</strong> : tabulation suit l’ordre des liens fournis.</li>
|
|
41
|
+
<li><strong>Taille des cibles</strong> : boutons icon-text élargis (<code>height/width</code> ajustée) pour une cible confortable.</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</CriteriaCard>
|
|
11
44
|
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
45
|
+
<CriteriaCard icon="🎨" title="Contraste et lisibilité">
|
|
46
|
+
<ul>
|
|
47
|
+
<li><strong>Texte du label</strong> : couleur primaire (<code>tokens.$blue-base</code>) ou blanc en thème sombre.</li>
|
|
48
|
+
<li><strong>Icônes</strong> : couleur neutre (<code>tokens.$grey-base</code>) et outline blanc en sombre.</li>
|
|
49
|
+
<li><strong>Responsive</strong> : alignement adapté (gauche/droite) selon la largeur.</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</CriteriaCard>
|
|
52
|
+
</CriteriaSection>
|
|
53
|
+
|
|
54
|
+
<DemoSection componentName="SocialMediaLinks">
|
|
55
|
+
<Story of={SocialMediaLinksStories.Default} />
|
|
56
|
+
</DemoSection>
|
|
57
|
+
|
|
58
|
+
<BestPracticesSection>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>Fournissez toujours un <code>aria-label</code> descriptif pour chaque lien d’icône.</li>
|
|
61
|
+
<li>Choisissez un niveau de titre cohérent avec la hiérarchie de la page (<code>heading-level</code> 1–6) ou activez <code>use-native-heading</code> pour un titre sémantique.</li>
|
|
62
|
+
<li>Vérifiez le focus visible sur tous les liens, notamment en thème sombre.</li>
|
|
63
|
+
<li>Utilisez des icônes SVG accessibles et marquées décoratives quand le libellé est déjà donné.</li>
|
|
64
|
+
<li>Si vous changez l’ordre ou la liste des réseaux, assurez-vous que l’ordre de tabulation reste logique.</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</BestPracticesSection>
|
|
67
|
+
</AccessibilityGuideLayout>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultSocialMediaLinks } from '../DefaultSocialMediaLinks'
|
|
2
2
|
import { describe, it, expect } from 'vitest'
|
|
3
|
-
import { mdiLinkedin
|
|
3
|
+
import { mdiLinkedin } from '@mdi/js'
|
|
4
4
|
|
|
5
5
|
describe('defaultSocialMediaLinks', () => {
|
|
6
6
|
it('contains the correct number of links', () => {
|
|
@@ -13,9 +13,9 @@ describe('defaultSocialMediaLinks', () => {
|
|
|
13
13
|
expect(linkedinLink?.icon).toBe(mdiLinkedin)
|
|
14
14
|
})
|
|
15
15
|
|
|
16
|
-
it('contains the correct
|
|
17
|
-
const
|
|
18
|
-
expect(
|
|
19
|
-
expect(
|
|
16
|
+
it('contains the correct X link', () => {
|
|
17
|
+
const xLink = defaultSocialMediaLinks.find(link => link.href === 'https://x.com/Assur_Maladie')
|
|
18
|
+
expect(xLink).toBeDefined()
|
|
19
|
+
expect(typeof xLink?.icon).toBe('string')
|
|
20
20
|
})
|
|
21
21
|
})
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SocialMediaLinks from '../SocialMediaLinks.vue'
|
|
8
|
+
|
|
9
|
+
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'
|
|
10
|
+
|
|
11
|
+
const sampleLinks = [
|
|
12
|
+
{
|
|
13
|
+
href: 'https://www.linkedin.com/company/assurance-maladie/',
|
|
14
|
+
name: 'LinkedIn',
|
|
15
|
+
icon: 'mdi-linkedin',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
href: 'https://x.com/Assur_Maladie',
|
|
19
|
+
name: 'X',
|
|
20
|
+
icon: xIcon,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
href: 'https://www.facebook.com/assurancemaladie',
|
|
24
|
+
name: 'Facebook',
|
|
25
|
+
icon: 'mdi-facebook',
|
|
26
|
+
},
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
describe('SocialMediaLinks – accessibility (axe)', () => {
|
|
30
|
+
it('has no obvious axe violations with native heading', async () => {
|
|
31
|
+
const wrapper = mount(SocialMediaLinks, {
|
|
32
|
+
props: {
|
|
33
|
+
links: sampleLinks,
|
|
34
|
+
headingLevel: 6,
|
|
35
|
+
useNativeHeading: true,
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
40
|
+
assertNoA11yViolations(results, 'SocialMediaLinks – native heading', {
|
|
41
|
+
ignoreRules: ['region'],
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('has no obvious axe violations with ARIA heading', async () => {
|
|
46
|
+
const wrapper = mount(SocialMediaLinks, {
|
|
47
|
+
props: {
|
|
48
|
+
links: sampleLinks,
|
|
49
|
+
headingLevel: 3,
|
|
50
|
+
useNativeHeading: false,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
55
|
+
assertNoA11yViolations(results, 'SocialMediaLinks – aria heading', {
|
|
56
|
+
ignoreRules: ['region'],
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
@@ -2,6 +2,8 @@ import { mount, VueWrapper } from '@vue/test-utils'
|
|
|
2
2
|
import SocialMediaLinks from '../SocialMediaLinks.vue'
|
|
3
3
|
import { describe, it, expect, afterEach } from 'vitest'
|
|
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
|
describe('SocialMediaLinks', () => {
|
|
6
8
|
let wrapper: VueWrapper
|
|
7
9
|
|
|
@@ -30,7 +32,7 @@ describe('SocialMediaLinks', () => {
|
|
|
30
32
|
|
|
31
33
|
it('renders correctly with provided links', () => {
|
|
32
34
|
const links = [
|
|
33
|
-
{ href: 'https://
|
|
35
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
34
36
|
{ href: 'https://facebook.com', name: 'Facebook', icon: 'mdi-facebook' },
|
|
35
37
|
]
|
|
36
38
|
wrapper = mount(SocialMediaLinks, {
|
|
@@ -51,8 +53,8 @@ describe('SocialMediaLinks', () => {
|
|
|
51
53
|
|
|
52
54
|
// Check first link
|
|
53
55
|
const firstLink = listItems[0]?.find('a')
|
|
54
|
-
expect(firstLink?.attributes('href')).toBe('https://
|
|
55
|
-
expect(firstLink?.attributes('aria-label')).toBe('Lien vers
|
|
56
|
+
expect(firstLink?.attributes('href')).toBe('https://x.com')
|
|
57
|
+
expect(firstLink?.attributes('aria-label')).toBe('Lien vers X')
|
|
56
58
|
|
|
57
59
|
// Check second link
|
|
58
60
|
const secondLink = listItems[1]?.find('a')
|
|
@@ -62,7 +64,7 @@ describe('SocialMediaLinks', () => {
|
|
|
62
64
|
|
|
63
65
|
it('renders the correct number of social media links', () => {
|
|
64
66
|
const links = [
|
|
65
|
-
{ href: 'https://
|
|
67
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
66
68
|
{ href: 'https://facebook.com', name: 'Facebook', icon: 'mdi-facebook' },
|
|
67
69
|
]
|
|
68
70
|
wrapper = mount(SocialMediaLinks, {
|
|
@@ -126,7 +128,7 @@ describe('SocialMediaLinks', () => {
|
|
|
126
128
|
|
|
127
129
|
it('has proper focus styles for accessibility', () => {
|
|
128
130
|
const links = [
|
|
129
|
-
{ href: 'https://
|
|
131
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
130
132
|
]
|
|
131
133
|
wrapper = mount(SocialMediaLinks, {
|
|
132
134
|
props: {
|
|
@@ -142,8 +144,8 @@ describe('SocialMediaLinks', () => {
|
|
|
142
144
|
|
|
143
145
|
// Verify the button has proper accessibility attributes
|
|
144
146
|
const link = wrapper.find('a')
|
|
145
|
-
expect(link.attributes('href')).toBe('https://
|
|
146
|
-
expect(link.attributes('aria-label')).toBe('Lien vers
|
|
147
|
+
expect(link.attributes('href')).toBe('https://x.com')
|
|
148
|
+
expect(link.attributes('aria-label')).toBe('Lien vers X')
|
|
147
149
|
|
|
148
150
|
// Check that the component has the necessary CSS classes for focus styles
|
|
149
151
|
// We can't test the actual CSS properties, but we can verify the structure is there
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
2
|
+
import '../../stories/styles/shared.css';
|
|
3
|
+
import * as StatusPageStories from './StatusPage.stories'
|
|
4
|
+
|
|
5
|
+
<Meta of={StatusPageStories} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>StatusPage</h1>
|
|
9
|
+
<p>Le composant `StatusPage` sert à afficher une page de statut.</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<Canvas of={StatusPageStories.Default} />
|
|
13
|
+
|
|
14
|
+
# API
|
|
15
|
+
|
|
16
|
+
<Controls of={StatusPageStories.Default} />
|
|
17
|
+
|
|
18
|
+
## Lien de retour
|
|
19
|
+
|
|
20
|
+
Vous pouvez mettre un lien vers une autre page avec les props `btn-text` et `btn-link` ou `btn-href`.
|
|
21
|
+
|
|
22
|
+
<Canvas of={StatusPageStories.WithLink} />
|