@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
inheritAttrs: false,
|
|
5
5
|
})
|
|
6
6
|
import { mdiAlertCircle, mdiAlertOutline, mdiCheck, mdiChevronDown, mdiClose, mdiCloseCircle, mdiInformationOutline } from '@mdi/js'
|
|
7
|
-
import { ref, watch, watchEffect, onMounted, onBeforeUnmount, computed, nextTick, type PropType } from 'vue'
|
|
7
|
+
import { ref, watch, watchEffect, onMounted, onBeforeUnmount, computed, nextTick, useAttrs, type PropType } from 'vue'
|
|
8
8
|
import { useSySelectKeyboard } from './composables/useSySelectKeyboard'
|
|
9
9
|
import { useValidatable } from '@/composables/validation/useValidatable'
|
|
10
10
|
import type { ColorType, IconType, VariantStyle } from '@/types/vuetifyTypes'
|
|
@@ -164,6 +164,9 @@
|
|
|
164
164
|
},
|
|
165
165
|
})
|
|
166
166
|
|
|
167
|
+
// pr récupérer proprement aria-label
|
|
168
|
+
const attrs = useAttrs()
|
|
169
|
+
|
|
167
170
|
const ICONS: Record<NonNullable<IconType>, string> = {
|
|
168
171
|
info: mdiInformationOutline,
|
|
169
172
|
success: mdiCheck,
|
|
@@ -192,8 +195,8 @@
|
|
|
192
195
|
const disableClickButton = computed(() => props.disableClickButton)
|
|
193
196
|
|
|
194
197
|
const iconColor = computed(() => {
|
|
195
|
-
if (hasError.value ||
|
|
196
|
-
return 'rgb(var(--v-theme-iconBase))
|
|
198
|
+
if (hasError.value || props.errorMessages.length > 0) return 'error'
|
|
199
|
+
return 'rgb(var(--v-theme-iconBase))'
|
|
197
200
|
})
|
|
198
201
|
|
|
199
202
|
const variant = computed(() => {
|
|
@@ -256,9 +259,37 @@
|
|
|
256
259
|
menuMinWidth.value = (controlEl ?? el).offsetWidth
|
|
257
260
|
}
|
|
258
261
|
const inputId = ref(`sy-select-${Math.random().toString(36).substring(7)}`)
|
|
262
|
+
// text d'aide
|
|
263
|
+
const helpTextId = computed(() => `${inputId.value}-help`)
|
|
264
|
+
// messages d'erreur, success avertissement
|
|
265
|
+
const messagesId = computed(() => `${inputId.value}-messages`)
|
|
266
|
+
// live region pour le lecteur ecran
|
|
267
|
+
const liveRegionId = computed(() => `${inputId.value}-live`)
|
|
268
|
+
// un libellé caché pour la popup/grid
|
|
269
|
+
const overlayLabelId = computed(() => `${inputId.value}-overlay-label`)
|
|
270
|
+
|
|
259
271
|
// Generate unique menu ID for each component instance to avoid conflicts and validation issues
|
|
260
272
|
const uniqueMenuId = ref(props.menuId === 'sy-select-menu' ? `sy-select-menu-${Math.random().toString(36).substring(7)}` : props.menuId)
|
|
261
273
|
|
|
274
|
+
const rawAriaLabel = computed(() => {
|
|
275
|
+
const ariaLabel = attrs['aria-label']
|
|
276
|
+
return typeof ariaLabel === 'string' && ariaLabel.trim().length > 0 ? ariaLabel.trim() : ''
|
|
277
|
+
})
|
|
278
|
+
|
|
279
|
+
// met en place un fallback robuste du nom accessible :
|
|
280
|
+
const accessibleLabel = computed(() => {
|
|
281
|
+
// si aria-label existant
|
|
282
|
+
if (rawAriaLabel.value) return rawAriaLabel.value
|
|
283
|
+
|
|
284
|
+
// return label
|
|
285
|
+
if (props.label?.trim()) return labelWithAsterisk.value
|
|
286
|
+
|
|
287
|
+
// message d'aide si aucun label fourni
|
|
288
|
+
if (typeof props.helpText === 'string' && props.helpText.trim()) return props.helpText.trim()
|
|
289
|
+
|
|
290
|
+
return 'Selectionnez une option'
|
|
291
|
+
})
|
|
292
|
+
|
|
262
293
|
const selectItem = (item: ItemType | null | undefined, event?: Event) => {
|
|
263
294
|
// Prevent default action if event is provided
|
|
264
295
|
event?.preventDefault()
|
|
@@ -511,6 +542,26 @@
|
|
|
511
542
|
return props.helpText && hasMessages.value && !props.hideMessages
|
|
512
543
|
})
|
|
513
544
|
|
|
545
|
+
// Ici on calcule dynamiquement la liste des ids à rattacher à l'input :
|
|
546
|
+
const describedByIds = computed(() => {
|
|
547
|
+
const ids: string[] = []
|
|
548
|
+
|
|
549
|
+
// help text / hint
|
|
550
|
+
if ((showHelpTextAsMessage.value || showHelpTextBelow.value) && props.helpText) {
|
|
551
|
+
ids.push(helpTextId.value)
|
|
552
|
+
}
|
|
553
|
+
// messages affichés
|
|
554
|
+
if (!props.hideMessages && hasMessages.value) {
|
|
555
|
+
ids.push(messagesId.value)
|
|
556
|
+
}
|
|
557
|
+
// live region si erreur
|
|
558
|
+
if (hasError.value || (Array.isArray(props.errorMessages) && props.errorMessages.length > 0)) {
|
|
559
|
+
ids.push(liveRegionId.value)
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
return ids.join(' ')
|
|
563
|
+
})
|
|
564
|
+
|
|
514
565
|
const calculatedWidth = computed(() => {
|
|
515
566
|
// If width prop is provided and not 'undefined', return it directly as a CSS value
|
|
516
567
|
if (props.width && props.width !== 'undefined') {
|
|
@@ -527,12 +578,28 @@
|
|
|
527
578
|
return undefined
|
|
528
579
|
})
|
|
529
580
|
|
|
581
|
+
const validationRules = computed(() => {
|
|
582
|
+
return hasError.value && !props.disableErrorHandling ? ['Le champ est requis.'] : []
|
|
583
|
+
})
|
|
584
|
+
|
|
530
585
|
const menuTarget = computed<HTMLElement | undefined>(() => {
|
|
531
586
|
const rootEl = textInput.value?.$el as HTMLElement | undefined
|
|
532
587
|
if (!rootEl) return undefined
|
|
533
588
|
return (rootEl.querySelector('.v-field') as HTMLElement | null) ?? rootEl
|
|
534
589
|
})
|
|
535
590
|
|
|
591
|
+
const formattedErrorMessages = computed(() => {
|
|
592
|
+
return Array.isArray(props.errorMessages)
|
|
593
|
+
? props.errorMessages.join(' ')
|
|
594
|
+
: props.errorMessages
|
|
595
|
+
})
|
|
596
|
+
|
|
597
|
+
const liveRegionMessage = computed(() => {
|
|
598
|
+
if (!hasError.value) return ''
|
|
599
|
+
|
|
600
|
+
return formattedErrorMessages.value || 'Le champ contient une erreur.'
|
|
601
|
+
})
|
|
602
|
+
|
|
536
603
|
watch(() => props.modelValue, (newValue) => {
|
|
537
604
|
selectedItem.value = newValue
|
|
538
605
|
})
|
|
@@ -653,18 +720,27 @@
|
|
|
653
720
|
}
|
|
654
721
|
}
|
|
655
722
|
|
|
656
|
-
watch(
|
|
723
|
+
watch(isOpen, (newIsOpen) => {
|
|
657
724
|
if (!newIsOpen) {
|
|
725
|
+
// Valider uniquement à la fermeture du menu
|
|
658
726
|
if (props.disableErrorHandling || props.readonly) {
|
|
659
727
|
hasError.value = false
|
|
660
728
|
}
|
|
661
729
|
else {
|
|
662
|
-
|
|
730
|
+
const shouldHaveError = (!selectedItem.value && isRequired.value) || props.errorMessages.length > 0
|
|
731
|
+
hasError.value = shouldHaveError
|
|
732
|
+
|
|
733
|
+
// Forcer la validation du VTextField avec nextTick pour que le DOM soit à jour
|
|
734
|
+
nextTick(() => {
|
|
735
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
736
|
+
if (textInput.value && (textInput.value as any).validate) {
|
|
737
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
738
|
+
;(textInput.value as any).validate()
|
|
739
|
+
}
|
|
740
|
+
})
|
|
663
741
|
}
|
|
664
742
|
}
|
|
665
|
-
|
|
666
|
-
hasError.value = newHasError
|
|
667
|
-
}
|
|
743
|
+
// Ne rien faire à l'ouverture pour préserver l'état actuel
|
|
668
744
|
})
|
|
669
745
|
|
|
670
746
|
watch(() => props.errorMessages, (newValue) => {
|
|
@@ -676,19 +752,35 @@
|
|
|
676
752
|
const ariaManager = {
|
|
677
753
|
cleanInputAttributes(inputElement: HTMLElement): void {
|
|
678
754
|
if (!inputElement) return
|
|
679
|
-
|
|
680
|
-
inputElement.removeAttribute('aria-describedby')
|
|
681
755
|
inputElement.removeAttribute('size')
|
|
682
756
|
inputElement.removeAttribute('tabindex')
|
|
683
757
|
inputElement.removeAttribute('aria-hidden')
|
|
758
|
+
inputElement.removeAttribute('aria-owns')
|
|
684
759
|
},
|
|
685
760
|
|
|
686
|
-
updateInputState(
|
|
761
|
+
updateInputState(
|
|
762
|
+
inputElement: HTMLElement,
|
|
763
|
+
isOpenValue: boolean,
|
|
764
|
+
menuId: string,
|
|
765
|
+
activeDescendant?: string,
|
|
766
|
+
describedBy?: string,
|
|
767
|
+
): void {
|
|
687
768
|
if (!inputElement) return
|
|
769
|
+
inputElement.removeAttribute('aria-owns')
|
|
688
770
|
|
|
689
771
|
inputElement.setAttribute('role', 'combobox')
|
|
690
772
|
inputElement.setAttribute('aria-expanded', isOpenValue ? 'true' : 'false')
|
|
691
773
|
inputElement.setAttribute('aria-haspopup', 'listbox')
|
|
774
|
+
// On ajoute aria-autocomplete="list" pour le role combobox
|
|
775
|
+
inputElement.setAttribute('aria-autocomplete', 'list')
|
|
776
|
+
|
|
777
|
+
// On rattache aria-describedby à l'input
|
|
778
|
+
if (describedBy && describedBy.trim().length > 0) {
|
|
779
|
+
inputElement.setAttribute('aria-describedby', describedBy)
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
inputElement.removeAttribute('aria-describedby')
|
|
783
|
+
}
|
|
692
784
|
|
|
693
785
|
if (isOpenValue) {
|
|
694
786
|
inputElement.setAttribute('aria-controls', menuId)
|
|
@@ -697,6 +789,7 @@
|
|
|
697
789
|
inputElement.removeAttribute('aria-controls')
|
|
698
790
|
}
|
|
699
791
|
|
|
792
|
+
// aria-activedescendant sur l'input
|
|
700
793
|
if (isOpenValue && activeDescendant) {
|
|
701
794
|
inputElement.setAttribute('aria-activedescendant', activeDescendant)
|
|
702
795
|
}
|
|
@@ -715,12 +808,7 @@
|
|
|
715
808
|
inputElement.removeAttribute('aria-required')
|
|
716
809
|
}
|
|
717
810
|
|
|
718
|
-
|
|
719
|
-
inputElement.setAttribute('aria-invalid', 'true')
|
|
720
|
-
}
|
|
721
|
-
else {
|
|
722
|
-
inputElement.removeAttribute('aria-invalid')
|
|
723
|
-
}
|
|
811
|
+
inputElement.setAttribute('aria-invalid', hasErrorValue ? 'true' : 'false')
|
|
724
812
|
},
|
|
725
813
|
|
|
726
814
|
cleanParentAttributes(parentElement: HTMLElement): void {
|
|
@@ -755,7 +843,14 @@
|
|
|
755
843
|
|
|
756
844
|
if (inputElement) {
|
|
757
845
|
ariaManager.cleanInputAttributes(inputElement)
|
|
758
|
-
ariaManager.updateInputState(
|
|
846
|
+
ariaManager.updateInputState(
|
|
847
|
+
inputElement,
|
|
848
|
+
isOpen.value,
|
|
849
|
+
uniqueMenuId.value,
|
|
850
|
+
activeDescendantId.value,
|
|
851
|
+
// On injecte ici les ids calculés pour aria-describedby,
|
|
852
|
+
describedByIds.value,
|
|
853
|
+
)
|
|
759
854
|
ariaManager.updateValidationAttributes(inputElement, Boolean(isRequired.value), Boolean(hasError.value))
|
|
760
855
|
}
|
|
761
856
|
|
|
@@ -788,11 +883,19 @@
|
|
|
788
883
|
})
|
|
789
884
|
})
|
|
790
885
|
|
|
791
|
-
watch(isOpen, () => {
|
|
792
|
-
nextTick(
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
886
|
+
watch(isOpen, async (newValue) => {
|
|
887
|
+
await nextTick()
|
|
888
|
+
|
|
889
|
+
if (!textInput.value || !textInput.value.$el) return
|
|
890
|
+
|
|
891
|
+
setupAriaAttributes()
|
|
892
|
+
|
|
893
|
+
if (newValue) {
|
|
894
|
+
updateMenuAccessibility()
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
focusInput()
|
|
898
|
+
}
|
|
796
899
|
})
|
|
797
900
|
|
|
798
901
|
watch(activeDescendantId, (newValue) => {
|
|
@@ -870,6 +973,31 @@
|
|
|
870
973
|
validateOnSubmit,
|
|
871
974
|
})
|
|
872
975
|
|
|
976
|
+
// on reprend la mm methode que pour le datepicker : useDatePickerAccesssibity (updateAccessibility)
|
|
977
|
+
const updateMenuAccessibility = async (): Promise<void> => {
|
|
978
|
+
await nextTick()
|
|
979
|
+
|
|
980
|
+
const listElement = list.value?.$el as HTMLElement | null
|
|
981
|
+
if (!listElement) return
|
|
982
|
+
|
|
983
|
+
listElement.setAttribute('role', 'listbox')
|
|
984
|
+
if (props.multiple) {
|
|
985
|
+
listElement.setAttribute('aria-multiselectable', 'true')
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
listElement.removeAttribute('aria-multiselectable')
|
|
989
|
+
}
|
|
990
|
+
listElement.setAttribute('aria-labelledby', overlayLabelId.value)
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
const focusInput = () => {
|
|
994
|
+
// eviter un focus inutile si le composant est disebled ou readonly
|
|
995
|
+
if (props.disabled || props.readonly) return
|
|
996
|
+
|
|
997
|
+
const inputElement = textInput.value?.$el?.querySelector('input') as HTMLInputElement | null
|
|
998
|
+
inputElement?.focus()
|
|
999
|
+
}
|
|
1000
|
+
|
|
873
1001
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
874
1002
|
function initializeActivatorProps(activatorProps: Record<string, any>) {
|
|
875
1003
|
const onFocus = (event: FocusEvent) => {
|
|
@@ -925,14 +1053,14 @@
|
|
|
925
1053
|
:id="inputId"
|
|
926
1054
|
v-model="selectedItemText"
|
|
927
1055
|
v-click-outside="closeList"
|
|
928
|
-
:title="
|
|
1056
|
+
:title="accessibleLabel"
|
|
929
1057
|
:color="props.color"
|
|
930
1058
|
:disabled="disabled"
|
|
931
1059
|
:label="labelWithAsterisk"
|
|
932
|
-
:aria-label="
|
|
1060
|
+
:aria-label="accessibleLabel"
|
|
933
1061
|
:error-messages="props.disableErrorHandling ? [] : errorMessages"
|
|
934
1062
|
:variant="variant"
|
|
935
|
-
:rules="
|
|
1063
|
+
:rules="validationRules"
|
|
936
1064
|
:bg-color="props.bgColor"
|
|
937
1065
|
:density="props.density"
|
|
938
1066
|
:active="hasChips || hasMultipleSelections || isOpen"
|
|
@@ -942,7 +1070,7 @@
|
|
|
942
1070
|
:persistent-hint="!!showHelpTextAsMessage"
|
|
943
1071
|
:autocomplete="props.autocomplete"
|
|
944
1072
|
:width="calculatedWidth"
|
|
945
|
-
:style="hasError ? { minWidth: `${labelWidth + 18}px`} : {minWidth: `${labelWidth}px`}"
|
|
1073
|
+
:style="hasError ? { minWidth: `${labelWidth + 18}px`} : { minWidth: `${labelWidth}px` }"
|
|
946
1074
|
v-bind="{
|
|
947
1075
|
...Object.fromEntries(Object.entries($attrs).filter(([key]) => key !== 'display-asterisk')),
|
|
948
1076
|
...initializeActivatorProps(activatorProps),
|
|
@@ -978,6 +1106,7 @@
|
|
|
978
1106
|
{{ getChipText(item) }}
|
|
979
1107
|
</VChip>
|
|
980
1108
|
</div>
|
|
1109
|
+
|
|
981
1110
|
<template v-else-if="hasMultipleSelections">
|
|
982
1111
|
<span
|
|
983
1112
|
v-for="item in (selectedItem as unknown[])"
|
|
@@ -987,6 +1116,7 @@
|
|
|
987
1116
|
{{ getChipText(item) }}
|
|
988
1117
|
</span>
|
|
989
1118
|
</template>
|
|
1119
|
+
|
|
990
1120
|
<!-- Prepend -->
|
|
991
1121
|
<template
|
|
992
1122
|
v-if="$slots.prepend || props.prependIcon || props.prependTooltip"
|
|
@@ -1032,6 +1162,7 @@
|
|
|
1032
1162
|
/>
|
|
1033
1163
|
</IconSlot>
|
|
1034
1164
|
</template>
|
|
1165
|
+
|
|
1035
1166
|
<template #append-inner>
|
|
1036
1167
|
<SyIcon
|
|
1037
1168
|
v-if="hasError"
|
|
@@ -1071,18 +1202,30 @@
|
|
|
1071
1202
|
class="hidden-label"
|
|
1072
1203
|
>{{ label }}</span>
|
|
1073
1204
|
</template>
|
|
1205
|
+
|
|
1206
|
+
<!--
|
|
1207
|
+
Libellé caché utilisé pour nommer la popup/grid.
|
|
1208
|
+
-->
|
|
1209
|
+
<span
|
|
1210
|
+
:id="overlayLabelId"
|
|
1211
|
+
class="d-sr-only"
|
|
1212
|
+
>
|
|
1213
|
+
{{ accessibleLabel }}
|
|
1214
|
+
</span>
|
|
1215
|
+
|
|
1074
1216
|
<VList
|
|
1075
1217
|
:id="uniqueMenuId"
|
|
1076
1218
|
ref="list"
|
|
1077
|
-
class="v-list"
|
|
1219
|
+
class="v-list sy-select-grid"
|
|
1078
1220
|
role="listbox"
|
|
1079
|
-
:aria-
|
|
1080
|
-
:
|
|
1221
|
+
:aria-multiselectable="props.multiple ? 'true' : undefined"
|
|
1222
|
+
:aria-labelledby="overlayLabelId"
|
|
1223
|
+
:title="accessibleLabel"
|
|
1081
1224
|
:style="{
|
|
1082
1225
|
minWidth: `${textInput?.$el.offsetWidth}px`
|
|
1083
1226
|
}"
|
|
1084
1227
|
bg-color="white"
|
|
1085
|
-
tabindex="
|
|
1228
|
+
tabindex="-1"
|
|
1086
1229
|
@keydown.esc.prevent="closeList"
|
|
1087
1230
|
@keydown.tab="handleTabKey"
|
|
1088
1231
|
@keydown.enter.prevent="handleEnterKey"
|
|
@@ -1094,50 +1237,82 @@
|
|
|
1094
1237
|
@keydown.page-down.prevent="handlePageDownKey"
|
|
1095
1238
|
@click.stop
|
|
1096
1239
|
>
|
|
1097
|
-
<
|
|
1240
|
+
<div
|
|
1098
1241
|
v-for="(item, index) in formattedItems"
|
|
1099
1242
|
:id="`option-${index}`"
|
|
1100
1243
|
:key="index"
|
|
1101
1244
|
:ref="'options-' + index"
|
|
1102
1245
|
role="option"
|
|
1103
|
-
|
|
1104
|
-
|
|
1246
|
+
:aria-selected="isItemSelected(item)"
|
|
1247
|
+
class="v-list-item sy-select-grid__row"
|
|
1105
1248
|
tabindex="-1"
|
|
1106
|
-
:class="{
|
|
1249
|
+
:class="{
|
|
1250
|
+
active: isItemSelected(item) || `option-${index}` === activeDescendantId,
|
|
1251
|
+
'v-list-item--selected': isItemSelected(item),
|
|
1252
|
+
}"
|
|
1107
1253
|
@click.stop="(event) => selectItem(item, event)"
|
|
1254
|
+
@keydown.enter.prevent="(event) => selectItem(item, event)"
|
|
1255
|
+
@keydown.space.prevent="(event) => selectItem(item, event)"
|
|
1108
1256
|
>
|
|
1109
|
-
<
|
|
1257
|
+
<div
|
|
1110
1258
|
v-if="props.multiple && !isDefaultOption(item)"
|
|
1111
|
-
|
|
1259
|
+
class="sy-select-grid__cell sy-select-grid__cell--checkbox"
|
|
1260
|
+
aria-hidden="true"
|
|
1112
1261
|
>
|
|
1113
1262
|
<SyCheckbox
|
|
1114
1263
|
:model-value="isItemSelected(item)"
|
|
1115
|
-
|
|
1116
|
-
hide-details
|
|
1264
|
+
decorative
|
|
1117
1265
|
color="primary"
|
|
1118
|
-
class="mt-0 pt-0 mr-1"
|
|
1119
|
-
:title="getItemText(item)"
|
|
1120
|
-
:aria-label="getItemText(item)"
|
|
1121
|
-
@click.stop="(event) => selectItem(item, event)"
|
|
1122
|
-
/>
|
|
1123
|
-
</template>
|
|
1124
|
-
<VListItemTitle>
|
|
1125
|
-
<span
|
|
1126
|
-
v-if="allowHtml"
|
|
1127
|
-
ref="htmlItemRefs"
|
|
1128
|
-
class="item-text"
|
|
1266
|
+
class="mt-0 pt-0 mr-1 pointer-events-none"
|
|
1129
1267
|
/>
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1268
|
+
</div>
|
|
1269
|
+
|
|
1270
|
+
<div
|
|
1271
|
+
class="sy-select-grid__cell sy-select-grid__cell--label"
|
|
1272
|
+
>
|
|
1273
|
+
<VListItemTitle>
|
|
1274
|
+
<span
|
|
1275
|
+
v-if="allowHtml"
|
|
1276
|
+
ref="htmlItemRefs"
|
|
1277
|
+
class="item-text"
|
|
1278
|
+
/>
|
|
1279
|
+
<span
|
|
1280
|
+
v-else
|
|
1281
|
+
class="item-text"
|
|
1282
|
+
>
|
|
1283
|
+
{{ getItemText(item) }}
|
|
1284
|
+
</span>
|
|
1285
|
+
</VListItemTitle>
|
|
1286
|
+
</div>
|
|
1287
|
+
</div>
|
|
1138
1288
|
</VList>
|
|
1139
1289
|
</VMenu>
|
|
1140
1290
|
|
|
1291
|
+
<div
|
|
1292
|
+
v-if="(showHelpTextAsMessage || showHelpTextBelow) && props.helpText"
|
|
1293
|
+
:id="helpTextId"
|
|
1294
|
+
class="d-sr-only"
|
|
1295
|
+
>
|
|
1296
|
+
{{ props.helpText }}
|
|
1297
|
+
</div>
|
|
1298
|
+
|
|
1299
|
+
<div
|
|
1300
|
+
v-if="!props.hideMessages && hasMessages"
|
|
1301
|
+
:id="messagesId"
|
|
1302
|
+
class="d-sr-only"
|
|
1303
|
+
>
|
|
1304
|
+
{{ formattedErrorMessages }}
|
|
1305
|
+
</div>
|
|
1306
|
+
|
|
1307
|
+
<div
|
|
1308
|
+
:id="liveRegionId"
|
|
1309
|
+
class="d-sr-only"
|
|
1310
|
+
aria-live="polite"
|
|
1311
|
+
aria-atomic="true"
|
|
1312
|
+
>
|
|
1313
|
+
{{ liveRegionMessage }}
|
|
1314
|
+
</div>
|
|
1315
|
+
|
|
1141
1316
|
<div
|
|
1142
1317
|
v-if="showHelpTextBelow"
|
|
1143
1318
|
class="help-text-below px-4 mt-1"
|
|
@@ -1165,7 +1340,7 @@
|
|
|
1165
1340
|
|
|
1166
1341
|
:deep(.v-input__prepend .v-icon:focus-visible),
|
|
1167
1342
|
:deep(.v-input__append .v-icon:focus-visible) {
|
|
1168
|
-
outline: 2px solid rgb(var(--v-theme-
|
|
1343
|
+
outline: 2px solid rgb(var(--v-theme-borderAccentPrimary));
|
|
1169
1344
|
outline-offset: 2px;
|
|
1170
1345
|
opacity: 1;
|
|
1171
1346
|
}
|
|
@@ -1185,7 +1360,7 @@
|
|
|
1185
1360
|
background-color: rgb(0 0 0 / 4%);
|
|
1186
1361
|
}
|
|
1187
1362
|
|
|
1188
|
-
.v-list-item
|
|
1363
|
+
.v-list-item--selected {
|
|
1189
1364
|
background-color: rgb(0 0 0 / 8%);
|
|
1190
1365
|
}
|
|
1191
1366
|
|
|
@@ -1195,7 +1370,7 @@
|
|
|
1195
1370
|
|
|
1196
1371
|
.help-text {
|
|
1197
1372
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
|
1198
|
-
font-size:
|
|
1373
|
+
font-size: var(--v-fontSize-liensEtLibelles);
|
|
1199
1374
|
line-height: 1.2;
|
|
1200
1375
|
}
|
|
1201
1376
|
|
|
@@ -1205,7 +1380,7 @@
|
|
|
1205
1380
|
|
|
1206
1381
|
.help-text-below {
|
|
1207
1382
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
|
1208
|
-
font-size:
|
|
1383
|
+
font-size: var(--v-fontSize-liensEtLibelles);
|
|
1209
1384
|
line-height: 1.2;
|
|
1210
1385
|
}
|
|
1211
1386
|
|
|
@@ -1216,7 +1391,7 @@
|
|
|
1216
1391
|
/* Ensure focus styles match selection styles for keyboard navigation */
|
|
1217
1392
|
.v-list-item:focus-visible,
|
|
1218
1393
|
.v-list-item.keyboard-focused {
|
|
1219
|
-
outline: 2px solid rgb(var(--v-theme-
|
|
1394
|
+
outline: 2px solid rgb(var(--v-theme-borderAccentPrimary));
|
|
1220
1395
|
outline-offset: -2px;
|
|
1221
1396
|
background-color: rgb(0 0 0 / 8%);
|
|
1222
1397
|
}
|
|
@@ -1320,4 +1495,29 @@
|
|
|
1320
1495
|
position: absolute;
|
|
1321
1496
|
z-index: -1;
|
|
1322
1497
|
}
|
|
1498
|
+
|
|
1499
|
+
.sy-select-grid__row {
|
|
1500
|
+
display: grid;
|
|
1501
|
+
grid-template-columns: auto 1fr;
|
|
1502
|
+
align-items: center;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
.sy-select-grid__cell {
|
|
1506
|
+
display: flex;
|
|
1507
|
+
align-items: center;
|
|
1508
|
+
min-width: 0;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.sy-select-grid__cell--checkbox {
|
|
1512
|
+
padding-right: 4px;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
.sy-select-grid__cell--label {
|
|
1516
|
+
padding-right: 16px;
|
|
1517
|
+
min-width: 0;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
.pointer-events-none {
|
|
1521
|
+
pointer-events: none;
|
|
1522
|
+
}
|
|
1323
1523
|
</style>
|