@cnamts/synapse 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AutocompleteFilter-BWLR3U7W.js +114 -0
- package/dist/AutocompleteFilter-D9jzRzAL.cjs +1 -0
- package/dist/{DateFilter-B5n-ZkLi.js → DateFilter-BpwFexzi.js} +1 -1
- package/dist/DateFilter-DTUl8hb1.cjs +1 -0
- package/dist/{NumberFilter-CtiZ9uj8.js → NumberFilter-Bz_NTdX9.js} +3 -3
- package/dist/NumberFilter-MAEojdk0.cjs +1 -0
- package/dist/PeriodFilter-CC4WgIhl.cjs +1 -0
- package/dist/{PeriodFilter-DzqiMb-b.js → PeriodFilter-DX_wy9g-.js} +1 -1
- package/dist/SelectFilter-BR3fvl-a.cjs +1 -0
- package/dist/SelectFilter-xqiPtPgX.js +135 -0
- package/dist/{TextFilter-BOFRNfcX.js → TextFilter-BBl3JFqK.js} +7 -7
- package/dist/TextFilter-CCfYFl5F.cjs +1 -0
- package/dist/apLightTheme-CFSRrjv2.cjs +1 -0
- package/dist/apLightTheme-D1P4jcD0.js +1231 -0
- package/dist/components/Accordion/Accordion.d.ts +13 -2
- package/dist/components/Accordion/composables/useAccordionState.d.ts +2 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +7022 -9616
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +40 -40
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +61 -61
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +7168 -9762
- package/dist/components/Amelipro/AmeliproStepper/AmeliproStepper.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +7506 -10100
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +22 -22
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +42 -42
- package/dist/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.d.ts +2 -2
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +20 -498
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +130 -147
- package/dist/components/Customs/Selects/SyAutocomplete/locales.d.ts +5 -0
- package/dist/components/Customs/Selects/SyInputSelect/SyInputSelect.d.ts +6 -6
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +13 -17
- package/dist/components/Customs/Selects/SySelect/locales.d.ts +1 -0
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +9 -9
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +29 -507
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +29 -507
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +64 -81
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +640 -780
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +322 -407
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +114 -156
- package/dist/components/DatePicker/composables/index.d.ts +1 -0
- package/dist/components/DatePicker/composables/useDatePickerFocusTrap.d.ts +11 -0
- package/dist/components/DatePicker/composables/useDateTextField.d.ts +4 -4
- package/dist/components/DatePicker/composables/useDateValidation.d.ts +3 -3
- package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +2 -2
- package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +2 -2
- package/dist/components/ErrorPage/ErrorPage.d.ts +3 -1
- package/dist/components/FileList/UploadItem/UploadItem.d.ts +6 -0
- package/dist/components/FileList/UploadItem/locales.d.ts +1 -4
- package/dist/components/FileUpload/FileUploadContent.d.ts +2 -0
- package/dist/components/FileUpload/validateFiles.d.ts +2 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +2 -1
- package/dist/components/HeaderBar/HeaderLogo/HeaderLogo.d.ts +2 -1
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +6 -5
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +20 -28
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +3 -3
- package/dist/components/MonthPicker/MonthPicker.d.ts +1903 -0
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +1863 -0
- package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +21 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthPickerVisual.d.ts +21 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthPickerVisualProps.d.ts +12 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthSelector.d.ts +11 -0
- package/dist/components/MonthPicker/MonthPickerVisual/VisualPickerFooter.d.ts +6 -0
- package/dist/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.d.ts +14 -0
- package/dist/components/MonthPicker/MonthPickerVisual/YearSelector.d.ts +14 -0
- package/dist/components/MonthPicker/MonthPickerVisual/useMonthGrid.d.ts +9 -0
- package/dist/components/MonthPicker/MonthPickerVisual/useYearGrid.d.ts +8 -0
- package/dist/components/MonthPicker/MonthPickerVisual/utils.d.ts +8 -0
- package/dist/components/MonthPicker/locales.d.ts +12 -0
- package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +25 -0
- package/dist/components/NirField/NirField.d.ts +209 -271
- package/dist/components/NirField/locales.d.ts +10 -10
- package/dist/components/NirField/useNirValidation.d.ts +64 -0
- package/dist/components/NotificationBar/Notification/Notification.d.ts +3 -0
- package/dist/components/PasswordField/PasswordField.d.ts +9 -10
- package/dist/components/PeriodField/PeriodField.d.ts +1379 -1659
- package/dist/components/PhoneField/PhoneField.d.ts +90 -125
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +12 -12
- package/dist/components/SyBtnMenu/SyBtnMenu.d.ts +1 -1
- package/dist/components/SyHeading/SyHeading.a11y.test.d.ts +1 -0
- package/dist/components/SyHeading/SyHeading.d.ts +4 -2
- package/dist/components/SyHeading/SyHeading.test.d.ts +1 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +35 -15
- package/dist/components/SyTextArea/useDefaultValidationRules.d.ts +11 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +11 -8
- package/dist/components/Tables/SyTable/SyTable.d.ts +11 -8
- package/dist/components/Tables/common/SyTableFilter.d.ts +2 -3
- package/dist/components/Tables/common/SyTablePagination.d.ts +21 -23
- package/dist/components/Tables/common/filters/AutocompleteFilter.d.ts +120 -0
- package/dist/components/Tables/common/filters/locales.d.ts +0 -1
- package/dist/components/Tables/common/types.d.ts +19 -3
- package/dist/components/Tables/common/useClickableTableRow.d.ts +17 -0
- package/dist/components/Tables/common/usePagination.d.ts +3 -1
- package/dist/components/Tables/common/usePinnedColumns.d.ts +31 -0
- package/dist/components/Tables/common/useTableHeaders.d.ts +2 -0
- package/dist/components/Tables/common/useTableRowCheckboxAccessibility.d.ts +5 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +6 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/date/useDatePickerAccessibility.d.ts +1 -1
- package/dist/composables/rules/useFieldValidation.d.ts +4 -4
- package/dist/composables/unifyValidation/useCustomValidation.d.ts +8 -0
- package/dist/composables/unifyValidation/useValidation.d.ts +102 -0
- package/dist/composables/unifyValidation/useVuetifyValidation.d.ts +18 -0
- package/dist/composables/useFormFieldErrorHandling.d.ts +2 -2
- package/dist/composables/validation/useFormValidation.d.ts +11 -2
- package/dist/composables/validation/useValidation.d.ts +15 -9
- package/dist/design-system-v3.d.ts +2 -0
- package/dist/design-system-v3.js +196 -194
- package/dist/design-system-v3.umd.cjs +1 -1066
- package/dist/designTokens/tokens/cnam/cnamContextual.d.ts +5 -0
- package/dist/{main-CEl4J8_T.js → main-BtTqyn4z.js} +16983 -15576
- package/dist/main-C1e3eoxd.cjs +1067 -0
- package/dist/synapse.css +1 -0
- package/dist/tooth-11-D3sLWv2n.cjs +1 -0
- package/dist/tooth-12-CXrLuH03.cjs +1 -0
- package/dist/tooth-13-BSfo5fpT.cjs +1 -0
- package/dist/tooth-14-DMzulx0h.cjs +1 -0
- package/dist/tooth-15-BKRFVi-9.cjs +1 -0
- package/dist/tooth-16-CpuxAbuM.cjs +1 -0
- package/dist/tooth-17-BPoahUdg.cjs +1 -0
- package/dist/tooth-18-DhHJz8sy.cjs +1 -0
- package/dist/tooth-21-Dgd5hn_X.cjs +1 -0
- package/dist/tooth-22-C2Tn19sB.cjs +1 -0
- package/dist/tooth-23-C9uaaSGb.cjs +1 -0
- package/dist/tooth-24-BrK9UGpf.cjs +1 -0
- package/dist/tooth-25-CE_EfGNp.cjs +1 -0
- package/dist/tooth-26-Ctv4i9Fy.cjs +1 -0
- package/dist/tooth-27-C5J7JkWM.cjs +1 -0
- package/dist/tooth-28-Z9oWqjo0.cjs +1 -0
- package/dist/tooth-31-BrYqmkTi.cjs +1 -0
- package/dist/tooth-32-BNNR0oCZ.cjs +1 -0
- package/dist/tooth-33-DuxvqO2J.cjs +1 -0
- package/dist/tooth-34-BCSCXMB6.cjs +1 -0
- package/dist/tooth-35-BLUXkX88.cjs +1 -0
- package/dist/tooth-36-IrKHYqlA.cjs +1 -0
- package/dist/tooth-37-BYqpdMwo.cjs +1 -0
- package/dist/tooth-38-B_eNXXdu.cjs +1 -0
- package/dist/tooth-41-Ddva4Ot8.cjs +1 -0
- package/dist/tooth-42-szcDqlM0.cjs +1 -0
- package/dist/tooth-43-B3ka6rQm.cjs +1 -0
- package/dist/tooth-44-CazyQucj.cjs +1 -0
- package/dist/tooth-45-B4HQtc8n.cjs +1 -0
- package/dist/tooth-46-BPM40gbG.cjs +1 -0
- package/dist/tooth-47-Dvr20dlh.cjs +1 -0
- package/dist/tooth-48-Bd8ljGsF.cjs +1 -0
- package/dist/tooth-51-OBpwCOF3.cjs +1 -0
- package/dist/tooth-52-aKxyHcmq.cjs +1 -0
- package/dist/tooth-53-vCwJjTOc.cjs +1 -0
- package/dist/tooth-54-DsWu2iFy.cjs +1 -0
- package/dist/tooth-55-BxC1X2Dn.cjs +1 -0
- package/dist/tooth-61-BbLvxMQi.cjs +1 -0
- package/dist/tooth-62-CmTkWczP.cjs +1 -0
- package/dist/tooth-63-DI7l_2qI.cjs +1 -0
- package/dist/tooth-64-B21sOsJh.cjs +1 -0
- package/dist/tooth-65-D2ZC2VEr.cjs +1 -0
- package/dist/tooth-71-D473PPO5.cjs +1 -0
- package/dist/tooth-72-Drh1wnNu.cjs +1 -0
- package/dist/tooth-73-DzlwYI23.cjs +1 -0
- package/dist/tooth-74-8aGvcZPg.cjs +1 -0
- package/dist/tooth-75-BFK7At_r.cjs +1 -0
- package/dist/tooth-81-BZmR-I0M.cjs +1 -0
- package/dist/tooth-82-euVfUUZV.cjs +1 -0
- package/dist/tooth-83-KV010j64.cjs +1 -0
- package/dist/tooth-84-BBg1RjhZ.cjs +1 -0
- package/dist/tooth-85-Cr-kc1wM.cjs +1 -0
- package/dist/vuetifyConfig.js +561 -0
- package/dist/vuetifyConfig.umd.cjs +1 -0
- package/package.json +18 -6
- package/src/assets/apTokens.scss +2 -2
- package/src/assets/overrides/_btns.scss +2 -0
- package/src/assets/overrides/_forms.scss +9 -0
- package/src/assets/overrides/_icons.scss +41 -4
- package/src/assets/overrides/_tables.scss +19 -0
- package/src/assets/overrides/_typography.scss +0 -10
- package/src/components/Accordion/Accordion.mdx +23 -9
- package/src/components/Accordion/Accordion.stories.ts +153 -3
- package/src/components/Accordion/Accordion.vue +7 -6
- package/src/components/Accordion/composables/__tests__/useAccordionState.spec.ts +40 -12
- package/src/components/Accordion/composables/useAccordionState.ts +3 -4
- package/src/components/Accordion/tests/accordion.spec.ts +131 -19
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.mdx +3 -1
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.stories.ts +8 -0
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +2 -2
- package/src/components/BackBtn/accessibilite/Accessibility.mdx +62 -10
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +9 -3
- package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +86 -6
- package/src/components/Captcha/accessibilite/Accessibility.mdx +86 -8
- package/src/components/Captcha/tests/Captcha.spec.ts +0 -29
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +14 -122
- package/src/components/ChipList/ChipList.stories.ts +0 -15
- package/src/components/ChipList/ChipList.vue +5 -1
- package/src/components/ChipList/accessibilite/Accessibility.mdx +83 -10
- package/src/components/ChipList/tests/ChipList.a11y.spec.ts +41 -0
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +124 -10
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +379 -93
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +162 -84
- package/src/components/Customs/Selects/SyAutocomplete/accessibilite/Accessibilite.stories.ts +40 -1
- package/src/components/Customs/Selects/SyAutocomplete/accessibilite/Accessibility.mdx +7 -1
- package/src/components/Customs/Selects/SyAutocomplete/locales.ts +5 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +96 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +377 -9
- package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +27 -13
- package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +9 -10
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.stories.ts +4 -4
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +8 -9
- package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.spec.ts +10 -10
- package/src/components/Customs/Selects/SySelect/SySelect.vue +60 -14
- package/src/components/Customs/Selects/SySelect/locales.ts +1 -0
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +54 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +6 -9
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +10 -16
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -11
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +35 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.a11y.spec.ts +134 -2
- package/src/components/Customs/SyForm/SyForm.stories.ts +31 -5
- package/src/components/Customs/SyIcon/SyIcon.vue +1 -1
- package/src/components/Customs/SyIcon/tests/SyIcon.a11y.spec.ts +20 -0
- package/src/components/Customs/SyIconButton/SyIconButton.mdx +46 -0
- package/src/components/Customs/SyIconButton/SyIconButton.stories.ts +184 -0
- package/src/components/Customs/SyIconButton/SyIconButton.vue +38 -0
- package/src/components/Customs/SyIconButton/accessibilite/Accessibility.mdx +64 -0
- package/src/components/Customs/SyIconButton/tests/SyIconButton.a11y.spec.ts +87 -0
- package/src/components/Customs/SyIconButton/tests/SyIconButton.spec.ts +152 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/SyIconButton.spec.ts.snap +61 -0
- package/src/components/Customs/SyPagination/SyPagination.vue +5 -5
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +4 -7
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +29 -27
- package/src/components/Customs/SyTextField/SyTextField.vue +174 -159
- package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +67 -9
- package/src/components/Customs/SyTextField/tests/SyTextField.a11y.spec.ts +47 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +155 -10
- package/src/components/DataList/accessibilite/Accessibility.mdx +79 -11
- package/src/components/DataListGroup/accessibilite/Accessibility.mdx +80 -11
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +62 -58
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +330 -223
- package/src/components/DatePicker/CalendarMode/accessibilite/Accessibility.mdx +82 -0
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +141 -0
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +2 -56
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +195 -159
- package/src/components/DatePicker/ComplexDatePicker/accessibilite/Accessibility.mdx +76 -0
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +10 -10
- package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +8 -8
- package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +106 -8
- package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +12 -11
- package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +12 -12
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +0 -12
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +63 -57
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +3 -0
- package/src/components/DatePicker/DateTextInput/accessibilite/Accessibility.mdx +66 -0
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.spec.ts +52 -1
- package/src/components/DatePicker/composables/index.ts +1 -0
- package/src/components/DatePicker/composables/tests/useCalendarKeyboardNavigation.spec.ts +109 -65
- package/src/components/DatePicker/composables/tests/useDatePickerFocusTrap.spec.ts +138 -0
- package/src/components/DatePicker/composables/tests/useDateValidation.spec.ts +74 -18
- package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +39 -0
- package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +91 -0
- package/src/components/DatePicker/composables/useCalendarKeyboardNavigation.ts +442 -36
- package/src/components/DatePicker/composables/useDatePickerFocusTrap.ts +92 -0
- package/src/components/DatePicker/composables/useDateTextField.ts +7 -6
- package/src/components/DatePicker/composables/useDateValidation.ts +36 -35
- package/src/components/DatePicker/composables/useInputBlurHandler.ts +3 -3
- package/src/components/DatePicker/composables/useManualDateValidation.ts +6 -2
- package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +76 -8
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +25 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +113 -19
- package/src/components/ErrorPage/ErrorPage.vue +17 -2
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +17 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +21 -1
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +0 -1
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +23 -0
- package/src/components/FileList/FileList.stories.ts +51 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +13 -6
- package/src/components/FileList/UploadItem/locales.ts +3 -12
- package/src/components/FileList/accessibilite/Accessibility.mdx +3 -0
- package/src/components/FileUpload/FileUpload.vue +2 -1
- package/src/components/FileUpload/FileUploadContent.vue +2 -1
- package/src/components/FileUpload/tests/FileUpload.spec.ts +47 -0
- package/src/components/FileUpload/validateFiles.ts +5 -2
- package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +62 -9
- package/src/components/HeaderBar/HeaderBar.stories.ts +14 -2
- package/src/components/HeaderBar/HeaderBar.vue +2 -1
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -1
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
- package/src/components/Logo/accessibilite/Accessibility.mdx +73 -11
- package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +85 -9
- package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +74 -8
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +163 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +3 -1
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +4 -5
- package/src/components/MaintenancePage/MaintenancePage.vue +1 -1
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +4 -5
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +0 -1
- package/src/components/MonthPicker/MonthPicker.mdx +35 -0
- package/src/components/MonthPicker/MonthPicker.stories.ts +527 -0
- package/src/components/MonthPicker/MonthPicker.vue +79 -0
- package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +89 -0
- package/src/components/MonthPicker/MonthPickerText/useTextField.ts +27 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthPickerVisual.vue +154 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthPickerVisualProps.ts +13 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthSelector.vue +137 -0
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerFooter.vue +60 -0
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +149 -0
- package/src/components/MonthPicker/MonthPickerVisual/YearSelector.vue +143 -0
- package/src/components/MonthPicker/MonthPickerVisual/useMonthGrid.ts +45 -0
- package/src/components/MonthPicker/MonthPickerVisual/useYearGrid.ts +45 -0
- package/src/components/MonthPicker/MonthPickerVisual/utils.ts +17 -0
- package/src/components/MonthPicker/accessibilite/Accessibility.mdx +59 -0
- package/src/components/MonthPicker/locales.ts +12 -0
- package/src/components/MonthPicker/tests/MonthPicker.a11y.spec.ts +71 -0
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +1249 -0
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +2545 -0
- package/src/components/MonthPicker/useMonthPickerValidation.ts +30 -0
- package/src/components/NirField/NirField.mdx +1 -2
- package/src/components/NirField/NirField.stories.ts +70 -6
- package/src/components/NirField/NirField.vue +64 -260
- package/src/components/NirField/accessibilite/Accessibility.mdx +2 -2
- package/src/components/NirField/locales.ts +1 -1
- package/src/components/NirField/tests/NirField.spec.ts +6 -0
- package/src/components/NirField/useNirValidation.ts +271 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +2 -3
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +22 -14
- package/src/components/NotificationBar/Notification/Notification.vue +3 -1
- package/src/components/NotificationBar/NotificationBar.stories.ts +154 -0
- package/src/components/NotificationBar/tests/NotificationBar.a11y.spec.ts +26 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +60 -0
- package/src/components/PasswordField/PasswordField.stories.ts +4 -4
- package/src/components/PasswordField/PasswordField.vue +18 -24
- package/src/components/PasswordField/tests/PasswordField.spec.ts +6 -3
- package/src/components/PeriodField/PeriodField.stories.ts +4 -4
- package/src/components/PeriodField/PeriodField.vue +57 -57
- package/src/components/PeriodField/__tests__/PeriodField.async.spec.ts +32 -0
- package/src/components/PeriodField/accessibilite/Accessibility.mdx +68 -8
- package/src/components/PeriodField/tests/PeriodField.spec.ts +28 -2
- package/src/components/PhoneField/PhoneField.vue +5 -6
- package/src/components/PhoneField/tests/PhoneField.spec.ts +1 -0
- package/src/components/RangeField/RangeField.vue +6 -0
- package/src/components/RangeField/accessibilite/Accessibility.mdx +79 -11
- package/src/components/SkipLink/tests/SkipLink.a11y.spec.ts +23 -0
- package/src/components/StatusPage/StatusPage.stories.ts +118 -0
- package/src/components/StatusPage/StatusPage.vue +5 -3
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +22 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +22 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +22 -14
- package/src/components/SubHeader/tests/SubHeader.a11y.spec.ts +20 -0
- package/src/components/SyAlert/SyAlert.vue +1 -0
- package/src/components/SyAlert/accessibilite/Accessibility.mdx +79 -9
- package/src/components/SyAlert/tests/SyAlert.a11y.spec.ts +23 -0
- package/src/components/SyHeading/SyHeading.a11y.test.ts +149 -0
- package/src/components/SyHeading/SyHeading.test.ts +115 -0
- package/src/components/SyHeading/SyHeading.vue +5 -3
- package/src/components/SyTextArea/SyTextArea.stories.ts +138 -2
- package/src/components/SyTextArea/SyTextArea.vue +53 -23
- package/src/components/SyTextArea/accessibilite/Accessibility.mdx +80 -8
- package/src/components/SyTextArea/tests/SyTextArea.a11y.spec.ts +151 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +126 -3
- package/src/components/SyTextArea/useDefaultValidationRules.ts +74 -0
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +25 -0
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +673 -1
- package/src/components/Tables/SyServerTable/SyServerTable.vue +148 -91
- package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +58 -0
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +122 -0
- package/src/components/Tables/SyTable/SyTable.mdx +25 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +452 -1
- package/src/components/Tables/SyTable/SyTable.vue +130 -56
- package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +57 -0
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +108 -0
- package/src/components/Tables/common/SyTableFilter.vue +22 -2
- package/src/components/Tables/common/TableHeader.vue +5 -1
- package/src/components/Tables/common/filters/AutocompleteFilter.vue +160 -0
- package/src/components/Tables/common/filters/NumberFilter.vue +1 -1
- package/src/components/Tables/common/filters/SelectFilter.vue +10 -11
- package/src/components/Tables/common/filters/TextFilter.vue +1 -1
- package/src/components/Tables/common/filters/getFilterComponent.ts +8 -1
- package/src/components/Tables/common/filters/locales.ts +0 -1
- package/src/components/Tables/common/filters/tests/AutocompleteFilter.a11y.spec.ts +110 -0
- package/src/components/Tables/common/filters/tests/AutocompleteFilter.spec.ts +203 -0
- package/src/components/Tables/common/filters/tests/SelectFilter.a11y.spec.ts +104 -0
- package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +152 -16
- package/src/components/Tables/common/tableFilterUtils.ts +3 -0
- package/src/components/Tables/common/tableStyles.scss +48 -4
- package/src/components/Tables/common/tests/filterByRange.spec.ts +2 -1
- package/src/components/Tables/common/types.ts +13 -4
- package/src/components/Tables/common/useClickableTableRow.ts +103 -0
- package/src/components/Tables/common/usePagination.ts +13 -0
- package/src/components/Tables/common/usePinnedColumns.ts +237 -0
- package/src/components/Tables/common/useTableHeaders.ts +3 -3
- package/src/components/Tables/common/useTableRowCheckboxAccessibility.ts +41 -0
- package/src/components/ToolbarContainer/tests/ToolbarContainer.a11y.spec.ts +126 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +2 -2
- package/src/components/index.ts +1 -0
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +2 -6
- package/src/composables/date/useDatePickerAccessibility.ts +42 -207
- package/src/composables/rules/tests/useFieldValidation.spec.ts +120 -120
- package/src/composables/rules/useFieldValidation.ts +34 -17
- package/src/composables/unifyValidation/tests/useCustomValidation.spec.ts +601 -0
- package/src/composables/unifyValidation/tests/useValidation.spec.ts +2048 -0
- package/src/composables/unifyValidation/tests/useVuetifyValidation.spec.ts +184 -0
- package/src/composables/unifyValidation/useCustomValidation.ts +95 -0
- package/src/composables/unifyValidation/useValidation.ts +190 -0
- package/src/composables/unifyValidation/useVuetifyValidation.ts +54 -0
- package/src/composables/useFormFieldErrorHandling.ts +15 -9
- package/src/composables/validation/tests/useFormValidation.spec.ts +14 -0
- package/src/composables/validation/tests/useValidation.spec.ts +116 -21
- package/src/composables/validation/useFormValidation.ts +20 -13
- package/src/composables/validation/useValidatable.ts +8 -1
- package/src/composables/validation/useValidation.ts +135 -99
- package/src/composantsVuetify/Introduction.mdx +48 -0
- package/src/composantsVuetify/VBtn/VBtn.mdx +72 -0
- package/src/composantsVuetify/VBtn/v-btn.stories.ts +121 -0
- package/src/composantsVuetify/VTooltip/VTooltip.mdx +32 -0
- package/src/composantsVuetify/VTooltip/v-tooltip.stories.ts +95 -0
- package/src/designTokens/tokens/cnam/cnamContextual.ts +6 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +2 -2
- package/src/stories/Components/Components.stories.ts +74 -9
- package/src/stories/Demarrer/Accueil.stories.ts +3 -3
- package/src/stories/GuideDuDev/Amelipro.mdx +15 -0
- package/src/stories/GuideDuDev/Amelipro.stories.ts +209 -0
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +3 -3
- package/dist/SelectFilter-BOYlF7rX.js +0 -136
- package/dist/style.css +0 -1
- package/src/components/DatePicker/Accessibilite.mdx +0 -14
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { computed, nextTick, onMounted, onUnmounted, ref, type Ref } from 'vue'
|
|
2
|
+
import type { DataTableHeaders, TableColumnHeader } from './types'
|
|
3
|
+
|
|
4
|
+
// Fonction de throttling simple pour optimiser les performances
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
const useThrottleFn = <T extends (...args: any[]) => void>(fn: T, delay: number): T => {
|
|
7
|
+
let lastCall = 0
|
|
8
|
+
return ((...args: Parameters<T>) => {
|
|
9
|
+
const now = Date.now()
|
|
10
|
+
if (now - lastCall >= delay) {
|
|
11
|
+
lastCall = now
|
|
12
|
+
return fn(...args)
|
|
13
|
+
}
|
|
14
|
+
}) as T
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface UsePinnedColumnsOptions {
|
|
18
|
+
displayHeaders: Ref<DataTableHeaders[] | undefined>
|
|
19
|
+
reactiveColumnWidths: Ref<Record<string, number | string>>
|
|
20
|
+
pinnedColumns: Ref<Array<string | { key: string, side?: 'left' | 'right' }> | undefined>
|
|
21
|
+
pinnedColumnKey: Ref<string | undefined>
|
|
22
|
+
stickySelect: Ref<boolean>
|
|
23
|
+
showSelect: Ref<boolean>
|
|
24
|
+
showSelectSingle: Ref<boolean>
|
|
25
|
+
tableRef: Ref<{ $el?: Element } | undefined>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function usePinnedColumns({
|
|
29
|
+
displayHeaders,
|
|
30
|
+
reactiveColumnWidths,
|
|
31
|
+
pinnedColumns,
|
|
32
|
+
pinnedColumnKey,
|
|
33
|
+
stickySelect,
|
|
34
|
+
showSelect,
|
|
35
|
+
showSelectSingle,
|
|
36
|
+
tableRef,
|
|
37
|
+
}: UsePinnedColumnsOptions) {
|
|
38
|
+
const tableWrapperEl = ref<HTMLElement | null>(null)
|
|
39
|
+
const showPinnedLeftShadow = ref(false)
|
|
40
|
+
const showPinnedRightShadow = ref(false)
|
|
41
|
+
|
|
42
|
+
// Stocker la référence de la fonction pour éviter les fuites mémoire
|
|
43
|
+
const updatePinnedShadowsRef = ref<(() => void) | null>(null)
|
|
44
|
+
|
|
45
|
+
const parseWidthPx = (val: unknown): number => {
|
|
46
|
+
if (typeof val === 'number' && Number.isFinite(val)) return val
|
|
47
|
+
if (typeof val === 'string') {
|
|
48
|
+
const trimmed = val.trim()
|
|
49
|
+
if (trimmed.endsWith('px')) {
|
|
50
|
+
const n = Number.parseFloat(trimmed.slice(0, -2))
|
|
51
|
+
return Number.isFinite(n) ? n : 0
|
|
52
|
+
}
|
|
53
|
+
const n = Number.parseFloat(trimmed)
|
|
54
|
+
return Number.isFinite(n) ? n : 0
|
|
55
|
+
}
|
|
56
|
+
return 0
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const normalizedPinnedColumns = computed(() => {
|
|
60
|
+
const raw = pinnedColumns.value ?? (pinnedColumnKey.value ? [pinnedColumnKey.value] : [])
|
|
61
|
+
return raw.map((c) => {
|
|
62
|
+
if (typeof c === 'string') return { key: c, side: 'left' as const }
|
|
63
|
+
return { key: c.key, side: c.side ?? 'left' as const }
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const pinnedLeftKeys = computed(() =>
|
|
68
|
+
normalizedPinnedColumns.value.filter(c => c.side !== 'right').map(c => c.key),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
const pinnedRightKeys = computed(() =>
|
|
72
|
+
normalizedPinnedColumns.value.filter(c => c.side === 'right').map(c => c.key),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const stickySelectActive = computed(() => Boolean(stickySelect.value) && (showSelect.value || showSelectSingle.value))
|
|
76
|
+
const hasPinnedSelectLeft = computed(() => pinnedLeftKeys.value.includes('data-table-select') || stickySelectActive.value)
|
|
77
|
+
|
|
78
|
+
const getColumnWidthPx = (headersList: TableColumnHeader[], key: string): number => {
|
|
79
|
+
if (key === 'data-table-select' || key === 'data-table-expand' || key === 'data-table-group') return 48
|
|
80
|
+
const storedWidth = reactiveColumnWidths.value[key]
|
|
81
|
+
if (storedWidth != null) return parseWidthPx(storedWidth)
|
|
82
|
+
const h = headersList.find(x => (x.key ?? x.value) === key)
|
|
83
|
+
return parseWidthPx(h?.width ?? h?.minWidth ?? h?.maxWidth)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const pinnedMeta = computed(() => {
|
|
87
|
+
const headersList = displayHeaders.value
|
|
88
|
+
if (!headersList) return { left: {} as Record<string, number>, right: {} as Record<string, number>, totalLeft: 0, totalRight: 0 }
|
|
89
|
+
|
|
90
|
+
const left: Record<string, number> = {}
|
|
91
|
+
let accLeft = 0
|
|
92
|
+
if (hasPinnedSelectLeft.value) {
|
|
93
|
+
left['data-table-select'] = 0
|
|
94
|
+
accLeft = getColumnWidthPx(headersList as TableColumnHeader[], 'data-table-select')
|
|
95
|
+
}
|
|
96
|
+
for (const h of headersList) {
|
|
97
|
+
const key = (h.key ?? h.value) as string | undefined
|
|
98
|
+
if (!key) continue
|
|
99
|
+
if (pinnedLeftKeys.value.includes(key)) {
|
|
100
|
+
left[key] = accLeft
|
|
101
|
+
accLeft += getColumnWidthPx(headersList as TableColumnHeader[], key)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const right: Record<string, number> = {}
|
|
106
|
+
let accRight = 0
|
|
107
|
+
for (const h of [...headersList].reverse()) {
|
|
108
|
+
const key = (h.key ?? h.value) as string | undefined
|
|
109
|
+
if (!key) continue
|
|
110
|
+
if (pinnedRightKeys.value.includes(key)) {
|
|
111
|
+
right[key] = accRight
|
|
112
|
+
accRight += getColumnWidthPx(headersList as TableColumnHeader[], key)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return { left, right, totalLeft: accLeft, totalRight: accRight }
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
const updatePinnedShadows = () => {
|
|
120
|
+
const el = tableWrapperEl.value
|
|
121
|
+
if (!el) return
|
|
122
|
+
const max = el.scrollWidth - el.clientWidth
|
|
123
|
+
showPinnedLeftShadow.value = pinnedMeta.value.totalLeft > 0 && el.scrollLeft > 0
|
|
124
|
+
showPinnedRightShadow.value = pinnedMeta.value.totalRight > 0 && max > 0 && el.scrollLeft < max - 1
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Fonction pour trouver le wrapper du tableau avec retry
|
|
128
|
+
const findTableWrapper = (): HTMLElement | null => {
|
|
129
|
+
const el = tableRef.value?.$el as HTMLElement | undefined
|
|
130
|
+
return el?.querySelector('.v-table__wrapper') as HTMLElement | null
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Initialiser la référence de la fonction
|
|
134
|
+
updatePinnedShadowsRef.value = updatePinnedShadows
|
|
135
|
+
|
|
136
|
+
// Appliquer le throttling pour optimiser les performances (60fps)
|
|
137
|
+
const updatePinnedShadowsThrottled = useThrottleFn(updatePinnedShadows, 16)
|
|
138
|
+
|
|
139
|
+
const pinnedEdgeVars = computed<Record<string, string>>(() => {
|
|
140
|
+
const { totalLeft, totalRight } = pinnedMeta.value
|
|
141
|
+
return {
|
|
142
|
+
...(totalLeft > 0 ? { '--sy-pinned-left-edge': `${totalLeft}px` } : {}),
|
|
143
|
+
...(totalRight > 0 ? { '--sy-pinned-right-edge': `${totalRight}px` } : {}),
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
// Only cellProps are needed here — headerProps are applied inline in the #headers slot template
|
|
148
|
+
const displayHeadersWithPinned = computed(() => {
|
|
149
|
+
const headersList = displayHeaders.value
|
|
150
|
+
if (!headersList) return headersList
|
|
151
|
+
|
|
152
|
+
const leftOffsets = pinnedMeta.value.left
|
|
153
|
+
const rightOffsets = pinnedMeta.value.right
|
|
154
|
+
|
|
155
|
+
if (Object.keys(leftOffsets).length === 0 && Object.keys(rightOffsets).length === 0) return headersList
|
|
156
|
+
|
|
157
|
+
return headersList.map((h) => {
|
|
158
|
+
const key = (h.key ?? h.value) as string | undefined
|
|
159
|
+
if (!key) return h
|
|
160
|
+
|
|
161
|
+
const left = leftOffsets[key]
|
|
162
|
+
const right = rightOffsets[key]
|
|
163
|
+
if (left === undefined && right === undefined) return h
|
|
164
|
+
|
|
165
|
+
const cellProps = (h.cellProps ?? {}) as Record<string, unknown>
|
|
166
|
+
const cellStyle = (cellProps.style ?? {}) as Record<string, string | number>
|
|
167
|
+
|
|
168
|
+
const stickyCellStyle: Record<string, string | number> = {
|
|
169
|
+
position: 'sticky',
|
|
170
|
+
zIndex: 'var(--sy-table-z-pinned-cell)',
|
|
171
|
+
background: 'rgb(var(--v-theme-surface))',
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const sideClass = left !== undefined ? 'sy-table__pinned--left' : 'sy-table__pinned--right'
|
|
175
|
+
if (left !== undefined) {
|
|
176
|
+
stickyCellStyle.left = `${left}px`
|
|
177
|
+
}
|
|
178
|
+
else if (right !== undefined) {
|
|
179
|
+
stickyCellStyle.right = `${right}px`
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
...h,
|
|
184
|
+
cellProps: {
|
|
185
|
+
...cellProps,
|
|
186
|
+
class: ['sy-table__pinned', sideClass, 'v-data-table-column--fixed', cellProps.class].filter(Boolean),
|
|
187
|
+
style: { ...cellStyle, ...stickyCellStyle },
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
onMounted(() => {
|
|
194
|
+
nextTick(() => {
|
|
195
|
+
let attempts = 0
|
|
196
|
+
const maxAttempts = 5
|
|
197
|
+
|
|
198
|
+
const tryFindWrapper = () => {
|
|
199
|
+
tableWrapperEl.value = findTableWrapper()
|
|
200
|
+
if (tableWrapperEl.value || attempts >= maxAttempts) {
|
|
201
|
+
if (tableWrapperEl.value && updatePinnedShadowsRef.value) {
|
|
202
|
+
updatePinnedShadowsRef.value()
|
|
203
|
+
tableWrapperEl.value.addEventListener('scroll', updatePinnedShadowsThrottled, { passive: true })
|
|
204
|
+
}
|
|
205
|
+
if (updatePinnedShadowsRef.value) {
|
|
206
|
+
window.addEventListener('resize', updatePinnedShadowsThrottled)
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
attempts++
|
|
211
|
+
setTimeout(tryFindWrapper, 50)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
tryFindWrapper()
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
onUnmounted(() => {
|
|
220
|
+
if (tableWrapperEl.value && updatePinnedShadowsRef.value) {
|
|
221
|
+
tableWrapperEl.value.removeEventListener('scroll', updatePinnedShadowsThrottled)
|
|
222
|
+
}
|
|
223
|
+
if (updatePinnedShadowsRef.value) {
|
|
224
|
+
window.removeEventListener('resize', updatePinnedShadowsThrottled)
|
|
225
|
+
}
|
|
226
|
+
updatePinnedShadowsRef.value = null
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
showPinnedLeftShadow,
|
|
231
|
+
showPinnedRightShadow,
|
|
232
|
+
hasPinnedSelectLeft,
|
|
233
|
+
pinnedMeta,
|
|
234
|
+
pinnedEdgeVars,
|
|
235
|
+
displayHeadersWithPinned,
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -124,13 +124,13 @@ export function useTableHeaders({
|
|
|
124
124
|
*/
|
|
125
125
|
function getHeaderForColumn(column: TableColumnHeader): TableColumnHeader | undefined {
|
|
126
126
|
if (!normalizedHeaders.value) return undefined
|
|
127
|
-
const key = column.key
|
|
127
|
+
const key = column.key ?? undefined
|
|
128
128
|
if (key) {
|
|
129
129
|
const byKey = normalizedHeaders.value.find(h => h.key === key)
|
|
130
130
|
if (byKey) return byKey
|
|
131
131
|
}
|
|
132
|
-
// Fallback: try matching by value when key is not present or didn
|
|
133
|
-
const val = column.value
|
|
132
|
+
// Fallback: try matching by value when key is not present or didn't match
|
|
133
|
+
const val = typeof column.value === 'string' ? column.value : undefined
|
|
134
134
|
if (val) {
|
|
135
135
|
const byValue = normalizedHeaders.value.find(h => h.value === val)
|
|
136
136
|
if (byValue) return byValue
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { nextTick, onMounted, onUnmounted, ref } from 'vue'
|
|
2
|
+
import { locales } from './locales'
|
|
3
|
+
|
|
4
|
+
export function useTableRowCheckboxAccessibility({
|
|
5
|
+
uniqueTableId,
|
|
6
|
+
}: {
|
|
7
|
+
uniqueTableId: string
|
|
8
|
+
}) {
|
|
9
|
+
const timeouts = ref<ReturnType<typeof setTimeout>[]>([])
|
|
10
|
+
|
|
11
|
+
const accessibilityRowCheckboxes = () => {
|
|
12
|
+
nextTick(() => {
|
|
13
|
+
const timeoutId = setTimeout(() => {
|
|
14
|
+
if (typeof document === 'undefined') return
|
|
15
|
+
|
|
16
|
+
const tableElement = document.getElementById(uniqueTableId)
|
|
17
|
+
if (!tableElement) return
|
|
18
|
+
|
|
19
|
+
const rowCheckboxes = tableElement.querySelectorAll('td .v-selection-control input[type="checkbox"]')
|
|
20
|
+
rowCheckboxes.forEach((checkbox, index) => {
|
|
21
|
+
const rowLabel = `${locales.selectRow} ${index + 1}`
|
|
22
|
+
checkbox.setAttribute('aria-label', rowLabel)
|
|
23
|
+
checkbox.setAttribute('title', rowLabel)
|
|
24
|
+
})
|
|
25
|
+
}, 100)
|
|
26
|
+
|
|
27
|
+
timeouts.value.push(timeoutId)
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
accessibilityRowCheckboxes()
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
onUnmounted(() => {
|
|
36
|
+
timeouts.value.forEach(clearTimeout)
|
|
37
|
+
timeouts.value = []
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return { accessibilityRowCheckboxes }
|
|
41
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import { axe } from 'vitest-axe'
|
|
4
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
5
|
+
import ToolbarContainer from '../ToolbarContainer.vue'
|
|
6
|
+
|
|
7
|
+
// Scénario d'accessibilité : barre d'outils avec des boutons de navigation
|
|
8
|
+
// Le composant doit avoir un rôle toolbar et gérer la navigation au clavier
|
|
9
|
+
describe('ToolbarContainer – accessibility (axe)', () => {
|
|
10
|
+
it('should not have any axe violations with default buttons', async () => {
|
|
11
|
+
const wrapper = mount(ToolbarContainer, {
|
|
12
|
+
slots: {
|
|
13
|
+
default: `
|
|
14
|
+
<VBtn>Action 1</VBtn>
|
|
15
|
+
<VBtn>Action 2</VBtn>
|
|
16
|
+
<VBtn>Action 3</VBtn>
|
|
17
|
+
`,
|
|
18
|
+
},
|
|
19
|
+
attachTo: document.body,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const results = await axe(wrapper.element)
|
|
23
|
+
assertNoA11yViolations(results, 'ToolbarContainer with default buttons')
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it('should not have any axe violations with custom content', async () => {
|
|
27
|
+
const wrapper = mount(ToolbarContainer, {
|
|
28
|
+
slots: {
|
|
29
|
+
default: `
|
|
30
|
+
<div>
|
|
31
|
+
<VBtn icon="mdi-plus" aria-label="Ajouter"></VBtn>
|
|
32
|
+
<VBtn icon="mdi-minus" aria-label="Retirer"></VBtn>
|
|
33
|
+
<button aria-label="Action personnalisée">Custom Button</button>
|
|
34
|
+
</div>
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
attachTo: document.body,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const results = await axe(wrapper.element)
|
|
41
|
+
assertNoA11yViolations(results, 'ToolbarContainer with custom content')
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
it('should not have any axe violations with disabled buttons', async () => {
|
|
45
|
+
const wrapper = mount(ToolbarContainer, {
|
|
46
|
+
slots: {
|
|
47
|
+
default: `
|
|
48
|
+
<VBtn>Action 1</VBtn>
|
|
49
|
+
<VBtn disabled>Action 2</VBtn>
|
|
50
|
+
<VBtn>Action 3</VBtn>
|
|
51
|
+
`,
|
|
52
|
+
},
|
|
53
|
+
attachTo: document.body,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const results = await axe(wrapper.element)
|
|
57
|
+
assertNoA11yViolations(results, 'ToolbarContainer with disabled buttons')
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it('should not have any axe violations with links and buttons', async () => {
|
|
61
|
+
const wrapper = mount(ToolbarContainer, {
|
|
62
|
+
slots: {
|
|
63
|
+
default: `
|
|
64
|
+
<VBtn>Action Button</VBtn>
|
|
65
|
+
<a href="#home" aria-label="Accueil">Home Link</a>
|
|
66
|
+
<input type="text" placeholder="Rechercher" aria-label="Recherche" />
|
|
67
|
+
`,
|
|
68
|
+
},
|
|
69
|
+
attachTo: document.body,
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
const results = await axe(wrapper.element)
|
|
73
|
+
assertNoA11yViolations(results, 'ToolbarContainer with mixed focusable elements')
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
it('should have proper toolbar role and attributes', async () => {
|
|
77
|
+
const wrapper = mount(ToolbarContainer, {
|
|
78
|
+
slots: {
|
|
79
|
+
default: `
|
|
80
|
+
<VBtn>Action 1</VBtn>
|
|
81
|
+
<VBtn>Action 2</VBtn>
|
|
82
|
+
`,
|
|
83
|
+
},
|
|
84
|
+
attachTo: document.body,
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const toolbar = wrapper.find('.sy-toolbar')
|
|
88
|
+
|
|
89
|
+
expect(toolbar.exists()).toBe(true)
|
|
90
|
+
expect(toolbar.attributes('role')).toBe('toolbar')
|
|
91
|
+
expect(toolbar.attributes('tabindex')).toBe('0')
|
|
92
|
+
|
|
93
|
+
const results = await axe(wrapper.element)
|
|
94
|
+
assertNoA11yViolations(results, 'ToolbarContainer role and attributes')
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
it('should handle keyboard navigation accessibility', async () => {
|
|
98
|
+
const wrapper = mount(ToolbarContainer, {
|
|
99
|
+
slots: {
|
|
100
|
+
default: `
|
|
101
|
+
<VBtn>Action 1</VBtn>
|
|
102
|
+
<VBtn>Action 2</VBtn>
|
|
103
|
+
<VBtn>Action 3</VBtn>
|
|
104
|
+
`,
|
|
105
|
+
},
|
|
106
|
+
attachTo: document.body,
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
const toolbar = wrapper.find('.sy-toolbar')
|
|
110
|
+
const buttons = wrapper.findAll('button.v-btn')
|
|
111
|
+
|
|
112
|
+
// Vérifier que les boutons ont le tabindex approprié
|
|
113
|
+
expect(buttons[0]?.attributes('tabindex')).toBe('-1')
|
|
114
|
+
expect(buttons[1]?.attributes('tabindex')).toBe('-1')
|
|
115
|
+
expect(buttons[2]?.attributes('tabindex')).toBe('-1')
|
|
116
|
+
|
|
117
|
+
// Simuler le focus sur la toolbar
|
|
118
|
+
await toolbar.trigger('focus')
|
|
119
|
+
|
|
120
|
+
// Après le focus, le premier bouton devrait être focusable
|
|
121
|
+
expect(buttons[0]?.attributes('tabindex')).toBe('0')
|
|
122
|
+
|
|
123
|
+
const results = await axe(wrapper.element)
|
|
124
|
+
assertNoA11yViolations(results, 'ToolbarContainer keyboard navigation')
|
|
125
|
+
})
|
|
126
|
+
})
|
|
@@ -123,7 +123,7 @@ exports[`UploadWorkflow > render the upload list 1`] = `
|
|
|
123
123
|
data-no-activator=""
|
|
124
124
|
>
|
|
125
125
|
<span>
|
|
126
|
-
Importer
|
|
126
|
+
Importer le fichier
|
|
127
127
|
</span>
|
|
128
128
|
</span>
|
|
129
129
|
<!---->
|
|
@@ -239,7 +239,7 @@ exports[`UploadWorkflow > render the upload list 1`] = `
|
|
|
239
239
|
data-no-activator=""
|
|
240
240
|
>
|
|
241
241
|
<span>
|
|
242
|
-
Importer
|
|
242
|
+
Importer le fichier
|
|
243
243
|
</span>
|
|
244
244
|
</span>
|
|
245
245
|
<!---->
|
package/src/components/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export { default as SyTextField } from './Customs/SyTextField/SyTextField.vue'
|
|
|
61
61
|
export { default as DiacriticPicker } from './DiacriticPicker/DiacriticPicker.vue'
|
|
62
62
|
export { default as FileUpload } from './FileUpload/FileUpload.vue'
|
|
63
63
|
export { default as LunarCalendar } from './LunarCalendar/LunarCalendar.vue'
|
|
64
|
+
export { default as MonthPicker } from './MonthPicker/MonthPicker.vue'
|
|
64
65
|
export { default as NirField } from './NirField/NirField.vue'
|
|
65
66
|
export * from './NirField/nirValidation'
|
|
66
67
|
export { default as PasswordField } from './PasswordField/PasswordField.vue'
|
|
@@ -120,14 +120,10 @@ describe('useDatePickerAccessibility', () => {
|
|
|
120
120
|
expect(buttons[2]?.getAttribute('aria-label')).toBe(null) // Pas de chevron-righ
|
|
121
121
|
})
|
|
122
122
|
|
|
123
|
-
it('
|
|
124
|
-
// Appeler updateAccessibility
|
|
123
|
+
it('ne crée pas de bloc sr-only instructions (comportement actuel)', async () => {
|
|
125
124
|
await updateAccessibility()
|
|
126
|
-
|
|
127
|
-
// Vérifier que les instructions pour les lecteurs d'écran ont été ajoutées
|
|
128
125
|
const srOnlyEl = document.querySelector('.sr-only-instructions')
|
|
129
|
-
expect(srOnlyEl).
|
|
130
|
-
expect(srOnlyEl?.textContent).toBe('Utilisez tab pour naviguer entre les dates et Entrée ou Espace pour sélectionner une date')
|
|
126
|
+
expect(srOnlyEl).toBeNull()
|
|
131
127
|
})
|
|
132
128
|
|
|
133
129
|
describe('handleKeyDown', () => {
|