@cnamts/synapse 0.0.5-alpha → 0.0.7-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/dist/design-system-v3.d.ts +487 -415
- package/dist/design-system-v3.js +2954 -2203
- package/dist/design-system-v3.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +17 -17
- package/src/assets/settings.scss +3 -0
- package/src/assets/tokens.scss +16 -16
- package/src/components/BackBtn/AccessibiliteItems.ts +0 -30
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +12 -9
- package/src/components/BackBtn/BackBtn.vue +0 -1
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +0 -30
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +1 -1
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +3 -3
- package/src/components/CollapsibleList/Accessibilite.stories.ts +4 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +55 -62
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +1 -1
- package/src/components/CookieBanner/Accessibilite.stories.ts +219 -0
- package/src/components/CookieBanner/AccessibiliteItems.ts +356 -0
- package/src/components/CookieBanner/CookieBanner.mdx +219 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +680 -0
- package/src/components/CookieBanner/CookieBanner.vue +225 -0
- package/src/components/CookieBanner/config.ts +38 -0
- package/src/components/CookieBanner/locales.ts +12 -0
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +129 -0
- package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +197 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +123 -0
- package/src/components/CookiesSelection/CookiesInformation/locales.ts +21 -0
- package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.ts +121 -0
- package/src/components/CookiesSelection/CookiesSelection.vue +127 -0
- package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +47 -0
- package/src/components/CookiesSelection/CookiesTable/headers.ts +14 -0
- package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.ts +30 -0
- package/src/components/CookiesSelection/CookiesTable/tests/__snapshots__/CookiesTable.spec.ts.snap +3 -0
- package/src/components/CookiesSelection/locales.ts +10 -0
- package/src/components/CookiesSelection/tests/CookiesSelection.spec.ts +184 -0
- package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +192 -0
- package/src/components/CookiesSelection/types.ts +15 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +0 -30
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +9 -6
- package/src/components/CopyBtn/CopyBtn.vue +0 -1
- package/src/components/Customs/SyBtnSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyBtnSelect/Accessibilite.stories.ts +193 -0
- package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +139 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +3 -2
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +30 -14
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +21 -13
- package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.stories.ts +166 -0
- package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +96 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +7 -3
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +24 -65
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +36 -4
- package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SySelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SySelect/Accessibilite.stories.ts +217 -0
- package/src/components/Customs/SySelect/AccessibiliteItems.ts +173 -0
- package/src/components/Customs/SySelect/SySelect.mdx +4 -4
- package/src/components/Customs/SySelect/SySelect.stories.ts +4 -60
- package/src/components/Customs/SySelect/SySelect.vue +35 -8
- package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyTextField/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +224 -0
- package/src/components/Customs/SyTextField/AccessibiliteItems.ts +198 -0
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +118 -7
- package/src/components/Customs/SyTextField/SyTextField.vue +27 -7
- package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +2 -1
- package/src/components/DataList/Accessibilite.mdx +14 -0
- package/src/components/DataList/Accessibilite.stories.ts +166 -0
- package/src/components/DataList/AccessibiliteItems.ts +47 -0
- package/src/components/DataList/DataList.mdx +1 -1
- package/src/components/DataList/DataList.stories.ts +10 -10
- package/src/components/DataList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DataListGroup/Accessibilite.mdx +14 -0
- package/src/components/DataListGroup/Accessibilite.stories.ts +225 -0
- package/src/components/DataListGroup/AccessibiliteItems.ts +79 -0
- package/src/components/DataListGroup/DataListGroup.mdx +1 -1
- package/src/components/DataListGroup/DataListGroup.stories.ts +7 -7
- package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DialogBox/Accessibilite.mdx +14 -0
- package/src/components/DialogBox/Accessibilite.stories.ts +189 -0
- package/src/components/DialogBox/AccessibiliteItems.ts +167 -0
- package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -31
- package/src/components/DownloadBtn/DownloadBtn.mdx +5 -6
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +25 -26
- package/src/components/ErrorPage/Accessibilite.mdx +14 -0
- package/src/components/ErrorPage/Accessibilite.stories.ts +189 -0
- package/src/components/ErrorPage/AccessibiliteItems.ts +205 -0
- package/src/components/ErrorPage/ErrorPage.vue +1 -1
- package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +4 -4
- package/src/components/FooterBar/Accessibilite.mdx +14 -0
- package/src/components/FooterBar/Accessibilite.stories.ts +223 -0
- package/src/components/FooterBar/AccessibiliteItems.ts +257 -0
- package/src/components/FooterBar/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +14 -14
- package/src/components/FooterBar/FooterBar.vue +86 -75
- package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +22 -20
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +0 -30
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +5 -4
- package/src/components/HeaderBar/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/AccessibiliteItems.ts +194 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +19 -12
- package/src/components/HeaderBar/HeaderBar.vue +9 -12
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +174 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +1 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +1 -1
- package/src/components/HeaderLoading/Accessibilite.mdx +14 -0
- package/src/components/HeaderLoading/Accessibilite.stories.ts +167 -0
- package/src/components/HeaderLoading/AccessibiliteItems.ts +29 -0
- package/src/components/HeaderLoading/HeaderLoading.mdx +1 -1
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +1 -1
- package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +104 -32
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +35 -33
- package/src/components/HeaderToolbar/Accessibilite.mdx +14 -0
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +203 -0
- package/src/components/HeaderToolbar/AccessibiliteItems.ts +200 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +1 -1
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +2 -2
- package/src/components/HeaderToolbar/HeaderToolbar.vue +24 -1
- package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +3 -1
- package/src/components/LangBtn/AccessibiliteItems.ts +0 -31
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +4 -4
- package/src/components/LangBtn/LangBtn.vue +3 -2
- package/src/components/Logo/Accessibilite.mdx +14 -0
- package/src/components/Logo/Accessibilite.stories.ts +223 -0
- package/src/components/Logo/AccessibiliteItems.ts +155 -0
- package/src/components/Logo/Logo.mdx +1 -1
- package/src/components/Logo/Logo.stories.ts +8 -8
- package/src/components/Logo/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LogoBrandSection/Accessibilite.mdx +14 -0
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +223 -0
- package/src/components/LogoBrandSection/AccessibiliteItems.ts +194 -0
- package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/MaintenancePage/Accessibilite.mdx +14 -0
- package/src/components/MaintenancePage/Accessibilite.stories.ts +189 -0
- package/src/components/MaintenancePage/AccessibiliteItems.ts +173 -0
- package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/Accessibilite.mdx +14 -0
- package/src/components/NirField/Accessibilite.stories.ts +214 -0
- package/src/components/NirField/AccessibiliteItems.ts +243 -0
- package/src/components/NirField/NirField.mdx +213 -0
- package/src/components/NirField/NirField.stories.ts +412 -0
- package/src/components/NirField/NirField.vue +453 -0
- package/src/components/NirField/config.ts +16 -0
- package/src/components/NirField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/locales.ts +12 -0
- package/src/components/NirField/nirValidation.ts +42 -0
- package/src/components/NirField/tests/NirField.spec.ts +120 -0
- package/src/components/NotFoundPage/Accessibilite.mdx +14 -0
- package/src/components/NotFoundPage/Accessibilite.stories.ts +190 -0
- package/src/components/NotFoundPage/AccessibiliteItems.ts +205 -0
- package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +4 -4
- package/src/components/NotificationBar/AccessibiliteItems.ts +0 -30
- package/src/components/NotificationBar/NotificationBar.mdx +1 -1
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +9 -9
- package/src/components/PageContainer/PageContainer.vue +24 -18
- package/src/components/PageContainer/tests/PageContainer.spec.ts +2 -2
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +2 -2
- package/src/components/PhoneField/Accessibilite.mdx +14 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +216 -0
- package/src/components/PhoneField/AccessibiliteItems.ts +238 -0
- package/src/components/PhoneField/PhoneField.mdx +1 -1
- package/src/components/PhoneField/PhoneField.stories.ts +2 -2
- package/src/components/PhoneField/PhoneField.vue +0 -1
- package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +1 -1
- package/src/components/SkipLink/SkipLink.stories.ts +2 -2
- package/src/components/SocialMediaLinks/Accessibilite.mdx +14 -0
- package/src/components/SocialMediaLinks/Accessibilite.stories.ts +170 -0
- package/src/components/SocialMediaLinks/AccessibiliteItems.ts +160 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +1 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +1 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +7 -1
- package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
- package/src/components/SubHeader/Accessibilite.mdx +14 -0
- package/src/components/SubHeader/Accessibilite.stories.ts +166 -0
- package/src/components/SubHeader/AccessibiliteItems.ts +146 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -1
- package/src/components/SubHeader/SubHeader.stories.ts +17 -14
- package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SyAlert/Accessibilite.mdx +14 -0
- package/src/components/{Alert → SyAlert}/Accessibilite.stories.ts +1 -1
- package/src/components/{Alert → SyAlert}/AccessibiliteItems.ts +2 -32
- package/src/components/{Alert/Alert.mdx → SyAlert/SyAlert.mdx} +9 -9
- package/src/components/{Alert/Alert.stories.ts → SyAlert/SyAlert.stories.ts} +22 -22
- package/src/components/{Alert/Alert.vue → SyAlert/SyAlert.vue} +7 -0
- package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/{Alert/tests/Alert.spec.ts → SyAlert/tests/SyAlert.spec.ts} +5 -5
- package/src/components/{Alert/tests/__snapshots__/Alert.spec.ts.snap → SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap} +2 -2
- package/src/components/UserMenuBtn/Accessibilite.mdx +14 -0
- package/src/components/UserMenuBtn/Accessibilite.stories.ts +189 -0
- package/src/components/UserMenuBtn/AccessibiliteItems.ts +155 -0
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +17 -17
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +121 -19
- package/src/components/UserMenuBtn/UserMenuBtn.vue +25 -29
- package/src/components/UserMenuBtn/config.ts +1 -1
- package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/index.ts +11 -4
- package/src/composables/rules/tests/useFieldValidation.spec.ts +60 -58
- package/src/composables/rules/useFieldValidation.ts +65 -28
- package/src/main.ts +1 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +67 -79
- package/src/stories/GuideDuDev/components.stories.ts +5 -5
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/Guidelines/Vuetify/Vuetify.mdx +11 -0
- package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +138 -0
- package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +350 -0
- /package/src/components/{Alert → CookieBanner}/Accessibilite.mdx +0 -0
- /package/src/components/{Alert → CookieBanner}/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/components/{Alert → SyAlert}/locales.ts +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
|
+
|
|
3
|
+
export const AccessibiliteItemsIndeterminate = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Catégorie 3 : Couleurs',
|
|
6
|
+
subtitle: '3.1 Dans chaque page web, l’information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?',
|
|
7
|
+
items: [
|
|
8
|
+
{
|
|
9
|
+
precision: '3.1.2 Pour chaque indication de couleur donnée par un texte, l’information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?',
|
|
10
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.1.2',
|
|
11
|
+
solution: [{
|
|
12
|
+
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 ;',
|
|
13
|
+
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.',
|
|
14
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
15
|
+
}],
|
|
16
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
17
|
+
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Catégorie 9 : Structuration de l’information',
|
|
24
|
+
subtitle: '9.1 Dans chaque page web, l’information est-elle structurée par l’utilisation appropriée de titres',
|
|
25
|
+
items: [
|
|
26
|
+
{
|
|
27
|
+
|
|
28
|
+
precision: '9.1.1 Dans chaque page web, la hiérarchie entre les titres (balise <hx> ou balise possédant un attribut WAI-ARIA role="heading" associé à un attribut WAI-ARIA aria-level) est-elle pertinente ?',
|
|
29
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#9.1.1',
|
|
30
|
+
solution: [{
|
|
31
|
+
info1: '1. Retrouver dans le document les titres (balise <hx> ou balise possédant un attribut WAI-ARIA role="heading" associé à un attribut WAI-ARIA aria-level) ;',
|
|
32
|
+
info2: '2. Vérifier que la hiérarchie entre les titres est pertinente ;',
|
|
33
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
34
|
+
}],
|
|
35
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: 'Catégorie 10 : Présentation de l’information',
|
|
43
|
+
subtitle: '10.1 Dans le site web, des feuilles de styles sont-elles utilisées pour contrôler la présentation de l’information ? ?',
|
|
44
|
+
items: [
|
|
45
|
+
|
|
46
|
+
{
|
|
47
|
+
precision: '10.1.1 Dans chaque page web, les balises servant à la présentation de l’information ne doivent pas être présentes dans le code source généré des pages. Cette règle est-elle respectée ? ',
|
|
48
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#10.1.1',
|
|
49
|
+
solution: [{
|
|
50
|
+
info1: '1. Vérifier l’absence des éléments de présentation <basefont>, <big>, <blink>, <center>, <font>, <marquee>, <s>, <strike>, <tt> ; ',
|
|
51
|
+
info2: '2. Vérifier l’absence de l’élément <u> uniquement si le DOCTYPE du document ne correspond pas à HTML 5 ; ',
|
|
52
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
53
|
+
}],
|
|
54
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
export const AccessibiliteItemsValidated = [
|
|
63
|
+
{
|
|
64
|
+
title: 'Catégorie 1 : Images',
|
|
65
|
+
subtitle: '1.2 Chaque image de décoration est-elle correctement ignorée par les technologies d’assistance ?',
|
|
66
|
+
items: [
|
|
67
|
+
{
|
|
68
|
+
|
|
69
|
+
precision: '1.2.4 Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ? '
|
|
70
|
+
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
71
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
72
|
+
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
73
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’attribut title.',
|
|
74
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.2.4',
|
|
75
|
+
solution: [{
|
|
76
|
+
info1: '1. Pour chaque image, vérifier que l’élément <svg> ne possède pas d’attributs aria-labelledby ou aria-label et qu’il :'
|
|
77
|
+
+ ' Possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
78
|
+
+ ' Et est dépourvu d’alternative textuelle (ainsi que ses éléments enfants) ;'
|
|
79
|
+
+ ' Et ne contient pas d’éléments <title> et <desc> à moins que vides de contenu ;'
|
|
80
|
+
+ ' Et est dépourvu d’attribut title (ainsi que ses éléments enfants).'
|
|
81
|
+
+ ' 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).',
|
|
82
|
+
info2: '2. Sinon, vérifier la présence d’un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités',
|
|
83
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé.',
|
|
84
|
+
}],
|
|
85
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
title: 'Catégorie 3 : Couleurs',
|
|
93
|
+
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é?',
|
|
94
|
+
items: [
|
|
95
|
+
{
|
|
96
|
+
precision: '3.2.1 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.',
|
|
97
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
98
|
+
solution: [{
|
|
99
|
+
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 ;',
|
|
100
|
+
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.',
|
|
101
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
102
|
+
}],
|
|
103
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
precision: '3.2.4 Dans chaque page web, le texte et le texte en image en gras d’une taille restituée supérieure ou égale à 18,5px vérifient-ils une de ces conditions (hors cas particuliers) ? '
|
|
108
|
+
+ 'Le rapport de contraste entre le texte et son arrière-plan est de 3:1, au moins ; '
|
|
109
|
+
+ 'Un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 3:1, au moins. ',
|
|
110
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.4',
|
|
111
|
+
solution: [{
|
|
112
|
+
info1: '1. Retrouver dans le document les textes et les textes en image en gras d’une taille restituée supérieure ou égale à 18,5px qui pourraient poser des problèmes de contraste ; ',
|
|
113
|
+
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 3:1, au moins ; Soit un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 3:1, au moins. ',
|
|
114
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
115
|
+
}],
|
|
116
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
117
|
+
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: 'Catégorie 7 : Scripts',
|
|
124
|
+
subtitle: '7.1 Chaque script est-il, si nécessaire, compatible avec les technologies d’assistance ?',
|
|
125
|
+
items: [
|
|
126
|
+
|
|
127
|
+
{
|
|
128
|
+
precision: ' 7.1.3 Chaque script qui génère ou contrôle un composant d’interface vérifie-t-il ces conditions : '
|
|
129
|
+
+ 'Le composant possède un nom pertinent ;'
|
|
130
|
+
+ 'Le nom accessible du composant contient au moins l’intitulé visible ;'
|
|
131
|
+
+ 'Le composant possède un rôle pertinent.',
|
|
132
|
+
|
|
133
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#7.1.3',
|
|
134
|
+
solution: [{
|
|
135
|
+
info1: '1. Pour chacun des composants d’interface ayant validé le test 7.1.1, vérifier que le composant d’interface possède : ',
|
|
136
|
+
info2: '2. Un nom pertinent (intitulé visible) et un rôle pertinent',
|
|
137
|
+
info3: '3. Si le composant d’interface possède un nom accessible, vérifier que ce nom est pertinent et contient au moins l’intitulé visible.',
|
|
138
|
+
}],
|
|
139
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
140
|
+
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
]
|
|
@@ -117,7 +117,7 @@ export const Default: Story = {
|
|
|
117
117
|
name: 'Script',
|
|
118
118
|
code: `
|
|
119
119
|
<script setup lang="ts">
|
|
120
|
-
import SubHeader from '@cnamts/synapse'
|
|
120
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
121
121
|
</script>
|
|
122
122
|
`,
|
|
123
123
|
},
|
|
@@ -197,7 +197,7 @@ export const DataList: Story = {
|
|
|
197
197
|
name: 'Script',
|
|
198
198
|
code: `
|
|
199
199
|
<script setup lang="ts">
|
|
200
|
-
import SubHeader from '@cnamts/synapse'
|
|
200
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
201
201
|
|
|
202
202
|
const items = [
|
|
203
203
|
{
|
|
@@ -294,9 +294,10 @@ export const ActionBtn: Story = {
|
|
|
294
294
|
name: 'Script',
|
|
295
295
|
code: `
|
|
296
296
|
<script setup lang="ts">
|
|
297
|
-
import SubHeader from '@cnamts/synapse'
|
|
297
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
298
|
+
import { ref } from 'vue'
|
|
298
299
|
|
|
299
|
-
const items = [
|
|
300
|
+
const items = ref([
|
|
300
301
|
{
|
|
301
302
|
title: 'Informations patient',
|
|
302
303
|
items: [
|
|
@@ -317,10 +318,12 @@ export const ActionBtn: Story = {
|
|
|
317
318
|
{ key: 'Dernière modification', value: '04/06/2020' },
|
|
318
319
|
],
|
|
319
320
|
},
|
|
320
|
-
]
|
|
321
|
+
])
|
|
321
322
|
|
|
322
323
|
const updateInfo = (eventValue: { dataListIndex: number, itemIndex: number }) => {
|
|
323
|
-
|
|
324
|
+
if (items) {
|
|
325
|
+
items[eventValue.dataListIndex].items[eventValue.itemIndex].value = '25/09/1970'
|
|
326
|
+
}
|
|
324
327
|
}
|
|
325
328
|
</script>
|
|
326
329
|
`,
|
|
@@ -401,7 +404,7 @@ export const HtmlValue: Story = {
|
|
|
401
404
|
name: 'Script',
|
|
402
405
|
code: `
|
|
403
406
|
<script setup lang="ts">
|
|
404
|
-
import SubHeader from '@cnamts/synapse'
|
|
407
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
405
408
|
|
|
406
409
|
const items = [
|
|
407
410
|
{
|
|
@@ -499,7 +502,7 @@ export const Loading: Story = {
|
|
|
499
502
|
name: 'Script',
|
|
500
503
|
code: `
|
|
501
504
|
<script setup lang="ts">
|
|
502
|
-
import SubHeader from '@cnamts/synapse'
|
|
505
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
503
506
|
|
|
504
507
|
const items = [
|
|
505
508
|
{
|
|
@@ -609,7 +612,7 @@ export const SlotAdditionalInformations: Story = {
|
|
|
609
612
|
name: 'Script',
|
|
610
613
|
code: `
|
|
611
614
|
<script setup lang="ts">
|
|
612
|
-
import SubHeader from '@cnamts/synapse'
|
|
615
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
613
616
|
</script>
|
|
614
617
|
`,
|
|
615
618
|
},
|
|
@@ -694,7 +697,7 @@ export const SlotBackBtn: Story = {
|
|
|
694
697
|
name: 'Script',
|
|
695
698
|
code: `
|
|
696
699
|
<script setup lang="ts">
|
|
697
|
-
import SubHeader from '@cnamts/synapse'
|
|
700
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
698
701
|
</script>
|
|
699
702
|
`,
|
|
700
703
|
},
|
|
@@ -765,7 +768,7 @@ export const SlotBackBtnIcon: Story = {
|
|
|
765
768
|
name: 'Script',
|
|
766
769
|
code: `
|
|
767
770
|
<script setup lang="ts">
|
|
768
|
-
import SubHeader from '@cnamts/synapse'
|
|
771
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
769
772
|
import { mdiStepBackward } from '@mdi/js'
|
|
770
773
|
|
|
771
774
|
const backArrowIcon = ref(mdiStepBackward)
|
|
@@ -829,7 +832,7 @@ export const SlotTitle: Story = {
|
|
|
829
832
|
name: 'Script',
|
|
830
833
|
code: `
|
|
831
834
|
<script setup lang="ts">
|
|
832
|
-
import SubHeader from '@cnamts/synapse'
|
|
835
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
833
836
|
</script>
|
|
834
837
|
`,
|
|
835
838
|
},
|
|
@@ -891,7 +894,7 @@ export const SlotSubTitle: Story = {
|
|
|
891
894
|
name: 'Script',
|
|
892
895
|
code: `
|
|
893
896
|
<script setup lang="ts">
|
|
894
|
-
import SubHeader from '@cnamts/synapse'
|
|
897
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
895
898
|
</script>
|
|
896
899
|
`,
|
|
897
900
|
},
|
|
@@ -954,7 +957,7 @@ export const SlotRightContent: Story = {
|
|
|
954
957
|
name: 'Script',
|
|
955
958
|
code: `
|
|
956
959
|
<script setup lang="ts">
|
|
957
|
-
import SubHeader from '@cnamts/synapse'
|
|
960
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
958
961
|
|
|
959
962
|
import { mdiClose, mdiContentCopy } from '@mdi/js'
|
|
960
963
|
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={AccessStories} />
|
|
5
|
+
|
|
6
|
+
Accessibilité
|
|
7
|
+
=============
|
|
8
|
+
<Story of={AccessStories.Legende} />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
<Story of={AccessStories.AccessibilitePanel} />
|
|
14
|
+
<br />
|
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
2
|
|
|
3
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
4
|
|
|
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
5
|
{
|
|
36
6
|
title: 'Catégorie 10 : Présentation de l’information',
|
|
37
7
|
subtitle: '10.8 Pour chaque page Web, les contenus cachés ont-ils vocation à être ignorés par les technologies d’assistance ?',
|
|
@@ -61,7 +31,7 @@ export const AccessibiliteItemsValidated = [
|
|
|
61
31
|
items: [
|
|
62
32
|
|
|
63
33
|
{
|
|
64
|
-
precision: 'Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ?'
|
|
34
|
+
precision: '1.2.4 Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ?'
|
|
65
35
|
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
66
36
|
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
67
37
|
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
@@ -88,7 +58,7 @@ export const AccessibiliteItemsValidated = [
|
|
|
88
58
|
items: [
|
|
89
59
|
{
|
|
90
60
|
|
|
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.',
|
|
61
|
+
precision: '3.2.1 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
62
|
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
93
63
|
solution: [{
|
|
94
64
|
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 ;',
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as SyAlertStories from './SyAlert.stories';
|
|
4
4
|
|
|
5
|
-
<Meta of={
|
|
5
|
+
<Meta of={SyAlertStories} />
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# SyAlert
|
|
8
8
|
|
|
9
|
-
Le composant `
|
|
9
|
+
Le composant `SyAlert` est utilisé pour afficher une alerte à l’utilisateur.
|
|
10
10
|
|
|
11
|
-
<Canvas of={
|
|
11
|
+
<Canvas of={SyAlertStories.Default} />
|
|
12
12
|
|
|
13
13
|
# API
|
|
14
14
|
|
|
15
|
-
<Controls of={
|
|
15
|
+
<Controls of={SyAlertStories.Default} />
|
|
16
16
|
|
|
17
17
|
# Exemple d'utilisation
|
|
18
18
|
|
|
19
19
|
<Source dark code={`
|
|
20
20
|
<script setup lang="ts">
|
|
21
|
-
import
|
|
21
|
+
import { SyAlert } from '@cnamts/synapse'
|
|
22
22
|
import { ref } from 'vue'
|
|
23
23
|
|
|
24
24
|
const showAlert = ref(true);
|
|
@@ -26,9 +26,9 @@ const showAlert = ref(true);
|
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
28
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
29
|
-
<
|
|
29
|
+
<SyAlert v-model="showAlert" type="warning" variant="tonal" :closable="true">
|
|
30
30
|
<template #default>This is a warning alert</template>
|
|
31
|
-
</
|
|
31
|
+
</SyAlert>
|
|
32
32
|
|
|
33
33
|
<VBtn v-if="!showAlert" color="primary" @click="showAlert = true" class="ma-6">Réinitialiser</VBtn>
|
|
34
34
|
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
-
import
|
|
2
|
+
import SyAlert from './SyAlert.vue'
|
|
3
3
|
import { VBtn } from 'vuetify/components'
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: 'Composants/Feedback/
|
|
7
|
-
component:
|
|
6
|
+
title: 'Composants/Feedback/SyAlert',
|
|
7
|
+
component: SyAlert,
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: 'fullscreen',
|
|
10
10
|
controls: { exclude: ['prependIcon', 'dismissAlert'] },
|
|
@@ -24,7 +24,7 @@ const meta = {
|
|
|
24
24
|
default: 'outlined',
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
-
} as Meta<typeof
|
|
27
|
+
} as Meta<typeof SyAlert>
|
|
28
28
|
|
|
29
29
|
export default meta
|
|
30
30
|
|
|
@@ -37,9 +37,9 @@ export const Default: Story = {
|
|
|
37
37
|
name: 'Template',
|
|
38
38
|
code: `<template>
|
|
39
39
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
40
|
-
<
|
|
40
|
+
<SyAlert v-model="showAlert" type="success" variant="tonal" :closable="true">
|
|
41
41
|
<template #default>This is a success alert</template>
|
|
42
|
-
</
|
|
42
|
+
</SyAlert>
|
|
43
43
|
|
|
44
44
|
<VBtn v-if="!showAlert" color="primary" @click="showAlert = true">
|
|
45
45
|
Réinitialiser
|
|
@@ -51,7 +51,7 @@ export const Default: Story = {
|
|
|
51
51
|
{
|
|
52
52
|
name: 'Script',
|
|
53
53
|
code: `<script setup lang="ts">
|
|
54
|
-
import
|
|
54
|
+
import { SyAlert } from '@cnamts/synapse'
|
|
55
55
|
import { ref } from 'vue'
|
|
56
56
|
|
|
57
57
|
const showAlert = ref(true);
|
|
@@ -69,15 +69,15 @@ export const Default: Story = {
|
|
|
69
69
|
},
|
|
70
70
|
render: (args) => {
|
|
71
71
|
return {
|
|
72
|
-
components: {
|
|
72
|
+
components: { SyAlert, VBtn },
|
|
73
73
|
setup() {
|
|
74
74
|
return { args }
|
|
75
75
|
},
|
|
76
76
|
template: `
|
|
77
77
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
78
|
-
<
|
|
78
|
+
<SyAlert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
79
79
|
<template #default>{{ args.default }}</template>
|
|
80
|
-
</
|
|
80
|
+
</SyAlert>
|
|
81
81
|
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
82
82
|
Réinitialiser
|
|
83
83
|
</VBtn>
|
|
@@ -94,9 +94,9 @@ export const Outlined: Story = {
|
|
|
94
94
|
name: 'Template',
|
|
95
95
|
code: `<template>
|
|
96
96
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
97
|
-
<
|
|
97
|
+
<SyAlert v-model="showAlert" type="warning" variant="outlined" :closable="true">
|
|
98
98
|
<template #default>This is a warning alert</template>
|
|
99
|
-
</
|
|
99
|
+
</SyAlert>
|
|
100
100
|
|
|
101
101
|
<VBtn v-if="!showAlert" color="primary" @click="showAlert = true">
|
|
102
102
|
Réinitialiser
|
|
@@ -108,7 +108,7 @@ export const Outlined: Story = {
|
|
|
108
108
|
{
|
|
109
109
|
name: 'Script',
|
|
110
110
|
code: `<script setup lang="ts">
|
|
111
|
-
import
|
|
111
|
+
import { SyAlert } from '@cnamts/synapse'
|
|
112
112
|
import { ref } from 'vue'
|
|
113
113
|
|
|
114
114
|
const showAlert = ref(true);
|
|
@@ -125,15 +125,15 @@ export const Outlined: Story = {
|
|
|
125
125
|
},
|
|
126
126
|
render: (args) => {
|
|
127
127
|
return {
|
|
128
|
-
components: {
|
|
128
|
+
components: { SyAlert, VBtn },
|
|
129
129
|
setup() {
|
|
130
130
|
return { args }
|
|
131
131
|
},
|
|
132
132
|
template: `
|
|
133
133
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
134
|
-
<
|
|
134
|
+
<SyAlert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
135
135
|
<template #default>{{ args.default }}</template>
|
|
136
|
-
</
|
|
136
|
+
</SyAlert>
|
|
137
137
|
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
138
138
|
Réinitialiser
|
|
139
139
|
</VBtn>
|
|
@@ -150,10 +150,10 @@ export const SlotIcon: Story = {
|
|
|
150
150
|
name: 'Template',
|
|
151
151
|
code: `<template>
|
|
152
152
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
153
|
-
<
|
|
153
|
+
<SyAlert v-model="showAlert" type="success" variant="tonal" :closable="true">
|
|
154
154
|
<template #default>This is a success alert</template>
|
|
155
155
|
<template #icon>{{ icon }}</template>
|
|
156
|
-
</
|
|
156
|
+
</SyAlert>
|
|
157
157
|
|
|
158
158
|
<VBtn v-if="!showAlert" color="primary" @click="showAlert = true">
|
|
159
159
|
Réinitialiser
|
|
@@ -165,7 +165,7 @@ export const SlotIcon: Story = {
|
|
|
165
165
|
{
|
|
166
166
|
name: 'Script',
|
|
167
167
|
code: `<script setup lang="ts">
|
|
168
|
-
import
|
|
168
|
+
import { SyAlert } from '@cnamts/synapse'
|
|
169
169
|
import { ref } from 'vue'
|
|
170
170
|
import { mdiAccountCheck } from '@mdi/js'
|
|
171
171
|
|
|
@@ -185,16 +185,16 @@ export const SlotIcon: Story = {
|
|
|
185
185
|
},
|
|
186
186
|
render: (args) => {
|
|
187
187
|
return {
|
|
188
|
-
components: {
|
|
188
|
+
components: { SyAlert, VBtn },
|
|
189
189
|
setup() {
|
|
190
190
|
return { args }
|
|
191
191
|
},
|
|
192
192
|
template: `
|
|
193
193
|
<div class="d-flex flex-wrap align-center justify-center">
|
|
194
|
-
<
|
|
194
|
+
<SyAlert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
195
195
|
<template #default>{{ args.default }}</template>
|
|
196
196
|
<template #icon>{{ args.icon }}</template>
|
|
197
|
-
</
|
|
197
|
+
</SyAlert>
|
|
198
198
|
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
199
199
|
Réinitialiser
|
|
200
200
|
</VBtn>
|
|
@@ -2,12 +2,12 @@ import { describe, it, expect } from 'vitest'
|
|
|
2
2
|
import { mount } from '@vue/test-utils'
|
|
3
3
|
import { vuetify } from '@tests/unit/setup'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import SyAlert from '../SyAlert.vue'
|
|
6
6
|
import { VBtn } from 'vuetify/components'
|
|
7
7
|
|
|
8
8
|
describe('Alert', () => {
|
|
9
9
|
it('render correctly', async () => {
|
|
10
|
-
const wrapper = mount(
|
|
10
|
+
const wrapper = mount(SyAlert, {
|
|
11
11
|
props: {
|
|
12
12
|
title: 'title',
|
|
13
13
|
message: 'message',
|
|
@@ -25,7 +25,7 @@ describe('Alert', () => {
|
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
it('show and hide correctly when modelValue is updated', async () => {
|
|
28
|
-
const wrapper = mount(
|
|
28
|
+
const wrapper = mount(SyAlert, {
|
|
29
29
|
props: {
|
|
30
30
|
title: 'title',
|
|
31
31
|
message: 'message',
|
|
@@ -57,7 +57,7 @@ describe('Alert', () => {
|
|
|
57
57
|
})
|
|
58
58
|
|
|
59
59
|
it('hide when the close btn is clicked', async () => {
|
|
60
|
-
const wrapper = mount(
|
|
60
|
+
const wrapper = mount(SyAlert, {
|
|
61
61
|
props: {
|
|
62
62
|
title: 'title',
|
|
63
63
|
message: 'message',
|
|
@@ -84,7 +84,7 @@ describe('Alert', () => {
|
|
|
84
84
|
})
|
|
85
85
|
|
|
86
86
|
it('prependIcon computed property', async () => {
|
|
87
|
-
const wrapper = mount(
|
|
87
|
+
const wrapper = mount(SyAlert, {
|
|
88
88
|
props: {
|
|
89
89
|
title: 'title',
|
|
90
90
|
message: 'message',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Alert > render correctly 1`] = `
|
|
4
|
-
"<div data-v-
|
|
4
|
+
"<div data-v-4c7c43b0="" class="v-alert v-alert--border v-alert--border-start v-theme--light text-success v-alert--density-default v-alert--variant-tonal alert alert--success" role="alert" message="message">
|
|
5
5
|
<!----><span class="v-alert__underlay"></span>
|
|
6
6
|
<div class="v-alert__border"></div>
|
|
7
|
-
<div class="v-alert__prepend"><i data-v-
|
|
7
|
+
<div class="v-alert__prepend"><i data-v-4c7c43b0="" class="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z mdi v-icon notranslate v-theme--light alert-icon" style="font-size: 1.5rem; height: 1.5rem; width: 1.5rem;" aria-hidden="true"></i></div>
|
|
8
8
|
<div class="v-alert__content">
|
|
9
9
|
<div class="v-alert-title">title</div>
|
|
10
10
|
<!---->slot content
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={AccessStories} />
|
|
5
|
+
|
|
6
|
+
Accessibilité
|
|
7
|
+
=============
|
|
8
|
+
<Story of={AccessStories.Legende} />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
<Story of={AccessStories.AccessibilitePanel} />
|
|
14
|
+
<br />
|