@cnamts/synapse 1.0.8 → 1.0.9
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/{DateFilter-DkqG0pmr.js → DateFilter-BylukfjR.js} +1 -1
- package/dist/{NumberFilter-Ck7AwD39.js → NumberFilter-C_bUk9o1.js} +1 -1
- package/dist/{PeriodFilter-LRI6YpgU.js → PeriodFilter-dVOmcfmt.js} +1 -1
- package/dist/{SelectFilter-DPc70Jk7.js → SelectFilter-BW8KpXkQ.js} +1 -1
- package/dist/{TextFilter-DRQL7uD8.js → TextFilter-diwVzTz7.js} +1 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +2785 -2770
- package/dist/components/Amelipro/AmeliproCallback/AmeliproCallback.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproContentLayout/AmeliproContentLayout.d.ts +30 -0
- package/dist/components/Amelipro/AmeliproContentLayout/index.d.ts +2 -0
- package/dist/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.d.ts +24 -0
- package/dist/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.d.ts +128 -0
- package/dist/components/Amelipro/AmeliproErrorTemplate/errorTemplateTypes.d.ts +2 -0
- package/dist/components/Amelipro/AmeliproErrorTemplate/types.d.ts +7 -0
- package/dist/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.d.ts +91 -0
- package/dist/components/Amelipro/AmeliproFooter/AmeliproFooter.d.ts +18 -18
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeader.d.ts +9 -9
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproMenu/AmeliproMenu.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +2766 -2751
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +2766 -2751
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +388 -386
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +632 -630
- package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproTransmission/AmeliproTransmission.d.ts +9 -9
- package/dist/components/CookieBanner/CookieBanner.d.ts +116 -114
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +465 -465
- package/dist/components/CookiesSelection/CookiesSelection.d.ts +103 -101
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +105 -105
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1 -1
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +634 -632
- package/dist/components/DataList/DataList.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +2875 -2843
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +1446 -1430
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +643 -641
- package/dist/components/DialogBox/DialogBox.d.ts +172 -169
- package/dist/components/DialogBox/config.d.ts +3 -3
- package/dist/components/DialogBox/locales.d.ts +2 -0
- package/dist/components/DialogBox/useDraggable.d.ts +8 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +159 -157
- package/dist/components/FooterBar/FooterBar.d.ts +5 -5
- package/dist/components/HeaderBar/HeaderBar.d.ts +2 -2
- package/dist/components/HeaderBar/HeaderLogo/HeaderLogo.d.ts +1 -1
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +1 -1
- package/dist/components/LangBtn/LangBtn.d.ts +169 -167
- package/dist/components/LogoBrandSection/LogoBrandSection.d.ts +1 -1
- package/dist/components/NirField/NirField.d.ts +1277 -1273
- package/dist/components/PeriodField/PeriodField.d.ts +5752 -5688
- package/dist/components/PhoneField/PhoneField.d.ts +647 -636
- package/dist/components/SearchListField/SearchListField.d.ts +105 -105
- package/dist/components/SyAlert/SyAlert.d.ts +29 -29
- package/dist/components/SyTextArea/SyTextArea.d.ts +389 -387
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +207 -175
- package/dist/components/Tables/SyTable/SyTable.d.ts +208 -176
- package/dist/components/Tables/common/SyTableFilter.d.ts +1 -1
- package/dist/components/Tables/common/SyTablePagination.d.ts +105 -105
- package/dist/components/Tables/common/filters/DateFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/NumberFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/PeriodFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/SelectFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/TextFilter.d.ts +1 -1
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +82 -82
- package/dist/components/Tables/common/tableProps.d.ts +11 -0
- package/dist/components/Tables/common/types.d.ts +8 -4
- package/dist/components/Tables/common/useStoredOptions.d.ts +14 -0
- package/dist/components/Tables/common/useTableHeaders.d.ts +3 -2
- package/dist/components/Tables/common/useTableItems.d.ts +0 -1
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +16 -16
- package/dist/components/index.d.ts +4 -0
- package/dist/design-system-v3.js +166 -162
- package/dist/design-system-v3.umd.cjs +267 -262
- package/dist/main-2eWGB7zZ.js +30203 -0
- package/dist/style.css +1 -1
- package/dist/vuetifyConfig.d.ts +6 -6
- package/package.json +1 -1
- package/src/assets/amelipro/img/ico_pdf.svg +15 -0
- package/src/assets/amelipro/img/navigateurs.png +0 -0
- package/src/assets/amelipro/img/visuel_deconnexion.svg +973 -0
- package/src/assets/amelipro/img/visuel_erreur_403.svg +3652 -0
- package/src/assets/amelipro/img/visuel_erreur_404.svg +1801 -0
- package/src/assets/amelipro/img/visuel_erreur_500.svg +989 -0
- package/src/assets/amelipro/img/visuel_erreur_503.svg +1005 -0
- package/src/assets/amelipro/img/visuel_navigateur_obsolete.svg +828 -0
- package/src/assets/amelipro/pdf/charte-pour-pdf.pdf +0 -0
- package/src/components/Accordion/Accessibilite/AccessibilityGuide.mdx +5 -2
- package/src/components/Accordion/Accordion.mdx +5 -3
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.stories.ts +258 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.stories.ts +321 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +656 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.mdx +1 -3
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +208 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +562 -0
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.stories.ts +480 -0
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.stories.ts +267 -0
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.stories.ts +287 -6
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.stories.ts +433 -0
- package/src/components/Amelipro/AmeliproContentLayout/AmeliproContentLayout.mdx +15 -0
- package/src/components/Amelipro/AmeliproContentLayout/AmeliproContentLayout.stories.ts +44 -0
- package/src/components/Amelipro/AmeliproContentLayout/AmeliproContentLayout.vue +55 -0
- package/src/components/Amelipro/AmeliproContentLayout/__tests__/AmeliproContentLayout.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproContentLayout/__tests__/__snapshots__/AmeliproContentLayout.spec.ts.snap +24 -0
- package/src/components/Amelipro/AmeliproContentLayout/index.ts +3 -0
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.mdx +18 -0
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.stories.ts +68 -0
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +73 -0
- package/src/components/Amelipro/AmeliproCopyBtn/__tests__/AmeliproCopyBtn.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproCopyBtn/__tests__/__snapshots__/AmeliproCopyBtn.spec.ts.snap +84 -0
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.stories.ts +422 -0
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +2 -2
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/__snapshots__/AmeliproCustomSelector.spec.ts.snap +4 -6
- package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.stories.ts +92 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.mdx +23 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.stories.ts +386 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +187 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/AmeliproErrorTemplate.spec.ts +31 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/__snapshots__/AmeliproErrorTemplate.spec.ts.snap +185 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/errorTemplateTypes.ts +85 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/types.d.ts +7 -0
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.mdx +15 -0
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.stories.ts +71 -0
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +161 -0
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/AmeliproFilePreview.spec.ts +28 -0
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/__snapshots__/AmeliproFilePreview.spec.ts.snap +209 -0
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.stories.ts +194 -0
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.stories.ts +639 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +648 -0
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.stories.ts +392 -0
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.stories.ts +351 -0
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.stories.ts +634 -38
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +1 -1
- package/src/components/Amelipro/ServiceMenu/ServiceMenu.mdx +5 -3
- package/src/components/Amelipro/StructureMenu/StructureMenu.mdx +5 -3
- package/src/components/Amelipro/UserMenu/UserMenu.mdx +5 -3
- package/src/components/BackBtn/Accessibilite.mdx +6 -2
- package/src/components/BackBtn/BackBtn.mdx +5 -3
- package/src/components/BackBtn/BackBtn.stories.ts +1 -0
- package/src/components/BackBtn/Usages.mdx +5 -3
- package/src/components/BackToTopBtn/Accessibilite.mdx +6 -2
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +5 -4
- package/src/components/BackToTopBtn/Usages.mdx +5 -3
- package/src/components/ChipList/Accessibilite.mdx +6 -2
- package/src/components/ChipList/ChipList.mdx +5 -3
- package/src/components/CollapsibleList/Accessibilite.mdx +6 -2
- package/src/components/CollapsibleList/CollapsibleList.mdx +5 -3
- package/src/components/ContextualMenu/Accessibilite.mdx +6 -2
- package/src/components/ContextualMenu/ContextualMenu.mdx +7 -4
- package/src/components/ContextualMenu/Usages.mdx +5 -3
- package/src/components/CookieBanner/Accessibilite.mdx +6 -2
- package/src/components/CookieBanner/CookieBanner.mdx +5 -8
- package/src/components/CopyBtn/Accessibilite.mdx +6 -2
- package/src/components/CopyBtn/CopyBtn.mdx +5 -3
- package/src/components/CopyBtn/Usages.mdx +5 -3
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.mdx +6 -2
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.mdx +7 -4
- package/src/components/Customs/Selects/SelectBtnField/Usages.mdx +5 -3
- package/src/components/Customs/Selects/SelectOverview.mdx +5 -3
- package/src/components/Customs/Selects/SyBtnSelect/Accessibilite.mdx +6 -2
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.mdx +6 -4
- package/src/components/Customs/Selects/SyInputSelect/Accessibilite.mdx +6 -2
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.mdx +7 -2
- package/src/components/Customs/Selects/SySelect/Accessibilite.mdx +7 -3
- package/src/components/Customs/Selects/SySelect/SySelect.mdx +6 -4
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +1 -1
- package/src/components/Customs/Selects/SySelect/SySelect.vue +115 -193
- package/src/components/Customs/Selects/SySelect/Usages.mdx +5 -3
- package/src/components/Customs/SyCheckbox/Accessibilite.mdx +6 -3
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -3
- package/src/components/Customs/SyIcon/Accessibilite.mdx +5 -5
- package/src/components/Customs/SyIcon/SyIcon.mdx +5 -7
- package/src/components/Customs/SyPagination/SyPagination.mdx +7 -4
- package/src/components/Customs/SyTabs/Accessibilite.mdx +4 -1
- package/src/components/Customs/SyTabs/SyTabs.mdx +5 -3
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +18 -0
- package/src/components/Customs/SyTextField/Accessibilite.mdx +6 -2
- package/src/components/Customs/SyTextField/SyTextField.mdx +5 -6
- package/src/components/Customs/SyTextField/SyTextField.vue +17 -4
- package/src/components/Customs/SyTextField/Usages.mdx +1 -0
- package/src/components/DataList/Accessibilite.mdx +6 -2
- package/src/components/DataList/DataList.mdx +5 -3
- package/src/components/DataListGroup/Accessibilite.mdx +6 -2
- package/src/components/DataListGroup/DataListGroup.mdx +5 -3
- package/src/components/DatePicker/Accessibilite.mdx +6 -2
- package/src/components/DatePicker/CalendarMode/DatePicker.mdx +5 -3
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +6 -3
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.mdx +5 -6
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +14 -3
- package/src/components/DatePicker/DatePickerOverview.mdx +5 -3
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +5 -3
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +37 -32
- package/src/components/DatePicker/DateTextInput/NoCalendar.mdx +5 -3
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +3 -0
- package/src/components/DatePicker/Usages.mdx +5 -3
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +5 -3
- package/src/components/DialogBox/Accessibilite.mdx +6 -2
- package/src/components/DialogBox/DialogBox.mdx +5 -3
- package/src/components/DialogBox/DialogBox.stories.ts +83 -0
- package/src/components/DialogBox/DialogBox.vue +41 -6
- package/src/components/DialogBox/Usages.mdx +5 -3
- package/src/components/DialogBox/config.ts +3 -3
- package/src/components/DialogBox/locales.ts +2 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +132 -3
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +14 -11
- package/src/components/DialogBox/useDraggable.ts +98 -0
- package/src/components/DownloadBtn/Accessibilite.mdx +6 -2
- package/src/components/DownloadBtn/DownloadBtn.mdx +7 -4
- package/src/components/DownloadBtn/DownloadBtn.vue +1 -1
- package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +2 -3
- package/src/components/ErrorPage/Accessibilite.mdx +6 -2
- package/src/components/ErrorPage/ErrorPage.mdx +5 -3
- package/src/components/ExternalLinks/Accessibilite.mdx +6 -2
- package/src/components/ExternalLinks/ExternalLinks.mdx +5 -8
- package/src/components/ExternalLinks/Usages.mdx +5 -3
- package/src/components/FileList/Accessibilite.mdx +6 -2
- package/src/components/FileList/FileList.mdx +5 -4
- package/src/components/FilePreview/Accessibilite.mdx +6 -2
- package/src/components/FilePreview/FilePreview.mdx +7 -7
- package/src/components/FileUpload/Accessibilite.mdx +6 -2
- package/src/components/FileUpload/FileUpload.mdx +7 -4
- package/src/components/FilterInline/Accessibilite.mdx +6 -2
- package/src/components/FilterInline/FilterInline.mdx +5 -5
- package/src/components/FilterSideBar/Accessibilite.mdx +6 -2
- package/src/components/FilterSideBar/FilterSideBar.mdx +5 -4
- package/src/components/FooterBar/Accessibilite.mdx +6 -2
- package/src/components/FooterBar/FooterBar.mdx +5 -3
- package/src/components/FranceConnectBtn/Accessibilite.mdx +6 -2
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +5 -3
- package/src/components/HeaderBar/Accessibilite.mdx +6 -2
- package/src/components/HeaderBar/HeaderBar.mdx +4 -4
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +6 -2
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.mdx +9 -13
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.mdx +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.mdx +5 -5
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.mdx +1 -2
- package/src/components/HeaderBar/Usages.mdx +5 -3
- package/src/components/HeaderLoading/Accessibilite.mdx +2 -1
- package/src/components/HeaderLoading/HeaderLoading.mdx +5 -3
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +1 -8
- package/src/components/HeaderToolbar/Accessibilite.mdx +6 -2
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +5 -3
- package/src/components/LangBtn/Accessibilite.mdx +6 -2
- package/src/components/LangBtn/LangBtn.mdx +5 -3
- package/src/components/Logo/Accessibilite.mdx +6 -2
- package/src/components/Logo/Logo.mdx +5 -3
- package/src/components/LogoBrandSection/Accessibilite.mdx +6 -2
- package/src/components/LogoBrandSection/LogoBrandSection.mdx +5 -3
- package/src/components/MaintenancePage/Accessibilite.mdx +6 -2
- package/src/components/MaintenancePage/MaintenancePage.mdx +6 -4
- package/src/components/NirField/Accessibilite.mdx +6 -2
- package/src/components/NirField/NirField.mdx +5 -7
- package/src/components/NirField/NirField.vue +13 -118
- package/src/components/NirField/Usages.mdx +5 -3
- package/src/components/NotFoundPage/Accessibilite.mdx +6 -2
- package/src/components/NotFoundPage/NotFoundPage.mdx +6 -4
- package/src/components/NotificationBar/Accessibilite.mdx +6 -2
- package/src/components/NotificationBar/NotificationBar.mdx +5 -1
- package/src/components/NotificationBar/Usages.mdx +5 -3
- package/src/components/PageContainer/Accessibilite.mdx +6 -2
- package/src/components/PageContainer/PageContainer.mdx +5 -3
- package/src/components/PaginatedTable/Accessibilite.mdx +6 -2
- package/src/components/PaginatedTable/PaginatedTable.mdx +5 -3
- package/src/components/PasswordField/Accessibilite.mdx +6 -2
- package/src/components/PasswordField/PasswordField.mdx +5 -3
- package/src/components/PeriodField/Accessibilite.mdx +6 -2
- package/src/components/PeriodField/PeriodField.mdx +5 -3
- package/src/components/PhoneField/Accessibilite.mdx +6 -2
- package/src/components/PhoneField/PhoneField.mdx +5 -3
- package/src/components/PhoneField/PhoneField.stories.ts +17 -218
- package/src/components/PhoneField/PhoneField.vue +17 -11
- package/src/components/PhoneField/Usages.mdx +5 -3
- package/src/components/PhoneField/tests/PhoneField.spec.ts +46 -0
- package/src/components/RangeField/Accessibilite.mdx +6 -2
- package/src/components/RangeField/RangeField.mdx +5 -7
- package/src/components/RatingPicker/Accessibilite.mdx +6 -2
- package/src/components/RatingPicker/RatingPicker.mdx +5 -4
- package/src/components/SearchListField/Accessibilite.mdx +6 -2
- package/src/components/SearchListField/SearchListField.mdx +7 -5
- package/src/components/SkipLink/Accessibilite.mdx +6 -2
- package/src/components/SkipLink/SkipLink.mdx +5 -3
- package/src/components/SkipLink/Usages.mdx +5 -3
- package/src/components/SocialMediaLinks/Accessibilite.mdx +6 -2
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +5 -3
- package/src/components/SubHeader/Accessibilite.mdx +6 -2
- package/src/components/SubHeader/SubHeader.mdx +5 -3
- package/src/components/SyAlert/Accessibilite.mdx +6 -2
- package/src/components/SyAlert/SyAlert.mdx +7 -4
- package/src/components/SyAlert/Usages.mdx +5 -3
- package/src/components/SyTextArea/SyTextArea.mdx +5 -3
- package/src/components/TableToolbar/Accessibilite.mdx +6 -2
- package/src/components/TableToolbar/TableToolbar.mdx +6 -3
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +5 -3
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +4 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +36 -74
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +46 -7
- package/src/components/Tables/SyTable/SyTable.mdx +5 -3
- package/src/components/Tables/SyTable/SyTable.stories.ts +5 -1
- package/src/components/Tables/SyTable/SyTable.vue +38 -60
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +9 -7
- package/src/components/Tables/common/tableProps.ts +53 -0
- package/src/components/Tables/common/tableStyles.scss +4 -0
- package/src/components/Tables/common/tests/tableUtils.spec.ts +4 -151
- package/src/components/Tables/common/types.ts +12 -2
- package/src/components/Tables/common/useStoredOptions.ts +36 -0
- package/src/components/Tables/common/useTableHeaders.ts +10 -7
- package/src/components/Tables/common/useTableItems.ts +0 -20
- package/src/components/ToolbarContainer/ToolbarContainer.mdx +1 -0
- package/src/components/UploadWorkflow/Accessibilite.mdx +6 -2
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +5 -7
- package/src/components/UserMenuBtn/Accessibilite.mdx +6 -2
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +5 -3
- package/src/components/index.ts +4 -0
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +2 -65
- package/src/stories/Accessibilite/Audit/RGAA.mdx +2 -20
- package/src/stories/Accessibilite/AuditDesignSystem.mdx +4 -47
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +5 -68
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +267 -198
- package/src/stories/Accessibilite/Introduction.mdx +2 -20
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +4 -21
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +3 -20
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +5 -50
- package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +3 -46
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/FauxPositifs.mdx +3 -39
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/Utilisation.mdx +4 -54
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +4 -51
- package/src/stories/Accessibilite/Vuetify/Vuetify.mdx +3 -11
- package/src/stories/Accessibilite/Vuetify/Vuetify.stories.ts +2 -2
- package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +6 -3
- package/src/stories/Components/Components.stories.ts +1 -1
- package/src/stories/Demarrer/CreerUneIssue.mdx +4 -1
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.mdx +0 -2
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.stories.ts +3 -0
- package/src/stories/Demarrer/Releases.mdx +0 -2
- package/src/stories/Demarrer/Releases.stories.ts +3 -0
- package/src/stories/DesignTokens/Arrondis.mdx +7 -1
- package/src/stories/DesignTokens/Colors.mdx +7 -1
- package/src/stories/DesignTokens/Conteneurs.mdx +6 -1
- package/src/stories/DesignTokens/Elevations.mdx +7 -1
- package/src/stories/DesignTokens/Espacements.mdx +7 -1
- package/src/stories/DesignTokens/Introduction.mdx +5 -3
- package/src/stories/DesignTokens/StylesTypographiques.mdx +6 -1
- package/src/stories/DesignTokens/Typographie.mdx +5 -1
- package/src/stories/Directives/SvgDirective.mdx +3 -22
- package/src/stories/EcoConception/EcoGuideComponent.vue +569 -0
- package/src/stories/EcoConception/Introduction.mdx +190 -13
- package/src/stories/EcoConception/Referentiel.mdx +13 -0
- package/src/stories/EcoConception/datas/back_rules.json +184 -0
- package/src/stories/EcoConception/datas/ux_ui_rules.json +1073 -0
- package/src/stories/EcoConception/ecoconception.stories.ts +30 -0
- package/src/stories/GuideDuDev/ClassesUtilitaires/DataUtilities.mdx +7 -3
- package/src/stories/GuideDuDev/ClassesUtilitaires/DomBrowserUtilities.mdx +9 -1
- package/src/stories/GuideDuDev/ClassesUtilitaires/FormattingUtilities.mdx +7 -3
- package/src/stories/GuideDuDev/ClassesUtilitaires/StorageUtilities.mdx +5 -1
- package/src/stories/GuideDuDev/ClassesUtilitaires/ValidationRules.mdx +7 -3
- package/src/stories/GuideDuDev/ClassesUtilitaires/ValidationUtilities.mdx +7 -3
- package/src/stories/GuideDuDev/ClassesUtilitaires/index.mdx +5 -2
- package/src/stories/GuideDuDev/FormValidationGuide.mdx +7 -3
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +6 -2
- package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +7 -2
- package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +7 -2
- package/src/stories/GuideDuDev/PortailAgent.mdx +6 -1
- package/src/stories/GuideDuDev/Theme.mdx +8 -2
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +7 -3
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +8 -3
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +5 -1
- package/src/stories/Templates/Templates.stories.ts +1 -1
- package/src/stories/styles/shared.css +16 -0
- package/src/utils/rules/Rules.mdx +26 -3
- package/src/utils/rules/doMatchPattern/DoMachPattern.mdx +27 -4
- package/src/utils/rules/isDateValid/IsDateValid.mdx +27 -4
- package/src/utils/rules/isExactLength/IsExactLenght.mdx +27 -4
- package/src/utils/rules/isHolidayDay/IsHolidayDay.mdx +27 -4
- package/src/utils/rules/isMaxLength/IsMaxLength.mdx +27 -4
- package/src/utils/rules/isMinLength/IsMinLength.mdx +27 -4
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.mdx +27 -4
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.mdx +27 -4
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.mdx +27 -4
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.mdx +27 -3
- package/src/utils/rules/isRequired/IsRequired.mdx +27 -4
- package/src/utils/rules/isValidEmail/IsValidEmail.mdx +27 -4
- package/dist/components/Tables/common/tableStorageUtils.d.ts +0 -69
- package/dist/components/Tables/common/tableUtils.d.ts +0 -79
- package/dist/main-DXMoMtj5.js +0 -29904
- package/dist/stories/EcoConception/ecoDesignItems.d.ts +0 -4
- package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +0 -92
- package/src/components/Tables/common/tableStorageUtils.ts +0 -127
- package/src/components/Tables/common/tableUtils.ts +0 -102
- package/src/stories/EcoConception/ecoDesignItems.ts +0 -55
- package/src/stories/EcoConception/econception.stories.ts +0 -30
|
@@ -113,6 +113,18 @@ const meta: Meta<typeof DialogBox> = {
|
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
|
+
'draggable': {
|
|
117
|
+
control: 'boolean',
|
|
118
|
+
description: 'Rendre la boîte de dialogue déplaçable avec la souris ou les flèches gauche/droite du clavier',
|
|
119
|
+
table: {
|
|
120
|
+
type: {
|
|
121
|
+
summary: 'boolean',
|
|
122
|
+
},
|
|
123
|
+
defaultValue: {
|
|
124
|
+
summary: 'false',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
116
128
|
'vuetifyOptions': {
|
|
117
129
|
control: 'object',
|
|
118
130
|
description: 'Personnalisation des composants Vuetify internes',
|
|
@@ -811,3 +823,74 @@ export const VuetifyOptions: Story = {
|
|
|
811
823
|
],
|
|
812
824
|
},
|
|
813
825
|
}
|
|
826
|
+
|
|
827
|
+
export const Draggable: Story = {
|
|
828
|
+
args: {
|
|
829
|
+
'modelValue': false,
|
|
830
|
+
'title': 'DialogBox title',
|
|
831
|
+
'default': 'DialogBox content',
|
|
832
|
+
'draggable': true,
|
|
833
|
+
'onCancel': fn(),
|
|
834
|
+
'onConfirm': fn(),
|
|
835
|
+
'onUpdate:modelValue': fn(),
|
|
836
|
+
},
|
|
837
|
+
render: (args) => {
|
|
838
|
+
return {
|
|
839
|
+
components: { DialogBox, VBtn },
|
|
840
|
+
setup() {
|
|
841
|
+
return { args }
|
|
842
|
+
},
|
|
843
|
+
template: `
|
|
844
|
+
<div class="pa-4">
|
|
845
|
+
<VBtn
|
|
846
|
+
@click="args.modelValue = !args.modelValue"
|
|
847
|
+
color="primary"
|
|
848
|
+
>Toggle DialogBox</VBtn>
|
|
849
|
+
<DialogBox
|
|
850
|
+
v-bind="args"
|
|
851
|
+
@update:modelValue="args.modelValue = $event"
|
|
852
|
+
@confirm="args.modelValue = false"
|
|
853
|
+
@cancel="args.modelValue = false"
|
|
854
|
+
>
|
|
855
|
+
{{ args.default }}
|
|
856
|
+
</DialogBox>
|
|
857
|
+
</div>
|
|
858
|
+
`,
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
parameters: {
|
|
862
|
+
sourceCode: [
|
|
863
|
+
{
|
|
864
|
+
name: 'Template',
|
|
865
|
+
code: `
|
|
866
|
+
<template>
|
|
867
|
+
<VBtn
|
|
868
|
+
color="primary"
|
|
869
|
+
@click="dialogOpen = !dialogOpen"
|
|
870
|
+
>Toggle DialogBox</VBtn>
|
|
871
|
+
<DialogBox
|
|
872
|
+
v-model="dialogOpen"
|
|
873
|
+
title="DialogBox title"
|
|
874
|
+
draggable
|
|
875
|
+
@confirm="dialogOpen = false"
|
|
876
|
+
@cancel="dialogOpen = false"
|
|
877
|
+
>
|
|
878
|
+
DialogBox content
|
|
879
|
+
</DialogBox>
|
|
880
|
+
</template>
|
|
881
|
+
`,
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
name: 'Script',
|
|
885
|
+
code: `
|
|
886
|
+
<script setup lang="ts">
|
|
887
|
+
import { DialogBox } from '@cnamts/synapse'
|
|
888
|
+
import { ref } from 'vue'
|
|
889
|
+
|
|
890
|
+
const dialogOpen = ref(false)
|
|
891
|
+
</script>
|
|
892
|
+
`,
|
|
893
|
+
},
|
|
894
|
+
],
|
|
895
|
+
},
|
|
896
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import useCustomizableOptions, { type CustomizableOptions } from '@/composables/useCustomizableOptions'
|
|
3
3
|
import { mdiClose } from '@mdi/js'
|
|
4
|
-
import { ref, useId, watch
|
|
4
|
+
import { nextTick, ref, toRef, useId, watch } from 'vue'
|
|
5
5
|
import type { VBtn, VDialog } from 'vuetify/components'
|
|
6
|
-
import { config } from './config'
|
|
7
|
-
import { locales } from './locales'
|
|
8
6
|
import { useDisplay } from 'vuetify/lib/framework.mjs'
|
|
9
7
|
import SyIcon from '../Customs/SyIcon/SyIcon.vue'
|
|
8
|
+
import { config } from './config'
|
|
9
|
+
import { locales } from './locales'
|
|
10
|
+
import { useDraggable } from './useDraggable'
|
|
10
11
|
|
|
11
12
|
const props = withDefaults(defineProps<{
|
|
12
13
|
title?: string
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
hideActions?: boolean
|
|
17
18
|
persistent?: boolean
|
|
18
19
|
autofocusValidateBtn?: boolean
|
|
20
|
+
draggable?: boolean
|
|
19
21
|
} & CustomizableOptions>(), {
|
|
20
22
|
title: undefined,
|
|
21
23
|
width: '800px',
|
|
@@ -100,11 +102,18 @@
|
|
|
100
102
|
|
|
101
103
|
const display = useDisplay()
|
|
102
104
|
|
|
105
|
+
const {
|
|
106
|
+
isGrabbing,
|
|
107
|
+
startDragging,
|
|
108
|
+
moveToLeft,
|
|
109
|
+
moveToRight,
|
|
110
|
+
} = useDraggable(toRef(props, 'draggable'), dialogContent)
|
|
103
111
|
</script>
|
|
104
112
|
|
|
105
113
|
<template>
|
|
106
114
|
<VDialog
|
|
107
115
|
v-model="dialog"
|
|
116
|
+
:scrim="props.draggable ? false : true"
|
|
108
117
|
v-bind="$attrs"
|
|
109
118
|
:width="props.width"
|
|
110
119
|
:persistent="props.persistent"
|
|
@@ -113,13 +122,24 @@
|
|
|
113
122
|
class="sy-dialog-box"
|
|
114
123
|
:aria-labelledby="id"
|
|
115
124
|
@keydown.tab="handleFocus"
|
|
125
|
+
@keydown.left="moveToLeft"
|
|
126
|
+
@keydown.right="moveToRight"
|
|
116
127
|
>
|
|
117
128
|
<VCard
|
|
118
129
|
v-bind="options.card"
|
|
119
|
-
id="dialog-content"
|
|
120
130
|
ref="dialogContent"
|
|
131
|
+
:class="{
|
|
132
|
+
'sy-dialog-box-draggable': props.draggable,
|
|
133
|
+
'sy-dialog-box-draggable--active': props.draggable && isGrabbing,
|
|
134
|
+
}"
|
|
135
|
+
:aria-label="props.draggable ? locales.draggable : undefined"
|
|
121
136
|
>
|
|
122
|
-
<VCardTitle
|
|
137
|
+
<VCardTitle
|
|
138
|
+
class="sy-dialog-box-title"
|
|
139
|
+
v-bind="options.cardTitle"
|
|
140
|
+
:title="props.draggable ? locales.dragInstruction : undefined"
|
|
141
|
+
@mousedown="startDragging"
|
|
142
|
+
>
|
|
123
143
|
<slot name="title">
|
|
124
144
|
<h2
|
|
125
145
|
v-if="title"
|
|
@@ -146,7 +166,13 @@
|
|
|
146
166
|
/>
|
|
147
167
|
</VBtn>
|
|
148
168
|
</VCardTitle>
|
|
149
|
-
|
|
169
|
+
|
|
170
|
+
<div
|
|
171
|
+
class="px-6"
|
|
172
|
+
v-bind="options.cardText"
|
|
173
|
+
>
|
|
174
|
+
<slot />
|
|
175
|
+
</div>
|
|
150
176
|
|
|
151
177
|
<div
|
|
152
178
|
v-if="!props.hideActions"
|
|
@@ -239,6 +265,15 @@ h2 {
|
|
|
239
265
|
gap: $spacing-small;
|
|
240
266
|
}
|
|
241
267
|
|
|
268
|
+
.sy-dialog-box-draggable .sy-dialog-box-title {
|
|
269
|
+
cursor: grab;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.sy-dialog-box-draggable--active .sy-dialog-box-title {
|
|
273
|
+
cursor: grabbing;
|
|
274
|
+
user-select: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
242
277
|
@media screen and (min-width: $container-mobile-max-width) {
|
|
243
278
|
.sy-dialog-box-actions-ctn {
|
|
244
279
|
flex-direction: row;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Meta, Story} from "@storybook/blocks";
|
|
2
|
+
import '../../stories/styles/shared.css';
|
|
2
3
|
import * as stories from "./Usages.stories.ts";
|
|
3
4
|
|
|
4
5
|
<Meta of={stories} />
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Usages</h1>
|
|
9
|
+
|
|
10
|
+
</div><Story of={stories.UsagePage} />
|
|
9
11
|
<br />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const config = {
|
|
2
2
|
card: {
|
|
3
|
-
class: 'pa-6',
|
|
3
|
+
class: 'pa-0 pb-6',
|
|
4
4
|
},
|
|
5
5
|
cardTitle: {
|
|
6
|
-
class: 'd-flex align-start flex-nowrap pa-0 mb-6
|
|
6
|
+
class: 'd-flex align-start flex-nowrap pa-0 pt-6 mb-6 px-6',
|
|
7
7
|
},
|
|
8
8
|
closeBtn: {
|
|
9
9
|
icon: true,
|
|
@@ -13,7 +13,7 @@ export const config = {
|
|
|
13
13
|
class: 'mt-n2 mr-n2 ml-4',
|
|
14
14
|
},
|
|
15
15
|
cardActions: {
|
|
16
|
-
class: 'd-flex flex-wrap mt-6',
|
|
16
|
+
class: 'd-flex flex-wrap mt-6 px-6',
|
|
17
17
|
},
|
|
18
18
|
cancelBtn: {
|
|
19
19
|
color: 'primary',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable vue/one-component-per-file */
|
|
2
|
-
import { describe, it, expect } from 'vitest'
|
|
3
|
-
import { mount, shallowMount } from '@vue/test-utils'
|
|
4
2
|
import { vuetify } from '@tests/unit/setup'
|
|
3
|
+
import { mount, shallowMount } from '@vue/test-utils'
|
|
4
|
+
import { describe, expect, it } from 'vitest'
|
|
5
5
|
|
|
6
|
-
import { VCard } from 'vuetify/components'
|
|
7
6
|
import { defineComponent } from 'vue'
|
|
7
|
+
import { VCard } from 'vuetify/components'
|
|
8
8
|
import DialogBox from '../DialogBox.vue'
|
|
9
9
|
|
|
10
10
|
const defaultProps = {
|
|
@@ -370,4 +370,133 @@ describe('DialogBox', () => {
|
|
|
370
370
|
expect(confirmBtn.element).toEqual(document.activeElement)
|
|
371
371
|
wrapper.unmount()
|
|
372
372
|
})
|
|
373
|
+
|
|
374
|
+
describe('draggable dialog', () => {
|
|
375
|
+
it('renders the dialog as draggable when the draggable prop is true', async () => {
|
|
376
|
+
const wrapper = mount(DialogBox, {
|
|
377
|
+
props: {
|
|
378
|
+
...defaultProps,
|
|
379
|
+
draggable: true,
|
|
380
|
+
},
|
|
381
|
+
global: {
|
|
382
|
+
plugins: [vuetify],
|
|
383
|
+
},
|
|
384
|
+
attachTo: document.body,
|
|
385
|
+
})
|
|
386
|
+
|
|
387
|
+
const card = wrapper.getComponent(VCard)
|
|
388
|
+
const titleBar = card.find<HTMLElement>('.sy-dialog-box-title')
|
|
389
|
+
|
|
390
|
+
expect(card.classes()).toContain('sy-dialog-box-draggable')
|
|
391
|
+
|
|
392
|
+
titleBar.trigger('mousedown', { clientX: 100, clientY: 100 })
|
|
393
|
+
await wrapper.vm.$nextTick()
|
|
394
|
+
|
|
395
|
+
expect(card.classes()).toContain('sy-dialog-box-draggable--active')
|
|
396
|
+
|
|
397
|
+
await wrapper.trigger('mousemove', { clientX: 200, clientY: 200 })
|
|
398
|
+
await wrapper.vm.$nextTick()
|
|
399
|
+
|
|
400
|
+
const overlayElement = card.element.closest('.v-overlay__content') as HTMLElement
|
|
401
|
+
|
|
402
|
+
expect(overlayElement.style.left).toBe('100px') // Check that left style has been set
|
|
403
|
+
expect(overlayElement.style.top).toBe('100px') // Check that top style has been set
|
|
404
|
+
|
|
405
|
+
await wrapper.trigger('mouseup')
|
|
406
|
+
|
|
407
|
+
expect(card.classes()).not.toContain('sy-dialog-box-draggable--active')
|
|
408
|
+
wrapper.unmount()
|
|
409
|
+
})
|
|
410
|
+
|
|
411
|
+
it('do not allow the dialog to be dragged outside the viewport', async () => {
|
|
412
|
+
const wrapper = mount(DialogBox, {
|
|
413
|
+
props: {
|
|
414
|
+
...defaultProps,
|
|
415
|
+
draggable: true,
|
|
416
|
+
},
|
|
417
|
+
global: {
|
|
418
|
+
plugins: [vuetify],
|
|
419
|
+
},
|
|
420
|
+
attachTo: document.body,
|
|
421
|
+
})
|
|
422
|
+
|
|
423
|
+
const card = wrapper.getComponent(VCard)
|
|
424
|
+
const titleBar = card.find<HTMLElement>('.sy-dialog-box-title')
|
|
425
|
+
|
|
426
|
+
titleBar.trigger('mousedown', { clientX: 100, clientY: 100 })
|
|
427
|
+
await wrapper.vm.$nextTick()
|
|
428
|
+
|
|
429
|
+
await wrapper.trigger('mousemove', { clientX: -1000, clientY: -1000 })
|
|
430
|
+
await wrapper.vm.$nextTick()
|
|
431
|
+
|
|
432
|
+
const overlayElement = card.element.closest('.v-overlay__content') as HTMLElement
|
|
433
|
+
|
|
434
|
+
expect(parseInt(overlayElement.style.left, 10)).toBe(0)
|
|
435
|
+
expect(parseInt(overlayElement.style.top, 10)).toBe(0)
|
|
436
|
+
|
|
437
|
+
await wrapper.trigger('mousemove', { clientX: 10000, clientY: 10000 })
|
|
438
|
+
await wrapper.vm.$nextTick()
|
|
439
|
+
|
|
440
|
+
const windowWidth = window.innerWidth
|
|
441
|
+
const windowHeight = window.innerHeight
|
|
442
|
+
const overlayWidth = overlayElement.offsetWidth
|
|
443
|
+
const overlayHeight = overlayElement.offsetHeight
|
|
444
|
+
|
|
445
|
+
expect(parseInt(overlayElement.style.left, 10)).toBe(windowWidth - overlayWidth)
|
|
446
|
+
expect(parseInt(overlayElement.style.top, 10)).toBe(windowHeight - overlayHeight)
|
|
447
|
+
|
|
448
|
+
await wrapper.trigger('mouseup')
|
|
449
|
+
|
|
450
|
+
wrapper.unmount()
|
|
451
|
+
})
|
|
452
|
+
|
|
453
|
+
it('move the dialog to the left when the left arrow is pressed', async () => {
|
|
454
|
+
const wrapper = mount(DialogBox, {
|
|
455
|
+
props: {
|
|
456
|
+
...defaultProps,
|
|
457
|
+
draggable: true,
|
|
458
|
+
},
|
|
459
|
+
global: {
|
|
460
|
+
plugins: [vuetify],
|
|
461
|
+
},
|
|
462
|
+
attachTo: document.body,
|
|
463
|
+
})
|
|
464
|
+
|
|
465
|
+
const card = wrapper.getComponent(VCard)
|
|
466
|
+
|
|
467
|
+
await card.trigger('keydown', { key: 'ArrowLeft' })
|
|
468
|
+
await wrapper.vm.$nextTick()
|
|
469
|
+
|
|
470
|
+
const overlayElement = card.element.closest('.v-overlay__content') as HTMLElement
|
|
471
|
+
|
|
472
|
+
expect(overlayElement.style.position).toBe('absolute')
|
|
473
|
+
expect(overlayElement.style.left).toBe(`0px`)
|
|
474
|
+
})
|
|
475
|
+
|
|
476
|
+
it('move the dialog to the right when the right arrow is pressed', async () => {
|
|
477
|
+
const wrapper = mount(DialogBox, {
|
|
478
|
+
props: {
|
|
479
|
+
...defaultProps,
|
|
480
|
+
draggable: true,
|
|
481
|
+
},
|
|
482
|
+
global: {
|
|
483
|
+
plugins: [vuetify],
|
|
484
|
+
},
|
|
485
|
+
attachTo: document.body,
|
|
486
|
+
})
|
|
487
|
+
|
|
488
|
+
const card = wrapper.getComponent(VCard)
|
|
489
|
+
|
|
490
|
+
await card.trigger('keydown', { key: 'ArrowRight' })
|
|
491
|
+
await wrapper.vm.$nextTick()
|
|
492
|
+
|
|
493
|
+
const overlayElement = card.element.closest('.v-overlay__content') as HTMLElement
|
|
494
|
+
const computedStyle = getComputedStyle(overlayElement)
|
|
495
|
+
const marginLeft = parseFloat(computedStyle.marginLeft) || 0
|
|
496
|
+
const positionToLeft = window.innerWidth - overlayElement.offsetWidth - marginLeft * 2
|
|
497
|
+
|
|
498
|
+
expect(overlayElement.style.position).toBe('absolute')
|
|
499
|
+
expect(overlayElement.style.left).toBe(`${positionToLeft}px`)
|
|
500
|
+
})
|
|
501
|
+
})
|
|
373
502
|
})
|
|
@@ -8,18 +8,17 @@ exports[`DialogBox > rendering and props > renders correctly with props 1`] = `
|
|
|
8
8
|
modelvalue="true"
|
|
9
9
|
persistent="false"
|
|
10
10
|
retain-focus="false"
|
|
11
|
+
scrim="true"
|
|
11
12
|
width="600px"
|
|
12
13
|
>
|
|
13
|
-
<div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
id="dialog-content"
|
|
22
|
-
>
|
|
14
|
+
<div class="
|
|
15
|
+
pa-0
|
|
16
|
+
pb-6
|
|
17
|
+
v-card
|
|
18
|
+
v-card--density-default
|
|
19
|
+
v-card--variant-elevated
|
|
20
|
+
v-theme--light
|
|
21
|
+
">
|
|
23
22
|
<!---->
|
|
24
23
|
<div class="v-card__loader">
|
|
25
24
|
<div
|
|
@@ -77,8 +76,10 @@ exports[`DialogBox > rendering and props > renders correctly with props 1`] = `
|
|
|
77
76
|
d-flex
|
|
78
77
|
flex-nowrap
|
|
79
78
|
mb-6
|
|
80
|
-
mr-6
|
|
81
79
|
pa-0
|
|
80
|
+
pt-6
|
|
81
|
+
px-6
|
|
82
|
+
sy-dialog-box-title
|
|
82
83
|
v-card-title
|
|
83
84
|
">
|
|
84
85
|
<h2
|
|
@@ -136,10 +137,12 @@ exports[`DialogBox > rendering and props > renders correctly with props 1`] = `
|
|
|
136
137
|
<!---->
|
|
137
138
|
</button>
|
|
138
139
|
</div>
|
|
140
|
+
<div class="px-6"></div>
|
|
139
141
|
<div class="
|
|
140
142
|
d-flex
|
|
141
143
|
flex-wrap
|
|
142
144
|
mt-6
|
|
145
|
+
px-6
|
|
143
146
|
sy-dialog-box-actions-ctn
|
|
144
147
|
">
|
|
145
148
|
<div class="v-spacer"></div>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ref, type Ref, type TemplateRef } from 'vue'
|
|
2
|
+
import type { VDialog } from 'vuetify/components'
|
|
3
|
+
|
|
4
|
+
export function useDraggable(
|
|
5
|
+
draggable: Readonly<Ref<boolean>>,
|
|
6
|
+
dialogContent: TemplateRef<VDialog | null | undefined>,
|
|
7
|
+
) {
|
|
8
|
+
const isGrabbing = ref(false)
|
|
9
|
+
function startDragging(e: MouseEvent) {
|
|
10
|
+
if (!draggable.value) return
|
|
11
|
+
|
|
12
|
+
isGrabbing.value = true
|
|
13
|
+
|
|
14
|
+
const dialogElement = dialogContent?.value?.$el.querySelector('.sy-dialog-box-title') as HTMLElement
|
|
15
|
+
const overlayElement = dialogContent?.value?.$el.closest('.v-overlay__content') as HTMLElement
|
|
16
|
+
if (!dialogElement || !overlayElement) throw new Error('Dialog element not found')
|
|
17
|
+
|
|
18
|
+
const computedStyle = getComputedStyle(overlayElement)
|
|
19
|
+
const marginLeft = parseFloat(computedStyle.marginLeft) || 0
|
|
20
|
+
const marginTop = parseFloat(computedStyle.marginTop) || 0
|
|
21
|
+
|
|
22
|
+
const rect = overlayElement.getBoundingClientRect()
|
|
23
|
+
const offsetX = e.clientX - rect.left + marginLeft
|
|
24
|
+
const offsetY = e.clientY - rect.top + marginTop
|
|
25
|
+
|
|
26
|
+
function onMouseMove(e: MouseEvent) {
|
|
27
|
+
const windowWidth = window.innerWidth
|
|
28
|
+
const windowHeight = window.innerHeight
|
|
29
|
+
|
|
30
|
+
const overlayWidth = overlayElement.offsetWidth
|
|
31
|
+
const overlayHeight = overlayElement.offsetHeight
|
|
32
|
+
|
|
33
|
+
let left = e.clientX - offsetX
|
|
34
|
+
let top = e.clientY - offsetY
|
|
35
|
+
|
|
36
|
+
// Prevent the dialog from going outside the window horizontally
|
|
37
|
+
left = Math.max(-marginLeft, Math.min(left, windowWidth - overlayWidth - marginLeft))
|
|
38
|
+
|
|
39
|
+
// Prevent the dialog from going outside the window vertically
|
|
40
|
+
top = Math.max(-marginTop, Math.min(top, windowHeight - overlayHeight - marginTop))
|
|
41
|
+
|
|
42
|
+
overlayElement.style.position = 'absolute'
|
|
43
|
+
overlayElement.style.left = `${left}px`
|
|
44
|
+
overlayElement.style.top = `${top}px`
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function onMouseUp() {
|
|
48
|
+
isGrabbing.value = false
|
|
49
|
+
window.removeEventListener('mousemove', onMouseMove)
|
|
50
|
+
window.removeEventListener('mouseup', onMouseUp)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
window.addEventListener('mousemove', onMouseMove)
|
|
54
|
+
window.addEventListener('mouseup', onMouseUp)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Keyboard accessibility functions */
|
|
58
|
+
|
|
59
|
+
function moveToLeft() {
|
|
60
|
+
const overlayElement = dialogContent?.value?.$el.closest('.v-overlay__content') as HTMLElement
|
|
61
|
+
if (!overlayElement) throw new Error('Dialog element not found')
|
|
62
|
+
|
|
63
|
+
const computedStyle = getComputedStyle(overlayElement)
|
|
64
|
+
const marginLeft = parseFloat(computedStyle.marginLeft) || 0
|
|
65
|
+
const positionToLeft = window.innerWidth - overlayElement.offsetWidth - marginLeft * 2
|
|
66
|
+
|
|
67
|
+
if (overlayElement.style.left === `${positionToLeft}px`) {
|
|
68
|
+
overlayElement.style.position = 'static'
|
|
69
|
+
overlayElement.style.left = ``
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
overlayElement.style.position = 'absolute'
|
|
74
|
+
overlayElement.style.left = `0px`
|
|
75
|
+
overlayElement.style.top = ''
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function moveToRight() {
|
|
79
|
+
const overlayElement = dialogContent?.value?.$el.closest('.v-overlay__content') as HTMLElement
|
|
80
|
+
if (!overlayElement) throw new Error('Dialog element not found')
|
|
81
|
+
|
|
82
|
+
const computedStyle = getComputedStyle(overlayElement)
|
|
83
|
+
const marginLeft = parseFloat(computedStyle.marginLeft) || 0
|
|
84
|
+
const positionToLeft = window.innerWidth - overlayElement.offsetWidth - marginLeft * 2
|
|
85
|
+
|
|
86
|
+
if (overlayElement.style.left === `0px`) {
|
|
87
|
+
overlayElement.style.position = 'static'
|
|
88
|
+
overlayElement.style.left = ``
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
overlayElement.style.position = 'absolute'
|
|
93
|
+
overlayElement.style.left = `${positionToLeft}px`
|
|
94
|
+
overlayElement.style.top = ''
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return { isGrabbing, startDragging, moveToLeft, moveToRight }
|
|
98
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
2
|
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
import '../../stories/styles/shared.css';
|
|
3
4
|
|
|
4
5
|
<Meta of={AccessStories} />
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
<p>Informations sur l'accessibilité du composant</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
8
12
|
<Story of={AccessStories.Legende} />
|
|
9
13
|
<br />
|
|
10
14
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
2
|
+
import '../../stories/styles/shared.css';
|
|
2
3
|
|
|
3
4
|
import * as DownloadBtnStories from './DownloadBtn.stories';
|
|
4
5
|
|
|
5
6
|
<Meta of={DownloadBtnStories} />
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
L'élément `DownloadBtn` est utilisé pour permettre à l'utilisateur de télécharger un document provenant d'une API
|
|
8
|
+
<div className="header">
|
|
9
|
+
<h1>DownloadBtn</h1>
|
|
10
|
+
<p>L'élément `DownloadBtn` est utilisé pour permettre à l'utilisateur de télécharger un document provenant d'une API.</p>
|
|
11
|
+
</div>
|
|
10
12
|
|
|
11
13
|
<Canvas of={DownloadBtnStories.Default} />
|
|
12
14
|
|
|
@@ -56,7 +58,8 @@ Exemple :
|
|
|
56
58
|
import type { Notification } from '@cnamts/synapse/src/components/NotificationBar/types'
|
|
57
59
|
import axios from 'axios'
|
|
58
60
|
|
|
59
|
-
function download()
|
|
61
|
+
function download()
|
|
62
|
+
{
|
|
60
63
|
return axios.get('https://run.mocky.io/v3/884c25f5-6dc2-4c01-b8d9-26c54042f94f')
|
|
61
64
|
}
|
|
62
65
|
|
|
@@ -39,8 +39,6 @@ describe('DownloadBtn', () => {
|
|
|
39
39
|
expect(DownloadBtn).toBeTruthy()
|
|
40
40
|
|
|
41
41
|
expect(element.exists()).toBe(true)
|
|
42
|
-
|
|
43
|
-
expect(wrapper.html()).toMatchSnapshot()
|
|
44
42
|
})
|
|
45
43
|
|
|
46
44
|
it('works correctly', async () => {
|
|
@@ -77,6 +75,7 @@ describe('DownloadBtn', () => {
|
|
|
77
75
|
},
|
|
78
76
|
})
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
element = wrapper.find('[data-testid="download-btn"]')
|
|
79
|
+
expect(element.text()).toBe(slot)
|
|
81
80
|
})
|
|
82
81
|
})
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
2
|
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
import '../../stories/styles/shared.css';
|
|
3
4
|
|
|
4
5
|
<Meta of={AccessStories} />
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
<p>Informations sur l'accessibilité du composant</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
8
12
|
<Story of={AccessStories.Legende} />
|
|
9
13
|
<br />
|
|
10
14
|
|
|
@@ -3,10 +3,12 @@ import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
|
3
3
|
import * as ErrorPageStories from './ErrorPage.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={ErrorPageStories} />
|
|
6
|
+
import '../../stories/styles/shared.css';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Le composant `ErrorPage` sert à afficher une page d'erreur
|
|
8
|
+
<div className="header">
|
|
9
|
+
<h1>ErrorPage</h1>
|
|
10
|
+
<p>Le composant `ErrorPage` sert à afficher une page d'erreur.</p>
|
|
11
|
+
</div>
|
|
10
12
|
|
|
11
13
|
<Canvas of={ErrorPageStories.Default} />
|
|
12
14
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
2
|
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
import '../../stories/styles/shared.css';
|
|
3
4
|
|
|
4
5
|
<Meta of={AccessStories} />
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
<p>Informations sur l'accessibilité du composant</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
8
12
|
<Story of={AccessStories.Legende} />
|
|
9
13
|
<br />
|
|
10
14
|
|