@cnamts/synapse 1.0.5 → 1.0.7
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-BQpRKTju.js → DateFilter-CHDLz2EO.js} +1 -1
- package/dist/{NumberFilter-BykSKt2D.js → NumberFilter-DXNQ4Uls.js} +1 -1
- package/dist/{PeriodFilter-Cks6NygV.js → PeriodFilter-C8Qf3Jcn.js} +1 -1
- package/dist/{SelectFilter-DEL5dHd_.js → SelectFilter-B2Ejs4Cb.js} +1 -1
- package/dist/{TextFilter-0RAFj7Oe.js → TextFilter-CfR5_A1S.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordion/AmeliproAccordion.d.ts +103 -0
- package/dist/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.d.ts +105 -0
- package/dist/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.d.ts +116 -0
- package/dist/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +220 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.d.ts +68 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.d.ts +204 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +26 -26
- package/dist/components/Amelipro/AmeliproBadge/AmeliproBadge.d.ts +59 -0
- package/dist/components/Amelipro/AmeliproBtn/AmeliproBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.d.ts +132 -0
- package/dist/components/Amelipro/AmeliproCaptcha/types.d.ts +5 -0
- package/dist/components/Amelipro/AmeliproCard/AmeliproCard.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +214 -0
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproCarousel/types.d.ts +7 -0
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +125 -0
- package/dist/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.d.ts +126 -0
- package/dist/components/Amelipro/AmeliproCustomSelector/types.d.ts +6 -0
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproResultList/AmeliproResultList.d.ts +164 -0
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +27 -27
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +190 -0
- package/dist/components/Amelipro/AmeliproTable/types.d.ts +34 -0
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +32 -32
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +2 -2
- package/dist/components/Amelipro/types.d.ts +6 -0
- package/dist/components/ChipList/ChipList.d.ts +4 -0
- package/dist/components/ChipList/locales.d.ts +4 -2
- package/dist/components/CookieBanner/CookieBanner.d.ts +1 -1
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +8 -8
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +454 -8
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +6 -1
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +2 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +71 -0
- package/dist/components/Customs/SyTabs/config.d.ts +17 -0
- package/dist/components/Customs/SyTabs/types.d.ts +11 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +12 -10
- package/dist/components/DataList/DataList.d.ts +10 -1
- package/dist/components/DataListGroup/DataListGroup.d.ts +10 -1
- package/dist/components/DataListItem/DataListItem.d.ts +1 -1
- package/dist/components/DataListItem/config.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4825 -244
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +58 -29
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +28 -10
- package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +18 -8
- package/dist/components/DatePicker/composables/useKeyboardEvents.d.ts +41 -0
- package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +4 -9
- package/dist/components/DatePicker/composables/useTodayButton.d.ts +1 -0
- package/dist/components/DatePicker/utils/dateFormattingUtils.d.ts +72 -0
- package/dist/components/DatePicker/utils/validationUtils.d.ts +38 -0
- package/dist/components/DialogBox/DialogBox.d.ts +219 -0
- package/dist/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.d.ts +9 -3
- package/dist/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.d.ts +6 -1
- package/dist/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.d.ts +11 -1
- package/dist/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.d.ts +11 -1
- package/dist/components/HeaderBar/HeaderBurgerMenu/locals.d.ts +2 -0
- package/dist/components/HeaderBar/HeaderBurgerMenu/useMenuPosition.d.ts +4 -0
- package/dist/components/HeaderLoading/HeaderLoading.d.ts +27 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +110 -3
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +19 -1
- package/dist/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/components/NirField/NirField.d.ts +30 -20
- package/dist/components/PeriodField/PeriodField.d.ts +10949 -1783
- package/dist/components/PhoneField/PhoneField.d.ts +1866 -2
- package/dist/components/PhoneField/indicatifs.d.ts +1 -0
- package/dist/components/PhoneField/locales.d.ts +1 -0
- package/dist/components/RangeField/RangeField.d.ts +1 -1
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +1 -1
- package/dist/components/SubHeader/SubHeader.d.ts +8 -0
- package/dist/components/SubHeader/locales.d.ts +1 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +6 -6
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
- package/dist/components/Tables/common/SyTablePagination.d.ts +458 -7
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +2 -2
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/usePagination.d.ts +16 -0
- package/dist/design-system-v3.js +174 -160
- package/dist/design-system-v3.umd.cjs +290 -281
- package/dist/directives/lockFocus.d.ts +17 -0
- package/dist/{main-Co2P_lBt.js → main-C66C1BkG.js} +14406 -11554
- package/dist/style.css +1 -1
- package/package.json +4 -1
- package/src/assets/amelipro/apTheme.scss +149 -0
- package/src/assets/amelipro/apTokens.scss +0 -148
- package/src/assets/amelipro/icons.ts +38 -11
- package/src/assets/overrides/_btns.scss +15 -0
- package/src/assets/overrides/_container.scss +36 -0
- package/src/assets/overrides/_forms.scss +7 -0
- package/src/assets/{_spacers.scss → overrides/_spacers.scss} +0 -7
- package/src/assets/overrides/_tables.scss +18 -0
- package/src/assets/overrides/_tooltips.scss +10 -0
- package/src/assets/overrides/_typography.scss +196 -0
- package/src/assets/settings.scss +11 -51
- package/src/assets/themes.scss +10 -0
- package/src/assets/tokens.scss +9 -156
- package/src/components/Accordion/composables/__tests__/useAccordionGroupCommunication.spec.ts +80 -40
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.mdx +15 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.stories.ts +83 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.vue +86 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +242 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/__tests__/AmeliproAccordionTemplate.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/__tests__/__snapshots__/AmeliproAccordionTemplate.spec.ts.snap +124 -0
- package/src/components/Amelipro/AmeliproAccordion/__tests__/AmeliproAccordion.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproAccordion/__tests__/__snapshots__/AmeliproAccordion.spec.ts.snap +124 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.stories.ts +135 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.vue +107 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/__snapshots__/AmeliproAccordionGroup.spec.ts.snap +513 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.mdx +16 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +300 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +288 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/AmeliproAccordionList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +1712 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.mdx +19 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +68 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue +66 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +145 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/AmeliproAccordionResultTemplate.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +127 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/AmeliproAccordionResult.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +123 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +273 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +275 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/AmeliproAccordionResultList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +1593 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.mdx +15 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.stories.ts +54 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +76 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/__snapshots__/AmeliproBadge.spec.ts.snap +19 -0
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.mdx +15 -0
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.stories.ts +87 -0
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.vue +233 -0
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/AmeliproCaptcha.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/__snapshots__/AmeliproCaptcha.spec.ts.snap +384 -0
- package/src/components/Amelipro/AmeliproCaptcha/types.d.ts +5 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.mdx +15 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.stories.ts +191 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +263 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.vue +93 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/AmeliproCarouselItem.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/__snapshots__/AmeliproCarouselItem.spec.ts.snap +43 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/AmeliproCarousel.spec.ts +40 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +342 -0
- package/src/components/Amelipro/AmeliproCarousel/types.d.ts +8 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.mdx +18 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +67 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +233 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +21 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +140 -0
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.mdx +15 -0
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.stories.ts +143 -0
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +351 -0
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/AmeliproCustomSelector.spec.ts +50 -0
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/__snapshots__/AmeliproCustomSelector.spec.ts.snap +186 -0
- package/src/components/Amelipro/AmeliproCustomSelector/types.d.ts +6 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +7 -1
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +5 -711
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +6 -0
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +5 -711
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.mdx +15 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +264 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +231 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/AmeliproResultList.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +434 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.mdx +22 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.stories.ts +550 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +422 -0
- package/src/components/Amelipro/AmeliproTable/__tests__/AmeliproTable.spec.ts +72 -0
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +424 -0
- package/src/components/Amelipro/AmeliproTable/types.d.ts +34 -0
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +2 -2
- package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +12 -1
- package/src/components/Amelipro/ServiceMenu/tests/__snapshots__/ServiceMenu.spec.ts.snap +0 -820
- package/src/components/Amelipro/types.ts +8 -0
- package/src/components/ChipList/Accessibilite.stories.ts +4 -0
- package/src/components/ChipList/ChipList.vue +185 -42
- package/src/components/ChipList/locales.ts +4 -2
- package/src/components/ChipList/tests/chipList.spec.ts +7 -4
- package/src/components/CollapsibleList/CollapsibleList.vue +0 -2
- package/src/components/CookieBanner/CookieBanner.vue +1 -3
- package/src/components/CopyBtn/CopyBtn.vue +9 -2
- package/src/components/CopyBtn/tests/CopyBtn.spec.ts +3 -1
- package/src/components/Customs/Selects/SelectOverview.mdx +18 -15
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts +10 -10
- package/src/components/Customs/Selects/SySelect/Accessibilite.mdx +7 -0
- package/src/components/Customs/Selects/SySelect/Accessibilite.stories.ts +4 -1
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +92 -4
- package/src/components/Customs/Selects/SySelect/SySelect.vue +373 -56
- package/src/components/Customs/Selects/SySelect/composables/tests/useSySelectKeyboard.spec.ts +14 -5
- package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +129 -12
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +3 -1
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +165 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +28 -9
- package/src/components/Customs/SyIcon/SyIcon.spec.ts +3 -0
- package/src/components/Customs/SyTabs/Accessibilite.mdx +309 -0
- package/src/components/Customs/SyTabs/SyTabs.mdx +117 -0
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +354 -0
- package/src/components/Customs/SyTabs/SyTabs.vue +350 -0
- package/src/components/Customs/SyTabs/config.ts +17 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +425 -0
- package/src/components/Customs/SyTabs/types.ts +12 -0
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +3 -1
- package/src/components/Customs/SyTextField/SyTextField.mdx +3 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +221 -7
- package/src/components/Customs/SyTextField/SyTextField.vue +226 -29
- package/src/components/DataList/Accessibilite.stories.ts +4 -0
- package/src/components/DataList/DataList.vue +52 -47
- package/src/components/DataListGroup/Accessibilite.stories.ts +4 -0
- package/src/components/DataListGroup/DataListGroup.vue +32 -15
- package/src/components/DataListItem/DataListItem.vue +72 -65
- package/src/components/DataListItem/config.ts +1 -1
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +3 -3
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +59 -18
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +174 -0
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +421 -636
- package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +215 -0
- package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +2 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +287 -1
- package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +281 -0
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +1 -1
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +17 -4
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +111 -18
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +238 -6
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +716 -759
- package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +4 -4
- package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +17 -10
- package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +11 -3
- package/src/components/DatePicker/composables/useDateInputEditing.ts +119 -225
- package/src/components/DatePicker/composables/useDisplayedDateString.ts +18 -4
- package/src/components/DatePicker/composables/useKeyboardEvents.ts +149 -0
- package/src/components/DatePicker/composables/useManualDateValidation.ts +27 -68
- package/src/components/DatePicker/composables/useTodayButton.ts +13 -1
- package/src/components/DatePicker/utils/dateFormattingUtils.ts +293 -0
- package/src/components/DatePicker/utils/validationUtils.ts +90 -0
- package/src/components/DialogBox/Accessibilite.stories.ts +4 -0
- package/src/components/DialogBox/DialogBox.stories.ts +22 -10
- package/src/components/DialogBox/DialogBox.vue +89 -22
- package/src/components/DialogBox/tests/DialogBox.spec.ts +22 -0
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +12 -6
- package/src/components/FileUpload/tests/FileUpload.spec.ts +3 -0
- package/src/components/FooterBar/FooterBar.vue +1 -0
- package/src/components/HeaderBar/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderBar/HeaderBar.mdx +47 -22
- package/src/components/HeaderBar/HeaderBar.stories.ts +54 -13
- package/src/components/HeaderBar/HeaderBar.vue +2 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +160 -82
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +41 -56
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +10 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +41 -18
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/tests/HeaderMenuSection.spec.ts +7 -2
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +36 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +41 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/locals.ts +2 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +8 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/useMenuPosition.ts +50 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +5 -5
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +7 -4
- package/src/components/HeaderBar/locales.ts +1 -1
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +2 -1
- package/src/components/HeaderLoading/Accessibilite.mdx +429 -8
- package/src/components/HeaderLoading/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +59 -1
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +17 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +91 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +37 -1
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +276 -21
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +4 -2
- package/src/components/LangBtn/LangBtn.vue +0 -3
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +4 -1
- package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +2 -2
- package/src/components/LogoBrandSection/LogoBrandSection.vue +13 -8
- package/src/components/LogoBrandSection/locales.ts +1 -1
- package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +1 -1
- package/src/components/LogoBrandSection/tests/__snapshots__/LogoBrandSection.spec.ts.snap +6 -4
- package/src/components/NirField/NirField.mdx +3 -0
- package/src/components/NirField/NirField.vue +15 -6
- package/src/components/NirField/tests/NirField.spec.ts +159 -12
- package/src/components/PasswordField/PasswordField.mdx +3 -0
- package/src/components/PeriodField/PeriodField.mdx +2 -0
- package/src/components/PeriodField/PeriodField.stories.ts +195 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +4 -0
- package/src/components/PhoneField/PhoneField.mdx +3 -1
- package/src/components/PhoneField/PhoneField.stories.ts +285 -1
- package/src/components/PhoneField/PhoneField.vue +228 -95
- package/src/components/PhoneField/indicatifs.ts +102 -102
- package/src/components/PhoneField/locales.ts +1 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +429 -2
- package/src/components/SkipLink/SkipLink.vue +3 -31
- package/src/components/SkipLink/tests/skipLink.spec.ts +0 -21
- package/src/components/SubHeader/Accessibilite.stories.ts +8 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -0
- package/src/components/SubHeader/SubHeader.stories.ts +179 -60
- package/src/components/SubHeader/SubHeader.vue +45 -15
- package/src/components/SubHeader/locales.ts +1 -0
- package/src/components/SyAlert/SyAlert.vue +6 -0
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +3 -10
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +242 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +29 -10
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +104 -6
- package/src/components/Tables/SyTable/SyTable.mdx +3 -10
- package/src/components/Tables/SyTable/SyTable.stories.ts +242 -0
- package/src/components/Tables/SyTable/SyTable.vue +2 -0
- package/src/components/Tables/common/SyTablePagination.vue +13 -6
- package/src/components/Tables/common/TableHeader.vue +10 -7
- package/src/components/Tables/common/tableAccessibilityUtils.ts +13 -2
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +157 -0
- package/src/components/Tables/common/types.ts +2 -0
- package/src/components/Tables/common/useTableAria.ts +17 -1
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +2 -1
- package/src/components/index.ts +13 -0
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +34 -5
- package/src/composables/index.ts +3 -0
- package/src/composables/useFilterable/useFilterable.ts +23 -1
- package/src/composables/usePagination.ts +103 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +3 -3
- package/src/directives/lockFocus.ts +48 -0
- package/src/main.ts +1 -2
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +1 -8
- package/src/stories/Accessibilite/{Aculturation/AuditDesignSystem.mdx → AuditDesignSystem.mdx} +1 -1
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/FauxPositifs.mdx +102 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru/FauxPositifs.stories.ts +219 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/{Tanaguru.mdx → Tanaguru/Utilisation.mdx} +1 -1
- package/src/stories/Components/Components.stories.ts +1 -1
- package/src/stories/DesignTokens/ColorIntegrationExample.vue +43 -0
- package/src/stories/DesignTokens/Colors.mdx +2 -0
- package/src/stories/DesignTokens/colors.stories.ts +9 -0
- package/src/stories/GuideDuDev/FormValidationGuide.mdx +342 -0
- package/src/stories/Templates/Templates.stories.ts +1 -1
- package/src/utils/functions/ameliproColors/ameliproColors.ts +1 -1
- package/src/vuetifyConfig.ts +3 -3
- package/dist/components/DataList/locales.d.ts +0 -3
- package/dist/directives/letterSpacing.d.ts +0 -27
- package/src/assets/_fonts.scss +0 -6
- package/src/assets/_typography.scss +0 -157
- package/src/components/DataList/locales.ts +0 -3
- package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +0 -266
- package/src/directives/letterSpacing.ts +0 -233
- /package/src/assets/{_elevations.scss → overrides/_elevations.scss} +0 -0
- /package/src/assets/{_radius.scss → overrides/_radius.scss} +0 -0
|
@@ -170,4 +170,161 @@ describe('SyTablePagination.vue', () => {
|
|
|
170
170
|
const labelText = wrapper.find('.rows-per-page-label').text()
|
|
171
171
|
expect(labelText).toContain('Lignes par page')
|
|
172
172
|
})
|
|
173
|
+
|
|
174
|
+
// Tests for itemsPerPageOptions functionality
|
|
175
|
+
describe('itemsPerPageOptions', () => {
|
|
176
|
+
it('should use default options when itemsPerPageOptions is not provided', () => {
|
|
177
|
+
const wrapper = mount(SyTablePagination, {
|
|
178
|
+
props: {
|
|
179
|
+
page: 1,
|
|
180
|
+
pageCount: 5,
|
|
181
|
+
itemsPerPage: 10,
|
|
182
|
+
itemsLength: 50,
|
|
183
|
+
},
|
|
184
|
+
global: {
|
|
185
|
+
plugins: [vuetify],
|
|
186
|
+
},
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
// Should have default options: 5, 10, 25, 50, 100, and "Tous" (-1)
|
|
190
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
191
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
192
|
+
expect(selectOptions).toHaveLength(6)
|
|
193
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5, 10, 25, 50, 100, -1])
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
it('should limit options when itemsPerPageOptions is provided', () => {
|
|
197
|
+
const wrapper = mount(SyTablePagination, {
|
|
198
|
+
props: {
|
|
199
|
+
page: 1,
|
|
200
|
+
pageCount: 5,
|
|
201
|
+
itemsPerPage: 10,
|
|
202
|
+
itemsLength: 50,
|
|
203
|
+
itemsPerPageOptions: [5, 10, 25],
|
|
204
|
+
},
|
|
205
|
+
global: {
|
|
206
|
+
plugins: [vuetify],
|
|
207
|
+
},
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
// Should only have the limited options, no "Tous" option
|
|
211
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
212
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
213
|
+
expect(selectOptions).toHaveLength(3)
|
|
214
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5, 10, 25])
|
|
215
|
+
expect(selectOptions.map(opt => opt.text)).toEqual(['5', '10', '25'])
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
it('should include "Tous" option when explicitly allowed in itemsPerPageOptions', () => {
|
|
219
|
+
const wrapper = mount(SyTablePagination, {
|
|
220
|
+
props: {
|
|
221
|
+
page: 1,
|
|
222
|
+
pageCount: 5,
|
|
223
|
+
itemsPerPage: 10,
|
|
224
|
+
itemsLength: 50,
|
|
225
|
+
itemsPerPageOptions: [5, 10, 25, -1],
|
|
226
|
+
},
|
|
227
|
+
global: {
|
|
228
|
+
plugins: [vuetify],
|
|
229
|
+
},
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
// Should have the limited options plus "Tous"
|
|
233
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
234
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
235
|
+
expect(selectOptions).toHaveLength(4)
|
|
236
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5, 10, 25, -1])
|
|
237
|
+
|
|
238
|
+
// Check that the last option is "Tous"
|
|
239
|
+
const lastOption = selectOptions[selectOptions.length - 1]
|
|
240
|
+
expect(lastOption.value).toBe(-1)
|
|
241
|
+
expect(lastOption.text).toBe('Tous')
|
|
242
|
+
})
|
|
243
|
+
|
|
244
|
+
it('should add current itemsPerPage to options if not already included', () => {
|
|
245
|
+
const wrapper = mount(SyTablePagination, {
|
|
246
|
+
props: {
|
|
247
|
+
page: 1,
|
|
248
|
+
pageCount: 5,
|
|
249
|
+
itemsPerPage: 15, // Not in the itemsPerPageOptions
|
|
250
|
+
itemsLength: 50,
|
|
251
|
+
itemsPerPageOptions: [5, 10, 25],
|
|
252
|
+
},
|
|
253
|
+
global: {
|
|
254
|
+
plugins: [vuetify],
|
|
255
|
+
},
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
// Should include the current itemsPerPage value and sort numerically
|
|
259
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
260
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
261
|
+
expect(selectOptions).toHaveLength(4)
|
|
262
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5, 10, 15, 25])
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
it('should not add current itemsPerPage if it is -1 (Tous)', () => {
|
|
266
|
+
const wrapper = mount(SyTablePagination, {
|
|
267
|
+
props: {
|
|
268
|
+
page: 1,
|
|
269
|
+
pageCount: 5,
|
|
270
|
+
itemsPerPage: -1, // "Tous" option
|
|
271
|
+
itemsLength: 50,
|
|
272
|
+
itemsPerPageOptions: [5, 10, 25],
|
|
273
|
+
},
|
|
274
|
+
global: {
|
|
275
|
+
plugins: [vuetify],
|
|
276
|
+
},
|
|
277
|
+
})
|
|
278
|
+
|
|
279
|
+
// Should not add -1 to the options since itemsPerPageOptions doesn't include it
|
|
280
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
281
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
282
|
+
expect(selectOptions).toHaveLength(3)
|
|
283
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5, 10, 25])
|
|
284
|
+
expect(selectOptions.find(opt => opt.value === -1)).toBeUndefined()
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
it('should work with very restrictive options', () => {
|
|
288
|
+
const wrapper = mount(SyTablePagination, {
|
|
289
|
+
props: {
|
|
290
|
+
page: 1,
|
|
291
|
+
pageCount: 5,
|
|
292
|
+
itemsPerPage: 5,
|
|
293
|
+
itemsLength: 50,
|
|
294
|
+
itemsPerPageOptions: [5], // Only one option
|
|
295
|
+
},
|
|
296
|
+
global: {
|
|
297
|
+
plugins: [vuetify],
|
|
298
|
+
},
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
// Should only have one option
|
|
302
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
303
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
304
|
+
expect(selectOptions).toHaveLength(1)
|
|
305
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([5])
|
|
306
|
+
expect(selectOptions.map(opt => opt.text)).toEqual(['5'])
|
|
307
|
+
})
|
|
308
|
+
|
|
309
|
+
it('should handle empty itemsPerPageOptions array', () => {
|
|
310
|
+
const wrapper = mount(SyTablePagination, {
|
|
311
|
+
props: {
|
|
312
|
+
page: 1,
|
|
313
|
+
pageCount: 5,
|
|
314
|
+
itemsPerPage: 10,
|
|
315
|
+
itemsLength: 50,
|
|
316
|
+
itemsPerPageOptions: [], // Empty array
|
|
317
|
+
},
|
|
318
|
+
global: {
|
|
319
|
+
plugins: [vuetify],
|
|
320
|
+
},
|
|
321
|
+
})
|
|
322
|
+
|
|
323
|
+
// Should only include the current itemsPerPage since base options are empty
|
|
324
|
+
const vm = wrapper.vm as unknown as { itemsPerPageOptions: Array<{ text: string, value: number }> }
|
|
325
|
+
const selectOptions = vm.itemsPerPageOptions
|
|
326
|
+
expect(selectOptions).toHaveLength(1)
|
|
327
|
+
expect(selectOptions.map(opt => opt.value)).toEqual([10])
|
|
328
|
+
})
|
|
329
|
+
})
|
|
173
330
|
})
|
|
@@ -76,6 +76,7 @@ export type SyTableProps = {
|
|
|
76
76
|
showSelect?: boolean
|
|
77
77
|
multiSort?: boolean
|
|
78
78
|
mustSort?: boolean
|
|
79
|
+
itemsPerPageOptions?: number[]
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
export type SyServerTableProps = {
|
|
@@ -93,4 +94,5 @@ export type SyServerTableProps = {
|
|
|
93
94
|
showSelect?: boolean
|
|
94
95
|
multiSort?: boolean
|
|
95
96
|
mustSort?: boolean
|
|
97
|
+
itemsPerPageOptions?: number[]
|
|
96
98
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, nextTick, onMounted, ref, watch, type Ref } from 'vue'
|
|
1
|
+
import { computed, nextTick, onMounted, onUnmounted, ref, watch, type Ref } from 'vue'
|
|
2
2
|
import type { VDataTable, VDataTableServer } from 'vuetify/components'
|
|
3
3
|
import { locales } from './locales'
|
|
4
4
|
import type { DataOptions } from './types'
|
|
@@ -18,6 +18,8 @@ export function useTableAria({
|
|
|
18
18
|
options,
|
|
19
19
|
uniqueTableId,
|
|
20
20
|
}: UseTableAriaOptions) {
|
|
21
|
+
// Registre des éléments avec des écouteurs d'événements pour le nettoyage
|
|
22
|
+
const elementsWithListeners = ref<HTMLElement[]>([])
|
|
21
23
|
const statusRegionId = `${uniqueTableId}-status`
|
|
22
24
|
const statusMessage = ref('')
|
|
23
25
|
|
|
@@ -168,6 +170,9 @@ export function useTableAria({
|
|
|
168
170
|
// Add event listeners
|
|
169
171
|
element.addEventListener('focus', handleInteractiveElementFocus)
|
|
170
172
|
element.addEventListener('blur', handleInteractiveElementBlur)
|
|
173
|
+
|
|
174
|
+
// Stocker l'élément pour le nettoyage lors du démontage
|
|
175
|
+
elementsWithListeners.value.push(element as HTMLElement)
|
|
171
176
|
})
|
|
172
177
|
}
|
|
173
178
|
})
|
|
@@ -265,6 +270,17 @@ export function useTableAria({
|
|
|
265
270
|
setupAria()
|
|
266
271
|
})
|
|
267
272
|
|
|
273
|
+
// Nettoyer les écouteurs d'événements lors du démontage du composant
|
|
274
|
+
onUnmounted(() => {
|
|
275
|
+
elementsWithListeners.value.forEach((element) => {
|
|
276
|
+
if (element) {
|
|
277
|
+
element.removeEventListener('focus', handleInteractiveElementFocus)
|
|
278
|
+
element.removeEventListener('blur', handleInteractiveElementBlur)
|
|
279
|
+
}
|
|
280
|
+
})
|
|
281
|
+
elementsWithListeners.value = []
|
|
282
|
+
})
|
|
283
|
+
|
|
268
284
|
return {
|
|
269
285
|
statusRegionId,
|
|
270
286
|
statusMessage,
|
|
@@ -117,7 +117,8 @@ describe('UserMenuBtn', () => {
|
|
|
117
117
|
})
|
|
118
118
|
|
|
119
119
|
const SyBtnSelect = wrapper.findComponent({ name: 'SyBtnSelect' })
|
|
120
|
-
|
|
120
|
+
// Utiliser le format camelCase pour l'événement, comme déclaré dans le composant SyBtnSelect
|
|
121
|
+
await SyBtnSelect.vm.$emit('update:modelValue', 'test-value')
|
|
121
122
|
|
|
122
123
|
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
123
124
|
expect(wrapper.emitted('update:modelValue')![0]).toEqual(['test-value'])
|
package/src/components/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ export { default as HeaderNavigationBar } from './HeaderNavigationBar/HeaderNavi
|
|
|
28
28
|
export { default as SkipLink } from './SkipLink/SkipLink.vue'
|
|
29
29
|
export { default as SocialMediaLinks } from './SocialMediaLinks/SocialMediaLinks.vue'
|
|
30
30
|
export { default as SyPagination } from './Customs/SyPagination/SyPagination.vue'
|
|
31
|
+
export { default as SyTabs } from './Customs/SyTabs/SyTabs.vue'
|
|
31
32
|
|
|
32
33
|
// ===========================
|
|
33
34
|
// Boutons
|
|
@@ -116,14 +117,24 @@ export { default as NotFoundPage } from './NotFoundPage/NotFoundPage.vue'
|
|
|
116
117
|
// ===========================
|
|
117
118
|
// Amelipro
|
|
118
119
|
// ===========================
|
|
120
|
+
export { default as AmeliproAccordion } from './Amelipro/AmeliproAccordion/AmeliproAccordion.vue'
|
|
121
|
+
export { default as AmeliproAccordionGroup } from './Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.vue'
|
|
122
|
+
export { default as AmeliproAccordionList } from './Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue'
|
|
123
|
+
export { default as AmeliproAccordionResult } from './Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue'
|
|
124
|
+
export { default as AmeliproAccordionResultList } from './Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue'
|
|
119
125
|
export { default as AmeliproAutoCompleteField } from './Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue'
|
|
126
|
+
export { default as AmeliproBadge } from './Amelipro/AmeliproBadge/AmeliproBadge.vue'
|
|
120
127
|
export { default as AmeliproBreadcrumb } from './Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue'
|
|
121
128
|
export { default as AmeliproBtn } from './Amelipro/AmeliproBtn/AmeliproBtn.vue'
|
|
122
129
|
export { default as AmeliproCard } from './Amelipro/AmeliproCard/AmeliproCard.vue'
|
|
123
130
|
export { default as AmeliproCallback } from './Amelipro/AmeliproCallback/AmeliproCallback.vue'
|
|
131
|
+
export { default as AmeliproCarousel } from './Amelipro/AmeliproCarousel/AmeliproCarousel.vue'
|
|
132
|
+
export { default as AmeliproCaptcha } from './Amelipro/AmeliproCaptcha/AmeliproCaptcha.vue'
|
|
124
133
|
export { default as AmeliproCheckbox } from './Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue'
|
|
125
134
|
export { default as AmeliproCheckboxGroup } from './Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue'
|
|
126
135
|
export { default as AmeliproChips } from './Amelipro/AmeliproChips/AmeliproChips.vue'
|
|
136
|
+
export { default as AmeliproClickableTile } from './Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue'
|
|
137
|
+
export { default as AmeliproCustomSelector } from './Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue'
|
|
127
138
|
export { default as AmeliproDialog } from './Amelipro/AmeliproDialog/AmeliproDialog.vue'
|
|
128
139
|
export { default as AmeliproDisclosure } from './Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue'
|
|
129
140
|
export { default as AmeliproFooter } from './Amelipro/AmeliproFooter/AmeliproFooter.vue'
|
|
@@ -142,10 +153,12 @@ export { default as AmeliproPageLayout } from './Amelipro/AmeliproPageLayout/Ame
|
|
|
142
153
|
export { default as AmeliproPagination } from './Amelipro/AmeliproPagination/AmeliproPagination.vue'
|
|
143
154
|
export { default as AmeliproPatientBanner } from './Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue'
|
|
144
155
|
export { default as AmeliproRadioGroup } from './Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue'
|
|
156
|
+
export { default as AmeliproResultList } from './Amelipro/AmeliproResultList/AmeliproResultList.vue'
|
|
145
157
|
export { default as AmeliproSelect } from './Amelipro/AmeliproSelect/AmeliproSelect.vue'
|
|
146
158
|
export { default as AmeliproStateTile } from './Amelipro/AmeliproStateTile/AmeliproStateTile.vue'
|
|
147
159
|
export { default as AmeliproStatus } from './Amelipro/AmeliproStatus/AmeliproStatus.vue'
|
|
148
160
|
export { default as AmeliproStepper } from './Amelipro/AmeliproStepper/AmeliproStepper.vue'
|
|
161
|
+
export { default as AmeliproTable } from './Amelipro/AmeliproTable/AmeliproTable.vue'
|
|
149
162
|
export { default as AmeliproTabs } from './Amelipro/AmeliproTabs/AmeliproTabs.vue'
|
|
150
163
|
export { default as AmeliproTextArea } from './Amelipro/AmeliproTextArea/AmeliproTextArea.vue'
|
|
151
164
|
export { default as AmeliproTextField } from './Amelipro/AmeliproTextField/AmeliproTextField.vue'
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi } from 'vitest'
|
|
2
2
|
import { useDatePickerAccessibility } from '../useDatePickerAccessibility'
|
|
3
|
+
import { mount } from '@vue/test-utils'
|
|
4
|
+
// Créer un composant vide pour servir de contexte à l'exécution des hooks
|
|
5
|
+
import { defineComponent } from 'vue'
|
|
6
|
+
|
|
7
|
+
// Composant vide qui servira de contexte pour les hooks Vue
|
|
8
|
+
const TestComponent = defineComponent({
|
|
9
|
+
setup() {
|
|
10
|
+
const { updateAccessibility, handleKeyDown, fixAriaAttributes } = useDatePickerAccessibility()
|
|
11
|
+
return {
|
|
12
|
+
updateAccessibility,
|
|
13
|
+
handleKeyDown,
|
|
14
|
+
fixAriaAttributes,
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
template: '<div></div>',
|
|
18
|
+
})
|
|
3
19
|
|
|
4
20
|
describe('useDatePickerAccessibility', () => {
|
|
5
|
-
|
|
21
|
+
// Variables pour stocker les méthodes du composable
|
|
22
|
+
let updateAccessibility: ReturnType<typeof useDatePickerAccessibility>['updateAccessibility']
|
|
23
|
+
let handleKeyDown: ReturnType<typeof useDatePickerAccessibility>['handleKeyDown']
|
|
24
|
+
// Wrapper pour le composant de test
|
|
25
|
+
let wrapper: ReturnType<typeof mount<{
|
|
26
|
+
updateAccessibility: ReturnType<typeof useDatePickerAccessibility>['updateAccessibility']
|
|
27
|
+
handleKeyDown: ReturnType<typeof useDatePickerAccessibility>['handleKeyDown']
|
|
28
|
+
fixAriaAttributes: ReturnType<typeof useDatePickerAccessibility>['fixAriaAttributes']
|
|
29
|
+
}>>
|
|
6
30
|
|
|
7
31
|
beforeEach(() => {
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
32
|
+
// Monter le composant de test pour fournir un contexte aux hooks Vue
|
|
33
|
+
wrapper = mount(TestComponent) as unknown as ReturnType<typeof mount<{
|
|
34
|
+
updateAccessibility: ReturnType<typeof useDatePickerAccessibility>['updateAccessibility']
|
|
35
|
+
handleKeyDown: ReturnType<typeof useDatePickerAccessibility>['handleKeyDown']
|
|
36
|
+
fixAriaAttributes: ReturnType<typeof useDatePickerAccessibility>['fixAriaAttributes']
|
|
37
|
+
}>>
|
|
38
|
+
// Obtenir les fonctions du composable directement depuis le composant monté
|
|
39
|
+
updateAccessibility = wrapper.vm.updateAccessibility
|
|
40
|
+
handleKeyDown = wrapper.vm.handleKeyDown
|
|
12
41
|
|
|
13
42
|
// Créer une structure DOM simulée pour les tests
|
|
14
43
|
document.body.innerHTML = `
|
package/src/composables/index.ts
CHANGED
|
@@ -88,7 +88,19 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
|
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
//
|
|
91
|
+
// Handle single select objects (VSelect with return-object but without multiple)
|
|
92
|
+
// Check if this looks like a select option object with title/text and value properties
|
|
93
|
+
const hasSelectStructure = (typedValue.title !== undefined || typedValue.text !== undefined) && typedValue.value !== undefined
|
|
94
|
+
if (hasSelectStructure) {
|
|
95
|
+
return [
|
|
96
|
+
{
|
|
97
|
+
text: typedValue.title || typedValue.text || typedValue.value.toString(),
|
|
98
|
+
value: typedValue,
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Any other object - iterate over keys
|
|
92
104
|
return Object.keys(typedValue).map((key) => {
|
|
93
105
|
// Use text property if it exists, else use value property or default to key value
|
|
94
106
|
const text
|
|
@@ -161,6 +173,16 @@ export default function useFilterable(model: Ref<FilterProp>, emits) {
|
|
|
161
173
|
return
|
|
162
174
|
}
|
|
163
175
|
|
|
176
|
+
// Handle single select objects (VSelect with return-object but without multiple)
|
|
177
|
+
const hasSelectStructure = (typedValue.title !== undefined || typedValue.text !== undefined) && typedValue.value !== undefined
|
|
178
|
+
if (hasSelectStructure) {
|
|
179
|
+
// For single select objects, clear the entire value
|
|
180
|
+
filter.value = undefined
|
|
181
|
+
updateValue()
|
|
182
|
+
return
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// For other object types, delete the specific property
|
|
164
186
|
delete typedValue[chipValue]
|
|
165
187
|
filter.value = typedValue
|
|
166
188
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Breakpoints, IDataListItem } from '../components/Amelipro/types'
|
|
2
|
+
import { type Ref, computed, ref, watch } from 'vue'
|
|
3
|
+
import type { PaginationTypes } from '../components/Amelipro/AmeliproPagination/types'
|
|
4
|
+
import type { SelectItem } from '../components/Amelipro/AmeliproSelect/types'
|
|
5
|
+
import { useDisplay } from 'vuetify'
|
|
6
|
+
|
|
7
|
+
export interface IUsePagination {
|
|
8
|
+
// N° de la page courante
|
|
9
|
+
currentPage: Ref<number>
|
|
10
|
+
// Liste des items de la page courante
|
|
11
|
+
|
|
12
|
+
currentPageItems: (currentList: IDataListItem[]) => IDataListItem[]
|
|
13
|
+
// Nombre d'items par page
|
|
14
|
+
itemToDisplay: Ref<number>
|
|
15
|
+
// Nombre total de pages
|
|
16
|
+
pageTotal: Ref<number>
|
|
17
|
+
// À quoi sert la pagination ? Semble non utilisé
|
|
18
|
+
pagination: Ref<boolean>
|
|
19
|
+
// Sélecteur de nombre d'items par page
|
|
20
|
+
paginationSelectItems: SelectItem[]
|
|
21
|
+
// Tableau stockant la pagination
|
|
22
|
+
paginationTable: Ref<PaginationTypes[]>
|
|
23
|
+
// Renseigne le nombre d'items par page au mount du composant et au changement de breakpoint entre desktop et mobile
|
|
24
|
+
setDefaultItemsPerPage: () => void
|
|
25
|
+
// Mise à jour du tableau de pagination
|
|
26
|
+
|
|
27
|
+
updatePagination: (currentList: IDataListItem[], itemPerPage: number) => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const usePagination = (list: IDataListItem[], itemPerPageDefault?: number, itemPerPageDefaultMobile?: number, breakPointValue?: Breakpoints): IUsePagination => {
|
|
31
|
+
const breakPointCurrentValue: Breakpoints = breakPointValue ? breakPointValue : 'mdAndUp'
|
|
32
|
+
const currentDisplay = useDisplay()
|
|
33
|
+
const isDesktop = computed<boolean>(() => currentDisplay[breakPointCurrentValue].value)
|
|
34
|
+
|
|
35
|
+
const dataListItems = ref(list)
|
|
36
|
+
const itemToDisplay = ref(10)
|
|
37
|
+
const itemToDisplayForDesktop = itemPerPageDefault ?? itemToDisplay.value
|
|
38
|
+
const itemToDisplayForMobile = itemPerPageDefaultMobile ?? itemToDisplay.value
|
|
39
|
+
|
|
40
|
+
const currentPage = ref(1)
|
|
41
|
+
const pagination = ref(false)
|
|
42
|
+
const paginationTable = ref<PaginationTypes[]>([])
|
|
43
|
+
const paginationSelectItems: SelectItem[] = [5, 10, 20, 30, 50, 100].map(value => ({ title: value, value }))
|
|
44
|
+
|
|
45
|
+
watch(() => isDesktop.value, () => {
|
|
46
|
+
setDefaultItemsPerPage()
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const setDefaultItemsPerPage = (): void => {
|
|
50
|
+
itemToDisplay.value = isDesktop.value ? itemToDisplayForDesktop : itemToDisplayForMobile
|
|
51
|
+
updatePagination(list, itemToDisplay.value)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const pageTotal = computed<number>(() => {
|
|
55
|
+
let pages = dataListItems.value.length / itemToDisplay.value
|
|
56
|
+
const reste = dataListItems.value.length % itemToDisplay.value
|
|
57
|
+
|
|
58
|
+
if (reste > 0 && pages >= 1) {
|
|
59
|
+
pages += 1
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return Math.trunc(pages)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const updatePagination = (newList: IDataListItem[], itemPerPage: number): void => {
|
|
66
|
+
dataListItems.value = newList
|
|
67
|
+
itemToDisplay.value = itemPerPage
|
|
68
|
+
paginationTable.value = []
|
|
69
|
+
if (pageTotal.value > 1) {
|
|
70
|
+
for (let i = 1; i <= pageTotal.value; i++) {
|
|
71
|
+
paginationTable.value.push({ key: i })
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const currentPageItems = (newList: IDataListItem[]): IDataListItem[] => {
|
|
77
|
+
dataListItems.value = newList
|
|
78
|
+
|
|
79
|
+
if (newList.length > itemToDisplay.value) {
|
|
80
|
+
if (currentPage.value === paginationTable.value.length) {
|
|
81
|
+
return newList.slice((currentPage.value - 1) * itemToDisplay.value, newList.length)
|
|
82
|
+
}
|
|
83
|
+
return newList.slice((currentPage.value - 1) * itemToDisplay.value, currentPage.value * itemToDisplay.value)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return newList
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Init pagination
|
|
90
|
+
setDefaultItemsPerPage()
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
currentPage,
|
|
94
|
+
currentPageItems,
|
|
95
|
+
itemToDisplay,
|
|
96
|
+
pageTotal,
|
|
97
|
+
pagination,
|
|
98
|
+
paginationSelectItems,
|
|
99
|
+
paginationTable,
|
|
100
|
+
setDefaultItemsPerPage,
|
|
101
|
+
updatePagination,
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -36,7 +36,7 @@ export const cnamSemanticTokens = {
|
|
|
36
36
|
accentOnDark: '#ffffff',
|
|
37
37
|
info: '#0c419a',
|
|
38
38
|
success: '#224e2d',
|
|
39
|
-
warning: '#
|
|
39
|
+
warning: '#906b15',
|
|
40
40
|
error: '#b33f2e',
|
|
41
41
|
onDark: 'rgba(255, 255, 255, 0.7)',
|
|
42
42
|
disabled: '#dddede',
|
|
@@ -49,7 +49,7 @@ export const cnamSemanticTokens = {
|
|
|
49
49
|
subdued: '#545859',
|
|
50
50
|
info: '#0c419a',
|
|
51
51
|
success: '#224e2d',
|
|
52
|
-
warning: '#
|
|
52
|
+
warning: '#906b15',
|
|
53
53
|
error: '#b33f2e',
|
|
54
54
|
disabled: '#989b9b',
|
|
55
55
|
onDark: '#ffffff',
|
|
@@ -64,7 +64,7 @@ export const cnamSemanticTokens = {
|
|
|
64
64
|
accentContrasted: '#07275c',
|
|
65
65
|
info: '#0c419a',
|
|
66
66
|
success: '#224e2d',
|
|
67
|
-
warning: '#
|
|
67
|
+
warning: '#906b15',
|
|
68
68
|
error: '#b33f2e',
|
|
69
69
|
onDark: '#ffffff',
|
|
70
70
|
disabled: '#989b9b',
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Directive } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Vue directive that locks keyboard focus within the bound element.
|
|
5
|
+
*
|
|
6
|
+
* ! Be careful to always allow the user to escape the focus trap as this directive does not handle that.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```vue
|
|
10
|
+
* <template>
|
|
11
|
+
* <div v-lock-focus>
|
|
12
|
+
* <!-- Focus will be trapped within this element -->
|
|
13
|
+
* </div>
|
|
14
|
+
* </template>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
const vLockFocus: Directive<HTMLElement> = {
|
|
18
|
+
mounted(el) {
|
|
19
|
+
el.addEventListener('keydown', handleFocus)
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
unmounted(el) {
|
|
23
|
+
el.removeEventListener('keydown', handleFocus)
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function handleFocus(event: KeyboardEvent) {
|
|
28
|
+
if (event.key !== 'Tab') return
|
|
29
|
+
const target = event.currentTarget as HTMLElement
|
|
30
|
+
|
|
31
|
+
const focusableElements = target.querySelectorAll(
|
|
32
|
+
'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex="-1"]), [contenteditable]',
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
const firstElement = focusableElements[0] as HTMLElement
|
|
36
|
+
const lastElement = focusableElements[focusableElements.length - 1] as HTMLElement
|
|
37
|
+
|
|
38
|
+
if (event.shiftKey && document.activeElement === firstElement) {
|
|
39
|
+
event.preventDefault()
|
|
40
|
+
lastElement.focus()
|
|
41
|
+
}
|
|
42
|
+
else if (!event.shiftKey && document.activeElement === lastElement) {
|
|
43
|
+
event.preventDefault()
|
|
44
|
+
firstElement.focus()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default vLockFocus
|
package/src/main.ts
CHANGED
|
@@ -379,14 +379,7 @@ import {Meta} from '@storybook/blocks';
|
|
|
379
379
|
<p>Tous nos utilisateurs peuvent être concernés par des situations de handicap temporaires (bras cassé, fatigue visuelle...).</p>
|
|
380
380
|
</div>
|
|
381
381
|
</div>
|
|
382
|
-
|
|
383
|
-
<div className="image-container">
|
|
384
|
-
<img alt="handicap" src={"/handicap1.jpg"} style={{ padding: '10px', border: '1px solid rgba(0, 0, 0, 0.05)', boxShadow: 'rgba(0, 0, 0, 0.10) 0 1px 3px 0', width: '50%', margin: '0 auto', display: 'block' }} />
|
|
385
|
-
<div className="image-caption">
|
|
386
|
-
Illustration des différentes situations de handicap pouvant affecter nos utilisateurs
|
|
387
|
-
</div>
|
|
388
|
-
</div>
|
|
389
|
-
|
|
382
|
+
|
|
390
383
|
<div className="resource-links">
|
|
391
384
|
<h3>👀 Tester la navigation du point de vue des utilisateurs en situation de handicap</h3>
|
|
392
385
|
<ul>
|