@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
|
@@ -7,16 +7,12 @@
|
|
|
7
7
|
import useAccordionState from './composables/useAccordionState'
|
|
8
8
|
import useAccordionGroupCommunication from './composables/useAccordionGroupCommunication'
|
|
9
9
|
import useAccordionKeyboardNavigation, { type AccordionItem as KeyboardNavigationItem } from './composables/useAccordionKeyboardNavigation'
|
|
10
|
-
|
|
11
|
-
interface ContentObject {
|
|
12
|
-
title: string
|
|
13
|
-
content: string
|
|
14
|
-
}
|
|
10
|
+
import SyIcon from '@/components/Customs/SyIcon/SyIcon.vue'
|
|
15
11
|
|
|
16
12
|
interface AccordionItem {
|
|
17
13
|
id: string
|
|
18
14
|
title: string
|
|
19
|
-
content: string |
|
|
15
|
+
content: string | Record<string, unknown>
|
|
20
16
|
headingLevel?: number
|
|
21
17
|
disabled?: boolean
|
|
22
18
|
}
|
|
@@ -117,7 +113,7 @@
|
|
|
117
113
|
:is="getHeadingTag(item)"
|
|
118
114
|
class="sy-accordion-heading"
|
|
119
115
|
>
|
|
120
|
-
<
|
|
116
|
+
<span
|
|
121
117
|
class="sy-accordion-title"
|
|
122
118
|
:class="isItemOpen(item.id) ? `text-${options.accordion.activeColor}` : `text-${options.accordion.titleColor}`"
|
|
123
119
|
>
|
|
@@ -125,10 +121,29 @@
|
|
|
125
121
|
class="sy-accordion-icon"
|
|
126
122
|
:class="{ 'sy-accordion-icon--open': isItemOpen(item.id) }"
|
|
127
123
|
>
|
|
128
|
-
<
|
|
124
|
+
<SyIcon
|
|
125
|
+
:icon="mdiChevronRight"
|
|
126
|
+
decorative
|
|
127
|
+
/>
|
|
129
128
|
</span>
|
|
130
|
-
<
|
|
131
|
-
|
|
129
|
+
<slot
|
|
130
|
+
name="title"
|
|
131
|
+
:item="item"
|
|
132
|
+
:index="index"
|
|
133
|
+
>
|
|
134
|
+
<span>{{ item.title }}</span>
|
|
135
|
+
</slot>
|
|
136
|
+
</span>
|
|
137
|
+
<span
|
|
138
|
+
v-if="$slots['right-content']"
|
|
139
|
+
class="sy-accordion-right-content"
|
|
140
|
+
>
|
|
141
|
+
<slot
|
|
142
|
+
name="right-content"
|
|
143
|
+
:item="item"
|
|
144
|
+
:index="index"
|
|
145
|
+
/>
|
|
146
|
+
</span>
|
|
132
147
|
</component>
|
|
133
148
|
</div>
|
|
134
149
|
|
|
@@ -141,20 +156,28 @@
|
|
|
141
156
|
:tabindex="isItemOpen(item.id) ? 0 : -1"
|
|
142
157
|
>
|
|
143
158
|
<div class="sy-accordion-content-inner">
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
159
|
+
<slot
|
|
160
|
+
name="content"
|
|
161
|
+
:item="item"
|
|
162
|
+
:index="index"
|
|
163
|
+
:is-open="isItemOpen(item.id)"
|
|
164
|
+
>
|
|
165
|
+
<template v-if="typeof item.content === 'string'">
|
|
166
|
+
<p class="sy-accordion-content-text">
|
|
167
|
+
{{ item.content }}
|
|
168
|
+
</p>
|
|
169
|
+
</template>
|
|
170
|
+
<template v-else>
|
|
171
|
+
<div class="sy-accordion-content-item">
|
|
172
|
+
<p class="sy-accordion-content-text">
|
|
173
|
+
<strong>{{ (item.content as any).title }}</strong>
|
|
174
|
+
</p>
|
|
175
|
+
<p class="sy-accordion-content-text">
|
|
176
|
+
{{ (item.content as any).content }}
|
|
177
|
+
</p>
|
|
155
178
|
</div>
|
|
156
|
-
</
|
|
157
|
-
</
|
|
179
|
+
</template>
|
|
180
|
+
</slot>
|
|
158
181
|
</div>
|
|
159
182
|
</div>
|
|
160
183
|
</div>
|
|
@@ -175,6 +198,10 @@
|
|
|
175
198
|
|
|
176
199
|
.sy-accordion-heading {
|
|
177
200
|
margin: 0;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
width: 100%;
|
|
178
205
|
}
|
|
179
206
|
|
|
180
207
|
.sy-accordion-button {
|
|
@@ -197,6 +224,12 @@
|
|
|
197
224
|
display: flex;
|
|
198
225
|
}
|
|
199
226
|
|
|
227
|
+
.sy-accordion-right-content {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
margin-left: 16px;
|
|
231
|
+
}
|
|
232
|
+
|
|
200
233
|
.sy-accordion-button:hover,
|
|
201
234
|
.sy-accordion-content--open + .sy-accordion-button,
|
|
202
235
|
.sy-accordion-item:has(.sy-accordion-content--open) .sy-accordion-button {
|
|
@@ -266,7 +299,6 @@
|
|
|
266
299
|
}
|
|
267
300
|
|
|
268
301
|
.sy-accordion-content-line {
|
|
269
|
-
margin-bottom: 8px;
|
|
270
302
|
line-height: 1.5;
|
|
271
303
|
}
|
|
272
304
|
|
|
@@ -0,0 +1,46 @@
|
|
|
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 Accordion from '../Accordion.vue'
|
|
8
|
+
|
|
9
|
+
const defaultItems = [
|
|
10
|
+
{ id: 'item1', title: 'Section 1', content: 'Contenu de la section 1' },
|
|
11
|
+
{
|
|
12
|
+
id: 'item2',
|
|
13
|
+
title: 'Section 2',
|
|
14
|
+
content: {
|
|
15
|
+
title: 'Sous-titre de la section 2',
|
|
16
|
+
content: 'Contenu détaillé de la section 2',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
// Test d'accessibilité dédié à Accordion, basé sur un scénario réaliste :
|
|
22
|
+
// - plusieurs items
|
|
23
|
+
// - ouvertures successives pour vérifier l'état ouvert/fermé et les attributs ARIA
|
|
24
|
+
|
|
25
|
+
describe('Accordion – accessibility (axe)', () => {
|
|
26
|
+
it('has no obvious axe violations when sections are opened', async () => {
|
|
27
|
+
const wrapper = mount(Accordion, {
|
|
28
|
+
props: {
|
|
29
|
+
items: defaultItems,
|
|
30
|
+
headingLevel: 2,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
// Ouvrir les deux sections pour inclure le contenu dans l’audit axe
|
|
35
|
+
const buttons = wrapper.findAll('.sy-accordion-button')
|
|
36
|
+
if (buttons.length > 0) {
|
|
37
|
+
await buttons[0].trigger('click')
|
|
38
|
+
}
|
|
39
|
+
if (buttons.length > 1) {
|
|
40
|
+
await buttons[1].trigger('click')
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
44
|
+
assertNoA11yViolations(results, 'Accordion – sections opened')
|
|
45
|
+
})
|
|
46
|
+
})
|
|
@@ -23,24 +23,22 @@ exports[`Accordion > renders correctly 1`] = `
|
|
|
23
23
|
tabindex="0"
|
|
24
24
|
>
|
|
25
25
|
<h2 class="sy-accordion-heading">
|
|
26
|
-
<
|
|
26
|
+
<span class="
|
|
27
27
|
sy-accordion-title
|
|
28
28
|
text-primary
|
|
29
29
|
">
|
|
30
30
|
<span class="sy-accordion-icon">
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
<sy-icon-stub
|
|
32
|
+
autodetectbutton="false"
|
|
33
|
+
decorative="true"
|
|
34
34
|
icon="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
|
35
|
-
|
|
36
|
-
start="false"
|
|
37
|
-
tag="i"
|
|
38
|
-
></v-icon-stub>
|
|
35
|
+
></sy-icon-stub>
|
|
39
36
|
</span>
|
|
40
37
|
<span>
|
|
41
38
|
Section 1
|
|
42
39
|
</span>
|
|
43
|
-
</
|
|
40
|
+
</span>
|
|
41
|
+
<!-- v-if -->
|
|
44
42
|
</h2>
|
|
45
43
|
</div>
|
|
46
44
|
<div
|
|
@@ -71,24 +69,22 @@ exports[`Accordion > renders correctly 1`] = `
|
|
|
71
69
|
tabindex="0"
|
|
72
70
|
>
|
|
73
71
|
<h2 class="sy-accordion-heading">
|
|
74
|
-
<
|
|
72
|
+
<span class="
|
|
75
73
|
sy-accordion-title
|
|
76
74
|
text-primary
|
|
77
75
|
">
|
|
78
76
|
<span class="sy-accordion-icon">
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
<sy-icon-stub
|
|
78
|
+
autodetectbutton="false"
|
|
79
|
+
decorative="true"
|
|
82
80
|
icon="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
|
83
|
-
|
|
84
|
-
start="false"
|
|
85
|
-
tag="i"
|
|
86
|
-
></v-icon-stub>
|
|
81
|
+
></sy-icon-stub>
|
|
87
82
|
</span>
|
|
88
83
|
<span>
|
|
89
84
|
Section 2
|
|
90
85
|
</span>
|
|
91
|
-
</
|
|
86
|
+
</span>
|
|
87
|
+
<!-- v-if -->
|
|
92
88
|
</h2>
|
|
93
89
|
</div>
|
|
94
90
|
<div
|
|
@@ -119,24 +115,22 @@ exports[`Accordion > renders correctly 1`] = `
|
|
|
119
115
|
tabindex="0"
|
|
120
116
|
>
|
|
121
117
|
<h2 class="sy-accordion-heading">
|
|
122
|
-
<
|
|
118
|
+
<span class="
|
|
123
119
|
sy-accordion-title
|
|
124
120
|
text-primary
|
|
125
121
|
">
|
|
126
122
|
<span class="sy-accordion-icon">
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
<sy-icon-stub
|
|
124
|
+
autodetectbutton="false"
|
|
125
|
+
decorative="true"
|
|
130
126
|
icon="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
|
131
|
-
|
|
132
|
-
start="false"
|
|
133
|
-
tag="i"
|
|
134
|
-
></v-icon-stub>
|
|
127
|
+
></sy-icon-stub>
|
|
135
128
|
</span>
|
|
136
129
|
<span>
|
|
137
130
|
Section 3
|
|
138
131
|
</span>
|
|
139
|
-
</
|
|
132
|
+
</span>
|
|
133
|
+
<!-- v-if -->
|
|
140
134
|
</h2>
|
|
141
135
|
</div>
|
|
142
136
|
<div
|
|
@@ -148,12 +142,14 @@ exports[`Accordion > renders correctly 1`] = `
|
|
|
148
142
|
>
|
|
149
143
|
<div class="sy-accordion-content-inner">
|
|
150
144
|
<div class="sy-accordion-content-item">
|
|
151
|
-
<
|
|
145
|
+
<p class="sy-accordion-content-text">
|
|
152
146
|
<strong>
|
|
153
147
|
Sous-titre de la section 3
|
|
154
148
|
</strong>
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
</p>
|
|
150
|
+
<p class="sy-accordion-content-text">
|
|
151
|
+
Contenu détaillé de la section 3
|
|
152
|
+
</p>
|
|
157
153
|
</div>
|
|
158
154
|
</div>
|
|
159
155
|
</div>
|
|
@@ -83,7 +83,7 @@ describe('Accordion', () => {
|
|
|
83
83
|
it('renders string content correctly', () => {
|
|
84
84
|
const wrapper = mount(Accordion, {
|
|
85
85
|
propsData: {
|
|
86
|
-
items: [defaultItems[0]],
|
|
86
|
+
items: [defaultItems[0]!],
|
|
87
87
|
headingLevel: 2,
|
|
88
88
|
},
|
|
89
89
|
})
|
|
@@ -92,13 +92,13 @@ describe('Accordion', () => {
|
|
|
92
92
|
button.trigger('click')
|
|
93
93
|
|
|
94
94
|
const content = wrapper.find('.sy-accordion-content-inner')
|
|
95
|
-
expect(content.text()).toContain(defaultItems[0]
|
|
95
|
+
expect(content.text()).toContain(defaultItems[0]!.content)
|
|
96
96
|
})
|
|
97
97
|
|
|
98
98
|
it('renders object content correctly', async () => {
|
|
99
99
|
const wrapper = mount(Accordion, {
|
|
100
100
|
propsData: {
|
|
101
|
-
items: [defaultItems[2]],
|
|
101
|
+
items: [defaultItems[2]!],
|
|
102
102
|
headingLevel: 2,
|
|
103
103
|
},
|
|
104
104
|
})
|
|
@@ -106,10 +106,10 @@ describe('Accordion', () => {
|
|
|
106
106
|
const button = wrapper.find('.sy-accordion-button')
|
|
107
107
|
await button.trigger('click')
|
|
108
108
|
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
expect(
|
|
112
|
-
expect(
|
|
109
|
+
const objectContent = defaultItems[2]!.content as { title: string, content: string }
|
|
110
|
+
const content = wrapper.find('.sy-accordion-content-inner')
|
|
111
|
+
expect(content.text()).toContain(objectContent.title)
|
|
112
|
+
expect(content.text()).toContain(objectContent.content)
|
|
113
113
|
})
|
|
114
114
|
|
|
115
115
|
it('has correct accessibility attributes', () => {
|
|
@@ -263,26 +263,27 @@ describe('Accordion', () => {
|
|
|
263
263
|
})
|
|
264
264
|
|
|
265
265
|
// Ouvrir le premier accordéon (contenu string)
|
|
266
|
-
const firstButton = wrapper.findAll('.sy-accordion-button')[0]
|
|
266
|
+
const firstButton = wrapper.findAll('.sy-accordion-button')[0]!
|
|
267
267
|
await firstButton.trigger('click')
|
|
268
268
|
|
|
269
269
|
// Vérifier que le contenu string est rendu dans un élément p
|
|
270
|
-
const firstContent = wrapper.findAll('.sy-accordion-content-inner')[0]
|
|
270
|
+
const firstContent = wrapper.findAll('.sy-accordion-content-inner')[0]!
|
|
271
271
|
const paragraph = firstContent.find('p.sy-accordion-content-text')
|
|
272
272
|
expect(paragraph.exists()).toBe(true)
|
|
273
273
|
expect(paragraph.text()).toBe('Contenu de la section 1')
|
|
274
274
|
|
|
275
275
|
// Ouvrir le deuxième accordéon (contenu objet)
|
|
276
|
-
const secondButton = wrapper.findAll('.sy-accordion-button')[1]
|
|
276
|
+
const secondButton = wrapper.findAll('.sy-accordion-button')[1]!
|
|
277
277
|
await secondButton.trigger('click')
|
|
278
278
|
|
|
279
279
|
// Vérifier que le contenu objet est rendu avec la structure appropriée
|
|
280
|
-
const secondContent = wrapper.findAll('.sy-accordion-content-inner')[1]
|
|
281
|
-
const
|
|
282
|
-
expect(
|
|
283
|
-
expect(
|
|
284
|
-
expect(
|
|
285
|
-
|
|
280
|
+
const secondContent = wrapper.findAll('.sy-accordion-content-inner')[1]!
|
|
281
|
+
const paragraphs = secondContent.findAll('p.sy-accordion-content-text')
|
|
282
|
+
expect(paragraphs.length).toBe(2)
|
|
283
|
+
expect(paragraphs[0]!.text()).toContain('Sous-titre')
|
|
284
|
+
expect(paragraphs[1]!.text()).toContain('Contenu détaillé')
|
|
285
|
+
// Le titre est affiché en gras
|
|
286
|
+
expect(paragraphs[0]!.find('strong').exists()).toBe(true)
|
|
286
287
|
})
|
|
287
288
|
|
|
288
289
|
it('applies custom colors from options', async () => {
|
|
@@ -372,11 +373,11 @@ describe('Accordion', () => {
|
|
|
372
373
|
expect(buttons.length).toBeGreaterThan(1) // S'assurer qu'il y a plusieurs boutons
|
|
373
374
|
|
|
374
375
|
// Ouvrir le premier accordéon
|
|
375
|
-
await buttons[0]
|
|
376
|
+
await buttons[0]!.trigger('click')
|
|
376
377
|
expect(wrapper.findAll('.sy-accordion-content--open').length).toBe(1)
|
|
377
378
|
|
|
378
379
|
// Ouvrir le deuxième accordéon
|
|
379
|
-
await buttons[1]
|
|
380
|
+
await buttons[1]!.trigger('click')
|
|
380
381
|
expect(wrapper.findAll('.sy-accordion-content--open').length).toBe(2)
|
|
381
382
|
|
|
382
383
|
// Vérifier que les deux accordéons sont ouverts
|
|
@@ -396,18 +397,18 @@ describe('Accordion', () => {
|
|
|
396
397
|
expect(buttons.length).toBeGreaterThan(1) // S'assurer qu'il y a plusieurs boutons
|
|
397
398
|
|
|
398
399
|
// Ouvrir le premier accordéon - il devrait avoir le focus
|
|
399
|
-
await buttons[0]
|
|
400
|
-
expect(buttons[0]
|
|
401
|
-
expect(buttons[1]
|
|
400
|
+
await buttons[0]!.trigger('click')
|
|
401
|
+
expect(buttons[0]!.classes()).toContain('sy-accordion-button--focused')
|
|
402
|
+
expect(buttons[1]!.classes()).not.toContain('sy-accordion-button--focused')
|
|
402
403
|
|
|
403
404
|
// Ouvrir le deuxième accordéon - le focus devrait être transféré
|
|
404
|
-
await buttons[1]
|
|
405
|
-
expect(buttons[0]
|
|
406
|
-
expect(buttons[1]
|
|
405
|
+
await buttons[1]!.trigger('click')
|
|
406
|
+
expect(buttons[0]!.classes()).not.toContain('sy-accordion-button--focused')
|
|
407
|
+
expect(buttons[1]!.classes()).toContain('sy-accordion-button--focused')
|
|
407
408
|
|
|
408
409
|
// Fermer le deuxième accordéon - le focus devrait être supprimé
|
|
409
|
-
await buttons[1]
|
|
410
|
-
expect(buttons[1]
|
|
410
|
+
await buttons[1]!.trigger('click')
|
|
411
|
+
expect(buttons[1]!.classes()).not.toContain('sy-accordion-button--focused')
|
|
411
412
|
})
|
|
412
413
|
|
|
413
414
|
it('removes event listener on component unmount', async () => {
|
|
@@ -74,24 +74,7 @@ exports[`AmeliproAccordionTemplate > render correctly 1`] = `
|
|
|
74
74
|
width: 11px;
|
|
75
75
|
"
|
|
76
76
|
>
|
|
77
|
-
<span>
|
|
78
|
-
<svg
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
style="enable-background:new 0 0 42 42;"
|
|
81
|
-
version="1.1"
|
|
82
|
-
viewBox="0 0 42 42"
|
|
83
|
-
x="0px"
|
|
84
|
-
xml:space="preserve"
|
|
85
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
86
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
87
|
-
y="0px"
|
|
88
|
-
>
|
|
89
|
-
<polygon
|
|
90
|
-
class="shape-color"
|
|
91
|
-
points="21,39.2 42,2.8 0,2.8 "
|
|
92
|
-
/>
|
|
93
|
-
</svg>
|
|
94
|
-
</span>
|
|
77
|
+
<span></span>
|
|
95
78
|
</span>
|
|
96
79
|
</span>
|
|
97
80
|
titre accordion
|
|
@@ -1,16 +1,185 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { VueWrapper, shallowMount } from '@vue/test-utils'
|
|
2
|
+
import { beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import AmeliproAccordion from '../AmeliproAccordion.vue'
|
|
4
|
+
import type { ComponentProps } from 'vue-component-type-helpers'
|
|
5
|
+
import type { ExpectedPropOptions } from '@tests/types'
|
|
6
|
+
import TestHelper from '@tests/helpers/TestHelper'
|
|
7
|
+
import AmeliproAccordionTemplate from '../AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue'
|
|
8
|
+
|
|
9
|
+
const expectedPropOptions: ExpectedPropOptions<typeof AmeliproAccordion> = {
|
|
10
|
+
accordionTitle: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
borderColor: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'ap-grey-lighten-2',
|
|
17
|
+
},
|
|
18
|
+
bordered: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true,
|
|
21
|
+
},
|
|
22
|
+
cardColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'ap-white',
|
|
25
|
+
},
|
|
26
|
+
headerRightWidth: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '50%',
|
|
29
|
+
},
|
|
30
|
+
hideSeparator: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
isOpen: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
titleLevel: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 2,
|
|
41
|
+
},
|
|
42
|
+
titleUppercase: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
uniqueId: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Values pour les props "required"
|
|
53
|
+
const requiredPropValues = (): ComponentProps<typeof AmeliproAccordion> => ({
|
|
54
|
+
accordionTitle: 'Required accordion title',
|
|
55
|
+
uniqueId: 'required-unique-id',
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
// Valeurs pour les props "modified"
|
|
59
|
+
const modifiedPropValues = (): ComponentProps<typeof AmeliproAccordion> => ({
|
|
60
|
+
accordionTitle: 'Modified accordion title',
|
|
61
|
+
borderColor: 'modified-border-color',
|
|
62
|
+
bordered: false,
|
|
63
|
+
cardColor: 'modified-card-color',
|
|
64
|
+
headerRightWidth: 'modified-header-right-width',
|
|
65
|
+
hideSeparator: true,
|
|
66
|
+
isOpen: true,
|
|
67
|
+
titleLevel: 3,
|
|
68
|
+
titleUppercase: true,
|
|
69
|
+
uniqueId: 'modified-unique-id',
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
const testHelper = new TestHelper(AmeliproAccordion)
|
|
73
|
+
testHelper.setExpectedPropOptions(expectedPropOptions)
|
|
74
|
+
.setRequiredPropValues(requiredPropValues)
|
|
75
|
+
.setModifiedPropValues(modifiedPropValues)
|
|
4
76
|
|
|
5
77
|
describe('AmeliproAccordion', () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
78
|
+
describe('Snapshots', () => {
|
|
79
|
+
testHelper.snapshots()
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
describe('Properties', () => {
|
|
83
|
+
testHelper.properties()
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
describe('setting props should update props of inner components', () => {
|
|
87
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproAccordion>>
|
|
88
|
+
|
|
89
|
+
describe('AmeliproAccordionTemplate', () => {
|
|
90
|
+
beforeEach(() => {
|
|
91
|
+
vueWrapper = shallowMount(AmeliproAccordion, { props: requiredPropValues() })
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('prop accordionTitle sets prop accordionTitle', async () => {
|
|
95
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('accordionTitle')).toBe('Required accordion title')
|
|
96
|
+
|
|
97
|
+
const { accordionTitle } = modifiedPropValues()
|
|
98
|
+
await vueWrapper.setProps({ accordionTitle })
|
|
99
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('accordionTitle')).toBe('Modified accordion title')
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
it('prop borderColor sets prop borderColor', async () => {
|
|
103
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('borderColor')).toBe('ap-grey-lighten-2')
|
|
104
|
+
|
|
105
|
+
const { borderColor } = modifiedPropValues()
|
|
106
|
+
await vueWrapper.setProps({ borderColor })
|
|
107
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('borderColor')).toBe('modified-border-color')
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it('prop bordered sets prop bordered', async () => {
|
|
111
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('bordered')).toBe(true)
|
|
112
|
+
|
|
113
|
+
const { bordered } = modifiedPropValues()
|
|
114
|
+
await vueWrapper.setProps({ bordered })
|
|
115
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('bordered')).toBe(false)
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
it('prop cardColor sets prop cardColor', async () => {
|
|
119
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('cardColor')).toBe('ap-white')
|
|
120
|
+
|
|
121
|
+
const { cardColor } = modifiedPropValues()
|
|
122
|
+
await vueWrapper.setProps({ cardColor })
|
|
123
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('cardColor')).toBe('modified-card-color')
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
it('prop headerRightWidth sets prop headerRightWidth', async () => {
|
|
127
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('headerRightWidth')).toBe('50%')
|
|
128
|
+
|
|
129
|
+
const { headerRightWidth } = modifiedPropValues()
|
|
130
|
+
await vueWrapper.setProps({ headerRightWidth })
|
|
131
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('headerRightWidth')).toBe('modified-header-right-width')
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
it('prop hideSeparator sets prop hideSeparator', async () => {
|
|
135
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('hideSeparator')).toBe(false)
|
|
136
|
+
|
|
137
|
+
const { hideSeparator } = modifiedPropValues()
|
|
138
|
+
await vueWrapper.setProps({ hideSeparator })
|
|
139
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('hideSeparator')).toBe(true)
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
it('prop titleLevel sets prop titleLevel', async () => {
|
|
143
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('titleLevel')).toBe(2)
|
|
144
|
+
|
|
145
|
+
const { titleLevel } = modifiedPropValues()
|
|
146
|
+
await vueWrapper.setProps({ titleLevel })
|
|
147
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('titleLevel')).toBe(3)
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
it('prop titleUppercase sets prop titleUppercase', async () => {
|
|
151
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('titleUppercase')).toBe(false)
|
|
152
|
+
|
|
153
|
+
const { titleUppercase } = modifiedPropValues()
|
|
154
|
+
await vueWrapper.setProps({ titleUppercase })
|
|
155
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('titleUppercase')).toBe(true)
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
it('prop uniqueId sets prop uniqueId', async () => {
|
|
159
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('uniqueId')).toBe('required-unique-id')
|
|
160
|
+
|
|
161
|
+
const { uniqueId } = modifiedPropValues()
|
|
162
|
+
await vueWrapper.setProps({ uniqueId })
|
|
163
|
+
expect(vueWrapper.findComponent(AmeliproAccordionTemplate).props('uniqueId')).toBe('modified-unique-id')
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
describe('Public functions', () => {
|
|
169
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproAccordion>>
|
|
170
|
+
const findInnerWrapper = (): VueWrapper<InstanceType<typeof AmeliproAccordionTemplate>> => vueWrapper.findComponent(AmeliproAccordionTemplate)
|
|
171
|
+
beforeEach(() => {
|
|
172
|
+
vueWrapper = shallowMount(AmeliproAccordion, { props: requiredPropValues() })
|
|
12
173
|
})
|
|
13
174
|
|
|
14
|
-
|
|
175
|
+
it('should test openClose()', async () => {
|
|
176
|
+
expect(findInnerWrapper().props('isOpen')).toBe(false)
|
|
177
|
+
|
|
178
|
+
await vueWrapper.vm.openClose()
|
|
179
|
+
expect(findInnerWrapper().props('isOpen')).toBe(true)
|
|
180
|
+
|
|
181
|
+
await vueWrapper.vm.openClose()
|
|
182
|
+
expect(findInnerWrapper().props('isOpen')).toBe(false)
|
|
183
|
+
})
|
|
15
184
|
})
|
|
16
185
|
})
|