@cnamts/synapse 1.0.24 → 1.0.25
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/README.md +27 -5
- package/dist/{AutocompleteFilter-BWLR3U7W.js → AutocompleteFilter-D7qBuCAP.js} +1 -1
- package/dist/{AutocompleteFilter-D9jzRzAL.cjs → AutocompleteFilter-Df9i5mAl.cjs} +1 -1
- package/dist/{DateFilter-DTUl8hb1.cjs → DateFilter-BJD6FMev.cjs} +1 -1
- package/dist/{DateFilter-BpwFexzi.js → DateFilter-BitMWrMU.js} +1 -1
- package/dist/{NumberFilter-Bz_NTdX9.js → NumberFilter-BTLUxw0a.js} +1 -1
- package/dist/{NumberFilter-MAEojdk0.cjs → NumberFilter-DGCzCXzI.cjs} +1 -1
- package/dist/{PeriodFilter-DX_wy9g-.js → PeriodFilter-B5rUIPAC.js} +1 -1
- package/dist/{PeriodFilter-CC4WgIhl.cjs → PeriodFilter-DO_ecTZW.cjs} +1 -1
- package/dist/{SelectFilter-BR3fvl-a.cjs → SelectFilter-CGwcKWLm.cjs} +1 -1
- package/dist/{SelectFilter-xqiPtPgX.js → SelectFilter-l4QnRcuk.js} +2 -2
- package/dist/{TextFilter-CCfYFl5F.cjs → TextFilter-B8nf7xoK.cjs} +1 -1
- package/dist/{TextFilter-BBl3JFqK.js → TextFilter-C9hj6Qrp.js} +1 -1
- package/dist/apLightTheme-CEK4iY3f.cjs +1 -0
- package/dist/{apLightTheme-D1P4jcD0.js → apLightTheme-DnIM24Lv.js} +441 -722
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +10 -6
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +3 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +4 -4
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4 -24
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +2 -12
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +1 -6
- package/dist/components/DatePicker/composables/useDatePickerState.d.ts +1 -0
- package/dist/components/FileList/FileList.d.ts +6 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +13 -13
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
- package/dist/components/MonthPicker/MonthPicker.d.ts +1 -6
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +1 -6
- package/dist/components/NirField/NirField.d.ts +4 -16
- package/dist/components/PeriodField/PeriodField.d.ts +8 -48
- package/dist/components/PhoneField/PhoneField.d.ts +1 -6
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +1 -0
- package/dist/components/Tables/SyTable/SyTable.d.ts +1 -0
- package/dist/components/Tables/common/SyTablePagination.d.ts +2 -0
- package/dist/components/Tables/common/TableHeader.d.ts +5 -0
- package/dist/components/Tables/common/locales.d.ts +3 -0
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +1 -0
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
- package/dist/composables/validation/useValidation.d.ts +5 -1
- package/dist/design-system-v3.js +2 -2
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
- package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
- package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
- package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/baseColors.d.ts +127 -0
- package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
- package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
- package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
- package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
- package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
- package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
- package/dist/designTokens/utils/index.d.ts +2 -2
- package/dist/main-ByDPHpae.cjs +1067 -0
- package/dist/main-Cpx8Co6H.js +38869 -0
- package/dist/synapse.css +1 -1
- package/dist/utils/functions/classToHex.d.ts +1 -1
- package/dist/utils/functions/createHexResolver.d.ts +16 -0
- package/dist/vuetifyConfig.js +113 -152
- package/dist/vuetifyConfig.umd.cjs +1 -1
- package/package.json +29 -18
- package/src/assets/amelipro/apTokens2026.scss +5 -5
- package/src/assets/overrides/_breakpoints.scss +25 -0
- package/src/assets/overrides/_btns.scss +0 -2
- package/src/assets/overrides/_forms.scss +1 -3
- package/src/assets/overrides/_icons.scss +7 -11
- package/src/assets/overrides/_otp.scss +41 -0
- package/src/assets/overrides/_tables.scss +11 -20
- package/src/assets/overrides/_tooltips.scss +17 -7
- package/src/assets/overrides/_typography.scss +35 -37
- package/src/assets/overrides/_utilities.scss +43 -47
- package/src/assets/themes.scss +1 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
- package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
- package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
- package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
- package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
- package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
- package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
- package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
- package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
- package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
- package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
- package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
- package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
- package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
- package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
- package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
- package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
- package/src/components/Captcha/Captcha.vue +1 -3
- package/src/components/ChipList/ChipList.vue +14 -16
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +0 -2
- package/src/components/CopyBtn/CopyBtn.vue +1 -3
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +7 -3
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +66 -0
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +4 -6
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +1 -39
- package/src/components/Customs/Selects/SySelect/SySelect.vue +263 -63
- package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +35 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +29 -0
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +18 -3
- package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
- package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +32 -33
- package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
- package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +21 -41
- package/src/components/Customs/SyTextField/SyTextField.vue +4 -6
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +12 -14
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +20 -16
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +23 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +8 -10
- package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
- package/src/components/DatePicker/composables/useDatePickerState.ts +24 -0
- package/src/components/DatePicker/composables/useDateTextField.ts +0 -1
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
- package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
- package/src/components/DialogBox/DialogBox.vue +3 -5
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
- package/src/components/FileList/FileList.vue +9 -2
- package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
- package/src/components/FileList/tests/FileList.spec.ts +47 -0
- package/src/components/FileUpload/FileUpload.vue +3 -5
- package/src/components/FileUpload/FileUploadContent.vue +3 -5
- package/src/components/FilterInline/FilterInline.vue +1 -3
- package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +7 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
- package/src/components/FooterBar/FooterBar.vue +9 -13
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
- package/src/components/HeaderBar/HeaderBar.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
- package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
- package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
- package/src/components/LangBtn/LangBtn.vue +2 -4
- package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
- package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
- package/src/components/NirField/NirField.stories.ts +2 -2
- package/src/components/NirField/NirField.vue +3 -5
- package/src/components/NirField/accessibilite/Accessibility.mdx +100 -5
- package/src/components/NirField/tests/NirField.spec.ts +118 -0
- package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
- package/src/components/NirField/useNirValidation.ts +38 -32
- package/src/components/NotificationBar/Notification/Notification.vue +5 -7
- package/src/components/NotificationBar/NotificationBar.vue +1 -3
- package/src/components/PaginatedTable/PaginatedTable.vue +2 -3
- package/src/components/PaginatedTable/Pagination.vue +3 -5
- package/src/components/PasswordField/PasswordField.vue +8 -10
- package/src/components/PhoneField/PhoneField.vue +3 -3
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +0 -2
- package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
- package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +6 -8
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +3 -5
- package/src/components/SearchListField/SearchListField.vue +0 -2
- package/src/components/SkipLink/SkipLink.vue +2 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/SyAlert/SyAlert.vue +7 -9
- package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
- package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
- package/src/components/TableToolbar/TableToolbar.vue +6 -8
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +166 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +9 -7
- package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +23 -0
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +268 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +104 -0
- package/src/components/Tables/SyTable/SyTable.vue +9 -7
- package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +22 -0
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +274 -0
- package/src/components/Tables/common/SyTableFilter.vue +27 -2
- package/src/components/Tables/common/SyTablePagination.vue +142 -19
- package/src/components/Tables/common/TableHeader.vue +40 -3
- package/src/components/Tables/common/filters/SelectFilter.vue +1 -1
- package/src/components/Tables/common/locales.ts +3 -0
- package/src/components/Tables/common/tableStyles.scss +16 -19
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
- package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
- package/src/components/Tables/common/types.ts +2 -0
- package/src/components/Tables/common/useTableHeaders.ts +49 -27
- package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
- package/src/components/UploadWorkflow/useFileList.ts +3 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
- package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
- package/src/composables/validation/useValidation.ts +17 -1
- package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
- package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
- package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
- package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
- package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
- package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
- package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
- package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
- package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
- package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
- package/src/designTokens/tests/themeUtils.spec.ts +53 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
- package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
- package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
- package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -1
- package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
- package/src/designTokens/tokens/baseColors.ts +129 -0
- package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
- package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
- package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +1 -1
- package/src/designTokens/tokens/pa/paColors.ts +2 -166
- package/src/designTokens/tokens/pa/paContextual.ts +3 -48
- package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
- package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
- package/src/designTokens/utils/buildColorClassMap.ts +34 -0
- package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
- package/src/designTokens/utils/createFlattenTheme.ts +15 -7
- package/src/designTokens/utils/index.ts +2 -2
- package/src/stories/Accessibilite/AuditDesignSystem.mdx +0 -11
- package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
- package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +8 -1
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +51 -10
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +16 -9
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +48 -58
- package/src/stories/Components/Components.stories.ts +40 -1
- package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
- package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
- package/src/stories/Demarrer/Releases.stories.ts +48 -5
- package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
- package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
- package/src/stories/DesignTokens/colors.stories.ts +5 -6
- package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
- package/src/stories/GuideDuDev/Theme.mdx +36 -26
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
- package/src/stories/styles/accessibility-guide.css +3 -3
- package/src/utils/functions/classToHex.ts +6 -34
- package/src/utils/functions/createHexResolver.ts +45 -0
- package/src/utils/functions/tests/classToHex.spec.ts +36 -0
- package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
- package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
- package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
- package/dist/apLightTheme-CFSRrjv2.cjs +0 -1
- package/dist/designTokens/utils/convertGaps.d.ts +0 -5
- package/dist/main-BtTqyn4z.js +0 -38648
- package/dist/main-C1e3eoxd.cjs +0 -1067
- package/src/assets/apTokens.scss +0 -343
- package/src/assets/overrides/_container.scss +0 -36
- package/src/assets/tokens.scss +0 -388
- package/src/designTokens/apColors.md +0 -66
- package/src/designTokens/cnamColors.md +0 -193
- package/src/designTokens/paColors.md +0 -66
- package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
- package/src/designTokens/tokens/json/primitives.json +0 -209
- package/src/designTokens/tokens/json/semantic.json +0 -120
- package/src/designTokens/utils/convertGaps.ts +0 -11
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
|
@@ -1,274 +1,204 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, Primary } from '@storybook/blocks';
|
|
2
2
|
import * as Stories from '../SySelect.stories.ts';
|
|
3
3
|
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
AccessibilityGuideLayout,
|
|
6
|
+
CriteriaSection,
|
|
7
|
+
CriteriaCard,
|
|
8
|
+
DemoSection,
|
|
9
|
+
BestPracticesSection,
|
|
10
|
+
ResourcesSection,
|
|
11
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
|
|
5
12
|
|
|
6
13
|
<Meta of={Stories} />
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
</
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
.keyboard-section h2,
|
|
199
|
-
.implementation-section h2 {
|
|
200
|
-
border-bottom: 2px solid #eaecef;
|
|
201
|
-
padding-bottom: 10px;
|
|
202
|
-
margin-top: 30px;
|
|
203
|
-
margin-bottom: 20px;
|
|
204
|
-
color: #0077cc;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.criteria-card {
|
|
208
|
-
background-color: #fff;
|
|
209
|
-
border-radius: 8px;
|
|
210
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
211
|
-
padding: 20px;
|
|
212
|
-
margin-bottom: 20px;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.criteria-header {
|
|
216
|
-
display: flex;
|
|
217
|
-
align-items: center;
|
|
218
|
-
margin-bottom: 15px;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.criteria-icon {
|
|
222
|
-
font-size: 1.8em;
|
|
223
|
-
margin-right: 15px;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.criteria-header h3 {
|
|
227
|
-
margin: 0;
|
|
228
|
-
font-size: 1.3em;
|
|
229
|
-
color: #0077cc;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.criteria-card ul {
|
|
233
|
-
margin: 0;
|
|
234
|
-
padding-left: 20px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.criteria-card li {
|
|
238
|
-
margin-bottom: 8px;
|
|
239
|
-
line-height: 1.5;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.keyboard-section {
|
|
243
|
-
background-color: #f0f7ff;
|
|
244
|
-
padding: 20px;
|
|
245
|
-
border-radius: 8px;
|
|
246
|
-
margin-bottom: 30px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.implementation-section {
|
|
250
|
-
background-color: #f5f5f5;
|
|
251
|
-
padding: 20px;
|
|
252
|
-
border-radius: 8px;
|
|
253
|
-
margin-bottom: 30px;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.implementation-section ul {
|
|
257
|
-
padding-left: 20px;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.implementation-section li {
|
|
261
|
-
margin-bottom: 10px;
|
|
262
|
-
line-height: 1.5;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
code {
|
|
266
|
-
background-color: #f0f0f0;
|
|
267
|
-
padding: 2px 5px;
|
|
268
|
-
border-radius: 3px;
|
|
269
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
270
|
-
font-size: 0.9em;
|
|
271
|
-
}
|
|
272
|
-
`
|
|
273
|
-
}
|
|
274
|
-
</style>
|
|
15
|
+
<AccessibilityGuideLayout
|
|
16
|
+
componentName="SySelect"
|
|
17
|
+
iconSrc={AccessibilityIcon}
|
|
18
|
+
apgHref="https://www.w3.org/WAI/ARIA/apg/patterns/combobox/"
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
<div class="mt-8">
|
|
22
|
+
<p>Rapport d’audit manuel : <a href="/audits/SySelect.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
23
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/787" target="_blank" style={{color:'#0C41BD'}}>issue #787</a>), (<a href="https://github.com/assurance-maladie-digital/design-system/issues/4028" target="_blank" style={{color:'#0C41BD'}}>issue #931</a>)</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<CriteriaSection>
|
|
27
|
+
<CriteriaCard icon="☑️" title="Accessibilité et Multi-sélection">
|
|
28
|
+
<p>
|
|
29
|
+
Afin de respecter les directives du <abbr title="Référentiel Général d’Amélioration de l’Accessibilité">RGAA</abbr>, le composant <code>SySelect</code> implémente rigoureusement le pattern WAI-ARIA <code>combobox</code> associé à une <code>listbox</code>.
|
|
30
|
+
</p>
|
|
31
|
+
<p>
|
|
32
|
+
En mode <strong>sélection multiple</strong>, des cases à cocher sont affichées à côté de chaque option pour faciliter la compréhension visuelle. Cependant, les règles d'accessibilité interdisent l'imbrication d'éléments interactifs (comme placer un véritable <code><input type="checkbox"></code> à l'intérieur d'un élément <code><div role="option"></code>).
|
|
33
|
+
</p>
|
|
34
|
+
<p>
|
|
35
|
+
Pour résoudre ce problème, <code>SySelect</code> utilise la propriété <code>decorative</code> du composant <code>SyCheckbox</code>. La case à cocher devient alors purement visuelle et est ignorée par les lecteurs d'écran (<code>aria-hidden="true"</code>). C'est le conteneur de l'option (<code>role="option"</code>) qui se charge de communiquer l'état de sélection de manière standardisée via l'attribut <code>aria-selected="true|false"</code>. Cela garantit une navigation au clavier fluide et une restitution vocale sans erreur.
|
|
36
|
+
</p>
|
|
37
|
+
</CriteriaCard>
|
|
38
|
+
|
|
39
|
+
<CriteriaCard icon="🔍" title="Nom accessible, rôle et associations programmatiques">
|
|
40
|
+
<ul>
|
|
41
|
+
<li>
|
|
42
|
+
<strong>Nom accessible du champ</strong> : le composant calcule un nom
|
|
43
|
+
accessible robuste en priorisant <code>aria-label</code>, puis le
|
|
44
|
+
<code>label</code>, puis le texte d’aide.
|
|
45
|
+
</li>
|
|
46
|
+
<li>
|
|
47
|
+
<strong>Gestion du libellé</strong> : le champ conserve un libellé visible via
|
|
48
|
+
la prop <code>label</code>, avec gestion optionnelle de l’astérisque pour les
|
|
49
|
+
champs requis.
|
|
50
|
+
</li>
|
|
51
|
+
<li>
|
|
52
|
+
<strong>Rôle du composant</strong> : l’input exposé par le composant reçoit
|
|
53
|
+
le rôle <code>combobox</code> avec les états et propriétés associés
|
|
54
|
+
(<code>aria-expanded</code>, <code>aria-controls</code>,
|
|
55
|
+
<code>aria-activedescendant</code>, <code>aria-autocomplete</code>).
|
|
56
|
+
</li>
|
|
57
|
+
<li>
|
|
58
|
+
<strong>Popup nommée</strong> : la liste déroulante est exposée avec le rôle
|
|
59
|
+
<code>grid</code> et associée à un libellé caché via
|
|
60
|
+
<code>aria-labelledby</code>.
|
|
61
|
+
</li>
|
|
62
|
+
<li>
|
|
63
|
+
<strong>Descriptions associées</strong> : le composant construit
|
|
64
|
+
dynamiquement <code>aria-describedby</code> pour relier le champ au texte
|
|
65
|
+
d’aide, aux messages et à la zone de statut selon le contexte.
|
|
66
|
+
</li>
|
|
67
|
+
</ul>
|
|
68
|
+
</CriteriaCard>
|
|
69
|
+
|
|
70
|
+
<CriteriaCard icon="⌨️" title="Navigation clavier et gestion du focus">
|
|
71
|
+
<ul>
|
|
72
|
+
<li>
|
|
73
|
+
<strong>Ouverture et navigation</strong> : la navigation clavier est gérée sur
|
|
74
|
+
le champ avec <kbd>Entrée</kbd>, <kbd>Espace</kbd>, <kbd>Flèche bas</kbd>,
|
|
75
|
+
<kbd>Flèche haut</kbd>, <kbd>Home</kbd>, <kbd>End</kbd>,
|
|
76
|
+
<kbd>Page Up</kbd>, <kbd>Page Down</kbd>, <kbd>Tab</kbd> et
|
|
77
|
+
<kbd>Échap</kbd>.
|
|
78
|
+
</li>
|
|
79
|
+
<li>
|
|
80
|
+
<strong>Focus DOM conservé sur le champ</strong> : le focus reste sur l’input
|
|
81
|
+
et l’option active est exposée via <code>aria-activedescendant</code>.
|
|
82
|
+
</li>
|
|
83
|
+
<li>
|
|
84
|
+
<strong>Focus visible</strong> : un style de focus spécifique est prévu pour
|
|
85
|
+
les éléments interactifs et pour les lignes actives de la liste.
|
|
86
|
+
</li>
|
|
87
|
+
<li>
|
|
88
|
+
<strong>Pas de suppression arbitraire du focus</strong> : à la fermeture, le
|
|
89
|
+
composant peut restaurer le focus sur l’input afin de conserver un parcours
|
|
90
|
+
clavier cohérent.
|
|
91
|
+
</li>
|
|
92
|
+
<li>
|
|
93
|
+
<strong>Bouton de réinitialisation</strong> : le bouton de suppression de la
|
|
94
|
+
sélection est un vrai <code>button</code>, actionnable à la souris, à
|
|
95
|
+
<kbd>Entrée</kbd> et à <kbd>Espace</kbd>, avec un libellé accessible.
|
|
96
|
+
</li>
|
|
97
|
+
</ul>
|
|
98
|
+
</CriteriaCard>
|
|
99
|
+
|
|
100
|
+
<CriteriaCard icon="🧾" title="États, erreurs et aide à la saisie">
|
|
101
|
+
<ul>
|
|
102
|
+
<li>
|
|
103
|
+
<strong>Champ requis</strong> : le composant expose <code>aria-required</code>
|
|
104
|
+
lorsque cela est nécessaire.
|
|
105
|
+
</li>
|
|
106
|
+
<li>
|
|
107
|
+
<strong>Champ invalide</strong> : le composant expose
|
|
108
|
+
<code>aria-invalid="true"</code> lorsque la validation échoue ou lorsque des
|
|
109
|
+
messages d’erreur sont présents.
|
|
110
|
+
</li>
|
|
111
|
+
<li>
|
|
112
|
+
<strong>Messages associés</strong> : les messages d’erreur et le texte d’aide
|
|
113
|
+
sont liés au champ par des identifiants dédiés.
|
|
114
|
+
</li>
|
|
115
|
+
<li>
|
|
116
|
+
<strong>Annonce dynamique</strong> : une zone de statut en
|
|
117
|
+
<code>aria-live="polite"</code> et <code>aria-atomic="true"</code> est
|
|
118
|
+
prévue pour annoncer les erreurs.
|
|
119
|
+
</li>
|
|
120
|
+
<li>
|
|
121
|
+
<strong>Indications visibles</strong> : le texte d’aide peut être affiché
|
|
122
|
+
dans la zone de message ou sous le champ selon l’état du composant.
|
|
123
|
+
</li>
|
|
124
|
+
</ul>
|
|
125
|
+
</CriteriaCard>
|
|
126
|
+
|
|
127
|
+
<CriteriaCard icon="✅" title="Sélection simple, multiple et commandes associées">
|
|
128
|
+
<ul>
|
|
129
|
+
<li>
|
|
130
|
+
<strong>Sélection simple</strong> : la sélection d’une option met à jour la
|
|
131
|
+
valeur puis referme la liste.
|
|
132
|
+
</li>
|
|
133
|
+
<li>
|
|
134
|
+
<strong>Sélection multiple</strong> : le composant permet de conserver la
|
|
135
|
+
liste ouverte pendant la sélection de plusieurs options.
|
|
136
|
+
</li>
|
|
137
|
+
<li>
|
|
138
|
+
<strong>Restitution des sélections</strong> : les valeurs sélectionnées sont
|
|
139
|
+
affichées soit sous forme de texte, soit sous forme de <em>chips</em>.
|
|
140
|
+
</li>
|
|
141
|
+
<li>
|
|
142
|
+
<strong>Suppression d’une sélection</strong> : chaque <em>chip</em> peut être
|
|
143
|
+
retirée via son contrôle de fermeture avec un libellé dédié.
|
|
144
|
+
</li>
|
|
145
|
+
<li>
|
|
146
|
+
<strong>Cas particulier de l’option par défaut</strong> : une option
|
|
147
|
+
placeholder de type « choisir / sélectionner » est traitée spécifiquement
|
|
148
|
+
pour éviter une sélection non pertinente.
|
|
149
|
+
</li>
|
|
150
|
+
</ul>
|
|
151
|
+
</CriteriaCard>
|
|
152
|
+
</CriteriaSection>
|
|
153
|
+
|
|
154
|
+
<DemoSection componentName="SySelect">
|
|
155
|
+
<Primary />
|
|
156
|
+
</DemoSection>
|
|
157
|
+
|
|
158
|
+
<BestPracticesSection>
|
|
159
|
+
<ul>
|
|
160
|
+
<li>
|
|
161
|
+
<strong>Conserver un libellé visible pertinent</strong> : utilisez un
|
|
162
|
+
<code>label</code> explicite décrivant clairement la donnée attendue.
|
|
163
|
+
</li>
|
|
164
|
+
<li>
|
|
165
|
+
<strong>Ne pas s’appuyer uniquement sur un placeholder</strong> : le nom du
|
|
166
|
+
champ doit rester disponible même lorsque la valeur change.
|
|
167
|
+
</li>
|
|
168
|
+
<li>
|
|
169
|
+
<strong>Afficher les indications utiles avant validation</strong> : pour un
|
|
170
|
+
champ obligatoire ou avec format attendu, affichez l’information dans le
|
|
171
|
+
libellé ou le texte associé.
|
|
172
|
+
</li>
|
|
173
|
+
<li>
|
|
174
|
+
<strong>Rédiger des messages d’erreur explicites</strong> : les messages
|
|
175
|
+
doivent identifier le champ concerné et, si nécessaire, suggérer le format ou
|
|
176
|
+
un exemple de valeur attendue.
|
|
177
|
+
</li>
|
|
178
|
+
<li>
|
|
179
|
+
<strong>Vérifier manuellement la restitution</strong> : pour un composant piloté
|
|
180
|
+
par script, testez la restitution avec les technologies d’assistance de la
|
|
181
|
+
base de référence, et pas uniquement avec l’inspection DOM.
|
|
182
|
+
</li>
|
|
183
|
+
<li>
|
|
184
|
+
<strong>Surveiller les contenus HTML autorisés</strong> : lorsque
|
|
185
|
+
<code>allowHtml</code> est activé, vérifier que le contenu injecté reste
|
|
186
|
+
compréhensible, lisible et compatible avec les technologies d’assistance.
|
|
187
|
+
</li>
|
|
188
|
+
<li>
|
|
189
|
+
<strong>Préserver l’ordre de tabulation</strong> : l’ouverture, la fermeture,
|
|
190
|
+
la sélection multiple et la suppression de sélection ne doivent pas créer de
|
|
191
|
+
rupture dans le parcours clavier.
|
|
192
|
+
</li>
|
|
193
|
+
</ul>
|
|
194
|
+
</BestPracticesSection>
|
|
195
|
+
|
|
196
|
+
<ResourcesSection>
|
|
197
|
+
<ul>
|
|
198
|
+
<li><a href="https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/" target="_blank" rel="noopener noreferrer">RGAA 4.1 — Critères et tests</a></li>
|
|
199
|
+
<li><a href="https://accessibilite.numerique.gouv.fr/doc/RGAA-v4.1.pdf" target="_blank" rel="noopener noreferrer">RGAA 4.1 — Référentiel technique (PDF)</a></li>
|
|
200
|
+
<li><a href="https://www.w3.org/WAI/ARIA/apg/patterns/combobox/" target="_blank" rel="noopener noreferrer">WAI-ARIA Authoring Practices — Combobox pattern</a></li>
|
|
201
|
+
<li><a href="https://www.w3.org/TR/wai-aria-1.2/#combobox" target="_blank" rel="noopener noreferrer">WAI-ARIA 1.2 — Combobox role</a></li>
|
|
202
|
+
</ul>
|
|
203
|
+
</ResourcesSection>
|
|
204
|
+
</AccessibilityGuideLayout>
|
|
@@ -487,6 +487,41 @@ describe('SySelect.vue', () => {
|
|
|
487
487
|
wrapper.unmount()
|
|
488
488
|
})
|
|
489
489
|
|
|
490
|
+
it('n\'affiche pas d\'erreur à l\'ouverture du menu mais seulement à la fermeture', async () => {
|
|
491
|
+
const wrapper = mount(SySelect, {
|
|
492
|
+
props: {
|
|
493
|
+
required: true,
|
|
494
|
+
label: 'Test Label',
|
|
495
|
+
modelValue: undefined,
|
|
496
|
+
items: [
|
|
497
|
+
{ text: 'Option 1', value: '1' },
|
|
498
|
+
{ text: 'Option 2', value: '2' },
|
|
499
|
+
],
|
|
500
|
+
},
|
|
501
|
+
attachTo: document.body,
|
|
502
|
+
})
|
|
503
|
+
|
|
504
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
505
|
+
const instance = wrapper.vm as any
|
|
506
|
+
|
|
507
|
+
// Au départ, pas d'erreur
|
|
508
|
+
expect(instance.hasError).toBe(false)
|
|
509
|
+
|
|
510
|
+
// Ouverture du menu - l'erreur ne doit pas s'afficher
|
|
511
|
+
await wrapper.find('.v-field').trigger('click')
|
|
512
|
+
await wrapper.vm.$nextTick()
|
|
513
|
+
expect(instance.hasError).toBe(false)
|
|
514
|
+
expect(instance.isOpen).toBe(true)
|
|
515
|
+
|
|
516
|
+
// Fermeture du menu sans sélection - l'erreur doit s'afficher
|
|
517
|
+
await wrapper.find('.v-field').trigger('click')
|
|
518
|
+
await wrapper.vm.$nextTick()
|
|
519
|
+
expect(instance.hasError).toBe(true)
|
|
520
|
+
expect(instance.isOpen).toBe(false)
|
|
521
|
+
|
|
522
|
+
wrapper.unmount()
|
|
523
|
+
})
|
|
524
|
+
|
|
490
525
|
it('n\'affiche pas d\'erreur quand disableErrorHandling est true', async () => {
|
|
491
526
|
const wrapper = mount(SySelect, {
|
|
492
527
|
props: {
|
|
@@ -51,4 +51,9 @@ La propriété `controlsIds` permet d'établir une relation entre une case à co
|
|
|
51
51
|
|
|
52
52
|
<Canvas of={SyCheckboxStories.WithControlsIds} />
|
|
53
53
|
|
|
54
|
+
## Mode Décoratif
|
|
55
|
+
|
|
56
|
+
La propriété `decorative` permet d'afficher la case à cocher uniquement de manière visuelle, sans rendre l'élément interactif natif (`<input type="checkbox">`) dans le DOM.
|
|
57
|
+
Ce mode est essentiel lorsque la case à cocher est imbriquée à l'intérieur d'un autre élément interactif (comme une ligne d'un tableau cliquable ou une option de liste déroulante). Il permet de respecter les règles d'accessibilité (qui interdisent l'imbrication de contrôles interactifs) tout en offrant le rendu visuel attendu. Le composant parent devient alors responsable de l'annonce de l'état (ex: via `aria-selected`).
|
|
58
|
+
|
|
54
59
|
<a href="/?path=/docs/guide-du-dev-guide-de-validation-des-formulaires--docs" className="action-link">Pour plus d'informations sur la validation, consultez le guide de validation des formulaires.</a>
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
falseValue?: unknown
|
|
37
37
|
controlsIds?: string[]
|
|
38
38
|
displayAsterisk?: boolean
|
|
39
|
+
decorative?: boolean
|
|
39
40
|
}>(),
|
|
40
41
|
{
|
|
41
42
|
modelValue: false,
|
|
@@ -66,11 +67,15 @@
|
|
|
66
67
|
falseValue: () => false,
|
|
67
68
|
controlsIds: () => [],
|
|
68
69
|
displayAsterisk: false,
|
|
70
|
+
decorative: false,
|
|
69
71
|
},
|
|
70
72
|
)
|
|
71
73
|
|
|
72
74
|
const emit = defineEmits(['update:modelValue', 'update:indeterminate', 'change'])
|
|
73
75
|
|
|
76
|
+
import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
|
|
77
|
+
import { mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiMinusBox } from '@mdi/js'
|
|
78
|
+
|
|
74
79
|
const checkboxRef = ref<VCheckbox | null>(null)
|
|
75
80
|
|
|
76
81
|
const internalIndeterminate = ref(props.indeterminate)
|
|
@@ -308,7 +313,31 @@
|
|
|
308
313
|
|
|
309
314
|
<template>
|
|
310
315
|
<div>
|
|
316
|
+
<!-- Rendu purement visuel/décoratif, ignoré par les lecteurs d'écran -->
|
|
317
|
+
<div
|
|
318
|
+
v-if="props.decorative"
|
|
319
|
+
class="d-flex align-center pointer-events-none sy-checkbox-decorative"
|
|
320
|
+
aria-hidden="true"
|
|
321
|
+
>
|
|
322
|
+
<SyIcon
|
|
323
|
+
:icon="internalIndeterminate ? mdiMinusBox : (model ? mdiCheckboxMarked : mdiCheckboxBlankOutline)"
|
|
324
|
+
:color="(model || internalIndeterminate) ? props.color : '#727273'"
|
|
325
|
+
:class="{'text-disabled': props.disabled}"
|
|
326
|
+
:decorative="true"
|
|
327
|
+
class="mr-2"
|
|
328
|
+
/>
|
|
329
|
+
<slot name="label">
|
|
330
|
+
<span
|
|
331
|
+
v-if="generatedLabel"
|
|
332
|
+
:class="{'text-disabled': props.disabled}"
|
|
333
|
+
:style="{ color: labelColor }"
|
|
334
|
+
>{{ generatedLabel }}</span>
|
|
335
|
+
</slot>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<!-- Rendu interactif standard -->
|
|
311
339
|
<VCheckbox
|
|
340
|
+
v-else
|
|
312
341
|
:id="props.id"
|
|
313
342
|
ref="checkboxRef"
|
|
314
343
|
v-model="model"
|
|
@@ -143,7 +143,19 @@ import '@/stories/styles/shared.css';
|
|
|
143
143
|
<p>
|
|
144
144
|
Cette relation est établie via la propriété <code>controlsIds</code> qui liste les identifiants des cases à cocher enfants.
|
|
145
145
|
</p>
|
|
146
|
-
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div className="decorative-mode-section">
|
|
149
|
+
<h2>Mode Décoratif (Imbrication)</h2>
|
|
150
|
+
<p>
|
|
151
|
+
Le composant SyCheckbox dispose d'une propriété <code>decorative</code> permettant de l'utiliser de manière purement visuelle.
|
|
152
|
+
Dans ce mode, la case à cocher n'inclut pas d'élément <code><input type="checkbox"></code> natif et est masquée aux lecteurs d'écran via <code>aria-hidden="true"</code>.
|
|
153
|
+
</p>
|
|
154
|
+
<p>
|
|
155
|
+
Ce mode est <strong>indispensable pour respecter l'accessibilité</strong> lorsque la case à cocher doit être imbriquée dans un autre composant interactif (par exemple, une option de <code>listbox</code> ou une ligne cliquable de tableau).
|
|
156
|
+
Les règles WAI-ARIA interdisent l'imbrication d'éléments interactifs. Le composant parent assume alors la responsabilité d'annoncer l'état de sélection (ex: via <code>aria-selected</code> ou <code>aria-checked</code> au niveau de la ligne).
|
|
157
|
+
</p>
|
|
158
|
+
</div>
|
|
147
159
|
|
|
148
160
|
<div className="best-practices">
|
|
149
161
|
<h2>Bonnes pratiques d'utilisation</h2>
|
|
@@ -210,6 +222,7 @@ import '@/stories/styles/shared.css';
|
|
|
210
222
|
.aria-management-section h2,
|
|
211
223
|
.tri-state-section h2,
|
|
212
224
|
.parent-child-section h2,
|
|
225
|
+
.decorative-mode-section h2,
|
|
213
226
|
.best-practices h2,
|
|
214
227
|
.resources-section h2 {
|
|
215
228
|
border-bottom: 2px solid #eaecef;
|
|
@@ -279,7 +292,8 @@ import '@/stories/styles/shared.css';
|
|
|
279
292
|
}
|
|
280
293
|
|
|
281
294
|
.tri-state-section,
|
|
282
|
-
.parent-child-section
|
|
295
|
+
.parent-child-section,
|
|
296
|
+
.decorative-mode-section {
|
|
283
297
|
background-color: #f0f7ff;
|
|
284
298
|
padding: 20px;
|
|
285
299
|
border-radius: 8px;
|
|
@@ -287,7 +301,8 @@ import '@/stories/styles/shared.css';
|
|
|
287
301
|
}
|
|
288
302
|
|
|
289
303
|
.tri-state-section p,
|
|
290
|
-
.parent-child-section p
|
|
304
|
+
.parent-child-section p,
|
|
305
|
+
.decorative-mode-section p {
|
|
291
306
|
line-height: 1.6;
|
|
292
307
|
}
|
|
293
308
|
|