@cnamts/synapse 0.0.3-alpha → 0.0.5-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 +1461 -68
- package/dist/design-system-v3.js +4775 -1673
- package/dist/design-system-v3.umd.cjs +10 -1
- package/dist/style.css +1 -1
- package/package.json +6 -2
- package/src/assets/tokens.scss +0 -1
- package/src/components/Alert/Accessibilite.mdx +14 -0
- package/src/components/Alert/Accessibilite.stories.ts +166 -0
- package/src/components/Alert/AccessibiliteItems.ts +152 -0
- package/src/components/Alert/Alert.mdx +1 -1
- package/src/components/Alert/Alert.stories.ts +91 -1
- package/src/components/Alert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackBtn/Accessibilite.mdx +14 -0
- package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackBtn/AccessibiliteItems.ts +132 -0
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +84 -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 +82 -0
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +3 -3
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +172 -11
- package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
- package/src/components/CollapsibleList/Accessibilite.stories.ts +166 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +129 -0
- package/src/components/CollapsibleList/CollapsibleList.mdx +2 -2
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +37 -1
- package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CopyBtn/Accessibilite.mdx +14 -0
- package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +135 -0
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +120 -1
- package/src/components/CopyBtn/CopyBtn.vue +1 -1
- package/src/components/CopyBtn/config.ts +2 -0
- package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +44 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +606 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +246 -0
- package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +40 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +420 -0
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +89 -54
- package/src/components/Customs/SyInputSelect/config.ts +10 -0
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
- package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +10 -10
- package/src/components/Customs/SySelect/SySelect.stories.ts +338 -0
- package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +34 -11
- package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
- package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +403 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +110 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +93 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +57 -0
- package/src/components/Customs/SyTextField/types.d.ts +3 -0
- package/src/components/DataList/DataList.mdx +77 -0
- package/src/components/DataList/DataList.stories.ts +960 -0
- package/src/components/DataList/DataList.vue +140 -0
- package/src/components/DataList/DataListLoading/DataListLoading.vue +56 -0
- package/src/components/DataList/DataListLoading/tests/DataListLoading.spec.ts +23 -0
- package/src/components/DataList/locales.ts +3 -0
- package/src/components/DataList/tests/DataList.spec.ts +194 -0
- package/src/components/DataList/types.d.ts +23 -0
- package/src/components/DataListGroup/DataListGroup.mdx +77 -0
- package/src/components/DataListGroup/DataListGroup.stories.ts +987 -0
- package/src/components/DataListGroup/DataListGroup.vue +59 -0
- package/src/components/DataListGroup/tests/DataListGroup.spec.ts +54 -0
- package/src/components/DataListGroup/tests/data/dataListGroupItems.ts +41 -0
- package/src/components/DataListGroup/types.d.ts +15 -0
- package/src/components/DataListItem/DataListItem.vue +135 -0
- package/src/components/DataListItem/config.ts +17 -0
- package/src/components/DataListItem/locales.ts +3 -0
- package/src/components/DataListItem/tests/DataListItem.spec.ts +156 -0
- package/src/components/DataListItem/types.d.ts +23 -0
- package/src/components/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/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/Accessibilite.mdx +14 -0
- package/src/components/DownloadBtn/Accessibilite.stories.ts +166 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +129 -0
- package/src/components/DownloadBtn/DownloadBtn.mdx +5 -6
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +207 -2
- package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/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/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/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +557 -9
- package/src/components/FooterBar/config.ts +2 -3
- 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 +2 -2
- package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +199 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +58 -1
- package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/HeaderBar.mdx +164 -45
- package/src/components/HeaderBar/HeaderBar.stories.ts +618 -16
- package/src/components/HeaderBar/HeaderBar.vue +60 -22
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.mdx +433 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +1089 -0
- package/src/components/HeaderBar/{HeaderComplexMenu/HeaderComplexMenu.vue → HeaderBurgerMenu/HeaderBurgerMenu.vue} +74 -45
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.mdx +38 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +89 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/__snapshots__/HeaderMenuItem.spec.ts.snap +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.mdx +17 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +121 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/HeaderMenuSection.vue +2 -2
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/tests/HeaderMenuSection.spec.ts +1 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.mdx +43 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +261 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/HeaderSubMenu.vue +17 -3
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/tests/HeaderSubMenu.spec.ts +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +180 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +62 -25
- package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +49 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +19 -23
- package/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.ts +70 -0
- package/src/components/HeaderBar/Usages.mdx +85 -0
- package/src/components/HeaderBar/consts.scss +0 -1
- package/src/components/HeaderBar/tests/HeaderBar.spec.ts +8 -2
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +5 -10
- package/src/components/HeaderLoading/HeaderLoading.mdx +28 -0
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +62 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +45 -0
- package/src/components/HeaderLoading/tests/HeaderLoading.spec.ts +22 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +128 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +784 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +194 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +74 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/config.ts +18 -0
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +127 -0
- package/src/components/HeaderNavigationBar/types.ts +7 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +31 -0
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +343 -0
- package/src/components/HeaderToolbar/HeaderToolbar.vue +487 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +230 -0
- package/src/components/HeaderToolbar/types.d.ts +20 -0
- package/src/components/LangBtn/Accessibilite.mdx +14 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +166 -0
- package/src/components/LangBtn/AccessibiliteItems.ts +132 -0
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +125 -8
- 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/Logo.mdx +2 -2
- package/src/components/Logo/Logo.stories.ts +147 -1
- package/src/components/LogoBrandSection/LogoBrandSection.mdx +14 -0
- package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +158 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +312 -0
- package/src/components/LogoBrandSection/assets/ameli-pro.svg +1 -0
- package/src/components/LogoBrandSection/assets/ameli.svg +1 -0
- package/src/components/LogoBrandSection/assets/cnam.svg +1 -0
- package/src/components/LogoBrandSection/assets/compte-ameli.svg +1 -0
- package/src/components/LogoBrandSection/dividerDimensionsMapping.ts +14 -0
- package/src/components/LogoBrandSection/locales.ts +14 -0
- package/src/components/LogoBrandSection/secondaryLogoMapping.ts +24 -0
- package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +365 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/LogoBrandSection.spec.ts.snap +14 -0
- package/src/components/LogoBrandSection/types.ts +8 -0
- package/src/components/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/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/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/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 +174 -0
- package/src/components/NotificationBar/NotificationBar.mdx +6 -6
- package/src/components/NotificationBar/NotificationBar.stories.ts +1 -1
- package/src/components/NotificationBar/NotificationBar.vue +2 -2
- package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotificationBar/options.ts +1 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +1 -1
- 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 +86 -1
- package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PhoneField/PhoneField.mdx +49 -0
- package/src/components/PhoneField/PhoneField.stories.ts +869 -0
- package/src/components/PhoneField/PhoneField.vue +230 -0
- package/src/components/PhoneField/indicatifs.ts +104 -0
- package/src/components/PhoneField/locales.ts +4 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +179 -0
- package/src/components/SkipLink/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 +50 -1
- package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +33 -2
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +38 -1
- 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/SubHeader.mdx +31 -0
- package/src/components/SubHeader/SubHeader.stories.ts +1032 -0
- package/src/components/SubHeader/SubHeader.vue +185 -0
- package/src/components/SubHeader/config.ts +12 -0
- package/src/components/SubHeader/locales.ts +3 -0
- package/src/components/SubHeader/tests/SubHeader.spec.ts +144 -0
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +438 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +105 -0
- package/src/components/UserMenuBtn/config.ts +24 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
- package/src/components/index.ts +33 -7
- package/src/composables/index.ts +8 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +82 -0
- package/src/composables/rules/useFieldValidation.ts +53 -0
- package/src/composables/widthable/index.ts +29 -0
- package/src/composables/widthable/tests/widthable.spec.ts +52 -0
- package/src/designTokens/index.ts +2 -0
- package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +3 -2
- package/src/main.ts +3 -0
- package/src/modules.d.ts +4 -0
- package/src/services/index.ts +1 -0
- package/src/stories/Demarrer/Accueil.mdx +10 -0
- package/src/stories/Demarrer/Accueil.stories.ts +76 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.mdx +9 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.stories.ts +20 -0
- package/src/stories/Fondamentaux/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 +132 -0
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +52 -48
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +31 -28
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +1 -2
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
- package/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.ts +47 -0
- package/src/utils/functions/throttleDisplayFn/throttleDisplayFn.ts +26 -0
- package/src/utils/rules/exactLength/index.ts +33 -0
- package/src/utils/rules/exactLength/locales.ts +6 -0
- package/src/utils/rules/required/index.ts +25 -0
- package/src/utils/rules/required/locales.ts +5 -0
- package/src/utils/rules/required/ruleMessageHelper.ts +14 -0
- package/src/utils/rules/required/tests/index.spec.ts +47 -0
- package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +22 -0
- package/src/utils/rules/types.d.ts +15 -0
- package/src/components/Beta/beta.mdx +0 -5
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -42
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.stories.ts +0 -154
- package/src/components/Customs/CustomSelect/CustomSelect.stories.ts +0 -182
- package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
- package/src/components/Deprecated/deprecated.mdx +0 -5
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderComplexMenu.stories.ts +0 -272
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +0 -49
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +0 -56
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +0 -137
- package/src/components/HeaderBar/HeaderComplexMenu/tests/HeaderComplexMenu.spec.ts +0 -129
- package/src/components/HeaderBar/HeaderComplexMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +0 -18
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
- package/src/stories/Guidelines/Typo.mdx +0 -53
- package/src/stories/Home/Accueil.mdx +0 -7
- package/src/stories/Home/PolitiqueDeConfidentialite.mdx +0 -4
- package/src/stories/Home/synapse.webp +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/HeaderMenuItem.vue +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/HeaderMenuItem.spec.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/conts.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/locals.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/tests/useHandleSubMenus.spec.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/useHandleSubMenus.ts +0 -0
- /package/src/components/Logo/{types.d.ts → types.ts} +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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
2
|
+
|
|
3
|
+
export interface MenuItem {
|
|
4
|
+
title: string
|
|
5
|
+
href?: string
|
|
6
|
+
to?: RouteLocationRaw
|
|
7
|
+
ariaLabel?: string
|
|
8
|
+
openInNewTab?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SelectItem {
|
|
12
|
+
text: string
|
|
13
|
+
value: string
|
|
14
|
+
hidden?: unknown
|
|
15
|
+
to?: RouteLocationRaw
|
|
16
|
+
href?: string
|
|
17
|
+
ariaLabel?: string
|
|
18
|
+
title?: string
|
|
19
|
+
openInNewTab?: boolean
|
|
20
|
+
}
|
|
@@ -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/Boutons/LangBtn/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,132 @@
|
|
|
1
|
+
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
|
+
|
|
3
|
+
export const AccessibiliteItemsIndeterminate = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Catégorie 1 : Images',
|
|
6
|
+
subtitle: '1.4 Pour chaque image utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative permet-elle d’identifier la nature et la fonction de l’image ?',
|
|
7
|
+
items: [
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
precision: '1.4.1 Pour chaque image (balise <img>) utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative est-elle pertinente ?',
|
|
11
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.4.1',
|
|
12
|
+
solution: [{
|
|
13
|
+
info1: '1. Retrouver dans le document les images structurées au moyen d’un élément <img> pourvues d’une alternative textuelle et utilisées comme CAPTCHA ou comme image-test',
|
|
14
|
+
info2: '2. Pour chaque image, vérifier que l’alternative textuelle est pertinente',
|
|
15
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
16
|
+
}],
|
|
17
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
|
|
22
|
+
precision: ' 1.4.6 Pour chaque image vectorielle (balise <svg>) utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative est-elle pertinente ?',
|
|
23
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.4.6',
|
|
24
|
+
solution: [{
|
|
25
|
+
info1: '1. Retrouver dans le document les éléments <svg> pourvus d’une alternative textuelle et utilisés comme CAPTCHA ou comme image-test;',
|
|
26
|
+
info2: '2. Pour chaque élément <svg>, vérifier que l’alternative textuelle est pertinente',
|
|
27
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
28
|
+
}],
|
|
29
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
export const AccessibiliteItemsValidated = [
|
|
39
|
+
{
|
|
40
|
+
title: 'Catégorie 1 : Images',
|
|
41
|
+
subtitle: '1.2 Chaque image de décoration est-elle correctement ignorée par les technologies d’assistance ?',
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
|
|
45
|
+
precision: '1.2.4 Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ? '
|
|
46
|
+
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
47
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
48
|
+
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
49
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’attribut title.',
|
|
50
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.2.4',
|
|
51
|
+
solution: [{
|
|
52
|
+
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 :'
|
|
53
|
+
+ ' Possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
54
|
+
+ ' Et est dépourvu d’alternative textuelle (ainsi que ses éléments enfants) ;'
|
|
55
|
+
+ ' Et ne contient pas d’éléments <title> et <desc> à moins que vides de contenu ;'
|
|
56
|
+
+ ' Et est dépourvu d’attribut title (ainsi que ses éléments enfants).'
|
|
57
|
+
+ ' 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).',
|
|
58
|
+
info2: '2. Sinon, vérifier la présence d’un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités',
|
|
59
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé.',
|
|
60
|
+
}],
|
|
61
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
62
|
+
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: 'Catégorie 3 : Couleurs',
|
|
69
|
+
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é?',
|
|
70
|
+
items: [
|
|
71
|
+
{
|
|
72
|
+
|
|
73
|
+
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.',
|
|
74
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
75
|
+
solution: [{
|
|
76
|
+
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 ;',
|
|
77
|
+
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.',
|
|
78
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
79
|
+
}],
|
|
80
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
81
|
+
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: 'Catégorie 7 : Scripts',
|
|
88
|
+
subtitle: '7.1 Chaque script est-il, si nécessaire, compatible avec les technologies d’assistance ?',
|
|
89
|
+
items: [
|
|
90
|
+
|
|
91
|
+
{
|
|
92
|
+
precision: ' 7.1.3 Chaque script qui génère ou contrôle un composant d’interface vérifie-t-il ces conditions : '
|
|
93
|
+
+ 'Le composant possède un nom pertinent ;'
|
|
94
|
+
+ 'Le nom accessible du composant contient au moins l’intitulé visible ;'
|
|
95
|
+
+ 'Le composant possède un rôle pertinent.',
|
|
96
|
+
|
|
97
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#7.1.3',
|
|
98
|
+
solution: [{
|
|
99
|
+
info1: '1. Pour chacun des composants d’interface ayant validé le test 7.1.1, vérifier que le composant d’interface possède : ',
|
|
100
|
+
info2: '2. Un nom pertinent (intitulé visible) et un rôle pertinent',
|
|
101
|
+
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.',
|
|
102
|
+
}],
|
|
103
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
{
|
|
111
|
+
title: 'Catégorie 8 : Eléments Obligatoires',
|
|
112
|
+
subtitle: '8.9 Dans chaque page web, les balises ne doivent pas être utilisées uniquement à des fins de présentation',
|
|
113
|
+
items: [
|
|
114
|
+
|
|
115
|
+
{
|
|
116
|
+
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',
|
|
117
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#8.9.1',
|
|
118
|
+
solution: [{
|
|
119
|
+
info1: '1. Retrouver dans le document l’ensemble des éléments sémantiques utilisés à des fins de présentation ;',
|
|
120
|
+
info2: '2. Pour chacun de ces éléments, vérifier que :'
|
|
121
|
+
+ 'L’élément est pourvu d’un attribut role=“presentation” ;'
|
|
122
|
+
+ 'L’utilisation de cet élément à des fins de présentation reste justifée',
|
|
123
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
124
|
+
}],
|
|
125
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
126
|
+
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
]
|
|
@@ -17,7 +17,7 @@ Le composant `LangBtn` est utilisé pour afficher une alerte à l’utilisateur.
|
|
|
17
17
|
|
|
18
18
|
<Source dark code={`
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import LangBtn from '
|
|
20
|
+
import LangBtn from '@cnamts/synapse'
|
|
21
21
|
import { ref } from 'vue'
|
|
22
22
|
|
|
23
23
|
const value = ref('fr')
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
3
3
|
import { VBtn, VMenu, VList, VListItem, VListItemTitle } from 'vuetify/components'
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof LangBtn> = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Composants/Boutons/LangBtn',
|
|
7
7
|
component: LangBtn,
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: 'fullscreen',
|
|
@@ -16,7 +16,7 @@ const meta: Meta<typeof LangBtn> = {
|
|
|
16
16
|
// @ts-expect-error Type '"array"' is not assignable to type 'Control | undefined'.
|
|
17
17
|
availableLanguages: { control: { type: 'array' } },
|
|
18
18
|
vuetifyOptions: {
|
|
19
|
-
|
|
19
|
+
control: { type: 'object' },
|
|
20
20
|
default: () => ({
|
|
21
21
|
menu: {
|
|
22
22
|
offsetY: true,
|
|
@@ -39,11 +39,38 @@ export default meta
|
|
|
39
39
|
type Story = StoryObj<typeof meta>
|
|
40
40
|
|
|
41
41
|
export const Default: Story = {
|
|
42
|
+
parameters: {
|
|
43
|
+
sourceCode: [
|
|
44
|
+
{
|
|
45
|
+
name: 'Template',
|
|
46
|
+
code: `<template>
|
|
47
|
+
<LangBtn
|
|
48
|
+
v-model="value"
|
|
49
|
+
:items="items"
|
|
50
|
+
:aria-label="ariaLabel"
|
|
51
|
+
/>
|
|
52
|
+
</template>
|
|
53
|
+
`,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Script',
|
|
57
|
+
code: `<script setup lang="ts">
|
|
58
|
+
import LangBtn from '@cnamts/synapse'
|
|
59
|
+
import { ref } from 'vue'
|
|
60
|
+
|
|
61
|
+
const value = ref('fr')
|
|
62
|
+
const items = ['fr', 'en', 'es']
|
|
63
|
+
const ariaLabel = 'Choix de la langue'
|
|
64
|
+
</script>
|
|
65
|
+
`,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
42
69
|
args: {
|
|
43
|
-
modelValue: '
|
|
70
|
+
modelValue: 'fr',
|
|
44
71
|
hideDownArrow: false,
|
|
45
|
-
ariaLabel: '
|
|
46
|
-
availableLanguages: ['fr', '
|
|
72
|
+
ariaLabel: 'Choix de la langue',
|
|
73
|
+
availableLanguages: ['fr', 'en', 'es'],
|
|
47
74
|
vuetifyOptions: {
|
|
48
75
|
menu: {
|
|
49
76
|
offsetY: true,
|
|
@@ -74,10 +101,36 @@ export const Default: Story = {
|
|
|
74
101
|
}
|
|
75
102
|
|
|
76
103
|
export const AllLanguages: Story = {
|
|
104
|
+
parameters: {
|
|
105
|
+
sourceCode: [
|
|
106
|
+
{
|
|
107
|
+
name: 'Template',
|
|
108
|
+
code: `<template>
|
|
109
|
+
<LangBtn
|
|
110
|
+
v-model="value"
|
|
111
|
+
:aria-label="ariaLabel"
|
|
112
|
+
available-languages="*"
|
|
113
|
+
/>
|
|
114
|
+
</template>
|
|
115
|
+
`,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Script',
|
|
119
|
+
code: `<script setup lang="ts">
|
|
120
|
+
import LangBtn from '@cnamts/synapse'
|
|
121
|
+
import { ref } from 'vue'
|
|
122
|
+
|
|
123
|
+
const value = ref('fr')
|
|
124
|
+
const ariaLabel = 'Choix de la langue'
|
|
125
|
+
</script>
|
|
126
|
+
`,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
77
130
|
args: {
|
|
78
131
|
modelValue: 'fr',
|
|
79
132
|
hideDownArrow: false,
|
|
80
|
-
ariaLabel: '
|
|
133
|
+
ariaLabel: 'Choix de la langue',
|
|
81
134
|
availableLanguages: '*',
|
|
82
135
|
},
|
|
83
136
|
render: (args) => {
|
|
@@ -96,10 +149,38 @@ export const AllLanguages: Story = {
|
|
|
96
149
|
}
|
|
97
150
|
|
|
98
151
|
export const NoDownArrow: Story = {
|
|
152
|
+
parameters: {
|
|
153
|
+
sourceCode: [
|
|
154
|
+
{
|
|
155
|
+
name: 'Template',
|
|
156
|
+
code: `<template>
|
|
157
|
+
<LangBtn
|
|
158
|
+
v-model="value"
|
|
159
|
+
:items="items"
|
|
160
|
+
:aria-label="ariaLabel"
|
|
161
|
+
hide-down-arrow
|
|
162
|
+
/>
|
|
163
|
+
</template>
|
|
164
|
+
`,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'Script',
|
|
168
|
+
code: `<script setup lang="ts">
|
|
169
|
+
import LangBtn from '@cnamts/synapse'
|
|
170
|
+
import { ref } from 'vue'
|
|
171
|
+
|
|
172
|
+
const value = ref('fr')
|
|
173
|
+
const items = ['fr', 'en', 'es']
|
|
174
|
+
const ariaLabel = 'Choix de la langue'
|
|
175
|
+
</script>
|
|
176
|
+
`,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
99
180
|
args: {
|
|
100
181
|
modelValue: 'fr',
|
|
101
182
|
hideDownArrow: true,
|
|
102
|
-
ariaLabel: '
|
|
183
|
+
ariaLabel: 'Choix de la langue',
|
|
103
184
|
availableLanguages: ['fr', 'en', 'de'],
|
|
104
185
|
},
|
|
105
186
|
render: (args) => {
|
|
@@ -118,10 +199,46 @@ export const NoDownArrow: Story = {
|
|
|
118
199
|
}
|
|
119
200
|
|
|
120
201
|
export const FlatBtn: Story = {
|
|
202
|
+
parameters: {
|
|
203
|
+
sourceCode: [
|
|
204
|
+
{
|
|
205
|
+
name: 'Template',
|
|
206
|
+
code: `<template>
|
|
207
|
+
<LangBtn
|
|
208
|
+
v-model="value"
|
|
209
|
+
:items="items"
|
|
210
|
+
:aria-label="ariaLabel"
|
|
211
|
+
:vuetify-options="vuetifyOptions"
|
|
212
|
+
/>
|
|
213
|
+
</template>
|
|
214
|
+
`,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'Script',
|
|
218
|
+
code: `<script setup lang="ts">
|
|
219
|
+
import LangBtn from '@cnamts/synapse'
|
|
220
|
+
import { ref } from 'vue'
|
|
221
|
+
|
|
222
|
+
const value = ref('fr')
|
|
223
|
+
const items = ['fr', 'en', 'es']
|
|
224
|
+
const ariaLabel = 'Choix de la langue'
|
|
225
|
+
|
|
226
|
+
const vuetifyOptions = {
|
|
227
|
+
btn: {
|
|
228
|
+
color: 'primary',
|
|
229
|
+
variant: 'flat',
|
|
230
|
+
ripple: true,
|
|
231
|
+
},
|
|
232
|
+
}
|
|
233
|
+
</script>
|
|
234
|
+
`,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
121
238
|
args: {
|
|
122
239
|
modelValue: 'fr',
|
|
123
240
|
hideDownArrow: false,
|
|
124
|
-
ariaLabel: '
|
|
241
|
+
ariaLabel: 'Choix de la langue',
|
|
125
242
|
availableLanguages: ['fr', 'en', 'de'],
|
|
126
243
|
vuetifyOptions: {
|
|
127
244
|
btn: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`LangBtn
|
|
3
|
+
exports[`LangBtn > renders correctly 1`] = `
|
|
4
4
|
"<div data-v-42678988="" id="lang-menu-id"><button data-v-42678988="" type="button" class="v-btn v-theme--light text-primary v-btn--density-default v-btn--size-default v-btn--variant-outlined vd-lang-btn" id="lang-menu-btn" aria-label="Choix de la langue. Actuellement Français" aria-haspopup="menu" aria-controls="lang-menu-id" aria-owns="lang-menu-id" aria-expanded="false"><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
|
|
5
5
|
<!----><span class="v-btn__content" data-no-activator="">Français <i data-v-42678988="" class="M7,10L12,15L17,10H7Z mdi v-icon notranslate v-theme--light v-icon--size-default ml-1" aria-hidden="true"></i></span>
|
|
6
6
|
<!---->
|
|
@@ -2,7 +2,7 @@ import { Canvas, Meta, Controls, Source } from '@storybook/blocks';
|
|
|
2
2
|
import * as LogoStories from './Logo.stories.ts';
|
|
3
3
|
import Logo from './Logo.vue';
|
|
4
4
|
|
|
5
|
-
<Meta title="
|
|
5
|
+
<Meta title="Composants/Données/Logo" component={Logo} />
|
|
6
6
|
|
|
7
7
|
# Logo
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ Le composant `Logo` est utilisé pour afficher le logo de l'application avec dif
|
|
|
18
18
|
|
|
19
19
|
<Source dark code={`
|
|
20
20
|
<script setup lang='ts'>
|
|
21
|
-
import Logo from '
|
|
21
|
+
import Logo from '@cnamts/synapse'
|
|
22
22
|
</script>
|
|
23
23
|
<template>
|
|
24
24
|
<Logo :hideSignature="false" :hideOrganism="false" :risquePro="false" ariaLabel="" :avatar="false" :dark="false" />
|