@cnamts/synapse 1.0.23 → 1.0.24
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/AutocompleteFilter-BWLR3U7W.js +114 -0
- package/dist/AutocompleteFilter-D9jzRzAL.cjs +1 -0
- package/dist/{DateFilter-Dc-gSGwk.js → DateFilter-BpwFexzi.js} +1 -1
- package/dist/DateFilter-DTUl8hb1.cjs +1 -0
- package/dist/{NumberFilter-vP38Wp6j.js → NumberFilter-Bz_NTdX9.js} +3 -3
- package/dist/NumberFilter-MAEojdk0.cjs +1 -0
- package/dist/PeriodFilter-CC4WgIhl.cjs +1 -0
- package/dist/{PeriodFilter-Ba1uYUnT.js → PeriodFilter-DX_wy9g-.js} +1 -1
- package/dist/SelectFilter-BR3fvl-a.cjs +1 -0
- package/dist/SelectFilter-xqiPtPgX.js +135 -0
- package/dist/{TextFilter-B84dpnoq.js → TextFilter-BBl3JFqK.js} +7 -7
- package/dist/TextFilter-CCfYFl5F.cjs +1 -0
- package/dist/apLightTheme-CFSRrjv2.cjs +1 -0
- package/dist/apLightTheme-D1P4jcD0.js +1231 -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 +108 -146
- 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 +28 -506
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +28 -506
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +65 -85
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +627 -771
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +315 -402
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +112 -155
- 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/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/HeaderNavigationBar/HeaderNavigationBar.d.ts +4 -4
- 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 -122
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +85 -121
- package/dist/components/NirField/NirField.d.ts +206 -270
- 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 -1640
- package/dist/components/PhoneField/PhoneField.d.ts +88 -124
- 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 +9 -6
- package/dist/components/Tables/SyTable/SyTable.d.ts +9 -6
- package/dist/components/Tables/common/SyTableFilter.d.ts +2 -3
- package/dist/components/Tables/common/SyTablePagination.d.ts +17 -19
- 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/types.d.ts +19 -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 +6 -6
- package/dist/composables/date/useDatePickerAccessibility.d.ts +1 -1
- package/dist/composables/rules/useFieldValidation.d.ts +4 -4
- 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 +15 -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/{main-aLKwdMi1.js → main-BtTqyn4z.js} +16434 -15672
- package/dist/main-C1e3eoxd.cjs +1067 -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/vuetifyConfig.js +561 -0
- package/dist/vuetifyConfig.umd.cjs +1 -0
- package/package.json +10 -4
- package/src/assets/overrides/_btns.scss +0 -6
- package/src/assets/overrides/_icons.scss +9 -1
- package/src/assets/overrides/_typography.scss +0 -10
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +2 -2
- 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 +5 -1
- package/src/components/ChipList/accessibilite/Accessibility.mdx +83 -10
- package/src/components/ChipList/tests/ChipList.a11y.spec.ts +41 -0
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +0 -9
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +22 -5
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +143 -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 +8 -9
- package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.spec.ts +10 -10
- package/src/components/Customs/Selects/SySelect/SySelect.vue +14 -11
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +54 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +6 -9
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +10 -16
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -11
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +35 -0
- 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/SyRadioGroup/SyRadioGroup.vue +4 -7
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +29 -27
- package/src/components/Customs/SyTextField/SyTextField.vue +154 -157
- 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 +330 -223
- 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 +195 -159
- package/src/components/DatePicker/ComplexDatePicker/accessibilite/Accessibility.mdx +76 -0
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +10 -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 +63 -57
- 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/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/useDateTextField.ts +7 -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/DiacriticPicker/accessibilite/Accessibility.mdx +76 -8
- package/src/components/HeaderBar/HeaderBar.stories.ts +14 -2
- package/src/components/Logo/accessibilite/Accessibility.mdx +73 -11
- 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/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 +4 -0
- package/src/components/NirField/NirField.vue +64 -260
- package/src/components/NirField/accessibilite/Accessibility.mdx +2 -2
- package/src/components/NirField/locales.ts +1 -1
- package/src/components/NirField/tests/NirField.spec.ts +6 -0
- package/src/components/NirField/useNirValidation.ts +271 -0
- package/src/components/PasswordField/PasswordField.stories.ts +4 -4
- package/src/components/PasswordField/PasswordField.vue +18 -24
- 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 +5 -6
- package/src/components/PhoneField/tests/PhoneField.spec.ts +1 -0
- package/src/components/RangeField/RangeField.vue +6 -0
- 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/Tables/SyServerTable/SyServerTable.mdx +25 -0
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +673 -1
- package/src/components/Tables/SyServerTable/SyServerTable.vue +148 -91
- package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +58 -0
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +122 -0
- package/src/components/Tables/SyTable/SyTable.mdx +25 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +452 -1
- package/src/components/Tables/SyTable/SyTable.vue +130 -56
- package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +57 -0
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +108 -0
- package/src/components/Tables/common/SyTableFilter.vue +22 -2
- package/src/components/Tables/common/TableHeader.vue +5 -1
- 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 +10 -11
- 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/tableFilterUtils.ts +3 -0
- package/src/components/Tables/common/tableStyles.scss +48 -4
- package/src/components/Tables/common/tests/filterByRange.spec.ts +2 -1
- package/src/components/Tables/common/types.ts +13 -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 +3 -3
- package/src/components/Tables/common/useTableRowCheckboxAccessibility.ts +41 -0
- 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/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 +135 -99
- package/src/composantsVuetify/Introduction.mdx +48 -0
- package/src/composantsVuetify/VBtn/VBtn.mdx +72 -0
- package/src/composantsVuetify/VBtn/v-btn.stories.ts +121 -0
- package/src/composantsVuetify/VTooltip/VTooltip.mdx +32 -0
- package/src/composantsVuetify/VTooltip/v-tooltip.stories.ts +95 -0
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +2 -2
- package/src/main.ts +0 -2
- package/src/stories/Components/Components.stories.ts +74 -9
- package/src/stories/Demarrer/Accueil.stories.ts +3 -3
- package/src/stories/GuideDuDev/Amelipro.mdx +15 -0
- package/src/stories/GuideDuDev/Amelipro.stories.ts +209 -0
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +3 -3
- package/dist/SelectFilter-BioGT6Nn.js +0 -136
- package/dist/style.css +0 -1
- package/src/components/DatePicker/Accessibilite.mdx +0 -14
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs'
|
|
2
|
+
import * as Stories from '../DatePicker.stories.ts'
|
|
3
|
+
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg'
|
|
4
|
+
import '@/stories/styles/shared.css'
|
|
5
|
+
import {
|
|
6
|
+
AccessibilityGuideLayout,
|
|
7
|
+
CriteriaSection,
|
|
8
|
+
CriteriaCard,
|
|
9
|
+
DemoSection,
|
|
10
|
+
BestPracticesSection,
|
|
11
|
+
ResourcesSection,
|
|
12
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx'
|
|
13
|
+
|
|
14
|
+
<Meta of={Stories} />
|
|
15
|
+
|
|
16
|
+
<AccessibilityGuideLayout
|
|
17
|
+
componentName="DatePicker (mode calendrier)"
|
|
18
|
+
iconSrc={AccessibilityIcon}
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
<CriteriaSection>
|
|
22
|
+
<CriteriaCard title="Structure sémantique" icon="🔍">
|
|
23
|
+
<ul>
|
|
24
|
+
<li><strong>Champ</strong> : <code><input></code> readonly (texte) sans <code>role="combobox"</code> forcé; l’ouverture se fait via clic ou clavier.</li>
|
|
25
|
+
<li>
|
|
26
|
+
<strong>Attributs ARIA de l'input (aria-expanded / aria-haspopup)</strong> : Ces attributs sont volontairement retirés pour les raisons suivantes :
|
|
27
|
+
<ul>
|
|
28
|
+
<li><em>Incompatibilité avec le rôle natif</em> : Un <code><input type="text"></code> possède le rôle implicite <code>textbox</code>. Selon le W3C/WAI-ARIA, l'usage de <code>aria-expanded</code> et <code>aria-haspopup</code> sur ce rôle est invalide et lève des erreurs critiques lors des audits (Axe, Tanaguru).</li>
|
|
29
|
+
<li><em>Rejet du rôle combobox</em> : Forcer un <code>role="combobox"</code> sur l'input rendrait les attributs valides, mais serait sémantiquement inexact. Notre champ est en <code>readonly</code> et ouvre un véritable panneau de dialogue complexe (calendrier), pas une simple liste d'options de saisie.</li>
|
|
30
|
+
<li><em>Alternative robuste</em> : L'accessibilité de l'ouverture est garantie contextuellement. L'ouverture du calendrier déplace immédiatement le focus dans une modale avec un <em>focus trap</em>. Le lecteur d'écran comprend le changement de contexte et l'annonce via les régions <code>aria-live</code>, rendant l'expérience fluide et conforme aux standards.</li>
|
|
31
|
+
</ul>
|
|
32
|
+
</li>
|
|
33
|
+
<li><strong>Panneau</strong> : contenu dans un menu <code>role="presentation"</code> avec grille de boutons (<code>role=button</code> natif sur chaque jour).</li>
|
|
34
|
+
<li><strong>Relations</strong> : <code>aria-controls</code> relie l’input au panneau lorsqu’il est ouvert; <code>aria-owns/expanded/haspopup</code> ne sont pas surchargés.</li>
|
|
35
|
+
<li><strong>États</strong> : <code>aria-disabled</code> / <code>aria-readonly</code> alignés sur les props, messages d’erreur/avertissement/succès annoncés via la zone de messages du champ.</li>
|
|
36
|
+
</ul>
|
|
37
|
+
</CriteriaCard>
|
|
38
|
+
|
|
39
|
+
<CriteriaCard title="Ouverture et focus" icon="🧭">
|
|
40
|
+
<ul>
|
|
41
|
+
<li><strong>Ouverture clavier</strong> : <kbd>Entrée</kbd> sur le champ ouvre le calendrier; l’icône déclenche l’ouverture avec la souris.</li>
|
|
42
|
+
<li><strong>Fermeture</strong> : <kbd>Échap</kbd> ferme et valide, focus rendu au champ.</li>
|
|
43
|
+
<li><strong>Piège de focus</strong> : <kbd>Tab</kbd>/<kbd>Shift+Tab</kbd> restent dans le panneau ouvert (boutons d’entête, grille de jours, bouton « Aujourd’hui »).</li>
|
|
44
|
+
</ul>
|
|
45
|
+
</CriteriaCard>
|
|
46
|
+
|
|
47
|
+
<CriteriaCard title="Navigation clavier dans le calendrier" icon="⌨️">
|
|
48
|
+
<ul>
|
|
49
|
+
<li><strong>Jours</strong> : flèches déplacent le focus jour par jour; <code>PageUp/PageDown</code> changent de mois (<kbd>Shift</kbd> + touche change d’année).</li>
|
|
50
|
+
<li><strong>Home/End</strong> : vont au premier/dernier jour du mois affiché.</li>
|
|
51
|
+
<li><strong>Activation</strong> : <kbd>Espace</kbd>/<kbd>Entrée</kbd> sur un jour déclenchent le bouton du jour; même logique sur les boutons d’entête (mois/année et flèches).</li>
|
|
52
|
+
<li><strong>Dialogue mois/années</strong> : navigation par flèches et <kbd>Home</kbd>/<kbd>End</kbd>; <kbd>Espace</kbd>/<kbd>Entrée</kbd> sélectionnent l’option et conservent le focus.</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</CriteriaCard>
|
|
55
|
+
|
|
56
|
+
<CriteriaCard title="Messages et annonces" icon="📣">
|
|
57
|
+
<ul>
|
|
58
|
+
<li><strong>Live region</strong> : le mois/année affichés sont annoncés via <code>aria-live="polite"</code> (zone masquée).</li>
|
|
59
|
+
<li><strong>Statuts</strong> : erreurs/avertissements/succès sous le champ; le bouton « Aujourd’hui » a un <code>title</code> explicite.</li>
|
|
60
|
+
<li><strong>Guidage</strong> : placeholder et libellé (ou <code>aria-label</code>) décrivent l’action attendue.</li>
|
|
61
|
+
</ul>
|
|
62
|
+
</CriteriaCard>
|
|
63
|
+
</CriteriaSection>
|
|
64
|
+
|
|
65
|
+
<DemoSection title="Navigation clavier (rappel)">
|
|
66
|
+
<Story of={Stories.Default} />
|
|
67
|
+
</DemoSection>
|
|
68
|
+
|
|
69
|
+
<BestPracticesSection>
|
|
70
|
+
- Fournir un libellé explicite ou <code>aria-label</code> lorsque le label visuel est masqué ou tronqué.
|
|
71
|
+
- En lecture seule, éviter de proposer l’ouverture (raccourcis désactivés dans le composant).
|
|
72
|
+
- En plage de dates, préciser l’ordre attendu dans le hint et laisser la séparatrice visible.
|
|
73
|
+
- Vérifier la cohérence des bornes <code>period</code> pour ne pas masquer les jours attendus.
|
|
74
|
+
</BestPracticesSection>
|
|
75
|
+
|
|
76
|
+
<ResourcesSection>
|
|
77
|
+
- Stories DatePicker : cas standard, plage, lecture seule.
|
|
78
|
+
- Tests : <code>CalendarMode/DatePicker.spec.ts</code> et <code>DatePicker.events.spec.ts</code> couvrent l’ouverture, le focus et la navigation clavier.
|
|
79
|
+
- WAI-ARIA grid & boutons : référence pour les comportements clavier sur les grilles de dates.
|
|
80
|
+
</ResourcesSection>
|
|
81
|
+
|
|
82
|
+
</AccessibilityGuideLayout>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { describe, it } from 'vitest'
|
|
4
|
+
import { mount } from '@vue/test-utils'
|
|
5
|
+
import { axe } from 'vitest-axe'
|
|
6
|
+
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
+
import DatePicker from '../DatePicker.vue'
|
|
8
|
+
|
|
9
|
+
// Scénario d'accessibilité : sélecteur de date en mode calendrier,
|
|
10
|
+
// avec label, format jour/mois/année et navigation clavier.
|
|
11
|
+
|
|
12
|
+
describe('DatePicker (CalendarMode) – accessibility (axe)', () => {
|
|
13
|
+
it('has no obvious axe violations in default calendar mode', async () => {
|
|
14
|
+
const wrapper = mount(DatePicker, {
|
|
15
|
+
props: {
|
|
16
|
+
label: 'Date de naissance',
|
|
17
|
+
format: 'DD/MM/YYYY',
|
|
18
|
+
modelValue: null,
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
23
|
+
assertNoA11yViolations(results, 'DatePicker – default calendar mode', {
|
|
24
|
+
ignoreRules: ['region'],
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('has no obvious axe violations with required date field', async () => {
|
|
29
|
+
const wrapper = mount(DatePicker, {
|
|
30
|
+
props: {
|
|
31
|
+
label: 'Date de rendez-vous',
|
|
32
|
+
format: 'DD/MM/YYYY',
|
|
33
|
+
modelValue: null,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
39
|
+
assertNoA11yViolations(results, 'DatePicker – required date field', {
|
|
40
|
+
ignoreRules: ['region'],
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
it('has no obvious axe violations with error messages', async () => {
|
|
45
|
+
const wrapper = mount(DatePicker, {
|
|
46
|
+
props: {
|
|
47
|
+
label: 'Date de début',
|
|
48
|
+
format: 'DD/MM/YYYY',
|
|
49
|
+
modelValue: '32/13/2023', // Date invalide
|
|
50
|
+
errorMessages: ['La date est invalide'],
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
55
|
+
assertNoA11yViolations(results, 'DatePicker – with error messages', {
|
|
56
|
+
ignoreRules: ['region'],
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it('has no obvious axe violations in no-calendar mode', async () => {
|
|
61
|
+
const wrapper = mount(DatePicker, {
|
|
62
|
+
props: {
|
|
63
|
+
label: 'Date',
|
|
64
|
+
format: 'DD/MM/YYYY',
|
|
65
|
+
modelValue: null,
|
|
66
|
+
noCalendar: true,
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
71
|
+
assertNoA11yViolations(results, 'DatePicker – no-calendar mode', {
|
|
72
|
+
ignoreRules: ['region'],
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
it('has no obvious axe violations in combined mode', async () => {
|
|
77
|
+
const wrapper = mount(DatePicker, {
|
|
78
|
+
props: {
|
|
79
|
+
label: 'Période de séjour',
|
|
80
|
+
format: 'DD/MM/YYYY',
|
|
81
|
+
modelValue: null,
|
|
82
|
+
useCombinedMode: true,
|
|
83
|
+
displayRange: true,
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
88
|
+
assertNoA11yViolations(results, 'DatePicker – combined mode with range', {
|
|
89
|
+
ignoreRules: ['region'],
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
it('has no obvious axe violations with disabled state', async () => {
|
|
94
|
+
const wrapper = mount(DatePicker, {
|
|
95
|
+
props: {
|
|
96
|
+
label: 'Date de consultation',
|
|
97
|
+
format: 'DD/MM/YYYY',
|
|
98
|
+
modelValue: '15/03/2023',
|
|
99
|
+
disabled: true,
|
|
100
|
+
},
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
104
|
+
assertNoA11yViolations(results, 'DatePicker – disabled state', {
|
|
105
|
+
ignoreRules: ['region'],
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
it('has no obvious axe violations with readonly state', async () => {
|
|
110
|
+
const wrapper = mount(DatePicker, {
|
|
111
|
+
props: {
|
|
112
|
+
label: 'Date de création',
|
|
113
|
+
format: 'DD/MM/YYYY',
|
|
114
|
+
modelValue: '01/01/2023',
|
|
115
|
+
readonly: true,
|
|
116
|
+
},
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
120
|
+
assertNoA11yViolations(results, 'DatePicker – readonly state', {
|
|
121
|
+
ignoreRules: ['region'],
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
it('has no obvious axe violations with hint text', async () => {
|
|
126
|
+
const wrapper = mount(DatePicker, {
|
|
127
|
+
props: {
|
|
128
|
+
label: 'Date d\'échéance',
|
|
129
|
+
format: 'DD/MM/YYYY',
|
|
130
|
+
modelValue: null,
|
|
131
|
+
hint: 'Sélectionnez une date dans les 30 prochains jours',
|
|
132
|
+
persistentHint: true,
|
|
133
|
+
},
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
137
|
+
assertNoA11yViolations(results, 'DatePicker – with hint text', {
|
|
138
|
+
ignoreRules: ['region'],
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
})
|
|
@@ -335,9 +335,6 @@ type Story = StoryObj<typeof meta>
|
|
|
335
335
|
|
|
336
336
|
export const Default: Story = {
|
|
337
337
|
parameters: {
|
|
338
|
-
a11y: {
|
|
339
|
-
disable: false,
|
|
340
|
-
},
|
|
341
338
|
sourceCode: [
|
|
342
339
|
{
|
|
343
340
|
name: 'Template',
|
|
@@ -409,9 +406,6 @@ export const Default: Story = {
|
|
|
409
406
|
|
|
410
407
|
export const Required: Story = {
|
|
411
408
|
parameters: {
|
|
412
|
-
a11y: {
|
|
413
|
-
disable: true,
|
|
414
|
-
},
|
|
415
409
|
sourceCode: [
|
|
416
410
|
{
|
|
417
411
|
name: 'Template',
|
|
@@ -495,9 +489,6 @@ export const Required: Story = {
|
|
|
495
489
|
|
|
496
490
|
export const DateRange: Story = {
|
|
497
491
|
parameters: {
|
|
498
|
-
a11y: {
|
|
499
|
-
disable: true,
|
|
500
|
-
},
|
|
501
492
|
sourceCode: [
|
|
502
493
|
{
|
|
503
494
|
name: 'Template',
|
|
@@ -568,9 +559,6 @@ export const DateRange: Story = {
|
|
|
568
559
|
|
|
569
560
|
export const BirthDate: Story = {
|
|
570
561
|
parameters: {
|
|
571
|
-
a11y: {
|
|
572
|
-
disable: true,
|
|
573
|
-
},
|
|
574
562
|
sourceCode: [
|
|
575
563
|
{
|
|
576
564
|
name: 'Template',
|
|
@@ -635,9 +623,6 @@ export const BirthDate: Story = {
|
|
|
635
623
|
|
|
636
624
|
export const WithValidation: Story = {
|
|
637
625
|
parameters: {
|
|
638
|
-
a11y: {
|
|
639
|
-
disable: true,
|
|
640
|
-
},
|
|
641
626
|
sourceCode: [
|
|
642
627
|
{
|
|
643
628
|
name: 'Template',
|
|
@@ -725,9 +710,6 @@ export const WithValidation: Story = {
|
|
|
725
710
|
|
|
726
711
|
export const DifferentFormats: Story = {
|
|
727
712
|
parameters: {
|
|
728
|
-
a11y: {
|
|
729
|
-
disable: true,
|
|
730
|
-
},
|
|
731
713
|
sourceCode: [
|
|
732
714
|
{
|
|
733
715
|
name: 'Template',
|
|
@@ -819,9 +801,6 @@ export const DifferentFormats: Story = {
|
|
|
819
801
|
|
|
820
802
|
export const WithDateFormatReturn: Story = {
|
|
821
803
|
parameters: {
|
|
822
|
-
a11y: {
|
|
823
|
-
disable: true,
|
|
824
|
-
},
|
|
825
804
|
sourceCode: [
|
|
826
805
|
{
|
|
827
806
|
name: 'Template',
|
|
@@ -881,9 +860,6 @@ export const WithDateFormatReturn: Story = {
|
|
|
881
860
|
|
|
882
861
|
export const DisablePickerInteraction: Story = {
|
|
883
862
|
parameters: {
|
|
884
|
-
a11y: {
|
|
885
|
-
disable: true,
|
|
886
|
-
},
|
|
887
863
|
sourceCode: [
|
|
888
864
|
{
|
|
889
865
|
name: 'Template',
|
|
@@ -943,9 +919,6 @@ export const DisablePickerInteraction: Story = {
|
|
|
943
919
|
|
|
944
920
|
export const AutoFormattingInput: Story = {
|
|
945
921
|
parameters: {
|
|
946
|
-
a11y: {
|
|
947
|
-
disable: true,
|
|
948
|
-
},
|
|
949
922
|
sourceCode: [
|
|
950
923
|
{
|
|
951
924
|
name: 'Template',
|
|
@@ -1001,9 +974,6 @@ export const AutoFormattingInput: Story = {
|
|
|
1001
974
|
|
|
1002
975
|
export const CustomDateFormat: Story = {
|
|
1003
976
|
parameters: {
|
|
1004
|
-
a11y: {
|
|
1005
|
-
disable: true,
|
|
1006
|
-
},
|
|
1007
977
|
sourceCode: [
|
|
1008
978
|
{
|
|
1009
979
|
name: 'Template',
|
|
@@ -1060,9 +1030,6 @@ export const CustomDateFormat: Story = {
|
|
|
1060
1030
|
|
|
1061
1031
|
export const ReadonlyMode: Story = {
|
|
1062
1032
|
parameters: {
|
|
1063
|
-
a11y: {
|
|
1064
|
-
disable: true,
|
|
1065
|
-
},
|
|
1066
1033
|
sourceCode: [
|
|
1067
1034
|
{
|
|
1068
1035
|
name: 'Template',
|
|
@@ -1131,9 +1098,6 @@ export const ReadonlyMode: Story = {
|
|
|
1131
1098
|
|
|
1132
1099
|
export const AppendIcon: Story = {
|
|
1133
1100
|
parameters: {
|
|
1134
|
-
a11y: {
|
|
1135
|
-
disable: true,
|
|
1136
|
-
},
|
|
1137
1101
|
sourceCode: [
|
|
1138
1102
|
{
|
|
1139
1103
|
name: 'Template',
|
|
@@ -1194,9 +1158,6 @@ export const AppendIcon: Story = {
|
|
|
1194
1158
|
|
|
1195
1159
|
export const WithCustomPeriod: Story = {
|
|
1196
1160
|
parameters: {
|
|
1197
|
-
a11y: {
|
|
1198
|
-
disable: true,
|
|
1199
|
-
},
|
|
1200
1161
|
sourceCode: [
|
|
1201
1162
|
{
|
|
1202
1163
|
name: 'Template',
|
|
@@ -1311,9 +1272,6 @@ export const WithCustomPeriod: Story = {
|
|
|
1311
1272
|
|
|
1312
1273
|
export const WithTextFieldActivator: Story = {
|
|
1313
1274
|
parameters: {
|
|
1314
|
-
a11y: {
|
|
1315
|
-
disable: true,
|
|
1316
|
-
},
|
|
1317
1275
|
sourceCode: [
|
|
1318
1276
|
{
|
|
1319
1277
|
name: 'Template',
|
|
@@ -1372,9 +1330,6 @@ export const WithTextFieldActivator: Story = {
|
|
|
1372
1330
|
|
|
1373
1331
|
export const AutoClampFeature: Story = {
|
|
1374
1332
|
parameters: {
|
|
1375
|
-
a11y: {
|
|
1376
|
-
disable: true,
|
|
1377
|
-
},
|
|
1378
1333
|
sourceCode: [
|
|
1379
1334
|
{
|
|
1380
1335
|
name: 'Template',
|
|
@@ -1485,9 +1440,6 @@ export const AutoClampFeature: Story = {
|
|
|
1485
1440
|
|
|
1486
1441
|
export const WithFormSubmission: Story = {
|
|
1487
1442
|
parameters: {
|
|
1488
|
-
a11y: {
|
|
1489
|
-
disable: true,
|
|
1490
|
-
},
|
|
1491
1443
|
sourceCode: [
|
|
1492
1444
|
{
|
|
1493
1445
|
name: 'Template',
|
|
@@ -1543,9 +1495,9 @@ export const WithFormSubmission: Story = {
|
|
|
1543
1495
|
const datePicker = ref<InstanceType<typeof DatePicker> | null>(null)
|
|
1544
1496
|
const submitted = ref(false)
|
|
1545
1497
|
|
|
1546
|
-
const submitForm = () => {
|
|
1498
|
+
const submitForm = async () => {
|
|
1547
1499
|
if (!datePicker.value) return
|
|
1548
|
-
const isValid = datePicker.value.validateOnSubmit()
|
|
1500
|
+
const isValid = await datePicker.value.validateOnSubmit()
|
|
1549
1501
|
if (isValid) {
|
|
1550
1502
|
submitted.value = true
|
|
1551
1503
|
}
|
|
@@ -1582,9 +1534,6 @@ export const WithFormSubmission: Story = {
|
|
|
1582
1534
|
|
|
1583
1535
|
export const CustomRules: Story = {
|
|
1584
1536
|
parameters: {
|
|
1585
|
-
a11y: {
|
|
1586
|
-
disable: true,
|
|
1587
|
-
},
|
|
1588
1537
|
sourceCode: [
|
|
1589
1538
|
{
|
|
1590
1539
|
name: 'Template',
|
|
@@ -1661,9 +1610,6 @@ export const CustomRules: Story = {
|
|
|
1661
1610
|
|
|
1662
1611
|
export const CustomWarningRules: Story = {
|
|
1663
1612
|
parameters: {
|
|
1664
|
-
a11y: {
|
|
1665
|
-
disable: true,
|
|
1666
|
-
},
|
|
1667
1613
|
sourceCode: [
|
|
1668
1614
|
{
|
|
1669
1615
|
name: 'Template',
|