@cnamts/synapse 0.0.4-alpha → 0.0.6-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-system-v3.d.ts +1277 -499
- package/dist/design-system-v3.js +4193 -1573
- package/dist/design-system-v3.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +18 -17
- package/src/assets/settings.scss +3 -0
- package/src/assets/tokens.scss +16 -17
- package/src/components/BackBtn/Accessibilite.mdx +14 -0
- package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackBtn/AccessibiliteItems.ts +102 -0
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +8 -8
- package/src/components/BackBtn/BackBtn.vue +0 -1
- package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +52 -0
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +1 -1
- package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
- package/src/components/CollapsibleList/Accessibilite.stories.ts +170 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +122 -0
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +1 -1
- package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CookieBanner/Accessibilite.mdx +14 -0
- package/src/components/CookieBanner/Accessibilite.stories.ts +219 -0
- package/src/components/CookieBanner/AccessibiliteItems.ts +356 -0
- package/src/components/CookieBanner/CookieBanner.mdx +219 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +678 -0
- package/src/components/CookieBanner/CookieBanner.vue +225 -0
- package/src/components/CookieBanner/config.ts +38 -0
- package/src/components/CookieBanner/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CookieBanner/locales.ts +12 -0
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +129 -0
- package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +197 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +123 -0
- package/src/components/CookiesSelection/CookiesInformation/locales.ts +21 -0
- package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.ts +121 -0
- package/src/components/CookiesSelection/CookiesSelection.vue +127 -0
- package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +47 -0
- package/src/components/CookiesSelection/CookiesTable/headers.ts +14 -0
- package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.ts +30 -0
- package/src/components/CookiesSelection/CookiesTable/tests/__snapshots__/CookiesTable.spec.ts.snap +3 -0
- package/src/components/CookiesSelection/locales.ts +10 -0
- package/src/components/CookiesSelection/tests/CookiesSelection.spec.ts +184 -0
- package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +192 -0
- package/src/components/CookiesSelection/types.ts +15 -0
- package/src/components/CopyBtn/Accessibilite.mdx +14 -0
- package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +105 -0
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +4 -4
- package/src/components/CopyBtn/CopyBtn.vue +0 -1
- package/src/components/CopyBtn/config.ts +2 -0
- package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyBtnSelect/Accessibilite.stories.ts +193 -0
- package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +139 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +45 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +662 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +254 -0
- package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.stories.ts +166 -0
- package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +96 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +41 -0
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +30 -83
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +46 -6
- package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
- package/src/components/Customs/SySelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SySelect/Accessibilite.stories.ts +217 -0
- package/src/components/Customs/SySelect/AccessibiliteItems.ts +173 -0
- package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +9 -8
- package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -79
- package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +44 -13
- package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
- package/src/components/Customs/SyTextField/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +224 -0
- package/src/components/Customs/SyTextField/AccessibiliteItems.ts +198 -0
- package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
- package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +145 -34
- package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +27 -7
- package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
- package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +5 -6
- package/src/components/DataList/Accessibilite.mdx +14 -0
- package/src/components/DataList/Accessibilite.stories.ts +166 -0
- package/src/components/DataList/AccessibiliteItems.ts +47 -0
- package/src/components/DataList/DataList.mdx +1 -1
- package/src/components/DataList/DataList.stories.ts +10 -10
- package/src/components/DataList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DataListGroup/Accessibilite.mdx +14 -0
- package/src/components/DataListGroup/Accessibilite.stories.ts +225 -0
- package/src/components/DataListGroup/AccessibiliteItems.ts +79 -0
- package/src/components/DataListGroup/DataListGroup.mdx +1 -1
- package/src/components/DataListGroup/DataListGroup.stories.ts +7 -7
- package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DialogBox/Accessibilite.mdx +14 -0
- package/src/components/DialogBox/Accessibilite.stories.ts +189 -0
- package/src/components/DialogBox/AccessibiliteItems.ts +167 -0
- package/src/components/DialogBox/DialogBox.mdx +14 -0
- package/src/components/DialogBox/DialogBox.stories.ts +798 -0
- package/src/components/DialogBox/DialogBox.vue +181 -0
- package/src/components/DialogBox/config.ts +25 -0
- package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DialogBox/locales.ts +5 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -31
- package/src/components/DownloadBtn/DownloadBtn.mdx +3 -3
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +6 -6
- package/src/components/ErrorPage/Accessibilite.mdx +14 -0
- package/src/components/ErrorPage/Accessibilite.stories.ts +189 -0
- package/src/components/ErrorPage/AccessibiliteItems.ts +205 -0
- package/src/components/ErrorPage/ErrorPage.mdx +21 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
- package/src/components/ErrorPage/ErrorPage.vue +93 -0
- package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ErrorPage/locales.ts +5 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
- package/src/components/FooterBar/Accessibilite.mdx +14 -0
- package/src/components/FooterBar/Accessibilite.stories.ts +223 -0
- package/src/components/FooterBar/AccessibiliteItems.ts +257 -0
- package/src/components/FooterBar/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +556 -8
- package/src/components/FooterBar/FooterBar.vue +80 -73
- package/src/components/FooterBar/config.ts +2 -3
- package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
- package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +24 -22
- package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +169 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +3 -3
- package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/AccessibiliteItems.ts +194 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +60 -2
- package/src/components/HeaderBar/HeaderBar.vue +1 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +174 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +1 -1
- package/src/components/HeaderLoading/Accessibilite.mdx +14 -0
- package/src/components/HeaderLoading/Accessibilite.stories.ts +167 -0
- package/src/components/HeaderLoading/AccessibiliteItems.ts +29 -0
- package/src/components/HeaderLoading/HeaderLoading.mdx +1 -1
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +1 -1
- package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +6 -6
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +35 -33
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
- package/src/components/HeaderToolbar/Accessibilite.mdx +14 -0
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +203 -0
- package/src/components/HeaderToolbar/AccessibiliteItems.ts +200 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +1 -1
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +2 -2
- package/src/components/HeaderToolbar/HeaderToolbar.vue +3 -2
- package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
- package/src/components/LangBtn/Accessibilite.mdx +14 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +168 -0
- package/src/components/LangBtn/AccessibiliteItems.ts +101 -0
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +4 -4
- package/src/components/LangBtn/LangBtn.vue +3 -2
- package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
- package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
- package/src/components/Logo/Accessibilite.mdx +14 -0
- package/src/components/Logo/Accessibilite.stories.ts +223 -0
- package/src/components/Logo/AccessibiliteItems.ts +155 -0
- package/src/components/Logo/Logo.mdx +1 -1
- package/src/components/Logo/Logo.stories.ts +8 -8
- package/src/components/Logo/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LogoBrandSection/Accessibilite.mdx +14 -0
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +223 -0
- package/src/components/LogoBrandSection/AccessibiliteItems.ts +194 -0
- package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/MaintenancePage/Accessibilite.mdx +14 -0
- package/src/components/MaintenancePage/Accessibilite.stories.ts +189 -0
- package/src/components/MaintenancePage/AccessibiliteItems.ts +173 -0
- package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
- package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
- package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
- package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/MaintenancePage/index.ts +3 -0
- package/src/components/MaintenancePage/locales.ts +5 -0
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
- package/src/components/NirField/Accessibilite.mdx +14 -0
- package/src/components/NirField/Accessibilite.stories.ts +214 -0
- package/src/components/NirField/AccessibiliteItems.ts +243 -0
- package/src/components/NirField/NirField.mdx +216 -0
- package/src/components/NirField/NirField.stories.ts +359 -0
- package/src/components/NirField/NirField.vue +450 -0
- package/src/components/NirField/config.ts +16 -0
- package/src/components/NirField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/locales.ts +12 -0
- package/src/components/NirField/nirValidation.ts +42 -0
- package/src/components/NirField/tests/NirField.spec.ts +119 -0
- package/src/components/NotFoundPage/Accessibilite.mdx +14 -0
- package/src/components/NotFoundPage/Accessibilite.stories.ts +190 -0
- package/src/components/NotFoundPage/AccessibiliteItems.ts +205 -0
- package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
- package/src/components/NotFoundPage/assets/not-found.svg +1 -0
- package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotFoundPage/locales.ts +6 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
- package/src/components/NotificationBar/Accessibilite.mdx +14 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
- package/src/components/NotificationBar/AccessibiliteItems.ts +144 -0
- package/src/components/NotificationBar/NotificationBar.mdx +1 -1
- package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotificationBar/options.ts +1 -0
- package/src/components/PageContainer/Accessibilite.mdx +14 -0
- package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
- package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +4 -4
- package/src/components/PageContainer/PageContainer.vue +16 -15
- package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +2 -2
- package/src/components/PhoneField/Accessibilite.mdx +14 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +216 -0
- package/src/components/PhoneField/AccessibiliteItems.ts +238 -0
- package/src/components/PhoneField/PhoneField.mdx +1 -1
- package/src/components/PhoneField/PhoneField.stories.ts +2 -2
- package/src/components/PhoneField/PhoneField.vue +5 -6
- package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
- package/src/components/SkipLink/Accessibilite.mdx +14 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
- package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
- package/src/components/SkipLink/SkipLink.stories.ts +2 -2
- package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/Accessibilite.mdx +14 -0
- package/src/components/SocialMediaLinks/Accessibilite.stories.ts +170 -0
- package/src/components/SocialMediaLinks/AccessibiliteItems.ts +160 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +18 -14
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +3 -2
- package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
- package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
- package/src/components/SubHeader/Accessibilite.mdx +14 -0
- package/src/components/SubHeader/Accessibilite.stories.ts +166 -0
- package/src/components/SubHeader/AccessibiliteItems.ts +146 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -1
- package/src/components/SubHeader/SubHeader.stories.ts +11 -11
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SyAlert/Accessibilite.mdx +14 -0
- package/src/components/SyAlert/Accessibilite.stories.ts +166 -0
- package/src/components/SyAlert/AccessibiliteItems.ts +122 -0
- package/src/components/{Alert/Alert.mdx → SyAlert/SyAlert.mdx} +9 -9
- package/src/components/{Alert/Alert.stories.ts → SyAlert/SyAlert.stories.ts} +22 -22
- package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/{Alert/tests/Alert.spec.ts → SyAlert/tests/SyAlert.spec.ts} +5 -5
- package/src/components/{Alert/tests/__snapshots__/Alert.spec.ts.snap → SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap} +2 -2
- package/src/components/UserMenuBtn/Accessibilite.mdx +14 -0
- package/src/components/UserMenuBtn/Accessibilite.stories.ts +189 -0
- package/src/components/UserMenuBtn/AccessibiliteItems.ts +155 -0
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +540 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +101 -0
- package/src/components/UserMenuBtn/config.ts +24 -0
- package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
- package/src/components/index.ts +19 -4
- package/src/composables/index.ts +8 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +84 -0
- package/src/composables/rules/useFieldValidation.ts +90 -0
- package/src/designTokens/index.ts +2 -0
- package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
- package/src/main.ts +3 -0
- package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
- package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
- package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
- package/src/stories/Fondamentaux/Elevations.mdx +14 -0
- package/src/stories/Fondamentaux/Espacements.mdx +29 -0
- package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
- package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
- package/src/stories/Fondamentaux/Typographie.mdx +58 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +120 -0
- package/src/stories/GuideDuDev/components.stories.ts +5 -5
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
- package/src/stories/Guidelines/Vuetify/Vuetify.mdx +11 -0
- package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +138 -0
- package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +350 -0
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
- package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
- package/src/stories/Guidelines/Typo.mdx +0 -53
- /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
- /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
- /package/src/components/{Alert/Alert.vue → SyAlert/SyAlert.vue} +0 -0
- /package/src/components/{Alert → SyAlert}/locales.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls, Story, Source } from '@storybook/blocks';
|
|
2
|
-
import * as CustomInputSelectStories from "./CustomInputSelect.stories.ts";
|
|
3
|
-
|
|
4
|
-
<Meta of={CustomInputSelectStories} />
|
|
5
|
-
|
|
6
|
-
# CustomInputSelect
|
|
7
|
-
|
|
8
|
-
Le composant `CustomInputSelect` est utilisé pour proposer une alternative au `v-select` de Vuetify qui ne respecte pas les règles RGAA.
|
|
9
|
-
|
|
10
|
-
<Canvas of={CustomInputSelectStories.Default} />
|
|
11
|
-
|
|
12
|
-
<Story of={CustomInputSelectStories.Info} />
|
|
13
|
-
|
|
14
|
-
# API
|
|
15
|
-
|
|
16
|
-
<Controls of={CustomInputSelectStories.Default} />
|
|
17
|
-
|
|
18
|
-
# Exemple d'utilisation
|
|
19
|
-
|
|
20
|
-
<Source dark code={`
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import CustomInputSelect from '@cnamts/synapse'
|
|
23
|
-
|
|
24
|
-
const items = [
|
|
25
|
-
{ text: 'Option 1', value: '1' },
|
|
26
|
-
{ text: 'Option 2', value: '2' },
|
|
27
|
-
],
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<main>
|
|
32
|
-
<div class="mt-12 ml-12">
|
|
33
|
-
<CustomInputSelect
|
|
34
|
-
v-model="value"
|
|
35
|
-
:items="items"
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
</main>
|
|
39
|
-
</template>
|
|
40
|
-
`} />
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils'
|
|
2
|
-
import { expect, describe, it } from 'vitest'
|
|
3
|
-
import CustomSelect from '../CustomSelect.vue'
|
|
4
|
-
import { vuetify } from '@tests/unit/setup'
|
|
5
|
-
|
|
6
|
-
describe('customSelect.vue', () => {
|
|
7
|
-
it('renders the component with default props', () => {
|
|
8
|
-
const wrapper = mount(CustomSelect, {
|
|
9
|
-
global: {
|
|
10
|
-
plugins: [vuetify],
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
expect(wrapper.exists()).toBe(true)
|
|
14
|
-
expect(wrapper.find('.custom-select').text()).toBe('')
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
it('toggles the menu when clicked', async () => {
|
|
18
|
-
const wrapper = mount(CustomSelect, {
|
|
19
|
-
global: {
|
|
20
|
-
plugins: [vuetify],
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
24
|
-
expect(wrapper.find('.v-list').exists()).toBe(true)
|
|
25
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
26
|
-
expect(wrapper.find('.v-list').exists()).toBe(false)
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
it('selects an item when clicked', async () => {
|
|
30
|
-
const items = [{ text: 'Option 1', value: '1' }, { text: 'Option 2', value: '2' }]
|
|
31
|
-
const wrapper = mount(CustomSelect, {
|
|
32
|
-
props: { items },
|
|
33
|
-
global: {
|
|
34
|
-
plugins: [vuetify],
|
|
35
|
-
},
|
|
36
|
-
})
|
|
37
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
38
|
-
const firstItem = wrapper.findAll('.v-list-item').at(0)
|
|
39
|
-
if (firstItem) {
|
|
40
|
-
await firstItem.trigger('click')
|
|
41
|
-
}
|
|
42
|
-
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([{ text: 'Option 1', value: '1' }])
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
it('closes the menu when an item is selected', async () => {
|
|
46
|
-
const items = [{ text: 'Option 1', value: '1' }, { text: 'Option 2', value: '2' }]
|
|
47
|
-
const wrapper = mount(CustomSelect, {
|
|
48
|
-
props: { items },
|
|
49
|
-
global: {
|
|
50
|
-
plugins: [vuetify],
|
|
51
|
-
},
|
|
52
|
-
})
|
|
53
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
54
|
-
const firstItem = wrapper.findAll('.v-list-item').at(0)
|
|
55
|
-
if (firstItem) {
|
|
56
|
-
await firstItem.trigger('click')
|
|
57
|
-
}
|
|
58
|
-
expect(wrapper.find('.v-list').exists()).toBe(false)
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
it('displays the selected item text', async () => {
|
|
62
|
-
const items = [{ text: 'Option 1', value: '1' }, { text: 'Option 2', value: '2' }]
|
|
63
|
-
const wrapper = mount(CustomSelect, {
|
|
64
|
-
props: { items, modelValue: { text: 'Option 1', value: '1' } },
|
|
65
|
-
global: {
|
|
66
|
-
plugins: [vuetify],
|
|
67
|
-
},
|
|
68
|
-
})
|
|
69
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
70
|
-
const firstItem = wrapper.findAll('.v-list-item').at(0)
|
|
71
|
-
if (firstItem) {
|
|
72
|
-
await firstItem.trigger('click')
|
|
73
|
-
}
|
|
74
|
-
expect(wrapper.find('input').element.value).toBe('Option 1')
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
it('closes the menu on escape key press', async () => {
|
|
78
|
-
const items = [{ text: 'Option 1', value: '1' }, { text: 'Option 2', value: '2' }]
|
|
79
|
-
const wrapper = mount(CustomSelect, {
|
|
80
|
-
props: { items },
|
|
81
|
-
global: {
|
|
82
|
-
plugins: [vuetify],
|
|
83
|
-
},
|
|
84
|
-
})
|
|
85
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
86
|
-
await wrapper.find('.v-list').trigger('keydown.esc')
|
|
87
|
-
expect(wrapper.find('.v-list').exists()).toBe(false)
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it('renders error messages when provided', () => {
|
|
91
|
-
const errorMessages = ['Error 1']
|
|
92
|
-
const wrapper = mount(CustomSelect, {
|
|
93
|
-
props: { errorMessages },
|
|
94
|
-
global: {
|
|
95
|
-
plugins: [vuetify],
|
|
96
|
-
},
|
|
97
|
-
})
|
|
98
|
-
expect(wrapper.find('.v-messages__message').text()).toContain('Error 1')
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
it('does not render error messages when not provided', () => {
|
|
102
|
-
const wrapper = mount(CustomSelect, {
|
|
103
|
-
global: {
|
|
104
|
-
plugins: [vuetify],
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
expect(wrapper.find('.v-messages__message').exists()).toBe(false)
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
it('does not render the label when not provided', () => {
|
|
111
|
-
const wrapper = mount(CustomSelect, {
|
|
112
|
-
global: {
|
|
113
|
-
plugins: [vuetify],
|
|
114
|
-
},
|
|
115
|
-
})
|
|
116
|
-
expect(wrapper.find('.v-label').text()).toBe('')
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
it('returns the correct item text using getItemText', () => {
|
|
120
|
-
const wrapper = mount(CustomSelect, {
|
|
121
|
-
props: { textKey: 'text' },
|
|
122
|
-
global: {
|
|
123
|
-
plugins: [vuetify],
|
|
124
|
-
},
|
|
125
|
-
})
|
|
126
|
-
const item = { text: 'Option 1', value: '1' }
|
|
127
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
128
|
-
const instance = wrapper.vm as any
|
|
129
|
-
expect(instance.getItemText(item)).toBe('Option 1')
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
it('returns default text when selectedItem is null', () => {
|
|
133
|
-
const wrapper = mount(CustomSelect, {
|
|
134
|
-
global: {
|
|
135
|
-
plugins: [vuetify],
|
|
136
|
-
},
|
|
137
|
-
})
|
|
138
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
139
|
-
const instance = wrapper.vm as any
|
|
140
|
-
expect(instance.selectedItemText).toBe('Sélectionnez une option')
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
it('returns the correct text when selectedItem is an object', async () => {
|
|
144
|
-
const wrapper = mount(CustomSelect, {
|
|
145
|
-
props: { modelValue: { text: 'Option 1', value: '1' }, textKey: 'text' },
|
|
146
|
-
global: {
|
|
147
|
-
plugins: [vuetify],
|
|
148
|
-
},
|
|
149
|
-
})
|
|
150
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
151
|
-
const instance = wrapper.vm as any
|
|
152
|
-
await wrapper.setProps({ modelValue: { text: 'Option 1', value: '1' } })
|
|
153
|
-
expect(instance.selectedItemText).toBe('Option 1')
|
|
154
|
-
})
|
|
155
|
-
|
|
156
|
-
it('formats items correctly', () => {
|
|
157
|
-
const items = ['Option 1', 'Option 2']
|
|
158
|
-
const wrapper = mount(CustomSelect, {
|
|
159
|
-
props: { items, textKey: 'text', valueKey: 'value' },
|
|
160
|
-
global: {
|
|
161
|
-
plugins: [vuetify],
|
|
162
|
-
},
|
|
163
|
-
})
|
|
164
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
165
|
-
const formattedItems = (wrapper.vm as any).formattedItems
|
|
166
|
-
expect(formattedItems).toEqual([
|
|
167
|
-
{ text: 'Option 1', value: 'Option 1' },
|
|
168
|
-
{ text: 'Option 2', value: 'Option 2' },
|
|
169
|
-
])
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
it('applies the correct button class when outlined is true', () => {
|
|
173
|
-
const wrapper = mount(CustomSelect, {
|
|
174
|
-
props: { outlined: true },
|
|
175
|
-
global: {
|
|
176
|
-
plugins: [vuetify],
|
|
177
|
-
},
|
|
178
|
-
})
|
|
179
|
-
expect(wrapper.find('.v-field--variant-outlined').exists()).toBe(true)
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
it('does not apply the outlined button class when outlined is false', () => {
|
|
183
|
-
const wrapper = mount(CustomSelect, {
|
|
184
|
-
props: { outlined: false },
|
|
185
|
-
global: {
|
|
186
|
-
plugins: [vuetify],
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
expect(wrapper.find('.custom-select').classes()).not.toContain('v-btn--variant-outlined')
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
it('updates selectedItem when v-model changes', async () => {
|
|
193
|
-
const wrapper = mount(CustomSelect, {
|
|
194
|
-
props: { modelValue: { text: 'Option 1', value: '1' }, textKey: 'text' },
|
|
195
|
-
global: {
|
|
196
|
-
plugins: [vuetify],
|
|
197
|
-
},
|
|
198
|
-
})
|
|
199
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
200
|
-
const instance = wrapper.vm as any
|
|
201
|
-
expect(instance.selectedItem).toEqual({ text: 'Option 1', value: '1' })
|
|
202
|
-
|
|
203
|
-
await wrapper.setProps({ modelValue: { text: 'Option 2', value: '2' } })
|
|
204
|
-
expect(instance.selectedItem).toEqual({ text: 'Option 2', value: '2' })
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
it('emits update:modelValue when selectedItem changes', async () => {
|
|
208
|
-
const wrapper = mount(CustomSelect, {
|
|
209
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
210
|
-
props: { modelValue: null as any, textKey: 'text' },
|
|
211
|
-
global: {
|
|
212
|
-
plugins: [vuetify],
|
|
213
|
-
},
|
|
214
|
-
})
|
|
215
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
216
|
-
const instance = wrapper.vm as any
|
|
217
|
-
instance.selectItem({ text: 'Option 1', value: '1' })
|
|
218
|
-
await wrapper.vm.$nextTick()
|
|
219
|
-
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([{ text: 'Option 1', value: '1' }])
|
|
220
|
-
})
|
|
221
|
-
|
|
222
|
-
it('closes the menu when v-click-outside directive is called', async () => {
|
|
223
|
-
const wrapper = mount(CustomSelect, {
|
|
224
|
-
global: {
|
|
225
|
-
plugins: [vuetify],
|
|
226
|
-
},
|
|
227
|
-
})
|
|
228
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
229
|
-
expect(wrapper.find('.v-list').exists()).toBe(true)
|
|
230
|
-
await wrapper.find('.custom-select').trigger('mouseleave')
|
|
231
|
-
await wrapper.find('.custom-select').trigger('click')
|
|
232
|
-
await wrapper.vm.$nextTick()
|
|
233
|
-
|
|
234
|
-
expect(wrapper.find('.v-list').exists()).toBe(false)
|
|
235
|
-
})
|
|
236
|
-
})
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas, Controls, Source } from '@storybook/blocks';
|
|
2
|
-
import * as CustomTextFieldStories from "./CustomTextField.stories";
|
|
3
|
-
|
|
4
|
-
<Meta of={CustomTextFieldStories} />
|
|
5
|
-
|
|
6
|
-
# CustomTextField
|
|
7
|
-
|
|
8
|
-
Le composant `CustomTextField` est utilisé pour proposer une alternative au `TextField` de Vuetify, conforme au style du design-system et qui respecte les règles d'accessibilité RGAA.
|
|
9
|
-
|
|
10
|
-
<Canvas of={CustomTextFieldStories.Default} />
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# API
|
|
14
|
-
|
|
15
|
-
<Controls of={CustomTextFieldStories.Default} />
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# Exemple d'utilisation
|
|
19
|
-
|
|
20
|
-
<Source
|
|
21
|
-
dark code={`
|
|
22
|
-
<script setup lang="ts">
|
|
23
|
-
import { ref } from 'vue'
|
|
24
|
-
import CustomSelect from '@cnamts/synapse'
|
|
25
|
-
|
|
26
|
-
const model = ref('')
|
|
27
|
-
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<main class="ma-12">
|
|
32
|
-
Text saisie: {{ model }}
|
|
33
|
-
<div class="d-flex flex-wrap align-center">
|
|
34
|
-
<CustomTextField
|
|
35
|
-
v-model="model"
|
|
36
|
-
label="Label"
|
|
37
|
-
color="primary"
|
|
38
|
-
is-clearable
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</main>
|
|
42
|
-
</template>
|
|
43
|
-
`}
|
|
44
|
-
/>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Meta, Typeset } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="Guidelines/Typographie" />
|
|
4
|
-
|
|
5
|
-
export const typography = {
|
|
6
|
-
type: {
|
|
7
|
-
primary: 'Arial',
|
|
8
|
-
},
|
|
9
|
-
weight: {
|
|
10
|
-
regular: '400',
|
|
11
|
-
bold: '700',
|
|
12
|
-
extrabold: '800',
|
|
13
|
-
black: '900',
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
s1: 12,
|
|
17
|
-
s2: 14,
|
|
18
|
-
s3: 16,
|
|
19
|
-
m1: 18,
|
|
20
|
-
m2: 20,
|
|
21
|
-
m3: 24,
|
|
22
|
-
l1: 28,
|
|
23
|
-
l2: 30,
|
|
24
|
-
l3: 32,
|
|
25
|
-
l4:40,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const SampleText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
|
30
|
-
|
|
31
|
-
# Typography
|
|
32
|
-
|
|
33
|
-
**Font:** Arial
|
|
34
|
-
|
|
35
|
-
**Weights:** 400(regular), 700(bold), 800(extrabold), 900(black)
|
|
36
|
-
|
|
37
|
-
<Typeset
|
|
38
|
-
fontSizes={[
|
|
39
|
-
Number(typography.size.s1),
|
|
40
|
-
Number(typography.size.s2),
|
|
41
|
-
Number(typography.size.s3),
|
|
42
|
-
Number(typography.size.m1),
|
|
43
|
-
Number(typography.size.m2),
|
|
44
|
-
Number(typography.size.m3),
|
|
45
|
-
Number(typography.size.l1),
|
|
46
|
-
Number(typography.size.l2),
|
|
47
|
-
Number(typography.size.l3),
|
|
48
|
-
Number(typography.size.l4),
|
|
49
|
-
]}
|
|
50
|
-
fontWeight={typography.weight.black}
|
|
51
|
-
sampleText={SampleText}
|
|
52
|
-
fontFamily={typography.type.primary}
|
|
53
|
-
/>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|