@cnamts/synapse 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DateFilter-isr8mXVb.js → DateFilter-RHtdShO1.js} +12 -12
- package/dist/{NumberFilter-BOe7DqWX.js → NumberFilter-DXYz_b_w.js} +1 -1
- package/dist/{PeriodFilter-WTprpO40.js → PeriodFilter-CzphmrNu.js} +1 -1
- package/dist/{SelectFilter-CqlG5dmI.js → SelectFilter-a4fUV5Jp.js} +1 -1
- package/dist/{TextFilter-fVW5bsRw.js → TextFilter-CZ4LTKoq.js} +1 -1
- package/dist/components/Accordion/Accordion.d.ts +22 -7
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +2836 -2845
- package/dist/components/Amelipro/AmeliproCallback/AmeliproCallback.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproFooter/AmeliproFooter.d.ts +18 -18
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeader.d.ts +9 -9
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproIcon/AmeliproIcon.d.ts +3 -1
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +5 -3
- package/dist/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproMenu/AmeliproMenu.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.d.ts +40 -8
- package/dist/components/Amelipro/AmeliproPatientLogged/types.d.ts +2 -1
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +1288 -1284
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +1936 -1930
- package/dist/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +2838 -2865
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +2849 -2867
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +397 -397
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +653 -642
- package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +233 -5
- package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +6 -2
- package/dist/components/Amelipro/AmeliproTransmission/AmeliproTransmission.d.ts +9 -9
- package/dist/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.d.ts +9 -0
- package/dist/components/Amelipro/StructureMenu/StructureItem/types.d.ts +1 -0
- package/dist/components/Amelipro/StructureMenu/StructureMenu.d.ts +9 -0
- package/dist/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.d.ts +23 -2
- package/dist/components/Captcha/CaptchaHelpdesk.d.ts +6 -0
- package/dist/components/ChipList/locales.d.ts +1 -0
- package/dist/components/CookieBanner/CookieBanner.d.ts +117 -119
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +484 -484
- package/dist/components/CookiesSelection/CookiesSelection.d.ts +104 -106
- package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +14 -10
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +118 -129
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +1 -3
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1 -1
- package/dist/components/Customs/SyForm/SyForm.d.ts +60 -53
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +88 -0
- package/dist/components/Customs/SyRadioGroup/locales.d.ts +3 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +644 -642
- package/dist/components/DataList/DataList.d.ts +6 -1
- package/dist/components/DataListGroup/DataListGroup.d.ts +14 -2
- package/dist/components/DataListItem/DataListItem.d.ts +3 -0
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +2986 -3098
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +1456 -1558
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +653 -652
- package/dist/components/DatePicker/composables/index.d.ts +4 -1
- package/dist/components/DatePicker/composables/useAsteriskDisplay.d.ts +1 -1
- package/dist/components/DatePicker/composables/useCalendarKeyboardNavigation.d.ts +11 -0
- package/dist/components/DatePicker/composables/useDatePickerState.d.ts +25 -0
- package/dist/components/DatePicker/composables/useDateTextField.d.ts +61 -0
- package/dist/components/DatePicker/composables/useHolidayHighlighting.d.ts +15 -0
- package/dist/components/DatePicker/constants/messages.d.ts +0 -1
- package/dist/components/DialogBox/DialogBox.d.ts +177 -179
- package/dist/components/DialogBox/config.d.ts +4 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +170 -173
- package/dist/components/FilterSideBar/locales.d.ts +5 -0
- package/dist/components/FooterBar/FooterBar.d.ts +5 -5
- package/dist/components/HeaderBar/HeaderBar.d.ts +4 -2
- package/dist/components/HeaderBar/HeaderLogo/HeaderLogo.d.ts +1 -1
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +15 -5
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +5 -1
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +234 -258
- package/dist/components/LangBtn/LangBtn.d.ts +173 -179
- package/dist/components/LogoBrandSection/LogoBrandSection.d.ts +1 -1
- package/dist/components/LunarCalendar/LunarCalendar.d.ts +29 -0
- package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +5 -0
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +13 -0
- package/dist/components/MaintenancePage/MaintenancePage.d.ts +8 -1
- package/dist/components/NirField/NirField.d.ts +1296 -1292
- package/dist/components/NotFoundPage/NotFoundPage.d.ts +9 -2
- package/dist/components/NotificationBar/Notification/Notification.d.ts +30 -0
- package/dist/components/NotificationBar/NotificationBar.d.ts +32 -20
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +1 -1
- package/dist/components/PeriodField/PeriodField.d.ts +5855 -6079
- package/dist/components/PhoneField/PhoneField.d.ts +645 -643
- package/dist/components/SubHeader/SubHeader.d.ts +11 -8
- package/dist/components/SyAlert/SyAlert.d.ts +31 -31
- package/dist/components/SyTextArea/SyTextArea.d.ts +397 -395
- package/dist/components/SyTextArea/locales.d.ts +1 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +193 -227
- package/dist/components/Tables/SyTable/SyTable.d.ts +192 -226
- package/dist/components/Tables/common/SyTableFilter.d.ts +1 -1
- package/dist/components/Tables/common/SyTablePagination.d.ts +118 -129
- package/dist/components/Tables/common/TableHeader.d.ts +52 -2
- package/dist/components/Tables/common/filters/DateFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/NumberFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/PeriodFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/SelectFilter.d.ts +1 -1
- package/dist/components/Tables/common/filters/TextFilter.d.ts +1 -1
- package/dist/components/Tables/common/locales.d.ts +1 -0
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +86 -90
- package/dist/components/Tables/common/tableFilterUtils.d.ts +2 -2
- package/dist/components/Tables/common/types.d.ts +3 -2
- package/dist/components/Tables/common/useTableCheckbox.d.ts +3 -2
- package/dist/components/Tables/common/useTableFilter.d.ts +1 -1
- package/dist/components/Tables/common/useTableItems.d.ts +6 -8
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +18 -18
- package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/design-system-v3.js +101 -98
- package/dist/design-system-v3.umd.cjs +25 -33
- package/dist/directives/lockFocus.d.ts +1 -1
- package/dist/main-BXIMMzFS.js +35408 -0
- package/dist/style.css +1 -1
- package/dist/utils/formatNir/formatNir.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/insertAt.d.ts +1 -0
- package/dist/utils/rules/validateDateValue.d.ts +14 -0
- package/dist/vuetifyConfig.d.ts +6 -6
- package/package.json +14 -7
- package/src/assets/tokens.scss +2 -0
- package/src/components/Accordion/Accessibilite/AccessibilityGuide.mdx +70 -241
- package/src/components/Accordion/Accordion.mdx +6 -1
- package/src/components/Accordion/Accordion.stories.ts +88 -9
- package/src/components/Accordion/Accordion.vue +56 -24
- package/src/components/Accordion/tests/Accordion.a11y.spec.ts +46 -0
- package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +26 -30
- package/src/components/Accordion/tests/accordion.spec.ts +27 -26
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/__tests__/__snapshots__/AmeliproAccordionTemplate.spec.ts.snap +1 -18
- package/src/components/Amelipro/AmeliproAccordion/__tests__/AmeliproAccordion.spec.ts +178 -9
- package/src/components/Amelipro/AmeliproAccordion/__tests__/__snapshots__/AmeliproAccordion.spec.ts.snap +28 -121
- package/src/components/Amelipro/AmeliproAccordionFrieze/__tests__/__snapshots__/AmeliproAccordionFrieze.spec.ts.snap +15 -270
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +12 -194
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +1 -18
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +1 -18
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +12 -194
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.stories.ts +9 -9
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +5 -4
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/AmeliproAutoCompleteField.spec.ts +6 -6
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +2 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +135 -9
- package/src/components/Amelipro/AmeliproBadge/__tests__/__snapshots__/AmeliproBadge.spec.ts.snap +20 -5
- package/src/components/Amelipro/AmeliproBreadcrumb/__tests__/AmeliproBreadcrumb.spec.ts +195 -28
- package/src/components/Amelipro/AmeliproBreadcrumb/__tests__/__snapshots__/AmeliproBreadcrumb.spec.ts.snap +193 -124
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.vue +1 -1
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/AmeliproCaptcha.spec.ts +364 -12
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/__snapshots__/AmeliproCaptcha.spec.ts.snap +30 -390
- package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +4 -36
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.stories.ts +10 -10
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +7 -7
- package/src/components/Amelipro/AmeliproCheckbox/__tests__/AmeliproCheckbox.spec.ts +5 -5
- package/src/components/Amelipro/AmeliproCheckbox/__tests__/__snapshots__/AmeliproCheckbox.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.stories.ts +7 -6
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +6 -6
- package/src/components/Amelipro/AmeliproCheckboxGroup/__tests__/AmeliproCheckboxGroup.spec.ts +6 -6
- package/src/components/Amelipro/AmeliproCheckboxGroup/__tests__/__snapshots__/AmeliproCheckboxGroup.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -43
- package/src/components/Amelipro/AmeliproContentLayout/__tests__/AmeliproContentLayout.spec.ts +80 -9
- package/src/components/Amelipro/AmeliproContentLayout/__tests__/__snapshots__/AmeliproContentLayout.spec.ts.snap +25 -4
- package/src/components/Amelipro/AmeliproCopyBtn/__tests__/__snapshots__/AmeliproCopyBtn.spec.ts.snap +1 -13
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.stories.ts +7 -6
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +5 -5
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/AmeliproCustomSelector.spec.ts +187 -39
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/__snapshots__/AmeliproCustomSelector.spec.ts.snap +147 -147
- package/src/components/Amelipro/AmeliproDentalChart/tests/__snapshots__/AmeliproDentalChart.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproDialog/__tests__/__snapshots__/AmeliproDialog.spec.ts.snap +0 -2
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/AmeliproErrorTemplate.spec.ts +160 -20
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/__snapshots__/AmeliproErrorTemplate.spec.ts.snap +34 -177
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +1 -0
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/AmeliproFilePreview.spec.ts +248 -19
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/__snapshots__/AmeliproFilePreview.spec.ts.snap +34 -203
- package/src/components/Amelipro/AmeliproFirstLogin/__tests__/__snapshots__/AmeliproFirstLogin.spec.ts.snap +6 -144
- package/src/components/Amelipro/AmeliproIcon/AmeliproIcon.vue +20 -2
- package/src/components/Amelipro/AmeliproIcon/__tests__/__snapshots__/AmeliproIcon.spec.ts.snap +1 -25
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.stories.ts +5 -5
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -6
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/__tests__/AmeliproIllustratedRadioGroup.spec.ts +22 -22
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/__tests__/__snapshots__/AmeliproIllustratedRadioGroup.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/__tests__/AmeliproMultipleFoldingCard.spec.ts +304 -0
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/__tests__/__snapshots__/AmeliproMultipleFoldingCard.spec.ts.snap +373 -0
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.stories.ts +64 -34
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +75 -16
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/AmeliproPatientLogged.spec.ts +4 -2
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/__snapshots__/AmeliproPatientLogged.spec.ts.snap +63 -177
- package/src/components/Amelipro/AmeliproPatientLogged/types.d.ts +2 -1
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.stories.ts +11 -5
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +9 -1
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +162 -72
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/AmeliproPostalAddressCityRow.spec.ts +2 -2
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/__snapshots__/AmeliproPostalAddressCityRow.spec.ts.snap +6 -39
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.stories.ts +3 -3
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +8 -8
- package/src/components/Amelipro/AmeliproPostalAddressField/{tests → __tests__}/AmeliproPostalAddressField.spec.ts +2 -2
- package/src/components/Amelipro/AmeliproPostalAddressField/{tests → __tests__}/__snapshots__/AmeliproPostalAddressField.spec.ts.snap +11 -52
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.stories.ts +7 -7
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +8 -8
- package/src/components/Amelipro/AmeliproRadioGroup/__tests__/AmeliproRadioGroup.spec.ts +6 -6
- package/src/components/Amelipro/AmeliproRadioGroup/__tests__/__snapshots__/AmeliproRadioGroup.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +2 -14
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.stories.ts +7 -7
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +41 -5
- package/src/components/Amelipro/AmeliproSelect/__tests__/AmeliproSelect.spec.ts +12 -12
- package/src/components/Amelipro/AmeliproSelect/__tests__/__snapshots__/AmeliproSelect.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +2 -2
- package/src/components/Amelipro/AmeliproStepper/__tests__/__snapshots__/AmeliproStepper.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +2 -2
- package/src/components/Amelipro/AmeliproTable/__tests__/AmeliproTable.spec.ts +463 -68
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +176 -511
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.stories.ts +94 -0
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +6 -2
- package/src/components/Amelipro/AmeliproTabs/__tests__/AmeliproTabs.spec.ts +4 -0
- package/src/components/Amelipro/AmeliproTabs/__tests__/__snapshots__/AmeliproTabs.spec.ts.snap +4 -2
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.stories.ts +6 -6
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -4
- package/src/components/Amelipro/AmeliproTextArea/__tests__/AmeliproTextArea.spec.ts +3 -3
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +1 -2
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.stories.ts +78 -10
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +114 -6
- package/src/components/Amelipro/AmeliproTextField/__tests__/AmeliproTextField.spec.ts +19 -7
- package/src/components/Amelipro/AmeliproTextField/__tests__/__snapshots__/AmeliproTextField.spec.ts.snap +2 -0
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +44 -0
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +79 -1
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.stories.ts +45 -0
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +6 -0
- package/src/components/Amelipro/AmeliproTooltips/__tests__/__snapshots__/AmeliproTooltips.spec.ts.snap +0 -2
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.stories.ts +2 -2
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +21 -7
- package/src/components/Amelipro/AmeliproUpload/__tests__/AmeliproUpload.spec.ts +252 -44
- package/src/components/Amelipro/AmeliproUpload/__tests__/__snapshots__/AmeliproUpload.spec.ts.snap +166 -0
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/__tests__/ServiceBtn.spec.ts +137 -0
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/__tests__/__snapshots__/ServiceBtn.spec.ts.snap +56 -0
- package/src/components/Amelipro/ServiceMenu/ServiceList/__tests__/ServiceList.spec.ts +116 -0
- package/src/components/Amelipro/ServiceMenu/ServiceList/__tests__/__snapshots__/ServiceList.spec.ts.snap +58 -0
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/__tests__/ServiceMenuContent.spec.ts +118 -0
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/__tests__/__snapshots__/ServiceMenuContent.spec.ts.snap +151 -0
- package/src/components/Amelipro/ServiceMenu/__tests__/ServiceMenu.spec.ts +259 -0
- package/src/components/Amelipro/ServiceMenu/__tests__/__snapshots__/ServiceMenu.spec.ts.snap +102 -0
- package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +13 -0
- package/src/components/Amelipro/StructureMenu/StructureBtn/__tests__/StructureBtn.spec.ts +96 -0
- package/src/components/Amelipro/StructureMenu/StructureBtn/__tests__/__snapshots__/StructureBtn.spec.ts.snap +63 -0
- package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +14 -2
- package/src/components/Amelipro/StructureMenu/StructureItem/__tests__/StructureItem.spec.ts +133 -0
- package/src/components/Amelipro/StructureMenu/StructureItem/__tests__/__snapshots__/StructureItem.spec.ts.snap +159 -0
- package/src/components/Amelipro/StructureMenu/StructureItem/types.d.ts +1 -0
- package/src/components/Amelipro/StructureMenu/StructureList/__tests__/StructureList.spec.ts +190 -0
- package/src/components/Amelipro/StructureMenu/StructureList/__tests__/__snapshots__/StructureList.spec.ts.snap +109 -0
- package/src/components/Amelipro/StructureMenu/StructureMenu.stories.ts +93 -63
- package/src/components/Amelipro/StructureMenu/StructureMenu.vue +5 -0
- package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +22 -1
- package/src/components/Amelipro/StructureMenu/StructureTabs/__tests__/StructureTabs.spec.ts +163 -0
- package/src/components/Amelipro/StructureMenu/StructureTabs/__tests__/__snapshots__/StructureTabs.spec.ts.snap +105 -0
- package/src/components/Amelipro/StructureMenu/__tests__/StructureMenu.spec.ts +171 -0
- package/src/components/Amelipro/StructureMenu/__tests__/__snapshots__/StructureMenu.spec.ts.snap +39 -0
- package/src/components/Amelipro/UserInformationSummary/__tests__/UserInformationSummary.spec.ts +140 -0
- package/src/components/Amelipro/UserInformationSummary/{tests → __tests__}/__snapshots__/UserInformationSummary.spec.ts.snap +17 -24
- package/src/components/Amelipro/UserMenu/UserMenu.stories.ts +3 -3
- package/src/components/Amelipro/UserMenu/UserMenu.vue +2 -2
- package/src/components/Amelipro/UserMenu/UserMenuDetails/__tests__/UserMenuDetails.spec.ts +150 -0
- package/src/components/Amelipro/UserMenu/UserMenuDetails/__tests__/__snapshots__/UserMenuDetails.spec.ts.snap +117 -0
- package/src/components/Amelipro/UserMenu/__tests__/UserMenu.spec.ts +141 -0
- package/src/components/Amelipro/UserMenu/__tests__/__snapshots__/UserMenu.spec.ts.snap +103 -0
- package/src/components/BackBtn/tests/BackBtn.a11y.spec.ts +20 -0
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +9 -0
- package/src/components/BackToTopBtn/tests/BackToTopBtn.a11y.spec.ts +37 -0
- package/src/components/Captcha/Captcha.vue +9 -24
- package/src/components/Captcha/CaptchaHelpdesk.vue +42 -0
- package/src/components/Captcha/tests/Captcha.a11y.spec.ts +49 -0
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +256 -268
- package/src/components/ChipList/ChipList.stories.ts +15 -0
- package/src/components/ChipList/ChipList.vue +20 -17
- package/src/components/ChipList/locales.ts +1 -0
- package/src/components/ChipList/tests/ChipList.a11y.spec.ts +40 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +67 -11
- package/src/components/CollapsibleList/tests/CollapsibleList.a11y.spec.ts +38 -0
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +3 -0
- package/src/components/ContextualMenu/tests/ContextualMenu.a11y.spec.ts +30 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +15 -0
- package/src/components/CookieBanner/CookieBanner.vue +0 -1
- package/src/components/CookieBanner/tests/CookieBanner.a11y.spec.ts +29 -0
- package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.a11y.spec.ts +46 -0
- package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.a11y.spec.ts +37 -0
- package/src/components/CookiesSelection/tests/CookiesSelection.a11y.spec.ts +58 -0
- package/src/components/CopyBtn/CopyBtn.stories.ts +21 -0
- package/src/components/CopyBtn/tests/CopyBtn.a11y.spec.ts +40 -0
- package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +0 -1
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.stories.ts +4 -0
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +154 -82
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +229 -125
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +12 -12
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +344 -826
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts +30 -0
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.vue +1 -0
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +27 -0
- package/src/components/Customs/Selects/SySelect/SySelect.vue +215 -169
- package/src/components/Customs/Selects/SySelect/composables/tests/useSySelectKeyboard.spec.ts +4 -2
- package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +7 -9
- package/src/components/Customs/Selects/SySelect/tests/SySelect.a11y.spec.ts +40 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +7 -3
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +20 -2
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.a11y.spec.ts +26 -0
- package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +33 -0
- package/src/components/Customs/SyForm/SyForm.mdx +47 -7
- package/src/components/Customs/SyForm/SyForm.stories.ts +38 -34
- package/src/components/Customs/SyForm/SyForm.vue +27 -6
- package/src/components/Customs/SyIcon/SyIcon.a11y.spec.ts +37 -0
- package/src/components/Customs/SyIcon/SyIcon.stories.ts +5 -0
- package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +27 -0
- package/src/components/Customs/SyRadioGroup/Accessibilite.mdx +263 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.mdx +37 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.stories.ts +665 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +324 -0
- package/src/components/Customs/SyRadioGroup/locales.ts +3 -0
- package/src/components/Customs/SyRadioGroup/tests/SyRadioGroup.a11y.spec.ts +30 -0
- package/src/components/Customs/SyRadioGroup/tests/SyRadioGroup.spec.ts +135 -0
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +33 -0
- package/src/components/Customs/SyTabs/SyTabs.vue +1 -1
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +51 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +3 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +232 -199
- package/src/components/Customs/SyTextField/tests/SyTextField.a11y.spec.ts +27 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +32 -2
- package/src/components/DataList/DataList.mdx +3 -1
- package/src/components/DataList/DataList.stories.ts +67 -17
- package/src/components/DataList/DataList.vue +13 -1
- package/src/components/DataList/tests/DataList.a11y.spec.ts +35 -0
- package/src/components/DataListGroup/DataListGroup.stories.ts +42 -12
- package/src/components/DataListGroup/DataListGroup.vue +14 -1
- package/src/components/DataListGroup/tests/DataListGroup.a11y.spec.ts +24 -0
- package/src/components/DataListItem/DataListItem.vue +10 -2
- package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +31 -0
- package/src/components/DataListItem/tests/DataListItem.spec.ts +1 -1
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +45 -0
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +230 -205
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +27 -0
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.events.spec.ts +5 -0
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.spec.ts +179 -179
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +54 -0
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +337 -278
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +26 -0
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +234 -827
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +12 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +46 -81
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +27 -0
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.spec.ts +350 -0
- package/src/components/DatePicker/composables/index.ts +4 -1
- package/src/components/DatePicker/composables/tests/useCalendarKeyboardNavigation.spec.ts +270 -0
- package/src/components/DatePicker/composables/tests/useDatePickerViewMode.spec.ts +61 -3
- package/src/components/DatePicker/composables/tests/useDateRangeInput.spec.ts +198 -0
- package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +36 -2
- package/src/components/DatePicker/composables/tests/useInputHandler.spec.ts +755 -0
- package/src/components/DatePicker/composables/tests/useKeyboardEvents.spec.ts +168 -0
- package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +40 -34
- package/src/components/DatePicker/composables/useAsteriskDisplay.ts +1 -2
- package/src/components/DatePicker/composables/useCalendarKeyboardNavigation.ts +155 -0
- package/src/components/DatePicker/composables/useDatePickerState.ts +163 -0
- package/src/components/DatePicker/composables/useDateRangeInput.ts +4 -8
- package/src/components/DatePicker/composables/useDateTextField.ts +156 -0
- package/src/components/DatePicker/composables/useHolidayHighlighting.ts +64 -0
- package/src/components/DatePicker/composables/useInputHandler.ts +25 -19
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +51 -26
- package/src/components/DatePicker/constants/messages.ts +0 -1
- package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +2 -2
- package/src/components/DatePicker/playground/ComplexDatePickerPlayground.vue +16 -8
- package/src/components/DiacriticPicker/tests/DiacriticPicker.a11y.spec.ts +46 -0
- package/src/components/DialogBox/DialogBox.stories.ts +5 -2
- package/src/components/DialogBox/DialogBox.vue +5 -0
- package/src/components/DialogBox/config.ts +5 -0
- package/src/components/DialogBox/tests/DialogBox.a11y.spec.ts +43 -0
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +26 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +60 -0
- package/src/components/ErrorPage/ErrorPage.vue +1 -1
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +29 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +17 -0
- package/src/components/ExternalLinks/ExternalLinks.stories.ts +21 -0
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +39 -0
- package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +0 -1
- package/src/components/FileList/FileList.stories.ts +3 -0
- package/src/components/FileList/tests/FileList.a11y.spec.ts +41 -0
- package/src/components/FilePreview/FilePreview.stories.ts +3 -0
- package/src/components/FilePreview/tests/FilePreview.a11y.spec.ts +47 -0
- package/src/components/FileUpload/tests/FileUpload.a11y.spec.ts +25 -0
- package/src/components/FilterInline/FilterInline.stories.ts +15 -0
- package/src/components/FilterInline/FilterInline.vue +8 -4
- package/src/components/FilterInline/tests/FilterInline.a11y.spec.ts +36 -0
- package/src/components/FilterInline/tests/__snapshots__/FilterInline.spec.ts.snap +0 -3
- package/src/components/FilterSideBar/Accessibilite.stories.ts +4 -0
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +33 -11
- package/src/components/FilterSideBar/FilterSideBar.vue +146 -83
- package/src/components/FilterSideBar/locales.ts +6 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +59 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +2 -2
- package/src/components/FooterBar/Accessibilite.mdx +67 -11
- package/src/components/FooterBar/FooterBar.vue +1 -1
- package/src/components/FooterBar/config.ts +2 -2
- package/src/components/FooterBar/tests/FooterBar.a11y.spec.ts +31 -0
- package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +1 -1
- package/src/components/FranceConnectBtn/tests/FranceConnectBtn.a11y.spec.ts +25 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +21 -0
- package/src/components/HeaderBar/HeaderBar.vue +47 -40
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +12 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +4 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +17 -7
- package/src/components/HeaderBar/consts.scss +0 -1
- package/src/components/HeaderBar/tests/HeaderBar.a11y.spec.ts +33 -0
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +58 -57
- package/src/components/HeaderLoading/tests/HeaderLoading.a11y.spec.ts +25 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +42 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +4 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +6 -2
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +45 -0
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +6 -0
- package/src/components/HeaderToolbar/HeaderToolbar.vue +0 -3
- package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +25 -0
- package/src/components/LangBtn/LangBtn.stories.ts +12 -0
- package/src/components/LangBtn/tests/LangBtn.a11y.spec.ts +25 -0
- package/src/components/Logo/tests/Logo.a11y.spec.ts +20 -0
- package/src/components/LogoBrandSection/tests/LogoBrandSection.a11y.spec.ts +38 -0
- package/src/components/LunarCalendar/LunarCalendar.mdx +33 -0
- package/src/components/LunarCalendar/LunarCalendar.stories.ts +232 -0
- package/src/components/LunarCalendar/LunarCalendar.vue +57 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +31 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +79 -0
- package/src/components/LunarCalendar/useLunarCalendarRules.ts +96 -0
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +47 -0
- package/src/components/MaintenancePage/MaintenancePage.stories.ts +46 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +7 -5
- package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +21 -0
- package/src/components/NirField/NirField.stories.ts +6 -0
- package/src/components/NirField/tests/NirField.a11y.spec.ts +32 -0
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +56 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +7 -5
- package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +31 -0
- package/src/components/NotificationBar/Notification/Notification.vue +203 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +151 -140
- package/src/components/NotificationBar/NotificationBar.vue +148 -202
- package/src/components/NotificationBar/config.ts +1 -1
- package/src/components/NotificationBar/tests/NotificationBar.a11y.spec.ts +66 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +173 -177
- package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +67 -29
- package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +27 -0
- package/src/components/PaginatedTable/PaginatedTable.stories.ts +21 -10
- package/src/components/PaginatedTable/PaginatedTable.vue +72 -36
- package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +43 -0
- package/src/components/PasswordField/PasswordField.stories.ts +39 -0
- package/src/components/PasswordField/tests/PasswordField.a11y.spec.ts +26 -0
- package/src/components/PeriodField/tests/PeriodField.a11y.spec.ts +31 -0
- package/src/components/PhoneField/PhoneField.stories.ts +51 -0
- package/src/components/PhoneField/PhoneField.vue +102 -83
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +34 -0
- package/src/components/RangeField/tests/RangeField.a11y.spec.ts +32 -0
- package/src/components/RatingPicker/RatingPicker.stories.ts +21 -0
- package/src/components/SearchListField/tests/SearchListField.spec.ts +7 -53
- package/src/components/SkipLink/Accessibilite.mdx +59 -13
- package/src/components/SkipLink/SkipLink.stories.ts +41 -8
- package/src/components/SubHeader/SubHeader.stories.ts +178 -92
- package/src/components/SubHeader/SubHeader.vue +84 -71
- package/src/components/SubHeader/config.ts +1 -1
- package/src/components/SyAlert/SyAlert.vue +6 -3
- package/src/components/SyTextArea/SyTextArea.stories.ts +40 -0
- package/src/components/SyTextArea/SyTextArea.vue +13 -0
- package/src/components/SyTextArea/locales.ts +1 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +42 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +3 -0
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +24 -72
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +591 -24
- package/src/components/Tables/SyServerTable/SyServerTable.vue +19 -13
- package/src/components/Tables/SyTable/FilterRules.stories.ts +12 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +460 -18
- package/src/components/Tables/SyTable/SyTable.vue +16 -11
- package/src/components/Tables/common/TableHeader.vue +16 -7
- package/src/components/Tables/common/filters/DateFilter.vue +1 -1
- package/src/components/Tables/common/locales.ts +1 -0
- package/src/components/Tables/common/tableFilterUtils.ts +3 -3
- package/src/components/Tables/common/types.ts +4 -2
- package/src/components/Tables/common/useTableCheckbox.ts +4 -3
- package/src/components/Tables/common/useTableFilter.ts +2 -2
- package/src/components/Tables/common/useTableItems.ts +4 -19
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +31 -1
- package/src/components/UserMenuBtn/UserMenuBtn.vue +2 -1
- package/src/components/UserMenuBtn/tests/UserMenuBtn.a11y.spec.ts +31 -0
- package/src/components/index.ts +2 -0
- package/src/composables/validation/tests/useFormValidation.spec.ts +251 -0
- package/src/composables/validation/tests/useValidatable.spec.ts +90 -0
- package/src/directives/lockFocus.ts +12 -2
- package/src/stories/Accessibilite/Audit/Exemptions-derogations.mdx +241 -0
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +17 -10
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +16 -0
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +160 -106
- package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +2 -1
- package/src/stories/GuideDuDev/ClassesUtilitaires/DataUtilities.mdx +6 -6
- package/src/stories/GuideDuDev/ClassesUtilitaires/DomBrowserUtilities.mdx +52 -59
- package/src/stories/GuideDuDev/ClassesUtilitaires/FormattingUtilities.mdx +28 -8
- package/src/stories/GuideDuDev/ClassesUtilitaires/StorageUtilities.mdx +2 -2
- package/src/stories/GuideDuDev/ClassesUtilitaires/ValidationRules.mdx +3 -3
- package/src/stories/GuideDuDev/ClassesUtilitaires/ValidationUtilities.mdx +11 -11
- package/src/stories/GuideDuDev/ClassesUtilitaires/index.mdx +24 -14
- package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +1 -1
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/accessibility/AccessibilityGuideLayout.mdx +87 -0
- package/src/stories/styles/accessibility-guide.css +153 -0
- package/src/utils/formatNir/formatNir.ts +15 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/insertAt.ts +11 -0
- package/src/utils/rules/isDateValid/IsDateValid.mdx +2 -2
- package/src/utils/rules/isDateValid/IsDateValid.stories.ts +6 -4
- package/src/utils/rules/isDateValid/index.ts +23 -8
- package/src/utils/rules/isDateValid/tests/isDateValid.spec.ts +9 -0
- package/src/utils/rules/isExactLength/IsExactLenght.mdx +1 -1
- package/src/utils/rules/isHolidayDay/IsHolidayDay.mdx +19 -7
- package/src/utils/rules/isHolidayDay/index.ts +6 -8
- package/src/utils/rules/isHolidayDay/tests/isHolidayDay.spec.ts +13 -1
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.mdx +2 -2
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.stories.ts +9 -2
- package/src/utils/rules/isNotAfterDate/index.ts +5 -12
- package/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.ts +20 -0
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.mdx +2 -2
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.stories.ts +8 -2
- package/src/utils/rules/isNotAfterToday/index.ts +6 -6
- package/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.ts +20 -0
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.mdx +2 -2
- package/src/utils/rules/isNotBeforeDate/index.ts +5 -12
- package/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.ts +20 -0
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.mdx +2 -2
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.stories.ts +8 -2
- package/src/utils/rules/isNotBeforeToday/index.ts +6 -6
- package/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.ts +19 -0
- package/src/utils/rules/validateDateValue.ts +37 -0
- package/src/vuetifyConfig.ts +6 -2
- package/dist/components/Customs/Selects/SelectBtnField/config.d.ts +0 -11
- package/dist/components/DatePicker/composables/useIconState.d.ts +0 -17
- package/dist/components/DatePicker/tests/setup.d.ts +0 -75370
- package/dist/components/Tables/common/formatters.d.ts +0 -17
- package/dist/main-CbBVJ_le.js +0 -34377
- package/dist/stories/Accessibilite/Vuetify/VuetifyItems.d.ts +0 -70
- package/dist/stories/DesignTokens/StylesTypographiques.stories.new.d.ts +0 -8
- package/dist/stories/DesignTokens/TypographyDisplay.d.ts +0 -28
- package/dist/stories/DesignTokens/vue-shims.d.ts +0 -6
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/tests/AmeliproMultipleFoldingCard.spec.ts +0 -40
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/tests/__snapshots__/AmeliproMultipleFoldingCard.spec.ts.snap +0 -369
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/tests/ServiceBtn.spec.ts +0 -21
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/tests/__snapshots__/ServiceBtn.spec.ts.snap +0 -100
- package/src/components/Amelipro/ServiceMenu/ServiceList/tests/ServiceList.spec.ts +0 -25
- package/src/components/Amelipro/ServiceMenu/ServiceList/tests/__snapshots__/ServiceList.spec.ts.snap +0 -245
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/tests/ServiceMenuContent.spec.ts +0 -45
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/tests/__snapshots__/ServiceMenuContent.spec.ts.snap +0 -787
- package/src/components/Amelipro/ServiceMenu/tests/ServiceMenu.spec.ts +0 -46
- package/src/components/Amelipro/ServiceMenu/tests/__snapshots__/ServiceMenu.spec.ts.snap +0 -111
- package/src/components/Amelipro/StructureMenu/StructureBtn/tests/StructureBtn.spec.ts +0 -17
- package/src/components/Amelipro/StructureMenu/StructureBtn/tests/__snapshots__/StructureBtn.spec.ts.snap +0 -34
- package/src/components/Amelipro/StructureMenu/StructureItem/tests/StructureItem.spec.ts +0 -21
- package/src/components/Amelipro/StructureMenu/StructureItem/tests/__snapshots__/StructureItem.spec.ts.snap +0 -106
- package/src/components/Amelipro/StructureMenu/StructureList/tests/StructureList.spec.ts +0 -33
- package/src/components/Amelipro/StructureMenu/StructureList/tests/__snapshots__/StructureList.spec.ts.snap +0 -353
- package/src/components/Amelipro/StructureMenu/StructureTabs/tests/StructureTabs.spec.ts +0 -60
- package/src/components/Amelipro/StructureMenu/StructureTabs/tests/__snapshots__/StructureTabs.spec.ts.snap +0 -824
- package/src/components/Amelipro/StructureMenu/tests/StructureMenu.spec.ts +0 -69
- package/src/components/Amelipro/StructureMenu/tests/__snapshots__/StructureMenu.spec.ts.snap +0 -1383
- package/src/components/Amelipro/UserInformationSummary/tests/UserInformationSummary.spec.ts +0 -24
- package/src/components/Amelipro/UserMenu/UserMenuDetails/tests/UserMenuDetails.spec.ts +0 -33
- package/src/components/Amelipro/UserMenu/UserMenuDetails/tests/__snapshots__/UserMenuDetails.spec.ts.snap +0 -3
- package/src/components/Amelipro/UserMenu/tests/UserMenu.spec.ts +0 -34
- package/src/components/Amelipro/UserMenu/tests/__snapshots__/UserMenu.spec.ts.snap +0 -101
- package/src/components/Customs/Selects/SelectBtnField/config.ts +0 -11
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.events.spec.ts +0 -151
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +0 -148
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +0 -361
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +0 -709
- package/src/components/DatePicker/composables/tests/useIconState.spec.ts +0 -130
- package/src/components/DatePicker/composables/useIconState.ts +0 -53
- package/src/components/DatePicker/tests/DatePicker.validation.spec.ts +0 -4111
- package/src/components/DatePicker/tests/archiTest.md +0 -33
- package/src/components/DatePicker/tests/navigation.regression.spec.ts +0 -74
- package/src/components/DatePicker/tests/navigation.simple.spec.ts +0 -137
- package/src/components/DatePicker/tests/setup.ts +0 -243
- package/src/components/Tables/common/formatters.ts +0 -72
- package/src/components/Usages/tests/Usages.spec.ts +0 -155
|
@@ -31,7 +31,7 @@ export function useSySelectKeyboard(options: UseSySelectKeyboardOptions) {
|
|
|
31
31
|
* @param index Index de l'élément à activer
|
|
32
32
|
* @param options Options supplémentaires
|
|
33
33
|
*/
|
|
34
|
-
const setActiveDescendant = (index: number
|
|
34
|
+
const setActiveDescendant = (index: number) => {
|
|
35
35
|
// Vérifier si l'index est valide
|
|
36
36
|
if (index >= 0 && index < formattedItems.value.length) {
|
|
37
37
|
// Mettre à jour l'ID pour ARIA
|
|
@@ -43,14 +43,6 @@ export function useSySelectKeyboard(options: UseSySelectKeyboardOptions) {
|
|
|
43
43
|
nextTick(() => {
|
|
44
44
|
const element = document.getElementById(`option-${index}`)
|
|
45
45
|
if (element) {
|
|
46
|
-
// Faire défiler l'élément en vue si demandé
|
|
47
|
-
if (options.scrollIntoView) {
|
|
48
|
-
element.scrollIntoView({ block: 'nearest' })
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Appliquer la classe de focus visuel
|
|
52
|
-
element.classList.add('keyboard-focused')
|
|
53
|
-
|
|
54
46
|
// Supprimer le focus visuel des autres éléments
|
|
55
47
|
const allItems = document.querySelectorAll('.v-list-item')
|
|
56
48
|
allItems.forEach((item) => {
|
|
@@ -58,6 +50,11 @@ export function useSySelectKeyboard(options: UseSySelectKeyboardOptions) {
|
|
|
58
50
|
item.classList.remove('keyboard-focused')
|
|
59
51
|
}
|
|
60
52
|
})
|
|
53
|
+
|
|
54
|
+
element.setAttribute('tabindex', '0')
|
|
55
|
+
element.focus()
|
|
56
|
+
element.classList.add('keyboard-focused')
|
|
57
|
+
element.scrollIntoView({ block: 'nearest' })
|
|
61
58
|
}
|
|
62
59
|
})
|
|
63
60
|
}
|
|
@@ -78,6 +75,7 @@ export function useSySelectKeyboard(options: UseSySelectKeyboardOptions) {
|
|
|
78
75
|
nextTick(() => {
|
|
79
76
|
const allItems = document.querySelectorAll('.v-list-item')
|
|
80
77
|
allItems.forEach((item) => {
|
|
78
|
+
item.setAttribute('tabindex', '-1')
|
|
81
79
|
item.classList.remove('keyboard-focused')
|
|
82
80
|
})
|
|
83
81
|
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SySelect from '../SySelect.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d’accessibilité : select simple requis avec ouverture du menu.
|
|
10
|
+
|
|
11
|
+
describe('SySelect – accessibility (axe)', () => {
|
|
12
|
+
it('has no obvious axe violations for required select with opened menu', async () => {
|
|
13
|
+
const items = [
|
|
14
|
+
{ text: 'Option 1', value: '1' },
|
|
15
|
+
{ text: 'Option 2', value: '2' },
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
const wrapper = mount(SySelect, {
|
|
19
|
+
props: {
|
|
20
|
+
items,
|
|
21
|
+
label: 'Choisissez une option',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
attachTo: document.body,
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// Ouvrir le menu pour inclure la liste déroulante dans l’analyse axe
|
|
28
|
+
const activator = wrapper.find('.sy-select')
|
|
29
|
+
if (activator.exists()) {
|
|
30
|
+
await activator.trigger('click')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const results = await axe(document.body)
|
|
34
|
+
assertNoA11yViolations(results, 'SySelect – required select with menu open', {
|
|
35
|
+
ignoreRules: ['region'],
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
wrapper.unmount()
|
|
39
|
+
})
|
|
40
|
+
})
|
|
@@ -33,7 +33,7 @@ const meta = {
|
|
|
33
33
|
},
|
|
34
34
|
color: {
|
|
35
35
|
control: 'select',
|
|
36
|
-
options: ['primary', '
|
|
36
|
+
options: ['primary', 'success', 'error', 'warning'],
|
|
37
37
|
description: 'Couleur de la case à cocher',
|
|
38
38
|
},
|
|
39
39
|
indeterminate: {
|
|
@@ -171,6 +171,9 @@ export const Indeterminate: Story = {
|
|
|
171
171
|
template: `<SyCheckbox v-model="checked" :indeterminate="indeterminate" v-bind="args" label="Case à cocher indéterminée" />`,
|
|
172
172
|
}),
|
|
173
173
|
parameters: {
|
|
174
|
+
a11y: {
|
|
175
|
+
disable: true,
|
|
176
|
+
},
|
|
174
177
|
sourceCode: [
|
|
175
178
|
{
|
|
176
179
|
name: 'Template',
|
|
@@ -204,6 +207,9 @@ Cette case à cocher est dans un état indéterminé, généralement utilisé lo
|
|
|
204
207
|
|
|
205
208
|
export const WithControlsIds: Story = {
|
|
206
209
|
parameters: {
|
|
210
|
+
a11y: {
|
|
211
|
+
disable: true,
|
|
212
|
+
},
|
|
207
213
|
sourceCode: [
|
|
208
214
|
{
|
|
209
215
|
name: 'Template',
|
|
@@ -605,7 +611,6 @@ export const CustomColors: Story = {
|
|
|
605
611
|
code: `
|
|
606
612
|
<div>
|
|
607
613
|
<SyCheckbox v-model="checked1" label="Couleur primaire (par défaut)" />
|
|
608
|
-
<SyCheckbox v-model="checked2" label="Couleur secondaire" color="secondary" />
|
|
609
614
|
<SyCheckbox v-model="checked3" label="Couleur succès" color="success" />
|
|
610
615
|
<SyCheckbox v-model="checked4" label="Couleur erreur" color="error" />
|
|
611
616
|
<SyCheckbox v-model="checked5" label="Couleur avertissement" color="warning" />
|
|
@@ -634,7 +639,6 @@ Le composant SyCheckbox peut être personnalisé avec différentes couleurs pour
|
|
|
634
639
|
template: `
|
|
635
640
|
<div>
|
|
636
641
|
<SyCheckbox v-model="checked1" label="Couleur primaire (par défaut)" />
|
|
637
|
-
<SyCheckbox v-model="checked2" label="Couleur secondaire" color="secondary" />
|
|
638
642
|
<SyCheckbox v-model="checked3" label="Couleur succès" color="success" />
|
|
639
643
|
<SyCheckbox v-model="checked4" label="Couleur erreur" color="error" />
|
|
640
644
|
<SyCheckbox v-model="checked5" label="Couleur avertissement" color="warning" />
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useValidation, type ValidationRule } from '@/composables/validation/useValidation'
|
|
4
4
|
import { useValidatable } from '@/composables/validation/useValidatable'
|
|
5
5
|
import { locales } from './locales'
|
|
6
|
+
import { cnamSemanticTokens } from '@/designTokens/tokens/cnam/cnamSemantic'
|
|
6
7
|
|
|
7
8
|
const props = withDefaults(
|
|
8
9
|
defineProps<{
|
|
@@ -205,6 +206,22 @@
|
|
|
205
206
|
return model.value ? 'true' : 'false'
|
|
206
207
|
})
|
|
207
208
|
|
|
209
|
+
const labelColor = computed(() => {
|
|
210
|
+
if (props.disabled) return cnamSemanticTokens.colors.text.disabled
|
|
211
|
+
switch (props.color) {
|
|
212
|
+
case 'error':
|
|
213
|
+
return 'rgb(var(--v-theme-error))'
|
|
214
|
+
case 'success':
|
|
215
|
+
return 'rgb(var(--v-theme-success))'
|
|
216
|
+
case 'warning':
|
|
217
|
+
return 'rgb(var(--v-theme-warning))'
|
|
218
|
+
case 'primary':
|
|
219
|
+
return cnamSemanticTokens.colors.text.base
|
|
220
|
+
default:
|
|
221
|
+
return ''
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
|
|
208
225
|
// Propriétés ARIA personnalisées pour éviter les conflits
|
|
209
226
|
const messageId = computed(() => {
|
|
210
227
|
// Don't create messageId if aria-labelledby is provided
|
|
@@ -307,6 +324,7 @@
|
|
|
307
324
|
:aria-labelledby="props.ariaLabelledby"
|
|
308
325
|
:title="props.title"
|
|
309
326
|
:color="props.color"
|
|
327
|
+
:style="{ color: labelColor }"
|
|
310
328
|
:disabled="props.disabled"
|
|
311
329
|
:readonly="props.readonly"
|
|
312
330
|
:hide-details="props.hideDetails"
|
|
@@ -345,8 +363,8 @@
|
|
|
345
363
|
</div>
|
|
346
364
|
</template>
|
|
347
365
|
|
|
348
|
-
<style
|
|
349
|
-
:deep(.v-
|
|
366
|
+
<style>
|
|
367
|
+
:deep(.v-input--dirty .v-selection-control__input) {
|
|
350
368
|
color: v-bind('props.color');
|
|
351
369
|
}
|
|
352
370
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SyCheckbox from '../SyCheckbox.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d’accessibilité : case à cocher requise avec libellé.
|
|
10
|
+
|
|
11
|
+
describe('SyCheckbox – accessibility (axe)', () => {
|
|
12
|
+
it('has no obvious axe violations for required checkbox with label', async () => {
|
|
13
|
+
const wrapper = mount(SyCheckbox, {
|
|
14
|
+
props: {
|
|
15
|
+
label: 'J’accepte les conditions générales',
|
|
16
|
+
modelValue: false,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
22
|
+
assertNoA11yViolations(results, 'SyCheckbox – required labelled checkbox', {
|
|
23
|
+
ignoreRules: ['region'],
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SyForm from '../SyForm.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d’accessibilité : formulaire contenant un champ et un bouton de soumission.
|
|
10
|
+
|
|
11
|
+
describe('SyForm – accessibility (axe)', () => {
|
|
12
|
+
it('has no obvious axe violations for basic form structure', async () => {
|
|
13
|
+
const wrapper = mount(SyForm, {
|
|
14
|
+
slots: {
|
|
15
|
+
default: `
|
|
16
|
+
<div>
|
|
17
|
+
<label for="name">Nom</label>
|
|
18
|
+
<input id="name" name="name" type="text" />
|
|
19
|
+
<button type="submit">Envoyer</button>
|
|
20
|
+
</div>
|
|
21
|
+
`,
|
|
22
|
+
},
|
|
23
|
+
attachTo: document.body,
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
27
|
+
assertNoA11yViolations(results, 'SyForm – basic form structure', {
|
|
28
|
+
ignoreRules: ['region'],
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
wrapper.unmount()
|
|
32
|
+
})
|
|
33
|
+
})
|
|
@@ -55,16 +55,56 @@ Si vous souhaitez gérer vous-même la validation, vous pouvez désactiver la va
|
|
|
55
55
|
|
|
56
56
|
## Événements
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
<table>
|
|
59
|
+
<thead>
|
|
60
|
+
<tr>
|
|
61
|
+
<th>Nom</th>
|
|
62
|
+
<th>Description</th>
|
|
63
|
+
<th>Signature</th>
|
|
64
|
+
</tr>
|
|
65
|
+
</thead>
|
|
66
|
+
<tbody>
|
|
67
|
+
<tr>
|
|
68
|
+
<td><code>submit</code></td>
|
|
69
|
+
<td>Émis lors de la soumission du formulaire. Le payload contient le résultat de la validation.</td>
|
|
70
|
+
<td><code>(payload: { isValid: boolean }) => void</code></td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td><code>reset</code></td>
|
|
74
|
+
<td>Émis lors de la réinitialisation du formulaire (appel explicite de <code>reset()</code> ou bouton <code>type="reset"</code>).</td>
|
|
75
|
+
<td><code>() => void</code></td>
|
|
76
|
+
</tr>
|
|
77
|
+
</tbody>
|
|
78
|
+
</table>
|
|
61
79
|
|
|
62
80
|
## Méthodes exposées
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
<table>
|
|
83
|
+
<thead>
|
|
84
|
+
<tr>
|
|
85
|
+
<th>Nom</th>
|
|
86
|
+
<th>Description</th>
|
|
87
|
+
<th>Signature</th>
|
|
88
|
+
</tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody>
|
|
91
|
+
<tr>
|
|
92
|
+
<td><code>validate</code></td>
|
|
93
|
+
<td>Valide tous les composants du formulaire (Vuetify + composants personnalisés) et met à jour l’état interne de validation.</td>
|
|
94
|
+
<td><code>() => Promise<boolean></code></td>
|
|
95
|
+
</tr>
|
|
96
|
+
<tr>
|
|
97
|
+
<td><code>reset</code></td>
|
|
98
|
+
<td>Réinitialise tous les composants du formulaire et émet l’événement <code>reset</code>.</td>
|
|
99
|
+
<td><code>() => void</code></td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<td><code>clearValidation</code></td>
|
|
103
|
+
<td>Efface uniquement les états de validation (messages d’erreur, etc.) sans modifier les valeurs des champs.</td>
|
|
104
|
+
<td><code>() => void</code></td>
|
|
105
|
+
</tr>
|
|
106
|
+
</tbody>
|
|
107
|
+
</table>
|
|
68
108
|
|
|
69
109
|
## Le système de validation en cascade
|
|
70
110
|
|
|
@@ -15,6 +15,20 @@ export default {
|
|
|
15
15
|
description: 'Active ou désactive la validation automatique lors de la soumission',
|
|
16
16
|
defaultValue: true,
|
|
17
17
|
},
|
|
18
|
+
default: {
|
|
19
|
+
description: 'Contenu du formulaire, généralement des champs de formulaire comme SyTextField, SySelect, etc.',
|
|
20
|
+
table: {
|
|
21
|
+
type: {
|
|
22
|
+
summary: `
|
|
23
|
+
{
|
|
24
|
+
'isValid': boolean,
|
|
25
|
+
'validate': () => Promise<boolean>,
|
|
26
|
+
'reset': () => void,
|
|
27
|
+
'clear': () => void
|
|
28
|
+
}`,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
18
32
|
},
|
|
19
33
|
parameters: {
|
|
20
34
|
docs: {
|
|
@@ -41,9 +55,8 @@ export const Basic: Story = {
|
|
|
41
55
|
{ type: 'required', options: { message: 'L\'email est obligatoire' } },
|
|
42
56
|
]
|
|
43
57
|
|
|
44
|
-
const submitForm = async () => {
|
|
45
|
-
|
|
46
|
-
if (isValid) {
|
|
58
|
+
const submitForm = async (e: { isValid: boolean }) => {
|
|
59
|
+
if (e.isValid) {
|
|
47
60
|
alert('Formulaire valide !')
|
|
48
61
|
}
|
|
49
62
|
else {
|
|
@@ -65,16 +78,13 @@ export const Basic: Story = {
|
|
|
65
78
|
</SyForm>
|
|
66
79
|
`,
|
|
67
80
|
}),
|
|
68
|
-
args: {
|
|
69
|
-
validateOnSubmit: true,
|
|
70
|
-
},
|
|
71
81
|
parameters: {
|
|
72
82
|
sourceCode: [
|
|
73
83
|
{
|
|
74
84
|
name: 'Template',
|
|
75
85
|
code: `
|
|
76
86
|
<template>
|
|
77
|
-
<SyForm ref="form"
|
|
87
|
+
<SyForm ref="form" @submit="onSubmit">
|
|
78
88
|
<div class="d-flex flex-column gap-4">
|
|
79
89
|
<SyTextField v-model="name" label="Nom" required class="mb-2" />
|
|
80
90
|
<SyTextField v-model="email" label="Email" :custom-rules="emailRules" class="mb-2" />
|
|
@@ -138,9 +148,8 @@ export const CustomValidation: Story = {
|
|
|
138
148
|
{ type: 'required', options: { message: 'Veuillez confirmer le mot de passe' } },
|
|
139
149
|
])
|
|
140
150
|
|
|
141
|
-
const submitForm = async () => {
|
|
142
|
-
|
|
143
|
-
if (isValid) {
|
|
151
|
+
const submitForm = async (e: { isValid: boolean }) => {
|
|
152
|
+
if (e.isValid) {
|
|
144
153
|
alert('Inscription réussie !')
|
|
145
154
|
}
|
|
146
155
|
else {
|
|
@@ -162,7 +171,7 @@ export const CustomValidation: Story = {
|
|
|
162
171
|
},
|
|
163
172
|
template: `
|
|
164
173
|
<div>
|
|
165
|
-
<SyForm ref="form" v-bind="args" @submit="submitForm">
|
|
174
|
+
<SyForm ref="form" v-bind="args" @submit="submitForm" :validate-on-submit="false">
|
|
166
175
|
<div class="d-flex flex-column gap-4">
|
|
167
176
|
<SyTextField v-model="username" label="Nom d'utilisateur" required class="mb-2" />
|
|
168
177
|
<SyTextField v-model="password" label="Mot de passe" type="password" :custom-rules="passwordRules" class="mb-2" />
|
|
@@ -190,7 +199,7 @@ export const CustomValidation: Story = {
|
|
|
190
199
|
code: `
|
|
191
200
|
<template>
|
|
192
201
|
<div>
|
|
193
|
-
<SyForm ref="form" @submit="onSubmit">
|
|
202
|
+
<SyForm ref="form" @submit="onSubmit" :validate-on-submit="false">
|
|
194
203
|
<div class="d-flex flex-column gap-4">
|
|
195
204
|
<SyTextField v-model="username" label="Nom d'utilisateur" required class="mb-2" />
|
|
196
205
|
<SyTextField v-model="password" label="Mot de passe" type="password" :custom-rules="passwordRules" class="mb-2" />
|
|
@@ -287,9 +296,8 @@ export const MixedFields: Story = {
|
|
|
287
296
|
{ text: 'Italie', value: 'it' },
|
|
288
297
|
]
|
|
289
298
|
|
|
290
|
-
const submitForm = async () => {
|
|
291
|
-
|
|
292
|
-
if (isValid) {
|
|
299
|
+
const submitForm = async (e: { isValid: boolean }) => {
|
|
300
|
+
if (e.isValid) {
|
|
293
301
|
alert(`Formulaire valide ! Données: ${JSON.stringify(formData.value)}`)
|
|
294
302
|
}
|
|
295
303
|
else {
|
|
@@ -318,7 +326,7 @@ export const MixedFields: Story = {
|
|
|
318
326
|
name: 'Template',
|
|
319
327
|
code: `
|
|
320
328
|
<template>
|
|
321
|
-
<SyForm ref="form"
|
|
329
|
+
<SyForm ref="form" @submit="submitForm">
|
|
322
330
|
<div class="d-flex flex-column gap-4">
|
|
323
331
|
<SyTextField v-model="formData.name" label="Nom complet" required class="mb-2" />
|
|
324
332
|
<SyTextField v-model="formData.email" label="Email" :customRules="emailCustomRules" class="mb-2" />
|
|
@@ -337,16 +345,16 @@ export const MixedFields: Story = {
|
|
|
337
345
|
<script setup lang="ts">
|
|
338
346
|
|
|
339
347
|
const formData = ref({
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
348
|
+
name: '',
|
|
349
|
+
email: '',
|
|
350
|
+
country: '',
|
|
343
351
|
})
|
|
344
352
|
|
|
345
353
|
const countries = [
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
354
|
+
{ text: 'France', value: 'fr' },
|
|
355
|
+
{ text: 'Allemagne', value: 'de' },
|
|
356
|
+
{ text: 'Espagne', value: 'es' },
|
|
357
|
+
{ text: 'Italie', value: 'it' },
|
|
350
358
|
]
|
|
351
359
|
|
|
352
360
|
const emailCustomRules = [
|
|
@@ -360,10 +368,10 @@ export const MixedFields: Story = {
|
|
|
360
368
|
{ type: 'required', options: { message: "L'email est obligatoire" } },
|
|
361
369
|
]
|
|
362
370
|
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
371
|
+
const submitForm = (event: { isValid: boolean }) => {
|
|
372
|
+
if (event.isValid) {
|
|
373
|
+
alert('Formulaire valide ! Données: ' + JSON.stringify(formData.value))
|
|
374
|
+
}
|
|
367
375
|
}
|
|
368
376
|
</script>
|
|
369
377
|
`,
|
|
@@ -386,9 +394,8 @@ export const Reset: Story = {
|
|
|
386
394
|
{ type: 'required', options: { message: 'L\'email est obligatoire' } },
|
|
387
395
|
]
|
|
388
396
|
|
|
389
|
-
const submitForm = async () => {
|
|
390
|
-
|
|
391
|
-
if (isValid) {
|
|
397
|
+
const submitForm = async (e: { isValid: boolean }) => {
|
|
398
|
+
if (e.isValid) {
|
|
392
399
|
alert('Formulaire valide !')
|
|
393
400
|
}
|
|
394
401
|
else {
|
|
@@ -416,16 +423,13 @@ export const Reset: Story = {
|
|
|
416
423
|
</SyForm>
|
|
417
424
|
`,
|
|
418
425
|
}),
|
|
419
|
-
args: {
|
|
420
|
-
validateOnSubmit: true,
|
|
421
|
-
},
|
|
422
426
|
parameters: {
|
|
423
427
|
sourceCode: [
|
|
424
428
|
{
|
|
425
429
|
name: 'Template',
|
|
426
430
|
code: `
|
|
427
431
|
<template>
|
|
428
|
-
<SyForm ref="form"
|
|
432
|
+
<SyForm ref="form" @submit="submitForm" @reset="onFormReset">
|
|
429
433
|
<div class="d-flex flex-column gap-4">
|
|
430
434
|
<SyTextField v-model="name" label="Nom" required class="mb-2" />
|
|
431
435
|
<SyTextField v-model="email" label="Email" :custom-rules="emailRules" class="mb-2" />
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { useFormValidation } from '@/composables/validation/useFormValidation'
|
|
4
4
|
|
|
5
|
-
const props = defineProps<{
|
|
5
|
+
const props = withDefaults(defineProps<{
|
|
6
6
|
validateOnSubmit?: boolean
|
|
7
|
-
}>()
|
|
7
|
+
}>(), {
|
|
8
|
+
validateOnSubmit: true,
|
|
9
|
+
})
|
|
8
10
|
|
|
9
11
|
const emit = defineEmits<{
|
|
10
12
|
(e: 'submit', value: { isValid: boolean }): void
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
const form = ref<InstanceType<typeof import('vuetify/components').VForm> | null>(null)
|
|
16
18
|
|
|
17
19
|
const { validateAll, clearAll, resetAll } = useFormValidation()
|
|
20
|
+
const isValid = ref<boolean>(true)
|
|
18
21
|
|
|
19
22
|
// Methode de validation globale qui combine Vuetify et nos composants personnalises
|
|
20
23
|
const validate = async () => {
|
|
@@ -45,15 +48,19 @@
|
|
|
45
48
|
const customComponentsValid = await validateAll()
|
|
46
49
|
|
|
47
50
|
// Le formulaire est valide si les deux sont valides
|
|
48
|
-
|
|
51
|
+
isValid.value = vuetifyValid && customComponentsValid
|
|
52
|
+
|
|
53
|
+
return isValid.value
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
const reset = () => {
|
|
52
57
|
// Reset custom components values
|
|
58
|
+
clearAll()
|
|
53
59
|
resetAll()
|
|
54
60
|
// Reset field values and validations for Vuetify form
|
|
55
61
|
form.value?.reset()
|
|
56
62
|
form.value?.resetValidation()
|
|
63
|
+
isValid.value = true
|
|
57
64
|
// Notify consumers so they can clear external models (e.g., v-model refs)
|
|
58
65
|
emit('reset')
|
|
59
66
|
}
|
|
@@ -63,7 +70,16 @@
|
|
|
63
70
|
// Clear Vuetify internal validation state
|
|
64
71
|
form.value?.resetValidation()
|
|
65
72
|
// Clear custom components validation states registered in the form
|
|
73
|
+
isValid.value = true
|
|
74
|
+
clearAll()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const handleReset = () => {
|
|
66
78
|
clearAll()
|
|
79
|
+
resetAll()
|
|
80
|
+
form.value?.resetValidation()
|
|
81
|
+
isValid.value = true
|
|
82
|
+
emit('reset')
|
|
67
83
|
}
|
|
68
84
|
|
|
69
85
|
// Gestion de la soumission du formulaire
|
|
@@ -88,9 +104,14 @@
|
|
|
88
104
|
<template>
|
|
89
105
|
<v-form
|
|
90
106
|
ref="form"
|
|
91
|
-
@submit.prevent
|
|
92
|
-
@
|
|
107
|
+
@submit.prevent="handleSubmit"
|
|
108
|
+
@reset="handleReset"
|
|
93
109
|
>
|
|
94
|
-
<slot
|
|
110
|
+
<slot
|
|
111
|
+
:is-valid="isValid"
|
|
112
|
+
:validate="validate"
|
|
113
|
+
:reset="reset"
|
|
114
|
+
:clear="clearValidation"
|
|
115
|
+
/>
|
|
95
116
|
</v-form>
|
|
96
117
|
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SyIcon from './SyIcon.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d’accessibilité : icône informative avec label.
|
|
10
|
+
|
|
11
|
+
describe('SyIcon – accessibility (axe)', () => {
|
|
12
|
+
it('has no obvious axe violations for informative icon with label', async () => {
|
|
13
|
+
const wrapper = mount(SyIcon, {
|
|
14
|
+
props: {
|
|
15
|
+
icon: 'mdi-alert',
|
|
16
|
+
decorative: false,
|
|
17
|
+
label: 'Alerte importante',
|
|
18
|
+
},
|
|
19
|
+
global: {
|
|
20
|
+
stubs: {
|
|
21
|
+
'v-icon': {
|
|
22
|
+
template: '<span class="v-icon" role="img" :aria-label="ariaLabel"><slot></slot></span>',
|
|
23
|
+
props: ['color', 'size', 'role', 'aria-hidden', 'aria-label'],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
directives: {
|
|
27
|
+
'rgaa-svg-fix': () => {},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
33
|
+
assertNoA11yViolations(results, 'SyIcon – informative icon with label', {
|
|
34
|
+
ignoreRules: ['region'],
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import SyPagination from '../SyPagination.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d’accessibilité : pagination avec libellé, aria-controls et page active.
|
|
10
|
+
|
|
11
|
+
describe('SyPagination – accessibility (axe)', () => {
|
|
12
|
+
it('has no obvious axe violations with labelled navigation and active page', async () => {
|
|
13
|
+
const wrapper = mount(SyPagination, {
|
|
14
|
+
props: {
|
|
15
|
+
modelValue: 3,
|
|
16
|
+
pages: 10,
|
|
17
|
+
label: 'Pagination des résultats',
|
|
18
|
+
ariaControls: 'liste-resultats',
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
23
|
+
assertNoA11yViolations(results, 'SyPagination – labelled navigation', {
|
|
24
|
+
ignoreRules: ['region'],
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|