@cnamts/synapse 1.0.19 → 1.0.21
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-CeVuSfJ9.js → DateFilter-uN8OURoP.js} +1 -1
- package/dist/{NumberFilter-C8PAu_sw.js → NumberFilter-sm1dQNQi.js} +1 -1
- package/dist/{PeriodFilter-UMUaxx3d.js → PeriodFilter-Cklsxnh9.js} +1 -1
- package/dist/{SelectFilter-CqZl8CYt.js → SelectFilter-CWefj27Z.js} +1 -1
- package/dist/{TextFilter-D_RhhNOh.js → TextFilter-Ddyj885L.js} +1 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +17 -7
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +4 -4
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +2416 -0
- package/dist/components/Customs/Selects/SyAutocomplete/types.d.ts +5 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/ariaManager.d.ts +14 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.d.ts +16 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.d.ts +28 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.d.ts +12 -0
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +2 -0
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
- package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
- package/dist/components/Customs/SyIcon/SyIcon.d.ts +2 -1
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
- package/dist/components/DatePicker/composables/useDateSelection.d.ts +1 -0
- package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
- package/dist/components/ErrorPage/locales.d.ts +18 -3
- package/dist/components/FileUpload/FileUpload.d.ts +2 -0
- package/dist/components/MaintenancePage/locales.d.ts +18 -2
- package/dist/components/NotFoundPage/locales.d.ts +20 -4
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +1 -1
- package/dist/components/PaginatedTable/Pagination.d.ts +17 -0
- package/dist/components/StatusPage/StatusPage.d.ts +39 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -5
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -5
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/types.d.ts +15 -0
- package/dist/composables/useFormFieldErrorHandling.d.ts +31 -0
- package/dist/design-system-v3.js +126 -122
- package/dist/design-system-v3.umd.cjs +325 -314
- package/dist/{main-B39UVv5p.js → main-CWniLr0s.js} +15837 -14587
- package/dist/modules.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/utils/theme/index.d.ts +6 -0
- package/package.json +12 -10
- package/src/assets/amelipro/icons.ts +166 -153
- package/src/components/Accordion/Accordion.mdx +4 -1
- package/src/components/Accordion/{Accessibilite/AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +73 -14
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +119 -27
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.a11y.spec.ts +304 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +435 -9
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +60 -0
- package/src/components/Amelipro/AmeliproIcon/__tests__/AmeliproIcon.spec.ts +1 -1
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +2 -0
- package/src/components/BackBtn/BackBtn.vue +5 -4
- package/src/components/BackBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/BackToTopBtn/BackToTopBtn.vue +6 -3
- package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Captcha/Captcha.vue +5 -1
- package/src/components/Captcha/CaptchaAlert.vue +9 -7
- package/src/components/Captcha/accessibilite/Accessibility.mdx +10 -0
- package/src/components/ChipList/accessibilite/Accessibility.mdx +15 -0
- package/src/components/CollapsibleList/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +8 -6
- package/src/components/Common/IconSlot/IconSlot.vue +1 -1
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
- package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +71 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
- package/src/components/CookieBanner/CookieBanner.vue +20 -5
- package/src/components/CookieBanner/accessibilite/Accessibility.mdx +71 -0
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +5 -4
- package/src/components/CopyBtn/CopyBtn.vue +6 -3
- package/src/components/CopyBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Customs/Selects/SelectOverview.mdx +112 -1
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.mdx +52 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +979 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +653 -0
- package/src/components/Customs/Selects/{SySelect → SyAutocomplete/accessibilite}/Accessibilite.stories.ts +7 -38
- package/src/components/Customs/Selects/{SySelect/Accessibilite.mdx → SyAutocomplete/accessibilite/Accessibility.mdx} +15 -20
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +72 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +345 -0
- package/src/components/Customs/Selects/SyAutocomplete/types.ts +7 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +180 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.ts +46 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.ts +107 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +74 -0
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +13 -9
- package/src/components/Customs/Selects/SyInputSelect/accessibilite/Accessibility.mdx +12 -0
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +43 -34
- package/src/components/Customs/Selects/SySelect/SySelect.vue +19 -2
- package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +274 -0
- package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +21 -16
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
- package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
- package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
- package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
- package/src/components/Customs/SyCheckbox/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -3
- package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
- package/src/components/Customs/SyForm/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Customs/SyIcon/SyIcon.mdx +4 -1
- package/src/components/Customs/SyIcon/SyIcon.vue +4 -3
- package/src/components/Customs/SyIcon/{Accessibilite.stories.ts → accessibilite/Accessibilite.stories.ts} +3 -3
- package/src/components/Customs/SyIcon/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyPagination/SyPagination.mdx +4 -2
- package/src/components/Customs/SyPagination/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
- package/src/components/Customs/SyRadioGroup/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyTabs/SyTabs.mdx +4 -2
- package/src/components/Customs/SyTabs/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -2
- package/src/components/Customs/SyTextField/SyTextField.vue +13 -0
- package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DataList/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DataListGroup/accessibilite/Accessibility.mdx +14 -0
- package/src/components/DatePicker/Accessibilite.mdx +1 -1
- package/src/components/DatePicker/Accessibilite.stories.ts +1 -1
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +7 -4
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +297 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
- package/src/components/DatePicker/composables/useDateSelection.ts +5 -0
- package/src/components/DatePicker/docExamples/BidirectionalComplexValidation.vue +273 -0
- package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
- package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +10 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
- package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
- package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +10 -0
- package/src/components/DialogBox/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DownloadBtn/DownloadBtn.vue +5 -4
- package/src/components/DownloadBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/ErrorPage/ErrorPage.mdx +6 -16
- package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
- package/src/components/ErrorPage/ErrorPage.vue +38 -125
- package/src/components/ErrorPage/accessibilite/Accessibility.mdx +77 -0
- package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
- package/src/components/ErrorPage/locales.ts +21 -3
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
- package/src/components/ExternalLinks/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FileList/UploadItem/UploadItem.vue +25 -20
- package/src/components/FileList/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilePreview/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FileUpload/FileUpload.vue +5 -0
- package/src/components/FileUpload/FileUploadContent.vue +5 -4
- package/src/components/FileUpload/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilterInline/FilterInline.vue +5 -4
- package/src/components/FilterInline/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilterSideBar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FooterBar/FooterBar.stories.ts +18 -14
- package/src/components/FooterBar/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -4
- package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +6 -5
- package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/accessibilite/Accessibility.mdx +15 -0
- package/src/components/HeaderBar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/HeaderBar/{Usages.mdx → usages/Usages.mdx} +2 -2
- package/src/components/HeaderLoading/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +9 -5
- package/src/components/HeaderToolbar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/LangBtn/LangBtn.vue +5 -4
- package/src/components/LangBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Logo/accessibilite/Accessibility.mdx +17 -0
- package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +12 -0
- package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +10 -0
- package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
- package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
- package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +70 -0
- package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
- package/src/components/MaintenancePage/locales.ts +24 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
- package/src/components/NirField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
- package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
- package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +87 -0
- package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
- package/src/components/NotFoundPage/locales.ts +24 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
- package/src/components/NotificationBar/Notification/Notification.vue +1 -1
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/accessibilite/Accessibility.mdx +75 -0
- package/src/components/PageContainer/{AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +7 -4
- package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
- package/src/components/PaginatedTable/PaginatedTable.vue +27 -47
- package/src/components/PaginatedTable/Pagination.vue +93 -0
- package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +12 -0
- package/src/components/PasswordField/PasswordField.vue +2 -1
- package/src/components/PasswordField/accessibilite/Accessibility.mdx +108 -0
- package/src/components/PeriodField/accessibilite/Accessibility.mdx +12 -0
- package/src/components/PhoneField/PhoneField.stories.ts +46 -38
- package/src/components/PhoneField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/RangeField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/RatingPicker/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SearchListField/SearchListField.vue +6 -3
- package/src/components/SearchListField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SkipLink/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +7 -4
- package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
- package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +67 -0
- package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
- package/src/components/StatusPage/StatusPage.mdx +22 -0
- package/src/components/StatusPage/StatusPage.stories.ts +193 -0
- package/src/components/StatusPage/StatusPage.vue +145 -0
- package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
- package/src/components/SubHeader/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SyAlert/SyAlert.vue +6 -6
- package/src/components/SyAlert/accessibilite/Accessibility.mdx +12 -0
- package/src/components/SyTextArea/accessibilite/Accessibility.mdx +10 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
- package/src/components/TableToolbar/TableToolbar.vue +7 -4
- package/src/components/TableToolbar/accessibilite/Accessibility.mdx +12 -0
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +4 -1
- package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Tables/SyTable/SyTable.mdx +4 -1
- package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Tables/common/TableHeader.vue +3 -1
- package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +18 -14
- package/src/components/ToolbarContainer/ToolbarContainer.mdx +2 -1
- package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +563 -420
- package/src/components/ToolbarContainer/accessibilite/Accessibility.mdx +69 -0
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
- package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
- package/src/components/UploadWorkflow/accessibilite/Accessibility.mdx +12 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
- package/src/components/UploadWorkflow/useFileList.ts +7 -0
- package/src/components/Usages/Usages.vue +3 -2
- package/src/components/UserMenuBtn/UserMenuBtn.vue +7 -5
- package/src/components/UserMenuBtn/accessibilite/Accessibility.mdx +12 -0
- package/src/components/index.ts +5 -0
- package/src/components/types.ts +10 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
- package/src/composables/rules/useFieldValidation.ts +31 -9
- package/src/composables/useFormFieldErrorHandling.ts +141 -0
- package/src/modules.d.ts +6 -0
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
- package/src/utils/theme/index.ts +19 -0
- package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
- package/dist/components/MaintenancePage/index.d.ts +0 -2
- package/src/components/BackBtn/Accessibilite.mdx +0 -14
- package/src/components/BackBtn/Accessibilite.stories.ts +0 -30
- package/src/components/BackToTopBtn/Accessibilite.mdx +0 -14
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +0 -31
- package/src/components/ChipList/Accessibilite.mdx +0 -14
- package/src/components/ChipList/Accessibilite.stories.ts +0 -31
- package/src/components/CollapsibleList/Accessibilite.stories.ts +0 -29
- package/src/components/ContextualMenu/Accessibilite.mdx +0 -13
- package/src/components/ContextualMenu/Accessibilite.stories.ts +0 -29
- package/src/components/CookieBanner/Accessibilite.mdx +0 -13
- package/src/components/CookieBanner/Accessibilite.stories.ts +0 -30
- package/src/components/CopyBtn/Accessibilite.mdx +0 -13
- package/src/components/CopyBtn/Accessibilite.stories.ts +0 -29
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.mdx +0 -14
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.stories.ts +0 -29
- package/src/components/Customs/Selects/SyInputSelect/Accessibilite.mdx +0 -13
- package/src/components/Customs/Selects/SyInputSelect/Accessibilite.stories.ts +0 -25
- package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
- package/src/components/Customs/SyTextField/Accessibilite.mdx +0 -14
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +0 -34
- package/src/components/DataList/Accessibilite.mdx +0 -13
- package/src/components/DataList/Accessibilite.stories.ts +0 -29
- package/src/components/DataListGroup/Accessibilite.mdx +0 -13
- package/src/components/DataListGroup/Accessibilite.stories.ts +0 -29
- package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
- package/src/components/DialogBox/Accessibilite.mdx +0 -14
- package/src/components/DialogBox/Accessibilite.stories.ts +0 -29
- package/src/components/DownloadBtn/Accessibilite.mdx +0 -14
- package/src/components/DownloadBtn/Accessibilite.stories.ts +0 -29
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
- package/src/components/ErrorPage/Accessibilite.mdx +0 -13
- package/src/components/ErrorPage/Accessibilite.stories.ts +0 -36
- package/src/components/ExternalLinks/Accessibilite.mdx +0 -18
- package/src/components/ExternalLinks/Accessibilite.stories.ts +0 -62
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
- package/src/components/FileList/Accessibilite.mdx +0 -13
- package/src/components/FileList/Accessibilite.stories.ts +0 -26
- package/src/components/FilePreview/Accessibilite.mdx +0 -14
- package/src/components/FilePreview/Accessibilite.stories.ts +0 -26
- package/src/components/FileUpload/Accessibilite.mdx +0 -13
- package/src/components/FileUpload/Accessibilite.stories.ts +0 -26
- package/src/components/FilterInline/Accessibilite.mdx +0 -15
- package/src/components/FilterInline/Accessibilite.stories.ts +0 -26
- package/src/components/FilterSideBar/Accessibilite.mdx +0 -13
- package/src/components/FilterSideBar/Accessibilite.stories.ts +0 -30
- package/src/components/FooterBar/Accessibilite.stories.ts +0 -26
- package/src/components/FranceConnectBtn/Accessibilite.mdx +0 -13
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +0 -30
- package/src/components/HeaderBar/Accessibilite.mdx +0 -13
- package/src/components/HeaderBar/Accessibilite.stories.ts +0 -31
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +0 -13
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +0 -30
- package/src/components/HeaderLoading/Accessibilite.stories.ts +0 -31
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
- package/src/components/HeaderToolbar/Accessibilite.mdx +0 -13
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +0 -36
- package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
- package/src/components/LangBtn/Accessibilite.mdx +0 -13
- package/src/components/LangBtn/Accessibilite.stories.ts +0 -32
- package/src/components/Logo/Accessibilite.mdx +0 -13
- package/src/components/Logo/Accessibilite.stories.ts +0 -30
- package/src/components/LogoBrandSection/Accessibilite.mdx +0 -13
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +0 -26
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
- package/src/components/MaintenancePage/Accessibilite.mdx +0 -13
- package/src/components/MaintenancePage/Accessibilite.stories.ts +0 -36
- package/src/components/MaintenancePage/index.ts +0 -3
- package/src/components/NirField/Accessibilite.mdx +0 -13
- package/src/components/NirField/Accessibilite.stories.ts +0 -31
- package/src/components/NotFoundPage/Accessibilite.mdx +0 -13
- package/src/components/NotFoundPage/Accessibilite.stories.ts +0 -36
- package/src/components/NotificationBar/Accessibilite.mdx +0 -13
- package/src/components/NotificationBar/Accessibilite.stories.ts +0 -30
- package/src/components/PageContainer/Accessibilite.mdx +0 -13
- package/src/components/PageContainer/Accessibilite.stories.ts +0 -30
- package/src/components/PaginatedTable/Accessibilite.mdx +0 -13
- package/src/components/PaginatedTable/Accessibilite.stories.ts +0 -26
- package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
- package/src/components/PasswordField/Accessibilite.mdx +0 -13
- package/src/components/PasswordField/Accessibilite.stories.ts +0 -121
- package/src/components/PeriodField/Accessibilite.mdx +0 -13
- package/src/components/PeriodField/Accessibilite.stories.ts +0 -27
- package/src/components/PhoneField/Accessibilite.mdx +0 -13
- package/src/components/PhoneField/Accessibilite.stories.ts +0 -32
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
- package/src/components/RangeField/Accessibilite.mdx +0 -13
- package/src/components/RangeField/Accessibilite.stories.ts +0 -32
- package/src/components/RatingPicker/Accessibilite.mdx +0 -13
- package/src/components/RatingPicker/Accessibilite.stories.ts +0 -30
- package/src/components/SearchListField/Accessibilite.mdx +0 -13
- package/src/components/SearchListField/Accessibilite.stories.ts +0 -30
- package/src/components/SkipLink/Accessibilite.stories.ts +0 -36
- package/src/components/SocialMediaLinks/Accessibilite.mdx +0 -13
- package/src/components/SocialMediaLinks/Accessibilite.stories.ts +0 -36
- package/src/components/SubHeader/Accessibilite.mdx +0 -13
- package/src/components/SubHeader/Accessibilite.stories.ts +0 -36
- package/src/components/SyAlert/Accessibilite.mdx +0 -13
- package/src/components/SyAlert/Accessibilite.stories.ts +0 -30
- package/src/components/TableToolbar/Accessibilite.mdx +0 -13
- package/src/components/TableToolbar/Accessibilite.stories.ts +0 -26
- package/src/components/UploadWorkflow/Accessibilite.mdx +0 -13
- package/src/components/UploadWorkflow/Accessibilite.stories.ts +0 -26
- package/src/components/UserMenuBtn/Accessibilite.mdx +0 -13
- package/src/components/UserMenuBtn/Accessibilite.stories.ts +0 -25
- /package/src/components/HeaderBar/{Usages.stories.ts → usages/Usages.stories.ts} +0 -0
- /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
- /package/src/components/SyBtnMenu/accessibilite/{AccessibilityGuide.mdx → Accessibility.mdx} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import SocialMediaLinks from './SocialMediaLinks.vue'
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
|
-
import { mdiFacebook, mdiLinkedin
|
|
3
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
4
|
+
|
|
5
|
+
const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
|
|
4
6
|
|
|
5
7
|
const meta = {
|
|
6
8
|
title: 'Composants/Navigation/SocialMediaLinks',
|
|
@@ -22,11 +24,11 @@ const meta = {
|
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
icon: mdiFacebook,
|
|
25
|
-
href: 'https://
|
|
27
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
26
28
|
},
|
|
27
29
|
{
|
|
28
|
-
icon:
|
|
29
|
-
href: 'https://
|
|
30
|
+
icon: xIcon,
|
|
31
|
+
href: 'https://x.com/Assur_Maladie',
|
|
30
32
|
},
|
|
31
33
|
],
|
|
32
34
|
headingLevel: 6,
|
|
@@ -78,7 +80,9 @@ export const Default: Story = {
|
|
|
78
80
|
name: 'Script',
|
|
79
81
|
code: `<script setup lang="ts">
|
|
80
82
|
import { SocialMediaLinks } from '@cnamts/synapse'
|
|
81
|
-
import { mdiFacebook, mdiLinkedin
|
|
83
|
+
import { mdiFacebook, mdiLinkedin } from '@mdi/js'
|
|
84
|
+
|
|
85
|
+
const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
|
|
82
86
|
|
|
83
87
|
const links = [
|
|
84
88
|
{
|
|
@@ -89,12 +93,12 @@ export const Default: Story = {
|
|
|
89
93
|
{
|
|
90
94
|
icon: mdiFacebook,
|
|
91
95
|
name: 'Facebook',
|
|
92
|
-
href: 'https://
|
|
96
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
93
97
|
},
|
|
94
98
|
{
|
|
95
|
-
icon:
|
|
96
|
-
name: '
|
|
97
|
-
href: 'https://
|
|
99
|
+
icon: xIcon,
|
|
100
|
+
name: 'X',
|
|
101
|
+
href: 'https://x.com/Assur_Maladie',
|
|
98
102
|
},
|
|
99
103
|
]
|
|
100
104
|
</script>
|
|
@@ -112,12 +116,12 @@ export const Default: Story = {
|
|
|
112
116
|
{
|
|
113
117
|
icon: mdiFacebook,
|
|
114
118
|
name: 'Facebook',
|
|
115
|
-
href: 'https://
|
|
119
|
+
href: 'https://www.facebook.com/AssurMaladie/',
|
|
116
120
|
},
|
|
117
121
|
{
|
|
118
|
-
icon:
|
|
119
|
-
name: '
|
|
120
|
-
href: 'https://
|
|
122
|
+
icon: xIcon,
|
|
123
|
+
name: 'X',
|
|
124
|
+
href: 'https://x.com/Assur_Maladie',
|
|
121
125
|
},
|
|
122
126
|
],
|
|
123
127
|
},
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
<SyIcon
|
|
50
50
|
:icon="social.icon"
|
|
51
51
|
size="30px"
|
|
52
|
-
class="
|
|
52
|
+
:class="{
|
|
53
|
+
'vd-social-media-links-icon': true,
|
|
54
|
+
'vd-social-media-links-icon--x': social.name === 'X',
|
|
55
|
+
}"
|
|
53
56
|
decorative
|
|
54
57
|
/>
|
|
55
58
|
</VBtn>
|
|
@@ -91,6 +94,11 @@ li {
|
|
|
91
94
|
color: tokens.$grey-base;
|
|
92
95
|
}
|
|
93
96
|
|
|
97
|
+
.vd-social-media-links-icon--x {
|
|
98
|
+
transform: scale(0.75);
|
|
99
|
+
transform-origin: center;
|
|
100
|
+
}
|
|
101
|
+
|
|
94
102
|
.v-btn--icon {
|
|
95
103
|
width: calc(var(--v-btn-height) + 5px);
|
|
96
104
|
height: calc(var(--v-btn-height) + 5px);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/blocks';
|
|
2
|
+
import * as SocialMediaLinksStories from '../SocialMediaLinks.stories';
|
|
3
|
+
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
+
import {
|
|
5
|
+
AccessibilityGuideLayout,
|
|
6
|
+
CriteriaSection,
|
|
7
|
+
CriteriaCard,
|
|
8
|
+
DemoSection,
|
|
9
|
+
BestPracticesSection,
|
|
10
|
+
ResourcesSection,
|
|
11
|
+
AuditSection,
|
|
12
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
|
|
13
|
+
|
|
14
|
+
<Meta of={SocialMediaLinksStories} />
|
|
15
|
+
|
|
16
|
+
<AccessibilityGuideLayout
|
|
17
|
+
componentName="SocialMediaLinks"
|
|
18
|
+
iconSrc={AccessibilityIcon}
|
|
19
|
+
>
|
|
20
|
+
<AuditSection>
|
|
21
|
+
<div>Rapport d’audit manuel : <a href="/audits/SocialMediaLinks.xlsx" style={{ color: '#0C41BD' }}>Voir le rapport</a></div>
|
|
22
|
+
<div style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>
|
|
23
|
+
Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/790" target="_blank" style={{ color: '#0C41BD' }}>issue #790</a>)
|
|
24
|
+
</div>
|
|
25
|
+
</AuditSection>
|
|
26
|
+
|
|
27
|
+
<CriteriaSection>
|
|
28
|
+
<CriteriaCard icon="🏷️" title="Structure et rôles">
|
|
29
|
+
<ul>
|
|
30
|
+
<li><strong>Titre accessible</strong> : utilise un heading natif (<code>h1–h6</code>) ou un <code>role="heading"</code> + <code>aria-level</code> via <code>use-native-heading</code>.</li>
|
|
31
|
+
<li><strong>Liens</strong> : chaque bouton est un lien <code><a></code> avec <code>aria-label</code> explicite « Lien vers <nom> ».</li>
|
|
32
|
+
<li><strong>Icônes décoratives</strong> : <code>SyIcon</code> marqué décoratif pour ne pas polluer le lecteur d’écran.</li>
|
|
33
|
+
<li><strong>Ouverture externe</strong> : <code>target="_blank"</code> avec <code>rel="noopener noreferrer"</code> pour la sécurité.</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</CriteriaCard>
|
|
36
|
+
|
|
37
|
+
<CriteriaCard icon="⌨️" title="Navigation clavier">
|
|
38
|
+
<ul>
|
|
39
|
+
<li><strong>Focus visible</strong> : halo visible sur <code>.v-btn--icon:focus-visible</code>, contrasté en clair/sombre.</li>
|
|
40
|
+
<li><strong>Ordre logique</strong> : tabulation suit l’ordre des liens fournis.</li>
|
|
41
|
+
<li><strong>Taille des cibles</strong> : boutons icon-text élargis (<code>height/width</code> ajustée) pour une cible confortable.</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</CriteriaCard>
|
|
44
|
+
|
|
45
|
+
<CriteriaCard icon="🎨" title="Contraste et lisibilité">
|
|
46
|
+
<ul>
|
|
47
|
+
<li><strong>Texte du label</strong> : couleur primaire (<code>tokens.$blue-base</code>) ou blanc en thème sombre.</li>
|
|
48
|
+
<li><strong>Icônes</strong> : couleur neutre (<code>tokens.$grey-base</code>) et outline blanc en sombre.</li>
|
|
49
|
+
<li><strong>Responsive</strong> : alignement adapté (gauche/droite) selon la largeur.</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</CriteriaCard>
|
|
52
|
+
</CriteriaSection>
|
|
53
|
+
|
|
54
|
+
<DemoSection componentName="SocialMediaLinks">
|
|
55
|
+
<Story of={SocialMediaLinksStories.Default} />
|
|
56
|
+
</DemoSection>
|
|
57
|
+
|
|
58
|
+
<BestPracticesSection>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>Fournissez toujours un <code>aria-label</code> descriptif pour chaque lien d’icône.</li>
|
|
61
|
+
<li>Choisissez un niveau de titre cohérent avec la hiérarchie de la page (<code>heading-level</code> 1–6) ou activez <code>use-native-heading</code> pour un titre sémantique.</li>
|
|
62
|
+
<li>Vérifiez le focus visible sur tous les liens, notamment en thème sombre.</li>
|
|
63
|
+
<li>Utilisez des icônes SVG accessibles et marquées décoratives quand le libellé est déjà donné.</li>
|
|
64
|
+
<li>Si vous changez l’ordre ou la liste des réseaux, assurez-vous que l’ordre de tabulation reste logique.</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</BestPracticesSection>
|
|
67
|
+
</AccessibilityGuideLayout>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultSocialMediaLinks } from '../DefaultSocialMediaLinks'
|
|
2
2
|
import { describe, it, expect } from 'vitest'
|
|
3
|
-
import { mdiLinkedin
|
|
3
|
+
import { mdiLinkedin } from '@mdi/js'
|
|
4
4
|
|
|
5
5
|
describe('defaultSocialMediaLinks', () => {
|
|
6
6
|
it('contains the correct number of links', () => {
|
|
@@ -13,9 +13,9 @@ describe('defaultSocialMediaLinks', () => {
|
|
|
13
13
|
expect(linkedinLink?.icon).toBe(mdiLinkedin)
|
|
14
14
|
})
|
|
15
15
|
|
|
16
|
-
it('contains the correct
|
|
17
|
-
const
|
|
18
|
-
expect(
|
|
19
|
-
expect(
|
|
16
|
+
it('contains the correct X link', () => {
|
|
17
|
+
const xLink = defaultSocialMediaLinks.find(link => link.href === 'https://x.com/Assur_Maladie')
|
|
18
|
+
expect(xLink).toBeDefined()
|
|
19
|
+
expect(typeof xLink?.icon).toBe('string')
|
|
20
20
|
})
|
|
21
21
|
})
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SocialMediaLinks from '../SocialMediaLinks.vue'
|
|
8
|
+
|
|
9
|
+
const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
|
|
10
|
+
|
|
11
|
+
const sampleLinks = [
|
|
12
|
+
{
|
|
13
|
+
href: 'https://www.linkedin.com/company/assurance-maladie/',
|
|
14
|
+
name: 'LinkedIn',
|
|
15
|
+
icon: 'mdi-linkedin',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
href: 'https://x.com/Assur_Maladie',
|
|
19
|
+
name: 'X',
|
|
20
|
+
icon: xIcon,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
href: 'https://www.facebook.com/assurancemaladie',
|
|
24
|
+
name: 'Facebook',
|
|
25
|
+
icon: 'mdi-facebook',
|
|
26
|
+
},
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
describe('SocialMediaLinks – accessibility (axe)', () => {
|
|
30
|
+
it('has no obvious axe violations with native heading', async () => {
|
|
31
|
+
const wrapper = mount(SocialMediaLinks, {
|
|
32
|
+
props: {
|
|
33
|
+
links: sampleLinks,
|
|
34
|
+
headingLevel: 6,
|
|
35
|
+
useNativeHeading: true,
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
40
|
+
assertNoA11yViolations(results, 'SocialMediaLinks – native heading', {
|
|
41
|
+
ignoreRules: ['region'],
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('has no obvious axe violations with ARIA heading', async () => {
|
|
46
|
+
const wrapper = mount(SocialMediaLinks, {
|
|
47
|
+
props: {
|
|
48
|
+
links: sampleLinks,
|
|
49
|
+
headingLevel: 3,
|
|
50
|
+
useNativeHeading: false,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
55
|
+
assertNoA11yViolations(results, 'SocialMediaLinks – aria heading', {
|
|
56
|
+
ignoreRules: ['region'],
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
@@ -2,6 +2,8 @@ import { mount, VueWrapper } from '@vue/test-utils'
|
|
|
2
2
|
import SocialMediaLinks from '../SocialMediaLinks.vue'
|
|
3
3
|
import { describe, it, expect, afterEach } from 'vitest'
|
|
4
4
|
|
|
5
|
+
const xIcon = 'M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z'
|
|
6
|
+
|
|
5
7
|
describe('SocialMediaLinks', () => {
|
|
6
8
|
let wrapper: VueWrapper
|
|
7
9
|
|
|
@@ -30,7 +32,7 @@ describe('SocialMediaLinks', () => {
|
|
|
30
32
|
|
|
31
33
|
it('renders correctly with provided links', () => {
|
|
32
34
|
const links = [
|
|
33
|
-
{ href: 'https://
|
|
35
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
34
36
|
{ href: 'https://facebook.com', name: 'Facebook', icon: 'mdi-facebook' },
|
|
35
37
|
]
|
|
36
38
|
wrapper = mount(SocialMediaLinks, {
|
|
@@ -51,8 +53,8 @@ describe('SocialMediaLinks', () => {
|
|
|
51
53
|
|
|
52
54
|
// Check first link
|
|
53
55
|
const firstLink = listItems[0]?.find('a')
|
|
54
|
-
expect(firstLink?.attributes('href')).toBe('https://
|
|
55
|
-
expect(firstLink?.attributes('aria-label')).toBe('Lien vers
|
|
56
|
+
expect(firstLink?.attributes('href')).toBe('https://x.com')
|
|
57
|
+
expect(firstLink?.attributes('aria-label')).toBe('Lien vers X')
|
|
56
58
|
|
|
57
59
|
// Check second link
|
|
58
60
|
const secondLink = listItems[1]?.find('a')
|
|
@@ -62,7 +64,7 @@ describe('SocialMediaLinks', () => {
|
|
|
62
64
|
|
|
63
65
|
it('renders the correct number of social media links', () => {
|
|
64
66
|
const links = [
|
|
65
|
-
{ href: 'https://
|
|
67
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
66
68
|
{ href: 'https://facebook.com', name: 'Facebook', icon: 'mdi-facebook' },
|
|
67
69
|
]
|
|
68
70
|
wrapper = mount(SocialMediaLinks, {
|
|
@@ -126,7 +128,7 @@ describe('SocialMediaLinks', () => {
|
|
|
126
128
|
|
|
127
129
|
it('has proper focus styles for accessibility', () => {
|
|
128
130
|
const links = [
|
|
129
|
-
{ href: 'https://
|
|
131
|
+
{ href: 'https://x.com', name: 'X', icon: xIcon },
|
|
130
132
|
]
|
|
131
133
|
wrapper = mount(SocialMediaLinks, {
|
|
132
134
|
props: {
|
|
@@ -142,8 +144,8 @@ describe('SocialMediaLinks', () => {
|
|
|
142
144
|
|
|
143
145
|
// Verify the button has proper accessibility attributes
|
|
144
146
|
const link = wrapper.find('a')
|
|
145
|
-
expect(link.attributes('href')).toBe('https://
|
|
146
|
-
expect(link.attributes('aria-label')).toBe('Lien vers
|
|
147
|
+
expect(link.attributes('href')).toBe('https://x.com')
|
|
148
|
+
expect(link.attributes('aria-label')).toBe('Lien vers X')
|
|
147
149
|
|
|
148
150
|
// Check that the component has the necessary CSS classes for focus styles
|
|
149
151
|
// We can't test the actual CSS properties, but we can verify the structure is there
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
2
|
+
import '../../stories/styles/shared.css';
|
|
3
|
+
import * as StatusPageStories from './StatusPage.stories'
|
|
4
|
+
|
|
5
|
+
<Meta of={StatusPageStories} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>StatusPage</h1>
|
|
9
|
+
<p>Le composant `StatusPage` sert à afficher une page de statut.</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<Canvas of={StatusPageStories.Default} />
|
|
13
|
+
|
|
14
|
+
# API
|
|
15
|
+
|
|
16
|
+
<Controls of={StatusPageStories.Default} />
|
|
17
|
+
|
|
18
|
+
## Lien de retour
|
|
19
|
+
|
|
20
|
+
Vous pouvez mettre un lien vers une autre page avec les props `btn-text` et `btn-link` ou `btn-href`.
|
|
21
|
+
|
|
22
|
+
<Canvas of={StatusPageStories.WithLink} />
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import StatusPage from './StatusPage.vue'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Templates/StatusPage',
|
|
6
|
+
component: StatusPage,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
'code': {
|
|
12
|
+
description: 'Code d\'erreur affiché en premier plan',
|
|
13
|
+
},
|
|
14
|
+
'codeErrorText': {
|
|
15
|
+
description: 'Text affiché avant le code d\'erreur pour les outils d\'accessibilité',
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: {
|
|
18
|
+
summary: 'Code d\'erreur\xa0: ',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
'additional-content': {
|
|
23
|
+
control: {
|
|
24
|
+
type: 'text',
|
|
25
|
+
},
|
|
26
|
+
table: {
|
|
27
|
+
type: {
|
|
28
|
+
summary: '{}',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
'action': {
|
|
33
|
+
control: {
|
|
34
|
+
type: 'text',
|
|
35
|
+
},
|
|
36
|
+
table: {
|
|
37
|
+
type: {
|
|
38
|
+
summary: '{}',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'illustration': {
|
|
43
|
+
control: {
|
|
44
|
+
type: 'text',
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
type: {
|
|
48
|
+
summary: '{}',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
} satisfies Meta<typeof StatusPage>
|
|
54
|
+
|
|
55
|
+
export default meta
|
|
56
|
+
|
|
57
|
+
type Story = StoryObj<typeof StatusPage>
|
|
58
|
+
|
|
59
|
+
export const Default: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
pageTitle: 'une erreur est survenue',
|
|
62
|
+
code: '500',
|
|
63
|
+
message: 'Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646',
|
|
64
|
+
},
|
|
65
|
+
parameters: {
|
|
66
|
+
sourceCode: [
|
|
67
|
+
{
|
|
68
|
+
name: 'Template',
|
|
69
|
+
code: `
|
|
70
|
+
<template>
|
|
71
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
72
|
+
<StatusPage
|
|
73
|
+
page-title="une erreur est survenue"
|
|
74
|
+
code="500"
|
|
75
|
+
message="Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646"
|
|
76
|
+
>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
`,
|
|
80
|
+
}, {
|
|
81
|
+
name: 'Script',
|
|
82
|
+
code: `
|
|
83
|
+
<script setup lang="ts">
|
|
84
|
+
import { StatusPage } from '@cnamts/synapse'
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
`,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
decorators: [
|
|
92
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
93
|
+
],
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const WithLink: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
...Default.args,
|
|
99
|
+
btnHref: '/',
|
|
100
|
+
btnText: 'Retour à l\'accueil',
|
|
101
|
+
},
|
|
102
|
+
parameters: {
|
|
103
|
+
sourceCode: [
|
|
104
|
+
{
|
|
105
|
+
name: 'Template',
|
|
106
|
+
code: `
|
|
107
|
+
<template>
|
|
108
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
109
|
+
<StatusPage
|
|
110
|
+
page-title="une erreur est survenue"
|
|
111
|
+
code="500"
|
|
112
|
+
message="Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646"
|
|
113
|
+
btn-href=""
|
|
114
|
+
btn-text="Retour à l'accueil"
|
|
115
|
+
>
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
118
|
+
`,
|
|
119
|
+
}, {
|
|
120
|
+
name: 'Script',
|
|
121
|
+
code: `
|
|
122
|
+
<script setup lang="ts">
|
|
123
|
+
import { StatusPage } from '@cnamts/synapse'
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
`,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
decorators: [
|
|
131
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
132
|
+
],
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export const CustomIllustration: Story = {
|
|
136
|
+
args: {
|
|
137
|
+
...Default.args,
|
|
138
|
+
btnHref: '/',
|
|
139
|
+
btnText: 'Retour à l\'accueil',
|
|
140
|
+
},
|
|
141
|
+
parameters: {
|
|
142
|
+
sourceCode: [
|
|
143
|
+
{
|
|
144
|
+
name: 'Template',
|
|
145
|
+
code: `
|
|
146
|
+
<template>
|
|
147
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
148
|
+
<StatusPage
|
|
149
|
+
page-title="une erreur est survenue"
|
|
150
|
+
code="500"
|
|
151
|
+
message="Une erreur est survenue de notre côté, veuillez réessayer plus tard."
|
|
152
|
+
btn-href="/"
|
|
153
|
+
btn-text="Retour à l'accueil"
|
|
154
|
+
>
|
|
155
|
+
<template #illustration>
|
|
156
|
+
<div style="width: 260px; height: 200px; display: grid; place-items: center; border-radius: 12px; background: white; border: 2px dashed #0D419A;">
|
|
157
|
+
<span style="font-weight: 700; color: #0D419A;">Illustration</span>
|
|
158
|
+
</div>
|
|
159
|
+
</template>
|
|
160
|
+
</StatusPage>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
`,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'Script',
|
|
167
|
+
code: `
|
|
168
|
+
<script setup lang="ts">
|
|
169
|
+
import { StatusPage } from '@cnamts/synapse'
|
|
170
|
+
</script>
|
|
171
|
+
`,
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
decorators: [
|
|
176
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
177
|
+
],
|
|
178
|
+
render: args => ({
|
|
179
|
+
components: { StatusPage },
|
|
180
|
+
setup() {
|
|
181
|
+
return { args }
|
|
182
|
+
},
|
|
183
|
+
template: `
|
|
184
|
+
<StatusPage v-bind="args">
|
|
185
|
+
<template #illustration>
|
|
186
|
+
<div style="width: 260px; height: 200px; display: grid; place-items: center; border-radius: 12px; background: white; border: 2px dashed #0D419A;">
|
|
187
|
+
<span style="font-weight: 700; color: #0D419A;">Illustration</span>
|
|
188
|
+
</div>
|
|
189
|
+
</template>
|
|
190
|
+
</StatusPage>
|
|
191
|
+
`,
|
|
192
|
+
}),
|
|
193
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
3
|
+
import PageContainer from '../PageContainer/PageContainer.vue'
|
|
4
|
+
|
|
5
|
+
type MessagePart =
|
|
6
|
+
| { type: 'text', value: string }
|
|
7
|
+
| { type: 'phone', value: string }
|
|
8
|
+
|
|
9
|
+
// Fonction pour formater le message et ajouter des liens tel: aux numéros de téléphone
|
|
10
|
+
const splitMessage = (message?: string): MessagePart[] => {
|
|
11
|
+
// Regex pour détecter les numéros de téléphone
|
|
12
|
+
if (!message)
|
|
13
|
+
return []
|
|
14
|
+
|
|
15
|
+
const regex = /\b(\d{4}|\d{10})\b/g
|
|
16
|
+
const parts: MessagePart[] = []
|
|
17
|
+
let lastIndex = 0
|
|
18
|
+
let match: RegExpExecArray | null
|
|
19
|
+
|
|
20
|
+
while ((match = regex.exec(message)) !== null) {
|
|
21
|
+
if (match.index > lastIndex) {
|
|
22
|
+
parts.push({
|
|
23
|
+
type: 'text',
|
|
24
|
+
value: message.slice(lastIndex, match.index),
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
parts.push({
|
|
29
|
+
type: 'phone',
|
|
30
|
+
value: match[1]!,
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
lastIndex = regex.lastIndex
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (lastIndex < message.length) {
|
|
37
|
+
parts.push({
|
|
38
|
+
type: 'text',
|
|
39
|
+
value: message.slice(lastIndex),
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return parts
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
withDefaults(defineProps<{
|
|
47
|
+
pageTitle?: string
|
|
48
|
+
message?: string
|
|
49
|
+
code?: string
|
|
50
|
+
codeErrorText?: string
|
|
51
|
+
btnText?: string
|
|
52
|
+
btnHref?: string
|
|
53
|
+
btnLink?: RouteRecordRaw | string
|
|
54
|
+
hideBtn?: boolean
|
|
55
|
+
}>(), {
|
|
56
|
+
pageTitle: undefined,
|
|
57
|
+
message: undefined,
|
|
58
|
+
code: undefined,
|
|
59
|
+
codeErrorText: 'Code d\'erreur\xa0: ',
|
|
60
|
+
btnText: undefined,
|
|
61
|
+
btnLink: '/',
|
|
62
|
+
btnHref: undefined,
|
|
63
|
+
hideBtn: false,
|
|
64
|
+
})
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<PageContainer size="md">
|
|
69
|
+
<VCard
|
|
70
|
+
:elevation="0"
|
|
71
|
+
class="pa-6 pa-sm-16"
|
|
72
|
+
>
|
|
73
|
+
<VRow class="max-width-none">
|
|
74
|
+
<VCol
|
|
75
|
+
:sm="$slots.illustration ? 6 : 12"
|
|
76
|
+
cols="12"
|
|
77
|
+
class="order-last order-sm-first text-center text-sm-left d-flex flex-column justify-center align-sm-start"
|
|
78
|
+
>
|
|
79
|
+
<div
|
|
80
|
+
v-if="code"
|
|
81
|
+
class="sy-code text-primary mb-4"
|
|
82
|
+
>
|
|
83
|
+
<span class="d-sr-only">{{ codeErrorText }}</span>
|
|
84
|
+
{{ code }}
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<h1
|
|
88
|
+
v-if="pageTitle"
|
|
89
|
+
class="mb-2 font-weight-bold text-h5 mb-4"
|
|
90
|
+
>
|
|
91
|
+
{{ pageTitle }}
|
|
92
|
+
</h1>
|
|
93
|
+
|
|
94
|
+
<p v-if="message">
|
|
95
|
+
<template
|
|
96
|
+
v-for="(part, index) in splitMessage(message)"
|
|
97
|
+
:key="index"
|
|
98
|
+
>
|
|
99
|
+
<span v-if="part.type === 'text'">
|
|
100
|
+
{{ part.value }}
|
|
101
|
+
</span>
|
|
102
|
+
<a
|
|
103
|
+
v-else
|
|
104
|
+
:href="`tel:${part.value}`"
|
|
105
|
+
>
|
|
106
|
+
{{ part.value }}
|
|
107
|
+
</a>
|
|
108
|
+
</template>
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
<slot name="additional-content" />
|
|
112
|
+
|
|
113
|
+
<slot name="action">
|
|
114
|
+
<VBtn
|
|
115
|
+
v-if="!hideBtn && btnText && (btnLink || btnHref)"
|
|
116
|
+
:to="btnHref ? undefined : btnLink"
|
|
117
|
+
:href="btnHref"
|
|
118
|
+
color="primary"
|
|
119
|
+
class="mt-6"
|
|
120
|
+
>
|
|
121
|
+
{{ btnText }}
|
|
122
|
+
</VBtn>
|
|
123
|
+
</slot>
|
|
124
|
+
</VCol>
|
|
125
|
+
|
|
126
|
+
<VCol
|
|
127
|
+
v-if="$slots.illustration"
|
|
128
|
+
cols="12"
|
|
129
|
+
sm="6"
|
|
130
|
+
class="d-flex align-center justify-center"
|
|
131
|
+
>
|
|
132
|
+
<slot name="illustration" />
|
|
133
|
+
</VCol>
|
|
134
|
+
</VRow>
|
|
135
|
+
</VCard>
|
|
136
|
+
</PageContainer>
|
|
137
|
+
</template>
|
|
138
|
+
|
|
139
|
+
<style lang="scss" scoped>
|
|
140
|
+
.sy-code {
|
|
141
|
+
font-size: 6rem;
|
|
142
|
+
line-height: 6rem;
|
|
143
|
+
font-weight: 400;
|
|
144
|
+
}
|
|
145
|
+
</style>
|