@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,798 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3'
|
|
2
|
+
import { VBtn } from 'vuetify/components'
|
|
3
|
+
import DialogBox from './DialogBox.vue'
|
|
4
|
+
import { fn } from '@storybook/test'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Composants/Feedback/DialogBox',
|
|
8
|
+
component: DialogBox,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
docs: {
|
|
12
|
+
controls: {
|
|
13
|
+
exclude: ['cancel', 'confirm', 'update:modelValue'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
'modelValue': {
|
|
19
|
+
control: 'boolean',
|
|
20
|
+
description: 'Afficher la boîte de dialogue, a utiliser avec `v-model`',
|
|
21
|
+
table: {
|
|
22
|
+
category: 'props',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
'title': {
|
|
26
|
+
control: 'text',
|
|
27
|
+
description: 'Titre de la boîte de dialogue, utilisable en prop ou slot',
|
|
28
|
+
table: {
|
|
29
|
+
type: {
|
|
30
|
+
summary: 'string',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
'default': {
|
|
35
|
+
control: 'text',
|
|
36
|
+
description: 'Contenu de la boîte de dialogue',
|
|
37
|
+
table: {
|
|
38
|
+
type: {
|
|
39
|
+
summary: '{}',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'actions': {
|
|
44
|
+
control: 'text',
|
|
45
|
+
description: 'Contenu des actions de la boîte de dialogue',
|
|
46
|
+
table: {
|
|
47
|
+
type: {
|
|
48
|
+
summary: '{}',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
'width': {
|
|
53
|
+
control: 'text',
|
|
54
|
+
description: 'Largeur max de la boîte de dialogue',
|
|
55
|
+
table: {
|
|
56
|
+
type: {
|
|
57
|
+
summary: 'string',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
'cancelBtnText': {
|
|
62
|
+
control: 'text',
|
|
63
|
+
description: 'Texte du bouton d\'annulation',
|
|
64
|
+
table: {
|
|
65
|
+
type: {
|
|
66
|
+
summary: 'string',
|
|
67
|
+
},
|
|
68
|
+
defaultValue: {
|
|
69
|
+
summary: `'Annuler'`,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
'confirmBtnText': {
|
|
74
|
+
control: 'text',
|
|
75
|
+
description: 'Texte du bouton de confirmation',
|
|
76
|
+
table: {
|
|
77
|
+
type: {
|
|
78
|
+
summary: 'string',
|
|
79
|
+
},
|
|
80
|
+
defaultValue: {
|
|
81
|
+
summary: `'Confirmer'`,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
'hideActions': {
|
|
86
|
+
control: 'boolean',
|
|
87
|
+
description: 'Masquer les actions',
|
|
88
|
+
table: {
|
|
89
|
+
type: {
|
|
90
|
+
summary: 'boolean',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
'persistent': {
|
|
95
|
+
control: 'boolean',
|
|
96
|
+
description: 'Masquer le bouton de fermeture',
|
|
97
|
+
table: {
|
|
98
|
+
type: {
|
|
99
|
+
summary: 'boolean',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
'vuetifyOptions': {
|
|
104
|
+
control: 'object',
|
|
105
|
+
description: 'Personnalisation des composants Vuetify internes',
|
|
106
|
+
table: {
|
|
107
|
+
category: 'props',
|
|
108
|
+
defaultValue: {
|
|
109
|
+
detail: `
|
|
110
|
+
{
|
|
111
|
+
card: {
|
|
112
|
+
class: 'pa-6',
|
|
113
|
+
},
|
|
114
|
+
cardTitle: {
|
|
115
|
+
class: 'd-flex align-start flex-nowrap pa-0 mb-6 mr-6',
|
|
116
|
+
},
|
|
117
|
+
closeBtn: {
|
|
118
|
+
icon: true,
|
|
119
|
+
elevation: 0,
|
|
120
|
+
width: '32px',
|
|
121
|
+
height: '32px',
|
|
122
|
+
class: 'mt-n2 mr-n2 ml-4',
|
|
123
|
+
},
|
|
124
|
+
actionsCtn: {
|
|
125
|
+
class: 'd-flex flex-wrap mt-6',
|
|
126
|
+
},
|
|
127
|
+
cancelBtn: {
|
|
128
|
+
color: 'primary',
|
|
129
|
+
variant: 'text',
|
|
130
|
+
},
|
|
131
|
+
confirmBtn: {
|
|
132
|
+
color: 'primary',
|
|
133
|
+
},
|
|
134
|
+
}`,
|
|
135
|
+
},
|
|
136
|
+
type: {
|
|
137
|
+
summary: 'Record<string, any>',
|
|
138
|
+
detail: `
|
|
139
|
+
{
|
|
140
|
+
card?: Record<string, any>,
|
|
141
|
+
cardTitle?: Record<string, any>,
|
|
142
|
+
closeBtn?: Record<string, any>,
|
|
143
|
+
actionsCtn?: Record<string, any>,
|
|
144
|
+
cancelBtn?: Record<string, any>,
|
|
145
|
+
confirmBtn?: Record<string, any>,
|
|
146
|
+
}
|
|
147
|
+
`,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
'onCancel': {
|
|
152
|
+
description: 'Callback sur annulation',
|
|
153
|
+
table: {
|
|
154
|
+
category: 'events',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
'onConfirm': {
|
|
158
|
+
description: 'Callback sur confirmation',
|
|
159
|
+
table: {
|
|
160
|
+
category: 'events',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
'onUpdate:modelValue': {
|
|
164
|
+
description: 'Callback sur mise à jour de la valeur',
|
|
165
|
+
table: {
|
|
166
|
+
category: 'events',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
} satisfies Meta<typeof DialogBox>
|
|
171
|
+
|
|
172
|
+
export default meta
|
|
173
|
+
|
|
174
|
+
type Story = StoryObj<typeof meta>
|
|
175
|
+
|
|
176
|
+
export const Default: Story = {
|
|
177
|
+
args: {
|
|
178
|
+
'modelValue': false,
|
|
179
|
+
'title': 'DialogBox title',
|
|
180
|
+
'default': 'DialogBox content',
|
|
181
|
+
'onCancel': fn(),
|
|
182
|
+
'onConfirm': fn(),
|
|
183
|
+
'onUpdate:modelValue': fn(),
|
|
184
|
+
},
|
|
185
|
+
render: (args) => {
|
|
186
|
+
return {
|
|
187
|
+
components: { DialogBox, VBtn },
|
|
188
|
+
setup() {
|
|
189
|
+
return { args }
|
|
190
|
+
},
|
|
191
|
+
template: `
|
|
192
|
+
<div class="pa-4">
|
|
193
|
+
<VBtn
|
|
194
|
+
@click="args.modelValue = !args.modelValue"
|
|
195
|
+
color="primary"
|
|
196
|
+
>Toggle DialogBox</VBtn>
|
|
197
|
+
<DialogBox
|
|
198
|
+
v-bind="args"
|
|
199
|
+
@confirm="args.modelValue = false"
|
|
200
|
+
@cancel="args.modelValue = false"
|
|
201
|
+
@update:modelValue="args.modelValue = $event"
|
|
202
|
+
>
|
|
203
|
+
{{ args.default }}
|
|
204
|
+
</DialogBox>
|
|
205
|
+
</div>
|
|
206
|
+
`,
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
parameters: {
|
|
210
|
+
sourceCode: [
|
|
211
|
+
{
|
|
212
|
+
name: 'Template',
|
|
213
|
+
code: `
|
|
214
|
+
<template>
|
|
215
|
+
<VBtn
|
|
216
|
+
color="primary"
|
|
217
|
+
@click="dialogOpen = !dialogOpen"
|
|
218
|
+
>Toggle DialogBox</VBtn>
|
|
219
|
+
<DialogBox
|
|
220
|
+
v-model="dialogOpen"
|
|
221
|
+
title="DialogBox title"
|
|
222
|
+
@confirm="dialogOpen = false"
|
|
223
|
+
@cancel="dialogOpen = false"
|
|
224
|
+
>
|
|
225
|
+
DialogBox content
|
|
226
|
+
</DialogBox>
|
|
227
|
+
</template>
|
|
228
|
+
`,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'Script',
|
|
232
|
+
code: `
|
|
233
|
+
<script setup lang="ts">
|
|
234
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
235
|
+
import { ref } from 'vue'
|
|
236
|
+
|
|
237
|
+
const dialogOpen = ref(false)
|
|
238
|
+
</script>
|
|
239
|
+
`,
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const ButtonTexts: Story = {
|
|
246
|
+
args: {
|
|
247
|
+
'modelValue': false,
|
|
248
|
+
'title': 'DialogBox title',
|
|
249
|
+
'default': 'DialogBox content',
|
|
250
|
+
'cancelBtnText': 'Retour',
|
|
251
|
+
'confirmBtnText': 'Valider',
|
|
252
|
+
'onCancel': fn(),
|
|
253
|
+
'onConfirm': fn(),
|
|
254
|
+
'onUpdate:modelValue': fn(),
|
|
255
|
+
},
|
|
256
|
+
render: (args) => {
|
|
257
|
+
return {
|
|
258
|
+
components: { DialogBox, VBtn },
|
|
259
|
+
setup() {
|
|
260
|
+
return { args }
|
|
261
|
+
},
|
|
262
|
+
template: `
|
|
263
|
+
<div class="pa-4">
|
|
264
|
+
<VBtn
|
|
265
|
+
@click="args.modelValue = !args.modelValue"
|
|
266
|
+
color="primary"
|
|
267
|
+
>Toggle DialogBox</VBtn>
|
|
268
|
+
<DialogBox
|
|
269
|
+
v-bind="args"
|
|
270
|
+
@update:modelValue="args.modelValue = $event"
|
|
271
|
+
@confirm="args.modelValue = false"
|
|
272
|
+
@cancel="args.modelValue = false"
|
|
273
|
+
>
|
|
274
|
+
{{ args.default }}
|
|
275
|
+
</DialogBox>
|
|
276
|
+
</div>
|
|
277
|
+
`,
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
parameters: {
|
|
281
|
+
sourceCode: [
|
|
282
|
+
{
|
|
283
|
+
name: 'Template',
|
|
284
|
+
code: `
|
|
285
|
+
<template>
|
|
286
|
+
<VBtn
|
|
287
|
+
color="primary"
|
|
288
|
+
@click="dialogOpen = !dialogOpen"
|
|
289
|
+
>Toggle DialogBox</VBtn>
|
|
290
|
+
<DialogBox
|
|
291
|
+
v-model="dialogOpen"
|
|
292
|
+
title="DialogBox title"
|
|
293
|
+
cancelBtnText="Retour"
|
|
294
|
+
confirmBtnText="Valider"
|
|
295
|
+
@confirm="dialogOpen = false"
|
|
296
|
+
@cancel="dialogOpen = false"
|
|
297
|
+
>
|
|
298
|
+
DialogBox content
|
|
299
|
+
</DialogBox>
|
|
300
|
+
</template>
|
|
301
|
+
`,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: 'Script',
|
|
305
|
+
code: `
|
|
306
|
+
<script setup lang="ts">
|
|
307
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
308
|
+
import { ref } from 'vue'
|
|
309
|
+
|
|
310
|
+
const dialogOpen = ref(false)
|
|
311
|
+
</script>
|
|
312
|
+
`,
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export const HideActions: Story = {
|
|
319
|
+
args: {
|
|
320
|
+
'modelValue': false,
|
|
321
|
+
'title': 'DialogBox title',
|
|
322
|
+
'default': 'DialogBox content',
|
|
323
|
+
'hideActions': true,
|
|
324
|
+
'onCancel': fn(),
|
|
325
|
+
'onConfirm': fn(),
|
|
326
|
+
'onUpdate:modelValue': fn(),
|
|
327
|
+
},
|
|
328
|
+
render: (args) => {
|
|
329
|
+
return {
|
|
330
|
+
components: { DialogBox, VBtn },
|
|
331
|
+
setup() {
|
|
332
|
+
return { args }
|
|
333
|
+
},
|
|
334
|
+
template: `
|
|
335
|
+
<div class="pa-4">
|
|
336
|
+
<VBtn
|
|
337
|
+
@click="args.modelValue = !args.modelValue"
|
|
338
|
+
color="primary"
|
|
339
|
+
>Toggle DialogBox</VBtn>
|
|
340
|
+
<DialogBox
|
|
341
|
+
v-bind="args"
|
|
342
|
+
@update:modelValue="args.modelValue = $event"
|
|
343
|
+
>
|
|
344
|
+
{{ args.default }}
|
|
345
|
+
</DialogBox>
|
|
346
|
+
</div>
|
|
347
|
+
`,
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
parameters: {
|
|
351
|
+
sourceCode: [
|
|
352
|
+
{
|
|
353
|
+
name: 'Template',
|
|
354
|
+
code: `
|
|
355
|
+
<template>
|
|
356
|
+
<VBtn
|
|
357
|
+
color="primary"
|
|
358
|
+
@click="dialogOpen = !dialogOpen"
|
|
359
|
+
>Toggle DialogBox</VBtn>
|
|
360
|
+
<DialogBox
|
|
361
|
+
v-model="dialogOpen"
|
|
362
|
+
title="DialogBox title"
|
|
363
|
+
hideActions
|
|
364
|
+
>
|
|
365
|
+
DialogBox content
|
|
366
|
+
</DialogBox>
|
|
367
|
+
</template>
|
|
368
|
+
`,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'Script',
|
|
372
|
+
code: `
|
|
373
|
+
<script setup lang="ts">
|
|
374
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
375
|
+
import { ref } from 'vue'
|
|
376
|
+
|
|
377
|
+
const dialogOpen = ref(false)
|
|
378
|
+
</script>
|
|
379
|
+
`,
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
},
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export const Persistent: Story = {
|
|
386
|
+
args: {
|
|
387
|
+
'modelValue': false,
|
|
388
|
+
'title': 'DialogBox title',
|
|
389
|
+
'default': 'DialogBox content',
|
|
390
|
+
'persistent': true,
|
|
391
|
+
'onCancel': fn(),
|
|
392
|
+
'onConfirm': fn(),
|
|
393
|
+
'onUpdate:modelValue': fn(),
|
|
394
|
+
},
|
|
395
|
+
render: (args) => {
|
|
396
|
+
return {
|
|
397
|
+
components: { DialogBox, VBtn },
|
|
398
|
+
setup() {
|
|
399
|
+
return { args }
|
|
400
|
+
},
|
|
401
|
+
template: `
|
|
402
|
+
<div class="pa-4">
|
|
403
|
+
<VBtn
|
|
404
|
+
@click="args.modelValue = !args.modelValue"
|
|
405
|
+
color="primary"
|
|
406
|
+
>Toggle DialogBox</VBtn>
|
|
407
|
+
<DialogBox
|
|
408
|
+
v-bind="args"
|
|
409
|
+
@update:modelValue="args.modelValue = $event"
|
|
410
|
+
@confirm="args.modelValue = false"
|
|
411
|
+
@cancel="args.modelValue = false"
|
|
412
|
+
>
|
|
413
|
+
{{ args.default }}
|
|
414
|
+
</DialogBox>
|
|
415
|
+
</div>
|
|
416
|
+
`,
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
parameters: {
|
|
420
|
+
sourceCode: [
|
|
421
|
+
{
|
|
422
|
+
name: 'Template',
|
|
423
|
+
code: `
|
|
424
|
+
<template>
|
|
425
|
+
<VBtn
|
|
426
|
+
color="primary"
|
|
427
|
+
@click="dialogOpen = !dialogOpen"
|
|
428
|
+
>Toggle DialogBox</VBtn>
|
|
429
|
+
<DialogBox
|
|
430
|
+
v-model="dialogOpen"
|
|
431
|
+
title="DialogBox title"
|
|
432
|
+
Persistent
|
|
433
|
+
@confirm="dialogOpen = false"
|
|
434
|
+
@cancel="dialogOpen = false"
|
|
435
|
+
>
|
|
436
|
+
DialogBox content
|
|
437
|
+
</DialogBox>
|
|
438
|
+
</template>
|
|
439
|
+
`,
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: 'Script',
|
|
443
|
+
code: `
|
|
444
|
+
<script setup lang="ts">
|
|
445
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
446
|
+
import { ref } from 'vue'
|
|
447
|
+
|
|
448
|
+
const dialogOpen = ref(false)
|
|
449
|
+
</script>
|
|
450
|
+
`,
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
},
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export const ActionsSlot: Story = {
|
|
457
|
+
args: {
|
|
458
|
+
'modelValue': false,
|
|
459
|
+
'title': 'DialogBox title',
|
|
460
|
+
'default': 'DialogBox content',
|
|
461
|
+
'onCancel': fn(),
|
|
462
|
+
'onConfirm': fn(),
|
|
463
|
+
'onUpdate:modelValue': fn(),
|
|
464
|
+
},
|
|
465
|
+
render: (args) => {
|
|
466
|
+
return {
|
|
467
|
+
components: { DialogBox, VBtn },
|
|
468
|
+
setup() {
|
|
469
|
+
return { args }
|
|
470
|
+
},
|
|
471
|
+
template: `
|
|
472
|
+
<div class="pa-4">
|
|
473
|
+
<VBtn
|
|
474
|
+
@click="args.modelValue = !args.modelValue"
|
|
475
|
+
color="primary"
|
|
476
|
+
>Toggle DialogBox</VBtn>
|
|
477
|
+
<DialogBox
|
|
478
|
+
v-bind="args"
|
|
479
|
+
@update:modelValue="args.modelValue = $event"
|
|
480
|
+
>
|
|
481
|
+
<template #actions>
|
|
482
|
+
<VBtn
|
|
483
|
+
color="primary"
|
|
484
|
+
@click="args.modelValue = false"
|
|
485
|
+
>Action</VBtn>
|
|
486
|
+
</template>
|
|
487
|
+
{{ args.default }}
|
|
488
|
+
</DialogBox>
|
|
489
|
+
</div>
|
|
490
|
+
`,
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
parameters: {
|
|
494
|
+
sourceCode: [
|
|
495
|
+
{
|
|
496
|
+
name: 'Template',
|
|
497
|
+
code: `
|
|
498
|
+
<template>
|
|
499
|
+
<VBtn
|
|
500
|
+
color="primary"
|
|
501
|
+
@click="dialogOpen = !dialogOpen"
|
|
502
|
+
>Toggle DialogBox</VBtn>
|
|
503
|
+
<DialogBox
|
|
504
|
+
v-model="dialogOpen"
|
|
505
|
+
title="DialogBox title"
|
|
506
|
+
>
|
|
507
|
+
<template #actions>
|
|
508
|
+
<VBtn
|
|
509
|
+
color="primary"
|
|
510
|
+
@click="dialogOpen = false"
|
|
511
|
+
>Action</VBtn>
|
|
512
|
+
</template>
|
|
513
|
+
DialogBox content
|
|
514
|
+
</DialogBox>
|
|
515
|
+
</template>
|
|
516
|
+
`,
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
name: 'Script',
|
|
520
|
+
code: `
|
|
521
|
+
<script setup lang="ts">
|
|
522
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
523
|
+
import { ref } from 'vue'
|
|
524
|
+
|
|
525
|
+
const dialogOpen = ref(false)
|
|
526
|
+
</script>
|
|
527
|
+
`,
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
},
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export const TitleSlot: Story = {
|
|
534
|
+
args: {
|
|
535
|
+
'modelValue': false,
|
|
536
|
+
'default': 'DialogBox content',
|
|
537
|
+
'onCancel': fn(),
|
|
538
|
+
'onConfirm': fn(),
|
|
539
|
+
'onUpdate:modelValue': fn(),
|
|
540
|
+
},
|
|
541
|
+
render: (args) => {
|
|
542
|
+
return {
|
|
543
|
+
components: { DialogBox, VBtn },
|
|
544
|
+
setup() {
|
|
545
|
+
return { args }
|
|
546
|
+
},
|
|
547
|
+
template: `
|
|
548
|
+
<div class="pa-4">
|
|
549
|
+
<VBtn
|
|
550
|
+
@click="args.modelValue = !args.modelValue"
|
|
551
|
+
color="primary"
|
|
552
|
+
>Toggle DialogBox</VBtn>
|
|
553
|
+
<DialogBox
|
|
554
|
+
v-bind="args"
|
|
555
|
+
@update:modelValue="args.modelValue = $event"
|
|
556
|
+
@confirm="args.modelValue = false"
|
|
557
|
+
@cancel="args.modelValue = false"
|
|
558
|
+
>
|
|
559
|
+
<template #title>
|
|
560
|
+
<VBtn
|
|
561
|
+
color="primary"
|
|
562
|
+
@click="args.modelValue = false"
|
|
563
|
+
>Title slot</VBtn>
|
|
564
|
+
</template>
|
|
565
|
+
{{ args.default }}
|
|
566
|
+
</DialogBox>
|
|
567
|
+
</div>
|
|
568
|
+
`,
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
parameters: {
|
|
572
|
+
sourceCode: [
|
|
573
|
+
{
|
|
574
|
+
name: 'Template',
|
|
575
|
+
code: `
|
|
576
|
+
<template>
|
|
577
|
+
<VBtn
|
|
578
|
+
color="primary"
|
|
579
|
+
@click="dialogOpen = !dialogOpen"
|
|
580
|
+
>Toggle DialogBox</VBtn>
|
|
581
|
+
<DialogBox
|
|
582
|
+
v-model="dialogOpen"
|
|
583
|
+
>
|
|
584
|
+
<template #title>
|
|
585
|
+
<VBtn
|
|
586
|
+
color="primary"
|
|
587
|
+
@click="dialogOpen = false"
|
|
588
|
+
>Title slot</VBtn>
|
|
589
|
+
</template>
|
|
590
|
+
DialogBox content
|
|
591
|
+
</DialogBox>
|
|
592
|
+
</template>
|
|
593
|
+
`,
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
name: 'Script',
|
|
597
|
+
code: `
|
|
598
|
+
<script setup lang="ts">
|
|
599
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
600
|
+
import { ref } from 'vue'
|
|
601
|
+
|
|
602
|
+
const dialogOpen = ref(false)
|
|
603
|
+
</script>
|
|
604
|
+
`,
|
|
605
|
+
},
|
|
606
|
+
],
|
|
607
|
+
},
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export const Width: Story = {
|
|
611
|
+
args: {
|
|
612
|
+
'modelValue': false,
|
|
613
|
+
'title': 'DialogBox title',
|
|
614
|
+
'default': 'DialogBox content',
|
|
615
|
+
'width': '500px',
|
|
616
|
+
'onCancel': fn(),
|
|
617
|
+
'onConfirm': fn(),
|
|
618
|
+
'onUpdate:modelValue': fn(),
|
|
619
|
+
},
|
|
620
|
+
render: (args) => {
|
|
621
|
+
return {
|
|
622
|
+
components: { DialogBox, VBtn },
|
|
623
|
+
setup() {
|
|
624
|
+
return { args }
|
|
625
|
+
},
|
|
626
|
+
template: `
|
|
627
|
+
<div class="pa-4">
|
|
628
|
+
<VBtn
|
|
629
|
+
@click="args.modelValue = !args.modelValue"
|
|
630
|
+
color="primary"
|
|
631
|
+
>Toggle DialogBox</VBtn>
|
|
632
|
+
<DialogBox
|
|
633
|
+
v-bind="args"
|
|
634
|
+
@update:modelValue="args.modelValue = $event"
|
|
635
|
+
@confirm="args.modelValue = false"
|
|
636
|
+
@cancel="args.modelValue = false"
|
|
637
|
+
>
|
|
638
|
+
{{ args.default }}
|
|
639
|
+
</DialogBox>
|
|
640
|
+
</div>
|
|
641
|
+
`,
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
parameters: {
|
|
645
|
+
sourceCode: [
|
|
646
|
+
{
|
|
647
|
+
name: 'Template',
|
|
648
|
+
code: `
|
|
649
|
+
<template>
|
|
650
|
+
<VBtn
|
|
651
|
+
color="primary"
|
|
652
|
+
@click="dialogOpen = !dialogOpen"
|
|
653
|
+
>Toggle DialogBox</VBtn>
|
|
654
|
+
<DialogBox
|
|
655
|
+
v-model="dialogOpen"
|
|
656
|
+
title="DialogBox title"
|
|
657
|
+
width="500px"
|
|
658
|
+
@confirm="dialogOpen = false"
|
|
659
|
+
@cancel="dialogOpen = false"
|
|
660
|
+
>
|
|
661
|
+
DialogBox content
|
|
662
|
+
</DialogBox>
|
|
663
|
+
</template>
|
|
664
|
+
`,
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
name: 'Script',
|
|
668
|
+
code: `
|
|
669
|
+
<script setup lang="ts">
|
|
670
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
671
|
+
import { ref } from 'vue'
|
|
672
|
+
|
|
673
|
+
const dialogOpen = ref(false)
|
|
674
|
+
</script>
|
|
675
|
+
`,
|
|
676
|
+
},
|
|
677
|
+
],
|
|
678
|
+
},
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export const VuetifyOptions: Story = {
|
|
682
|
+
args: {
|
|
683
|
+
'modelValue': false,
|
|
684
|
+
'title': 'DialogBox title',
|
|
685
|
+
'default': 'DialogBox content',
|
|
686
|
+
'vuetifyOptions': {
|
|
687
|
+
card: {
|
|
688
|
+
rounded: 'xl',
|
|
689
|
+
},
|
|
690
|
+
cardTitle: {
|
|
691
|
+
class: 'pa-0 mb-4 accent--text',
|
|
692
|
+
},
|
|
693
|
+
closeBtn: {
|
|
694
|
+
class: {
|
|
695
|
+
'd-none': true,
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
icon: {
|
|
699
|
+
color: 'accent',
|
|
700
|
+
},
|
|
701
|
+
cancelBtn: {
|
|
702
|
+
color: 'accent',
|
|
703
|
+
text: false,
|
|
704
|
+
},
|
|
705
|
+
confirmBtn: {
|
|
706
|
+
color: 'accent',
|
|
707
|
+
text: true,
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
'onCancel': fn(),
|
|
711
|
+
'onConfirm': fn(),
|
|
712
|
+
'onUpdate:modelValue': fn(),
|
|
713
|
+
},
|
|
714
|
+
render: (args) => {
|
|
715
|
+
return {
|
|
716
|
+
components: { DialogBox, VBtn },
|
|
717
|
+
setup() {
|
|
718
|
+
return { args }
|
|
719
|
+
},
|
|
720
|
+
template: `
|
|
721
|
+
<div class="pa-4">
|
|
722
|
+
<VBtn
|
|
723
|
+
@click="args.modelValue = !args.modelValue"
|
|
724
|
+
color="primary"
|
|
725
|
+
>Toggle DialogBox</VBtn>
|
|
726
|
+
<DialogBox
|
|
727
|
+
v-bind="args"
|
|
728
|
+
@update:modelValue="args.modelValue = $event"
|
|
729
|
+
@confirm="args.modelValue = false"
|
|
730
|
+
@cancel="args.modelValue = false"
|
|
731
|
+
>
|
|
732
|
+
{{ args.default }}
|
|
733
|
+
</DialogBox>
|
|
734
|
+
</div>
|
|
735
|
+
`,
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
parameters: {
|
|
739
|
+
sourceCode: [
|
|
740
|
+
{
|
|
741
|
+
name: 'Template',
|
|
742
|
+
code: `
|
|
743
|
+
<template>
|
|
744
|
+
<VBtn
|
|
745
|
+
color="primary"
|
|
746
|
+
@click="dialogOpen = !dialogOpen"
|
|
747
|
+
>Toggle DialogBox</VBtn>
|
|
748
|
+
<DialogBox
|
|
749
|
+
v-model="dialogOpen"
|
|
750
|
+
title="DialogBox title"
|
|
751
|
+
:vuetify-options="vuetifyOptions"
|
|
752
|
+
@confirm="dialogOpen = false"
|
|
753
|
+
@cancel="dialogOpen = false"
|
|
754
|
+
>
|
|
755
|
+
DialogBox content
|
|
756
|
+
</DialogBox>
|
|
757
|
+
</template>
|
|
758
|
+
`,
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: 'Script',
|
|
762
|
+
code: `
|
|
763
|
+
<script setup lang="ts">
|
|
764
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
765
|
+
import { ref } from 'vue'
|
|
766
|
+
|
|
767
|
+
const dialogOpen = ref(false)
|
|
768
|
+
|
|
769
|
+
const vuetifyOptions = {
|
|
770
|
+
card: {
|
|
771
|
+
rounded: 'xl',
|
|
772
|
+
},
|
|
773
|
+
cardTitle: {
|
|
774
|
+
class: 'pa-0 mb-4 accent--text',
|
|
775
|
+
},
|
|
776
|
+
closeBtn: {
|
|
777
|
+
class: {
|
|
778
|
+
'd-none': true,
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
icon: {
|
|
782
|
+
color: 'accent',
|
|
783
|
+
},
|
|
784
|
+
cancelBtn: {
|
|
785
|
+
color: 'accent',
|
|
786
|
+
text: false,
|
|
787
|
+
},
|
|
788
|
+
confirmBtn: {
|
|
789
|
+
color: 'accent',
|
|
790
|
+
text: true,
|
|
791
|
+
},
|
|
792
|
+
}
|
|
793
|
+
</script>
|
|
794
|
+
`,
|
|
795
|
+
},
|
|
796
|
+
],
|
|
797
|
+
},
|
|
798
|
+
}
|