@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
|
@@ -2,35 +2,79 @@ import type { StoryObj, Meta } from '@storybook/vue3'
|
|
|
2
2
|
import PhoneField from './PhoneField.vue'
|
|
3
3
|
import { ref, watch } from 'vue'
|
|
4
4
|
import { indicatifs } from './indicatifs'
|
|
5
|
+
import { getValidationDocumentation } from '@/composables/unifyValidation/documentationValidationProps'
|
|
6
|
+
import { fn } from '@storybook/test'
|
|
5
7
|
|
|
6
8
|
const meta = {
|
|
7
9
|
title: 'Composants/Formulaires/PhoneField',
|
|
8
10
|
component: PhoneField,
|
|
9
11
|
parameters: {
|
|
10
12
|
layout: 'fullscreen',
|
|
11
|
-
actions: {
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
controls: { exclude: ['computedValue', 'phoneMask', 'counter', 'hasError', 'phoneNumber', 'mergedDialCodes'] },
|
|
13
|
+
actions: { argTypesRegex: '^on.*' },
|
|
14
|
+
controls: { exclude: /^on*|undefined/ },
|
|
15
15
|
},
|
|
16
16
|
argTypes: {
|
|
17
|
-
'modelValue': {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'
|
|
27
|
-
|
|
17
|
+
'modelValue': {
|
|
18
|
+
control: 'string',
|
|
19
|
+
description: 'Valeur du champ numéro de téléphone. Ne doit contenir que les chiffres du numéro national, sans l\'indicatif pays. Par exemple, pour un numéro français +33 6 12 34 56 78, le `modelValue` doit être `0612345678`.',
|
|
20
|
+
table: {
|
|
21
|
+
type: {
|
|
22
|
+
summary: 'string',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
'bgColor': {
|
|
27
|
+
control: 'color',
|
|
28
|
+
description: 'Couleur de fond du champ.',
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: 'string',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
'dialCodeModel': {
|
|
36
|
+
control: 'string',
|
|
37
|
+
description: 'Valeur de l\'indicatif pays sélectionné. Peut être une chaîne (ex : "+33") ou un objet indicatif complet (ex : { code: "+33", country: "France", abbreviation: "FR" }).' },
|
|
38
|
+
'outlined': {
|
|
39
|
+
control: 'boolean',
|
|
40
|
+
description: 'Affiche les champs avec une bordure.',
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: 'true',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
'withCountryCode': {
|
|
46
|
+
control: 'boolean',
|
|
47
|
+
description: 'Affiche un sélecteur d\'indicatif pays à côté du champ numéro de téléphone. Lorsque cette prop est à `true`, le champ est divisé en deux parties : un sélecteur pour l\'indicatif pays et un champ pour le numéro national.',
|
|
48
|
+
table: {
|
|
49
|
+
type: {
|
|
50
|
+
summary: 'boolean',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
28
54
|
'displayFormat': {
|
|
29
55
|
control: { type: 'select' },
|
|
30
|
-
description: 'Format d\'affichage des
|
|
56
|
+
description: 'Format d\'affichage des options d\'indicatif pays dans le sélecteur. Les formats disponibles sont :\n\n- `code` (ex : +33)\n- `code-abbreviation` (ex : +33 - FR)\n- `code-country` (ex : +33 - France)\n- `country` (ex : France)\n- `abbreviation` (ex : FR)',
|
|
31
57
|
options: ['code', 'code-abbreviation', 'code-country', 'country', 'abbreviation'],
|
|
58
|
+
table: {
|
|
59
|
+
type: {
|
|
60
|
+
summary: `'code' | 'code-abbreviation' | 'code-country' | 'country' | 'abbreviation'`,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
32
63
|
},
|
|
33
64
|
'customIndicatifs': {
|
|
65
|
+
table: {
|
|
66
|
+
type: {
|
|
67
|
+
summary: 'Indicatif[]',
|
|
68
|
+
details: `{
|
|
69
|
+
code: string
|
|
70
|
+
abbreviation: string
|
|
71
|
+
country: string
|
|
72
|
+
countryFr?: string
|
|
73
|
+
mask?: string
|
|
74
|
+
phoneLength?: number
|
|
75
|
+
}[]
|
|
76
|
+
` },
|
|
77
|
+
},
|
|
34
78
|
control: 'object',
|
|
35
79
|
description: 'Permet d\'ajouter des indicatifs à la liste pre-existante',
|
|
36
80
|
},
|
|
@@ -41,20 +85,81 @@ const meta = {
|
|
|
41
85
|
'helpText': {
|
|
42
86
|
control: 'text',
|
|
43
87
|
description: 'Texte d\'aide affiché sous le champ. Lorsque présent, les messages d\'erreur incluent un exemple concret distinct du texte d\'aide.',
|
|
88
|
+
table: {
|
|
89
|
+
type: {
|
|
90
|
+
summary: 'string',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
44
93
|
},
|
|
45
94
|
'autocompleteCountryCode': {
|
|
46
95
|
control: 'text',
|
|
47
96
|
description: 'Valeur de l\'attribut `autocomplete` pour le champ indicatif pays. Utiliser `tel-country-code` (défaut) lorsque le numéro est séparé en deux champs (indicatif + numéro national), conformément à [WHATWG](https://html.spec.whatwg.org/#autofill-field-tel-country-code) et [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/quickref/#identify-input-purpose).',
|
|
97
|
+
table: {
|
|
98
|
+
type: {
|
|
99
|
+
summary: `'autocomplete' | 'tel-country-code' | undefined`,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
48
102
|
},
|
|
49
103
|
'autocompletePhone': {
|
|
50
104
|
control: 'text',
|
|
105
|
+
table: {
|
|
106
|
+
type: {
|
|
107
|
+
summary: `'autocomplete' | 'tel-national' | 'tel' | 'tel-extension'`,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
51
110
|
description: 'Valeur de l\'attribut `autocomplete` pour le champ numéro de téléphone. Valeurs recommandées selon le scénario :\n\n- `tel-national` (défaut) — numéro sans indicatif, lorsque le composant est en mode deux champs (`withCountryCode`).\n- `tel` — numéro complet avec indicatif intégré, pour un champ unique sans sélecteur de pays.\n- `tel-extension` — poste ou extension téléphonique.',
|
|
52
111
|
},
|
|
53
|
-
'isValidatedOnBlur': { control: 'boolean' },
|
|
54
112
|
'displayAsterisk': { control: 'boolean' },
|
|
55
|
-
'
|
|
56
|
-
|
|
57
|
-
|
|
113
|
+
'update:modelValue': {
|
|
114
|
+
action: 'update:modelValue',
|
|
115
|
+
table: {
|
|
116
|
+
type: {
|
|
117
|
+
summary: 'string',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
'isClearable': {
|
|
122
|
+
control: 'boolean',
|
|
123
|
+
table: {
|
|
124
|
+
type: {
|
|
125
|
+
summary: 'boolean',
|
|
126
|
+
},
|
|
127
|
+
category: 'props',
|
|
128
|
+
},
|
|
129
|
+
description: 'Affiche un bouton de nettoyage (clear) dans le champ lorsque du texte est saisi. Lorsque `true`, les utilisateurs peuvent facilement effacer le contenu du champ en cliquant sur ce bouton.',
|
|
130
|
+
},
|
|
131
|
+
'withoutFieldset': {
|
|
132
|
+
control: 'boolean',
|
|
133
|
+
table: {
|
|
134
|
+
type: {
|
|
135
|
+
summary: 'boolean',
|
|
136
|
+
},
|
|
137
|
+
category: 'props',
|
|
138
|
+
},
|
|
139
|
+
description: 'N\'entoure pas le champ d\'un élément `<fieldset>`',
|
|
140
|
+
},
|
|
141
|
+
'update:dialCodeModel': {
|
|
142
|
+
action: 'update:dialCodeModel',
|
|
143
|
+
table: {
|
|
144
|
+
type: {
|
|
145
|
+
summary: 'Indicatif',
|
|
146
|
+
details: `{
|
|
147
|
+
code: string
|
|
148
|
+
abbreviation: string
|
|
149
|
+
country: string
|
|
150
|
+
countryFr?: string
|
|
151
|
+
mask?: string
|
|
152
|
+
phoneLength?: number
|
|
153
|
+
}
|
|
154
|
+
`,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
...getValidationDocumentation('string'),
|
|
159
|
+
} as Record<string, unknown>,
|
|
160
|
+
args: {
|
|
161
|
+
'onUpdate:modelValue': fn(),
|
|
162
|
+
'onUpdate:dialCodeModel': fn(),
|
|
58
163
|
} as Record<string, unknown>,
|
|
59
164
|
} satisfies Meta<typeof PhoneField>
|
|
60
165
|
|
|
@@ -76,11 +181,10 @@ export const Default: Story = {
|
|
|
76
181
|
v-model="modelValue"
|
|
77
182
|
:required="required"
|
|
78
183
|
:withCountryCode="withCountryCode"
|
|
79
|
-
:countryCodeRequired="countryCodeRequired"
|
|
80
184
|
:displayFormat="displayFormat"
|
|
81
185
|
:customIndicatifs="customIndicatifs"
|
|
82
186
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
83
|
-
:
|
|
187
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
84
188
|
/>
|
|
85
189
|
</template>
|
|
86
190
|
`,
|
|
@@ -94,11 +198,10 @@ export const Default: Story = {
|
|
|
94
198
|
const modelValue = ref('')
|
|
95
199
|
const required = ref(true)
|
|
96
200
|
const withCountryCode = ref(true)
|
|
97
|
-
const countryCodeRequired = ref(true)
|
|
98
201
|
const displayFormat = ref('code')
|
|
99
202
|
const customIndicatifs = ref([])
|
|
100
203
|
const useCustomIndicatifsOnly = ref(false)
|
|
101
|
-
const
|
|
204
|
+
const isValidateOnBlur = ref(true)
|
|
102
205
|
</script>
|
|
103
206
|
`,
|
|
104
207
|
},
|
|
@@ -108,17 +211,15 @@ export const Default: Story = {
|
|
|
108
211
|
modelValue: '',
|
|
109
212
|
required: false,
|
|
110
213
|
outlined: true,
|
|
111
|
-
outlinedIndicatif: true,
|
|
112
214
|
withCountryCode: true,
|
|
113
|
-
countryCodeRequired: true,
|
|
114
215
|
displayFormat: 'code',
|
|
115
216
|
customIndicatifs: [],
|
|
116
217
|
useCustomIndicatifsOnly: false,
|
|
117
|
-
|
|
218
|
+
isValidateOnBlur: true,
|
|
118
219
|
bgColor: 'white',
|
|
119
220
|
readonly: false,
|
|
120
221
|
disabled: false,
|
|
121
|
-
},
|
|
222
|
+
} as Record<string, unknown>,
|
|
122
223
|
render: (args) => {
|
|
123
224
|
return {
|
|
124
225
|
components: { PhoneField },
|
|
@@ -126,12 +227,11 @@ export const Default: Story = {
|
|
|
126
227
|
return { args }
|
|
127
228
|
},
|
|
128
229
|
template: `
|
|
129
|
-
<div class="pa-4">
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
230
|
+
<div class="pa-4 mb-8">
|
|
231
|
+
<PhoneField
|
|
232
|
+
v-bind="args"
|
|
233
|
+
/>
|
|
133
234
|
</div>
|
|
134
|
-
<br><br><br><br><br>
|
|
135
235
|
`,
|
|
136
236
|
}
|
|
137
237
|
},
|
|
@@ -151,11 +251,10 @@ export const Required: Story = {
|
|
|
151
251
|
v-model="modelValue"
|
|
152
252
|
:required="required"
|
|
153
253
|
:withCountryCode="withCountryCode"
|
|
154
|
-
:countryCodeRequired="countryCodeRequired"
|
|
155
254
|
:displayFormat="displayFormat"
|
|
156
255
|
:customIndicatifs="customIndicatifs"
|
|
157
256
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
158
|
-
:
|
|
257
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
159
258
|
/>
|
|
160
259
|
</template>
|
|
161
260
|
`,
|
|
@@ -169,11 +268,10 @@ export const Required: Story = {
|
|
|
169
268
|
const modelValue = ref('')
|
|
170
269
|
const required = ref(true)
|
|
171
270
|
const withCountryCode = ref(true)
|
|
172
|
-
const countryCodeRequired = ref(true)
|
|
173
271
|
const displayFormat = ref('code')
|
|
174
272
|
const customIndicatifs = ref([])
|
|
175
273
|
const useCustomIndicatifsOnly = ref(false)
|
|
176
|
-
const
|
|
274
|
+
const isValidateOnBlur = ref(true)
|
|
177
275
|
</script>
|
|
178
276
|
`,
|
|
179
277
|
},
|
|
@@ -183,17 +281,15 @@ export const Required: Story = {
|
|
|
183
281
|
modelValue: '',
|
|
184
282
|
required: true,
|
|
185
283
|
outlined: true,
|
|
186
|
-
outlinedIndicatif: true,
|
|
187
284
|
withCountryCode: true,
|
|
188
|
-
countryCodeRequired: true,
|
|
189
285
|
displayFormat: 'code',
|
|
190
286
|
customIndicatifs: [],
|
|
191
287
|
useCustomIndicatifsOnly: false,
|
|
192
|
-
|
|
288
|
+
isValidateOnBlur: true,
|
|
193
289
|
bgColor: 'white',
|
|
194
290
|
readonly: false,
|
|
195
291
|
disabled: false,
|
|
196
|
-
},
|
|
292
|
+
} as Record<string, unknown>,
|
|
197
293
|
render: (args) => {
|
|
198
294
|
return {
|
|
199
295
|
components: { PhoneField },
|
|
@@ -220,7 +316,7 @@ export const RequiredWithAsterisk: Story = {
|
|
|
220
316
|
required: true,
|
|
221
317
|
displayAsterisk: true,
|
|
222
318
|
bgColor: 'white',
|
|
223
|
-
},
|
|
319
|
+
} as Record<string, unknown>,
|
|
224
320
|
parameters: {
|
|
225
321
|
a11y: {
|
|
226
322
|
disable: false,
|
|
@@ -301,7 +397,7 @@ export const HelpText: Story = {
|
|
|
301
397
|
<h4 class="mb-2">Avec aide à la saisie et indicatif pays</h4>
|
|
302
398
|
<PhoneField
|
|
303
399
|
v-model="phoneValue2"
|
|
304
|
-
v-model:
|
|
400
|
+
v-model:dialCodeModel="dialCodeModel"
|
|
305
401
|
required
|
|
306
402
|
with-country-code
|
|
307
403
|
help-text="Choisissez votre pays et saisissez votre numéro de téléphone"
|
|
@@ -316,7 +412,7 @@ export const HelpText: Story = {
|
|
|
316
412
|
<h4>Valeurs actuelles :</h4>
|
|
317
413
|
<pre class="text-caption">phoneValue1: {{ phoneValue1 }}</pre>
|
|
318
414
|
<pre class="text-caption">phoneValue2: {{ phoneValue2 }}</pre>
|
|
319
|
-
<pre class="text-caption">
|
|
415
|
+
<pre class="text-caption">dialCodeModel: {{ dialCodeModel }}</pre>
|
|
320
416
|
</div>
|
|
321
417
|
</div>
|
|
322
418
|
</template>`,
|
|
@@ -329,7 +425,7 @@ import PhoneField from './PhoneField.vue'
|
|
|
329
425
|
|
|
330
426
|
const phoneValue1 = ref('')
|
|
331
427
|
const phoneValue2 = ref('')
|
|
332
|
-
const
|
|
428
|
+
const dialCodeModel = ref('')
|
|
333
429
|
</script>`,
|
|
334
430
|
},
|
|
335
431
|
],
|
|
@@ -337,20 +433,20 @@ const selectedDialCode = ref('')
|
|
|
337
433
|
args: {
|
|
338
434
|
required: true,
|
|
339
435
|
helpText: 'Saisissez votre numéro de téléphone français au format 01 23 45 67 89',
|
|
340
|
-
},
|
|
436
|
+
} as Record<string, unknown>,
|
|
341
437
|
render(args) {
|
|
342
438
|
return {
|
|
343
439
|
components: { PhoneField },
|
|
344
440
|
setup() {
|
|
345
441
|
const phoneValue1 = ref('')
|
|
346
442
|
const phoneValue2 = ref('')
|
|
347
|
-
const
|
|
443
|
+
const dialCodeModel = ref('')
|
|
348
444
|
|
|
349
445
|
return {
|
|
350
446
|
args,
|
|
351
447
|
phoneValue1,
|
|
352
448
|
phoneValue2,
|
|
353
|
-
|
|
449
|
+
dialCodeModel,
|
|
354
450
|
}
|
|
355
451
|
},
|
|
356
452
|
template: `
|
|
@@ -373,7 +469,7 @@ const selectedDialCode = ref('')
|
|
|
373
469
|
<h4 class="mb-2">Avec aide à la saisie et indicatif pays</h4>
|
|
374
470
|
<PhoneField
|
|
375
471
|
v-model="phoneValue2"
|
|
376
|
-
v-model:
|
|
472
|
+
v-model:dialCodeModel="dialCodeModel"
|
|
377
473
|
required
|
|
378
474
|
with-country-code
|
|
379
475
|
help-text="Choisissez votre pays et saisissez votre numéro de téléphone"
|
|
@@ -388,7 +484,7 @@ const selectedDialCode = ref('')
|
|
|
388
484
|
<h4>Valeurs actuelles :</h4>
|
|
389
485
|
<pre class="text-caption">phoneValue1: {{ phoneValue1 }}</pre>
|
|
390
486
|
<pre class="text-caption">phoneValue2: {{ phoneValue2 }}</pre>
|
|
391
|
-
<pre class="text-caption">
|
|
487
|
+
<pre class="text-caption">dialCodeModel: {{ dialCodeModel }}</pre>
|
|
392
488
|
</div>
|
|
393
489
|
</div>
|
|
394
490
|
`,
|
|
@@ -429,7 +525,7 @@ Les attributs \`autocomplete\` permettent aux navigateurs et aux outils d'assist
|
|
|
429
525
|
<h4 class="mb-2">Avec indicatif pays (autocomplete="tel-country-code")</h4>
|
|
430
526
|
<PhoneField
|
|
431
527
|
v-model="phoneValue1"
|
|
432
|
-
v-model:
|
|
528
|
+
v-model:dialCodeModel="dialCodeModel1"
|
|
433
529
|
required
|
|
434
530
|
with-country-code
|
|
435
531
|
autocomplete-country-code="tel-country-code"
|
|
@@ -464,7 +560,7 @@ Les attributs \`autocomplete\` permettent aux navigateurs et aux outils d'assist
|
|
|
464
560
|
<div class="mt-4">
|
|
465
561
|
<h4>Valeurs actuelles :</h4>
|
|
466
562
|
<pre class="text-caption">phoneValue1: {{ phoneValue1 }}</pre>
|
|
467
|
-
<pre class="text-caption">
|
|
563
|
+
<pre class="text-caption">dialCodeModel1: {{ dialCodeModel1 }}</pre>
|
|
468
564
|
<pre class="text-caption">phoneValue2: {{ phoneValue2 }}</pre>
|
|
469
565
|
<pre class="text-caption">phoneValue3: {{ phoneValue3 }}</pre>
|
|
470
566
|
</div>
|
|
@@ -478,7 +574,7 @@ import { ref } from 'vue'
|
|
|
478
574
|
import PhoneField from './PhoneField.vue'
|
|
479
575
|
|
|
480
576
|
const phoneValue1 = ref('')
|
|
481
|
-
const
|
|
577
|
+
const dialCodeModel1 = ref('')
|
|
482
578
|
const phoneValue2 = ref('')
|
|
483
579
|
const phoneValue3 = ref('')
|
|
484
580
|
</script>`,
|
|
@@ -491,20 +587,20 @@ const phoneValue3 = ref('')
|
|
|
491
587
|
autocompleteCountryCode: 'tel-country-code',
|
|
492
588
|
autocompletePhone: 'tel-national',
|
|
493
589
|
helpText: 'Utilisez les valeurs autocomplete appropriées pour l\'accessibilité',
|
|
494
|
-
},
|
|
590
|
+
} as Record<string, unknown>,
|
|
495
591
|
render(args) {
|
|
496
592
|
return {
|
|
497
593
|
components: { PhoneField },
|
|
498
594
|
setup() {
|
|
499
595
|
const phoneValue1 = ref('')
|
|
500
|
-
const
|
|
596
|
+
const dialCodeModel1 = ref('')
|
|
501
597
|
const phoneValue2 = ref('')
|
|
502
598
|
const phoneValue3 = ref('')
|
|
503
599
|
|
|
504
600
|
return {
|
|
505
601
|
args,
|
|
506
602
|
phoneValue1,
|
|
507
|
-
|
|
603
|
+
dialCodeModel1,
|
|
508
604
|
phoneValue2,
|
|
509
605
|
phoneValue3,
|
|
510
606
|
}
|
|
@@ -520,7 +616,7 @@ const phoneValue3 = ref('')
|
|
|
520
616
|
<h4 class="mb-2">Avec indicatif pays (autocomplete="tel-country-code")</h4>
|
|
521
617
|
<PhoneField
|
|
522
618
|
v-model="phoneValue1"
|
|
523
|
-
v-model:
|
|
619
|
+
v-model:dialCodeModel="dialCodeModel1"
|
|
524
620
|
required
|
|
525
621
|
with-country-code
|
|
526
622
|
autocomplete-country-code="tel-country-code"
|
|
@@ -555,7 +651,7 @@ const phoneValue3 = ref('')
|
|
|
555
651
|
<div class="mt-4">
|
|
556
652
|
<h4>Valeurs actuelles :</h4>
|
|
557
653
|
<pre class="text-caption">phoneValue1: {{ phoneValue1 }}</pre>
|
|
558
|
-
<pre class="text-caption">
|
|
654
|
+
<pre class="text-caption">dialCodeModel1: {{ dialCodeModel1 }}</pre>
|
|
559
655
|
<pre class="text-caption">phoneValue2: {{ phoneValue2 }}</pre>
|
|
560
656
|
<pre class="text-caption">phoneValue3: {{ phoneValue3 }}</pre>
|
|
561
657
|
</div>
|
|
@@ -579,11 +675,10 @@ export const CustomIndicatifs: Story = {
|
|
|
579
675
|
v-model="modelValue"
|
|
580
676
|
:required="required"
|
|
581
677
|
:withCountryCode="withCountryCode"
|
|
582
|
-
:countryCodeRequired="countryCodeRequired"
|
|
583
678
|
:displayFormat="displayFormat"
|
|
584
679
|
:customIndicatifs="customIndicatifs"
|
|
585
680
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
586
|
-
:
|
|
681
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
587
682
|
/>
|
|
588
683
|
</template>
|
|
589
684
|
`,
|
|
@@ -597,7 +692,6 @@ export const CustomIndicatifs: Story = {
|
|
|
597
692
|
const modelValue = ref('')
|
|
598
693
|
const required = ref(true)
|
|
599
694
|
const withCountryCode = ref(true)
|
|
600
|
-
const countryCodeRequired = ref(true)
|
|
601
695
|
const displayFormat = ref('code')
|
|
602
696
|
const customIndicatifs = [
|
|
603
697
|
{ code: '+33', country: 'France', abbreviation: 'FR', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
@@ -606,7 +700,7 @@ export const CustomIndicatifs: Story = {
|
|
|
606
700
|
{ code: '+198', country: 'Paradise', abbreviation: 'PA', mask: '## ## ## ##', phoneLength: 10 },
|
|
607
701
|
]
|
|
608
702
|
const useCustomIndicatifsOnly = ref(false)
|
|
609
|
-
const
|
|
703
|
+
const isValidateOnBlur = ref(true)
|
|
610
704
|
</script>
|
|
611
705
|
`,
|
|
612
706
|
},
|
|
@@ -616,9 +710,7 @@ export const CustomIndicatifs: Story = {
|
|
|
616
710
|
modelValue: '',
|
|
617
711
|
required: false,
|
|
618
712
|
outlined: true,
|
|
619
|
-
outlinedIndicatif: true,
|
|
620
713
|
withCountryCode: true,
|
|
621
|
-
countryCodeRequired: false,
|
|
622
714
|
displayFormat: 'code',
|
|
623
715
|
customIndicatifs: [
|
|
624
716
|
{ code: '+33', country: 'France', abbreviation: 'FR', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
@@ -627,11 +719,10 @@ export const CustomIndicatifs: Story = {
|
|
|
627
719
|
{ code: '+98', country: 'Paradise', abbreviation: 'PA', mask: '## ## ## ##', phoneLength: 18 },
|
|
628
720
|
],
|
|
629
721
|
useCustomIndicatifsOnly: true,
|
|
630
|
-
isValidatedOnBlur: true,
|
|
631
722
|
bgColor: 'white',
|
|
632
723
|
readonly: false,
|
|
633
724
|
disabled: false,
|
|
634
|
-
},
|
|
725
|
+
} as Record<string, unknown>,
|
|
635
726
|
render: (args) => {
|
|
636
727
|
return {
|
|
637
728
|
components: { PhoneField },
|
|
@@ -649,80 +740,6 @@ export const CustomIndicatifs: Story = {
|
|
|
649
740
|
},
|
|
650
741
|
}
|
|
651
742
|
|
|
652
|
-
export const NotValidatedOnBlur: Story = {
|
|
653
|
-
parameters: {
|
|
654
|
-
a11y: {
|
|
655
|
-
disable: false,
|
|
656
|
-
},
|
|
657
|
-
sourceCode: [
|
|
658
|
-
{
|
|
659
|
-
name: 'Template',
|
|
660
|
-
code: `
|
|
661
|
-
<template>
|
|
662
|
-
<PhoneField
|
|
663
|
-
v-bind="args"
|
|
664
|
-
:required="required"
|
|
665
|
-
:withCountryCode="withCountryCode"
|
|
666
|
-
:countryCodeRequired="countryCodeRequired"
|
|
667
|
-
:displayFormat="displayFormat"
|
|
668
|
-
:customIndicatifs="customIndicatifs"
|
|
669
|
-
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
670
|
-
:isValidatedOnBlur="isValidatedOnBlur"
|
|
671
|
-
/>
|
|
672
|
-
</template>
|
|
673
|
-
`,
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
name: 'Script',
|
|
677
|
-
code: `
|
|
678
|
-
<script setup lang="ts">
|
|
679
|
-
import { PhoneField } from '@cnamts/synapse'
|
|
680
|
-
|
|
681
|
-
const modelValue = ref('')
|
|
682
|
-
const required = ref(true)
|
|
683
|
-
const withCountryCode = ref(true)
|
|
684
|
-
const countryCodeRequired = ref(true)
|
|
685
|
-
const displayFormat = ref('code')
|
|
686
|
-
const customIndicatifs = ref([])
|
|
687
|
-
const useCustomIndicatifsOnly = ref(false)
|
|
688
|
-
const isValidatedOnBlur = ref(false)
|
|
689
|
-
</script>
|
|
690
|
-
`,
|
|
691
|
-
},
|
|
692
|
-
],
|
|
693
|
-
},
|
|
694
|
-
args: {
|
|
695
|
-
modelValue: '',
|
|
696
|
-
required: false,
|
|
697
|
-
outlined: true,
|
|
698
|
-
outlinedIndicatif: true,
|
|
699
|
-
withCountryCode: true,
|
|
700
|
-
countryCodeRequired: false,
|
|
701
|
-
displayFormat: 'code',
|
|
702
|
-
customIndicatifs: [],
|
|
703
|
-
useCustomIndicatifsOnly: false,
|
|
704
|
-
isValidatedOnBlur: false,
|
|
705
|
-
readonly: false,
|
|
706
|
-
disabled: false,
|
|
707
|
-
bgColor: 'white',
|
|
708
|
-
},
|
|
709
|
-
render: (args) => {
|
|
710
|
-
return {
|
|
711
|
-
components: { PhoneField },
|
|
712
|
-
setup() {
|
|
713
|
-
return { args }
|
|
714
|
-
},
|
|
715
|
-
template: `
|
|
716
|
-
<div class="pa-4">
|
|
717
|
-
<PhoneField
|
|
718
|
-
v-bind="args"
|
|
719
|
-
/>
|
|
720
|
-
</div>
|
|
721
|
-
`,
|
|
722
|
-
}
|
|
723
|
-
},
|
|
724
|
-
}
|
|
725
|
-
|
|
726
743
|
export const DisplayFormatCode: Story = {
|
|
727
744
|
parameters: {
|
|
728
745
|
a11y: {
|
|
@@ -737,11 +754,10 @@ export const DisplayFormatCode: Story = {
|
|
|
737
754
|
v-model="modelValue"
|
|
738
755
|
:required="required"
|
|
739
756
|
:withCountryCode="withCountryCode"
|
|
740
|
-
:countryCodeRequired="countryCodeRequired"
|
|
741
757
|
:displayFormat="displayFormat"
|
|
742
758
|
:customIndicatifs="customIndicatifs"
|
|
743
759
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
744
|
-
:
|
|
760
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
745
761
|
/>
|
|
746
762
|
</template>
|
|
747
763
|
`,
|
|
@@ -755,11 +771,10 @@ export const DisplayFormatCode: Story = {
|
|
|
755
771
|
const modelValue = ref('')
|
|
756
772
|
const required = ref(true)
|
|
757
773
|
const withCountryCode = ref(true)
|
|
758
|
-
const countryCodeRequired = ref(true)
|
|
759
774
|
const displayFormat = ref('code')
|
|
760
775
|
const customIndicatifs = ref([])
|
|
761
776
|
const useCustomIndicatifsOnly = ref(false)
|
|
762
|
-
const
|
|
777
|
+
const isValidateOnBlur = ref(true)
|
|
763
778
|
</script>
|
|
764
779
|
`,
|
|
765
780
|
},
|
|
@@ -769,17 +784,15 @@ export const DisplayFormatCode: Story = {
|
|
|
769
784
|
modelValue: '',
|
|
770
785
|
required: false,
|
|
771
786
|
outlined: true,
|
|
772
|
-
outlinedIndicatif: true,
|
|
773
787
|
withCountryCode: true,
|
|
774
|
-
countryCodeRequired: false,
|
|
775
788
|
displayFormat: 'code',
|
|
776
789
|
customIndicatifs: [],
|
|
777
790
|
useCustomIndicatifsOnly: false,
|
|
778
|
-
|
|
791
|
+
isValidateOnBlur: true,
|
|
779
792
|
readonly: false,
|
|
780
793
|
disabled: false,
|
|
781
794
|
bgColor: 'white',
|
|
782
|
-
},
|
|
795
|
+
} as Record<string, unknown>,
|
|
783
796
|
render: (args) => {
|
|
784
797
|
return {
|
|
785
798
|
components: { PhoneField },
|
|
@@ -811,11 +824,10 @@ export const DisplayFormatCodeAbbreviation: Story = {
|
|
|
811
824
|
v-model="modelValue"
|
|
812
825
|
:required="required"
|
|
813
826
|
:withCountryCode="withCountryCode"
|
|
814
|
-
:countryCodeRequired="countryCodeRequired"
|
|
815
827
|
:displayFormat="displayFormat"
|
|
816
828
|
:customIndicatifs="customIndicatifs"
|
|
817
829
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
818
|
-
:
|
|
830
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
819
831
|
/>
|
|
820
832
|
</template>
|
|
821
833
|
`,
|
|
@@ -829,11 +841,10 @@ export const DisplayFormatCodeAbbreviation: Story = {
|
|
|
829
841
|
const modelValue = ref('')
|
|
830
842
|
const required = ref(true)
|
|
831
843
|
const withCountryCode = ref(true)
|
|
832
|
-
const countryCodeRequired = ref(true)
|
|
833
844
|
const displayFormat = ref('code-abbreviation')
|
|
834
845
|
const customIndicatifs = ref([])
|
|
835
846
|
const useCustomIndicatifsOnly = ref(false)
|
|
836
|
-
const
|
|
847
|
+
const isValidateOnBlur = ref(true)
|
|
837
848
|
</script>
|
|
838
849
|
`,
|
|
839
850
|
},
|
|
@@ -843,17 +854,15 @@ export const DisplayFormatCodeAbbreviation: Story = {
|
|
|
843
854
|
modelValue: '',
|
|
844
855
|
required: false,
|
|
845
856
|
outlined: true,
|
|
846
|
-
outlinedIndicatif: true,
|
|
847
857
|
withCountryCode: true,
|
|
848
|
-
countryCodeRequired: false,
|
|
849
858
|
displayFormat: 'code-abbreviation',
|
|
850
859
|
customIndicatifs: [],
|
|
851
860
|
useCustomIndicatifsOnly: false,
|
|
852
|
-
|
|
861
|
+
isValidateOnBlur: true,
|
|
853
862
|
readonly: false,
|
|
854
863
|
disabled: false,
|
|
855
864
|
bgColor: 'white',
|
|
856
|
-
},
|
|
865
|
+
} as Record<string, unknown>,
|
|
857
866
|
render: (args) => {
|
|
858
867
|
return {
|
|
859
868
|
components: { PhoneField },
|
|
@@ -885,11 +894,10 @@ export const DisplayFormatCodeCountry: Story = {
|
|
|
885
894
|
v-model="modelValue"
|
|
886
895
|
:required="required"
|
|
887
896
|
:withCountryCode="withCountryCode"
|
|
888
|
-
:countryCodeRequired="countryCodeRequired"
|
|
889
897
|
:displayFormat="displayFormat"
|
|
890
898
|
:customIndicatifs="customIndicatifs"
|
|
891
899
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
892
|
-
:
|
|
900
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
893
901
|
/>
|
|
894
902
|
</template>
|
|
895
903
|
`,
|
|
@@ -903,11 +911,10 @@ export const DisplayFormatCodeCountry: Story = {
|
|
|
903
911
|
const modelValue = ref('')
|
|
904
912
|
const required = ref(true)
|
|
905
913
|
const withCountryCode = ref(true)
|
|
906
|
-
const countryCodeRequired = ref(true)
|
|
907
914
|
const displayFormat = ref('code-country')
|
|
908
915
|
const customIndicatifs = ref([])
|
|
909
916
|
const useCustomIndicatifsOnly = ref(false)
|
|
910
|
-
const
|
|
917
|
+
const isValidateOnBlur = ref(true)
|
|
911
918
|
</script>
|
|
912
919
|
`,
|
|
913
920
|
},
|
|
@@ -917,17 +924,15 @@ export const DisplayFormatCodeCountry: Story = {
|
|
|
917
924
|
modelValue: '',
|
|
918
925
|
required: false,
|
|
919
926
|
outlined: true,
|
|
920
|
-
outlinedIndicatif: true,
|
|
921
927
|
withCountryCode: true,
|
|
922
|
-
countryCodeRequired: false,
|
|
923
928
|
displayFormat: 'code-country',
|
|
924
929
|
customIndicatifs: [],
|
|
925
930
|
useCustomIndicatifsOnly: false,
|
|
926
|
-
|
|
931
|
+
isValidateOnBlur: true,
|
|
927
932
|
readonly: false,
|
|
928
933
|
disabled: false,
|
|
929
934
|
bgColor: 'white',
|
|
930
|
-
},
|
|
935
|
+
} as Record<string, unknown>,
|
|
931
936
|
render: (args) => {
|
|
932
937
|
return {
|
|
933
938
|
components: { PhoneField },
|
|
@@ -959,11 +964,10 @@ export const DisplayFormatCountry: Story = {
|
|
|
959
964
|
v-model="modelValue"
|
|
960
965
|
:required="required"
|
|
961
966
|
:withCountryCode="withCountryCode"
|
|
962
|
-
:countryCodeRequired="countryCodeRequired"
|
|
963
967
|
:displayFormat="displayFormat"
|
|
964
968
|
:customIndicatifs="customIndicatifs"
|
|
965
969
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
966
|
-
:
|
|
970
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
967
971
|
/>
|
|
968
972
|
</template>
|
|
969
973
|
`,
|
|
@@ -977,11 +981,10 @@ export const DisplayFormatCountry: Story = {
|
|
|
977
981
|
const modelValue = ref('')
|
|
978
982
|
const required = ref(true)
|
|
979
983
|
const withCountryCode = ref(true)
|
|
980
|
-
const countryCodeRequired = ref(true)
|
|
981
984
|
const displayFormat = ref('country')
|
|
982
985
|
const customIndicatifs = ref([])
|
|
983
986
|
const useCustomIndicatifsOnly = ref(false)
|
|
984
|
-
const
|
|
987
|
+
const isValidateOnBlur = ref(true)
|
|
985
988
|
</script>
|
|
986
989
|
`,
|
|
987
990
|
},
|
|
@@ -991,17 +994,15 @@ export const DisplayFormatCountry: Story = {
|
|
|
991
994
|
modelValue: '',
|
|
992
995
|
required: false,
|
|
993
996
|
outlined: true,
|
|
994
|
-
outlinedIndicatif: true,
|
|
995
997
|
withCountryCode: true,
|
|
996
|
-
countryCodeRequired: false,
|
|
997
998
|
displayFormat: 'country',
|
|
998
999
|
customIndicatifs: [],
|
|
999
1000
|
useCustomIndicatifsOnly: false,
|
|
1000
|
-
|
|
1001
|
+
isValidateOnBlur: true,
|
|
1001
1002
|
readonly: false,
|
|
1002
1003
|
disabled: false,
|
|
1003
1004
|
bgColor: 'white',
|
|
1004
|
-
},
|
|
1005
|
+
} as Record<string, unknown>,
|
|
1005
1006
|
render: (args) => {
|
|
1006
1007
|
return {
|
|
1007
1008
|
components: { PhoneField },
|
|
@@ -1033,11 +1034,10 @@ export const DisplayFormatAbbreviation: Story = {
|
|
|
1033
1034
|
v-model="modelValue"
|
|
1034
1035
|
:required="required"
|
|
1035
1036
|
:withCountryCode="withCountryCode"
|
|
1036
|
-
:countryCodeRequired="countryCodeRequired"
|
|
1037
1037
|
:displayFormat="displayFormat"
|
|
1038
1038
|
:customIndicatifs="customIndicatifs"
|
|
1039
1039
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
1040
|
-
:
|
|
1040
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
1041
1041
|
/>
|
|
1042
1042
|
</template>
|
|
1043
1043
|
`,
|
|
@@ -1051,11 +1051,10 @@ export const DisplayFormatAbbreviation: Story = {
|
|
|
1051
1051
|
const modelValue = ref('')
|
|
1052
1052
|
const required = ref(true)
|
|
1053
1053
|
const withCountryCode = ref(true)
|
|
1054
|
-
const countryCodeRequired = ref(true)
|
|
1055
1054
|
const displayFormat = ref('abbreviation')
|
|
1056
1055
|
const customIndicatifs = ref([])
|
|
1057
1056
|
const useCustomIndicatifsOnly = ref(false)
|
|
1058
|
-
const
|
|
1057
|
+
const isValidateOnBlur = ref(true)
|
|
1059
1058
|
</script>
|
|
1060
1059
|
`,
|
|
1061
1060
|
},
|
|
@@ -1065,17 +1064,15 @@ export const DisplayFormatAbbreviation: Story = {
|
|
|
1065
1064
|
modelValue: '',
|
|
1066
1065
|
required: false,
|
|
1067
1066
|
outlined: true,
|
|
1068
|
-
outlinedIndicatif: true,
|
|
1069
1067
|
withCountryCode: true,
|
|
1070
|
-
countryCodeRequired: false,
|
|
1071
1068
|
displayFormat: 'abbreviation',
|
|
1072
1069
|
customIndicatifs: [],
|
|
1073
1070
|
useCustomIndicatifsOnly: false,
|
|
1074
|
-
|
|
1071
|
+
isValidateOnBlur: true,
|
|
1075
1072
|
readonly: false,
|
|
1076
1073
|
disabled: false,
|
|
1077
1074
|
bgColor: 'white',
|
|
1078
|
-
},
|
|
1075
|
+
} as Record<string, unknown>,
|
|
1079
1076
|
render: (args) => {
|
|
1080
1077
|
return {
|
|
1081
1078
|
components: { PhoneField },
|
|
@@ -1108,11 +1105,10 @@ export const DefaultDialCode: Story = {
|
|
|
1108
1105
|
:dial-code-model="dialCodeModel"
|
|
1109
1106
|
:required="required"
|
|
1110
1107
|
:withCountryCode="withCountryCode"
|
|
1111
|
-
:countryCodeRequired="countryCodeRequired"
|
|
1112
1108
|
:displayFormat="displayFormat"
|
|
1113
1109
|
:customIndicatifs="customIndicatifs"
|
|
1114
1110
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
1115
|
-
:
|
|
1111
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
1116
1112
|
/>
|
|
1117
1113
|
</template>
|
|
1118
1114
|
`,
|
|
@@ -1138,10 +1134,9 @@ export const DefaultDialCode: Story = {
|
|
|
1138
1134
|
|
|
1139
1135
|
const required = ref(true)
|
|
1140
1136
|
const withCountryCode = ref(true)
|
|
1141
|
-
const countryCodeRequired = ref(true)
|
|
1142
1137
|
const displayFormat = ref('code-country')
|
|
1143
1138
|
const useCustomIndicatifsOnly = ref(true)
|
|
1144
|
-
const
|
|
1139
|
+
const isValidateOnBlur = ref(true)
|
|
1145
1140
|
</script>
|
|
1146
1141
|
`,
|
|
1147
1142
|
},
|
|
@@ -1152,9 +1147,7 @@ export const DefaultDialCode: Story = {
|
|
|
1152
1147
|
dialCodeModel: { code: '+3433', country: 'Exemple', abbreviation: 'EX', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
1153
1148
|
required: false,
|
|
1154
1149
|
outlined: true,
|
|
1155
|
-
outlinedIndicatif: true,
|
|
1156
1150
|
withCountryCode: true,
|
|
1157
|
-
countryCodeRequired: true,
|
|
1158
1151
|
displayFormat: 'code-country',
|
|
1159
1152
|
customIndicatifs: [
|
|
1160
1153
|
{ code: '+3433', country: 'Exemple', abbreviation: 'EX', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
@@ -1162,11 +1155,11 @@ export const DefaultDialCode: Story = {
|
|
|
1162
1155
|
{ code: '+41', country: 'Suisse', abbreviation: 'CH', phoneLength: 9, mask: '### ### ###' },
|
|
1163
1156
|
],
|
|
1164
1157
|
useCustomIndicatifsOnly: true,
|
|
1165
|
-
|
|
1158
|
+
isValidateOnBlur: true,
|
|
1166
1159
|
bgColor: 'white',
|
|
1167
1160
|
readonly: false,
|
|
1168
1161
|
disabled: false,
|
|
1169
|
-
},
|
|
1162
|
+
} as Record<string, unknown>,
|
|
1170
1163
|
render: (args) => {
|
|
1171
1164
|
return {
|
|
1172
1165
|
components: { PhoneField },
|
|
@@ -1231,17 +1224,15 @@ export const DefaultDialCodeStandard: Story = {
|
|
|
1231
1224
|
dialCodeModel: indicatifs.find(ind => ind.country === 'France'),
|
|
1232
1225
|
required: false,
|
|
1233
1226
|
outlined: true,
|
|
1234
|
-
outlinedIndicatif: true,
|
|
1235
1227
|
withCountryCode: true,
|
|
1236
|
-
countryCodeRequired: true,
|
|
1237
1228
|
displayFormat: 'code-country',
|
|
1238
1229
|
customIndicatifs: [],
|
|
1239
1230
|
useCustomIndicatifsOnly: false,
|
|
1240
|
-
|
|
1231
|
+
isValidateOnBlur: true,
|
|
1241
1232
|
bgColor: 'white',
|
|
1242
1233
|
readonly: false,
|
|
1243
1234
|
disabled: false,
|
|
1244
|
-
},
|
|
1235
|
+
} as Record<string, unknown>,
|
|
1245
1236
|
render: (args) => {
|
|
1246
1237
|
return {
|
|
1247
1238
|
components: { PhoneField },
|
|
@@ -1275,18 +1266,17 @@ export const DisplayModels: Story = {
|
|
|
1275
1266
|
code: `
|
|
1276
1267
|
<template>
|
|
1277
1268
|
<span>
|
|
1278
|
-
Indicatif: {{
|
|
1269
|
+
Indicatif: {{ dialCodeModel }}<br/>Numéro: {{ modelValue }}
|
|
1279
1270
|
</span>
|
|
1280
1271
|
<PhoneField
|
|
1281
1272
|
v-model="modelValue"
|
|
1282
|
-
v-model:
|
|
1273
|
+
v-model:dialCodeModel="dialCodeModel"
|
|
1283
1274
|
:required="required"
|
|
1284
1275
|
:withCountryCode="withCountryCode"
|
|
1285
|
-
:countryCodeRequired="countryCodeRequired"
|
|
1286
1276
|
:displayFormat="displayFormat"
|
|
1287
1277
|
:customIndicatifs="customIndicatifs"
|
|
1288
1278
|
:useCustomIndicatifsOnly="useCustomIndicatifsOnly"
|
|
1289
|
-
:
|
|
1279
|
+
:isValidateOnBlur="isValidateOnBlur"
|
|
1290
1280
|
/>
|
|
1291
1281
|
</template>
|
|
1292
1282
|
`,
|
|
@@ -1298,14 +1288,13 @@ export const DisplayModels: Story = {
|
|
|
1298
1288
|
import { PhoneField } from '@cnamts/synapse'
|
|
1299
1289
|
|
|
1300
1290
|
const modelValue = ref('')
|
|
1301
|
-
const
|
|
1291
|
+
const dialCodeModel = ref('')
|
|
1302
1292
|
const required = ref(true)
|
|
1303
1293
|
const withCountryCode = ref(true)
|
|
1304
|
-
const countryCodeRequired = ref(true)
|
|
1305
1294
|
const displayFormat = ref('code-country')
|
|
1306
1295
|
const customIndicatifs = ref([])
|
|
1307
1296
|
const useCustomIndicatifsOnly = ref(false)
|
|
1308
|
-
const
|
|
1297
|
+
const isValidateOnBlur = ref(true)
|
|
1309
1298
|
</script>
|
|
1310
1299
|
`,
|
|
1311
1300
|
},
|
|
@@ -1316,64 +1305,59 @@ export const DisplayModels: Story = {
|
|
|
1316
1305
|
dialCodeModel: '',
|
|
1317
1306
|
required: false,
|
|
1318
1307
|
outlined: true,
|
|
1319
|
-
outlinedIndicatif: true,
|
|
1320
1308
|
withCountryCode: true,
|
|
1321
|
-
countryCodeRequired: false,
|
|
1322
1309
|
displayFormat: 'code-country',
|
|
1323
1310
|
customIndicatifs: [],
|
|
1324
1311
|
useCustomIndicatifsOnly: false,
|
|
1325
|
-
|
|
1312
|
+
isValidateOnBlur: true,
|
|
1326
1313
|
readonly: false,
|
|
1327
1314
|
bgColor: 'white',
|
|
1328
|
-
},
|
|
1315
|
+
} as Record<string, unknown>,
|
|
1329
1316
|
render: args => ({
|
|
1330
1317
|
components: { PhoneField },
|
|
1331
1318
|
setup() {
|
|
1332
|
-
const
|
|
1333
|
-
const
|
|
1319
|
+
const _args = args as Record<string, unknown>
|
|
1320
|
+
const modelValue = ref(_args.modelValue as string)
|
|
1321
|
+
const dialCodeModel = ref(_args.dialCodeModel)
|
|
1334
1322
|
|
|
1335
1323
|
// Sync ref -> args (pour afficher les modèles dans la story)
|
|
1336
1324
|
watch(modelValue, (val) => {
|
|
1337
|
-
|
|
1325
|
+
_args.modelValue = val
|
|
1338
1326
|
})
|
|
1339
|
-
watch(
|
|
1340
|
-
|
|
1327
|
+
watch(dialCodeModel, (val) => {
|
|
1328
|
+
_args.dialCodeModel = val
|
|
1341
1329
|
})
|
|
1342
1330
|
// Sync args -> ref (quand on change les controls Storybook)
|
|
1343
|
-
watch(() =>
|
|
1344
|
-
modelValue.value = val
|
|
1331
|
+
watch(() => _args.modelValue, (val) => {
|
|
1332
|
+
modelValue.value = val as string
|
|
1345
1333
|
})
|
|
1346
|
-
watch(() =>
|
|
1347
|
-
|
|
1334
|
+
watch(() => _args.dialCodeModel, (val) => {
|
|
1335
|
+
dialCodeModel.value = val
|
|
1348
1336
|
})
|
|
1349
1337
|
|
|
1350
1338
|
return {
|
|
1351
1339
|
args,
|
|
1352
1340
|
modelValue,
|
|
1353
|
-
|
|
1341
|
+
dialCodeModel,
|
|
1354
1342
|
}
|
|
1355
1343
|
},
|
|
1356
1344
|
template: `
|
|
1357
1345
|
<div class="pa-4">
|
|
1358
1346
|
<div class="pa-4">
|
|
1359
|
-
Indicatif: {{
|
|
1347
|
+
Indicatif: {{ dialCodeModel }}<br/>Numéro: {{ modelValue }}
|
|
1360
1348
|
</div>
|
|
1361
1349
|
|
|
1362
1350
|
<PhoneField
|
|
1363
1351
|
v-bind="args"
|
|
1364
1352
|
v-model="modelValue"
|
|
1365
|
-
v-model:
|
|
1353
|
+
v-model:dialCodeModel="dialCodeModel"
|
|
1366
1354
|
/>
|
|
1367
1355
|
</div>
|
|
1368
1356
|
`,
|
|
1369
1357
|
}),
|
|
1370
1358
|
}
|
|
1371
1359
|
|
|
1372
|
-
|
|
1373
|
-
* Story qui montre le comportement du composant lorsque la gestion des erreurs est désactivée.
|
|
1374
|
-
* Aucun message d'erreur ne sera affiché, même si le champ est requis et vide.
|
|
1375
|
-
*/
|
|
1376
|
-
export const DisabledErrorHandling: Story = {
|
|
1360
|
+
export const WithoutFieldset: Story = {
|
|
1377
1361
|
parameters: {
|
|
1378
1362
|
a11y: {
|
|
1379
1363
|
disable: false,
|
|
@@ -1382,206 +1366,39 @@ export const DisabledErrorHandling: Story = {
|
|
|
1382
1366
|
{
|
|
1383
1367
|
name: 'Template',
|
|
1384
1368
|
code: `
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
/>
|
|
1395
|
-
</template>
|
|
1396
|
-
`,
|
|
1369
|
+
<template>
|
|
1370
|
+
<PhoneField
|
|
1371
|
+
v-model="phoneNumber"
|
|
1372
|
+
required
|
|
1373
|
+
label="Numéro de téléphone"
|
|
1374
|
+
without-fieldset
|
|
1375
|
+
/>
|
|
1376
|
+
</template>
|
|
1377
|
+
`,
|
|
1397
1378
|
},
|
|
1398
1379
|
{
|
|
1399
1380
|
name: 'Script',
|
|
1400
1381
|
code: `
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
const modelValue = ref('')
|
|
1405
|
-
const required = ref(true)
|
|
1406
|
-
const withCountryCode = ref(true)
|
|
1407
|
-
const countryCodeRequired = ref(true)
|
|
1408
|
-
const displayFormat = ref('code')
|
|
1409
|
-
const isValidatedOnBlur = ref(true)
|
|
1410
|
-
const disableErrorHandling = ref(true)
|
|
1411
|
-
</script>
|
|
1412
|
-
`,
|
|
1413
|
-
},
|
|
1414
|
-
],
|
|
1415
|
-
},
|
|
1416
|
-
args: {
|
|
1417
|
-
modelValue: '',
|
|
1418
|
-
required: true,
|
|
1419
|
-
outlined: true,
|
|
1420
|
-
outlinedIndicatif: true,
|
|
1421
|
-
withCountryCode: true,
|
|
1422
|
-
countryCodeRequired: true,
|
|
1423
|
-
displayFormat: 'code',
|
|
1424
|
-
customIndicatifs: [],
|
|
1425
|
-
useCustomIndicatifsOnly: false,
|
|
1426
|
-
isValidatedOnBlur: true,
|
|
1427
|
-
disableErrorHandling: true,
|
|
1428
|
-
readonly: false,
|
|
1429
|
-
disabled: false,
|
|
1430
|
-
bgColor: 'white',
|
|
1431
|
-
},
|
|
1432
|
-
render: (args) => {
|
|
1433
|
-
return {
|
|
1434
|
-
components: { PhoneField },
|
|
1435
|
-
setup() {
|
|
1436
|
-
return { args }
|
|
1437
|
-
},
|
|
1438
|
-
template: `
|
|
1439
|
-
<div class="pa-4">
|
|
1440
|
-
<h3>Gestion des erreurs désactivée</h3>
|
|
1441
|
-
<p>Ce champ est requis mais n'affichera pas d'erreur même s'il est vide.</p>
|
|
1442
|
-
<PhoneField
|
|
1443
|
-
v-bind="args"
|
|
1444
|
-
/>
|
|
1445
|
-
<div class="mt-6">
|
|
1446
|
-
<h3>Comparaison avec gestion des erreurs activée</h3>
|
|
1447
|
-
<p>Ce champ est requis et affichera une erreur s'il est vide.</p>
|
|
1448
|
-
<PhoneField
|
|
1449
|
-
v-bind="args"
|
|
1450
|
-
:disable-error-handling="false"
|
|
1451
|
-
/>
|
|
1452
|
-
</div>
|
|
1453
|
-
</div>
|
|
1454
|
-
`,
|
|
1455
|
-
}
|
|
1456
|
-
},
|
|
1457
|
-
}
|
|
1382
|
+
<script setup lang="ts">
|
|
1383
|
+
import { ref } from 'vue'
|
|
1384
|
+
import { PhoneField } from '@cnamts/synapse'
|
|
1458
1385
|
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
disable: false,
|
|
1463
|
-
},
|
|
1464
|
-
sourceCode: [
|
|
1465
|
-
{
|
|
1466
|
-
name: 'Template',
|
|
1467
|
-
code: `
|
|
1468
|
-
<template>
|
|
1469
|
-
<form @submit.prevent="submitForm" class="d-flex flex-column">
|
|
1470
|
-
<PhoneField
|
|
1471
|
-
ref="phoneFieldRef"
|
|
1472
|
-
v-model="phoneNumber"
|
|
1473
|
-
:required="true"
|
|
1474
|
-
:outlined="true"
|
|
1475
|
-
:outlinedIndicatif="true"
|
|
1476
|
-
:withCountryCode="true"
|
|
1477
|
-
:country-code-required="true"
|
|
1478
|
-
:isValidatedOnBlur="true"
|
|
1479
|
-
:readonly="readonly"
|
|
1480
|
-
:disabled="disabled"
|
|
1481
|
-
/>
|
|
1482
|
-
<v-btn type="submit" color="primary" class="mt-4" style="width: 200px;">Soumettre le formulaire</v-btn>
|
|
1483
|
-
<div v-if="formSubmitted" class="mt-4 pa-2" :class="{ 'bg-success': formIsValid, 'bg-error': !formIsValid }" style="width: fit-content;">
|
|
1484
|
-
<p v-if="formIsValid" class="text-white">Formulaire valide !</p>
|
|
1485
|
-
<p v-else class="text-white">Formulaire invalide !</p>
|
|
1486
|
-
</div>
|
|
1487
|
-
</form>
|
|
1488
|
-
</template>
|
|
1489
|
-
`,
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
name: 'Script',
|
|
1493
|
-
code: `
|
|
1494
|
-
<script setup lang="ts">
|
|
1495
|
-
import { ref } from 'vue'
|
|
1496
|
-
import { PhoneField } from '@cnamts/synapse'
|
|
1497
|
-
|
|
1498
|
-
const phoneFieldRef = ref(null)
|
|
1499
|
-
const phoneNumber = ref('')
|
|
1500
|
-
const formSubmitted = ref(false)
|
|
1501
|
-
const formIsValid = ref(false)
|
|
1502
|
-
const readonly = ref(false)
|
|
1503
|
-
const disabled = ref(false)
|
|
1504
|
-
|
|
1505
|
-
const submitForm = async () => {
|
|
1506
|
-
formSubmitted.value = true
|
|
1507
|
-
// Validation du champ téléphone
|
|
1508
|
-
let isValid = false
|
|
1509
|
-
if (phoneFieldRef.value) {
|
|
1510
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Nécessaire pour accéder à validateOnSubmit
|
|
1511
|
-
isValid = await (phoneFieldRef.value as any).validateOnSubmit()
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
formIsValid.value = isValid
|
|
1515
|
-
|
|
1516
|
-
console.log(isValid ? 'Formulaire valide !' : 'Formulaire invalide !')
|
|
1517
|
-
}
|
|
1518
|
-
</script>
|
|
1519
|
-
`,
|
|
1386
|
+
const phoneNumber = ref('')
|
|
1387
|
+
</script>
|
|
1388
|
+
`,
|
|
1520
1389
|
},
|
|
1521
1390
|
],
|
|
1522
1391
|
},
|
|
1392
|
+
decorators: [
|
|
1393
|
+
() => ({
|
|
1394
|
+
template: '<div style="padding: 20px;"><story/></div>',
|
|
1395
|
+
}),
|
|
1396
|
+
],
|
|
1523
1397
|
args: {
|
|
1524
1398
|
modelValue: '',
|
|
1525
1399
|
required: true,
|
|
1526
|
-
|
|
1527
|
-
outlinedIndicatif: true,
|
|
1400
|
+
label: 'Numéro de téléphone',
|
|
1528
1401
|
withCountryCode: true,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
customIndicatifs: [],
|
|
1532
|
-
useCustomIndicatifsOnly: false,
|
|
1533
|
-
isValidatedOnBlur: true,
|
|
1534
|
-
bgColor: 'white',
|
|
1535
|
-
readonly: false,
|
|
1536
|
-
disabled: false,
|
|
1537
|
-
},
|
|
1538
|
-
render: (args) => {
|
|
1539
|
-
return {
|
|
1540
|
-
components: { PhoneField },
|
|
1541
|
-
setup() {
|
|
1542
|
-
const phoneFieldRef = ref(null)
|
|
1543
|
-
const phoneNumber = ref('')
|
|
1544
|
-
const formSubmitted = ref(false)
|
|
1545
|
-
const formIsValid = ref(false)
|
|
1546
|
-
|
|
1547
|
-
const submitForm = async () => {
|
|
1548
|
-
formSubmitted.value = true
|
|
1549
|
-
// Validation du champ téléphone
|
|
1550
|
-
let isValid = false
|
|
1551
|
-
if (phoneFieldRef.value) {
|
|
1552
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Nécessaire pour accéder à validateOnSubmit
|
|
1553
|
-
isValid = await (phoneFieldRef.value as any).validateOnSubmit()
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
formIsValid.value = isValid
|
|
1557
|
-
|
|
1558
|
-
console.log(isValid ? 'Formulaire valide !' : 'Formulaire invalide !')
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
return { phoneFieldRef, phoneNumber, formSubmitted, formIsValid, submitForm, args }
|
|
1562
|
-
},
|
|
1563
|
-
template: `
|
|
1564
|
-
<div class="pa-4">
|
|
1565
|
-
<form @submit.prevent="submitForm" class="d-flex flex-column">
|
|
1566
|
-
<PhoneField
|
|
1567
|
-
ref="phoneFieldRef"
|
|
1568
|
-
v-bind="args"
|
|
1569
|
-
/>
|
|
1570
|
-
<v-btn type="submit" color="primary" class="mt-4" style="width: 200px;">Soumettre le formulaire</v-btn>
|
|
1571
|
-
<div v-if="formSubmitted" class="mt-4 pa-2" :class="{ 'bg-success': formIsValid, 'bg-error': !formIsValid }" style="width: fit-content;">
|
|
1572
|
-
<p v-if="formIsValid" class="text-white">Formulaire valide !</p>
|
|
1573
|
-
<p v-else class="text-white">Formulaire invalide !</p>
|
|
1574
|
-
</div>
|
|
1575
|
-
</form>
|
|
1576
|
-
<div class="mt-8">
|
|
1577
|
-
<h3>Comment utiliser la validation à la soumission</h3>
|
|
1578
|
-
<p>1. Ajoutez une référence au composant PhoneField avec <code>ref="phoneFieldRef"</code></p>
|
|
1579
|
-
<p>2. Désactivez la validation au blur si nécessaire avec <code>:isValidatedOnBlur="false"</code></p>
|
|
1580
|
-
<p>3. Dans votre méthode de soumission, appelez <code>phoneFieldRef.value.validateOnSubmit()</code></p>
|
|
1581
|
-
<p>4. Cette méthode retourne une Promise qui résout à <code>true</code> si le champ est valide, <code>false</code> sinon</p>
|
|
1582
|
-
</div>
|
|
1583
|
-
</div>
|
|
1584
|
-
`,
|
|
1585
|
-
}
|
|
1586
|
-
},
|
|
1402
|
+
withoutFieldset: true,
|
|
1403
|
+
} as Record<string, unknown>,
|
|
1587
1404
|
}
|