@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,110 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import type { IconType, VariantStyle, ColorType } from './types'
|
|
4
|
+
import {
|
|
5
|
+
mdiAlertOutline,
|
|
6
|
+
mdiCheck,
|
|
7
|
+
mdiInformationOutline,
|
|
8
|
+
mdiClose,
|
|
9
|
+
mdiInformation,
|
|
10
|
+
} from '@mdi/js'
|
|
11
|
+
|
|
12
|
+
// only variantStyle need a default value
|
|
13
|
+
/* eslint-disable vue/require-default-prop */
|
|
14
|
+
const props = withDefaults(
|
|
15
|
+
defineProps<{
|
|
16
|
+
prependIcon?: IconType
|
|
17
|
+
appendIcon?: IconType
|
|
18
|
+
prependInnerIcon?: IconType
|
|
19
|
+
appendInnerIcon?: IconType
|
|
20
|
+
variantStyle?: VariantStyle
|
|
21
|
+
color?: ColorType
|
|
22
|
+
isClearable?: boolean
|
|
23
|
+
showDivider?: boolean
|
|
24
|
+
label?: string
|
|
25
|
+
}>(),
|
|
26
|
+
{
|
|
27
|
+
variantStyle: 'outlined', // Remplacez par la valeur par défaut souhaitée
|
|
28
|
+
},
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const ICONS: Record<IconType, string> = {
|
|
32
|
+
info: mdiInformationOutline,
|
|
33
|
+
success: mdiCheck,
|
|
34
|
+
warning: mdiAlertOutline,
|
|
35
|
+
error: mdiInformation,
|
|
36
|
+
close: mdiClose,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const model = ref('')
|
|
40
|
+
|
|
41
|
+
const appendInnerIconColor = computed(() => {
|
|
42
|
+
return props.appendInnerIcon === 'error' || props.appendInnerIcon === 'success'
|
|
43
|
+
? props.appendInnerIcon
|
|
44
|
+
: 'black'
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const dividerProps = {
|
|
48
|
+
thickness: 2,
|
|
49
|
+
length: '25px',
|
|
50
|
+
color: 'primary',
|
|
51
|
+
opacity: '1',
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
defineExpose({
|
|
55
|
+
appendInnerIconColor,
|
|
56
|
+
})
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<VTextField
|
|
61
|
+
v-model="model"
|
|
62
|
+
:variant="props.variantStyle"
|
|
63
|
+
:color="props.color"
|
|
64
|
+
:clearable="props.isClearable"
|
|
65
|
+
:clear-icon="ICONS.close"
|
|
66
|
+
:aria-label="props.label"
|
|
67
|
+
:label="props.label"
|
|
68
|
+
>
|
|
69
|
+
<template #prepend>
|
|
70
|
+
<slot name="prepend">
|
|
71
|
+
<VIcon
|
|
72
|
+
v-if="props.prependIcon"
|
|
73
|
+
:icon="ICONS[props.prependIcon]"
|
|
74
|
+
/>
|
|
75
|
+
</slot>
|
|
76
|
+
</template>
|
|
77
|
+
<template #append>
|
|
78
|
+
<slot name="append">
|
|
79
|
+
<VIcon
|
|
80
|
+
v-if="props.appendIcon"
|
|
81
|
+
:icon="ICONS[props.appendIcon]"
|
|
82
|
+
/>
|
|
83
|
+
</slot>
|
|
84
|
+
</template>
|
|
85
|
+
<template #prepend-inner>
|
|
86
|
+
<slot name="prepend-inner">
|
|
87
|
+
<VIcon
|
|
88
|
+
v-if="props.prependInnerIcon"
|
|
89
|
+
:icon="ICONS[props.prependInnerIcon]"
|
|
90
|
+
/>
|
|
91
|
+
</slot>
|
|
92
|
+
<VDivider
|
|
93
|
+
v-if="props.showDivider"
|
|
94
|
+
v-bind="dividerProps"
|
|
95
|
+
class="mt-4 pa-1"
|
|
96
|
+
vertical
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
<template #append-inner>
|
|
100
|
+
<slot name="append-inner">
|
|
101
|
+
<VIcon
|
|
102
|
+
v-if="props.appendInnerIcon"
|
|
103
|
+
:icon="ICONS[props.appendInnerIcon]"
|
|
104
|
+
:class="{ 'error-icon': props.appendInnerIcon === 'error' }"
|
|
105
|
+
:color="appendInnerIconColor"
|
|
106
|
+
/>
|
|
107
|
+
</slot>
|
|
108
|
+
</template>
|
|
109
|
+
</VTextField>
|
|
110
|
+
</template>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import SyTextField from '../SyTextField.vue'
|
|
3
|
+
import { expect, describe, it } from 'vitest'
|
|
4
|
+
import { VIcon } from 'vuetify/components'
|
|
5
|
+
import { vuetify } from '@tests/unit/setup'
|
|
6
|
+
|
|
7
|
+
describe('SyTextField', () => {
|
|
8
|
+
const factory = (props = {}, slots = {}) => {
|
|
9
|
+
return mount(SyTextField, {
|
|
10
|
+
props,
|
|
11
|
+
slots,
|
|
12
|
+
global: {
|
|
13
|
+
plugins: [vuetify],
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
it('renders correctly with default props', () => {
|
|
19
|
+
const wrapper = factory()
|
|
20
|
+
expect(wrapper.exists()).toBe(true)
|
|
21
|
+
expect(wrapper.findComponent(VIcon).exists()).toBe(false) // No icons by default
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('applies the correct variant style', () => {
|
|
25
|
+
const wrapper = factory({ variantStyle: 'filled' })
|
|
26
|
+
const textField = wrapper.findComponent({ name: 'VTextField' })
|
|
27
|
+
expect(textField.props('variant')).toBe('filled')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('renders default slots correctly', () => {
|
|
31
|
+
const wrapper = factory({}, {
|
|
32
|
+
prepend: '<div data-testid="prepend-slot">Prepend Slot Content</div>',
|
|
33
|
+
append: '<div data-testid="append-slot">Append Slot Content</div>',
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const prependSlot = wrapper.find('[data-testid="prepend-slot"]')
|
|
37
|
+
const appendSlot = wrapper.find('[data-testid="append-slot"]')
|
|
38
|
+
|
|
39
|
+
expect(prependSlot.exists()).toBe(true)
|
|
40
|
+
expect(prependSlot.text()).toBe('Prepend Slot Content')
|
|
41
|
+
expect(appendSlot.exists()).toBe(true)
|
|
42
|
+
expect(appendSlot.text()).toBe('Append Slot Content')
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('renders inner slots correctly', () => {
|
|
46
|
+
const wrapper = factory({}, {
|
|
47
|
+
'prepend-inner': '<div data-testid="prepend-inner-slot">Prepend Inner Slot Content</div>',
|
|
48
|
+
'append-inner': '<div data-testid="append-inner-slot">Append Inner Slot Content</div>',
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const prependInnerSlot = wrapper.find('[data-testid="prepend-inner-slot"]')
|
|
52
|
+
const appendInnerSlot = wrapper.find('[data-testid="append-inner-slot"]')
|
|
53
|
+
|
|
54
|
+
expect(prependInnerSlot.exists()).toBe(true)
|
|
55
|
+
expect(prependInnerSlot.text()).toBe('Prepend Inner Slot Content')
|
|
56
|
+
expect(appendInnerSlot.exists()).toBe(true)
|
|
57
|
+
expect(appendInnerSlot.text()).toBe('Append Inner Slot Content')
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it('matches snapshot', () => {
|
|
61
|
+
const wrapper = factory({
|
|
62
|
+
prependIcon: 'info',
|
|
63
|
+
appendIcon: 'success',
|
|
64
|
+
prependInnerIcon: 'warning',
|
|
65
|
+
appendInnerIcon: 'error',
|
|
66
|
+
variantStyle: 'filled',
|
|
67
|
+
isClearable: true,
|
|
68
|
+
showDivider: true,
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it('returns error color for appendInnerIcon when value is error', () => {
|
|
75
|
+
const wrapper = factory({ appendInnerIcon: 'error' })
|
|
76
|
+
expect(wrapper.vm.appendInnerIconColor).toBe('error')
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('returns success color for appendInnerIcon when value is success', () => {
|
|
80
|
+
const wrapper = factory({ appendInnerIcon: 'success' })
|
|
81
|
+
expect(wrapper.vm.appendInnerIconColor).toBe('success')
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
it('returns default color for appendInnerIcon when value is info', () => {
|
|
85
|
+
const wrapper = factory({ appendInnerIcon: 'info' })
|
|
86
|
+
expect(wrapper.vm.appendInnerIconColor).toBe('black')
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
it('returns default color for appendInnerIcon when value is undefined', () => {
|
|
90
|
+
const wrapper = factory({ appendInnerIcon: undefined })
|
|
91
|
+
expect(wrapper.vm.appendInnerIconColor).toBe('black')
|
|
92
|
+
})
|
|
93
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`SyTextField > matches snapshot 1`] = `
|
|
4
|
+
"<div class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-text-field">
|
|
5
|
+
<div class="v-input__prepend"><i class="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
6
|
+
<!---->
|
|
7
|
+
</div>
|
|
8
|
+
<div class="v-input__control">
|
|
9
|
+
<div class="v-field v-field--appended v-field--center-affix v-field--prepended v-field--no-label v-field--variant-filled v-theme--light v-locale--is-ltr">
|
|
10
|
+
<div class="v-field__overlay"></div>
|
|
11
|
+
<div class="v-field__loader">
|
|
12
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
13
|
+
<!---->
|
|
14
|
+
<div class="v-progress-linear__background" style="opacity: NaN;"></div>
|
|
15
|
+
<div class="v-progress-linear__buffer" style="opacity: NaN; width: 0%;"></div>
|
|
16
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
17
|
+
<div class="v-progress-linear__indeterminate">
|
|
18
|
+
<div class="v-progress-linear__indeterminate long"></div>
|
|
19
|
+
<div class="v-progress-linear__indeterminate short"></div>
|
|
20
|
+
</div>
|
|
21
|
+
</transition-stub>
|
|
22
|
+
<!---->
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="v-field__prepend-inner">
|
|
26
|
+
<!----><i class="M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16 mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
27
|
+
<hr class="v-divider v-divider--vertical v-theme--light text-primary mt-4 pa-1" style="height: 25px; border-right-width: 2px; --v-border-opacity: 1;" aria-orientation="vertical" role="separator">
|
|
28
|
+
</div>
|
|
29
|
+
<div class="v-field__field" data-no-activator="">
|
|
30
|
+
<!---->
|
|
31
|
+
<!---->
|
|
32
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input" value="">
|
|
33
|
+
<!---->
|
|
34
|
+
</div>
|
|
35
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
36
|
+
<div class="v-field__clearable" style="display: none;"><i class="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear "></i></div>
|
|
37
|
+
</transition-stub>
|
|
38
|
+
<div class="v-field__append-inner"><i class="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z mdi v-icon notranslate v-theme--light v-icon--size-default text-error error-icon" aria-hidden="true"></i>
|
|
39
|
+
<!---->
|
|
40
|
+
</div>
|
|
41
|
+
<div class="v-field__outline">
|
|
42
|
+
<!---->
|
|
43
|
+
<!---->
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="v-input__append">
|
|
48
|
+
<!----><i class="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="v-input__details">
|
|
51
|
+
<transition-group-stub name="slide-y-transition" tag="div" appear="false" persisted="false" css="true" class="v-messages" role="alert" aria-live="polite" id="input-0-messages">
|
|
52
|
+
<!---->
|
|
53
|
+
</transition-group-stub>
|
|
54
|
+
<!---->
|
|
55
|
+
</div>
|
|
56
|
+
</div>"
|
|
57
|
+
`;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta, Source } from '@storybook/blocks';
|
|
2
|
+
import * as DataList from './DataList.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={DataList} />
|
|
5
|
+
|
|
6
|
+
# DataList
|
|
7
|
+
|
|
8
|
+
L’élément `DataList` est utilisé pour afficher une liste d’informations.
|
|
9
|
+
|
|
10
|
+
<Canvas of={DataList.Default} />
|
|
11
|
+
|
|
12
|
+
# API
|
|
13
|
+
|
|
14
|
+
<Controls of={DataList.Default} />
|
|
15
|
+
|
|
16
|
+
# Exemple d'utilisation
|
|
17
|
+
|
|
18
|
+
<Source dark code={`
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import DataList from '@cnamts/synapse'
|
|
21
|
+
|
|
22
|
+
const items = [
|
|
23
|
+
{
|
|
24
|
+
title: 'Informations patient',
|
|
25
|
+
items: [
|
|
26
|
+
{
|
|
27
|
+
key: 'Nom',
|
|
28
|
+
value: 'Dupont',
|
|
29
|
+
icon: 'accountIcon',
|
|
30
|
+
chip: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'Prénom',
|
|
34
|
+
value: 'Paul',
|
|
35
|
+
icon: 'accountIcon',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: 'Date de naissance',
|
|
39
|
+
value: '24/09/1970',
|
|
40
|
+
icon: 'calendarIcon',
|
|
41
|
+
action: 'Modifier',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: 'Médecin traitant',
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
key: 'Nom du praticien',
|
|
50
|
+
value: 'Gérard Leblanc',
|
|
51
|
+
icon: 'doctorIcon',
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
{
|
|
55
|
+
key: 'N° RPPS',
|
|
56
|
+
value: 'XXXXX',
|
|
57
|
+
icon: 'cardAccountIcon',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: 'Autres informations',
|
|
63
|
+
items: [
|
|
64
|
+
{
|
|
65
|
+
key: 'Dernière modification',
|
|
66
|
+
value: '04/06/2020',
|
|
67
|
+
icon: 'editIcon',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<DataList :items="items" />
|
|
76
|
+
</template>
|
|
77
|
+
`} />
|