@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
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* Typography styles for CNAM and PA themes */
|
|
2
|
+
@use '@/assets/tokens.scss' as *;
|
|
3
|
+
|
|
4
|
+
.theme-cnam,
|
|
5
|
+
.theme-pa {
|
|
6
|
+
/* Headings with Vuetify classes */
|
|
7
|
+
.text-h1 {
|
|
8
|
+
font-size: var(--v-typography-h1-font-size);
|
|
9
|
+
font-weight: var(--v-typography-h1-font-weight);
|
|
10
|
+
line-height: var(--v-typography-h1-line-height);
|
|
11
|
+
letter-spacing: var(--v-typography-h1-letter-spacing);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.text-h2 {
|
|
15
|
+
font-size: var(--v-typography-h2-font-size);
|
|
16
|
+
font-weight: var(--v-typography-h2-font-weight);
|
|
17
|
+
line-height: var(--v-typography-h2-line-height);
|
|
18
|
+
letter-spacing: var(--v-typography-h2-letter-spacing);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text-h3 {
|
|
22
|
+
font-size: var(--v-typography-h3-font-size);
|
|
23
|
+
font-weight: var(--v-typography-h3-font-weight);
|
|
24
|
+
line-height: var(--v-typography-h3-line-height);
|
|
25
|
+
letter-spacing: var(--v-typography-h3-letter-spacing);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.text-h4 {
|
|
29
|
+
font-size: var(--v-typography-h4-font-size);
|
|
30
|
+
font-weight: var(--v-typography-h4-font-weight);
|
|
31
|
+
line-height: var(--v-typography-h4-line-height);
|
|
32
|
+
letter-spacing: var(--v-typography-h4-letter-spacing);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.text-h5 {
|
|
36
|
+
font-size: var(--v-typography-h5-font-size);
|
|
37
|
+
font-weight: var(--v-typography-h5-font-weight);
|
|
38
|
+
line-height: var(--v-typography-h5-line-height);
|
|
39
|
+
letter-spacing: var(--v-typography-h5-letter-spacing);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.text-h6 {
|
|
43
|
+
font-size: var(--v-typography-h6-font-size);
|
|
44
|
+
font-weight: var(--v-typography-h6-font-weight);
|
|
45
|
+
line-height: var(--v-typography-h6-line-height);
|
|
46
|
+
letter-spacing: var(--v-typography-h6-letter-spacing);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Native HTML heading elements */
|
|
50
|
+
h1 {
|
|
51
|
+
font-size: var(--v-typography-h1-font-size);
|
|
52
|
+
font-weight: var(--v-typography-h1-font-weight);
|
|
53
|
+
line-height: var(--v-typography-h1-line-height);
|
|
54
|
+
letter-spacing: var(--v-typography-h1-letter-spacing);
|
|
55
|
+
margin-bottom: 0.5rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h2 {
|
|
59
|
+
font-size: var(--v-typography-h2-font-size);
|
|
60
|
+
font-weight: var(--v-typography-h2-font-weight);
|
|
61
|
+
line-height: var(--v-typography-h2-line-height);
|
|
62
|
+
letter-spacing: var(--v-typography-h2-letter-spacing);
|
|
63
|
+
margin-bottom: 0.5rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h3 {
|
|
67
|
+
font-size: var(--v-typography-h3-font-size);
|
|
68
|
+
font-weight: var(--v-typography-h3-font-weight);
|
|
69
|
+
line-height: var(--v-typography-h3-line-height);
|
|
70
|
+
letter-spacing: var(--v-typography-h3-letter-spacing);
|
|
71
|
+
margin-bottom: 0.5rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
h4 {
|
|
75
|
+
font-size: var(--v-typography-h4-font-size);
|
|
76
|
+
font-weight: var(--v-typography-h4-font-weight);
|
|
77
|
+
line-height: var(--v-typography-h4-line-height);
|
|
78
|
+
letter-spacing: var(--v-typography-h4-letter-spacing);
|
|
79
|
+
margin-bottom: 0.5rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
h5 {
|
|
83
|
+
font-size: var(--v-typography-h5-font-size);
|
|
84
|
+
font-weight: var(--v-typography-h5-font-weight);
|
|
85
|
+
line-height: var(--v-typography-h5-line-height);
|
|
86
|
+
letter-spacing: var(--v-typography-h5-letter-spacing);
|
|
87
|
+
margin-bottom: 0.5rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
h6 {
|
|
91
|
+
font-size: var(--v-typography-h6-font-size);
|
|
92
|
+
font-weight: var(--v-typography-h6-font-weight);
|
|
93
|
+
line-height: var(--v-typography-h6-line-height);
|
|
94
|
+
letter-spacing: var(--v-typography-h6-letter-spacing);
|
|
95
|
+
margin-bottom: 0.5rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Body text */
|
|
99
|
+
.text-body-1 {
|
|
100
|
+
font-size: var(--v-typography-body1-font-size);
|
|
101
|
+
font-weight: var(--v-typography-body1-font-weight);
|
|
102
|
+
line-height: var(--v-typography-body1-line-height);
|
|
103
|
+
letter-spacing: var(--v-typography-body1-letter-spacing);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.text-body-2 {
|
|
107
|
+
font-size: var(--v-typography-body2-font-size);
|
|
108
|
+
font-weight: var(--v-typography-body2-font-weight);
|
|
109
|
+
line-height: var(--v-typography-body2-line-height);
|
|
110
|
+
letter-spacing: var(--v-typography-body2-letter-spacing);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Subtitle text */
|
|
114
|
+
.text-subtitle-1 {
|
|
115
|
+
font-size: var(--v-typography-subtitle1-font-size);
|
|
116
|
+
font-weight: var(--v-typography-subtitle1-font-weight);
|
|
117
|
+
line-height: var(--v-typography-subtitle1-line-height);
|
|
118
|
+
letter-spacing: var(--v-typography-subtitle1-letter-spacing);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.text-subtitle-2 {
|
|
122
|
+
font-size: var(--v-typography-subtitle2-font-size);
|
|
123
|
+
font-weight: var(--v-typography-subtitle2-font-weight);
|
|
124
|
+
line-height: var(--v-typography-subtitle2-line-height);
|
|
125
|
+
letter-spacing: var(--v-typography-subtitle2-letter-spacing);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Other typography */
|
|
129
|
+
.text-caption {
|
|
130
|
+
font-size: var(--v-typography-caption-font-size);
|
|
131
|
+
font-weight: var(--v-typography-caption-font-weight);
|
|
132
|
+
line-height: var(--v-typography-caption-line-height);
|
|
133
|
+
letter-spacing: var(--v-typography-caption-letter-spacing);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.text-overline {
|
|
137
|
+
font-size: var(--v-typography-overline-font-size);
|
|
138
|
+
font-weight: var(--v-typography-overline-font-weight);
|
|
139
|
+
line-height: var(--v-typography-overline-line-height);
|
|
140
|
+
letter-spacing: var(--v-typography-overline-letter-spacing);
|
|
141
|
+
text-transform: var(--v-typography-overline-text-transform, uppercase);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Display text */
|
|
145
|
+
.text-display-1 {
|
|
146
|
+
font-size: var(--v-typography-display1-font-size);
|
|
147
|
+
font-weight: var(--v-typography-display1-font-weight);
|
|
148
|
+
line-height: var(--v-typography-display1-line-height);
|
|
149
|
+
letter-spacing: var(--v-typography-display1-letter-spacing);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.text-display-2 {
|
|
153
|
+
font-size: var(--v-typography-display2-font-size);
|
|
154
|
+
font-weight: var(--v-typography-display2-font-weight);
|
|
155
|
+
line-height: var(--v-typography-display2-line-height);
|
|
156
|
+
letter-spacing: var(--v-typography-display2-letter-spacing);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.display-1 {
|
|
160
|
+
font-size: 40px;
|
|
161
|
+
line-height: 130%;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.display-1-bold {
|
|
165
|
+
font-size: 40px;
|
|
166
|
+
font-weight: bold;
|
|
167
|
+
line-height: 130%;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.display-2 {
|
|
171
|
+
font-size: 30px;
|
|
172
|
+
line-height: 130%;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.display-2-bold {
|
|
176
|
+
font-size: 30px;
|
|
177
|
+
font-weight: bold;
|
|
178
|
+
line-height: 130%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.title {
|
|
182
|
+
font-size: $font-size-title;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.alt-title {
|
|
186
|
+
font-size: $font-size-alt-title;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.body-text {
|
|
190
|
+
font-size: $font-size-body-text;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.link-label {
|
|
194
|
+
font-size: $font-size-link-label;
|
|
195
|
+
}
|
|
196
|
+
}
|
package/src/assets/settings.scss
CHANGED
|
@@ -1,51 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.v-btn.v-tab {
|
|
15
|
-
text-transform: uppercase !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.v-tooltip .v-overlay__content {
|
|
19
|
-
background-color: rgb(0 0 0 / 70%) !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.v-tooltip.v-theme--ap .v-overlay__content {
|
|
23
|
-
background-color: apTokens.$ap-white !important;
|
|
24
|
-
border: 1px solid apTokens.$ap-parme-darken1 !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.v-messages {
|
|
28
|
-
font-size: 14px !important;
|
|
29
|
-
|
|
30
|
-
.v-messages__message {
|
|
31
|
-
line-height: 16px !important;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Common table styles
|
|
36
|
-
.v-data-table thead th .v-data-table-header__content {
|
|
37
|
-
opacity: 0.65;
|
|
38
|
-
font-size: 0.875rem;
|
|
39
|
-
font-weight: 700 !important;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.v-data-table-progress {
|
|
43
|
-
.v-progress-linear {
|
|
44
|
-
height: 4px !important;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.v-progress-linear__background,
|
|
48
|
-
.v-progress-linear__indeterminate {
|
|
49
|
-
background: tokens.$primary-base !important;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* ! Do not put any style here or il will be duplicated many times
|
|
3
|
+
* https://vuetifyjs.com/en/features/sass-variables/#duplicated-css
|
|
4
|
+
*/
|
|
5
|
+
@forward 'vuetify/settings' with (
|
|
6
|
+
$layers: true,
|
|
7
|
+
$body-font-family: Arial,
|
|
8
|
+
$utilities: (
|
|
9
|
+
'typography': false,
|
|
10
|
+
),
|
|
11
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@use 'settings';
|
|
2
|
+
@use 'overrides/elevations';
|
|
3
|
+
@use 'overrides/radius';
|
|
4
|
+
@use 'overrides/typography';
|
|
5
|
+
@use 'overrides/spacers';
|
|
6
|
+
@use 'overrides/btns';
|
|
7
|
+
@use 'overrides/forms';
|
|
8
|
+
@use 'overrides/tables';
|
|
9
|
+
@use 'overrides/tooltips';
|
|
10
|
+
@use 'amelipro/apTheme';
|
package/src/assets/tokens.scss
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CNAM Design System
|
|
3
|
+
* Tokens and settings for the CNAM and PA themes.
|
|
4
|
+
* This file must not contain any styles as it will be duplicated many times.
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
// Primitives
|
|
2
8
|
$orange-darken-80: #2d100b;
|
|
3
9
|
$orange-darken-60: #5a2017;
|
|
@@ -311,89 +317,7 @@ $heading-2-font-size: 20px;
|
|
|
311
317
|
$heading-3-font-size: 16px;
|
|
312
318
|
$heading-4-font-size: 14px;
|
|
313
319
|
|
|
314
|
-
|
|
315
|
-
font-size: $font-size-title !important;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.alt-title {
|
|
319
|
-
font-size: $font-size-alt-title !important;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.body-text {
|
|
323
|
-
font-size: $font-size-body-text !important;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.link-label {
|
|
327
|
-
font-size: $font-size-link-label !important;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
h1 {
|
|
331
|
-
font-size: 32px !important;
|
|
332
|
-
line-height: 130% !important;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.h1-bold {
|
|
336
|
-
font-size: 32px !important;
|
|
337
|
-
font-weight: bold !important;
|
|
338
|
-
line-height: 130% !important;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
h2 {
|
|
342
|
-
font-size: 28px !important;
|
|
343
|
-
line-height: 130% !important;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.h2-bold {
|
|
347
|
-
font-size: 28px !important;
|
|
348
|
-
font-weight: bold !important;
|
|
349
|
-
line-height: 130% !important;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
h3 {
|
|
353
|
-
font-size: 24px !important;
|
|
354
|
-
line-height: 130% !important;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.h3-bold {
|
|
358
|
-
font-size: 24px !important;
|
|
359
|
-
font-weight: bold !important;
|
|
360
|
-
line-height: 130% !important;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
h4 {
|
|
364
|
-
font-size: 20px !important;
|
|
365
|
-
line-height: 130% !important;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.h4-bold {
|
|
369
|
-
font-size: 20px !important;
|
|
370
|
-
font-weight: bold !important;
|
|
371
|
-
line-height: 130% !important;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.display-1 {
|
|
375
|
-
font-size: 40px !important;
|
|
376
|
-
line-height: 130% !important;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.display-1-bold {
|
|
380
|
-
font-size: 40px !important;
|
|
381
|
-
font-weight: bold !important;
|
|
382
|
-
line-height: 130% !important;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.display-2 {
|
|
386
|
-
font-size: 30px !important;
|
|
387
|
-
line-height: 130% !important;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.display-2-bold {
|
|
391
|
-
font-size: 30px !important;
|
|
392
|
-
font-weight: bold !important;
|
|
393
|
-
line-height: 130% !important;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
// espacement verticaux des elements
|
|
320
|
+
// vertical spacing
|
|
397
321
|
|
|
398
322
|
$spacing-none: 0;
|
|
399
323
|
$spacing-xx-small: 4px;
|
|
@@ -406,7 +330,7 @@ $spacing-xx-large: 56px;
|
|
|
406
330
|
$spacing-xxx-large: 64px;
|
|
407
331
|
$spacing-huge: 80px;
|
|
408
332
|
|
|
409
|
-
//
|
|
333
|
+
// horizontal spacing
|
|
410
334
|
|
|
411
335
|
$spacing-horizontal-none: 0;
|
|
412
336
|
$spacing-horizontal-xx-small: 4px;
|
|
@@ -419,79 +343,8 @@ $spacing-horizontal-xx-large: 56px;
|
|
|
419
343
|
$spacing-horizontal-xxx-large: 64px;
|
|
420
344
|
$spacing-horizontal-huge: 80px;
|
|
421
345
|
|
|
422
|
-
|
|
423
|
-
.theme-pa {
|
|
424
|
-
// Surcharger toutes les élévations pour utiliser uniquement l'élévation 02
|
|
425
|
-
.elevation-1,
|
|
426
|
-
.elevation-2,
|
|
427
|
-
.elevation-3,
|
|
428
|
-
.elevation-4,
|
|
429
|
-
.elevation-5,
|
|
430
|
-
.elevation-6,
|
|
431
|
-
.elevation-7,
|
|
432
|
-
.elevation-8,
|
|
433
|
-
.elevation-9,
|
|
434
|
-
.elevation-10,
|
|
435
|
-
.elevation-11,
|
|
436
|
-
.elevation-12,
|
|
437
|
-
.elevation-13,
|
|
438
|
-
.elevation-14,
|
|
439
|
-
.elevation-15,
|
|
440
|
-
.elevation-16,
|
|
441
|
-
.elevation-17,
|
|
442
|
-
.elevation-18,
|
|
443
|
-
.elevation-19,
|
|
444
|
-
.elevation-20,
|
|
445
|
-
.elevation-21,
|
|
446
|
-
.elevation-22,
|
|
447
|
-
.elevation-23,
|
|
448
|
-
.elevation-24 {
|
|
449
|
-
box-shadow:
|
|
450
|
-
0 3px 1px -2px rgb(0 0 0 / 20%),
|
|
451
|
-
0 2px 2px 0 rgb(0 0 0 / 14%),
|
|
452
|
-
0 1px 5px 0 rgb(0 0 0 / 12%) !important;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
346
|
+
// container
|
|
455
347
|
|
|
456
|
-
// global.scss
|
|
457
|
-
|
|
458
|
-
// Variables pour les largeurs des conteneurs
|
|
459
348
|
$container-mobile-max-width: 600px;
|
|
460
349
|
$container-tablet-max-width: 960px;
|
|
461
350
|
$container-desktop-max-width: 960px;
|
|
462
|
-
|
|
463
|
-
// Conteneur général
|
|
464
|
-
.page-container {
|
|
465
|
-
text-align: center;
|
|
466
|
-
margin: 0 auto; // Centrer les conteneurs
|
|
467
|
-
padding: 40px 40px 56px 56px;
|
|
468
|
-
width: 1160px;
|
|
469
|
-
|
|
470
|
-
// Mobile Styles
|
|
471
|
-
@media (width <= 600px) {
|
|
472
|
-
max-width: $container-mobile-max-width;
|
|
473
|
-
padding: 40px 24px 80px;
|
|
474
|
-
display: grid;
|
|
475
|
-
grid-template-columns: repeat(3, 1fr);
|
|
476
|
-
grid-gap: 24px;
|
|
477
|
-
width: 80%;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// Tablet Styles
|
|
481
|
-
@media (width >= 601px) and (width <= 960px) {
|
|
482
|
-
max-width: $container-tablet-max-width;
|
|
483
|
-
width: 80%;
|
|
484
|
-
display: grid;
|
|
485
|
-
grid-template-columns: repeat(6, 1fr);
|
|
486
|
-
grid-gap: 24px;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// Desktop Styles
|
|
490
|
-
@media (width >= 960px) {
|
|
491
|
-
max-width: $container-desktop-max-width;
|
|
492
|
-
width: 100%;
|
|
493
|
-
display: grid;
|
|
494
|
-
grid-template-columns: repeat(12, 1fr);
|
|
495
|
-
grid-gap: 24px;
|
|
496
|
-
}
|
|
497
|
-
}
|
package/src/components/Accordion/composables/__tests__/useAccordionGroupCommunication.spec.ts
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
|
2
2
|
import useAccordionGroupCommunication from '../useAccordionGroupCommunication'
|
|
3
|
+
import { mount } from '@vue/test-utils'
|
|
4
|
+
import { defineComponent } from 'vue'
|
|
5
|
+
|
|
6
|
+
// Composant vide qui servira de contexte pour les hooks Vue
|
|
7
|
+
const TestComponent = defineComponent({
|
|
8
|
+
setup() {
|
|
9
|
+
const instanceId = 'test-instance'
|
|
10
|
+
const groupId = 'test-group'
|
|
11
|
+
const onFocusChange = vi.fn()
|
|
12
|
+
|
|
13
|
+
const accordion = useAccordionGroupCommunication(instanceId, groupId, onFocusChange)
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
instanceId,
|
|
17
|
+
groupId,
|
|
18
|
+
onFocusChange,
|
|
19
|
+
emitFocusChange: accordion.emitFocusChange,
|
|
20
|
+
handleFocusChange: accordion.handleFocusChange,
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
template: '<div></div>',
|
|
24
|
+
})
|
|
3
25
|
|
|
4
26
|
describe('useAccordionGroupCommunication', () => {
|
|
5
27
|
const instanceId = 'test-instance'
|
|
6
28
|
const groupId = 'test-group'
|
|
7
29
|
const mockOnFocusChange = vi.fn()
|
|
30
|
+
// Wrapper pour le composant de test
|
|
31
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32
|
+
let wrapper: any
|
|
8
33
|
|
|
9
34
|
// Espionner les méthodes addEventListener et removeEventListener de window
|
|
10
35
|
beforeEach(() => {
|
|
@@ -21,29 +46,43 @@ describe('useAccordionGroupCommunication', () => {
|
|
|
21
46
|
})
|
|
22
47
|
|
|
23
48
|
describe('initialization', () => {
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
// Monter le composant de test pour fournir un contexte aux hooks Vue
|
|
51
|
+
wrapper = mount(TestComponent)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
afterEach(() => {
|
|
55
|
+
// Démonter le composant après chaque test
|
|
56
|
+
wrapper.unmount()
|
|
57
|
+
})
|
|
58
|
+
|
|
24
59
|
it('adds event listener on mount', () => {
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
instanceId,
|
|
28
|
-
groupId,
|
|
29
|
-
mockOnFocusChange,
|
|
30
|
-
)
|
|
60
|
+
// Le composable est maintenant utilisé via le composant de test,
|
|
61
|
+
// ce qui fournit un contexte valide pour les hooks de cycle de vie
|
|
31
62
|
|
|
32
|
-
// Vérifier que le
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
63
|
+
// Vérifier que le composant est bien monté
|
|
64
|
+
expect(wrapper.vm).toBeDefined()
|
|
65
|
+
|
|
66
|
+
// Si addEventListener a été appelé sur window, cela signifie que
|
|
67
|
+
// le hook onMounted a été correctement exécuté
|
|
68
|
+
expect(window.addEventListener).toHaveBeenCalled()
|
|
37
69
|
})
|
|
38
70
|
})
|
|
39
71
|
|
|
40
72
|
describe('emitFocusChange', () => {
|
|
73
|
+
beforeEach(() => {
|
|
74
|
+
// Monter le composant de test pour fournir un contexte aux hooks Vue
|
|
75
|
+
wrapper = mount(TestComponent)
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
afterEach(() => {
|
|
79
|
+
// Démonter le composant après chaque test
|
|
80
|
+
wrapper.unmount()
|
|
81
|
+
})
|
|
82
|
+
|
|
41
83
|
it('dispatches a custom event with the correct details', () => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
groupId,
|
|
45
|
-
mockOnFocusChange,
|
|
46
|
-
)
|
|
84
|
+
// Utiliser les méthodes exposées par le composant
|
|
85
|
+
const { emitFocusChange } = wrapper.vm
|
|
47
86
|
|
|
48
87
|
const itemId = 'test-item'
|
|
49
88
|
emitFocusChange(itemId)
|
|
@@ -61,11 +100,8 @@ describe('useAccordionGroupCommunication', () => {
|
|
|
61
100
|
})
|
|
62
101
|
|
|
63
102
|
it('dispatches a custom event with null itemId', () => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
groupId,
|
|
67
|
-
mockOnFocusChange,
|
|
68
|
-
)
|
|
103
|
+
// Utiliser les méthodes exposées par le composant
|
|
104
|
+
const { emitFocusChange } = wrapper.vm
|
|
69
105
|
|
|
70
106
|
emitFocusChange(null)
|
|
71
107
|
|
|
@@ -83,12 +119,19 @@ describe('useAccordionGroupCommunication', () => {
|
|
|
83
119
|
})
|
|
84
120
|
|
|
85
121
|
describe('handleFocusChange', () => {
|
|
122
|
+
beforeEach(() => {
|
|
123
|
+
// Monter le composant de test pour fournir un contexte aux hooks Vue
|
|
124
|
+
wrapper = mount(TestComponent)
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
afterEach(() => {
|
|
128
|
+
// Démonter le composant après chaque test
|
|
129
|
+
wrapper.unmount()
|
|
130
|
+
})
|
|
131
|
+
|
|
86
132
|
it('ignores events from the same instance', () => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
groupId,
|
|
90
|
-
mockOnFocusChange,
|
|
91
|
-
)
|
|
133
|
+
// Utiliser les méthodes exposées par le composant
|
|
134
|
+
const { handleFocusChange } = wrapper.vm
|
|
92
135
|
|
|
93
136
|
const event = new CustomEvent('accordion-focus-changed', {
|
|
94
137
|
detail: {
|
|
@@ -104,11 +147,8 @@ describe('useAccordionGroupCommunication', () => {
|
|
|
104
147
|
})
|
|
105
148
|
|
|
106
149
|
it('ignores events from different groups', () => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
groupId,
|
|
110
|
-
mockOnFocusChange,
|
|
111
|
-
)
|
|
150
|
+
// Utiliser les méthodes exposées par le composant
|
|
151
|
+
const { handleFocusChange } = wrapper.vm
|
|
112
152
|
|
|
113
153
|
const event = new CustomEvent('accordion-focus-changed', {
|
|
114
154
|
detail: {
|
|
@@ -124,23 +164,23 @@ describe('useAccordionGroupCommunication', () => {
|
|
|
124
164
|
})
|
|
125
165
|
|
|
126
166
|
it('calls onFocusChange with null when receiving a valid event', () => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
)
|
|
167
|
+
// Utiliser les méthodes exposées par le composant
|
|
168
|
+
const { handleFocusChange, onFocusChange } = wrapper.vm
|
|
169
|
+
|
|
170
|
+
// Réinitialiser le mock avant ce test
|
|
171
|
+
onFocusChange.mockReset()
|
|
132
172
|
|
|
133
173
|
const event = new CustomEvent('accordion-focus-changed', {
|
|
134
174
|
detail: {
|
|
135
|
-
sourceInstanceId: 'other-instance',
|
|
136
|
-
groupId,
|
|
137
|
-
itemId:
|
|
175
|
+
sourceInstanceId: 'other-instance',
|
|
176
|
+
groupId,
|
|
177
|
+
itemId: null,
|
|
138
178
|
},
|
|
139
179
|
})
|
|
140
180
|
|
|
141
181
|
handleFocusChange(event)
|
|
142
182
|
|
|
143
|
-
expect(
|
|
183
|
+
expect(onFocusChange).toHaveBeenCalledWith(null)
|
|
144
184
|
})
|
|
145
185
|
})
|
|
146
186
|
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta, Source } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as AmeliproAccordionStories from './AmeliproAccordion.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={AmeliproAccordionStories} />
|
|
6
|
+
|
|
7
|
+
# AmeliproAccordion
|
|
8
|
+
|
|
9
|
+
L’élément `AmeliproAccordion` est utilisé pour créer des cartes dépliables.
|
|
10
|
+
|
|
11
|
+
<Canvas of={AmeliproAccordionStories.Default} />
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
<Controls of={AmeliproAccordionStories.Default} />
|