@cnamts/synapse 1.0.23 → 1.0.25
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/README.md +27 -5
- package/dist/AutocompleteFilter-D7qBuCAP.js +114 -0
- package/dist/AutocompleteFilter-Df9i5mAl.cjs +1 -0
- package/dist/DateFilter-BJD6FMev.cjs +1 -0
- package/dist/{DateFilter-Dc-gSGwk.js → DateFilter-BitMWrMU.js} +1 -1
- package/dist/{NumberFilter-vP38Wp6j.js → NumberFilter-BTLUxw0a.js} +3 -3
- package/dist/NumberFilter-DGCzCXzI.cjs +1 -0
- package/dist/{PeriodFilter-Ba1uYUnT.js → PeriodFilter-B5rUIPAC.js} +1 -1
- package/dist/PeriodFilter-DO_ecTZW.cjs +1 -0
- package/dist/SelectFilter-CGwcKWLm.cjs +1 -0
- package/dist/SelectFilter-l4QnRcuk.js +135 -0
- package/dist/TextFilter-B8nf7xoK.cjs +1 -0
- package/dist/{TextFilter-B84dpnoq.js → TextFilter-C9hj6Qrp.js} +7 -7
- package/dist/apLightTheme-CEK4iY3f.cjs +1 -0
- package/dist/apLightTheme-DnIM24Lv.js +950 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +7022 -9616
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +40 -40
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +60 -60
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +7168 -9762
- package/dist/components/Amelipro/AmeliproStepper/AmeliproStepper.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +7501 -10095
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +21 -21
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +41 -41
- package/dist/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.d.ts +2 -2
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +20 -498
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +117 -151
- package/dist/components/Customs/Selects/SyInputSelect/SyInputSelect.d.ts +5 -5
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +12 -16
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +8 -8
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +31 -506
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +28 -506
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +69 -89
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +627 -791
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +315 -412
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +112 -160
- package/dist/components/DatePicker/composables/index.d.ts +1 -0
- package/dist/components/DatePicker/composables/useDatePickerFocusTrap.d.ts +11 -0
- package/dist/components/DatePicker/composables/useDatePickerState.d.ts +1 -0
- package/dist/components/DatePicker/composables/useDateTextField.d.ts +4 -4
- package/dist/components/DatePicker/composables/useDateValidation.d.ts +3 -3
- package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +2 -2
- package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +2 -2
- package/dist/components/FileList/FileList.d.ts +6 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +17 -17
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +20 -28
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +3 -3
- package/dist/components/MonthPicker/MonthPicker.d.ts +86 -127
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +85 -126
- package/dist/components/NirField/NirField.d.ts +202 -278
- package/dist/components/NirField/locales.d.ts +10 -10
- package/dist/components/NirField/useNirValidation.d.ts +64 -0
- package/dist/components/PasswordField/PasswordField.d.ts +8 -9
- package/dist/components/PeriodField/PeriodField.d.ts +1352 -1680
- package/dist/components/PhoneField/PhoneField.d.ts +88 -129
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +12 -12
- package/dist/components/SyTextArea/SyTextArea.d.ts +34 -14
- package/dist/components/SyTextArea/useDefaultValidationRules.d.ts +11 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +10 -6
- package/dist/components/Tables/SyTable/SyTable.d.ts +10 -6
- package/dist/components/Tables/common/SyTableFilter.d.ts +2 -3
- package/dist/components/Tables/common/SyTablePagination.d.ts +19 -19
- package/dist/components/Tables/common/TableHeader.d.ts +5 -0
- package/dist/components/Tables/common/filters/AutocompleteFilter.d.ts +120 -0
- package/dist/components/Tables/common/filters/locales.d.ts +0 -1
- package/dist/components/Tables/common/locales.d.ts +3 -0
- package/dist/components/Tables/common/types.d.ts +21 -3
- package/dist/components/Tables/common/useClickableTableRow.d.ts +17 -0
- package/dist/components/Tables/common/usePagination.d.ts +3 -1
- package/dist/components/Tables/common/usePinnedColumns.d.ts +31 -0
- package/dist/components/Tables/common/useTableHeaders.d.ts +2 -0
- package/dist/components/Tables/common/useTableRowCheckboxAccessibility.d.ts +5 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +7 -6
- package/dist/composables/date/useDatePickerAccessibility.d.ts +1 -1
- package/dist/composables/rules/useFieldValidation.d.ts +4 -4
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
- package/dist/composables/unifyValidation/useCustomValidation.d.ts +8 -0
- package/dist/composables/unifyValidation/useValidation.d.ts +102 -0
- package/dist/composables/unifyValidation/useVuetifyValidation.d.ts +18 -0
- package/dist/composables/useFormFieldErrorHandling.d.ts +2 -2
- package/dist/composables/validation/useFormValidation.d.ts +11 -2
- package/dist/composables/validation/useValidation.d.ts +19 -9
- package/dist/design-system-v3.d.ts +2 -0
- package/dist/design-system-v3.js +186 -187
- package/dist/design-system-v3.umd.cjs +1 -1066
- package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
- package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
- package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
- package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/baseColors.d.ts +127 -0
- package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
- package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
- package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
- package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
- package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
- package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
- package/dist/designTokens/utils/index.d.ts +2 -2
- package/dist/main-ByDPHpae.cjs +1067 -0
- package/dist/main-Cpx8Co6H.js +38869 -0
- package/dist/main.d.ts +0 -1
- package/dist/synapse.css +1 -0
- package/dist/tooth-11-D3sLWv2n.cjs +1 -0
- package/dist/tooth-12-CXrLuH03.cjs +1 -0
- package/dist/tooth-13-BSfo5fpT.cjs +1 -0
- package/dist/tooth-14-DMzulx0h.cjs +1 -0
- package/dist/tooth-15-BKRFVi-9.cjs +1 -0
- package/dist/tooth-16-CpuxAbuM.cjs +1 -0
- package/dist/tooth-17-BPoahUdg.cjs +1 -0
- package/dist/tooth-18-DhHJz8sy.cjs +1 -0
- package/dist/tooth-21-Dgd5hn_X.cjs +1 -0
- package/dist/tooth-22-C2Tn19sB.cjs +1 -0
- package/dist/tooth-23-C9uaaSGb.cjs +1 -0
- package/dist/tooth-24-BrK9UGpf.cjs +1 -0
- package/dist/tooth-25-CE_EfGNp.cjs +1 -0
- package/dist/tooth-26-Ctv4i9Fy.cjs +1 -0
- package/dist/tooth-27-C5J7JkWM.cjs +1 -0
- package/dist/tooth-28-Z9oWqjo0.cjs +1 -0
- package/dist/tooth-31-BrYqmkTi.cjs +1 -0
- package/dist/tooth-32-BNNR0oCZ.cjs +1 -0
- package/dist/tooth-33-DuxvqO2J.cjs +1 -0
- package/dist/tooth-34-BCSCXMB6.cjs +1 -0
- package/dist/tooth-35-BLUXkX88.cjs +1 -0
- package/dist/tooth-36-IrKHYqlA.cjs +1 -0
- package/dist/tooth-37-BYqpdMwo.cjs +1 -0
- package/dist/tooth-38-B_eNXXdu.cjs +1 -0
- package/dist/tooth-41-Ddva4Ot8.cjs +1 -0
- package/dist/tooth-42-szcDqlM0.cjs +1 -0
- package/dist/tooth-43-B3ka6rQm.cjs +1 -0
- package/dist/tooth-44-CazyQucj.cjs +1 -0
- package/dist/tooth-45-B4HQtc8n.cjs +1 -0
- package/dist/tooth-46-BPM40gbG.cjs +1 -0
- package/dist/tooth-47-Dvr20dlh.cjs +1 -0
- package/dist/tooth-48-Bd8ljGsF.cjs +1 -0
- package/dist/tooth-51-OBpwCOF3.cjs +1 -0
- package/dist/tooth-52-aKxyHcmq.cjs +1 -0
- package/dist/tooth-53-vCwJjTOc.cjs +1 -0
- package/dist/tooth-54-DsWu2iFy.cjs +1 -0
- package/dist/tooth-55-BxC1X2Dn.cjs +1 -0
- package/dist/tooth-61-BbLvxMQi.cjs +1 -0
- package/dist/tooth-62-CmTkWczP.cjs +1 -0
- package/dist/tooth-63-DI7l_2qI.cjs +1 -0
- package/dist/tooth-64-B21sOsJh.cjs +1 -0
- package/dist/tooth-65-D2ZC2VEr.cjs +1 -0
- package/dist/tooth-71-D473PPO5.cjs +1 -0
- package/dist/tooth-72-Drh1wnNu.cjs +1 -0
- package/dist/tooth-73-DzlwYI23.cjs +1 -0
- package/dist/tooth-74-8aGvcZPg.cjs +1 -0
- package/dist/tooth-75-BFK7At_r.cjs +1 -0
- package/dist/tooth-81-BZmR-I0M.cjs +1 -0
- package/dist/tooth-82-euVfUUZV.cjs +1 -0
- package/dist/tooth-83-KV010j64.cjs +1 -0
- package/dist/tooth-84-BBg1RjhZ.cjs +1 -0
- package/dist/tooth-85-Cr-kc1wM.cjs +1 -0
- package/dist/utils/functions/classToHex.d.ts +1 -1
- package/dist/utils/functions/createHexResolver.d.ts +16 -0
- package/dist/vuetifyConfig.js +522 -0
- package/dist/vuetifyConfig.umd.cjs +1 -0
- package/package.json +37 -20
- package/src/assets/amelipro/apTokens2026.scss +5 -5
- package/src/assets/overrides/_breakpoints.scss +25 -0
- package/src/assets/overrides/_btns.scss +0 -8
- package/src/assets/overrides/_forms.scss +1 -3
- package/src/assets/overrides/_icons.scss +14 -10
- package/src/assets/overrides/_otp.scss +41 -0
- package/src/assets/overrides/_tables.scss +11 -20
- package/src/assets/overrides/_tooltips.scss +17 -7
- package/src/assets/overrides/_typography.scss +35 -47
- package/src/assets/overrides/_utilities.scss +43 -47
- package/src/assets/themes.scss +1 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
- package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
- package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
- package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
- package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
- package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
- package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
- package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
- package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
- package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
- package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
- package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
- package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
- package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
- package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
- package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
- package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
- package/src/components/Captcha/Captcha.vue +1 -3
- package/src/components/Captcha/accessibilite/Accessibility.mdx +86 -8
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +12 -12
- package/src/components/ChipList/ChipList.stories.ts +0 -15
- package/src/components/ChipList/ChipList.vue +19 -17
- package/src/components/ChipList/accessibilite/Accessibility.mdx +83 -10
- package/src/components/ChipList/tests/ChipList.a11y.spec.ts +41 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +0 -2
- package/src/components/CopyBtn/CopyBtn.vue +1 -3
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +0 -9
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +28 -7
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +209 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +14 -10
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.stories.ts +4 -4
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +12 -15
- package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.spec.ts +10 -10
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +1 -39
- package/src/components/Customs/Selects/SySelect/SySelect.vue +274 -71
- package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +89 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +6 -9
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +10 -16
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +45 -11
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +53 -3
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.a11y.spec.ts +134 -2
- package/src/components/Customs/SyForm/SyForm.stories.ts +31 -5
- package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +4 -7
- package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +32 -33
- package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
- package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +50 -68
- package/src/components/Customs/SyTextField/SyTextField.vue +156 -161
- package/src/components/Customs/SyTextField/tests/SyTextField.a11y.spec.ts +32 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +120 -11
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +62 -58
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +342 -237
- package/src/components/DatePicker/CalendarMode/accessibilite/Accessibility.mdx +82 -0
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +141 -0
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +2 -56
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +215 -175
- package/src/components/DatePicker/ComplexDatePicker/accessibilite/Accessibility.mdx +76 -0
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +33 -10
- package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +8 -8
- package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +106 -8
- package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +12 -11
- package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +12 -12
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +0 -12
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +71 -67
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +3 -0
- package/src/components/DatePicker/DateTextInput/accessibilite/Accessibility.mdx +66 -0
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.spec.ts +52 -1
- package/src/components/DatePicker/composables/index.ts +1 -0
- package/src/components/DatePicker/composables/tests/useCalendarKeyboardNavigation.spec.ts +109 -65
- package/src/components/DatePicker/composables/tests/useDatePickerFocusTrap.spec.ts +138 -0
- package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
- package/src/components/DatePicker/composables/tests/useDateValidation.spec.ts +74 -18
- package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +39 -0
- package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +91 -0
- package/src/components/DatePicker/composables/useCalendarKeyboardNavigation.ts +442 -36
- package/src/components/DatePicker/composables/useDatePickerFocusTrap.ts +92 -0
- package/src/components/DatePicker/composables/useDatePickerState.ts +24 -0
- package/src/components/DatePicker/composables/useDateTextField.ts +6 -6
- package/src/components/DatePicker/composables/useDateValidation.ts +36 -35
- package/src/components/DatePicker/composables/useInputBlurHandler.ts +3 -3
- package/src/components/DatePicker/composables/useManualDateValidation.ts +6 -2
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
- package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
- package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +76 -8
- package/src/components/DialogBox/DialogBox.vue +3 -5
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
- package/src/components/FileList/FileList.vue +9 -2
- package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
- package/src/components/FileList/tests/FileList.spec.ts +47 -0
- package/src/components/FileUpload/FileUpload.vue +3 -5
- package/src/components/FileUpload/FileUploadContent.vue +3 -5
- package/src/components/FilterInline/FilterInline.vue +1 -3
- package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +7 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
- package/src/components/FooterBar/FooterBar.vue +9 -13
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
- package/src/components/HeaderBar/HeaderBar.stories.ts +14 -2
- package/src/components/HeaderBar/HeaderBar.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
- package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
- package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
- package/src/components/LangBtn/LangBtn.vue +2 -4
- package/src/components/Logo/accessibilite/Accessibility.mdx +73 -11
- package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
- package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
- package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +85 -9
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +3 -1
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +4 -5
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +2 -1
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +7 -7
- package/src/components/NirField/NirField.stories.ts +6 -2
- package/src/components/NirField/NirField.vue +67 -265
- package/src/components/NirField/accessibilite/Accessibility.mdx +102 -7
- package/src/components/NirField/locales.ts +1 -1
- package/src/components/NirField/tests/NirField.spec.ts +124 -0
- package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
- package/src/components/NirField/useNirValidation.ts +277 -0
- package/src/components/NotificationBar/Notification/Notification.vue +5 -7
- package/src/components/NotificationBar/NotificationBar.vue +1 -3
- package/src/components/PaginatedTable/PaginatedTable.vue +2 -3
- package/src/components/PaginatedTable/Pagination.vue +3 -5
- package/src/components/PasswordField/PasswordField.stories.ts +4 -4
- package/src/components/PasswordField/PasswordField.vue +26 -34
- package/src/components/PasswordField/tests/PasswordField.spec.ts +6 -3
- package/src/components/PeriodField/PeriodField.stories.ts +4 -4
- package/src/components/PeriodField/PeriodField.vue +57 -57
- package/src/components/PeriodField/__tests__/PeriodField.async.spec.ts +32 -0
- package/src/components/PeriodField/accessibilite/Accessibility.mdx +68 -8
- package/src/components/PeriodField/tests/PeriodField.spec.ts +28 -2
- package/src/components/PhoneField/PhoneField.vue +8 -9
- package/src/components/PhoneField/tests/PhoneField.spec.ts +1 -0
- package/src/components/RangeField/RangeField.vue +6 -0
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +0 -2
- package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
- package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +6 -8
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +3 -5
- package/src/components/SearchListField/SearchListField.vue +0 -2
- package/src/components/SkipLink/SkipLink.vue +2 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/SyAlert/SyAlert.vue +7 -9
- package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
- package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
- package/src/components/SyTextArea/SyTextArea.stories.ts +138 -2
- package/src/components/SyTextArea/SyTextArea.vue +53 -23
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +126 -3
- package/src/components/SyTextArea/useDefaultValidationRules.ts +74 -0
- package/src/components/TableToolbar/TableToolbar.vue +6 -8
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +25 -0
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +839 -1
- package/src/components/Tables/SyServerTable/SyServerTable.vue +154 -95
- package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +81 -0
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +390 -0
- package/src/components/Tables/SyTable/SyTable.mdx +25 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +556 -1
- package/src/components/Tables/SyTable/SyTable.vue +136 -60
- package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +79 -0
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +382 -0
- package/src/components/Tables/common/SyTableFilter.vue +49 -4
- package/src/components/Tables/common/SyTablePagination.vue +142 -19
- package/src/components/Tables/common/TableHeader.vue +45 -4
- package/src/components/Tables/common/filters/AutocompleteFilter.vue +160 -0
- package/src/components/Tables/common/filters/NumberFilter.vue +1 -1
- package/src/components/Tables/common/filters/SelectFilter.vue +11 -12
- package/src/components/Tables/common/filters/TextFilter.vue +1 -1
- package/src/components/Tables/common/filters/getFilterComponent.ts +8 -1
- package/src/components/Tables/common/filters/locales.ts +0 -1
- package/src/components/Tables/common/filters/tests/AutocompleteFilter.a11y.spec.ts +110 -0
- package/src/components/Tables/common/filters/tests/AutocompleteFilter.spec.ts +203 -0
- package/src/components/Tables/common/filters/tests/SelectFilter.a11y.spec.ts +104 -0
- package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +152 -16
- package/src/components/Tables/common/locales.ts +3 -0
- package/src/components/Tables/common/tableFilterUtils.ts +3 -0
- package/src/components/Tables/common/tableStyles.scss +60 -19
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
- package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
- package/src/components/Tables/common/tests/filterByRange.spec.ts +2 -1
- package/src/components/Tables/common/types.ts +15 -4
- package/src/components/Tables/common/useClickableTableRow.ts +103 -0
- package/src/components/Tables/common/usePagination.ts +13 -0
- package/src/components/Tables/common/usePinnedColumns.ts +237 -0
- package/src/components/Tables/common/useTableHeaders.ts +52 -30
- package/src/components/Tables/common/useTableRowCheckboxAccessibility.ts +41 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
- package/src/components/UploadWorkflow/useFileList.ts +3 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +2 -6
- package/src/composables/date/useDatePickerAccessibility.ts +42 -207
- package/src/composables/rules/tests/useFieldValidation.spec.ts +120 -120
- package/src/composables/rules/useFieldValidation.ts +34 -17
- package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
- package/src/composables/unifyValidation/tests/useCustomValidation.spec.ts +601 -0
- package/src/composables/unifyValidation/tests/useValidation.spec.ts +2048 -0
- package/src/composables/unifyValidation/tests/useVuetifyValidation.spec.ts +184 -0
- package/src/composables/unifyValidation/useCustomValidation.ts +95 -0
- package/src/composables/unifyValidation/useValidation.ts +190 -0
- package/src/composables/unifyValidation/useVuetifyValidation.ts +54 -0
- package/src/composables/useFormFieldErrorHandling.ts +4 -7
- package/src/composables/validation/tests/useFormValidation.spec.ts +14 -0
- package/src/composables/validation/tests/useValidation.spec.ts +116 -21
- package/src/composables/validation/useFormValidation.ts +20 -13
- package/src/composables/validation/useValidatable.ts +8 -1
- package/src/composables/validation/useValidation.ts +151 -99
- package/src/composantsVuetify/Introduction.mdx +48 -0
- package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
- package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
- package/src/composantsVuetify/VBtn/VBtn.mdx +72 -0
- package/src/composantsVuetify/VBtn/v-btn.stories.ts +121 -0
- package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
- package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
- package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
- package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
- package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
- package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
- package/src/composantsVuetify/VTooltip/VTooltip.mdx +32 -0
- package/src/composantsVuetify/VTooltip/v-tooltip.stories.ts +95 -0
- package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
- package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
- package/src/designTokens/tests/themeUtils.spec.ts +53 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
- package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
- package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
- package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -1
- package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
- package/src/designTokens/tokens/baseColors.ts +129 -0
- package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
- package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
- package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +3 -3
- package/src/designTokens/tokens/pa/paColors.ts +2 -166
- package/src/designTokens/tokens/pa/paContextual.ts +3 -48
- package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
- package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
- package/src/designTokens/utils/buildColorClassMap.ts +34 -0
- package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
- package/src/designTokens/utils/createFlattenTheme.ts +15 -7
- package/src/designTokens/utils/index.ts +2 -2
- package/src/main.ts +0 -2
- package/src/stories/Accessibilite/AuditDesignSystem.mdx +0 -11
- package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
- package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +8 -1
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +51 -10
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +16 -9
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +48 -58
- package/src/stories/Components/Components.stories.ts +113 -9
- package/src/stories/Demarrer/Accueil.stories.ts +3 -3
- package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
- package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
- package/src/stories/Demarrer/Releases.stories.ts +48 -5
- package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
- package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
- package/src/stories/DesignTokens/colors.stories.ts +5 -6
- package/src/stories/GuideDuDev/Amelipro.mdx +15 -0
- package/src/stories/GuideDuDev/Amelipro.stories.ts +209 -0
- package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
- package/src/stories/GuideDuDev/Theme.mdx +36 -26
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +3 -3
- package/src/stories/styles/accessibility-guide.css +3 -3
- package/src/utils/functions/classToHex.ts +6 -34
- package/src/utils/functions/createHexResolver.ts +45 -0
- package/src/utils/functions/tests/classToHex.spec.ts +36 -0
- package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
- package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
- package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
- package/dist/SelectFilter-BioGT6Nn.js +0 -136
- package/dist/designTokens/utils/convertGaps.d.ts +0 -5
- package/dist/main-aLKwdMi1.js +0 -37886
- package/dist/style.css +0 -1
- package/src/assets/apTokens.scss +0 -343
- package/src/assets/overrides/_container.scss +0 -36
- package/src/assets/tokens.scss +0 -388
- package/src/components/DatePicker/Accessibilite.mdx +0 -14
- package/src/designTokens/apColors.md +0 -66
- package/src/designTokens/cnamColors.md +0 -193
- package/src/designTokens/paColors.md +0 -66
- package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
- package/src/designTokens/tokens/json/primitives.json +0 -209
- package/src/designTokens/tokens/json/semantic.json +0 -120
- package/src/designTokens/utils/convertGaps.ts +0 -11
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import DateTextInput from '../DateTextInput/DateTextInput.vue'
|
|
5
5
|
import ComplexDatePicker from '../ComplexDatePicker/ComplexDatePicker.vue'
|
|
6
6
|
import { VDatePicker } from 'vuetify/components'
|
|
7
|
-
import { useValidation, type ValidationResult } from '@/composables/validation/useValidation'
|
|
7
|
+
import { useValidation, type ValidationResult, type ValidationRule } from '@/composables/validation/useValidation'
|
|
8
8
|
import { useValidatable } from '@/composables/validation/useValidatable'
|
|
9
9
|
import { useDateFormat } from '@/composables/date/useDateFormatDayjs'
|
|
10
10
|
import { useDateInitialization, type DateValue, type DateInput } from '@/composables/date/useDateInitializationDayjs'
|
|
11
11
|
import { useDatePickerAccessibility } from '@/composables/date/useDatePickerAccessibility'
|
|
12
|
-
import { useWeekendDays, useTodayButton, useDatePickerViewMode, useDateSelection, useMonthButtonCustomization, useDisplayedDateString, useAsteriskDisplay, useDateValidation, useDatePickerState, useHolidayHighlighting, useCalendarKeyboardNavigation } from '../composables'
|
|
12
|
+
import { useWeekendDays, useTodayButton, useDatePickerViewMode, useDateSelection, useMonthButtonCustomization, useDisplayedDateString, useAsteriskDisplay, useDateValidation, useDatePickerState, useHolidayHighlighting, useCalendarKeyboardNavigation, useDatePickerFocusTrap } from '../composables'
|
|
13
13
|
import { DATE_PICKER_MESSAGES } from '../constants/messages'
|
|
14
14
|
import dayjs from 'dayjs'
|
|
15
15
|
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
@@ -30,96 +30,99 @@
|
|
|
30
30
|
const currentYear = ref<string | null>(null)
|
|
31
31
|
const currentMonthName = ref<string | null>(null)
|
|
32
32
|
const currentYearName = ref<string | null>(null)
|
|
33
|
+
const monthYearLiveText = computed(() => {
|
|
34
|
+
if (currentMonthName.value && currentYearName.value) return `${currentMonthName.value} ${currentYearName.value}`
|
|
35
|
+
if (currentMonthName.value) return currentMonthName.value
|
|
36
|
+
if (currentYearName.value) return currentYearName.value
|
|
37
|
+
return ''
|
|
38
|
+
})
|
|
33
39
|
|
|
34
40
|
const props = withDefaults(defineProps<{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
placeholder?: string
|
|
38
|
-
format?: string
|
|
39
|
-
dateFormatReturn?: string
|
|
40
|
-
isBirthDate?: boolean
|
|
41
|
+
autoClamp?: boolean
|
|
42
|
+
bgColor?: string
|
|
41
43
|
birthDate?: boolean // Alias pour isBirthDate pour compatibilité avec l'attribut kebab-case birth-date
|
|
42
|
-
showWeekNumber?: boolean
|
|
43
|
-
required?: boolean
|
|
44
|
-
displayRange?: boolean
|
|
45
|
-
displayIcon?: boolean
|
|
46
|
-
displayAppendIcon?: boolean
|
|
47
|
-
displayPrependIcon?: boolean
|
|
48
44
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
45
|
customRules?: { type: string, options: any }[]
|
|
50
46
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
47
|
customWarningRules?: { type: string, options: any }[]
|
|
52
|
-
|
|
53
|
-
noIcon?: boolean
|
|
54
|
-
noCalendar?: boolean
|
|
55
|
-
isOutlined?: boolean
|
|
56
|
-
readonly?: boolean
|
|
57
|
-
width?: string
|
|
58
|
-
disableErrorHandling?: boolean
|
|
59
|
-
showSuccessMessages?: boolean
|
|
60
|
-
bgColor?: string
|
|
48
|
+
dateFormatReturn?: string
|
|
61
49
|
density?: 'default' | 'comfortable' | 'compact'
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
displayHolidayDays?: boolean
|
|
66
|
-
useCombinedMode?: boolean
|
|
67
|
-
textFieldActivator?: boolean
|
|
68
|
-
title?: string | false
|
|
50
|
+
disableErrorHandling?: boolean
|
|
51
|
+
disabled?: boolean
|
|
52
|
+
displayAppendIcon?: boolean
|
|
69
53
|
displayAsterisk?: boolean
|
|
54
|
+
displayHolidayDays?: boolean
|
|
55
|
+
displayIcon?: boolean
|
|
56
|
+
displayPrependIcon?: boolean
|
|
57
|
+
displayRange?: boolean
|
|
58
|
+
displayTodayButton?: boolean
|
|
59
|
+
displayWeekendDays?: boolean
|
|
60
|
+
format?: string
|
|
61
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6
|
|
62
|
+
hideDetails?: boolean | 'auto'
|
|
63
|
+
hint?: string
|
|
64
|
+
isBirthDate?: boolean
|
|
65
|
+
isOutlined?: boolean
|
|
66
|
+
isValidateOnBlur?: boolean
|
|
67
|
+
label: string
|
|
68
|
+
modelValue?: DateInput
|
|
69
|
+
noCalendar?: boolean
|
|
70
|
+
noIcon?: boolean
|
|
70
71
|
period?: {
|
|
71
|
-
min?: string
|
|
72
72
|
max?: string
|
|
73
|
+
min?: string
|
|
73
74
|
}
|
|
74
|
-
autoClamp?: boolean
|
|
75
|
-
isValidateOnBlur?: boolean
|
|
76
|
-
hint?: string
|
|
77
75
|
persistentHint?: boolean
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
placeholder?: string
|
|
77
|
+
readonly?: boolean
|
|
78
|
+
required?: boolean
|
|
79
|
+
showSuccessMessages?: boolean
|
|
80
|
+
showWeekNumber?: boolean
|
|
81
|
+
textFieldActivator?: boolean
|
|
82
|
+
title?: string | false
|
|
83
|
+
useCombinedMode?: boolean
|
|
84
|
+
width?: string
|
|
80
85
|
}>(), {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
format: DATE_PICKER_MESSAGES.FORMAT_DEFAULT,
|
|
84
|
-
dateFormatReturn: '',
|
|
85
|
-
isBirthDate: false,
|
|
86
|
+
autoClamp: false,
|
|
87
|
+
bgColor: 'white',
|
|
86
88
|
birthDate: false,
|
|
87
|
-
showWeekNumber: false,
|
|
88
|
-
required: false,
|
|
89
|
-
displayRange: false,
|
|
90
|
-
displayIcon: true,
|
|
91
|
-
displayAppendIcon: false,
|
|
92
|
-
displayPrependIcon: true,
|
|
93
89
|
customRules: () => [],
|
|
94
90
|
customWarningRules: () => [],
|
|
91
|
+
dateFormatReturn: '',
|
|
92
|
+
density: 'default',
|
|
93
|
+
disableErrorHandling: false,
|
|
95
94
|
disabled: false,
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
displayAppendIcon: false,
|
|
96
|
+
displayAsterisk: false,
|
|
97
|
+
displayHolidayDays: true,
|
|
98
|
+
displayIcon: true,
|
|
99
|
+
displayPrependIcon: true,
|
|
100
|
+
displayRange: false,
|
|
101
|
+
displayTodayButton: true,
|
|
102
|
+
displayWeekendDays: true,
|
|
103
|
+
format: DATE_PICKER_MESSAGES.FORMAT_DEFAULT,
|
|
104
|
+
headingLevel: 3,
|
|
105
|
+
hideDetails: false,
|
|
106
|
+
hint: undefined,
|
|
107
|
+
isBirthDate: false,
|
|
98
108
|
isOutlined: true,
|
|
109
|
+
isValidateOnBlur: true,
|
|
110
|
+
modelValue: undefined,
|
|
111
|
+
noCalendar: false,
|
|
112
|
+
noIcon: false,
|
|
113
|
+
period: () => ({ min: '', max: '' }),
|
|
114
|
+
persistentHint: false,
|
|
115
|
+
placeholder: undefined,
|
|
99
116
|
readonly: false,
|
|
100
|
-
|
|
101
|
-
disableErrorHandling: false,
|
|
117
|
+
required: false,
|
|
102
118
|
showSuccessMessages: true,
|
|
103
|
-
|
|
104
|
-
density: 'default',
|
|
105
|
-
hideDetails: false,
|
|
106
|
-
displayWeekendDays: true,
|
|
107
|
-
displayTodayButton: true,
|
|
108
|
-
displayHolidayDays: true,
|
|
109
|
-
useCombinedMode: false,
|
|
119
|
+
showWeekNumber: false,
|
|
110
120
|
textFieldActivator: false,
|
|
111
121
|
title: false,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
autoClamp: false,
|
|
115
|
-
isValidateOnBlur: true,
|
|
116
|
-
hint: undefined,
|
|
117
|
-
persistentHint: false,
|
|
118
|
-
headingLevel: 3,
|
|
122
|
+
useCombinedMode: false,
|
|
123
|
+
width: '100%',
|
|
119
124
|
})
|
|
120
125
|
|
|
121
|
-
// La compatibilité entre isBirthDate et birthDate est gérée directement dans l'appel au composable
|
|
122
|
-
|
|
123
126
|
// Utilisation des composables pour les fonctionnalités du CalendarMode
|
|
124
127
|
const { displayWeekendDays } = useWeekendDays(props)
|
|
125
128
|
const { todayInString, headerDate } = useTodayButton(props)
|
|
@@ -142,8 +145,70 @@
|
|
|
142
145
|
|
|
143
146
|
const dateTextInputRef = ref<null | ComponentPublicInstance<typeof DateTextInput>>()
|
|
144
147
|
const dateCalendarTextInputRef = ref<null | ComponentPublicInstance<typeof SyTextField>>()
|
|
145
|
-
const datePickerRef = ref<
|
|
148
|
+
const datePickerRef = ref<ComponentPublicInstance | null>(null)
|
|
146
149
|
const complexDatePickerRef = ref<null | ComponentPublicInstance<typeof ComplexDatePicker>>()
|
|
150
|
+
const datePickerContentId = `date-picker-${Math.random().toString(36).slice(2)}`
|
|
151
|
+
|
|
152
|
+
const isDatePickerVisible = ref(false)
|
|
153
|
+
const { handleMenuKeydown } = useDatePickerFocusTrap({
|
|
154
|
+
isDatePickerVisible,
|
|
155
|
+
datePickerRef,
|
|
156
|
+
onClose: () => emit('closed'),
|
|
157
|
+
restoreFocus: () => queueMicrotask(() => dateCalendarTextInputRef.value?.$el?.querySelector?.('input')?.focus({ preventScroll: true })),
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
// Utiliser le calendarKeyboardNavigation normalement
|
|
161
|
+
useCalendarKeyboardNavigation({
|
|
162
|
+
isDatePickerVisible,
|
|
163
|
+
datePickerRef,
|
|
164
|
+
getCurrentDate: () => {
|
|
165
|
+
const value = selectedDates.value
|
|
166
|
+
if (value) {
|
|
167
|
+
const date = Array.isArray(value) ? value[0] ?? null : value
|
|
168
|
+
// Vérifier si la date sélectionnée est dans le mois actuellement affiché
|
|
169
|
+
if (date && currentMonth.value !== null && currentYear.value !== null) {
|
|
170
|
+
const sameMonth = date.getMonth() === Number(currentMonth.value)
|
|
171
|
+
const sameYear = date.getFullYear() === Number(currentYear.value)
|
|
172
|
+
if (sameMonth && sameYear) {
|
|
173
|
+
return date
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Fallback: retourner le 1er du mois actuellement affiché
|
|
179
|
+
if (currentMonth.value !== null && currentYear.value !== null) {
|
|
180
|
+
return new Date(Number(currentYear.value), Number(currentMonth.value), 1)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return null
|
|
184
|
+
},
|
|
185
|
+
setCurrentDate: (date: Date) => {
|
|
186
|
+
preventCloseOnKeyboardNavigation.value = true
|
|
187
|
+
updateSelectedDates([date])
|
|
188
|
+
syncDisplayedMonthYearFromDate(date)
|
|
189
|
+
|
|
190
|
+
// S'assurer que le VDatePicker affiche le bon mois après navigation clavier
|
|
191
|
+
nextTick(() => {
|
|
192
|
+
// Forcer la mise à jour du mois affiché dans le VDatePicker
|
|
193
|
+
if (datePickerRef.value) {
|
|
194
|
+
// Le VDatePicker devrait automatiquement suivre la date sélectionnée
|
|
195
|
+
// mais on s'assure que le mois/année est bien synchronisé
|
|
196
|
+
const month = date.getMonth().toString()
|
|
197
|
+
const year = date.getFullYear().toString()
|
|
198
|
+
if (currentMonth.value !== month || currentYear.value !== year) {
|
|
199
|
+
currentMonth.value = month
|
|
200
|
+
currentYear.value = year
|
|
201
|
+
currentMonthName.value = dayjs(date).format('MMMM')
|
|
202
|
+
currentYearName.value = year
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
queueMicrotask(() => {
|
|
208
|
+
preventCloseOnKeyboardNavigation.value = false
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
})
|
|
147
212
|
|
|
148
213
|
// Fonction pour sélectionner la date du jour
|
|
149
214
|
const handleSelectToday = () => {
|
|
@@ -184,12 +249,9 @@
|
|
|
184
249
|
(e: 'date-selected', value: DateValue): void
|
|
185
250
|
}>()
|
|
186
251
|
|
|
187
|
-
const isDatePickerVisible = ref(false)
|
|
188
252
|
const validation = useValidation({
|
|
189
253
|
showSuccessMessages: props.showSuccessMessages,
|
|
190
254
|
fieldIdentifier: 'Date',
|
|
191
|
-
customRules: props.customRules,
|
|
192
|
-
warningRules: props.customWarningRules,
|
|
193
255
|
disableErrorHandling: props.disableErrorHandling,
|
|
194
256
|
})
|
|
195
257
|
const { errors, warnings, successes, validateField: baseValidateField, clearValidation: baseClearValidation } = validation
|
|
@@ -204,15 +266,11 @@
|
|
|
204
266
|
})
|
|
205
267
|
|
|
206
268
|
const validateField = (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
warningRules: any[] = [],
|
|
213
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- compat signature with useDateValidation
|
|
214
|
-
successRules: any[] = [],
|
|
215
|
-
): ValidationResult => {
|
|
269
|
+
value: unknown,
|
|
270
|
+
rules: ValidationRule[] = [],
|
|
271
|
+
warningRules: ValidationRule[] = [],
|
|
272
|
+
successRules: ValidationRule[] = [],
|
|
273
|
+
): Promise<ValidationResult> | ValidationResult => {
|
|
216
274
|
if (props.readonly) {
|
|
217
275
|
return {
|
|
218
276
|
hasError: false,
|
|
@@ -222,7 +280,7 @@
|
|
|
222
280
|
}
|
|
223
281
|
}
|
|
224
282
|
|
|
225
|
-
return baseValidateField(value, rules, warningRules, successRules)
|
|
283
|
+
return baseValidateField(value, rules, warningRules, successRules)
|
|
226
284
|
}
|
|
227
285
|
|
|
228
286
|
const validateFieldForDateValidation = (
|
|
@@ -280,7 +338,7 @@
|
|
|
280
338
|
})
|
|
281
339
|
|
|
282
340
|
// Fonction pour valider les dates
|
|
283
|
-
const validateDates = (forceValidation = false) => {
|
|
341
|
+
const validateDates = async (forceValidation = false) => {
|
|
284
342
|
if (props.noCalendar) {
|
|
285
343
|
// En mode no-calendar, on délègue la validation au DateTextInput
|
|
286
344
|
return
|
|
@@ -314,7 +372,7 @@
|
|
|
314
372
|
|
|
315
373
|
if (shouldDisplayErrors && (!isInitialValidation.value || forceValidation)) {
|
|
316
374
|
// Comportement historique : exécuter directement les règles personnalisées même si la valeur est vide
|
|
317
|
-
validateField(
|
|
375
|
+
await validateField(
|
|
318
376
|
selectedDates.value,
|
|
319
377
|
props.customRules,
|
|
320
378
|
props.customWarningRules,
|
|
@@ -329,12 +387,12 @@
|
|
|
329
387
|
|
|
330
388
|
// Ne pas afficher d'erreurs de custom rules si on est dans le contexte du mounted initial
|
|
331
389
|
if (shouldDisplayErrors && (!isInitialValidation.value || forceValidation)) {
|
|
332
|
-
coreValidateDates(forceValidation)
|
|
390
|
+
await coreValidateDates(forceValidation)
|
|
333
391
|
}
|
|
334
392
|
}
|
|
335
393
|
|
|
336
394
|
// Fonction centralisée pour mettre à jour le modèle
|
|
337
|
-
const updateModel = (value: DateValue) => {
|
|
395
|
+
const updateModel = async (value: DateValue) => {
|
|
338
396
|
// Éviter les mises à jour inutiles
|
|
339
397
|
if (JSON.stringify(value) === JSON.stringify(props.modelValue)) return
|
|
340
398
|
|
|
@@ -345,7 +403,7 @@
|
|
|
345
403
|
isDatePickerVisible.value = false
|
|
346
404
|
emit('closed')
|
|
347
405
|
}
|
|
348
|
-
validateDates()
|
|
406
|
+
await validateDates()
|
|
349
407
|
}
|
|
350
408
|
finally {
|
|
351
409
|
// S'assurer que le flag est toujours réinitialisé
|
|
@@ -356,9 +414,9 @@
|
|
|
356
414
|
}
|
|
357
415
|
|
|
358
416
|
// Watcher pour mettre à jour le modèle lorsque les dates sélectionnées changent
|
|
359
|
-
watch(selectedDates, (newValue) => {
|
|
417
|
+
watch(selectedDates, async (newValue) => {
|
|
360
418
|
// Valider les dates
|
|
361
|
-
validateDates()
|
|
419
|
+
await validateDates()
|
|
362
420
|
// Marquer les jours fériés après la mise à jour des dates
|
|
363
421
|
markHolidayDays()
|
|
364
422
|
|
|
@@ -367,7 +425,7 @@
|
|
|
367
425
|
// En mode range, ne mettez à jour le modèle et ne fermez que si la plage est complète.
|
|
368
426
|
const isRangeComplete = props.displayRange && Array.isArray(newValue) && newValue.length >= 2
|
|
369
427
|
if (!props.displayRange || isRangeComplete) {
|
|
370
|
-
updateModel(formattedDate.value)
|
|
428
|
+
await updateModel(formattedDate.value)
|
|
371
429
|
}
|
|
372
430
|
|
|
373
431
|
// Mettre à jour textInputValue pour le DateTextInput
|
|
@@ -435,14 +493,14 @@
|
|
|
435
493
|
})
|
|
436
494
|
|
|
437
495
|
// Gestionnaire pour les mises à jour du DateTextInput en mode no-calendar
|
|
438
|
-
const handleDateTextInputUpdate = (value: DateValue) => {
|
|
496
|
+
const handleDateTextInputUpdate = async (value: DateValue) => {
|
|
439
497
|
if (isUpdatingFromInternal.value) return
|
|
440
498
|
|
|
441
499
|
try {
|
|
442
500
|
isUpdatingFromInternal.value = true
|
|
443
501
|
|
|
444
502
|
// Mettre à jour le modèle avec la valeur reçue du DateTextInput
|
|
445
|
-
updateModel(value)
|
|
503
|
+
await updateModel(value)
|
|
446
504
|
|
|
447
505
|
// Mettre à jour selectedDates en fonction de la valeur reçue
|
|
448
506
|
if (!value) {
|
|
@@ -477,14 +535,14 @@
|
|
|
477
535
|
}
|
|
478
536
|
|
|
479
537
|
// Gestionnaire pour les événements date-selected du DateTextInput
|
|
480
|
-
const handleDateTextInputSelection = (value: DateValue) => {
|
|
538
|
+
const handleDateTextInputSelection = async (value: DateValue) => {
|
|
481
539
|
if (isUpdatingFromInternal.value) return
|
|
482
540
|
|
|
483
541
|
// Mettre à jour le modèle avec la valeur sélectionnée
|
|
484
|
-
updateModel(value)
|
|
542
|
+
await updateModel(value)
|
|
485
543
|
}
|
|
486
544
|
|
|
487
|
-
watch(textInputValue, (newValue) => {
|
|
545
|
+
watch(textInputValue, async (newValue) => {
|
|
488
546
|
// Éviter les mises à jour récursives
|
|
489
547
|
if (isUpdatingFromInternal.value || props.noCalendar) return
|
|
490
548
|
|
|
@@ -595,6 +653,33 @@
|
|
|
595
653
|
currentYearName,
|
|
596
654
|
)
|
|
597
655
|
|
|
656
|
+
const syncDisplayedMonthYearFromDate = (date: Date) => {
|
|
657
|
+
const month = date.getMonth().toString()
|
|
658
|
+
const year = date.getFullYear().toString()
|
|
659
|
+
const hasMonthChanged = currentMonth.value !== month
|
|
660
|
+
const hasYearChanged = currentYear.value !== year
|
|
661
|
+
|
|
662
|
+
if (hasMonthChanged) {
|
|
663
|
+
currentMonth.value = month
|
|
664
|
+
currentMonthName.value = dayjs(date).format('MMMM')
|
|
665
|
+
handleMonthUpdate()
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
if (hasYearChanged) {
|
|
669
|
+
currentYear.value = year
|
|
670
|
+
currentYearName.value = year
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (hasMonthChanged || hasYearChanged) {
|
|
674
|
+
nextTick(() => {
|
|
675
|
+
if (isDatePickerVisible.value) {
|
|
676
|
+
customizeMonthButton()
|
|
677
|
+
markHolidayDays()
|
|
678
|
+
}
|
|
679
|
+
})
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
598
683
|
onMounted(() => {
|
|
599
684
|
document.addEventListener('click', handleClickOutside)
|
|
600
685
|
|
|
@@ -624,39 +709,17 @@
|
|
|
624
709
|
document.removeEventListener('click', handleClickOutside)
|
|
625
710
|
})
|
|
626
711
|
|
|
627
|
-
|
|
628
|
-
isDatePickerVisible,
|
|
629
|
-
datePickerRef: datePickerRef as unknown as Ref<ComponentPublicInstance | null>,
|
|
630
|
-
getCurrentDate: () => {
|
|
631
|
-
const value = selectedDates.value
|
|
632
|
-
if (!value) return null
|
|
633
|
-
|
|
634
|
-
if (Array.isArray(value)) {
|
|
635
|
-
return value[0] ?? null
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
return value
|
|
639
|
-
},
|
|
640
|
-
setCurrentDate: (date: Date) => {
|
|
641
|
-
preventCloseOnKeyboardNavigation.value = true
|
|
642
|
-
updateSelectedDates([date])
|
|
643
|
-
queueMicrotask(() => {
|
|
644
|
-
preventCloseOnKeyboardNavigation.value = false
|
|
645
|
-
})
|
|
646
|
-
},
|
|
647
|
-
})
|
|
648
|
-
|
|
649
|
-
const validateOnSubmit = () => {
|
|
712
|
+
const validateOnSubmit = async () => {
|
|
650
713
|
// Si le mode noCalendar est activé, on délègue la validation au DateTextInput
|
|
651
714
|
if (props.noCalendar) {
|
|
652
|
-
return dateTextInputRef.value?.validateOnSubmit()
|
|
715
|
+
return await dateTextInputRef.value?.validateOnSubmit()
|
|
653
716
|
}
|
|
654
717
|
// Si le mode combiné est activé, on délègue la validation au ComplexDatePicker
|
|
655
718
|
else if (props.useCombinedMode) {
|
|
656
|
-
return complexDatePickerRef.value?.validateOnSubmit()
|
|
719
|
+
return await complexDatePickerRef.value?.validateOnSubmit()
|
|
657
720
|
}
|
|
658
721
|
// Forcer la validation pour ignorer les conditions de validation interactive
|
|
659
|
-
validateDates(true)
|
|
722
|
+
await validateDates(true)
|
|
660
723
|
// Retourner directement un booléen pour maintenir la compatibilité avec les tests existants
|
|
661
724
|
return errors.value.length === 0
|
|
662
725
|
}
|
|
@@ -664,10 +727,10 @@
|
|
|
664
727
|
// Intégration avec le système de validation du formulaire
|
|
665
728
|
useValidatable(validateOnSubmit, clearValidation)
|
|
666
729
|
|
|
667
|
-
const openDatePicker = () => {
|
|
730
|
+
const openDatePicker = async () => {
|
|
668
731
|
if (props.disabled || props.readonly) return
|
|
669
732
|
if (!isDatePickerVisible.value) {
|
|
670
|
-
toggleDatePicker()
|
|
733
|
+
await toggleDatePicker()
|
|
671
734
|
}
|
|
672
735
|
}
|
|
673
736
|
|
|
@@ -717,11 +780,11 @@
|
|
|
717
780
|
() => selectedDates.value,
|
|
718
781
|
)
|
|
719
782
|
|
|
720
|
-
const handleInputBlur = () => {
|
|
783
|
+
const handleInputBlur = async () => {
|
|
721
784
|
emit('blur')
|
|
722
785
|
onblur.value = true
|
|
723
786
|
if (props.isValidateOnBlur) {
|
|
724
|
-
validateDates(true)
|
|
787
|
+
await validateDates(true)
|
|
725
788
|
}
|
|
726
789
|
}
|
|
727
790
|
|
|
@@ -817,7 +880,7 @@
|
|
|
817
880
|
}
|
|
818
881
|
})
|
|
819
882
|
|
|
820
|
-
const toggleDatePicker = () => {
|
|
883
|
+
const toggleDatePicker = async () => {
|
|
821
884
|
if (props.disabled || props.readonly) return
|
|
822
885
|
|
|
823
886
|
isDatePickerVisible.value = !isDatePickerVisible.value
|
|
@@ -829,7 +892,7 @@
|
|
|
829
892
|
}
|
|
830
893
|
else {
|
|
831
894
|
emit('closed')
|
|
832
|
-
validateDates()
|
|
895
|
+
await validateDates()
|
|
833
896
|
}
|
|
834
897
|
}
|
|
835
898
|
|
|
@@ -845,26 +908,26 @@
|
|
|
845
908
|
emit('focus')
|
|
846
909
|
}
|
|
847
910
|
|
|
848
|
-
const openDatePickerOnIconClick = () => {
|
|
911
|
+
const openDatePickerOnIconClick = async () => {
|
|
849
912
|
if (props.disabled || props.readonly) return
|
|
850
|
-
toggleDatePicker()
|
|
913
|
+
await toggleDatePicker()
|
|
851
914
|
}
|
|
852
915
|
|
|
853
916
|
// Gestionnaire d'événement clavier pour l'input
|
|
854
|
-
const handleInputKeydown = (event: KeyboardEvent) => {
|
|
917
|
+
const handleInputKeydown = async (event: KeyboardEvent) => {
|
|
855
918
|
// Ne rien faire si le composant est en readonly
|
|
856
919
|
if (props.readonly) return
|
|
857
920
|
|
|
858
921
|
// Ouvrir le calendrier uniquement lorsque la touche Entrée est pressée
|
|
859
922
|
if (event.key === 'Enter') {
|
|
860
|
-
openDatePicker()
|
|
923
|
+
await openDatePicker()
|
|
861
924
|
event.preventDefault() // Empêcher la soumission du formulaire
|
|
862
925
|
}
|
|
863
926
|
// Fermer le calendrier lorsque la touche Escape est pressée
|
|
864
927
|
else if ((event.key === 'Escape' || event.key === 'Esc') && isDatePickerVisible.value) {
|
|
865
928
|
isDatePickerVisible.value = false
|
|
866
929
|
emit('closed')
|
|
867
|
-
validateDates() // Valider les dates à la fermeture
|
|
930
|
+
await validateDates() // Valider les dates à la fermeture
|
|
868
931
|
event.preventDefault()
|
|
869
932
|
}
|
|
870
933
|
}
|
|
@@ -972,7 +1035,6 @@
|
|
|
972
1035
|
<VMenu
|
|
973
1036
|
v-if="!props.noCalendar"
|
|
974
1037
|
v-model="isDatePickerVisible"
|
|
975
|
-
activator="parent"
|
|
976
1038
|
:min-width="0"
|
|
977
1039
|
location="bottom"
|
|
978
1040
|
:close-on-content-click="false"
|
|
@@ -981,111 +1043,133 @@
|
|
|
981
1043
|
transition="fade-transition"
|
|
982
1044
|
attach="body"
|
|
983
1045
|
:offset="[-20, 5]"
|
|
1046
|
+
content-class="date-picker-overlay-content"
|
|
1047
|
+
role="presentation"
|
|
1048
|
+
:title="props.placeholder || DATE_PICKER_MESSAGES.LABEL_DEFAULT"
|
|
984
1049
|
>
|
|
985
1050
|
<template #activator="{ props: menuProps }">
|
|
986
|
-
<
|
|
987
|
-
v-bind="menuProps"
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1051
|
+
<div
|
|
1052
|
+
v-bind="{ ...menuProps, 'aria-expanded': undefined, 'aria-haspopup': undefined, 'aria-owns': undefined, 'aria-controls': isDatePickerVisible ? datePickerContentId : undefined }"
|
|
1053
|
+
>
|
|
1054
|
+
<SyTextField
|
|
1055
|
+
:id="`${datePickerContentId}-input`"
|
|
1056
|
+
ref="dateCalendarTextInputRef"
|
|
1057
|
+
v-model="displayFormattedDate"
|
|
1058
|
+
:aria-label="labelWithAsterisk || props.placeholder || DATE_PICKER_MESSAGES.LABEL_DEFAULT"
|
|
1059
|
+
:aria-labelledby="undefined"
|
|
1060
|
+
:append-icon="displayIcon && displayAppendIcon ? 'calendar' : undefined"
|
|
1061
|
+
:class="[getMessageClasses(), 'label-hidden-on-focus']"
|
|
1062
|
+
:error-messages="errorMessages"
|
|
1063
|
+
:warning-messages="warningMessages"
|
|
1064
|
+
:success-messages="props.showSuccessMessages ? successMessages : []"
|
|
1065
|
+
:disabled="props.disabled"
|
|
1066
|
+
:disable-click-button="false"
|
|
1067
|
+
:readonly="true"
|
|
1068
|
+
:label="labelWithAsterisk"
|
|
1069
|
+
:placeholder="props.placeholder"
|
|
1070
|
+
:no-icon="props.noIcon"
|
|
1071
|
+
:prepend-icon="displayIcon && !displayAppendIcon ? 'calendar' : undefined"
|
|
1072
|
+
:variant-style="props.isOutlined ? 'outlined' : 'underlined'"
|
|
1073
|
+
color="primary"
|
|
1074
|
+
:show-success-messages="props.showSuccessMessages"
|
|
1075
|
+
:bg-color="props.bgColor"
|
|
1076
|
+
:density="props.density"
|
|
1077
|
+
:hide-details="props.hideDetails"
|
|
1078
|
+
:display-asterisk="props.displayAsterisk"
|
|
1079
|
+
:is-clearable="!props.readonly"
|
|
1080
|
+
:auto-clamp="props.autoClamp"
|
|
1081
|
+
:title="props.title || props.placeholder"
|
|
1082
|
+
:hint="props.hint"
|
|
1083
|
+
:persistent-hint="props.persistentHint"
|
|
1084
|
+
@click="openDatePickerOnClick"
|
|
1085
|
+
@focus="openDatePickerOnFocus"
|
|
1086
|
+
@blur="handleInputBlur"
|
|
1087
|
+
@keydown="handleInputKeydown"
|
|
1088
|
+
@update:model-value="updateSelectedDates"
|
|
1089
|
+
@prepend-icon-click="openDatePickerOnIconClick"
|
|
1090
|
+
@append-icon-click="openDatePickerOnIconClick"
|
|
1091
|
+
/>
|
|
1092
|
+
</div>
|
|
1022
1093
|
</template>
|
|
1023
|
-
<
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
color="primary"
|
|
1028
|
-
control-variant="modal"
|
|
1029
|
-
:first-day-of-week="1"
|
|
1030
|
-
:multiple="props.displayRange ? 'range' : false"
|
|
1031
|
-
:show-adjacent-months="true"
|
|
1032
|
-
:show-week="props.showWeekNumber"
|
|
1033
|
-
:view-mode="currentViewMode"
|
|
1034
|
-
:class="displayWeekendDays ? 'weekend' : ''"
|
|
1035
|
-
:max="maxDate"
|
|
1036
|
-
:min="minDate"
|
|
1037
|
-
:display-holiday-days="props.displayHolidayDays"
|
|
1038
|
-
@update:view-mode="handleViewModeUpdate"
|
|
1039
|
-
@update:month="onUpdateMonth"
|
|
1040
|
-
@update:year="onUpdateYear"
|
|
1041
|
-
@click:date="updateSelectedDates"
|
|
1042
|
-
@update:model-value="updateDisplayFormattedDate"
|
|
1043
|
-
@focus="markHolidayDays"
|
|
1044
|
-
@update:month-year="markHolidayDays"
|
|
1094
|
+
<div
|
|
1095
|
+
tabindex="-1"
|
|
1096
|
+
role="presentation"
|
|
1097
|
+
@keydown.capture="handleMenuKeydown"
|
|
1045
1098
|
>
|
|
1046
|
-
<
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
<SyHeading
|
|
1051
|
-
class="mx-auto my-auto ml-5 mb-4"
|
|
1052
|
-
:level="headingLevel"
|
|
1053
|
-
>
|
|
1054
|
-
{{ selectedDates ? displayedDateString : headerDate }}
|
|
1055
|
-
</SyHeading>
|
|
1056
|
-
</template>
|
|
1057
|
-
<template
|
|
1058
|
-
v-if="props.displayTodayButton"
|
|
1059
|
-
#actions
|
|
1099
|
+
<div
|
|
1100
|
+
class="sr-only"
|
|
1101
|
+
aria-live="polite"
|
|
1102
|
+
aria-atomic="true"
|
|
1060
1103
|
>
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1104
|
+
{{ monthYearLiveText }}
|
|
1105
|
+
</div>
|
|
1106
|
+
<VDatePicker
|
|
1107
|
+
v-if="isDatePickerVisible && !props.noCalendar"
|
|
1108
|
+
:id="datePickerContentId"
|
|
1109
|
+
ref="datePickerRef"
|
|
1110
|
+
v-model="selectedDates"
|
|
1111
|
+
color="primary"
|
|
1112
|
+
control-variant="modal"
|
|
1113
|
+
:first-day-of-week="1"
|
|
1114
|
+
:multiple="props.displayRange ? 'range' : false"
|
|
1115
|
+
:show-adjacent-months="true"
|
|
1116
|
+
:show-week="props.showWeekNumber"
|
|
1117
|
+
:view-mode="currentViewMode"
|
|
1118
|
+
:class="displayWeekendDays ? 'weekend' : ''"
|
|
1119
|
+
:max="maxDate"
|
|
1120
|
+
:min="minDate"
|
|
1121
|
+
:display-holiday-days="props.displayHolidayDays"
|
|
1122
|
+
@update:view-mode="handleViewModeUpdate"
|
|
1123
|
+
@update:month="onUpdateMonth"
|
|
1124
|
+
@update:year="onUpdateYear"
|
|
1125
|
+
@click:date="updateSelectedDates"
|
|
1126
|
+
@update:model-value="updateDisplayFormattedDate"
|
|
1127
|
+
@focus="markHolidayDays"
|
|
1128
|
+
@update:month-year="markHolidayDays"
|
|
1129
|
+
>
|
|
1130
|
+
<template #title>
|
|
1131
|
+
Sélectionnez une date
|
|
1132
|
+
</template>
|
|
1133
|
+
<template #header>
|
|
1134
|
+
<SyHeading
|
|
1135
|
+
class="mx-auto my-auto ml-5 mb-4"
|
|
1136
|
+
aria-live="polite"
|
|
1137
|
+
aria-atomic="true"
|
|
1138
|
+
:level="headingLevel"
|
|
1070
1139
|
>
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1140
|
+
{{ selectedDates ? displayedDateString : headerDate }}
|
|
1141
|
+
</SyHeading>
|
|
1142
|
+
</template>
|
|
1143
|
+
<template
|
|
1144
|
+
v-if="props.displayTodayButton"
|
|
1145
|
+
#actions
|
|
1146
|
+
>
|
|
1147
|
+
<div class="d-flex justify-center align-center w-100">
|
|
1148
|
+
<v-btn
|
|
1149
|
+
size="x-small"
|
|
1150
|
+
color="primary"
|
|
1151
|
+
:title="DATE_PICKER_MESSAGES.BUTTON_TODAY"
|
|
1152
|
+
class="date-picker__today-button my-2 pa-2 mt-2"
|
|
1153
|
+
:ripple="false"
|
|
1154
|
+
@click="handleSelectToday"
|
|
1155
|
+
>
|
|
1156
|
+
<SyIcon
|
|
1157
|
+
size="16px"
|
|
1158
|
+
decorative
|
|
1159
|
+
:icon="mdiCalendarMonthOutline"
|
|
1160
|
+
/>
|
|
1161
|
+
{{ DATE_PICKER_MESSAGES.BUTTON_TODAY }}
|
|
1162
|
+
</v-btn>
|
|
1163
|
+
</div>
|
|
1164
|
+
</template>
|
|
1165
|
+
</VDatePicker>
|
|
1166
|
+
</div>
|
|
1081
1167
|
</VMenu>
|
|
1082
1168
|
</template>
|
|
1083
1169
|
</div>
|
|
1084
1170
|
</template>
|
|
1085
1171
|
|
|
1086
1172
|
<style lang="scss" scoped>
|
|
1087
|
-
@use '@/assets/tokens';
|
|
1088
|
-
|
|
1089
1173
|
.date-picker-title {
|
|
1090
1174
|
display: block;
|
|
1091
1175
|
text-transform: lowercase;
|
|
@@ -1099,7 +1183,7 @@
|
|
|
1099
1183
|
/* Style pour les jours fériés */
|
|
1100
1184
|
:deep(.holiday-day) {
|
|
1101
1185
|
background-color: rgb(255 193 7 / 10%);
|
|
1102
|
-
border: 2px dotted
|
|
1186
|
+
border: 2px dotted rgb(var(--v-theme-grey-darken60));
|
|
1103
1187
|
border-radius: 50%;
|
|
1104
1188
|
}
|
|
1105
1189
|
|
|
@@ -1130,50 +1214,62 @@
|
|
|
1130
1214
|
.v-messages__message--success {
|
|
1131
1215
|
:deep(.v-input__control),
|
|
1132
1216
|
:deep(.v-messages__message) {
|
|
1133
|
-
color:
|
|
1217
|
+
color: rgb(var(--v-theme-textSuccess)) !important;
|
|
1134
1218
|
|
|
1135
1219
|
--v-medium-emphasis-opacity: 1;
|
|
1136
1220
|
}
|
|
1137
1221
|
|
|
1138
1222
|
.v-field--active & {
|
|
1139
|
-
color:
|
|
1223
|
+
color: rgb(var(--v-theme-borderSuccess)) !important;
|
|
1140
1224
|
}
|
|
1141
1225
|
}
|
|
1142
1226
|
|
|
1227
|
+
.sr-only {
|
|
1228
|
+
position: absolute;
|
|
1229
|
+
width: 1px;
|
|
1230
|
+
height: 1px;
|
|
1231
|
+
padding: 0;
|
|
1232
|
+
margin: -1px;
|
|
1233
|
+
overflow: hidden;
|
|
1234
|
+
clip: rect(0, 0, 0, 0);
|
|
1235
|
+
white-space: nowrap;
|
|
1236
|
+
border: 0;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1143
1239
|
.v-messages__message--error {
|
|
1144
1240
|
:deep(.v-input__control) {
|
|
1145
|
-
color:
|
|
1241
|
+
color: rgb(var(--v-theme-textError)) !important;
|
|
1146
1242
|
|
|
1147
1243
|
--v-medium-emphasis-opacity: 1;
|
|
1148
1244
|
}
|
|
1149
1245
|
|
|
1150
1246
|
:deep(.v-messages__message) {
|
|
1151
|
-
color:
|
|
1247
|
+
color: rgb(var(--v-theme-textError)) !important;
|
|
1152
1248
|
}
|
|
1153
1249
|
|
|
1154
1250
|
.v-field--active & {
|
|
1155
|
-
color:
|
|
1251
|
+
color: rgb(var(--v-theme-borderError)) !important;
|
|
1156
1252
|
}
|
|
1157
1253
|
}
|
|
1158
1254
|
|
|
1159
1255
|
.v-messages__message--warning {
|
|
1160
1256
|
:deep(.v-input__control) {
|
|
1161
|
-
color:
|
|
1257
|
+
color: rgb(var(--v-theme-textWarning)) !important;
|
|
1162
1258
|
|
|
1163
1259
|
--v-medium-emphasis-opacity: 1;
|
|
1164
1260
|
}
|
|
1165
1261
|
|
|
1166
1262
|
:deep(.v-messages__message) {
|
|
1167
|
-
color:
|
|
1263
|
+
color: rgb(var(--v-theme-textWarning)) !important;
|
|
1168
1264
|
}
|
|
1169
1265
|
|
|
1170
1266
|
.v-field--active & {
|
|
1171
|
-
color:
|
|
1267
|
+
color: rgb(var(--v-theme-textWarning)) !important;
|
|
1172
1268
|
}
|
|
1173
1269
|
}
|
|
1174
1270
|
|
|
1175
1271
|
:deep(.v-btn__content) {
|
|
1176
|
-
font-size:
|
|
1272
|
+
font-size: var(--v-fontSize-corpsDeTexte) + 3;
|
|
1177
1273
|
font-weight: bold;
|
|
1178
1274
|
}
|
|
1179
1275
|
|
|
@@ -1209,7 +1305,7 @@
|
|
|
1209
1305
|
}
|
|
1210
1306
|
|
|
1211
1307
|
:deep(.v-date-picker-month__day .v-btn:hover) {
|
|
1212
|
-
background-color:
|
|
1308
|
+
background-color: rgb(var(--v-theme-backgroundMain));
|
|
1213
1309
|
}
|
|
1214
1310
|
|
|
1215
1311
|
:deep(.v-date-picker-month__day--selected, .v-date-picker-month__day--adjacent) {
|
|
@@ -1217,7 +1313,7 @@
|
|
|
1217
1313
|
}
|
|
1218
1314
|
|
|
1219
1315
|
:deep(.v-date-picker-month__day--selected .v-btn:hover) {
|
|
1220
|
-
background-color:
|
|
1316
|
+
background-color: rgb(var(--v-theme-backgroundAccentContrasted)) !important;
|
|
1221
1317
|
}
|
|
1222
1318
|
|
|
1223
1319
|
.fade-enter-active,
|
|
@@ -1316,3 +1412,12 @@
|
|
|
1316
1412
|
}
|
|
1317
1413
|
|
|
1318
1414
|
</style>
|
|
1415
|
+
|
|
1416
|
+
<style lang="scss">
|
|
1417
|
+
.date-picker-overlay-content .v-date-picker {
|
|
1418
|
+
box-shadow:
|
|
1419
|
+
0 5px 5px -3px rgb(0 0 0 / 20%),
|
|
1420
|
+
0 8px 10px 1px rgb(0 0 0 / 14%),
|
|
1421
|
+
0 3px 14px 2px rgb(0 0 0 / 12%) !important;
|
|
1422
|
+
}
|
|
1423
|
+
</style>
|