@cnamts/synapse 0.0.4-alpha → 0.0.6-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 +1277 -499
- package/dist/design-system-v3.js +4193 -1573
- package/dist/design-system-v3.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +18 -17
- package/src/assets/settings.scss +3 -0
- package/src/assets/tokens.scss +16 -17
- package/src/components/BackBtn/Accessibilite.mdx +14 -0
- package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackBtn/AccessibiliteItems.ts +102 -0
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +8 -8
- package/src/components/BackBtn/BackBtn.vue +0 -1
- package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +52 -0
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +1 -1
- package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
- package/src/components/CollapsibleList/Accessibilite.stories.ts +170 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +122 -0
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +1 -1
- package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CookieBanner/Accessibilite.mdx +14 -0
- 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 +678 -0
- package/src/components/CookieBanner/CookieBanner.vue +225 -0
- package/src/components/CookieBanner/config.ts +38 -0
- package/src/components/CookieBanner/constants/ExpertiseLevelEnum.ts +4 -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/Accessibilite.mdx +14 -0
- package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +105 -0
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +4 -4
- package/src/components/CopyBtn/CopyBtn.vue +0 -1
- package/src/components/CopyBtn/config.ts +2 -0
- package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
- 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 +45 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +662 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +254 -0
- package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -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 +41 -0
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +30 -83
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +46 -6
- package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -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/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +9 -8
- package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -79
- package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +44 -13
- package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
- 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 +44 -0
- package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +145 -34
- package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +27 -7
- package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
- package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +5 -6
- 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/DialogBox.mdx +14 -0
- package/src/components/DialogBox/DialogBox.stories.ts +798 -0
- package/src/components/DialogBox/DialogBox.vue +181 -0
- package/src/components/DialogBox/config.ts +25 -0
- package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DialogBox/locales.ts +5 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -31
- package/src/components/DownloadBtn/DownloadBtn.mdx +3 -3
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +6 -6
- 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.mdx +21 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
- package/src/components/ErrorPage/ErrorPage.vue +93 -0
- package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ErrorPage/locales.ts +5 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
- 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 +556 -8
- package/src/components/FooterBar/FooterBar.vue +80 -73
- package/src/components/FooterBar/config.ts +2 -3
- package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
- package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +24 -22
- package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +169 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +3 -3
- package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
- 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 +60 -2
- package/src/components/HeaderBar/HeaderBar.vue +1 -9
- 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/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.mdx +6 -6
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +35 -33
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
- 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 +3 -2
- package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
- package/src/components/LangBtn/Accessibilite.mdx +14 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +168 -0
- package/src/components/LangBtn/AccessibiliteItems.ts +101 -0
- 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/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
- package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
- 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/MaintenancePage.mdx +11 -0
- package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
- package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
- package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/MaintenancePage/index.ts +3 -0
- package/src/components/MaintenancePage/locales.ts +5 -0
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -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 +216 -0
- package/src/components/NirField/NirField.stories.ts +359 -0
- package/src/components/NirField/NirField.vue +450 -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 +119 -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/NotFoundPage.mdx +19 -0
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
- package/src/components/NotFoundPage/assets/not-found.svg +1 -0
- package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotFoundPage/locales.ts +6 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
- package/src/components/NotificationBar/Accessibilite.mdx +14 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
- package/src/components/NotificationBar/AccessibiliteItems.ts +144 -0
- package/src/components/NotificationBar/NotificationBar.mdx +1 -1
- package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotificationBar/options.ts +1 -0
- package/src/components/PageContainer/Accessibilite.mdx +14 -0
- package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
- package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +4 -4
- package/src/components/PageContainer/PageContainer.vue +16 -15
- package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
- 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 +5 -6
- package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
- package/src/components/SkipLink/Accessibilite.mdx +14 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
- package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
- package/src/components/SkipLink/SkipLink.stories.ts +2 -2
- package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
- 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 +18 -14
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +3 -2
- package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
- 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 +11 -11
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SyAlert/Accessibilite.mdx +14 -0
- package/src/components/SyAlert/Accessibilite.stories.ts +166 -0
- package/src/components/SyAlert/AccessibiliteItems.ts +122 -0
- 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/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 +35 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +540 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +101 -0
- package/src/components/UserMenuBtn/config.ts +24 -0
- package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
- package/src/components/index.ts +19 -4
- package/src/composables/index.ts +8 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +84 -0
- package/src/composables/rules/useFieldValidation.ts +90 -0
- package/src/designTokens/index.ts +2 -0
- package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
- package/src/main.ts +3 -0
- package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
- package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
- package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
- package/src/stories/Fondamentaux/Elevations.mdx +14 -0
- package/src/stories/Fondamentaux/Espacements.mdx +29 -0
- package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
- package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
- package/src/stories/Fondamentaux/Typographie.mdx +58 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +120 -0
- package/src/stories/GuideDuDev/components.stories.ts +5 -5
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
- 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/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
- package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
- package/src/stories/Guidelines/Typo.mdx +0 -53
- /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
- /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
- /package/src/components/{Alert/Alert.vue → SyAlert/SyAlert.vue} +0 -0
- /package/src/components/{Alert → SyAlert}/locales.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
|
@@ -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,7 +294,7 @@ 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
298
|
|
|
299
299
|
const items = [
|
|
300
300
|
{
|
|
@@ -401,7 +401,7 @@ export const HtmlValue: Story = {
|
|
|
401
401
|
name: 'Script',
|
|
402
402
|
code: `
|
|
403
403
|
<script setup lang="ts">
|
|
404
|
-
import SubHeader from '@cnamts/synapse'
|
|
404
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
405
405
|
|
|
406
406
|
const items = [
|
|
407
407
|
{
|
|
@@ -499,7 +499,7 @@ export const Loading: Story = {
|
|
|
499
499
|
name: 'Script',
|
|
500
500
|
code: `
|
|
501
501
|
<script setup lang="ts">
|
|
502
|
-
import SubHeader from '@cnamts/synapse'
|
|
502
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
503
503
|
|
|
504
504
|
const items = [
|
|
505
505
|
{
|
|
@@ -609,7 +609,7 @@ export const SlotAdditionalInformations: Story = {
|
|
|
609
609
|
name: 'Script',
|
|
610
610
|
code: `
|
|
611
611
|
<script setup lang="ts">
|
|
612
|
-
import SubHeader from '@cnamts/synapse'
|
|
612
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
613
613
|
</script>
|
|
614
614
|
`,
|
|
615
615
|
},
|
|
@@ -694,7 +694,7 @@ export const SlotBackBtn: Story = {
|
|
|
694
694
|
name: 'Script',
|
|
695
695
|
code: `
|
|
696
696
|
<script setup lang="ts">
|
|
697
|
-
import SubHeader from '@cnamts/synapse'
|
|
697
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
698
698
|
</script>
|
|
699
699
|
`,
|
|
700
700
|
},
|
|
@@ -765,7 +765,7 @@ export const SlotBackBtnIcon: Story = {
|
|
|
765
765
|
name: 'Script',
|
|
766
766
|
code: `
|
|
767
767
|
<script setup lang="ts">
|
|
768
|
-
import SubHeader from '@cnamts/synapse'
|
|
768
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
769
769
|
import { mdiStepBackward } from '@mdi/js'
|
|
770
770
|
|
|
771
771
|
const backArrowIcon = ref(mdiStepBackward)
|
|
@@ -829,7 +829,7 @@ export const SlotTitle: Story = {
|
|
|
829
829
|
name: 'Script',
|
|
830
830
|
code: `
|
|
831
831
|
<script setup lang="ts">
|
|
832
|
-
import SubHeader from '@cnamts/synapse'
|
|
832
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
833
833
|
</script>
|
|
834
834
|
`,
|
|
835
835
|
},
|
|
@@ -891,7 +891,7 @@ export const SlotSubTitle: Story = {
|
|
|
891
891
|
name: 'Script',
|
|
892
892
|
code: `
|
|
893
893
|
<script setup lang="ts">
|
|
894
|
-
import SubHeader from '@cnamts/synapse'
|
|
894
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
895
895
|
</script>
|
|
896
896
|
`,
|
|
897
897
|
},
|
|
@@ -954,7 +954,7 @@ export const SlotRightContent: Story = {
|
|
|
954
954
|
name: 'Script',
|
|
955
955
|
code: `
|
|
956
956
|
<script setup lang="ts">
|
|
957
|
-
import SubHeader from '@cnamts/synapse'
|
|
957
|
+
import { SubHeader } from '@cnamts/synapse'
|
|
958
958
|
|
|
959
959
|
import { mdiClose, mdiContentCopy } from '@mdi/js'
|
|
960
960
|
</script>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type { DataListActionEvent, DataListGroupItems } from '../DataListGroup/types'
|
|
14
14
|
|
|
15
15
|
const props = withDefaults(defineProps<CustomizableOptions & Widthable & {
|
|
16
|
-
hideBackBtn
|
|
16
|
+
hideBackBtn?: boolean
|
|
17
17
|
backBtnText?: string
|
|
18
18
|
titleText?: string
|
|
19
19
|
subTitleText?: string
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={AccessStories} />
|
|
5
|
+
|
|
6
|
+
Accessibilité
|
|
7
|
+
=============
|
|
8
|
+
<Story of={AccessStories.Legende} />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
<Story of={AccessStories.AccessibilitePanel} />
|
|
14
|
+
<br />
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon } from 'vuetify/components'
|
|
2
|
+
import type { StoryObj } from '@storybook/vue3'
|
|
3
|
+
import { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated } from './AccessibiliteItems'
|
|
4
|
+
import { mdiCheckboxMarkedCircle, mdiLink, mdiEye } from '@mdi/js'
|
|
5
|
+
|
|
6
|
+
const checkIcon = mdiCheckboxMarkedCircle
|
|
7
|
+
const iconEye = mdiEye
|
|
8
|
+
const linkICon = mdiLink
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Composants/Feedback/SyAlert/Accessibilité',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const AccessibilitePanel: StoryObj = {
|
|
15
|
+
|
|
16
|
+
render: () => {
|
|
17
|
+
return {
|
|
18
|
+
components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon },
|
|
19
|
+
|
|
20
|
+
setup() {
|
|
21
|
+
const icon = checkIcon
|
|
22
|
+
|
|
23
|
+
return { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated, icon, linkICon, iconEye }
|
|
24
|
+
},
|
|
25
|
+
template: `
|
|
26
|
+
<div class="accessibiliteItems" style="display:flex; max-width: none !important;">
|
|
27
|
+
<v-col cols="6">
|
|
28
|
+
<div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
|
|
29
|
+
<h5>{{ AccessibiliteItemsIndeterminate.length }} critères à prendre en charge par le projet</h5>
|
|
30
|
+
<div style="display: flex; align-items: center;">
|
|
31
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
|
|
32
|
+
rounded>Tanaguru
|
|
33
|
+
</v-btn>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<v-expansion-panels value="opened" multiple>
|
|
38
|
+
<v-expansion-panel v-for="(item, index) in AccessibiliteItemsIndeterminate" :key="index" style="background-color: rgba(42, 96, 158, 0.1); margin-bottom: 10px;">
|
|
39
|
+
<v-expansion-panel-title>
|
|
40
|
+
<VIcon :icon="iconEye" style="margin-right: 5px; color:#5778b7;"/>
|
|
41
|
+
{{ item.title }}
|
|
42
|
+
</v-expansion-panel-title>
|
|
43
|
+
<v-expansion-panel-text>
|
|
44
|
+
<v-expansion-panels>
|
|
45
|
+
<v-expansion-panel>
|
|
46
|
+
<v-expansion-panel-title
|
|
47
|
+
style="font-weight: bold; font-size: 13px; line-height: 16px;">
|
|
48
|
+
{{ item.subtitle }}
|
|
49
|
+
</v-expansion-panel-title>
|
|
50
|
+
<v-expansion-panel-text>
|
|
51
|
+
<div v-for="(value, i) in item.items" :key="i">
|
|
52
|
+
<p style="font-size: 13px;line-height: 16px;">
|
|
53
|
+
{{ value.precision }}
|
|
54
|
+
</p>
|
|
55
|
+
<div v-for="element in value.solution"
|
|
56
|
+
style="margin-top:15px; font-size: 13px;line-height: 16px;">
|
|
57
|
+
<p style="font-weight: bold;">Méthodologie du test : <a
|
|
58
|
+
href="value.link" target="blank">
|
|
59
|
+
<VIcon :icon="linkICon"/>
|
|
60
|
+
</a></p>
|
|
61
|
+
|
|
62
|
+
<p>{{ element.info1 }}</p>
|
|
63
|
+
<p>{{ element.info2 }}</p>
|
|
64
|
+
<p>{{ element.info3 }}</p>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
<span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
|
|
68
|
+
</div>
|
|
69
|
+
</v-expansion-panel-text>
|
|
70
|
+
</v-expansion-panel>
|
|
71
|
+
</v-expansion-panels>
|
|
72
|
+
</v-expansion-panel-text>
|
|
73
|
+
</v-expansion-panel>
|
|
74
|
+
</v-expansion-panels>
|
|
75
|
+
</v-col>
|
|
76
|
+
<v-col cols="6">
|
|
77
|
+
<div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
|
|
78
|
+
<h5>{{ AccessibiliteItemsValidated.length }} critères pris en charge par l'équipe Design System</h5>
|
|
79
|
+
<div style="display: flex; align-items: center;">
|
|
80
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
|
|
81
|
+
rounded>Tanaguru
|
|
82
|
+
</v-btn>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<v-expansion-panels value="opened" multiple>
|
|
86
|
+
<v-expansion-panel
|
|
87
|
+
v-for="(item, index) in AccessibiliteItemsValidated"
|
|
88
|
+
:key="index" style="background-color: rgba(53,135,0,0.1); margin-bottom: 10px;">
|
|
89
|
+
<v-expansion-panel-title>
|
|
90
|
+
<VIcon color="green" :icon="icon" style="margin-right: 5px;"/>
|
|
91
|
+
{{ item.title }}
|
|
92
|
+
</v-expansion-panel-title>
|
|
93
|
+
<v-expansion-panel-text>
|
|
94
|
+
<v-expansion-panels>
|
|
95
|
+
<v-expansion-panel>
|
|
96
|
+
<v-expansion-panel-title style="font-weight: bold;font-size: 13px; line-height: 16px;">
|
|
97
|
+
{{ item.subtitle }}
|
|
98
|
+
</v-expansion-panel-title>
|
|
99
|
+
<v-expansion-panel-text>
|
|
100
|
+
<div v-for="(value, i) in item.items" :key="i">
|
|
101
|
+
<p style="font-size: 13px;line-height: 16px;">
|
|
102
|
+
{{ value.precision }}
|
|
103
|
+
</p>
|
|
104
|
+
<div v-for="element in value.solution"
|
|
105
|
+
style="margin-top:15px; font-size: 13px;line-height: 16px;">
|
|
106
|
+
<p style="font-weight: bold;">Méthodologie du test : <a
|
|
107
|
+
href="value.link" target="blank">
|
|
108
|
+
<VIcon :icon="linkICon"/>
|
|
109
|
+
</a></p>
|
|
110
|
+
<p>{{ element.info1 }}</p>
|
|
111
|
+
<p>{{ element.info2 }}</p>
|
|
112
|
+
<p>{{ element.info3 }}</p>
|
|
113
|
+
</div>
|
|
114
|
+
<span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
|
|
115
|
+
</div>
|
|
116
|
+
</v-expansion-panel-text>
|
|
117
|
+
</v-expansion-panel>
|
|
118
|
+
</v-expansion-panels>
|
|
119
|
+
</v-expansion-panel-text>
|
|
120
|
+
</v-expansion-panel>
|
|
121
|
+
</v-expansion-panels>
|
|
122
|
+
</v-col>
|
|
123
|
+
</div>
|
|
124
|
+
`,
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
tags: ['!dev'],
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const Legende: StoryObj = {
|
|
131
|
+
args: {
|
|
132
|
+
icon: checkIcon,
|
|
133
|
+
},
|
|
134
|
+
render: (args) => {
|
|
135
|
+
return {
|
|
136
|
+
components: { VIcon },
|
|
137
|
+
setup() {
|
|
138
|
+
return { args }
|
|
139
|
+
},
|
|
140
|
+
template: `
|
|
141
|
+
<p style="color: grey;font-size: 11px; margin-bottom: 12px;">Date de conception: 20/11/2024</p>
|
|
142
|
+
<div>
|
|
143
|
+
<p>Le tableau ci-dessous liste nos recommandations suivant les <a target="blank" style="color:#0C41BD;" href="https://www.numerique.gouv.fr/publications/rgaa-accessibilite/#contenu">catégories du RGAA</a>.</p>
|
|
144
|
+
<p style="margin-bottom: 12px;font-weight:bold;">Pour rappel le composant seul ne garantie pas
|
|
145
|
+
l'accessibilité du site.</p>
|
|
146
|
+
<div style="font-size: 14px">
|
|
147
|
+
<p>Nous avons deux façons de relever les problèmes d'accessibilité des composants :</p>
|
|
148
|
+
<div>
|
|
149
|
+
<v-btn variant="tonal" color="grey" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
150
|
+
Audit
|
|
151
|
+
</v-btn>
|
|
152
|
+
Problèmes relevés par le projet
|
|
153
|
+
</div>
|
|
154
|
+
<div>
|
|
155
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
156
|
+
Tanaguru
|
|
157
|
+
</v-btn>
|
|
158
|
+
Problèmes relevés par Tanaguru
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
`,
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
tags: ['!dev'],
|
|
166
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
|
+
|
|
3
|
+
export const AccessibiliteItemsIndeterminate = [
|
|
4
|
+
|
|
5
|
+
{
|
|
6
|
+
title: 'Catégorie 10 : Présentation de l’information',
|
|
7
|
+
subtitle: '10.8 Pour chaque page Web, les contenus cachés ont-ils vocation à être ignorés par les technologies d’assistance ?',
|
|
8
|
+
items: [
|
|
9
|
+
|
|
10
|
+
{
|
|
11
|
+
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.',
|
|
12
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#10.8.1',
|
|
13
|
+
solution: [{
|
|
14
|
+
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)',
|
|
15
|
+
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.',
|
|
16
|
+
info3: '3. Si c’est le cas pour chaque contenu caché, le test est validé',
|
|
17
|
+
}],
|
|
18
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
19
|
+
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
export const AccessibiliteItemsValidated = [
|
|
28
|
+
{
|
|
29
|
+
title: 'Catégorie 1 : Images',
|
|
30
|
+
subtitle: '1.2 Chaque image de décoration est-elle correctement ignorée par les technologies d’assistance ?',
|
|
31
|
+
items: [
|
|
32
|
+
|
|
33
|
+
{
|
|
34
|
+
precision: '1.2.4 Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ?'
|
|
35
|
+
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
36
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
37
|
+
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
38
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’attribut title.',
|
|
39
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.2.4',
|
|
40
|
+
solution: [{
|
|
41
|
+
info1: '1. Retrouver dans le document les images décoratives dépourvues de légende structurées au moyen d’un élément <svg> ;',
|
|
42
|
+
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 :'
|
|
43
|
+
+ ' Possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
44
|
+
+ ' Et est dépourvu d’alternative textuelle (ainsi que ses éléments enfants) ;'
|
|
45
|
+
+ ' Et ne contient pas d’éléments <title> et <desc> à moins que vides de contenu ;'
|
|
46
|
+
+ ' Et est dépourvu d’attribut title (ainsi que ses éléments enfants).',
|
|
47
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
48
|
+
}],
|
|
49
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
50
|
+
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: 'Catégorie 3 : Couleurs',
|
|
57
|
+
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é?',
|
|
58
|
+
items: [
|
|
59
|
+
{
|
|
60
|
+
|
|
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.',
|
|
62
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
63
|
+
solution: [{
|
|
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 ;',
|
|
65
|
+
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.',
|
|
66
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
67
|
+
}],
|
|
68
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
69
|
+
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
{
|
|
76
|
+
title: 'Catégorie 7 : Scripts',
|
|
77
|
+
subtitle: '7.1 Chaque script est-il, si nécessaire, compatible avec les technologies d’assistance ?',
|
|
78
|
+
items: [
|
|
79
|
+
{
|
|
80
|
+
|
|
81
|
+
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 ? '
|
|
82
|
+
+ ' 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é ;'
|
|
83
|
+
+ ' Un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités est présent dans la page ;'
|
|
84
|
+
+ ' Une alternative accessible permet d’accéder aux mêmes fonctionnalités.',
|
|
85
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#7.1.1',
|
|
86
|
+
solution: [{
|
|
87
|
+
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) ;'
|
|
88
|
+
+ ' Le composant possède un nom explicite ;'
|
|
89
|
+
+ ' 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).',
|
|
90
|
+
info2: '2. Sinon, vérifier la présence d’un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités',
|
|
91
|
+
info3: '3. Si c’est le cas le test est validé',
|
|
92
|
+
}],
|
|
93
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
94
|
+
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
{
|
|
101
|
+
title: 'Catégorie 8 : Eléments Obligatoires',
|
|
102
|
+
subtitle: '8.9 Dans chaque page web, les balises ne doivent pas être utilisées uniquement à des fins de présentation',
|
|
103
|
+
items: [
|
|
104
|
+
|
|
105
|
+
{
|
|
106
|
+
precision: ' 8.9.1 Dans chaque page web les balises (à l’exception de <div>, <span> et <table>) ne doivent pas être utilisées uniquement à des fins de présentation. Cette règle est-elle respectée',
|
|
107
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#8.9.1',
|
|
108
|
+
solution: [{
|
|
109
|
+
info1: '1. Retrouver dans le document l’ensemble des éléments sémantiques utilisés à des fins de présentation ;',
|
|
110
|
+
info2: '2. Pour chacun de ces éléments, vérifier que :'
|
|
111
|
+
+ 'L’élément est pourvu d’un attribut role=“presentation” ;'
|
|
112
|
+
+ 'L’utilisation de cet élément à des fins de présentation reste justifée',
|
|
113
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
114
|
+
}],
|
|
115
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
116
|
+
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
]
|
|
@@ -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
|