@cnamts/synapse 0.0.2-alpha → 0.0.4-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.
- package/README.md +1 -1
- package/dist/design-system-v3.d.ts +712 -27
- package/dist/design-system-v3.js +2745 -5384
- package/dist/design-system-v3.umd.cjs +10 -2
- package/dist/style.css +1 -1
- package/package.json +32 -29
- package/src/components/Alert/Alert.mdx +1 -1
- package/src/components/Alert/Alert.stories.ts +91 -1
- package/src/components/Alert/Alert.vue +8 -8
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +84 -1
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +3 -3
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +172 -11
- package/src/components/CollapsibleList/CollapsibleList.mdx +2 -2
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +37 -1
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +120 -1
- package/src/components/CopyBtn/CopyBtn.vue +1 -1
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +6 -8
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.stories.ts +270 -4
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.vue +80 -53
- package/src/components/Customs/CustomInputSelect/config.ts +10 -0
- package/src/components/Customs/CustomSelect/CustomSelect.mdx +3 -3
- package/src/components/Customs/CustomSelect/CustomSelect.stories.ts +158 -2
- package/src/components/Customs/CustomSelect/CustomSelect.vue +25 -6
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +44 -0
- package/src/components/Customs/CustomTextField/CustomTextField.stories.ts +403 -0
- package/src/components/Customs/CustomTextField/CustomTextField.vue +110 -0
- package/src/components/Customs/CustomTextField/tests/CustomTextField.spec.ts +93 -0
- package/src/components/Customs/CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap +59 -0
- package/src/components/Customs/CustomTextField/types.d.ts +3 -0
- package/src/components/DataList/DataList.mdx +77 -0
- package/src/components/DataList/DataList.stories.ts +960 -0
- package/src/components/DataList/DataList.vue +140 -0
- package/src/components/DataList/DataListLoading/DataListLoading.vue +56 -0
- package/src/components/DataList/DataListLoading/tests/DataListLoading.spec.ts +23 -0
- package/src/components/DataList/locales.ts +3 -0
- package/src/components/DataList/tests/DataList.spec.ts +194 -0
- package/src/components/DataList/types.d.ts +23 -0
- package/src/components/DataListGroup/DataListGroup.mdx +77 -0
- package/src/components/DataListGroup/DataListGroup.stories.ts +987 -0
- package/src/components/DataListGroup/DataListGroup.vue +59 -0
- package/src/components/DataListGroup/tests/DataListGroup.spec.ts +54 -0
- package/src/components/DataListGroup/tests/data/dataListGroupItems.ts +41 -0
- package/src/components/DataListGroup/types.d.ts +15 -0
- package/src/components/DataListItem/DataListItem.vue +135 -0
- package/src/components/DataListItem/config.ts +17 -0
- package/src/components/DataListItem/locales.ts +3 -0
- package/src/components/DataListItem/tests/DataListItem.spec.ts +156 -0
- package/src/components/DataListItem/types.d.ts +23 -0
- package/src/components/DownloadBtn/Accessibilite.mdx +14 -0
- package/src/components/DownloadBtn/Accessibilite.stories.ts +166 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +129 -0
- package/src/components/DownloadBtn/DownloadBtn.mdx +5 -6
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +207 -2
- package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +58 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +2 -2
- package/src/components/HeaderBar/HeaderBar.mdx +256 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +703 -0
- package/src/components/HeaderBar/HeaderBar.vue +276 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.mdx +433 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +1089 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +234 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.mdx +38 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +89 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +51 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/tests/HeaderMenuItem.spec.ts +16 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/tests/__snapshots__/HeaderMenuItem.spec.ts.snap +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.mdx +17 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +121 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +51 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/tests/HeaderMenuSection.spec.ts +31 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.mdx +43 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +261 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +194 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/tests/HeaderSubMenu.spec.ts +63 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/conts.ts +1 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/locals.ts +4 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +180 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/useHandleSubMenus.spec.ts +158 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/useHandleSubMenus.ts +49 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +143 -0
- package/src/components/HeaderBar/HeaderLogo/locales.ts +3 -0
- package/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.vue +117 -0
- package/src/components/HeaderBar/HeaderLogo/logos/Logo.vue +279 -0
- package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +119 -0
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +84 -0
- package/src/components/HeaderBar/HeaderMenuBtn/locals.ts +4 -0
- package/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.ts +70 -0
- package/src/components/HeaderBar/Usages.mdx +85 -0
- package/src/components/HeaderBar/consts.scss +6 -0
- package/src/components/HeaderBar/consts.ts +2 -0
- package/src/components/HeaderBar/locales.ts +3 -0
- package/src/components/HeaderBar/tests/HeaderBar.spec.ts +216 -0
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +45 -0
- package/src/components/HeaderBar/tests/useHeaderResponsiveMode.spec.ts +26 -0
- package/src/components/HeaderBar/tests/useScrollDirection.spec.ts +34 -0
- package/src/components/HeaderBar/useHeaderResponsiveMode.ts +25 -0
- package/src/components/HeaderBar/useScrollDirection.ts +26 -0
- package/src/components/HeaderLoading/HeaderLoading.mdx +28 -0
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +62 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +45 -0
- package/src/components/HeaderLoading/tests/HeaderLoading.spec.ts +22 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +128 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +784 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +194 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +74 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/config.ts +18 -0
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +127 -0
- package/src/components/HeaderNavigationBar/types.ts +7 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +31 -0
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +343 -0
- package/src/components/HeaderToolbar/HeaderToolbar.vue +487 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +196 -0
- package/src/components/HeaderToolbar/types.d.ts +20 -0
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +125 -8
- package/src/components/Logo/Logo.mdx +2 -2
- package/src/components/Logo/Logo.stories.ts +147 -1
- package/src/components/LogoBrandSection/LogoBrandSection.mdx +14 -0
- package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +158 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +312 -0
- package/src/components/LogoBrandSection/assets/ameli-pro.svg +1 -0
- package/src/components/LogoBrandSection/assets/ameli.svg +1 -0
- package/src/components/LogoBrandSection/assets/cnam.svg +1 -0
- package/src/components/LogoBrandSection/assets/compte-ameli.svg +1 -0
- package/src/components/LogoBrandSection/dividerDimensionsMapping.ts +14 -0
- package/src/components/LogoBrandSection/locales.ts +14 -0
- package/src/components/LogoBrandSection/secondaryLogoMapping.ts +24 -0
- package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +365 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/LogoBrandSection.spec.ts.snap +14 -0
- package/src/components/LogoBrandSection/types.ts +8 -0
- package/src/components/NotificationBar/NotificationBar.mdx +6 -6
- package/src/components/NotificationBar/NotificationBar.stories.ts +1 -1
- package/src/components/NotificationBar/NotificationBar.vue +7 -9
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +1 -1
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +86 -1
- package/src/components/PageContainer/PageContainer.vue +0 -1
- package/src/components/PhoneField/PhoneField.mdx +49 -0
- package/src/components/PhoneField/PhoneField.stories.ts +869 -0
- package/src/components/PhoneField/PhoneField.vue +230 -0
- package/src/components/PhoneField/indicatifs.ts +104 -0
- package/src/components/PhoneField/locales.ts +4 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +179 -0
- package/src/components/SkipLink/SkipLink.stories.ts +50 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +28 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +37 -1
- package/src/components/SubHeader/SubHeader.mdx +31 -0
- package/src/components/SubHeader/SubHeader.stories.ts +1032 -0
- package/src/components/SubHeader/SubHeader.vue +185 -0
- package/src/components/SubHeader/config.ts +12 -0
- package/src/components/SubHeader/locales.ts +3 -0
- package/src/components/SubHeader/tests/SubHeader.spec.ts +144 -0
- package/src/components/index.ts +24 -7
- package/src/composables/widthable/index.ts +29 -0
- package/src/composables/widthable/tests/widthable.spec.ts +52 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -2
- package/src/main.ts +1 -0
- package/src/modules.d.ts +4 -0
- package/src/services/index.ts +1 -0
- package/src/stories/Demarrer/Accueil.mdx +10 -0
- package/src/stories/Demarrer/Accueil.stories.ts +76 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.mdx +9 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.stories.ts +20 -0
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.mdx +1 -2
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/Fondamentaux/EcoConception/Econception.stories.ts +1 -1
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +52 -48
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +31 -28
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +1 -1
- package/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.ts +47 -0
- package/src/utils/functions/throttleDisplayFn/throttleDisplayFn.ts +26 -0
- package/src/utils/rules/exactLength/index.ts +33 -0
- package/src/utils/rules/exactLength/locales.ts +6 -0
- package/src/utils/rules/required/index.ts +25 -0
- package/src/utils/rules/required/locales.ts +5 -0
- package/src/utils/rules/required/ruleMessageHelper.ts +14 -0
- package/src/utils/rules/required/tests/index.spec.ts +47 -0
- package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +22 -0
- package/src/utils/rules/types.d.ts +15 -0
- package/src/components/Beta/beta.mdx +0 -5
- package/src/components/Deprecated/deprecated.mdx +0 -5
- package/src/stories/Home/Accueil.mdx +0 -7
- package/src/stories/Home/PolitiqueDeConfidentialite.mdx +0 -4
- package/src/stories/Home/synapse.webp +0 -0
- /package/src/components/Logo/{types.d.ts → types.ts} +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
|
+
|
|
3
|
+
export const AccessibiliteItemsIndeterminate = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Catégorie 1 : Images',
|
|
6
|
+
subtitle: '1.4 Pour chaque image utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative permet-elle d’identifier la nature et la fonction de l’image ?',
|
|
7
|
+
items: [
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
precision: '1.4.1 Pour chaque image (balise <img>) utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative est-elle pertinente ?',
|
|
11
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.4.1',
|
|
12
|
+
solution: [{
|
|
13
|
+
info1: '1. Retrouver dans le document les images structurées au moyen d’un élément <img> pourvues d’une alternative textuelle et utilisées comme CAPTCHA ou comme image-test',
|
|
14
|
+
info2: '2. Pour chaque image, vérifier que l’alternative textuelle est pertinente',
|
|
15
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
16
|
+
}],
|
|
17
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
|
|
22
|
+
precision: ' 1.4.6 Pour chaque image vectorielle (balise <svg>) utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative est-elle pertinente ?',
|
|
23
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.4.6',
|
|
24
|
+
solution: [{
|
|
25
|
+
info1: '1. Retrouver dans le document les éléments <svg> pourvus d’une alternative textuelle et utilisés comme CAPTCHA ou comme image-test;',
|
|
26
|
+
info2: '2. Pour chaque élément <svg>, vérifier que l’alternative textuelle est pertinente',
|
|
27
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
28
|
+
}],
|
|
29
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: 'Catégorie 10 : Présentation de l’information',
|
|
37
|
+
subtitle: '10.8 Pour chaque page Web, les contenus cachés ont-ils vocation à être ignorés par les technologies d’assistance ?',
|
|
38
|
+
items: [
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
precision: '10.8.1 Dans chaque page web, chaque contenu caché vérifie-t-il une de ces conditions ? - le contenu caché a vocation à être ignoré par les technologies d’assistance ;Le contenu caché 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.',
|
|
42
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#10.8.1',
|
|
43
|
+
solution: [{
|
|
44
|
+
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)',
|
|
45
|
+
info2: '2. Pour chaque contenu caché, vérifier que :Soit le contenu caché a vocation à être ignoré par les technologies d’assistance (un élément statistique de visites par exemple) ; 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 : 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é ; Soit d’une fonction de programmation qui repositionne le focus sur le contenu.',
|
|
46
|
+
info3: '3. Si c’est le cas pour chaque contenu caché, le test est validé',
|
|
47
|
+
}],
|
|
48
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
49
|
+
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
export const AccessibiliteItemsValidated = [
|
|
58
|
+
{
|
|
59
|
+
title: 'Catégorie 1 : Images',
|
|
60
|
+
subtitle: '1.2 Chaque image de décoration est-elle correctement ignorée par les technologies d’assistance ?',
|
|
61
|
+
items: [
|
|
62
|
+
|
|
63
|
+
{
|
|
64
|
+
precision: 'Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ?'
|
|
65
|
+
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
66
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
67
|
+
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
68
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’attribut title.',
|
|
69
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.2.4',
|
|
70
|
+
solution: [{
|
|
71
|
+
info1: '1. Retrouver dans le document les images décoratives dépourvues de légende structurées au moyen d’un élément <svg> ;',
|
|
72
|
+
info2: '2. Pour chaque image, vérifier que l’élément <svg> ne possède pas d’attributs aria-labelledby ou aria-label et qu’il :'
|
|
73
|
+
+ ' Possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
74
|
+
+ ' Et est dépourvu d’alternative textuelle (ainsi que ses éléments enfants) ;'
|
|
75
|
+
+ ' Et ne contient pas d’éléments <title> et <desc> à moins que vides de contenu ;'
|
|
76
|
+
+ ' Et est dépourvu d’attribut title (ainsi que ses éléments enfants).',
|
|
77
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
78
|
+
}],
|
|
79
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'Catégorie 3 : Couleurs',
|
|
87
|
+
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é?',
|
|
88
|
+
items: [
|
|
89
|
+
{
|
|
90
|
+
|
|
91
|
+
precision: 'Dans chaque page web, le texte et le texte en image sans effet de graisse d’une taille restituée inférieure à 24px vérifient-ils une de ces conditions? Le rapport de contraste entre le texte et son arrière-plan est de 4.5:1, au moins; Un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 4.5:1, au moins.',
|
|
92
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
93
|
+
solution: [{
|
|
94
|
+
info1: '1. Retrouver dans le document les textes et les textes en image sans effet de graisse d’une taille restituée inférieure à 24px qui pourraient poser des problèmes de contraste ;',
|
|
95
|
+
info2: '2. Pour chacun de ces textes, vérifier que : Soit le rapport de contraste entre le texte et son arrière-plan est de 4.5:1, au moins; Soit un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 4.5:1, au moins.',
|
|
96
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
97
|
+
}],
|
|
98
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
99
|
+
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: 'Catégorie 7 : Scripts',
|
|
106
|
+
subtitle: '7.1 Chaque script est-il, si nécessaire, compatible avec les technologies d’assistance ?',
|
|
107
|
+
items: [
|
|
108
|
+
{
|
|
109
|
+
|
|
110
|
+
precision: ' 7.1.1 Chaque script qui génère ou contrôle un composant d’interface vérifie-t-il, si nécessaire, une de ces conditions ? '
|
|
111
|
+
+ ' Le nom, le rôle, la valeur, le paramétrage et les changements d’états sont accessibles aux technologies d’assistance via une API d’accessibilité ;'
|
|
112
|
+
+ ' Un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités est présent dans la page ;'
|
|
113
|
+
+ ' Une alternative accessible permet d’accéder aux mêmes fonctionnalités.',
|
|
114
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#7.1.1',
|
|
115
|
+
solution: [{
|
|
116
|
+
info1: '1. Vérifier que : Le composant possède un rôle cohérent avec son usage (généralement un bouton ou un lien) ;'
|
|
117
|
+
+ ' Le composant possède un nom explicite ;'
|
|
118
|
+
+ ' Le nom du composant est cohérent avec l’état de la fonctionnalité ou des contenus contrôlés (par exemple pour une fonctionnalité permettant d’afficher ou de masquer une zone de contenu).',
|
|
119
|
+
info2: '2. Sinon, vérifier la présence d’un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités',
|
|
120
|
+
info3: '3. Si c’est le cas le test est validé',
|
|
121
|
+
}],
|
|
122
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
123
|
+
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
]
|
|
@@ -4,7 +4,6 @@ import * as DownloadBtnStories from './DownloadBtn.stories';
|
|
|
4
4
|
|
|
5
5
|
<Meta of={DownloadBtnStories} />
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
# DownloadBtn
|
|
9
8
|
|
|
10
9
|
L'élément `DownloadBtn` est utilisé pour permettre à l'utilisateur de télécharger un document provenant d'une API.
|
|
@@ -19,7 +18,7 @@ L'élément `DownloadBtn` est utilisé pour permettre à l'utilisateur de télé
|
|
|
19
18
|
|
|
20
19
|
<Source dark code={`
|
|
21
20
|
<script setup lang="ts">
|
|
22
|
-
import DownloadBtn from '
|
|
21
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
23
22
|
import axios from 'axios'
|
|
24
23
|
|
|
25
24
|
function download() {
|
|
@@ -52,11 +51,11 @@ Exemple :
|
|
|
52
51
|
|
|
53
52
|
<Source dark code={`
|
|
54
53
|
<script setup lang="ts">
|
|
55
|
-
import DownloadBtn from '
|
|
56
|
-
import NotificationBar from '
|
|
54
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
55
|
+
import NotificationBar from '@cnamts/synapse'
|
|
57
56
|
import axios from 'axios'
|
|
58
|
-
import { useNotificationService } from '
|
|
59
|
-
import type { Notification } from '
|
|
57
|
+
import { useNotificationService } from '@cnamts/synapse/src/services/NotificationService'
|
|
58
|
+
import type { Notification } from '@cnamts/synapse/src/components/NotificationBar/types'
|
|
60
59
|
|
|
61
60
|
function download() {
|
|
62
61
|
return axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124')
|
|
@@ -7,7 +7,7 @@ import NotificationBar from '../NotificationBar/NotificationBar.vue'
|
|
|
7
7
|
import { useNotificationService } from '@/services/NotificationService'
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Composants/Boutons/DownloadBtn',
|
|
11
11
|
component: DownloadBtn,
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: 'fullscreen',
|
|
@@ -92,6 +92,35 @@ export default meta
|
|
|
92
92
|
type Story = StoryObj<typeof meta>
|
|
93
93
|
|
|
94
94
|
export const Default: Story = {
|
|
95
|
+
parameters: {
|
|
96
|
+
sourceCode: [
|
|
97
|
+
{
|
|
98
|
+
name: 'Template',
|
|
99
|
+
code: `<template>
|
|
100
|
+
<DownloadBtn
|
|
101
|
+
:file-promise="download"
|
|
102
|
+
@error="onError"
|
|
103
|
+
@success="onSuccess"
|
|
104
|
+
>
|
|
105
|
+
Télécharger
|
|
106
|
+
</DownloadBtn>
|
|
107
|
+
</template>
|
|
108
|
+
`,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'Script',
|
|
112
|
+
code: `<script setup lang="ts">
|
|
113
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
114
|
+
import axios from 'axios'
|
|
115
|
+
|
|
116
|
+
const download = () => {
|
|
117
|
+
return axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124')
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
`,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
95
124
|
args: {
|
|
96
125
|
filePromise: () => axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124'),
|
|
97
126
|
default: 'Télécharger',
|
|
@@ -102,6 +131,35 @@ export const Default: Story = {
|
|
|
102
131
|
|
|
103
132
|
export const Error: Story = {
|
|
104
133
|
name: 'Error',
|
|
134
|
+
parameters: {
|
|
135
|
+
sourceCode: [
|
|
136
|
+
{
|
|
137
|
+
name: 'Template',
|
|
138
|
+
code: `<template>
|
|
139
|
+
<DownloadBtn
|
|
140
|
+
:file-promise="download"
|
|
141
|
+
@error="onError"
|
|
142
|
+
@success="onSuccess"
|
|
143
|
+
>
|
|
144
|
+
Télécharger
|
|
145
|
+
</DownloadBtn>
|
|
146
|
+
</template>
|
|
147
|
+
`,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'Script',
|
|
151
|
+
code: `<script setup lang="ts">
|
|
152
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
153
|
+
import axios from 'axios'
|
|
154
|
+
|
|
155
|
+
const download = () => {
|
|
156
|
+
return axios.get('https://')
|
|
157
|
+
}
|
|
158
|
+
</script>
|
|
159
|
+
`,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
105
163
|
args: {
|
|
106
164
|
filePromise: () => axios.get('https://'),
|
|
107
165
|
default: 'Télécharger',
|
|
@@ -112,6 +170,35 @@ export const Error: Story = {
|
|
|
112
170
|
|
|
113
171
|
export const Loading: Story = {
|
|
114
172
|
name: 'Loading',
|
|
173
|
+
parameters: {
|
|
174
|
+
sourceCode: [
|
|
175
|
+
{
|
|
176
|
+
name: 'Template',
|
|
177
|
+
code: `<template>
|
|
178
|
+
<DownloadBtn
|
|
179
|
+
:file-promise="download"
|
|
180
|
+
@error="onError"
|
|
181
|
+
@success="onSuccess"
|
|
182
|
+
>
|
|
183
|
+
Télécharger
|
|
184
|
+
</DownloadBtn>
|
|
185
|
+
</template>
|
|
186
|
+
`,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'Script',
|
|
190
|
+
code: `<script setup lang="ts">
|
|
191
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
192
|
+
import axios from 'axios'
|
|
193
|
+
|
|
194
|
+
const download = () => {
|
|
195
|
+
return new Promise(() => { setTimeout(() => {}, 100000) })
|
|
196
|
+
}
|
|
197
|
+
</script>
|
|
198
|
+
`,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
},
|
|
115
202
|
args: {
|
|
116
203
|
filePromise: () => new Promise(() => { setTimeout(() => {}, 100000) }),
|
|
117
204
|
default: 'Télécharger',
|
|
@@ -127,6 +214,37 @@ export const Loading: Story = {
|
|
|
127
214
|
|
|
128
215
|
export const Dark: Story = {
|
|
129
216
|
name: 'Dark theme',
|
|
217
|
+
parameters: {
|
|
218
|
+
sourceCode: [
|
|
219
|
+
{
|
|
220
|
+
name: 'Template',
|
|
221
|
+
code: `<template>
|
|
222
|
+
<VThemeProvider theme="dark" with-background class="pa-4">
|
|
223
|
+
<DownloadBtn
|
|
224
|
+
:file-promise="download"
|
|
225
|
+
@error="onError"
|
|
226
|
+
@success="onSuccess"
|
|
227
|
+
>
|
|
228
|
+
Télécharger
|
|
229
|
+
</DownloadBtn>
|
|
230
|
+
</VThemeProvider>
|
|
231
|
+
</template>
|
|
232
|
+
`,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'Script',
|
|
236
|
+
code: `<script setup lang="ts">
|
|
237
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
238
|
+
import axios from 'axios'
|
|
239
|
+
|
|
240
|
+
const download = () => {
|
|
241
|
+
return new Promise(() => { setTimeout(() => {}, 100000) })
|
|
242
|
+
}
|
|
243
|
+
</script>
|
|
244
|
+
`,
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
130
248
|
render: args => ({
|
|
131
249
|
components: { VThemeProvider, DownloadBtn },
|
|
132
250
|
setup() {
|
|
@@ -138,7 +256,6 @@ export const Dark: Story = {
|
|
|
138
256
|
</VThemeProvider>
|
|
139
257
|
`,
|
|
140
258
|
}),
|
|
141
|
-
|
|
142
259
|
args: {
|
|
143
260
|
filePromise: () => axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124'),
|
|
144
261
|
default: 'Télécharger',
|
|
@@ -148,6 +265,52 @@ export const Dark: Story = {
|
|
|
148
265
|
}
|
|
149
266
|
|
|
150
267
|
export const Notify: Story = {
|
|
268
|
+
parameters: {
|
|
269
|
+
sourceCode: [
|
|
270
|
+
{
|
|
271
|
+
name: 'Template',
|
|
272
|
+
code: `<template>
|
|
273
|
+
<div>
|
|
274
|
+
<NotificationBar />
|
|
275
|
+
<DownloadBtn
|
|
276
|
+
:file-promise="download"
|
|
277
|
+
@error="onError"
|
|
278
|
+
@success="onSuccess"
|
|
279
|
+
>
|
|
280
|
+
Télécharger
|
|
281
|
+
</DownloadBtn>
|
|
282
|
+
</div>
|
|
283
|
+
</template>
|
|
284
|
+
`,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'Script',
|
|
288
|
+
code: `<script setup lang="ts">
|
|
289
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
290
|
+
import NotificationBar from '@cnamts/synapse'
|
|
291
|
+
|
|
292
|
+
import axios from 'axios'
|
|
293
|
+
|
|
294
|
+
const download = () => {
|
|
295
|
+
return new Promise(() => { setTimeout(() => {}, 100000) })
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const { addNotification } = useNotificationService()
|
|
299
|
+
|
|
300
|
+
const notify = (message: string, type: 'error' | 'success') => {
|
|
301
|
+
const notification = {
|
|
302
|
+
id: Date.now().toString(),
|
|
303
|
+
message,
|
|
304
|
+
type,
|
|
305
|
+
timeout: -1,
|
|
306
|
+
}
|
|
307
|
+
addNotification(notification)
|
|
308
|
+
}
|
|
309
|
+
</script>
|
|
310
|
+
`,
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
},
|
|
151
314
|
args: {
|
|
152
315
|
filePromise: () => axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124'),
|
|
153
316
|
default: 'Télécharger',
|
|
@@ -191,6 +354,48 @@ export const Notify: Story = {
|
|
|
191
354
|
|
|
192
355
|
export const Customization: Story = {
|
|
193
356
|
name: 'Customisation',
|
|
357
|
+
parameters: {
|
|
358
|
+
sourceCode: [
|
|
359
|
+
{
|
|
360
|
+
name: 'Template',
|
|
361
|
+
code: `<template>
|
|
362
|
+
<DownloadBtn
|
|
363
|
+
:file-promise="download"
|
|
364
|
+
:vuetify-options="vuetifyOptions"
|
|
365
|
+
@error="onError"
|
|
366
|
+
@success="onSuccess"
|
|
367
|
+
>
|
|
368
|
+
Télécharger
|
|
369
|
+
</DownloadBtn>
|
|
370
|
+
</template>
|
|
371
|
+
`,
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: 'Script',
|
|
375
|
+
code: `<script setup lang="ts">
|
|
376
|
+
import DownloadBtn from '@cnamts/synapse'
|
|
377
|
+
import axios from 'axios'
|
|
378
|
+
|
|
379
|
+
const download = () => {
|
|
380
|
+
return axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124')
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const vuetifyOptions = {
|
|
384
|
+
btn: {
|
|
385
|
+
variant: 'plain',
|
|
386
|
+
ripple: true,
|
|
387
|
+
color: 'secondary',
|
|
388
|
+
},
|
|
389
|
+
icon: {
|
|
390
|
+
class: 'ml-2 mr-2',
|
|
391
|
+
color: 'secondary',
|
|
392
|
+
},
|
|
393
|
+
}
|
|
394
|
+
</script>
|
|
395
|
+
`,
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
},
|
|
194
399
|
args: {
|
|
195
400
|
filePromise: () => axios.get('https://run.mocky.io/v3/63e571d5-1134-4f51-82ac-fa7cc8045124'),
|
|
196
401
|
default: 'Télécharger',
|
|
@@ -17,8 +17,8 @@ Le composant `FooterBar` est utilisé pour afficher une barre de pied de page av
|
|
|
17
17
|
|
|
18
18
|
<Source dark code={`
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import FooterBar from '
|
|
21
|
-
import CollapsibleList from '
|
|
20
|
+
import FooterBar from '@cnamts/synapse'
|
|
21
|
+
import CollapsibleList from '@cnamts/synapse'
|
|
22
22
|
import { computed } from 'vue'
|
|
23
23
|
import { useDisplay } from 'vuetify'
|
|
24
24
|
|
|
@@ -18,7 +18,7 @@ Le composant `FranceConnectBtn` est utilisé pour afficher un bouton permettant
|
|
|
18
18
|
|
|
19
19
|
<Source dark code={`
|
|
20
20
|
<script setup lang="ts">
|
|
21
|
-
import FranceConnectBtn from '
|
|
21
|
+
import FranceConnectBtn from '@cnamts/synapse'
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
2
2
|
import FranceConnectBtn from './FranceConnectBtn.vue'
|
|
3
3
|
|
|
4
4
|
const meta = {
|
|
5
|
-
title: '
|
|
5
|
+
title: 'Composants/Boutons/FranceConnectBtn',
|
|
6
6
|
component: FranceConnectBtn,
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: 'fullscreen',
|
|
@@ -14,6 +14,24 @@ export default meta
|
|
|
14
14
|
type Story = StoryObj<typeof meta>
|
|
15
15
|
|
|
16
16
|
export const Default: Story = {
|
|
17
|
+
parameters: {
|
|
18
|
+
sourceCode: [
|
|
19
|
+
{
|
|
20
|
+
name: 'Template',
|
|
21
|
+
code: `<template>
|
|
22
|
+
<FranceConnectBtn />
|
|
23
|
+
</template>
|
|
24
|
+
`,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Script',
|
|
28
|
+
code: `<script setup lang="ts">
|
|
29
|
+
import FranceConnectBtn from '@cnamts/synapse'
|
|
30
|
+
</script>
|
|
31
|
+
`,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
17
35
|
args: {
|
|
18
36
|
href: 'https://app.franceconnect.gouv.fr/',
|
|
19
37
|
isConnectPlus: false,
|
|
@@ -39,6 +57,24 @@ export const Default: Story = {
|
|
|
39
57
|
}
|
|
40
58
|
|
|
41
59
|
export const FranceConnectPlus: Story = {
|
|
60
|
+
parameters: {
|
|
61
|
+
sourceCode: [
|
|
62
|
+
{
|
|
63
|
+
name: 'Template',
|
|
64
|
+
code: `<template>
|
|
65
|
+
<FranceConnectBtn is-connect-plus />
|
|
66
|
+
</template>
|
|
67
|
+
`,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Script',
|
|
71
|
+
code: `<script setup lang="ts">
|
|
72
|
+
import FranceConnectBtn from '@cnamts/synapse'
|
|
73
|
+
</script>
|
|
74
|
+
`,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
42
78
|
args: {
|
|
43
79
|
href: 'https://app.franceconnect.gouv.fr/',
|
|
44
80
|
isConnectPlus: true,
|
|
@@ -64,6 +100,27 @@ export const FranceConnectPlus: Story = {
|
|
|
64
100
|
}
|
|
65
101
|
|
|
66
102
|
export const DarkTheme: Story = {
|
|
103
|
+
parameters: {
|
|
104
|
+
sourceCode: [
|
|
105
|
+
{
|
|
106
|
+
name: 'Template',
|
|
107
|
+
code: `<template>
|
|
108
|
+
<FranceConnectBtn
|
|
109
|
+
is-connect-plus
|
|
110
|
+
dark
|
|
111
|
+
/>
|
|
112
|
+
</template>
|
|
113
|
+
`,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'Script',
|
|
117
|
+
code: `<script setup lang="ts">
|
|
118
|
+
import FranceConnectBtn from '@cnamts/synapse'
|
|
119
|
+
</script>
|
|
120
|
+
`,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
67
124
|
args: {
|
|
68
125
|
href: 'https://app.franceconnect.gouv.fr/',
|
|
69
126
|
isConnectPlus: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { locales } from './locales'
|
|
4
2
|
import { mdiOpenInNew } from '@mdi/js'
|
|
3
|
+
import { computed } from 'vue'
|
|
5
4
|
import { useTheme } from 'vuetify'
|
|
5
|
+
import { locales } from './locales'
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<{
|
|
8
8
|
href: string
|