@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
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import {Canvas, Meta, Controls, Source} from '@storybook/blocks';
|
|
2
|
+
import * as NirFieldStories from './NirField.stories.ts';
|
|
3
|
+
import NirField from './NirField.vue';
|
|
4
|
+
|
|
5
|
+
<Meta title="Composants/Formulaires/NirField" component={NirField}/>
|
|
6
|
+
|
|
7
|
+
# NirField
|
|
8
|
+
|
|
9
|
+
Le composant `NirField` est utilisé pour afficher un champ de saisie de numéro de sécurité sociale.
|
|
10
|
+
|
|
11
|
+
<Canvas story={{
|
|
12
|
+
height: '150px',
|
|
13
|
+
}} of={NirFieldStories.Default}
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
# API
|
|
17
|
+
|
|
18
|
+
<Controls of={NirFieldStories.Default}/>
|
|
19
|
+
|
|
20
|
+
## Utilisation
|
|
21
|
+
|
|
22
|
+
<Source dark code={`
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import { NirField } from '@cnamts/synapse'
|
|
25
|
+
import { ref } from 'vue'
|
|
26
|
+
|
|
27
|
+
const model = ref('')
|
|
28
|
+
const nirFieldRef = ref() // Référence Vue pour accéder au composant enfant
|
|
29
|
+
|
|
30
|
+
const handleSubmit = () => {
|
|
31
|
+
// Appeler la méthode exposée validateOnSubmit via la référence
|
|
32
|
+
const isValid = nirFieldRef.value?.validateOnSubmit()
|
|
33
|
+
if (!isValid) {
|
|
34
|
+
alert('Corrigez les erreurs avant de soumettre !')
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
alert('Formulaire soumis avec succès !')
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<main>
|
|
44
|
+
<form
|
|
45
|
+
class="mx-16 my-6"
|
|
46
|
+
@submit.prevent="handleSubmit"
|
|
47
|
+
>
|
|
48
|
+
<Nirfield
|
|
49
|
+
ref="nirFieldRef"
|
|
50
|
+
v-model="model"
|
|
51
|
+
:display-key="true"
|
|
52
|
+
key-tooltip="message d'aide pour la clef"
|
|
53
|
+
nir-tooltip="message d'aide pour le NIR"
|
|
54
|
+
outlined
|
|
55
|
+
required
|
|
56
|
+
/>
|
|
57
|
+
<button type="submit">
|
|
58
|
+
Soumettre
|
|
59
|
+
</button>
|
|
60
|
+
</form>
|
|
61
|
+
</main>
|
|
62
|
+
</template>
|
|
63
|
+
`}
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
### Règles de gestion par défaut
|
|
67
|
+
|
|
68
|
+
Le composant `NirField` utilise des règles de validation par défaut pour le numéro NIR et la Clé. Voici les règles de validation par défaut :
|
|
69
|
+
|
|
70
|
+
#### Pour le numéro NIR :
|
|
71
|
+
- Le numéro NIR doit être composé de 13 chiffres.
|
|
72
|
+
- Le numéro NIR doit respecter le format suivant :
|
|
73
|
+
- 1 chiffre pour le sexe (1-4, 7, 8)
|
|
74
|
+
- 2 chiffres pour l'année de naissance
|
|
75
|
+
- 2 chiffres pour le mois de naissance (01-12, 20-42)
|
|
76
|
+
- 2 chiffres pour le département de naissance (01-99, 2A, 2B, 96, 97X, 98X)
|
|
77
|
+
- 3 chiffres pour la commune de naissance
|
|
78
|
+
- 3 chiffres pour le rang d'inscription
|
|
79
|
+
- Le numéro NIR doit passer la validation de la clé de contrôle (2 chiffres).
|
|
80
|
+
|
|
81
|
+
#### Pour la Clé :
|
|
82
|
+
- La clé doit être composée de 2 chiffres.
|
|
83
|
+
- La clé doit être valide en fonction du calcul de la clé NIR.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Règles de gestion personnalisées
|
|
89
|
+
|
|
90
|
+
Vous pouvez définir des règles de gestion personnalisées pour le numéro NIR et la Clé via les props `custom-number-rules` et `custom-key-rules`.
|
|
91
|
+
|
|
92
|
+
Il y a deux manieres possibles:
|
|
93
|
+
|
|
94
|
+
Chaque règle est un objet avec la structure suivante :
|
|
95
|
+
|
|
96
|
+
#### 1. Regles que nous mettons à disposition :
|
|
97
|
+
|
|
98
|
+
- `type` (string) : Le type de validation (par exemple, `minLength`).
|
|
99
|
+
- `options` (object) : Options pour la règle de validation, incluant :
|
|
100
|
+
- `length` (number) : La longueur requise pour les règles `minLength`, `maxLength`, `min` et `max`.
|
|
101
|
+
- `message` (string | optionnel) : Le message d'erreur à afficher si la validation échoue (sinon le message par default s'affiche).
|
|
102
|
+
- `successMessage` (string | optionnel) : Le message à afficher si la validation réussit (sinon le message par default s'affiche).
|
|
103
|
+
|
|
104
|
+
Vous trouverez la liste des rules mises à disposition dans la section [Comment utiliser les rules](/docs/guide-du-dev-comment-utiliser-les-rules--docs).
|
|
105
|
+
|
|
106
|
+
#### 2. Regles personnalisées :
|
|
107
|
+
|
|
108
|
+
Pour les regles de gestion personnalisées, vous pouvez utiliser les règles de type `custom` et définir une fonction de validation personnalisée. Cette fonction doit retourner un objet avec les propriétés `valid` (booléen) et `message` (string) :
|
|
109
|
+
|
|
110
|
+
<Source dark code={`
|
|
111
|
+
{
|
|
112
|
+
type: 'custom',
|
|
113
|
+
options: {
|
|
114
|
+
validate: (value: string) => value.startsWith('123') || 'Le NIR doit commencer par 123.',
|
|
115
|
+
message: 'Le NIR est invalide.',
|
|
116
|
+
successMessage: 'Le NIR est valide.',
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
`}
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Exemple d'utilisation
|
|
124
|
+
|
|
125
|
+
Voici quelques exemples d'utilisation du composant `NirField` avec des règles de gestion personnalisées :
|
|
126
|
+
|
|
127
|
+
<Source dark code={`
|
|
128
|
+
<script setup lang="ts">
|
|
129
|
+
import { ref } from 'vue'
|
|
130
|
+
import { NirField } from './NirField.vue'
|
|
131
|
+
|
|
132
|
+
const nir = ref('')
|
|
133
|
+
const customNumberRules = [
|
|
134
|
+
{
|
|
135
|
+
type: 'custom',
|
|
136
|
+
options: {
|
|
137
|
+
validate: (value: string) => value.startsWith('123') || 'Le NIR doit commencer par 123.',
|
|
138
|
+
message: 'Le NIR est invalide.',
|
|
139
|
+
successMessage: 'Le NIR est valide.',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
]
|
|
143
|
+
const customKeyRules = [
|
|
144
|
+
{
|
|
145
|
+
type: 'minLength',
|
|
146
|
+
options: {
|
|
147
|
+
length: 2,
|
|
148
|
+
message: 'La clé doit avoir au moins 2 caractères.',
|
|
149
|
+
successMessage: 'La clé a une longueur valide.',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
]
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<template>
|
|
156
|
+
<NirField
|
|
157
|
+
v-model="nir"
|
|
158
|
+
:outlined="true"
|
|
159
|
+
:required="true"
|
|
160
|
+
numberLabel="NIR"
|
|
161
|
+
keyLabel="Clé"
|
|
162
|
+
:displayKey="true"
|
|
163
|
+
:customNumberRules="customNumberRules"
|
|
164
|
+
:customKeyRules="customKeyRules"
|
|
165
|
+
/>
|
|
166
|
+
</template>
|
|
167
|
+
`}
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
### Méthode validateOnSubmit
|
|
171
|
+
|
|
172
|
+
La méthode `validateOnSubmit` permet de valider les champs du composant `NirField` lors de la soumission du formulaire. Elle retourne `true` si tous les champs sont valides, sinon `false`.
|
|
173
|
+
|
|
174
|
+
Pour utiliser cette méthode, vous devez ajouter une référence Vue au composant `NirField` et appeler la méthode `validateOnSubmit` via cette référence.
|
|
175
|
+
|
|
176
|
+
<Source dark code={`
|
|
177
|
+
<script setup lang="ts">
|
|
178
|
+
import {ref} from 'vue'
|
|
179
|
+
import { NirField } from '@cnamts/synapse'
|
|
180
|
+
|
|
181
|
+
const model = ref('')
|
|
182
|
+
const nirFieldRef = ref() // Référence Vue pour accéder au composant enfant
|
|
183
|
+
const handleSubmit = () => {
|
|
184
|
+
// Appeler la méthode exposée validateOnSubmit via la référence
|
|
185
|
+
const isValid = nirFieldRef.value?.validateOnSubmit()
|
|
186
|
+
if (!isValid) {
|
|
187
|
+
alert('Corrigez les erreurs avant de soumettre !')
|
|
188
|
+
} else {
|
|
189
|
+
alert('Formulaire soumis avec succès !')
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<template>
|
|
195
|
+
<main>
|
|
196
|
+
<form
|
|
197
|
+
class="mx-16 my-6"
|
|
198
|
+
@submit.prevent="handleSubmit"
|
|
199
|
+
>
|
|
200
|
+
<NirField
|
|
201
|
+
ref="nirFieldRef"
|
|
202
|
+
v-model="model"
|
|
203
|
+
:display-key="true"
|
|
204
|
+
key-tooltip="message d'aide pour la clef"
|
|
205
|
+
nir-tooltip="message d'aide pour le NIR"
|
|
206
|
+
outlined
|
|
207
|
+
required
|
|
208
|
+
/>
|
|
209
|
+
<button type="submit">
|
|
210
|
+
Soumettre
|
|
211
|
+
</button>
|
|
212
|
+
</form>
|
|
213
|
+
</main>
|
|
214
|
+
</template>
|
|
215
|
+
`}
|
|
216
|
+
/>
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from '@storybook/vue3'
|
|
2
|
+
import NirField from './NirField.vue'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Composants/Formulaires/NirField',
|
|
6
|
+
component: NirField,
|
|
7
|
+
decorators: [
|
|
8
|
+
() => ({
|
|
9
|
+
template: '<div style="padding: 20px;"><story/></div>',
|
|
10
|
+
}),
|
|
11
|
+
],
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'fullscreen',
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
modelValue: {
|
|
17
|
+
description: 'La valeur du modèle pour le champ.',
|
|
18
|
+
control: 'text',
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: 'string',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
outlined: {
|
|
26
|
+
description: 'Indique si le champ est encadré.',
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
default: true,
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: 'boolean',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: {
|
|
36
|
+
description: 'Indique si le champ est requis.',
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
table: {
|
|
40
|
+
type: {
|
|
41
|
+
summary: 'boolean',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
nirTooltip: {
|
|
46
|
+
description: 'Infobulle pour le champ NIR.',
|
|
47
|
+
control: 'text',
|
|
48
|
+
table: {
|
|
49
|
+
type: {
|
|
50
|
+
summary: 'string',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
keyTooltip: {
|
|
55
|
+
description: 'Infobulle pour le champ clé.',
|
|
56
|
+
control: 'text',
|
|
57
|
+
table: {
|
|
58
|
+
type: {
|
|
59
|
+
summary: 'string',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
numberLabel: {
|
|
64
|
+
description: 'Étiquette pour le champ numéro.',
|
|
65
|
+
control: 'text',
|
|
66
|
+
default: 'Numéro de sécurité sociale',
|
|
67
|
+
table: {
|
|
68
|
+
type: {
|
|
69
|
+
summary: 'string',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
keyLabel: {
|
|
74
|
+
description: 'Étiquette pour le champ clé.',
|
|
75
|
+
control: 'text',
|
|
76
|
+
default: 'Clé',
|
|
77
|
+
table: {
|
|
78
|
+
type: {
|
|
79
|
+
summary: 'string',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
displayKey: {
|
|
84
|
+
description: 'Indique si le champ clé est affiché.',
|
|
85
|
+
control: 'boolean',
|
|
86
|
+
default: true,
|
|
87
|
+
table: {
|
|
88
|
+
type: {
|
|
89
|
+
summary: 'boolean',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
customNumberRules: {
|
|
94
|
+
description: 'Règles de validation personnalisées pour le champ numéro.',
|
|
95
|
+
control: 'object',
|
|
96
|
+
table: {
|
|
97
|
+
type: {
|
|
98
|
+
summary: 'array',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
customKeyRules: {
|
|
103
|
+
description: 'Règles de validation personnalisées pour le champ clé.',
|
|
104
|
+
control: 'object',
|
|
105
|
+
table: {
|
|
106
|
+
type: {
|
|
107
|
+
summary: 'array',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
} satisfies Meta<typeof NirField>
|
|
113
|
+
|
|
114
|
+
export default meta
|
|
115
|
+
|
|
116
|
+
type Story = StoryObj<typeof meta>
|
|
117
|
+
|
|
118
|
+
export const Default: Story = {
|
|
119
|
+
args: {
|
|
120
|
+
modelValue: '',
|
|
121
|
+
outlined: true,
|
|
122
|
+
required: false,
|
|
123
|
+
numberLabel: 'Numéro de sécurité sociale',
|
|
124
|
+
keyLabel: 'Clé',
|
|
125
|
+
displayKey: true,
|
|
126
|
+
},
|
|
127
|
+
parameters: {
|
|
128
|
+
sourceCode: [
|
|
129
|
+
{
|
|
130
|
+
name: 'Template',
|
|
131
|
+
code: `
|
|
132
|
+
<template>
|
|
133
|
+
<NirField
|
|
134
|
+
modelValue=""
|
|
135
|
+
:outlined="true"
|
|
136
|
+
:required="false"
|
|
137
|
+
numberLabel="Numéro de sécurité sociale"
|
|
138
|
+
keyLabel="Clé"
|
|
139
|
+
:displayKey="true"
|
|
140
|
+
/>
|
|
141
|
+
</template>
|
|
142
|
+
`,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Script',
|
|
146
|
+
code: `
|
|
147
|
+
<script setup lang="ts">
|
|
148
|
+
import NirField from './NirField.vue'
|
|
149
|
+
</script>
|
|
150
|
+
`,
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const Required: Story = {
|
|
157
|
+
args: {
|
|
158
|
+
...Default.args,
|
|
159
|
+
required: true,
|
|
160
|
+
},
|
|
161
|
+
parameters: {
|
|
162
|
+
...Default.parameters,
|
|
163
|
+
sourceCode: [
|
|
164
|
+
{
|
|
165
|
+
name: 'Template',
|
|
166
|
+
code: `
|
|
167
|
+
<template>
|
|
168
|
+
<NirField
|
|
169
|
+
modelValue=""
|
|
170
|
+
:outlined="true"
|
|
171
|
+
:required="true"
|
|
172
|
+
numberLabel="Numéro de sécurité sociale"
|
|
173
|
+
keyLabel="Clé"
|
|
174
|
+
:displayKey="true"
|
|
175
|
+
/>
|
|
176
|
+
</template>
|
|
177
|
+
`,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'Script',
|
|
181
|
+
code: `
|
|
182
|
+
<script setup lang="ts">
|
|
183
|
+
import NirField from './NirField.vue'
|
|
184
|
+
</script>
|
|
185
|
+
`,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export const WithoutKey: Story = {
|
|
192
|
+
args: {
|
|
193
|
+
...Default.args,
|
|
194
|
+
displayKey: false,
|
|
195
|
+
},
|
|
196
|
+
parameters: {
|
|
197
|
+
...Default.parameters,
|
|
198
|
+
sourceCode: [
|
|
199
|
+
{
|
|
200
|
+
name: 'Template',
|
|
201
|
+
code: `
|
|
202
|
+
<template>
|
|
203
|
+
<NirField
|
|
204
|
+
modelValue=""
|
|
205
|
+
:outlined="true"
|
|
206
|
+
:required="false"
|
|
207
|
+
numberLabel="Numéro de sécurité sociale"
|
|
208
|
+
keyLabel="Clé"
|
|
209
|
+
:displayKey="false"
|
|
210
|
+
/>
|
|
211
|
+
</template>
|
|
212
|
+
`,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'Script',
|
|
216
|
+
code: `
|
|
217
|
+
<script setup lang="ts">
|
|
218
|
+
import NirField from './NirField.vue'
|
|
219
|
+
</script>
|
|
220
|
+
`,
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export const CustomRules: Story = {
|
|
227
|
+
args: {
|
|
228
|
+
...Default.args,
|
|
229
|
+
customNumberRules: [
|
|
230
|
+
{
|
|
231
|
+
type: 'minLength',
|
|
232
|
+
options: {
|
|
233
|
+
length: 10,
|
|
234
|
+
message: 'Le numéro de sécurité sociale doit avoir au moins 10 caractères.',
|
|
235
|
+
successMessage: 'Le numéro de sécurité sociale a une longueur valide.',
|
|
236
|
+
ignoreSpace: true,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
customKeyRules: [
|
|
241
|
+
{
|
|
242
|
+
type: 'minLength',
|
|
243
|
+
options: {
|
|
244
|
+
length: 1,
|
|
245
|
+
message: 'La clé doit avoir au moins 1 caractère.',
|
|
246
|
+
successMessage: 'La clé a une longueur valide.',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
parameters: {
|
|
252
|
+
...Default.parameters,
|
|
253
|
+
sourceCode: [
|
|
254
|
+
{
|
|
255
|
+
name: 'Template',
|
|
256
|
+
code: `
|
|
257
|
+
<template>
|
|
258
|
+
<NirField
|
|
259
|
+
modelValue=""
|
|
260
|
+
:outlined="true"
|
|
261
|
+
:required="false"
|
|
262
|
+
numberLabel="Numéro de sécurité sociale"
|
|
263
|
+
keyLabel="Clé"
|
|
264
|
+
:displayKey="true"
|
|
265
|
+
:customNumberRules="[{ type: 'minLength', options: { length: 10, ignoreSpace: true, message: 'Le numéro de sécurité sociale doit avoir au moins 10 caractères.', successMessage: 'Le numéro de sécurité sociale a une longueur valide.' } }]"
|
|
266
|
+
:customKeyRules="[{ type: 'minLength', options: { length: 1, message: 'La clé doit avoir au moins 1 caractère.', successMessage: 'La clé a une longueur valide.' } }]"
|
|
267
|
+
/>
|
|
268
|
+
</template>
|
|
269
|
+
`,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'Script',
|
|
273
|
+
code: `
|
|
274
|
+
<script setup lang="ts">
|
|
275
|
+
import NirField from './NirField.vue'
|
|
276
|
+
</script>
|
|
277
|
+
`,
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export const WithNumberTooltip: Story = {
|
|
284
|
+
args: {
|
|
285
|
+
...Default.args,
|
|
286
|
+
nirTooltip: 'Ceci est un tooltip pour le champs numéro de sécurité sociale',
|
|
287
|
+
},
|
|
288
|
+
parameters: {
|
|
289
|
+
...Default.parameters,
|
|
290
|
+
sourceCode: [
|
|
291
|
+
{
|
|
292
|
+
name: 'Template',
|
|
293
|
+
code: `
|
|
294
|
+
<template>
|
|
295
|
+
<NirField
|
|
296
|
+
modelValue=""
|
|
297
|
+
:outlined="true"
|
|
298
|
+
:required="false"
|
|
299
|
+
numberLabel="Numéro de sécurité sociale"
|
|
300
|
+
keyLabel="Clé"
|
|
301
|
+
:displayKey="true"
|
|
302
|
+
nirTooltip="Ceci est un tooltip pour le champs numéro de sécurité sociale"
|
|
303
|
+
/>
|
|
304
|
+
</template>
|
|
305
|
+
`,
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: 'Script',
|
|
309
|
+
code: `
|
|
310
|
+
<script setup lang="ts">
|
|
311
|
+
import NirField from './NirField.vue'
|
|
312
|
+
import { ref } from 'vue'
|
|
313
|
+
|
|
314
|
+
const value = ref('')
|
|
315
|
+
</script>
|
|
316
|
+
`,
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export const WithKeyTooltip: Story = {
|
|
323
|
+
args: {
|
|
324
|
+
...Default.args,
|
|
325
|
+
keyTooltip: 'Ceci est un tooltip pour la clef du numéro de sécurité sociale',
|
|
326
|
+
},
|
|
327
|
+
parameters: {
|
|
328
|
+
...Default.parameters,
|
|
329
|
+
sourceCode: [
|
|
330
|
+
{
|
|
331
|
+
name: 'Template',
|
|
332
|
+
code: `
|
|
333
|
+
<template>
|
|
334
|
+
<NirField
|
|
335
|
+
modelValue=""
|
|
336
|
+
:outlined="true"
|
|
337
|
+
:required="false"
|
|
338
|
+
numberLabel="Numéro de sécurité sociale"
|
|
339
|
+
keyLabel="Clé"
|
|
340
|
+
:displayKey="true"
|
|
341
|
+
keyTooltip="Ceci est un tooltip pour la clef du numéro de sécurité sociale"
|
|
342
|
+
/>
|
|
343
|
+
</template>
|
|
344
|
+
`,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: 'Script',
|
|
348
|
+
code: `
|
|
349
|
+
<script setup lang="ts">
|
|
350
|
+
import NirField from './NirField.vue'
|
|
351
|
+
import { ref } from 'vue'
|
|
352
|
+
|
|
353
|
+
const value = ref('')
|
|
354
|
+
</script>
|
|
355
|
+
`,
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
}
|