@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 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0" y="0" style="enable-background:new 0 0 146 64" version="1.1" width="146" height="64" viewBox="0 0 146 64"><path d="M10.5 37.1c-1.3.4-2.7.6-4 .6-1.9 0-3.1-1-3.1-4v-2.8c0-2.9 1.2-3.8 3.1-3.8 1.3 0 2.7.1 4 .6l.6-2.8c-1.5-.4-3.1-.7-4.6-.7-3.7 0-6.5 2.2-6.5 6.5V34c0 4.4 2.8 6.5 6.5 6.5 1.6 0 3.1-.3 4.6-.7l-.6-2.7zM13.4 35.3c0 3.4 2.2 5.5 5.3 5.5s5.3-2.1 5.3-5.5v-2.2c0-3.4-2.2-5.5-5.3-5.5s-5.3 2.1-5.3 5.5v2.2zm3.3-.1v-1.9c0-1.6.4-2.7 1.9-2.7s1.9 1 1.9 2.7v1.9c0 1.6-.4 2.7-1.9 2.7-1.5-.1-1.9-1.1-1.9-2.7zM26.4 40.3h3.4V33c0-1.6.4-2.5 1.5-2.5 1 0 1.5 1 1.5 2.8v6.9h3.4v-6.9c0-1.9.4-2.8 1.5-2.8 1 0 1.5.9 1.5 2.5v7.4h3.4v-7.5c0-3.4-2.2-5-4.9-5-1.3 0-2.4.6-3.1 1.6-.7-1-1.8-1.6-3.1-1.6-2.7 0-4.9 1.6-4.9 5l-.2 7.4zM48.2 40c.4.3 1.3.6 2.1.6 2.5 0 4.9-1.8 4.9-5.2v-2.7c0-3.2-2.4-5.2-5.2-5.2s-5.2 1.9-5.2 5.2v12.4h3.4V40zm0-2.6V33c0-1.6.7-2.4 1.8-2.4s1.8.7 1.8 2.4v2.4c0 1.8-.7 2.5-1.8 2.5-.6-.1-1.2-.2-1.8-.5zM58.7 40.3h3.4v-10H64v-2.2h-1.9v-3.8l-3.4.4v3.4h-2.1l.4 2.2h1.5v10h.2zM65.6 35.3c0 3.5 2.2 5.3 5.5 5.3 1.6 0 2.7-.3 4-.7l-.6-2.7c-1 .3-2.2.6-3.4.6-1.5 0-2.2-.7-2.2-2.5v-.1h6.8v-2.7c0-2.8-2.2-4.7-5-4.7s-5 1.8-5 5.2c-.1 0-.1 2.3-.1 2.3zm3.4-2.5v-.3c0-1 .7-1.9 1.6-1.9 1 0 1.6.9 1.6 1.9v.3H69z" fill="#0084b2"/><path d="M85.1 36.9c0-2.7 2.1-4 7.1-4.4 0-1-.6-1.5-1.9-1.5s-2.1.3-3.4 1l-1.5-2.5c1.6-.9 3.5-1.5 5.5-1.5 3.2 0 5.2 1.6 5.2 5.5v6.9h-3.2l-.3-1.2c-.9.9-2.2 1.5-3.7 1.5-2.5.1-3.8-1.7-3.8-3.8zm7.1-.1v-1.9c-2.5.3-3.4.9-3.4 1.8s.4 1 1.3 1c.7 0 1.5-.3 2.1-.9zM99.3 28.2h3.2l.3 1.5c1-.9 2.1-1.8 3.8-1.8s2.8.7 3.5 1.9c1.2-1 2.2-1.9 4-1.9 2.7 0 4 1.8 4 4.9v7.5h-3.8v-7.1c0-1.6-.4-2.1-1.5-2.1s-1.3.3-2.1 1v8.1h-4v-7.1c0-1.6-.4-2.1-1.5-2.1s-1.3.3-2.1 1v8.1h-3.8V28.2c.1 0 0 0 0 0zM120.5 34.3c0-4 2.8-6.2 5.9-6.2 3.1 0 5.5 2.7 5.5 5.8v1.6h-7.5c.3 1.6 1.6 2.4 3.2 2.4s1.8-.3 2.7-.7l1.3 2.4c-1.3.9-3.1 1.3-4.6 1.3-3.9-.3-6.5-2.5-6.5-6.6zm8-1.5c0-1.2-.4-2.1-1.9-2.1s-2.1.7-2.4 2.1h4.3zM134.5 36.4V23.2h3.8v13.3c0 .7.4 1 .7 1h.4l.4 2.8c-.4.1-1.2.3-1.9.3-2.5 0-3.4-1.6-3.4-4.2zM141.6 24.6c0-1.2 1-1.9 2.2-1.9 1.3 0 2.2.7 2.2 1.9s-1 1.9-2.2 1.9c-1.3.1-2.2-.6-2.2-1.9zm.3 3.6h3.8v12.1h-3.8V28.2z" fill="#0c419a"/></svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const locales = {
|
|
2
|
+
homeLinkPrefix: 'Accueil,',
|
|
3
|
+
logoCnam: 'Caisse nationale',
|
|
4
|
+
logoAmeli: 'ameli.fr',
|
|
5
|
+
logoAmeliPro: 'AmeliPro',
|
|
6
|
+
logoCompteAmeli: 'Compte ameli',
|
|
7
|
+
compteEntreprise: {
|
|
8
|
+
title: {
|
|
9
|
+
text: 'Compte',
|
|
10
|
+
highlight: 'entreprise',
|
|
11
|
+
},
|
|
12
|
+
subTitle: 'Vos démarches maladie et risques professionnels',
|
|
13
|
+
},
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { locales } from './locales'
|
|
2
|
+
import logoCnam from './assets/cnam.svg'
|
|
3
|
+
import logoAmeli from './assets/ameli.svg'
|
|
4
|
+
import logoAmeliPro from './assets/ameli-pro.svg'
|
|
5
|
+
import logoCompteAmeli from './assets/compte-ameli.svg'
|
|
6
|
+
|
|
7
|
+
export const secondaryLogoMapping = {
|
|
8
|
+
'cnam': {
|
|
9
|
+
src: logoCnam,
|
|
10
|
+
alt: locales.logoCnam,
|
|
11
|
+
},
|
|
12
|
+
'ameli': {
|
|
13
|
+
src: logoAmeli,
|
|
14
|
+
alt: locales.logoAmeli,
|
|
15
|
+
},
|
|
16
|
+
'ameli-pro': {
|
|
17
|
+
src: logoAmeliPro,
|
|
18
|
+
alt: locales.logoAmeliPro,
|
|
19
|
+
},
|
|
20
|
+
'compte-ameli': {
|
|
21
|
+
src: logoCompteAmeli,
|
|
22
|
+
alt: locales.logoCompteAmeli,
|
|
23
|
+
},
|
|
24
|
+
} as const
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
|
|
4
|
+
import LogoBrandSection from '../LogoBrandSection.vue'
|
|
5
|
+
import { vuetify } from '@tests/unit/setup'
|
|
6
|
+
|
|
7
|
+
describe('LogoBrandSection', () => {
|
|
8
|
+
it('renders correctly', () => {
|
|
9
|
+
const wrapper = mount(LogoBrandSection, {
|
|
10
|
+
global: {
|
|
11
|
+
plugins: [vuetify],
|
|
12
|
+
stubs: ['RouterLink', 'Logo'],
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
theme: 'default',
|
|
16
|
+
serviceTitle: 'Service Title',
|
|
17
|
+
serviceSubTitle: 'Service Sub Title',
|
|
18
|
+
mobileVersion: false,
|
|
19
|
+
reduceLogo: false,
|
|
20
|
+
homeLink: {
|
|
21
|
+
href: '/',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
it('renders correctly with service computed', () => {
|
|
30
|
+
const wrapper = mount(LogoBrandSection, {
|
|
31
|
+
global: {
|
|
32
|
+
plugins: [vuetify],
|
|
33
|
+
stubs: ['RouterLink', 'Logo'],
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
theme: 'default',
|
|
37
|
+
serviceTitle: 'Service Title',
|
|
38
|
+
serviceSubTitle: 'Service Sub Title',
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
expect(wrapper.text()).toContain('Service Title')
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('renders correctly with service computed', () => {
|
|
46
|
+
const wrapper = mount(LogoBrandSection, {
|
|
47
|
+
global: {
|
|
48
|
+
plugins: [vuetify],
|
|
49
|
+
stubs: ['RouterLink', 'Logo'],
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
theme: 'compte-entreprise',
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
expect(wrapper.text()).toContain('Compte entreprise')
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('renders correctly with height', () => {
|
|
60
|
+
const wrapper = mount(LogoBrandSection, {
|
|
61
|
+
global: {
|
|
62
|
+
plugins: [vuetify],
|
|
63
|
+
stubs: ['RouterLink', 'Logo'],
|
|
64
|
+
},
|
|
65
|
+
props: {
|
|
66
|
+
theme: 'default',
|
|
67
|
+
serviceTitle: 'Service Title',
|
|
68
|
+
serviceSubTitle: 'Service Sub Title',
|
|
69
|
+
mobileVersion: false,
|
|
70
|
+
reduceLogo: false,
|
|
71
|
+
homeLink: {
|
|
72
|
+
href: '/',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const mainDiv = wrapper.find('.vd-logo-brand-section')
|
|
78
|
+
expect(mainDiv.attributes('height')).toBe('64px')
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it('renders correctly with showServiceSubTitle', () => {
|
|
82
|
+
const wrapper = mount(LogoBrandSection, {
|
|
83
|
+
global: {
|
|
84
|
+
plugins: [vuetify],
|
|
85
|
+
stubs: ['RouterLink', 'Logo'],
|
|
86
|
+
},
|
|
87
|
+
props: {
|
|
88
|
+
theme: 'default',
|
|
89
|
+
serviceTitle: 'Service Title',
|
|
90
|
+
serviceSubTitle: 'Service Sub Title',
|
|
91
|
+
},
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
expect(wrapper.text()).toContain('Service Sub Title')
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
it('renders correctly with no showServiceSubTitle', () => {
|
|
98
|
+
const wrapper = mount(LogoBrandSection, {
|
|
99
|
+
global: {
|
|
100
|
+
plugins: [vuetify],
|
|
101
|
+
stubs: ['RouterLink', 'Logo'],
|
|
102
|
+
},
|
|
103
|
+
props: {
|
|
104
|
+
theme: 'default',
|
|
105
|
+
serviceTitle: 'Service Title',
|
|
106
|
+
serviceSubTitle: '',
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
expect(wrapper.find('.vd-title').text()).toBe('Service Title')
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
it('renders correctly with default theme', () => {
|
|
114
|
+
const wrapper = mount(LogoBrandSection, {
|
|
115
|
+
global: {
|
|
116
|
+
plugins: [vuetify],
|
|
117
|
+
stubs: ['RouterLink', 'Logo'],
|
|
118
|
+
},
|
|
119
|
+
props: {
|
|
120
|
+
serviceTitle: 'Service Title',
|
|
121
|
+
serviceSubTitle: 'Service Sub Title',
|
|
122
|
+
},
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
const divider = wrapper.find('.vd-divider')
|
|
126
|
+
expect(divider.attributes('fill')).toBe('#0c419a')
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
it('renders correctly with cnam theme', () => {
|
|
130
|
+
const wrapper = mount(LogoBrandSection, {
|
|
131
|
+
global: {
|
|
132
|
+
plugins: [vuetify],
|
|
133
|
+
stubs: ['RouterLink', 'Logo'],
|
|
134
|
+
},
|
|
135
|
+
props: {
|
|
136
|
+
theme: 'cnam',
|
|
137
|
+
serviceTitle: 'Service Title',
|
|
138
|
+
serviceSubTitle: 'Service Sub Title',
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const divider = wrapper.find('.vd-divider')
|
|
143
|
+
expect(divider.attributes('fill')).toBe('#006386')
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
it('renders correctly with compte entreprise theme', () => {
|
|
147
|
+
const wrapper = mount(LogoBrandSection, {
|
|
148
|
+
global: {
|
|
149
|
+
plugins: [vuetify],
|
|
150
|
+
stubs: ['RouterLink', 'Logo'],
|
|
151
|
+
},
|
|
152
|
+
props: {
|
|
153
|
+
theme: 'compte-entreprise',
|
|
154
|
+
serviceTitle: 'Service Title',
|
|
155
|
+
serviceSubTitle: 'Service Sub Title',
|
|
156
|
+
},
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
const divider = wrapper.find('.vd-divider')
|
|
160
|
+
expect(divider.attributes('fill')).toBe('#cd545b')
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
it('renders correctly with risquePro if no reduceLogo', () => {
|
|
164
|
+
const wrapper = mount(LogoBrandSection, {
|
|
165
|
+
global: {
|
|
166
|
+
plugins: [vuetify],
|
|
167
|
+
stubs: ['RouterLink', 'Logo'],
|
|
168
|
+
},
|
|
169
|
+
props: {
|
|
170
|
+
theme: 'risque-pro',
|
|
171
|
+
reduceLogo: false,
|
|
172
|
+
},
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
expect(wrapper.find('logo-stub').attributes('risquepro')).toBe('true')
|
|
176
|
+
expect(wrapper.find('logo-stub').attributes('hidesignature')).toBe('false')
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
it('renders correctly with risquePro', () => {
|
|
180
|
+
const wrapper = mount(LogoBrandSection, {
|
|
181
|
+
global: {
|
|
182
|
+
plugins: [vuetify],
|
|
183
|
+
stubs: ['RouterLink', 'Logo'],
|
|
184
|
+
},
|
|
185
|
+
props: {
|
|
186
|
+
theme: 'risque-pro',
|
|
187
|
+
reduceLogo: true,
|
|
188
|
+
},
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
expect(wrapper.find('logo-stub').attributes('hidesignature')).toBe('true')
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
it('renders correctly with isCompteEntreprise', () => {
|
|
195
|
+
const wrapper = mount(LogoBrandSection, {
|
|
196
|
+
global: {
|
|
197
|
+
plugins: [vuetify],
|
|
198
|
+
stubs: ['RouterLink', 'Logo'],
|
|
199
|
+
},
|
|
200
|
+
props: {
|
|
201
|
+
theme: 'compte-entreprise',
|
|
202
|
+
},
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
expect(wrapper.text()).toContain('Compte entreprise')
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
it('renders correctly with isCompteAmeliMobile', () => {
|
|
209
|
+
const wrapper = mount(LogoBrandSection, {
|
|
210
|
+
global: {
|
|
211
|
+
plugins: [vuetify],
|
|
212
|
+
stubs: ['RouterLink', 'Logo'],
|
|
213
|
+
},
|
|
214
|
+
props: {
|
|
215
|
+
theme: 'compte-ameli',
|
|
216
|
+
mobileVersion: true,
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
const img = wrapper.find('.vd-home-link img')
|
|
221
|
+
expect(img.attributes('alt')).toBe('Compte ameli')
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
it('renders correctly without signature', () => {
|
|
225
|
+
const wrapper = mount(LogoBrandSection, {
|
|
226
|
+
global: {
|
|
227
|
+
plugins: [vuetify],
|
|
228
|
+
stubs: ['RouterLink', 'Logo'],
|
|
229
|
+
},
|
|
230
|
+
props: {
|
|
231
|
+
theme: 'default',
|
|
232
|
+
reduceLogo: true,
|
|
233
|
+
},
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
expect(wrapper.find('logo-stub').attributes('hidesignature')).toBe('true')
|
|
237
|
+
})
|
|
238
|
+
|
|
239
|
+
it('renders correctly without hideSignature', () => {
|
|
240
|
+
const wrapper = mount(LogoBrandSection, {
|
|
241
|
+
global: {
|
|
242
|
+
plugins: [vuetify],
|
|
243
|
+
stubs: ['RouterLink', 'Logo'],
|
|
244
|
+
},
|
|
245
|
+
props: {
|
|
246
|
+
theme: 'default',
|
|
247
|
+
reduceLogo: false,
|
|
248
|
+
},
|
|
249
|
+
})
|
|
250
|
+
|
|
251
|
+
expect(wrapper.find('logo-stub').attributes('hidesignature')).toBe('false')
|
|
252
|
+
})
|
|
253
|
+
|
|
254
|
+
it('renders correctly with secondaryLogo', () => {
|
|
255
|
+
const wrapper = mount(LogoBrandSection, {
|
|
256
|
+
global: {
|
|
257
|
+
stubs: ['RouterLink', 'Logo'],
|
|
258
|
+
plugins: [vuetify],
|
|
259
|
+
},
|
|
260
|
+
props: {
|
|
261
|
+
theme: 'compte-ameli',
|
|
262
|
+
},
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
expect(wrapper.find('[alt="Compte ameli"]').exists()).toBe(true)
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
it('renders correctly with logoContainerComponent', () => {
|
|
269
|
+
const wrapper = mount(LogoBrandSection, {
|
|
270
|
+
global: {
|
|
271
|
+
plugins: [vuetify],
|
|
272
|
+
stubs: ['RouterLink', 'Logo'],
|
|
273
|
+
},
|
|
274
|
+
props: {
|
|
275
|
+
theme: 'default',
|
|
276
|
+
homeLink: {
|
|
277
|
+
href: '#',
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
expect(wrapper.find('a').attributes('href')).toBe('#')
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
it('renders correctly RouterLink with logoContainerComponent', () => {
|
|
286
|
+
const wrapper = mount(LogoBrandSection, {
|
|
287
|
+
global: {
|
|
288
|
+
plugins: [vuetify],
|
|
289
|
+
stubs: ['RouterLink', 'Logo'],
|
|
290
|
+
},
|
|
291
|
+
props: {
|
|
292
|
+
theme: 'default',
|
|
293
|
+
homeLink: {
|
|
294
|
+
to: '/',
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
expect(wrapper.find('router-link-stub').attributes('to')).toBe('/')
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
it('renders correctly with logoContainerComponent', () => {
|
|
303
|
+
const wrapper = mount(LogoBrandSection, {
|
|
304
|
+
global: {
|
|
305
|
+
plugins: [vuetify],
|
|
306
|
+
stubs: ['RouterLink', 'Logo'],
|
|
307
|
+
},
|
|
308
|
+
props: {
|
|
309
|
+
theme: 'default',
|
|
310
|
+
homeLink: {
|
|
311
|
+
href: undefined,
|
|
312
|
+
to: undefined,
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
})
|
|
316
|
+
|
|
317
|
+
expect(wrapper.find('.vd-home-link').element.tagName).toBe('DIV')
|
|
318
|
+
})
|
|
319
|
+
|
|
320
|
+
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
321
|
+
const wrapper = mount(LogoBrandSection, {
|
|
322
|
+
global: {
|
|
323
|
+
plugins: [vuetify],
|
|
324
|
+
stubs: ['RouterLink', 'Logo'],
|
|
325
|
+
},
|
|
326
|
+
props: {
|
|
327
|
+
theme: 'default',
|
|
328
|
+
},
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
expect(wrapper.findAll('.vd-home-link').length).toBe(1)
|
|
332
|
+
})
|
|
333
|
+
|
|
334
|
+
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
335
|
+
const wrapper = mount(LogoBrandSection, {
|
|
336
|
+
global: {
|
|
337
|
+
plugins: [vuetify],
|
|
338
|
+
stubs: ['RouterLink', 'Logo'],
|
|
339
|
+
},
|
|
340
|
+
props: {
|
|
341
|
+
theme: 'ameli-pro',
|
|
342
|
+
},
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
expect(wrapper.findAll('.vd-home-link').length).toBe(2)
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
349
|
+
const wrapper = mount(LogoBrandSection, {
|
|
350
|
+
global: {
|
|
351
|
+
plugins: [vuetify],
|
|
352
|
+
stubs: ['RouterLink', 'Logo'],
|
|
353
|
+
},
|
|
354
|
+
props: {
|
|
355
|
+
theme: 'ameli',
|
|
356
|
+
homeLink: {
|
|
357
|
+
href: undefined,
|
|
358
|
+
to: undefined,
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
expect(wrapper.findAll('.vd-home-link')[1].element.tagName).toBe('DIV')
|
|
364
|
+
})
|
|
365
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`LogoBrandSection > renders correctly 1`] = `
|
|
4
|
+
"<div data-v-7f5c1754="" height="64px" class="vd-logo-brand-section d-flex"><a data-v-7f5c1754="" href="/" class="vd-home-link">
|
|
5
|
+
<logo-stub data-v-7f5c1754="" hidesignature="false" hideorganism="false" risquepro="false" avatar="false" dark="false" size="normal" class=""></logo-stub>
|
|
6
|
+
</a><svg data-v-7f5c1754="" width="22" height="64" fill="#0c419a" role="img" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 64" class="vd-divider">
|
|
7
|
+
<path data-v-7f5c1754="" d="M14.3 49.3c-.2 0-.4-.2-.4-.4V14.2c0-.2.2-.4.4-.4.3 0 .5.2.5.4v34.7c0 .2-.2.4-.5.4Z"></path>
|
|
8
|
+
</svg>
|
|
9
|
+
<div data-v-7f5c1754="" class="vd-title-container d-flex justify-center flex-column text-primary">
|
|
10
|
+
<h1 data-v-7f5c1754="" class="vd-title text-caption text-md-subtitle-1 font-weight-medium">Service Title</h1>
|
|
11
|
+
<h2 data-v-7f5c1754="" class="vd-title text-caption">Service Sub Title</h2>
|
|
12
|
+
</div>
|
|
13
|
+
</div>"
|
|
14
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta, Source } from "@storybook/blocks";
|
|
2
|
+
import * as MaintenancePageStories from "./MaintenancePage.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={MaintenancePageStories} />
|
|
5
|
+
|
|
6
|
+
# MaintenancePage
|
|
7
|
+
|
|
8
|
+
Le composant `MaintenancePage` permet d'afficher une page de maintenance.
|
|
9
|
+
Il est basé sur le composant `ErrorPage` du design system.
|
|
10
|
+
|
|
11
|
+
<Canvas of={MaintenancePageStories.Default} />
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import MaintenancePage from './MaintenancePage.vue'
|
|
3
|
+
|
|
4
|
+
const meta: Meta = {
|
|
5
|
+
title: 'Templates/MaintenancePage',
|
|
6
|
+
component: MaintenancePage,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof MaintenancePage>
|
|
11
|
+
|
|
12
|
+
export default meta
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof MaintenancePage>
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
decorators: [
|
|
18
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
19
|
+
],
|
|
20
|
+
parameters: {
|
|
21
|
+
sourceCode: [
|
|
22
|
+
{
|
|
23
|
+
name: 'Template',
|
|
24
|
+
code: `
|
|
25
|
+
<template>
|
|
26
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
27
|
+
<MaintenancePage />
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
`,
|
|
31
|
+
}, {
|
|
32
|
+
name: 'Script',
|
|
33
|
+
code: `
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { MaintenancePage } from '@cnamts/synapse'
|
|
36
|
+
</script>
|
|
37
|
+
`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { locales } from './locales'
|
|
3
|
+
import ErrorPage from '../ErrorPage/ErrorPage.vue'
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<ErrorPage
|
|
8
|
+
:page-title="locales.pageTitle"
|
|
9
|
+
:message="locales.message"
|
|
10
|
+
no-btn
|
|
11
|
+
>
|
|
12
|
+
<template #illustration>
|
|
13
|
+
<img
|
|
14
|
+
src="./assets/maintenance.svg"
|
|
15
|
+
:alt="locales.pageTitle"
|
|
16
|
+
>
|
|
17
|
+
</template>
|
|
18
|
+
</ErrorPage>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
img {
|
|
23
|
+
max-height: 290px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 171 172"><path fill="#e7ecf5" fill-rule="evenodd" d="M170.98 85.88c-.67 23.17-21.93 38.99-39.79 53.75-15.66 12.94-33.5 21.47-53.71 23.52-23.03 2.34-49.9 5.4-65.83-11.4C-4.15 135.07-.9 108.28 4.2 85.88 8.22 68.22 23.74 57.72 36.11 44.5c13.13-14.02 22.4-33.9 41.37-36.9 20.81-3.3 40.79 7.79 56.95 21.32 17.98 15.05 37.24 33.52 36.55 56.97Z" clip-rule="evenodd"/><circle cx="123.87" cy="127.71" r="17.83" fill="#fff" stroke="#0c419a" stroke-width="2"/><circle cx="126.62" cy="126.25" r="15.08" fill="#fff" stroke="#0c419a" stroke-width="2"/><circle cx="126.95" cy="125.92" r="10.86" fill="#fff" stroke="#0c419a" stroke-width="2"/><path fill="#0c419a" d="M87.88 67.72c0-19.13 13.03-28.19 24.48-30.48 21.07-4.21 54.13 12.81 54.63 57.07.42 36.27-15.75 76.47-51.55 76.52-32.75.05-41.02-27.72-45.88-34.2-1.66-2.2-5.02-8.76-8.76-11.68-2.48-1.93-8.1-1.9-12.48-3.73-4.8-2-11.98-8.02-13.46-13.94l-5.19-22.54c2.4-1.93 3.9-2.06 6.65-1.78.97 2.54 3.37 10.22 6.49 20.6 3.74 12.47 13.61 11.83 22.37 9.4 8.75-2.44 10.7-13.46 9.73-19.46-.78-4.8-5.73-15.19-8.11-19.78 2.02-2.3 3.46-2.8 6.32-2.92 1.2 2.43 4.22 8.66 6.81 14.1 3.24 6.82 3.73 12.81 3.24 16.87-.48 4.05-4.37 12.32-6.32 13.62-2.43 1.78-1.93 3.73-2.1 6.8-.36 6.15 8.87 41.35 40.69 41.19 34.77-.19 45.7-47.56 45.4-69.07-.6-41.99-30.97-55.12-46.54-51.07-8.47 2.2-19.74 6.98-20.26 24.48-.46 15.12 12.9 31.98 21.23 41.52 1.42 1.63 2.7 3.04 3.73 4.2-.64 2.43-2.75 4.05-4.7 4.86a217.2 217.2 0 0 1-4.05-4.34c-12.78-14.09-22.37-28.9-22.37-46.24Z"/><path fill="#0c419a" d="M120.8 35.67c-3-.16-5.91.05-8.64.59a32.39 32.39 0 0 0-17.06 9.22c-4.85 5.12-8.22 12.45-8.22 22.24 0 17.7 9.78 32.75 22.63 46.91l.74-.67-.74.67c1.34 1.47 2.7 2.93 4.07 4.36l.47.5.63-.27c2.16-.88 4.54-2.68 5.29-5.52l.13-.52-.35-.4c-1.04-1.17-2.3-2.57-3.72-4.2l-.75.66.74-.66c-8.3-9.5-21.42-26.32-20.98-40.83.25-8.54 3.08-13.8 6.83-17.28 3.75-3.48 8.51-5.18 12.68-6.26 14.75-3.84 44.7 8.6 45.29 50.11.15 10.58-2.5 27.72-9.45 42.08-6.95 14.37-18.02 25.89-34.95 25.98-15.55.08-25.46-8.41-31.57-17.78a56.35 56.35 0 0 1-6.43-13.66c-1.3-4.08-1.76-7.46-1.7-8.7.1-1.6.03-2.84.2-3.75.16-.92.45-1.52 1.5-2.3l-.04.03a7.72 7.72 0 0 0 2.04-2.4 34.63 34.63 0 0 0 2.03-3.79c1.3-2.8 2.42-5.88 2.7-8.14.5-4.26-.02-10.43-3.34-17.42-2.59-5.44-5.6-11.67-6.81-14.11l-.3-.59-.64.03c-2.96.13-4.9.84-7.03 3.26l-.45.51.31.61c1.18 2.27 3 6 4.63 9.75 1.62 3.74 3.03 7.55 3.38 9.73.45 2.8.22 6.93-1.16 10.55-1.39 3.6-3.83 6.66-7.85 7.78-4.3 1.2-8.8 1.9-12.54.9-3.73-1.02-6.8-3.62-8.61-9.63-2.06-6.86-3.06-9.84-4.3-13.66l-2.19-6.94-.02-.06-.2-.56-.63-.08c-2.83-.28-4.84-.04-7.38 2l-.49.4 5.35 23.15v.01c.8 3.25 3.09 6.34 5.75 8.92a28.5 28.5 0 0 0 8.28 5.7c2.34.98 4.9 1.43 7.14 1.9 2.25.45 4.17.96 5.12 1.7 1.7 1.32 3.44 3.63 4.94 5.87 1.49 2.24 2.71 4.4 3.63 5.61 1.1 1.46 2.56 4.44 4.54 7.98a67.85 67.85 0 0 0 7.99 11.64c6.9 7.9 17.5 15.02 34.15 14.99 18.28-.03 31.63-10.37 40.22-25.18 8.59-14.8 12.54-34.06 12.33-52.35-.44-39.16-26.18-57.56-47.2-58.63Zm-.12 2c19.88 1.01 44.88 18.36 45.31 56.65.2 17.98-3.72 36.95-12.06 51.33-8.34 14.38-20.96 24.16-38.5 24.18-16.08.02-26-6.72-32.64-14.31a65.94 65.94 0 0 1-7.74-11.3c-1.96-3.49-3.35-6.41-4.69-8.2-.74-.98-2.03-3.2-3.57-5.52-1.53-2.3-3.33-4.74-5.37-6.34-1.54-1.2-3.67-1.62-5.95-2.09-2.28-.46-4.72-.91-6.76-1.77a27 27 0 0 1-7.67-5.3c-2.5-2.41-4.54-5.3-5.2-7.96l-5.03-21.8a6.11 6.11 0 0 1 4.78-1.28l6.26 19.88c1.94 6.47 5.67 9.8 10 10.97 4.33 1.18 9.15.34 13.6-.9 4.73-1.31 7.64-4.98 9.17-8.99 1.54-4 1.8-8.38 1.28-11.58-.43-2.62-1.88-6.4-3.53-10.2a160.61 160.61 0 0 0-4.34-9.16 5.98 5.98 0 0 1 4.51-2.08c1.3 2.64 4.02 8.25 6.49 13.43 3.16 6.65 3.61 12.46 3.15 16.32-.21 1.8-1.28 4.87-2.53 7.54a32.87 32.87 0 0 1-1.9 3.56 8.1 8.1 0 0 1-1.46 1.8l-.01.02-.02.01a5.54 5.54 0 0 0-2.3 3.55c-.22 1.27-.13 2.53-.2 4-.12 1.85.43 5.18 1.77 9.41a58.24 58.24 0 0 0 6.66 14.16c6.36 9.73 16.98 18.76 33.26 18.68 17.83-.1 29.6-12.36 36.74-27.1 7.13-14.75 9.8-32.05 9.65-42.98-.6-42.47-31.4-56.3-47.8-52.03-4.3 1.12-9.4 2.9-13.53 6.74-4.13 3.83-7.2 9.72-7.47 18.68-.47 15.41 12.52 31.85 20.92 41.53a20.25 20.25 0 0 1-3.57 3.35c-12.38-13.8-21.5-28.16-21.5-44.85 0-9.34 3.14-16.1 7.66-20.86a30.46 30.46 0 0 1 16-8.64c2.55-.5 5.29-.7 8.13-.55zm-5.41 73.07 2.52 2.84a6.6 6.6 0 0 1-3.32 3.44c-.92-.97-1.84-1.96-2.75-2.95 1.3-.98 2.49-2.1 3.55-3.33z" color="#000"/><path fill="#fff" stroke="#0c419a" stroke-width="2" d="m34.44 82.53.1.36a6.74 6.74 0 0 0-3.73 1.04C26.1 64.48 15.89 25.9 28.38 12.6c4.54-4.54 10.21-6.1 12.48-6.32l.81 3.56a22.53 22.53 0 0 0-12 6.81c-9.96 10.61 1.1 52.13 4.77 65.88Z"/><path fill="#fff" stroke="#0c419a" stroke-width="2" d="M37.94 18.27c18 11.03 28.86 42.16 33.4 52.7A6.49 6.49 0 0 0 68 72.59c-6.39-16.54-19.2-44.02-30.06-50.75C29.25 16.46 21.9 18.6 18 20.71c-.05-1.7-.35-2.44-1.3-3.4 6.65-2.44 14.1-3.74 21.24.96Z"/><path fill="#0c419a" stroke="#0c419a" stroke-width="2" d="M46.86 10c-2.47 0-4.7 1.3-5.84-1.61-.65-1.79.16-3.41 1.46-3.9 1.3-.48 2.43-.64 2.92-1.13a7.2 7.2 0 0 1 3.73-2.1c2.24-.38 4.54.48 5.51 2.91a4.28 4.28 0 0 1-2.76 5.84c-1.45.48-3.72 0-5.02 0Z"/><ellipse cx="52.51" cy="5.35" fill="#fff" stroke="#fff" stroke-width="2" rx="1.12" ry="2.28" transform="rotate(-13 52.51 5.35)"/><path fill="#0c419a" stroke="#0c419a" stroke-width="2" d="M10.7 17.3c2.47 0 5.74-1.94 6.98 1.46.64 1.78.11 3.7-1.18 4.18-1.3.48-2.44.65-2.92 1.13a7.2 7.2 0 0 1-3.73 2.11c-2.25.38-4.67-.44-5.51-2.92-.77-2.23-.26-4.37 1.83-5.47 1.78-.94 2.75-.49 4.53-.49Z"/><ellipse cx="6.47" cy="22.53" fill="#fff" stroke="#fff" stroke-width="2" rx="1.12" ry="2.28" transform="rotate(158 6.47 22.53)"/></svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { shallowMount } from '@vue/test-utils'
|
|
3
|
+
|
|
4
|
+
import MaintenancePage from '../'
|
|
5
|
+
|
|
6
|
+
describe('MaintenancePage', () => {
|
|
7
|
+
it('renders correctly', () => {
|
|
8
|
+
const wrapper = shallowMount(MaintenancePage)
|
|
9
|
+
|
|
10
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
11
|
+
})
|
|
12
|
+
})
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`MaintenancePage > renders correctly 1`] = `"<error-page-stub data-v-25a0ed68="" pagetitle="Maintenance en cours" message="L’application n’est pas disponible pour le moment, veuillez nous excuser pour la gêne occasionnée." codeerrortext="Code d'erreur : " btnlink="/" hidebtn="false" no-btn=""></error-page-stub>"`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta, Source } from "@storybook/blocks";
|
|
2
|
+
import * as NotFoundPageStories from "./NotFoundPage.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={NotFoundPageStories} />
|
|
5
|
+
|
|
6
|
+
# NotFoundPage
|
|
7
|
+
|
|
8
|
+
Le composant `NotFoundPage` permet d'afficher une page 404.
|
|
9
|
+
Il est basé sur le composant `ErrorPage` du design system.
|
|
10
|
+
|
|
11
|
+
<Canvas of={NotFoundPageStories.Default} />
|
|
12
|
+
|
|
13
|
+
## Code d'erreur
|
|
14
|
+
|
|
15
|
+
Si un code d'erreur est passé en paramètre `support_id`, le composant l'affiche dans le template.
|
|
16
|
+
|
|
17
|
+
Exemple : `https://www.example.fr?support_id=1234567890123456789`
|
|
18
|
+
|
|
19
|
+
<Canvas of={NotFoundPageStories.WithErrorCode} />
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import NotFoundPage from './NotFoundPage.vue'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Templates/NotFoundPage',
|
|
6
|
+
component: NotFoundPage,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof NotFoundPage>
|
|
11
|
+
|
|
12
|
+
export default meta
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof NotFoundPage>
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
parameters: {
|
|
18
|
+
query: {
|
|
19
|
+
support_id: '',
|
|
20
|
+
},
|
|
21
|
+
sourceCode: [
|
|
22
|
+
{
|
|
23
|
+
name: 'Template',
|
|
24
|
+
code: `
|
|
25
|
+
<template>
|
|
26
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
27
|
+
<NotFoundPage />
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
`,
|
|
31
|
+
}, {
|
|
32
|
+
name: 'Script',
|
|
33
|
+
code: `
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { NotFoundPage } from '@cnamts/synapse'
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
`,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
decorators: [
|
|
43
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
44
|
+
],
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const WithErrorCode: Story = {
|
|
48
|
+
parameters: {
|
|
49
|
+
query: {
|
|
50
|
+
support_id: '1234567890123456789',
|
|
51
|
+
},
|
|
52
|
+
sourceCode: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Template',
|
|
55
|
+
code: `
|
|
56
|
+
<template>
|
|
57
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
58
|
+
<NotFoundPage />
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
`,
|
|
62
|
+
}, {
|
|
63
|
+
name: 'Script',
|
|
64
|
+
code: `
|
|
65
|
+
<script setup lang="ts">
|
|
66
|
+
import { NotFoundPage } from '@cnamts/synapse'
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
`,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
decorators: [
|
|
74
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
75
|
+
],
|
|
76
|
+
}
|