@cnamts/synapse 1.0.27 → 1.1.1
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 +1 -1
- package/dist/{AutocompleteFilter-C9eLKyW8.js → AutocompleteFilter-CGF33skz.js} +3 -3
- package/dist/{DateFilter-y-GLkAkn.js → DateFilter-D7-MsKtx.js} +8 -8
- package/dist/{NumberFilter-DN6hIBS7.js → NumberFilter-bjQPPfsj.js} +1 -1
- package/dist/{PeriodFilter-MoUUp9qS.js → PeriodFilter-B3wJpK8-.js} +1 -1
- package/dist/{SelectFilter-bCbrdLmu.js → SelectFilter-BN6DbKAV.js} +1 -1
- package/dist/{TextFilter-CvjgEaoM.js → TextFilter-BffP0J2f.js} +4 -4
- package/dist/{apLightTheme2026-ug4Y23ns.js → apLightTheme2026-C4ygwMHC.js} +23 -22
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +10 -10
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +10 -10
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +10 -10
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +4 -4
- package/dist/components/Captcha/Captcha.d.ts +27 -16
- package/dist/components/Captcha/CaptchaForm.d.ts +29 -3
- package/dist/components/Captcha/types.d.ts +14 -0
- package/dist/components/Captcha/useCaptchaValidation.d.ts +37 -0
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +2 -2
- package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +33 -13
- package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts +23 -0
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +85 -313
- package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts +4 -4
- package/dist/components/Customs/Selects/SyInputSelect/SyInputSelect.d.ts +1 -1
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +9 -11
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectValidation.d.ts +7 -7
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +18 -49
- package/dist/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.d.ts +29 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +46 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +19 -54
- package/dist/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.d.ts +27 -0
- package/dist/components/Customs/SyCheckbox/types.d.ts +49 -0
- package/dist/components/Customs/SyIcon/SyIcon.d.ts +77 -1
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +10 -10
- package/dist/components/Customs/SyTextField/FieldState.d.ts +5 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +19 -79
- package/dist/components/Customs/SyTextField/locales.d.ts +7 -0
- package/dist/components/Customs/SyTextField/types.d.ts +67 -4
- package/dist/components/Customs/SyTextField/useNumberField.d.ts +23 -0
- package/dist/components/Customs/SyTextField/useSyTextFieldValidation.d.ts +38 -0
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +170 -622
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +85 -311
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +39 -152
- package/dist/components/DialogBox/DialogBox.d.ts +2 -0
- package/dist/components/DialogBox/locales.d.ts +1 -0
- package/dist/components/FilterInline/FilterInline.d.ts +3 -3
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +8 -4
- package/dist/components/LunarCalendar/LunarCalendar.d.ts +43 -14
- package/dist/components/LunarCalendar/types.d.ts +35 -0
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +11 -12
- package/dist/components/MonthPicker/MonthPicker.d.ts +72 -1860
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +21 -1846
- package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +5 -0
- package/dist/components/MonthPicker/locales.d.ts +1 -0
- package/dist/components/MonthPicker/types.d.ts +11 -0
- package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +37 -24
- package/dist/components/NirField/NirField.d.ts +96 -325
- package/dist/components/NirField/useNirValidation.d.ts +17 -25
- package/dist/components/PageContainer/PageContainer.d.ts +8 -0
- package/dist/components/PasswordField/PasswordField.d.ts +18 -37
- package/dist/components/PasswordField/locales.d.ts +2 -0
- package/dist/components/PasswordField/types.d.ts +16 -0
- package/dist/components/PasswordField/usePasswordFieldValidation.d.ts +38 -0
- package/dist/components/PeriodField/PeriodField.d.ts +349 -1253
- package/dist/components/PhoneField/PhoneField.d.ts +960 -2051
- package/dist/components/PhoneField/indicatifs.d.ts +715 -8
- package/dist/components/PhoneField/locales.d.ts +7 -0
- package/dist/components/PhoneField/types.d.ts +29 -0
- package/dist/components/PhoneField/usePhoneFieldValidation.d.ts +45 -0
- package/dist/components/PhoneField/usePhoneIndicatifs.d.ts +947 -0
- package/dist/components/SearchListField/SearchListField.d.ts +3 -3
- package/dist/components/SyTextArea/SyTextArea.d.ts +14 -11
- package/dist/components/SyTextArea/composables/useSyTextAreaValidation.d.ts +7 -7
- package/dist/components/Tables/common/SyTablePagination.d.ts +19 -20
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +2 -2
- package/dist/composables/unifyValidation/useValidation.d.ts +4 -13
- package/dist/composables/useFilterable/useFilterable.d.ts +1 -2
- package/dist/design-system-v3.js +19 -19
- package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +11 -10
- package/dist/designTokens/tokens/baseTokens.d.ts +18 -18
- package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/pa/paLightTheme.d.ts +11 -10
- package/dist/designTokens/tokens/semanticTokens.d.ts +14 -14
- package/dist/{main-CI6Q9nmO.js → main-C4wAktOs.js} +14999 -14025
- package/dist/synapse.css +1 -1
- package/dist/vuetifyConfig.js +27 -25
- package/package.json +12 -11
- package/src/assets/compat/_legacy-tokens.scss +91 -0
- package/src/assets/overrides/_utilities.scss +23 -0
- package/src/components/Accordion/Accordion.stories.ts +121 -1
- package/src/components/Accordion/tests/Accordion.visual.cy.ts +44 -0
- package/src/components/Accordion/tests/__snapshots__/accordion-default.snap.png +0 -0
- package/src/components/Accordion/tests/__snapshots__/accordion-disabled-item.snap.png +0 -0
- package/src/components/Accordion/tests/__snapshots__/accordion-open-first.snap.png +0 -0
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- 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/BackToTopBtn/BackToTopBtn.mdx +0 -1
- package/src/components/BackToTopBtn/tests/BackToTopBtn.visual.cy.ts +34 -0
- package/src/components/BackToTopBtn/tests/__snapshots__/back-to-top-btn-custom-nudge.snap.png +0 -0
- package/src/components/BackToTopBtn/tests/__snapshots__/back-to-top-btn-default.snap.png +0 -0
- package/src/components/Captcha/Captcha.stories.ts +134 -31
- package/src/components/Captcha/Captcha.vue +95 -28
- package/src/components/Captcha/CaptchaForm.vue +51 -22
- package/src/components/Captcha/tests/Captcha.focus.spec.ts +214 -0
- package/src/components/Captcha/tests/Captcha.spec.ts +233 -24
- package/src/components/Captcha/tests/Captcha.visual.cy.ts +45 -0
- package/src/components/Captcha/tests/CaptchaForm.spec.ts +82 -0
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +20 -42
- package/src/components/Captcha/tests/__snapshots__/captcha-audio-type.snap.png +0 -0
- package/src/components/Captcha/tests/__snapshots__/captcha-image-type.snap.png +0 -0
- package/src/components/Captcha/tests/__snapshots__/captcha-no-helpdesk.snap.png +0 -0
- package/src/components/Captcha/types.ts +15 -0
- package/src/components/Captcha/useCaptchaValidation.ts +87 -0
- package/src/components/Captcha/validation/validation.stories.ts +1194 -0
- package/src/components/ChipList/ChipList.mdx +0 -1
- package/src/components/ChipList/tests/ChipList.visual.cy.ts +46 -0
- package/src/components/ChipList/tests/__snapshots__/chip-list-default.snap.png +0 -0
- package/src/components/ChipList/tests/__snapshots__/chip-list-readonly.snap.png +0 -0
- package/src/components/ChipList/tests/__snapshots__/chip-list-state-icons.snap.png +0 -0
- package/src/components/CollapsibleList/CollapsibleList.mdx +0 -1
- package/src/components/CollapsibleList/tests/CollapsibleList.visual.cy.ts +33 -0
- package/src/components/CollapsibleList/tests/__snapshots__/collapsible-list-default.snap.png +0 -0
- package/src/components/CollapsibleList/tests/__snapshots__/collapsible-list-no-title.snap.png +0 -0
- package/src/components/ContextualMenu/tests/ContextualMenu.visual.cy.ts +35 -0
- package/src/components/ContextualMenu/tests/__snapshots__/contextual-menu-default.snap.png +0 -0
- package/src/components/ContextualMenu/tests/__snapshots__/contextual-menu-selected.snap.png +0 -0
- package/src/components/CookieBanner/CookieBanner.mdx +0 -1
- package/src/components/CookieBanner/tests/CookieBanner.visual.cy.ts +29 -0
- package/src/components/CookieBanner/tests/__snapshots__/cookie-banner-default.snap.png +0 -0
- package/src/components/CookieBanner/tests/__snapshots__/cookie-banner-with-items.snap.png +0 -0
- package/src/components/CookiesSelection/tests/CookiesSelection.visual.cy.ts +21 -0
- package/src/components/CookiesSelection/tests/__snapshots__/cookies-selection-default.snap.png +0 -0
- package/src/components/CopyBtn/CopyBtn.mdx +0 -1
- package/src/components/CopyBtn/tests/CopyBtn.visual.cy.ts +24 -0
- package/src/components/CopyBtn/tests/__snapshots__/copy-btn-default.snap.png +0 -0
- package/src/components/CopyBtn/tests/__snapshots__/copy-btn-no-tooltip.snap.png +0 -0
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +123 -439
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +147 -41
- package/src/components/Customs/Selects/SelectBtnField/Validation/Validation.stories.ts +600 -0
- package/src/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.ts +87 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +402 -33
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.visual.cy.ts +60 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +52 -38
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-default.snap.png +0 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-inline.snap.png +0 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-readonly.snap.png +0 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/select-btn-field-selected.snap.png +0 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +1 -1
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +2 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.visual.cy.ts +63 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-default.snap.png +0 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-loading.snap.png +0 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-multiple.snap.png +0 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/__snapshots__/sy-autocomplete-with-value.snap.png +0 -0
- package/src/components/Customs/Selects/SyAutocomplete/validation/Validation.stories.ts +0 -93
- package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.visual.cy.ts +48 -0
- package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-default.snap.png +0 -0
- package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-required.snap.png +0 -0
- package/src/components/Customs/Selects/SyInputSelect/tests/__snapshots__/sy-input-select-with-value.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/SySelect.vue +22 -47
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +3 -3
- package/src/components/Customs/Selects/SySelect/tests/SySelect.visual.cy.ts +77 -0
- package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-clearable.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-default.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-multiple-chips.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-required.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/tests/__snapshots__/sy-select-with-value.snap.png +0 -0
- package/src/components/Customs/Selects/SySelect/validation/Validation.stories.ts +1 -92
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +342 -162
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +77 -129
- package/src/components/Customs/SyCheckBoxGroup/Validation/Validation.stories.ts +1008 -0
- package/src/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.ts +107 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +180 -7
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.visual.cy.ts +55 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-default.snap.png +0 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-disabled.snap.png +0 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-selected.snap.png +0 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/__snapshots__/sy-checkbox-group-with-label.snap.png +0 -0
- package/src/components/Customs/SyCheckBoxGroup/types.ts +49 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +41 -161
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +71 -156
- package/src/components/Customs/SyCheckbox/Validation/Validation.stories.ts +654 -0
- package/src/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.ts +105 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +106 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.visual.cy.ts +61 -0
- package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-checked.snap.png +0 -0
- package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-disabled.snap.png +0 -0
- package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-indeterminate.snap.png +0 -0
- package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-required.snap.png +0 -0
- package/src/components/Customs/SyCheckbox/tests/__snapshots__/sy-checkbox-unchecked.snap.png +0 -0
- package/src/components/Customs/SyCheckbox/tests/useSyCheckboxValidation.spec.ts +98 -0
- package/src/components/Customs/SyCheckbox/types.ts +51 -0
- package/src/components/Customs/SyIcon/SyIcon.vue +19 -1
- package/src/components/Customs/SyIcon/tests/SyIcon.visual.cy.ts +83 -0
- package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-color-error.snap.png +0 -0
- package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-decorative.snap.png +0 -0
- package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-informative.snap.png +0 -0
- package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-role-button.snap.png +0 -0
- package/src/components/Customs/SyIcon/tests/__snapshots__/sy-icon-size-large.snap.png +0 -0
- package/src/components/Customs/SyIconButton/tests/SyIconButton.visual.cy.ts +55 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-default.snap.png +0 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-disabled.snap.png +0 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-error.snap.png +0 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/sy-icon-button-large.snap.png +0 -0
- package/src/components/Customs/SyPagination/tests/SyPagination.visual.cy.ts +40 -0
- package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-first-page.snap.png +0 -0
- package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-middle-page.snap.png +0 -0
- package/src/components/Customs/SyPagination/tests/__snapshots__/sy-pagination-with-label.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.stories.ts +0 -1
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +4 -3
- package/src/components/Customs/SyRadioGroup/composables/useSyRadioGroupValidation.ts +1 -1
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-asterisk.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-comfortable.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-compact.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-default.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-disabled.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-error.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-no-details.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-readonly.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-selected.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-success.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/tests/__snapshots__/sy-radio-group-warning.snap.png +0 -0
- package/src/components/Customs/SyRadioGroup/validation/Validation.stories.ts +63 -27
- package/src/components/Customs/SyTabs/tests/SyTabs.visual.cy.ts +30 -0
- package/src/components/Customs/SyTabs/tests/__snapshots__/sy-tabs-default.snap.png +0 -0
- package/src/components/Customs/SyTabs/tests/__snapshots__/sy-tabs-second-active.snap.png +0 -0
- package/src/components/Customs/SyTextField/FieldState.vue +50 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +160 -778
- package/src/components/Customs/SyTextField/SyTextField.vue +178 -160
- package/src/components/Customs/SyTextField/Validation/Validation.stories.ts +1164 -0
- package/src/components/Customs/SyTextField/locales.ts +12 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +174 -8
- package/src/components/Customs/SyTextField/tests/SyTextField.visual.cy.ts +116 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-clearable.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-default.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number-disabled.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number-no-spinner.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-number.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-prepend-icon.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-readonly.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-required.snap.png +0 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/sy-text-field-with-value.snap.png +0 -0
- package/src/components/Customs/SyTextField/types.ts +70 -0
- package/src/components/Customs/SyTextField/useNumberField.ts +93 -0
- package/src/components/Customs/SyTextField/useSyTextFieldValidation.ts +95 -0
- package/src/components/DataList/DataList.mdx +0 -1
- package/src/components/DataList/tests/DataList.visual.cy.ts +85 -0
- package/src/components/DataList/tests/__snapshots__/data-list-default.snap.png +0 -0
- package/src/components/DataList/tests/__snapshots__/data-list-loading.snap.png +0 -0
- package/src/components/DataList/tests/__snapshots__/data-list-row.snap.png +0 -0
- package/src/components/DataList/tests/__snapshots__/data-list-with-icons.snap.png +0 -0
- package/src/components/DataList/tests/__snapshots__/data-list-with-title.snap.png +0 -0
- package/src/components/DataListGroup/DataListGroup.mdx +0 -1
- package/src/components/DataListGroup/tests/DataListGroup.visual.cy.ts +51 -0
- package/src/components/DataListGroup/tests/__snapshots__/data-list-group-default.snap.png +0 -0
- package/src/components/DataListGroup/tests/__snapshots__/data-list-group-loading.snap.png +0 -0
- package/src/components/DataListItem/tests/DataListItem.visual.cy.ts +53 -0
- package/src/components/DataListItem/tests/__snapshots__/data-list-item-chip.snap.png +0 -0
- package/src/components/DataListItem/tests/__snapshots__/data-list-item-default.snap.png +0 -0
- package/src/components/DataListItem/tests/__snapshots__/data-list-item-placeholder.snap.png +0 -0
- package/src/components/DataListItem/tests/__snapshots__/data-list-item-row.snap.png +0 -0
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +1 -1
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +7 -7
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1 -1
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +7 -8
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +1 -1
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +2 -2
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +1 -1
- package/src/components/DatePicker/composables/tests/useTodayButton.spec.ts +10 -10
- package/src/components/DatePicker/composables/useCalendarKeyboardNavigation.ts +11 -2
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.visual.cy.ts +35 -0
- package/src/components/DeclarationAccessibilityPage/tests/__snapshots__/declaration-a11y-page-default.snap.png +0 -0
- package/src/components/DeclarationAccessibilityPage/tests/__snapshots__/declaration-a11y-page-full.snap.png +0 -0
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +0 -1
- package/src/components/DiacriticPicker/tests/DiacriticPicker.visual.cy.ts +24 -0
- package/src/components/DiacriticPicker/tests/__snapshots__/diacritic-picker-custom-title.snap.png +0 -0
- package/src/components/DiacriticPicker/tests/__snapshots__/diacritic-picker-default.snap.png +0 -0
- package/src/components/DialogBox/DialogBox.mdx +0 -1
- package/src/components/DialogBox/DialogBox.stories.ts +399 -4
- package/src/components/DialogBox/DialogBox.vue +20 -0
- package/src/components/DialogBox/locales.ts +1 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +73 -0
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +24 -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/DownloadBtn/tests/DownloadBtn.spec.ts +2 -2
- package/src/components/DownloadBtn/tests/DownloadBtn.visual.cy.ts +38 -0
- package/src/components/DownloadBtn/tests/__snapshots__/download-btn-dark.snap.png +0 -0
- package/src/components/DownloadBtn/tests/__snapshots__/download-btn-idle.snap.png +0 -0
- package/src/components/ErrorPage/ErrorPage.mdx +1 -1
- package/src/components/ErrorPage/tests/ErrorPage.visual.cy.ts +32 -0
- package/src/components/ErrorPage/tests/__snapshots__/error-page-custom.snap.png +0 -0
- package/src/components/ErrorPage/tests/__snapshots__/error-page-default.snap.png +0 -0
- package/src/components/ErrorPage/tests/__snapshots__/error-page-no-btn.snap.png +0 -0
- package/src/components/ExternalLinks/ExternalLinks.mdx +0 -1
- package/src/components/ExternalLinks/tests/ExternalLinks.visual.cy.ts +30 -0
- package/src/components/ExternalLinks/tests/__snapshots__/external-links-default.snap.png +0 -0
- package/src/components/ExternalLinks/tests/__snapshots__/external-links-fixed.snap.png +0 -0
- package/src/components/FileList/FileList.mdx +0 -1
- package/src/components/FileList/tests/FileList.visual.cy.ts +31 -0
- package/src/components/FileList/tests/__snapshots__/file-list-default.snap.png +0 -0
- package/src/components/FileList/tests/__snapshots__/file-list-with-delete.snap.png +0 -0
- package/src/components/FilePreview/accessibilite/Accessibility.mdx +86 -8
- package/src/components/FileUpload/tests/FileUpload.visual.cy.ts +36 -0
- package/src/components/FileUpload/tests/__snapshots__/file-upload-default.snap.png +0 -0
- package/src/components/FileUpload/tests/__snapshots__/file-upload-disabled.snap.png +0 -0
- package/src/components/FileUpload/tests/__snapshots__/file-upload-multiple.snap.png +0 -0
- package/src/components/FilterInline/FilterInline.mdx +0 -1
- package/src/components/FilterInline/FilterInline.stories.ts +2 -0
- package/src/components/FilterInline/FilterInline.vue +10 -5
- package/src/components/FilterInline/tests/FilterInline.visual.cy.ts +25 -0
- package/src/components/FilterInline/tests/__snapshots__/filter-inline-default.snap.png +0 -0
- package/src/components/FilterSideBar/FilterSideBar.mdx +8 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +136 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +30 -8
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +55 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.visual.cy.ts +37 -0
- package/src/components/FilterSideBar/tests/__snapshots__/filter-sidebar-default.snap.png +0 -0
- package/src/components/FilterSideBar/tests/__snapshots__/filter-sidebar-modale.snap.png +0 -0
- package/src/components/FooterBar/FooterBar.mdx +0 -1
- package/src/components/FooterBar/tests/FooterBar.visual.cy.ts +37 -0
- package/src/components/FooterBar/tests/__snapshots__/footer-bar-default.snap.png +0 -0
- package/src/components/FooterBar/tests/__snapshots__/footer-bar-no-logo.snap.png +0 -0
- package/src/components/FooterBar/tests/__snapshots__/footer-bar-no-social.snap.png +0 -0
- package/src/components/FooterBar/tests/__snapshots__/footer-bar-version.snap.png +0 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +0 -1
- package/src/components/FranceConnectBtn/tests/FranceConnectBtn.visual.cy.ts +38 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-dark.snap.png +0 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-default.snap.png +0 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/france-connect-btn-plus.snap.png +0 -0
- package/src/components/HeaderBar/HeaderBar.mdx +0 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +4 -4
- 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/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/HeaderLoading/HeaderLoading.mdx +0 -1
- package/src/components/HeaderLoading/tests/HeaderLoading.visual.cy.ts +34 -0
- package/src/components/HeaderLoading/tests/__snapshots__/header-loading-custom-size.snap.png +0 -0
- package/src/components/HeaderLoading/tests/__snapshots__/header-loading-default.snap.png +0 -0
- package/src/components/HeaderLoading/tests/__snapshots__/header-loading-standalone.snap.png +0 -0
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +4 -4
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.visual.cy.ts +34 -0
- package/src/components/HeaderNavigationBar/tests/__snapshots__/header-navigation-bar-default.snap.png +0 -0
- package/src/components/HeaderNavigationBar/tests/__snapshots__/header-navigation-bar-subtitle.snap.png +0 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.visual.cy.ts +25 -0
- package/src/components/HeaderToolbar/tests/__snapshots__/header-toolbar-custom.snap.png +0 -0
- package/src/components/HeaderToolbar/tests/__snapshots__/header-toolbar-default.snap.png +0 -0
- package/src/components/LangBtn/LangBtn.mdx +0 -1
- package/src/components/LangBtn/tests/LangBtn.visual.cy.ts +33 -0
- package/src/components/LangBtn/tests/__snapshots__/lang-btn-default.snap.png +0 -0
- package/src/components/LangBtn/tests/__snapshots__/lang-btn-english.snap.png +0 -0
- package/src/components/LangBtn/tests/__snapshots__/lang-btn-no-arrow.snap.png +0 -0
- package/src/components/Logo/Logo.mdx +1 -1
- 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/tests/LogoBrandSection.visual.cy.ts +43 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-default.snap.png +0 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-mobile.snap.png +0 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-reduced.snap.png +0 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/logo-brand-section-with-title.snap.png +0 -0
- package/src/components/LunarCalendar/LunarCalendar.mdx +6 -9
- package/src/components/LunarCalendar/LunarCalendar.stories.ts +243 -46
- package/src/components/LunarCalendar/LunarCalendar.vue +61 -26
- package/src/components/LunarCalendar/Validation/Validation.stories.ts +717 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +1 -1
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +197 -6
- package/src/components/LunarCalendar/tests/LunarCalendar.visual.cy.ts +36 -0
- package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-default.snap.png +0 -0
- package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-required.snap.png +0 -0
- package/src/components/LunarCalendar/tests/__snapshots__/lunar-calendar-with-value.snap.png +0 -0
- package/src/components/LunarCalendar/tests/useLunarCalendarValidation.spec.ts +287 -0
- package/src/components/LunarCalendar/types.ts +39 -0
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +115 -39
- package/src/components/MaintenancePage/tests/MaintenancePage.visual.cy.ts +22 -0
- package/src/components/MaintenancePage/tests/__snapshots__/maintenance-page-custom.snap.png +0 -0
- package/src/components/MaintenancePage/tests/__snapshots__/maintenance-page-default.snap.png +0 -0
- package/src/components/MonthPicker/MonthPicker.stories.ts +38 -281
- package/src/components/MonthPicker/MonthPicker.vue +66 -17
- package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +44 -20
- package/src/components/MonthPicker/MonthPickerText/useTextField.ts +5 -0
- package/src/components/MonthPicker/Validation/Validation.stories.ts +1117 -0
- package/src/components/MonthPicker/locales.ts +1 -0
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +353 -2
- package/src/components/MonthPicker/tests/MonthPicker.visual.cy.ts +37 -0
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +14 -8
- package/src/components/MonthPicker/tests/__snapshots__/month-picker-default.snap.png +0 -0
- package/src/components/MonthPicker/tests/__snapshots__/month-picker-disabled.snap.png +0 -0
- package/src/components/MonthPicker/tests/__snapshots__/month-picker-readonly.snap.png +0 -0
- package/src/components/MonthPicker/tests/__snapshots__/month-picker-with-value.snap.png +0 -0
- package/src/components/MonthPicker/types.ts +16 -0
- package/src/components/MonthPicker/useMonthPickerValidation.ts +64 -27
- package/src/components/NirField/NirField.mdx +120 -66
- package/src/components/NirField/NirField.stories.ts +256 -682
- package/src/components/NirField/NirField.vue +98 -32
- package/src/components/NirField/tests/NirField.spec.ts +135 -14
- package/src/components/NirField/tests/NirField.visual.cy.ts +28 -0
- package/src/components/NirField/tests/__snapshots__/nir-field-complex.snap.png +0 -0
- package/src/components/NirField/tests/__snapshots__/nir-field-default.snap.png +0 -0
- package/src/components/NirField/tests/__snapshots__/nir-field-with-key.snap.png +0 -0
- package/src/components/NirField/tests/useNirValidation.spec.ts +168 -0
- package/src/components/NirField/useNirValidation.ts +44 -19
- package/src/components/NirField/validation/Validation.stories.ts +866 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.visual.cy.ts +28 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +263 -245
- package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-custom-btn.snap.png +0 -0
- package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-default.snap.png +0 -0
- package/src/components/NotFoundPage/tests/__snapshots__/not-found-page-no-btn.snap.png +0 -0
- package/src/components/NotificationBar/NotificationBar.mdx +0 -1
- package/src/components/NotificationBar/tests/NotificationBar.visual.cy.ts +54 -0
- package/src/components/NotificationBar/tests/__snapshots__/notification-bar-bottom.snap.png +0 -0
- package/src/components/NotificationBar/tests/__snapshots__/notification-bar-info.snap.png +0 -0
- package/src/components/NotificationBar/tests/__snapshots__/notification-bar-multiple.snap.png +0 -0
- package/src/components/PageContainer/PageContainer.mdx +0 -1
- package/src/components/PageContainer/PageContainer.stories.ts +170 -2
- package/src/components/PageContainer/PageContainer.vue +63 -8
- package/src/components/PageContainer/tests/PageContainer.visual.cy.ts +33 -0
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +19 -11
- package/src/components/PageContainer/tests/__snapshots__/page-container-color.snap.png +0 -0
- package/src/components/PageContainer/tests/__snapshots__/page-container-default.snap.png +0 -0
- package/src/components/PageContainer/tests/__snapshots__/page-container-md.snap.png +0 -0
- package/src/components/PaginatedTable/PaginatedTable.mdx +0 -1
- package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +99 -7
- package/src/components/PaginatedTable/tests/PaginatedTable.visual.cy.ts +41 -0
- package/src/components/PaginatedTable/tests/__snapshots__/paginated-table-default.snap.png +0 -0
- package/src/components/PaginatedTable/tests/__snapshots__/paginated-table-server.snap.png +0 -0
- package/src/components/PasswordField/PasswordField.mdx +5 -52
- package/src/components/PasswordField/PasswordField.stories.ts +74 -931
- package/src/components/PasswordField/PasswordField.vue +120 -191
- package/src/components/PasswordField/Validation/Validation.stories.ts +1295 -0
- package/src/components/PasswordField/locales.ts +2 -0
- package/src/components/PasswordField/tests/PasswordField.spec.ts +144 -106
- package/src/components/PasswordField/tests/PasswordField.visual.cy.ts +49 -0
- package/src/components/PasswordField/tests/__snapshots__/password-field-default.snap.png +0 -0
- package/src/components/PasswordField/tests/__snapshots__/password-field-disabled.snap.png +0 -0
- package/src/components/PasswordField/tests/__snapshots__/password-field-required.snap.png +0 -0
- package/src/components/PasswordField/tests/__snapshots__/password-field-underlined.snap.png +0 -0
- package/src/components/PasswordField/types.ts +17 -0
- package/src/components/PasswordField/usePasswordFieldValidation.ts +100 -0
- package/src/components/PeriodField/PeriodField.mdx +0 -1
- package/src/components/PeriodField/PeriodField.stories.ts +3 -1
- package/src/components/PeriodField/PeriodField.vue +1 -1
- package/src/components/PeriodField/tests/PeriodField.visual.cy.ts +39 -0
- package/src/components/PeriodField/tests/__snapshots__/period-field-default.snap.png +0 -0
- package/src/components/PeriodField/tests/__snapshots__/period-field-no-calendar.snap.png +0 -0
- package/src/components/PeriodField/tests/__snapshots__/period-field-required.snap.png +0 -0
- package/src/components/PeriodField/tests/__snapshots__/period-field-with-value.snap.png +0 -0
- package/src/components/PhoneField/PhoneField.mdx +2 -3
- package/src/components/PhoneField/PhoneField.stories.ts +227 -410
- package/src/components/PhoneField/PhoneField.vue +205 -439
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/PhoneField/locales.ts +7 -0
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -1
- package/src/components/PhoneField/tests/PhoneField.spec.ts +518 -220
- package/src/components/PhoneField/tests/PhoneField.visual.cy.ts +28 -0
- package/src/components/PhoneField/tests/__snapshots__/phone-field-default.snap.png +0 -0
- package/src/components/PhoneField/tests/__snapshots__/phone-field-with-country-code.snap.png +0 -0
- package/src/components/PhoneField/tests/__snapshots__/phone-field-with-value.snap.png +0 -0
- package/src/components/PhoneField/types.ts +30 -0
- package/src/components/PhoneField/usePhoneFieldValidation.ts +119 -0
- package/src/components/PhoneField/usePhoneIndicatifs.ts +89 -0
- package/src/components/PhoneField/validation/validation.stories.ts +717 -0
- package/src/components/RangeField/RangeField.mdx +0 -1
- 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/RatingPicker.mdx +0 -1
- package/src/components/RatingPicker/tests/RatingPicker.visual.cy.ts +52 -0
- package/src/components/RatingPicker/tests/__snapshots__/rating-picker-emotion.snap.png +0 -0
- package/src/components/RatingPicker/tests/__snapshots__/rating-picker-number.snap.png +0 -0
- package/src/components/RatingPicker/tests/__snapshots__/rating-picker-readonly.snap.png +0 -0
- package/src/components/RatingPicker/tests/__snapshots__/rating-picker-stars.snap.png +0 -0
- package/src/components/SearchListField/SearchListField.mdx +1 -1
- package/src/components/SearchListField/SearchListField.stories.ts +1 -1
- package/src/components/SearchListField/SearchListField.vue +9 -4
- package/src/components/SearchListField/tests/SearchListField.spec.ts +127 -0
- package/src/components/SearchListField/tests/SearchListField.visual.cy.ts +35 -0
- package/src/components/SearchListField/tests/__snapshots__/search-list-field-default.snap.png +0 -0
- package/src/components/SearchListField/tests/__snapshots__/search-list-field-with-selection.snap.png +0 -0
- package/src/components/SkipLink/tests/SkipLink.visual.cy.ts +16 -0
- package/src/components/SkipLink/tests/__snapshots__/skip-link-focused.snap.png +0 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +0 -1
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.visual.cy.ts +33 -0
- package/src/components/SocialMediaLinks/tests/__snapshots__/social-media-links-default.snap.png +0 -0
- package/src/components/SocialMediaLinks/tests/__snapshots__/social-media-links-no-native-heading.snap.png +0 -0
- package/src/components/StatusPage/StatusPage.vue +1 -0
- package/src/components/StatusPage/tests/StatusPage.visual.cy.ts +47 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +248 -230
- package/src/components/StatusPage/tests/__snapshots__/status-page-default.snap.png +0 -0
- package/src/components/StatusPage/tests/__snapshots__/status-page-full.snap.png +0 -0
- package/src/components/StatusPage/tests/__snapshots__/status-page-no-btn.snap.png +0 -0
- package/src/components/SubHeader/SubHeader.mdx +5 -6
- package/src/components/SubHeader/tests/SubHeader.visual.cy.ts +48 -0
- package/src/components/SubHeader/tests/__snapshots__/sub-header-default.snap.png +0 -0
- package/src/components/SubHeader/tests/__snapshots__/sub-header-loading.snap.png +0 -0
- package/src/components/SubHeader/tests/__snapshots__/sub-header-no-back-btn.snap.png +0 -0
- package/src/components/SubHeader/tests/__snapshots__/sub-header-with-subtitle.snap.png +0 -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/SyHeading/tests/SyHeading.visual.cy.ts +33 -0
- package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-1.snap.png +0 -0
- package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-2.snap.png +0 -0
- package/src/components/SyHeading/tests/__snapshots__/sy-heading-level-3.snap.png +0 -0
- package/src/components/SyTextArea/SyTextArea.stories.ts +25 -0
- package/src/components/SyTextArea/SyTextArea.vue +7 -0
- package/src/components/SyTextArea/composables/useSyTextAreaValidation.ts +1 -1
- package/src/components/SyTextArea/tests/SyTextArea.a11y.spec.ts +18 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +135 -1
- package/src/components/SyTextArea/tests/SyTextArea.visual.cy.ts +48 -0
- package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-default.snap.png +0 -0
- package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-filled.snap.png +0 -0
- package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-required.snap.png +0 -0
- package/src/components/SyTextArea/tests/__snapshots__/sy-textarea-with-value.snap.png +0 -0
- package/src/components/SyTextArea/validation/Validation.stories.ts +6 -86
- package/src/components/TableToolbar/tests/TableToolbar.visual.cy.ts +49 -0
- package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-default.snap.png +0 -0
- package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-filtered.snap.png +0 -0
- package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-loading.snap.png +0 -0
- package/src/components/TableToolbar/tests/__snapshots__/table-toolbar-with-add-btn.snap.png +0 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +3 -3
- package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +114 -7
- package/src/components/Tables/SyServerTable/tests/SyServerTable.visual.cy.ts +58 -0
- package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-default.snap.png +0 -0
- package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-loading.snap.png +0 -0
- package/src/components/Tables/SyServerTable/tests/__snapshots__/sy-server-table-with-select.snap.png +0 -0
- package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +116 -7
- package/src/components/Tables/SyTable/tests/SyTable.visual.cy.ts +70 -0
- package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-compact.snap.png +0 -0
- package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-default.snap.png +0 -0
- package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-striped.snap.png +0 -0
- package/src/components/Tables/SyTable/tests/__snapshots__/sy-table-with-select.snap.png +0 -0
- package/src/components/Tables/common/tableStyles.scss +4 -4
- package/src/components/Tables/common/tests/SyTableFilter.spec.ts +19 -13
- package/src/components/Tables/common/tests/filterByRange.spec.ts +23 -22
- package/src/components/ToolbarContainer/tests/ToolbarContainer.visual.cy.ts +34 -0
- package/src/components/ToolbarContainer/tests/__snapshots__/toolbar-container-default.snap.png +0 -0
- package/src/components/ToolbarContainer/tests/__snapshots__/toolbar-container-links.snap.png +0 -0
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +0 -1
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +1 -2
- package/src/components/UploadWorkflow/tests/UploadWorkflow.visual.cy.ts +39 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/upload-workflow-default.snap.png +0 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/upload-workflow-with-title.snap.png +0 -0
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +0 -1
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +177 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.visual.cy.ts +42 -0
- package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-default.snap.png +0 -0
- package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-no-logout.snap.png +0 -0
- package/src/components/UserMenuBtn/tests/__snapshots__/user-menu-btn-with-name.snap.png +0 -0
- package/src/composables/unifyValidation/documentationValidationProps.ts +2 -2
- package/src/composables/unifyValidation/tests/documentationValidationProps.spec.ts +2 -2
- package/src/composables/unifyValidation/tests/useValidation.spec.ts +13 -1
- package/src/composables/unifyValidation/useValidation.ts +41 -31
- package/src/composables/useFilterable/useFilterable.spec.ts +105 -142
- package/src/composables/useFilterable/useFilterable.ts +6 -17
- package/src/composables/useFormFieldErrorHandling.ts +1 -1
- package/src/composables/validation/tests/useFormValidation.spec.ts +11 -2
- package/src/composables/validation/tests/useValidatable.spec.ts +16 -6
- package/src/composables/validation/tests/useValidation.spec.ts +2 -2
- package/src/composables/validation/useValidation.ts +1 -1
- package/src/composantsVuetify/VCard/VCard.mdx +12 -0
- package/src/composantsVuetify/VCard/v-card.stories.ts +283 -1
- package/src/composantsVuetify/VCarousel/VCarousel.mdx +74 -0
- package/src/composantsVuetify/VCarousel/v-carousel.stories.ts +531 -0
- package/src/composantsVuetify/VNavigationDrawer/VNavgationDrawer.mdx +53 -0
- package/src/composantsVuetify/VNavigationDrawer/v-navigation-drawer.stories.ts +310 -0
- package/src/composantsVuetify/VSlideGroup/VSlideGroup.mdx +105 -0
- package/src/composantsVuetify/VSlideGroup/v-slide-group.stories.ts +463 -0
- package/src/composantsVuetify/VStepper/VStepper.mdx +56 -0
- package/src/composantsVuetify/VStepper/v-stepper.stories.ts +563 -0
- package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -0
- package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
- package/src/designTokens/tokens/baseColors.ts +1 -1
- package/src/designTokens/tokens/baseTokens.ts +18 -18
- package/src/designTokens/tokens/pa/paLightTheme.ts +1 -0
- package/src/stories/Accessibilite/DesignSystem/a11y-status.json +1 -1
- package/src/stories/Components/Components.stories.ts +95 -11
- package/src/stories/Demarrer/Releases.stories.ts +59 -2
- package/src/stories/DesignTokens/Arrondis.mdx +1 -1
- package/src/stories/DesignTokens/Colors.mdx +2 -0
- package/src/stories/DesignTokens/Correspondances.mdx +219 -0
- package/src/stories/DesignTokens/UtiliserLesTokens.mdx +235 -0
- package/src/stories/DesignTokens/colors.stories.ts +582 -569
- package/src/stories/EcoConception/EcoBestPracticesDoc.vue +930 -0
- package/src/stories/EcoConception/EcoBestPratices.mdx +38 -0
- package/src/stories/EcoConception/Introduction.mdx +8 -1
- package/src/stories/EcoConception/datas/bonnes_pratiques_essentielles.json +1018 -0
- package/src/stories/EcoConception/ecoconception-best-practices.stories.ts +20 -0
- package/src/stories/GuideDuDev/Amelipro.mdx +9 -1
- package/src/stories/GuideDuDev/Amelipro.stories.ts +1023 -168
- package/src/stories/GuideDuDev/PortailAgent.stories.ts +0 -1
- package/src/utils/functions/deepCopy/index.ts +2 -3
- package/dist/components/Customs/SyCheckbox/locales.d.ts +0 -3
- package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +0 -5
- package/dist/components/PhoneField/tests/types.d.ts +0 -18
- package/dist/components/SyHeading/SyHeading.a11y.test.d.ts +0 -1
- package/dist/components/SyHeading/SyHeading.test.d.ts +0 -1
- package/src/components/Customs/SyCheckbox/locales.ts +0 -3
- package/src/components/Customs/SyTextField/types.d.ts +0 -4
- package/src/components/LunarCalendar/tests/useLunarCalendarRules.spec.ts +0 -184
- package/src/components/LunarCalendar/useLunarCalendarRules.ts +0 -96
- package/src/components/PhoneField/tests/types.d.ts +0 -19
|
@@ -20,6 +20,24 @@ const meta = {
|
|
|
20
20
|
},
|
|
21
21
|
argTypes: {
|
|
22
22
|
...getValidationDocumentation('string'),
|
|
23
|
+
uniqueId: {
|
|
24
|
+
control: { type: 'text' },
|
|
25
|
+
description: 'Identifiant unique du composant',
|
|
26
|
+
table: {
|
|
27
|
+
type: { summary: 'string' },
|
|
28
|
+
defaultValue: { summary: 'undefined' },
|
|
29
|
+
category: 'props',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
counter: {
|
|
33
|
+
control: { type: 'boolean' },
|
|
34
|
+
description: 'Affiche un compteur de caractères. `true` affiche uniquement le nombre de caractères saisis, un nombre affiche le format `X / N`.',
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: 'boolean | number' },
|
|
37
|
+
defaultValue: { summary: 'false' },
|
|
38
|
+
category: 'props',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
23
41
|
label: {
|
|
24
42
|
control: { type: 'text' },
|
|
25
43
|
description: 'Texte affiché au-dessus du champ',
|
|
@@ -139,6 +157,7 @@ export const Default: Story = {
|
|
|
139
157
|
name: 'Template',
|
|
140
158
|
code: `<template>
|
|
141
159
|
<SyTextArea
|
|
160
|
+
uniqueId: 'text-area-unique-id',
|
|
142
161
|
v-model="text"
|
|
143
162
|
label="Texte"
|
|
144
163
|
placeholder="Entrez votre texte ici"
|
|
@@ -205,6 +224,7 @@ export const Required: Story = {
|
|
|
205
224
|
name: 'Template',
|
|
206
225
|
code: `<template>
|
|
207
226
|
<SyTextArea
|
|
227
|
+
uniqueId: 'text-area-unique-id',
|
|
208
228
|
v-model="text"
|
|
209
229
|
label="Texte requis"
|
|
210
230
|
:required="true"
|
|
@@ -333,6 +353,7 @@ export const Trim: Story = {
|
|
|
333
353
|
name: 'Template',
|
|
334
354
|
code: `<template>
|
|
335
355
|
<SyTextArea
|
|
356
|
+
uniqueId: 'text-area-unique-id',
|
|
336
357
|
v-model="text"
|
|
337
358
|
label="Trim text area"
|
|
338
359
|
:trim="true"
|
|
@@ -373,6 +394,7 @@ export const ReplaceTabs: Story = {
|
|
|
373
394
|
name: 'Template',
|
|
374
395
|
code: `<template>
|
|
375
396
|
<SyTextArea
|
|
397
|
+
uniqueId: 'text-area-unique-id',
|
|
376
398
|
v-model="text"
|
|
377
399
|
label="Replace tabs text area"
|
|
378
400
|
:replace-tabs="4"
|
|
@@ -408,6 +430,7 @@ export const MaxLines: Story = {
|
|
|
408
430
|
name: 'Template',
|
|
409
431
|
code: `<template>
|
|
410
432
|
<SyTextArea
|
|
433
|
+
uniqueId: 'text-area-unique-id',
|
|
411
434
|
v-model="text"
|
|
412
435
|
label="Max lines text area"
|
|
413
436
|
:max-lines="5"
|
|
@@ -470,6 +493,7 @@ export const AutoWrap: Story = {
|
|
|
470
493
|
name: 'Template',
|
|
471
494
|
code: `<template>
|
|
472
495
|
<SyTextArea
|
|
496
|
+
uniqueId: 'text-area-unique-id',
|
|
473
497
|
v-model="text"
|
|
474
498
|
label="Auto wrap text area"
|
|
475
499
|
:auto-wrap="50"
|
|
@@ -515,6 +539,7 @@ export const Normalize: Story = {
|
|
|
515
539
|
name: 'Template',
|
|
516
540
|
code: `<template>
|
|
517
541
|
<SyTextArea
|
|
542
|
+
uniqueId: 'text-area-unique-id',
|
|
518
543
|
v-model="text"
|
|
519
544
|
label="Normalize text area"
|
|
520
545
|
:normalize="true"
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
import { locales } from './locales'
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(defineProps<{
|
|
13
|
+
uniqueId: string
|
|
14
|
+
counter?: boolean | number | string
|
|
13
15
|
modelValue?: string
|
|
14
16
|
trim?: boolean
|
|
15
17
|
replaceTabs?: number
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
modelValue: '',
|
|
31
33
|
trim: false,
|
|
32
34
|
replaceTabs: undefined,
|
|
35
|
+
counter: false,
|
|
33
36
|
maxLines: undefined,
|
|
34
37
|
autoWrap: undefined,
|
|
35
38
|
normalize: false,
|
|
@@ -141,6 +144,8 @@
|
|
|
141
144
|
return 'rgb(var(--v-theme-onSurface))'
|
|
142
145
|
})
|
|
143
146
|
|
|
147
|
+
const counter = computed(() => props.counter === false ? undefined : props.counter)
|
|
148
|
+
|
|
144
149
|
const showClear = computed(() =>
|
|
145
150
|
props.clearable && !props.disabled && !props.readonly && !!internalValue.value,
|
|
146
151
|
)
|
|
@@ -179,11 +184,13 @@
|
|
|
179
184
|
<template>
|
|
180
185
|
<div class="sy-textarea">
|
|
181
186
|
<VTextarea
|
|
187
|
+
:id="uniqueId"
|
|
182
188
|
ref="textAreaRef"
|
|
183
189
|
:model-value="internalValue"
|
|
184
190
|
:variant="variant"
|
|
185
191
|
:color="color"
|
|
186
192
|
:bg-color="props.bgColor"
|
|
193
|
+
:counter="counter"
|
|
187
194
|
:error="hasError"
|
|
188
195
|
:error-messages="errors"
|
|
189
196
|
:class="{
|
|
@@ -39,7 +39,7 @@ export function useSyTextAreaValidation(
|
|
|
39
39
|
disabled: computed(() => props.disabled ?? false),
|
|
40
40
|
required: computed(() => props.required ?? false),
|
|
41
41
|
isValidateOnBlur: computed(() => props.isValidateOnBlur ?? true),
|
|
42
|
-
showSuccessMessages: computed(() => props.showSuccessMessages ??
|
|
42
|
+
showSuccessMessages: computed(() => props.showSuccessMessages ?? false),
|
|
43
43
|
disableErrorHandling: computed(() => props.disableErrorHandling ?? false),
|
|
44
44
|
useVuetifyValidation: computed(() => props.useVuetifyValidation ?? false),
|
|
45
45
|
label: computed(() => props.label ?? ''),
|
|
@@ -10,6 +10,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
10
10
|
it('has no obvious axe violations with default props', async () => {
|
|
11
11
|
const wrapper = mount(SyTextArea, {
|
|
12
12
|
props: {
|
|
13
|
+
uniqueId: 'textarea-1',
|
|
14
|
+
counter: 255,
|
|
13
15
|
label: 'Description',
|
|
14
16
|
},
|
|
15
17
|
modelValue: '',
|
|
@@ -24,6 +26,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
24
26
|
it('has no obvious axe violations with value', async () => {
|
|
25
27
|
const wrapper = mount(SyTextArea, {
|
|
26
28
|
props: {
|
|
29
|
+
uniqueId: 'textarea-1',
|
|
30
|
+
counter: 255,
|
|
27
31
|
label: 'Description',
|
|
28
32
|
},
|
|
29
33
|
modelValue: 'Ceci est une description',
|
|
@@ -38,6 +42,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
38
42
|
it('has no obvious axe violations with required field', async () => {
|
|
39
43
|
const wrapper = mount(SyTextArea, {
|
|
40
44
|
props: {
|
|
45
|
+
uniqueId: 'textarea-1',
|
|
46
|
+
counter: 255,
|
|
41
47
|
label: 'Description',
|
|
42
48
|
required: true,
|
|
43
49
|
},
|
|
@@ -53,6 +59,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
53
59
|
it('has no obvious axe violations with error messages', async () => {
|
|
54
60
|
const wrapper = mount(SyTextArea, {
|
|
55
61
|
props: {
|
|
62
|
+
uniqueId: 'textarea-1',
|
|
63
|
+
counter: 255,
|
|
56
64
|
label: 'Description',
|
|
57
65
|
required: true,
|
|
58
66
|
},
|
|
@@ -71,6 +79,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
71
79
|
it('has no obvious axe violations with max lines constraint', async () => {
|
|
72
80
|
const wrapper = mount(SyTextArea, {
|
|
73
81
|
props: {
|
|
82
|
+
uniqueId: 'textarea-1',
|
|
83
|
+
counter: 255,
|
|
74
84
|
label: 'Description',
|
|
75
85
|
maxLines: 3,
|
|
76
86
|
},
|
|
@@ -89,6 +99,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
89
99
|
it('has no obvious axe violations with custom rules', async () => {
|
|
90
100
|
const wrapper = mount(SyTextArea, {
|
|
91
101
|
props: {
|
|
102
|
+
uniqueId: 'textarea-1',
|
|
103
|
+
counter: 255,
|
|
92
104
|
label: 'Description',
|
|
93
105
|
rules: [(value: string) => value.length >= 10 || 'Minimum 10 caractères'],
|
|
94
106
|
},
|
|
@@ -107,6 +119,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
107
119
|
it('has no obvious axe violations with different variant', async () => {
|
|
108
120
|
const wrapper = mount(SyTextArea, {
|
|
109
121
|
props: {
|
|
122
|
+
uniqueId: 'textarea-1',
|
|
123
|
+
counter: 255,
|
|
110
124
|
label: 'Description',
|
|
111
125
|
variant: 'filled',
|
|
112
126
|
},
|
|
@@ -122,6 +136,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
122
136
|
it('has no obvious axe violations with custom color', async () => {
|
|
123
137
|
const wrapper = mount(SyTextArea, {
|
|
124
138
|
props: {
|
|
139
|
+
uniqueId: 'textarea-1',
|
|
140
|
+
counter: 255,
|
|
125
141
|
label: 'Description',
|
|
126
142
|
color: 'secondary',
|
|
127
143
|
},
|
|
@@ -137,6 +153,8 @@ describe('SyTextArea – accessibility (axe)', () => {
|
|
|
137
153
|
it('has no obvious axe violations with background color', async () => {
|
|
138
154
|
const wrapper = mount(SyTextArea, {
|
|
139
155
|
props: {
|
|
156
|
+
uniqueId: 'textarea-1',
|
|
157
|
+
counter: 255,
|
|
140
158
|
label: 'Description',
|
|
141
159
|
bgColor: 'grey-lighten-2',
|
|
142
160
|
},
|
|
@@ -9,6 +9,8 @@ describe('SyTextArea', () => {
|
|
|
9
9
|
it('renders correctly', () => {
|
|
10
10
|
const wrapper = mount(SyTextArea, {
|
|
11
11
|
props: {
|
|
12
|
+
uniqueId: 'textarea-1',
|
|
13
|
+
counter: 255,
|
|
12
14
|
modelValue: '',
|
|
13
15
|
label: 'Description des symptomes',
|
|
14
16
|
},
|
|
@@ -17,9 +19,23 @@ describe('SyTextArea', () => {
|
|
|
17
19
|
expect(wrapper.text()).toContain('Description des symptomes')
|
|
18
20
|
})
|
|
19
21
|
|
|
22
|
+
it('applique l\'attribut id depuis uniqueId', () => {
|
|
23
|
+
const wrapper = mount(SyTextArea, {
|
|
24
|
+
props: {
|
|
25
|
+
uniqueId: 'my-textarea-id',
|
|
26
|
+
modelValue: '',
|
|
27
|
+
label: 'Description',
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
expect(wrapper.find('textarea').attributes('id')).toBe('my-textarea-id')
|
|
32
|
+
})
|
|
33
|
+
|
|
20
34
|
it('sets aria-required when required is true', () => {
|
|
21
35
|
const wrapper = mount(SyTextArea, {
|
|
22
36
|
props: {
|
|
37
|
+
uniqueId: 'textarea-1',
|
|
38
|
+
counter: 255,
|
|
23
39
|
modelValue: '',
|
|
24
40
|
required: true,
|
|
25
41
|
label: 'Description des symptomes',
|
|
@@ -33,6 +49,8 @@ describe('SyTextArea', () => {
|
|
|
33
49
|
it('does not show required error message by default', async () => {
|
|
34
50
|
const wrapper = mount(SyTextArea, {
|
|
35
51
|
props: {
|
|
52
|
+
uniqueId: 'textarea-1',
|
|
53
|
+
counter: 255,
|
|
36
54
|
modelValue: '',
|
|
37
55
|
required: true,
|
|
38
56
|
label: 'Description des symptomes',
|
|
@@ -45,6 +63,8 @@ describe('SyTextArea', () => {
|
|
|
45
63
|
it('shows required error message when empty after interaction', async () => {
|
|
46
64
|
const wrapper = mount(SyTextArea, {
|
|
47
65
|
props: {
|
|
66
|
+
uniqueId: 'textarea-1',
|
|
67
|
+
counter: 255,
|
|
48
68
|
modelValue: '',
|
|
49
69
|
required: true,
|
|
50
70
|
label: 'Description des symptomes',
|
|
@@ -60,6 +80,8 @@ describe('SyTextArea', () => {
|
|
|
60
80
|
it('remove the white spaces at the beginning of the text as we try to add them', async () => {
|
|
61
81
|
const wrapper = mount(SyTextArea, {
|
|
62
82
|
props: {
|
|
83
|
+
uniqueId: 'textarea-1',
|
|
84
|
+
counter: 255,
|
|
63
85
|
modelValue: '',
|
|
64
86
|
trim: true,
|
|
65
87
|
label: 'Description des symptomes',
|
|
@@ -75,6 +97,8 @@ describe('SyTextArea', () => {
|
|
|
75
97
|
it('does not remove the white spaces at the middle of the text', async () => {
|
|
76
98
|
const wrapper = mount(SyTextArea, {
|
|
77
99
|
props: {
|
|
100
|
+
uniqueId: 'textarea-1',
|
|
101
|
+
counter: 255,
|
|
78
102
|
modelValue: '',
|
|
79
103
|
trim: true,
|
|
80
104
|
label: 'Description des symptomes',
|
|
@@ -90,6 +114,8 @@ describe('SyTextArea', () => {
|
|
|
90
114
|
it('removes the white spaces at the end of the text at blur', async () => {
|
|
91
115
|
const wrapper = mount(SyTextArea, {
|
|
92
116
|
props: {
|
|
117
|
+
uniqueId: 'textarea-1',
|
|
118
|
+
counter: 255,
|
|
93
119
|
modelValue: '',
|
|
94
120
|
trim: true,
|
|
95
121
|
label: 'Description des symptomes',
|
|
@@ -107,6 +133,8 @@ describe('SyTextArea', () => {
|
|
|
107
133
|
it('removes the tabs with the number of spaces defined in the prop', async () => {
|
|
108
134
|
const wrapper = mount(SyTextArea, {
|
|
109
135
|
props: {
|
|
136
|
+
uniqueId: 'textarea-1',
|
|
137
|
+
counter: 255,
|
|
110
138
|
modelValue: '',
|
|
111
139
|
replaceTabs: 2,
|
|
112
140
|
label: 'Description des symptomes',
|
|
@@ -122,6 +150,8 @@ describe('SyTextArea', () => {
|
|
|
122
150
|
it('show an error message when the text is too long', async () => {
|
|
123
151
|
const wrapper = mount(SyTextArea, {
|
|
124
152
|
props: {
|
|
153
|
+
uniqueId: 'textarea-1',
|
|
154
|
+
counter: 255,
|
|
125
155
|
modelValue: '',
|
|
126
156
|
maxLines: 5,
|
|
127
157
|
label: 'Description des symptomes',
|
|
@@ -144,6 +174,8 @@ describe('SyTextArea', () => {
|
|
|
144
174
|
it('adds a line break when a line is too long', async () => {
|
|
145
175
|
const wrapper = mount(SyTextArea, {
|
|
146
176
|
props: {
|
|
177
|
+
uniqueId: 'textarea-1',
|
|
178
|
+
counter: 255,
|
|
147
179
|
modelValue: '',
|
|
148
180
|
autoWrap: 50,
|
|
149
181
|
label: 'Description des symptomes',
|
|
@@ -163,6 +195,8 @@ describe('SyTextArea', () => {
|
|
|
163
195
|
it('adds a line break when a line is too long 2', async () => {
|
|
164
196
|
const wrapper = mount(SyTextArea, {
|
|
165
197
|
props: {
|
|
198
|
+
uniqueId: 'textarea-1',
|
|
199
|
+
counter: 255,
|
|
166
200
|
modelValue: '',
|
|
167
201
|
autoWrap: 50,
|
|
168
202
|
label: 'Description des symptomes',
|
|
@@ -182,6 +216,8 @@ describe('SyTextArea', () => {
|
|
|
182
216
|
it('normalizes the text to NFC', async () => {
|
|
183
217
|
const wrapper = mount(SyTextArea, {
|
|
184
218
|
props: {
|
|
219
|
+
uniqueId: 'textarea-1',
|
|
220
|
+
counter: 255,
|
|
185
221
|
modelValue: '',
|
|
186
222
|
normalize: true,
|
|
187
223
|
label: 'Description des symptomes',
|
|
@@ -197,6 +233,8 @@ describe('SyTextArea', () => {
|
|
|
197
233
|
it('updates the text when the modelValue prop changes', async () => {
|
|
198
234
|
const wrapper = mount(SyTextArea, {
|
|
199
235
|
props: {
|
|
236
|
+
uniqueId: 'textarea-1',
|
|
237
|
+
counter: 255,
|
|
200
238
|
modelValue: '',
|
|
201
239
|
replaceTabs: 2,
|
|
202
240
|
trim: true,
|
|
@@ -212,6 +250,8 @@ describe('SyTextArea', () => {
|
|
|
212
250
|
it('shows custom error from customRules in custom validation mode', async () => {
|
|
213
251
|
const wrapper = mount(SyTextArea, {
|
|
214
252
|
props: {
|
|
253
|
+
uniqueId: 'textarea-1',
|
|
254
|
+
counter: 255,
|
|
215
255
|
modelValue: '',
|
|
216
256
|
label: 'Description des symptomes',
|
|
217
257
|
isValidateOnBlur: false,
|
|
@@ -240,6 +280,8 @@ describe('SyTextArea', () => {
|
|
|
240
280
|
it('shows vuetify rule error when useVuetifyValidation is true', async () => {
|
|
241
281
|
const wrapper = mount(SyTextArea, {
|
|
242
282
|
props: {
|
|
283
|
+
uniqueId: 'textarea-1',
|
|
284
|
+
counter: 255,
|
|
243
285
|
modelValue: '',
|
|
244
286
|
label: 'Description des symptomes',
|
|
245
287
|
useVuetifyValidation: true,
|
|
@@ -261,6 +303,8 @@ describe('SyTextArea', () => {
|
|
|
261
303
|
it('shows custom warning from customWarningRules in custom validation mode', async () => {
|
|
262
304
|
const wrapper = mount(SyTextArea, {
|
|
263
305
|
props: {
|
|
306
|
+
uniqueId: 'textarea-1',
|
|
307
|
+
counter: 255,
|
|
264
308
|
modelValue: '',
|
|
265
309
|
label: 'Description des symptomes',
|
|
266
310
|
isValidateOnBlur: false,
|
|
@@ -296,9 +340,12 @@ describe('SyTextArea', () => {
|
|
|
296
340
|
it('shows custom success from customSuccessRules in custom validation mode', async () => {
|
|
297
341
|
const wrapper = mount(SyTextArea, {
|
|
298
342
|
props: {
|
|
343
|
+
uniqueId: 'textarea-1',
|
|
344
|
+
counter: 255,
|
|
299
345
|
modelValue: '',
|
|
300
346
|
label: 'Description des symptomes',
|
|
301
347
|
isValidateOnBlur: false,
|
|
348
|
+
showSuccessMessages: true,
|
|
302
349
|
customRules: [
|
|
303
350
|
{
|
|
304
351
|
type: 'custom',
|
|
@@ -331,6 +378,8 @@ describe('SyTextArea', () => {
|
|
|
331
378
|
it('validates only on blur when isValidateOnBlur is true', async () => {
|
|
332
379
|
const wrapper = mount(SyTextArea, {
|
|
333
380
|
props: {
|
|
381
|
+
uniqueId: 'textarea-1',
|
|
382
|
+
counter: 255,
|
|
334
383
|
modelValue: '',
|
|
335
384
|
label: 'Description des symptomes',
|
|
336
385
|
isValidateOnBlur: true,
|
|
@@ -362,6 +411,8 @@ describe('SyTextArea', () => {
|
|
|
362
411
|
it('keeps success visual state but hides success text when showSuccessMessages is false', async () => {
|
|
363
412
|
const wrapper = mount(SyTextArea, {
|
|
364
413
|
props: {
|
|
414
|
+
uniqueId: 'textarea-1',
|
|
415
|
+
counter: 255,
|
|
365
416
|
modelValue: '',
|
|
366
417
|
label: 'Description des symptomes',
|
|
367
418
|
isValidateOnBlur: false,
|
|
@@ -388,13 +439,14 @@ describe('SyTextArea', () => {
|
|
|
388
439
|
expect((wrapper.vm as any).hasSuccess).toBe(true)
|
|
389
440
|
expect(wrapper.find('.success-field').exists()).toBe(true)
|
|
390
441
|
expect(wrapper.find('.sy-textarea__state-icon').exists()).toBe(true)
|
|
391
|
-
expect(wrapper.findComponent(SyIcon).props('color')).toBe('onSuccessVariant')
|
|
392
442
|
expect(wrapper.text()).not.toContain('Succès masqué')
|
|
393
443
|
})
|
|
394
444
|
|
|
395
445
|
it('applies warning visual state and warning icon when warning rules fail', async () => {
|
|
396
446
|
const wrapper = mount(SyTextArea, {
|
|
397
447
|
props: {
|
|
448
|
+
uniqueId: 'textarea-1',
|
|
449
|
+
counter: 255,
|
|
398
450
|
modelValue: '',
|
|
399
451
|
label: 'Description des symptomes',
|
|
400
452
|
isValidateOnBlur: false,
|
|
@@ -424,6 +476,8 @@ describe('SyTextArea', () => {
|
|
|
424
476
|
it('applies error visual state and error icon when validation fails', async () => {
|
|
425
477
|
const wrapper = mount(SyTextArea, {
|
|
426
478
|
props: {
|
|
479
|
+
uniqueId: 'textarea-1',
|
|
480
|
+
counter: 255,
|
|
427
481
|
modelValue: '',
|
|
428
482
|
label: 'Description des symptomes',
|
|
429
483
|
required: true,
|
|
@@ -444,6 +498,8 @@ describe('SyTextArea', () => {
|
|
|
444
498
|
it('affiche l\'astérisque quand displayAsterisk et required sont true', () => {
|
|
445
499
|
const wrapper = mount(SyTextArea, {
|
|
446
500
|
props: {
|
|
501
|
+
uniqueId: 'textarea-1',
|
|
502
|
+
counter: 255,
|
|
447
503
|
modelValue: '',
|
|
448
504
|
label: 'Test Label',
|
|
449
505
|
displayAsterisk: true,
|
|
@@ -457,6 +513,8 @@ describe('SyTextArea', () => {
|
|
|
457
513
|
it('n\'affiche pas l\'astérisque quand displayAsterisk est false', () => {
|
|
458
514
|
const wrapper = mount(SyTextArea, {
|
|
459
515
|
props: {
|
|
516
|
+
uniqueId: 'textarea-1',
|
|
517
|
+
counter: 255,
|
|
460
518
|
modelValue: '',
|
|
461
519
|
label: 'Test Label',
|
|
462
520
|
displayAsterisk: false,
|
|
@@ -471,6 +529,8 @@ describe('SyTextArea', () => {
|
|
|
471
529
|
it('n\'affiche pas l\'astérisque quand required est false', () => {
|
|
472
530
|
const wrapper = mount(SyTextArea, {
|
|
473
531
|
props: {
|
|
532
|
+
uniqueId: 'textarea-1',
|
|
533
|
+
counter: 255,
|
|
474
534
|
modelValue: '',
|
|
475
535
|
label: 'Test Label',
|
|
476
536
|
displayAsterisk: true,
|
|
@@ -486,6 +546,8 @@ describe('SyTextArea', () => {
|
|
|
486
546
|
it('affiche le helpText quand aucun message de validation n\'est présent', () => {
|
|
487
547
|
const wrapper = mount(SyTextArea, {
|
|
488
548
|
props: {
|
|
549
|
+
uniqueId: 'textarea-1',
|
|
550
|
+
counter: 255,
|
|
489
551
|
modelValue: '',
|
|
490
552
|
label: 'Description',
|
|
491
553
|
helpText: 'Texte d\'aide',
|
|
@@ -498,6 +560,8 @@ describe('SyTextArea', () => {
|
|
|
498
560
|
it('masque le helpText quand des erreurs sont présentes', async () => {
|
|
499
561
|
const wrapper = mount(SyTextArea, {
|
|
500
562
|
props: {
|
|
563
|
+
uniqueId: 'textarea-1',
|
|
564
|
+
counter: 255,
|
|
501
565
|
modelValue: '',
|
|
502
566
|
label: 'Description',
|
|
503
567
|
helpText: 'Texte d\'aide',
|
|
@@ -518,6 +582,8 @@ describe('SyTextArea', () => {
|
|
|
518
582
|
it('masque la zone des messages quand hideDetails est true et qu\'il n\'y a pas de messages', () => {
|
|
519
583
|
const wrapper = mount(SyTextArea, {
|
|
520
584
|
props: {
|
|
585
|
+
uniqueId: 'textarea-1',
|
|
586
|
+
counter: 255,
|
|
521
587
|
modelValue: '',
|
|
522
588
|
label: 'Description',
|
|
523
589
|
hideDetails: true,
|
|
@@ -530,6 +596,8 @@ describe('SyTextArea', () => {
|
|
|
530
596
|
it('affiche la zone des messages quand hideDetails est true mais qu\'il y a des erreurs', async () => {
|
|
531
597
|
const wrapper = mount(SyTextArea, {
|
|
532
598
|
props: {
|
|
599
|
+
uniqueId: 'textarea-1',
|
|
600
|
+
counter: 255,
|
|
533
601
|
modelValue: '',
|
|
534
602
|
label: 'Description',
|
|
535
603
|
hideDetails: true,
|
|
@@ -548,6 +616,8 @@ describe('SyTextArea', () => {
|
|
|
548
616
|
it('affiche la zone des messages par défaut (hideDetails vaut false)', () => {
|
|
549
617
|
const wrapper = mount(SyTextArea, {
|
|
550
618
|
props: {
|
|
619
|
+
uniqueId: 'textarea-1',
|
|
620
|
+
counter: 255,
|
|
551
621
|
modelValue: '',
|
|
552
622
|
label: 'Description',
|
|
553
623
|
},
|
|
@@ -561,6 +631,8 @@ describe('SyTextArea', () => {
|
|
|
561
631
|
it('affiche le bouton de suppression quand clearable est true et qu\'une valeur est saisie', () => {
|
|
562
632
|
const wrapper = mount(SyTextArea, {
|
|
563
633
|
props: {
|
|
634
|
+
uniqueId: 'textarea-1',
|
|
635
|
+
counter: 255,
|
|
564
636
|
modelValue: 'contenu',
|
|
565
637
|
label: 'Description',
|
|
566
638
|
clearable: true,
|
|
@@ -576,6 +648,8 @@ describe('SyTextArea', () => {
|
|
|
576
648
|
it('n\'affiche pas le bouton de suppression quand clearable est false', () => {
|
|
577
649
|
const wrapper = mount(SyTextArea, {
|
|
578
650
|
props: {
|
|
651
|
+
uniqueId: 'textarea-1',
|
|
652
|
+
counter: 255,
|
|
579
653
|
modelValue: 'contenu',
|
|
580
654
|
label: 'Description',
|
|
581
655
|
clearable: false,
|
|
@@ -591,6 +665,8 @@ describe('SyTextArea', () => {
|
|
|
591
665
|
it('vide le champ au clic sur le bouton de suppression', async () => {
|
|
592
666
|
const wrapper = mount(SyTextArea, {
|
|
593
667
|
props: {
|
|
668
|
+
uniqueId: 'textarea-1',
|
|
669
|
+
counter: 255,
|
|
594
670
|
modelValue: 'contenu',
|
|
595
671
|
label: 'Description',
|
|
596
672
|
clearable: true,
|
|
@@ -614,6 +690,8 @@ describe('SyTextArea', () => {
|
|
|
614
690
|
it('n\'affiche pas d\'erreur pour un champ requis sans valeur quand disableErrorHandling est true', async () => {
|
|
615
691
|
const wrapper = mount(SyTextArea, {
|
|
616
692
|
props: {
|
|
693
|
+
uniqueId: 'textarea-1',
|
|
694
|
+
counter: 255,
|
|
617
695
|
modelValue: '',
|
|
618
696
|
label: 'Description',
|
|
619
697
|
required: true,
|
|
@@ -633,6 +711,8 @@ describe('SyTextArea', () => {
|
|
|
633
711
|
it('affiche les erreurs normalement quand disableErrorHandling est false', async () => {
|
|
634
712
|
const wrapper = mount(SyTextArea, {
|
|
635
713
|
props: {
|
|
714
|
+
uniqueId: 'textarea-1',
|
|
715
|
+
counter: 255,
|
|
636
716
|
modelValue: '',
|
|
637
717
|
label: 'Description',
|
|
638
718
|
required: true,
|
|
@@ -652,6 +732,8 @@ describe('SyTextArea', () => {
|
|
|
652
732
|
it('validateOnSubmit retourne true quand le champ est valide', async () => {
|
|
653
733
|
const wrapper = mount(SyTextArea, {
|
|
654
734
|
props: {
|
|
735
|
+
uniqueId: 'textarea-1',
|
|
736
|
+
counter: 255,
|
|
655
737
|
modelValue: 'valeur',
|
|
656
738
|
label: 'Description',
|
|
657
739
|
required: true,
|
|
@@ -668,6 +750,8 @@ describe('SyTextArea', () => {
|
|
|
668
750
|
it('validateOnSubmit retourne false quand le champ est invalide', async () => {
|
|
669
751
|
const wrapper = mount(SyTextArea, {
|
|
670
752
|
props: {
|
|
753
|
+
uniqueId: 'textarea-1',
|
|
754
|
+
counter: 255,
|
|
671
755
|
modelValue: '',
|
|
672
756
|
label: 'Description',
|
|
673
757
|
isValidateOnBlur: false,
|
|
@@ -698,6 +782,8 @@ describe('SyTextArea', () => {
|
|
|
698
782
|
it('validateOnSubmit retourne false quand un champ requis est vide', async () => {
|
|
699
783
|
const wrapper = mount(SyTextArea, {
|
|
700
784
|
props: {
|
|
785
|
+
uniqueId: 'textarea-1',
|
|
786
|
+
counter: 255,
|
|
701
787
|
modelValue: '',
|
|
702
788
|
label: 'Description',
|
|
703
789
|
required: true,
|
|
@@ -715,6 +801,8 @@ describe('SyTextArea', () => {
|
|
|
715
801
|
it('clearValidation remet l\'état d\'erreur à zéro', async () => {
|
|
716
802
|
const wrapper = mount(SyTextArea, {
|
|
717
803
|
props: {
|
|
804
|
+
uniqueId: 'textarea-1',
|
|
805
|
+
counter: 255,
|
|
718
806
|
modelValue: '',
|
|
719
807
|
label: 'Description',
|
|
720
808
|
isValidateOnBlur: false,
|
|
@@ -744,6 +832,52 @@ describe('SyTextArea', () => {
|
|
|
744
832
|
})
|
|
745
833
|
})
|
|
746
834
|
|
|
835
|
+
describe('counter', () => {
|
|
836
|
+
it('n\'affiche pas le compteur par défaut', () => {
|
|
837
|
+
const wrapper = mount(SyTextArea, {
|
|
838
|
+
props: {
|
|
839
|
+
uniqueId: 'textarea-1',
|
|
840
|
+
modelValue: 'hello',
|
|
841
|
+
label: 'Description',
|
|
842
|
+
},
|
|
843
|
+
})
|
|
844
|
+
|
|
845
|
+
expect(wrapper.find('.v-counter').exists()).toBe(false)
|
|
846
|
+
})
|
|
847
|
+
|
|
848
|
+
it('affiche uniquement le nombre de caractères quand counter est true', async () => {
|
|
849
|
+
const wrapper = mount(SyTextArea, {
|
|
850
|
+
props: {
|
|
851
|
+
uniqueId: 'textarea-1',
|
|
852
|
+
modelValue: '',
|
|
853
|
+
label: 'Description',
|
|
854
|
+
counter: true,
|
|
855
|
+
},
|
|
856
|
+
})
|
|
857
|
+
|
|
858
|
+
const textarea = wrapper.find('textarea')
|
|
859
|
+
await textarea.setValue('hello')
|
|
860
|
+
|
|
861
|
+
expect(wrapper.find('.v-counter').text()).toBe('5')
|
|
862
|
+
})
|
|
863
|
+
|
|
864
|
+
it('affiche le format X / N quand counter est un nombre', async () => {
|
|
865
|
+
const wrapper = mount(SyTextArea, {
|
|
866
|
+
props: {
|
|
867
|
+
uniqueId: 'textarea-1',
|
|
868
|
+
modelValue: '',
|
|
869
|
+
label: 'Description',
|
|
870
|
+
counter: 255,
|
|
871
|
+
},
|
|
872
|
+
})
|
|
873
|
+
|
|
874
|
+
const textarea = wrapper.find('textarea')
|
|
875
|
+
await textarea.setValue('hello')
|
|
876
|
+
|
|
877
|
+
expect(wrapper.find('.v-counter').text()).toBe('5 / 255')
|
|
878
|
+
})
|
|
879
|
+
})
|
|
880
|
+
|
|
747
881
|
describe('SyForm integration', () => {
|
|
748
882
|
it('valide un champ requis vide lors de la soumission sans interaction préalable', async () => {
|
|
749
883
|
const onSubmit = vi.fn()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import SyTextArea from '../SyTextArea.vue'
|
|
2
|
+
|
|
3
|
+
describe('SyTextArea - Visual regression tests', () => {
|
|
4
|
+
it('displays the textarea by default', () => {
|
|
5
|
+
cy.mountWithVuetify(SyTextArea, {
|
|
6
|
+
props: { label: 'Description' },
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
cy.get('.v-textarea').should('be.visible')
|
|
10
|
+
cy.matchImageSnapshot('sy-textarea-default', cy.get('.v-textarea'))
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
it('displays the textarea as required', () => {
|
|
14
|
+
cy.mountWithVuetify(SyTextArea, {
|
|
15
|
+
props: {
|
|
16
|
+
label: 'Description',
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
cy.get('.v-textarea').should('be.visible')
|
|
22
|
+
cy.matchImageSnapshot('sy-textarea-required', cy.get('.v-textarea'))
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('displays the textarea with a value', () => {
|
|
26
|
+
cy.mountWithVuetify(SyTextArea, {
|
|
27
|
+
props: {
|
|
28
|
+
label: 'Description',
|
|
29
|
+
modelValue: 'Ceci est un texte de description.',
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
cy.get('.v-textarea').should('be.visible')
|
|
34
|
+
cy.matchImageSnapshot('sy-textarea-with-value', cy.get('.v-textarea'))
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('displays the textarea with a custom variant', () => {
|
|
38
|
+
cy.mountWithVuetify(SyTextArea, {
|
|
39
|
+
props: {
|
|
40
|
+
label: 'Description',
|
|
41
|
+
variant: 'filled',
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
cy.get('.v-textarea').should('be.visible')
|
|
46
|
+
cy.matchImageSnapshot('sy-textarea-filled', cy.get('.v-textarea'))
|
|
47
|
+
})
|
|
48
|
+
})
|
|
Binary file
|
|
Binary file
|