@cnamts/synapse 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DateFilter-BylukfjR.js → DateFilter-C0wDuzgn.js} +1 -1
- package/dist/{NumberFilter-C_bUk9o1.js → NumberFilter-CBj7zdOi.js} +1 -1
- package/dist/{PeriodFilter-dVOmcfmt.js → PeriodFilter-DB4wWyKy.js} +1 -1
- package/dist/{SelectFilter-BW8KpXkQ.js → SelectFilter-Dces8572.js} +1 -1
- package/dist/{TextFilter-diwVzTz7.js → TextFilter-BU9nlkuS.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.d.ts +110 -0
- package/dist/components/Amelipro/AmeliproAccordionFrieze/types.d.ts +6 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +120 -120
- package/dist/components/Amelipro/AmeliproBtn/AmeliproBtn.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.d.ts +47 -0
- package/dist/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.d.ts +88 -0
- package/dist/components/Amelipro/AmeliproDentalChart/types.d.ts +13 -0
- package/dist/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproFirstLogin/locales.d.ts +46 -0
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.d.ts +149 -0
- package/dist/components/Amelipro/AmeliproPatientLogged/types.d.ts +48 -0
- package/dist/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.d.ts +177 -0
- package/dist/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.d.ts +169 -0
- package/dist/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/types.d.ts +5 -0
- package/dist/components/Amelipro/AmeliproPatientLogin/types.d.ts +5 -0
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +2925 -0
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/types.d.ts +11 -0
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +4489 -0
- package/dist/components/Amelipro/AmeliproPostalAddressField/types.d.ts +17 -0
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +120 -120
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +120 -120
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +12 -12
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +30 -30
- package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +12 -2
- package/dist/components/CookieBanner/CookieBanner.d.ts +7 -7
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +20 -20
- package/dist/components/CookiesSelection/CookiesSelection.d.ts +9 -9
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +7 -6
- package/dist/components/Customs/SyForm/SyForm.d.ts +1820 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +3 -1
- package/dist/components/Customs/SyTabs/useTabTransition.d.ts +5 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +36 -31
- package/dist/components/Customs/SyTextField/types.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +232 -134
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +121 -71
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +60 -37
- package/dist/components/DatePicker/composables/useDateValidation.d.ts +14 -2
- package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +2 -2
- package/dist/components/DatePicker/tests/setup.d.ts +74354 -0
- package/dist/components/DialogBox/DialogBox.d.ts +10 -10
- package/dist/components/DialogBox/locales.d.ts +1 -0
- package/dist/components/DialogBox/useDraggable.d.ts +2 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +7 -7
- package/dist/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.d.ts +2 -0
- package/dist/components/HeaderNavigationBar/types.d.ts +1 -0
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +842 -9
- package/dist/components/HeaderToolbar/locales.d.ts +3 -0
- package/dist/components/HeaderToolbar/useMobileRightMenu.d.ts +10 -0
- package/dist/components/LangBtn/LangBtn.d.ts +8 -8
- package/dist/components/NirField/NirField.d.ts +90 -65
- package/dist/components/NirField/locales.d.ts +6 -4
- package/dist/components/PasswordField/PasswordField.d.ts +3 -1
- package/dist/components/PasswordField/locales.d.ts +2 -0
- package/dist/components/PeriodField/PeriodField.d.ts +460 -260
- package/dist/components/PhoneField/PhoneField.d.ts +45 -32
- package/dist/components/RangeField/RangeField.d.ts +11 -1
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +2 -2
- package/dist/components/RangeField/config.d.ts +3 -0
- package/dist/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +3 -1
- package/dist/components/RatingPicker/EmotionPicker/locales.d.ts +2 -0
- package/dist/components/RatingPicker/NumberPicker/NumberPicker.d.ts +3 -1
- package/dist/components/RatingPicker/StarsPicker/StarsPicker.d.ts +3 -1
- package/dist/components/RatingPicker/locales.d.ts +1 -0
- package/dist/components/SearchListField/SearchListField.d.ts +6 -6
- package/dist/components/SyAlert/SyAlert.d.ts +2 -2
- package/dist/components/SyTextArea/SyTextArea.d.ts +13 -13
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +3 -5
- package/dist/components/Tables/SyTable/SyTable.d.ts +3 -5
- package/dist/components/Tables/common/SyTablePagination.d.ts +8 -6
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +4 -4
- package/dist/components/Tables/common/usePagination.d.ts +1 -3
- package/dist/components/Tables/common/useTableCheckbox.d.ts +1 -1
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +4 -4
- package/dist/components/index.d.ts +8 -0
- package/dist/composables/validation/useFormValidation.d.ts +24 -0
- package/dist/composables/validation/useValidatable.d.ts +17 -0
- package/dist/design-system-v3.js +181 -173
- package/dist/design-system-v3.umd.cjs +265 -263
- package/dist/{main-2eWGB7zZ.js → main-Dt4iNotT.js} +14095 -11151
- package/dist/style.css +1 -1
- package/dist/tooth-11-B9fN9Ow_.js +4 -0
- package/dist/tooth-12-BOOjuDe9.js +4 -0
- package/dist/tooth-13-DVU7jhZ8.js +4 -0
- package/dist/tooth-14-CXNleTBu.js +4 -0
- package/dist/tooth-15-iq3z8dzZ.js +4 -0
- package/dist/tooth-16-BuNIHSQk.js +4 -0
- package/dist/tooth-17-DLb4ijsH.js +4 -0
- package/dist/tooth-18-huijQe68.js +4 -0
- package/dist/tooth-21-Bl7Q-o4y.js +4 -0
- package/dist/tooth-22-ChQKI3h5.js +4 -0
- package/dist/tooth-23-CkzbEvBa.js +4 -0
- package/dist/tooth-24-BpaPUSEp.js +4 -0
- package/dist/tooth-25-BaVfhAL6.js +4 -0
- package/dist/tooth-26-BnL03Jv5.js +4 -0
- package/dist/tooth-27-BaHyZfhH.js +4 -0
- package/dist/tooth-28-BrMBVEgX.js +4 -0
- package/dist/tooth-31-DEH3Btej.js +4 -0
- package/dist/tooth-32-Dqcy596v.js +4 -0
- package/dist/tooth-33-DLzQOVky.js +4 -0
- package/dist/tooth-34-36nkjUPW.js +4 -0
- package/dist/tooth-35-VfFhleWT.js +4 -0
- package/dist/tooth-36-BHwtGkLx.js +4 -0
- package/dist/tooth-37-CT47Rtk-.js +4 -0
- package/dist/tooth-38-D15JmYSD.js +4 -0
- package/dist/tooth-41--x9N_iSc.js +4 -0
- package/dist/tooth-42-DZ1D3qmP.js +4 -0
- package/dist/tooth-43-C9T3b5_0.js +4 -0
- package/dist/tooth-44-CsPRBSZV.js +4 -0
- package/dist/tooth-45-Dg3wQunm.js +4 -0
- package/dist/tooth-46-DAOEt4G5.js +4 -0
- package/dist/tooth-47-DcqUeVM0.js +4 -0
- package/dist/tooth-48-0MVzkYem.js +4 -0
- package/dist/tooth-51-DOTod22I.js +4 -0
- package/dist/tooth-52-DZB1Jabv.js +4 -0
- package/dist/tooth-53-nunm2BQr.js +4 -0
- package/dist/tooth-54-BwdYfBd-.js +4 -0
- package/dist/tooth-55-BUJdNwqL.js +4 -0
- package/dist/tooth-61-BwqR1B88.js +4 -0
- package/dist/tooth-62-BzaECsvF.js +4 -0
- package/dist/tooth-63-wjdIfSq2.js +4 -0
- package/dist/tooth-64-CGW4ZcUq.js +4 -0
- package/dist/tooth-65-DxH4GgAL.js +4 -0
- package/dist/tooth-71-CmjVz11G.js +4 -0
- package/dist/tooth-72-CCyNUD-W.js +4 -0
- package/dist/tooth-73-D6aJwVz4.js +4 -0
- package/dist/tooth-74-zNtDQ6ig.js +4 -0
- package/dist/tooth-75-DDEx6y4E.js +4 -0
- package/dist/tooth-81-xg8UVvz2.js +4 -0
- package/dist/tooth-82-CtNXwBtB.js +4 -0
- package/dist/tooth-83-C2ODw7VT.js +4 -0
- package/dist/tooth-84-BKIdO9HA.js +4 -0
- package/dist/tooth-85-3YmvfAsK.js +4 -0
- package/package.json +2 -2
- package/src/assets/amelipro/img/dental-chart-img/tooth-11.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-12.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-13.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-14.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-15.svg +21 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-16.svg +31 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-17.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-18.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-21.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-22.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-23.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-24.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-25.svg +21 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-26.svg +31 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-27.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-28.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-31.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-32.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-33.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-34.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-35.svg +22 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-36.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-37.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-38.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-41.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-42.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-43.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-44.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-45.svg +22 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-46.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-47.svg +26 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-48.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-51.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-52.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-53.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-54.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-55.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-61.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-62.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-63.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-64.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-65.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-71.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-72.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-73.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-74.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-75.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-81.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-82.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-83.svg +16 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-84.svg +11 -0
- package/src/assets/amelipro/img/dental-chart-img/tooth-85.svg +16 -0
- package/src/assets/amelipro/img/idpa/apcv_logo.svg +16 -0
- package/src/assets/amelipro/img/idpa/carte-vitale.svg +75 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.mdx +15 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.stories.ts +261 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +419 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/__tests__/AmeliproAccordionFrieze.spec.ts +98 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/__tests__/__snapshots__/AmeliproAccordionFrieze.spec.ts.snap +858 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/types.d.ts +6 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +2 -2
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +0 -4
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +2 -2
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +0 -4
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.stories.ts +97 -0
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.stories.ts +190 -8
- package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.stories.ts +321 -0
- package/src/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.vue +1 -1
- package/src/components/Amelipro/AmeliproCard/AmeliproCard.stories.ts +360 -0
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.stories.ts +1 -1
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.stories.ts +2 -2
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +1 -1
- package/src/components/Amelipro/AmeliproChips/AmeliproChips.stories.ts +46 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +173 -0
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.stories.ts +112 -26
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.mdx +15 -0
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.stories.ts +1078 -0
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +163 -0
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +183 -0
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/tests/AmeliproTooth.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/tests/__snapshots__/AmeliproTooth.spec.ts.snap +39 -0
- package/src/components/Amelipro/AmeliproDentalChart/tests/AmeliproDentalChart.spec.ts +468 -0
- package/src/components/Amelipro/AmeliproDentalChart/tests/__snapshots__/AmeliproDentalChart.spec.ts.snap +2589 -0
- package/src/components/Amelipro/AmeliproDentalChart/types.d.ts +13 -0
- package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.stories.ts +333 -0
- package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +7 -2
- package/src/components/Amelipro/AmeliproDialog/tests/__snapshots__/AmeliproDialog.spec.ts.snap +1 -0
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +1 -1
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/__snapshots__/AmeliproErrorTemplate.spec.ts.snap +1 -2
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.mdx +15 -0
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.stories.ts +287 -0
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +331 -0
- package/src/components/Amelipro/AmeliproFirstLogin/__tests__/AmeliproFirstLogin.spec.ts +29 -0
- package/src/components/Amelipro/AmeliproFirstLogin/__tests__/__snapshots__/AmeliproFirstLogin.spec.ts.snap +1210 -0
- package/src/components/Amelipro/AmeliproFirstLogin/locales.ts +48 -0
- package/src/components/Amelipro/AmeliproIcon/AmeliproIcon.stories.ts +61 -1
- package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.stories.ts +174 -0
- package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.stories.ts +186 -0
- package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.stories.ts +237 -0
- package/src/components/Amelipro/AmeliproMessage/AmeliproMessage.stories.ts +111 -0
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.stories.ts +199 -0
- package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.stories.ts +150 -0
- package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.stories.ts +281 -8
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.stories.ts +123 -43
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.mdx +18 -0
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.stories.ts +250 -0
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +520 -0
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/AmeliproPatientLogged.spec.ts +79 -0
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/__snapshots__/AmeliproPatientLogged.spec.ts.snap +1140 -0
- package/src/components/Amelipro/AmeliproPatientLogged/types.d.ts +49 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.mdx +18 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.stories.ts +151 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +231 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +252 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/__tests__/AmeliproPatientLoginForm.spec.ts +46 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/__tests__/__snapshots__/AmeliproPatientLoginForm.spec.ts.snap +33 -0
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/types.d.ts +6 -0
- package/src/components/Amelipro/AmeliproPatientLogin/__tests__/AmeliproPatientLogin.spec.ts +49 -0
- package/src/components/Amelipro/AmeliproPatientLogin/__tests__/__snapshots__/AmeliproPatientLogin.spec.ts.snap +60 -0
- package/src/components/Amelipro/AmeliproPatientLogin/types.d.ts +6 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +464 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/AmeliproPostalAddressCityRow.spec.ts +41 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/__snapshots__/AmeliproPostalAddressCityRow.spec.ts.snap +548 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/types.d.ts +12 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.mdx +15 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.stories.ts +133 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +360 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/tests/AmeliproPostalAddressField.spec.ts +27 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/tests/__snapshots__/AmeliproPostalAddressField.spec.ts.snap +548 -0
- package/src/components/Amelipro/AmeliproPostalAddressField/types.d.ts +18 -0
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +4 -3
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +2 -2
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +0 -4
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.stories.ts +210 -0
- package/src/components/Amelipro/AmeliproStatus/AmeliproStatus.stories.ts +326 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.stories.ts +232 -4
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +3 -2
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +0 -4
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +1 -1
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.stories.ts +2 -2
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +222 -6
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.stories.ts +169 -0
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +6 -1
- package/src/components/Amelipro/AmeliproTooltips/tests/__snapshots__/AmeliproTooltips.spec.ts.snap +1 -5
- package/src/components/Amelipro/AmeliproTransmission/AmeliproTransmission.stories.ts +160 -0
- package/src/components/Amelipro/StructureMenu/StructureMenu.vue +1 -1
- package/src/components/Amelipro/StructureMenu/tests/__snapshots__/StructureMenu.spec.ts.snap +1 -2
- package/src/components/Customs/Selects/SySelect/SySelect.vue +43 -1
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +4 -0
- package/src/components/Customs/SyForm/Introduction.mdx +132 -0
- package/src/components/Customs/SyForm/SyForm.mdx +105 -0
- package/src/components/Customs/SyForm/SyForm.stories.ts +375 -0
- package/src/components/Customs/SyForm/SyForm.vue +80 -0
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +31 -0
- package/src/components/Customs/SyTabs/SyTabs.vue +185 -27
- package/src/components/Customs/SyTabs/useTabTransition.ts +42 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +12 -3
- package/src/components/Customs/SyTextField/types.d.ts +1 -1
- package/src/components/DataListItem/DataListItem.vue +12 -13
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +242 -41
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +30 -12
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +246 -59
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +40 -10
- package/src/components/DatePicker/DatePickerOverview.mdx +5 -1
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +21 -21
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +240 -133
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +29 -1
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +32 -9
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +166 -38
- package/src/components/DatePicker/composables/useDateValidation.ts +8 -5
- package/src/components/DatePicker/composables/useManualDateValidation.ts +23 -6
- package/src/components/DatePicker/datePickers.stories.ts +28 -0
- package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +47 -58
- package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +2 -2
- package/src/components/DatePicker/tests/DatePicker.validation.spec.ts +4654 -0
- package/src/components/DatePicker/tests/archiTest.md +33 -0
- package/src/components/DatePicker/tests/setup.ts +243 -0
- package/src/components/DialogBox/DialogBox.stories.ts +1 -1
- package/src/components/DialogBox/DialogBox.vue +25 -8
- package/src/components/DialogBox/locales.ts +1 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +187 -15
- package/src/components/DialogBox/useDraggable.ts +92 -4
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +4 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/tests/__snapshots__/HeaderMenuItem.spec.ts.snap +4 -1
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +18 -2
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +14 -4
- package/src/components/HeaderNavigationBar/types.ts +1 -0
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +8 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +0 -1
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +65 -6
- package/src/components/HeaderToolbar/HeaderToolbar.vue +589 -162
- package/src/components/HeaderToolbar/locales.ts +3 -0
- package/src/components/HeaderToolbar/useMobileRightMenu.ts +121 -0
- package/src/components/NirField/Accessibilite.stories.ts +4 -0
- package/src/components/NirField/NirField.stories.ts +0 -11
- package/src/components/NirField/NirField.vue +164 -53
- package/src/components/NirField/locales.ts +6 -4
- package/src/components/NirField/tests/NirField.spec.ts +2 -2
- package/src/components/PasswordField/Accessibilite.stories.ts +96 -0
- package/src/components/PasswordField/PasswordField.stories.ts +8 -1
- package/src/components/PasswordField/PasswordField.vue +98 -19
- package/src/components/PasswordField/locales.ts +2 -0
- package/src/components/PasswordField/tests/PasswordField.spec.ts +1 -1
- package/src/components/PhoneField/PhoneField.vue +4 -0
- package/src/components/RangeField/Accessibilite.stories.ts +4 -0
- package/src/components/RangeField/RangeField.stories.ts +60 -0
- package/src/components/RangeField/RangeField.vue +37 -21
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +30 -8
- package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -0
- package/src/components/RangeField/RangeSlider/tests/__snapshots__/rangeSlider.spec.ts.snap +12 -4
- package/src/components/RangeField/RangeSlider/tests/useMouseSlide.spec.ts +9 -1
- package/src/components/RangeField/RangeSlider/useMouseSlide.ts +23 -8
- package/src/components/RangeField/config.ts +3 -1
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +132 -141
- package/src/components/RatingPicker/Accessibilite.stories.ts +4 -0
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +119 -66
- package/src/components/RatingPicker/EmotionPicker/locales.ts +2 -0
- package/src/components/RatingPicker/EmotionPicker/tests/EmotionPicker.spec.ts +4 -4
- package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +462 -678
- package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +106 -42
- package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +3 -3
- package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +119 -515
- package/src/components/RatingPicker/Rating.ts +5 -1
- package/src/components/RatingPicker/RatingPicker.stories.ts +5 -6
- package/src/components/RatingPicker/RatingPicker.vue +7 -2
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +78 -42
- package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +7 -7
- package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +163 -245
- package/src/components/RatingPicker/locales.ts +1 -0
- package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +120 -516
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +109 -84
- package/src/components/Tables/SyServerTable/SyServerTable.vue +51 -16
- package/src/components/Tables/SyTable/SyTable.vue +1 -6
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +6 -0
- package/src/components/Tables/common/SyTablePagination.vue +0 -6
- package/src/components/Tables/common/tableProps.ts +19 -1
- package/src/components/Tables/common/usePagination.ts +0 -6
- package/src/components/Tables/common/useTableCheckbox.ts +5 -5
- package/src/components/index.ts +8 -0
- package/src/composables/rules/useFieldValidation.ts +21 -3
- package/src/composables/validation/AvecVosComposants.mdx +145 -0
- package/src/composables/validation/FormValidation.mdx +151 -0
- package/src/composables/validation/FormValidation.stories.ts +402 -0
- package/src/composables/validation/useFormValidation.ts +91 -0
- package/src/composables/validation/useValidatable.ts +41 -0
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +2 -2
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +2 -2
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +2 -2
- package/src/stories/Demarrer/Accueil.stories.ts +6 -6
- package/src/stories/GuideDuDev/Installation.mdx +13 -0
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +1 -1
- package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +1 -1
- package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +1 -1
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import SyForm from '@/components/Customs/SyForm/SyForm.vue'
|
|
4
|
+
import SyTextField from '@/components/Customs/SyTextField/SyTextField.vue'
|
|
5
|
+
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
6
|
+
import SySelect from '@/components/Customs/Selects/SySelect/SySelect.vue'
|
|
7
|
+
import DatePicker from '@/components/DatePicker/CalendarMode/DatePicker.vue'
|
|
8
|
+
import { VBtn, VTextField } from 'vuetify/components'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* La documentation sur le système de validation en cascade de Synapse Design System.
|
|
12
|
+
*/
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Composables/ValidationSystem',
|
|
15
|
+
component: SyForm,
|
|
16
|
+
argTypes: {
|
|
17
|
+
validateOnSubmit: {
|
|
18
|
+
control: 'boolean',
|
|
19
|
+
description: 'Active ou désactive la validation automatique lors de la soumission',
|
|
20
|
+
defaultValue: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: {
|
|
25
|
+
description: {
|
|
26
|
+
component: 'Le système de validation en cascade permet de gérer facilement la validation de formulaires complexes et imbriqués.',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
} satisfies Meta<typeof SyForm>
|
|
31
|
+
|
|
32
|
+
type Story = StoryObj<typeof SyForm>
|
|
33
|
+
|
|
34
|
+
// Exemple de base
|
|
35
|
+
export const SimpleForm: Story = {
|
|
36
|
+
render: args => ({
|
|
37
|
+
components: { SyForm, SyTextField, VBtn },
|
|
38
|
+
setup() {
|
|
39
|
+
const name = ref('')
|
|
40
|
+
const email = ref('')
|
|
41
|
+
|
|
42
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
43
|
+
if (event.isValid) {
|
|
44
|
+
alert('Formulaire valide !')
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return { name, email, onSubmit, args }
|
|
49
|
+
},
|
|
50
|
+
template: `
|
|
51
|
+
<SyForm v-bind="args" @submit="onSubmit">
|
|
52
|
+
<div class="d-flex flex-column gap-4">
|
|
53
|
+
<SyTextField v-model="name" label="Nom" required />
|
|
54
|
+
<SyTextField v-model="email" label="Email" required :rules="[v => /.+@.+/.test(v) || 'E-mail invalide']" />
|
|
55
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
56
|
+
</div>
|
|
57
|
+
</SyForm>
|
|
58
|
+
`,
|
|
59
|
+
}),
|
|
60
|
+
args: {
|
|
61
|
+
validateOnSubmit: true,
|
|
62
|
+
},
|
|
63
|
+
parameters: {
|
|
64
|
+
sourceCode: [
|
|
65
|
+
{
|
|
66
|
+
name: 'Template',
|
|
67
|
+
code: `
|
|
68
|
+
<template>
|
|
69
|
+
<SyForm @submit="onSubmit">
|
|
70
|
+
<div class="d-flex flex-column gap-4">
|
|
71
|
+
<SyTextField v-model="name" label="Nom" required />
|
|
72
|
+
<SyTextField v-model="email" label="Email" required :rules="[v => /.+@.+/.test(v) || 'E-mail invalide']" />
|
|
73
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
74
|
+
</div>
|
|
75
|
+
</SyForm>
|
|
76
|
+
</template>
|
|
77
|
+
`,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Script',
|
|
81
|
+
code: `
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import { ref } from 'vue'
|
|
84
|
+
import SyForm from '@cnamts/synapse'
|
|
85
|
+
import SyTextField from '@cnamts/synapse'
|
|
86
|
+
|
|
87
|
+
const name = ref('')
|
|
88
|
+
const email = ref('')
|
|
89
|
+
|
|
90
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
91
|
+
if (event.isValid) {
|
|
92
|
+
alert('Formulaire valide !')
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
96
|
+
`,
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Exemple de formulaire avec composants mixtes
|
|
103
|
+
export const MixedComponentsForm: Story = {
|
|
104
|
+
render: args => ({
|
|
105
|
+
components: { SyForm, SyTextField, SySelect, SyCheckbox, DatePicker, VBtn, VTextField },
|
|
106
|
+
setup() {
|
|
107
|
+
const user = ref({
|
|
108
|
+
name: '',
|
|
109
|
+
birthDate: null,
|
|
110
|
+
country: '',
|
|
111
|
+
acceptTerms: false,
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
const countries = [
|
|
115
|
+
{ text: 'France', value: 'fr' },
|
|
116
|
+
{ text: 'Allemagne', value: 'de' },
|
|
117
|
+
{ text: 'Espagne', value: 'es' },
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
121
|
+
if (event.isValid) {
|
|
122
|
+
alert('Formulaire valide ! Données : ' + JSON.stringify(user.value))
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return { user, countries, onSubmit, args }
|
|
127
|
+
},
|
|
128
|
+
template: `
|
|
129
|
+
<SyForm v-bind="args" @submit="onSubmit" class="form-mixed">
|
|
130
|
+
<div class="d-flex flex-column gap-4">
|
|
131
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
132
|
+
<SyTextField v-model="user.name" label="Nom" required />
|
|
133
|
+
|
|
134
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
135
|
+
<DatePicker v-model="user.birthDate" label="Date de naissance" required />
|
|
136
|
+
|
|
137
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
138
|
+
<SySelect v-model="user.country" :items="countries" label="Pays" required />
|
|
139
|
+
|
|
140
|
+
<!-- Composant natif Vuetify -->
|
|
141
|
+
<v-text-field v-model="user.city" label="Ville" :rules="[v => !!v || 'Ville requise']"></v-text-field>
|
|
142
|
+
|
|
143
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
144
|
+
<SyCheckbox v-model="user.acceptTerms" label="J'accepte les conditions" required />
|
|
145
|
+
|
|
146
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
147
|
+
</div>
|
|
148
|
+
</SyForm>
|
|
149
|
+
`,
|
|
150
|
+
}),
|
|
151
|
+
parameters: {
|
|
152
|
+
sourceCode: [
|
|
153
|
+
{
|
|
154
|
+
name: 'Template',
|
|
155
|
+
code: `
|
|
156
|
+
<template>
|
|
157
|
+
<SyForm @submit="onSubmit" class="form-mixed">
|
|
158
|
+
<div class="d-flex flex-column gap-4">
|
|
159
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
160
|
+
<SyTextField v-model="user.name" label="Nom" required />
|
|
161
|
+
|
|
162
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
163
|
+
<DatePicker v-model="user.birthDate" label="Date de naissance" required />
|
|
164
|
+
|
|
165
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
166
|
+
<SySelect v-model="user.country" :items="countries" label="Pays" required />
|
|
167
|
+
|
|
168
|
+
<!-- Composant natif Vuetify -->
|
|
169
|
+
<v-text-field v-model="user.city" label="Ville" :rules="[v => !!v || 'Ville requise']"></v-text-field>
|
|
170
|
+
|
|
171
|
+
<!-- Composant personnalisé avec useValidatable -->
|
|
172
|
+
<SyCheckbox v-model="user.acceptTerms" label="J'accepte les conditions" required />
|
|
173
|
+
|
|
174
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
175
|
+
</div>
|
|
176
|
+
</SyForm>
|
|
177
|
+
</template>
|
|
178
|
+
`,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'Script',
|
|
182
|
+
code: `
|
|
183
|
+
<script setup lang="ts">
|
|
184
|
+
import { ref } from 'vue'
|
|
185
|
+
import SyForm from '@cnamts/synapse'
|
|
186
|
+
import SyTextField from '@cnamts/synapse'
|
|
187
|
+
import SySelect from '@/components/Customs/Selects/SySelect/SySelect.vue'
|
|
188
|
+
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
189
|
+
import DatePicker from '@/components/DatePicker/CalendarMode/DatePicker.vue'
|
|
190
|
+
import { VTextField } from 'vuetify/components'
|
|
191
|
+
|
|
192
|
+
const user = ref({
|
|
193
|
+
name: '',
|
|
194
|
+
birthDate: null,
|
|
195
|
+
country: '',
|
|
196
|
+
city: '',
|
|
197
|
+
acceptTerms: false,
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
const countries = [
|
|
201
|
+
{ text: 'France', value: 'fr' },
|
|
202
|
+
{ text: 'Allemagne', value: 'de' },
|
|
203
|
+
{ text: 'Espagne', value: 'es' },
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
207
|
+
if (event.isValid) {
|
|
208
|
+
alert('Formulaire valide ! Données : ' + JSON.stringify(user.value))
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
</script>
|
|
212
|
+
`,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Exemple de formulaire imbriqué
|
|
219
|
+
export const NestedForm: Story = {
|
|
220
|
+
render: args => ({
|
|
221
|
+
components: { SyForm, SyTextField, VBtn },
|
|
222
|
+
setup() {
|
|
223
|
+
const user = ref({
|
|
224
|
+
name: '',
|
|
225
|
+
address: {
|
|
226
|
+
street: '',
|
|
227
|
+
city: '',
|
|
228
|
+
zipcode: '',
|
|
229
|
+
},
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
233
|
+
if (event.isValid) {
|
|
234
|
+
alert('Formulaire valide ! Données : ' + JSON.stringify(user.value))
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return { user, onSubmit, args }
|
|
239
|
+
},
|
|
240
|
+
template: `
|
|
241
|
+
<SyForm v-bind="args" @submit="onSubmit">
|
|
242
|
+
<div class="d-flex flex-column gap-4">
|
|
243
|
+
<h3>Informations personnelles</h3>
|
|
244
|
+
<SyTextField v-model="user.name" label="Nom" required />
|
|
245
|
+
|
|
246
|
+
<fieldset style="border: 1px solid #ccc; padding: 16px; border-radius: 4px;">
|
|
247
|
+
<legend>Adresse</legend>
|
|
248
|
+
<div class="d-flex flex-column gap-4">
|
|
249
|
+
<SyTextField v-model="user.address.street" label="Rue" required />
|
|
250
|
+
<SyTextField v-model="user.address.city" label="Ville" required />
|
|
251
|
+
<SyTextField v-model="user.address.zipcode" label="Code postal" required />
|
|
252
|
+
</div>
|
|
253
|
+
</fieldset>
|
|
254
|
+
|
|
255
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
256
|
+
</div>
|
|
257
|
+
</SyForm>
|
|
258
|
+
`,
|
|
259
|
+
}),
|
|
260
|
+
parameters: {
|
|
261
|
+
sourceCode: [
|
|
262
|
+
{
|
|
263
|
+
name: 'Template',
|
|
264
|
+
code: `
|
|
265
|
+
<template>
|
|
266
|
+
<SyForm @submit="onSubmit">
|
|
267
|
+
<div class="d-flex flex-column gap-4">
|
|
268
|
+
<h3>Informations personnelles</h3>
|
|
269
|
+
<SyTextField v-model="user.name" label="Nom" required />
|
|
270
|
+
|
|
271
|
+
<fieldset style="border: 1px solid #ccc; padding: 16px; border-radius: 4px;">
|
|
272
|
+
<legend>Adresse</legend>
|
|
273
|
+
<div class="d-flex flex-column gap-4">
|
|
274
|
+
<SyTextField v-model="user.address.street" label="Rue" required />
|
|
275
|
+
<SyTextField v-model="user.address.city" label="Ville" required />
|
|
276
|
+
<SyTextField v-model="user.address.zipcode" label="Code postal" required />
|
|
277
|
+
</div>
|
|
278
|
+
</fieldset>
|
|
279
|
+
|
|
280
|
+
<v-btn type="submit" color="primary">Soumettre</v-btn>
|
|
281
|
+
</div>
|
|
282
|
+
</SyForm>
|
|
283
|
+
</template>
|
|
284
|
+
`,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'Script',
|
|
288
|
+
code: `
|
|
289
|
+
<script setup lang="ts">
|
|
290
|
+
import { ref } from 'vue'
|
|
291
|
+
import SyForm from '@cnamts/synapse'
|
|
292
|
+
import SyTextField from '@cnamts/synapse'
|
|
293
|
+
|
|
294
|
+
const user = ref({
|
|
295
|
+
name: '',
|
|
296
|
+
address: {
|
|
297
|
+
street: '',
|
|
298
|
+
city: '',
|
|
299
|
+
zipcode: '',
|
|
300
|
+
},
|
|
301
|
+
})
|
|
302
|
+
|
|
303
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
304
|
+
if (event.isValid) {
|
|
305
|
+
alert('Formulaire valide ! Données : ' + JSON.stringify(user.value))
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
</script>
|
|
309
|
+
`,
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
},
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Exemple d'implémentation personnalisée
|
|
316
|
+
export const CustomImplementation: Story = {
|
|
317
|
+
render: args => ({
|
|
318
|
+
components: { SyForm, SyTextField, VBtn },
|
|
319
|
+
setup() {
|
|
320
|
+
const email = ref('')
|
|
321
|
+
const password = ref('')
|
|
322
|
+
const confirmPassword = ref('')
|
|
323
|
+
|
|
324
|
+
const validatePasswordMatch = () => {
|
|
325
|
+
return password.value === confirmPassword.value || 'Les mots de passe ne correspondent pas'
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
329
|
+
if (event.isValid) {
|
|
330
|
+
alert('Inscription réussie !')
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return { email, password, confirmPassword, validatePasswordMatch, onSubmit, args }
|
|
335
|
+
},
|
|
336
|
+
template: `
|
|
337
|
+
<SyForm v-bind="args" @submit="onSubmit">
|
|
338
|
+
<div class="d-flex flex-column gap-4">
|
|
339
|
+
<SyTextField v-model="email" label="Email" type="email" required :rules="[v => /.+@.+/.test(v) || 'E-mail invalide']" />
|
|
340
|
+
<SyTextField v-model="password" label="Mot de passe" type="password" required :rules="[v => v.length >= 8 || 'Minimum 8 caractères']" />
|
|
341
|
+
<SyTextField
|
|
342
|
+
v-model="confirmPassword"
|
|
343
|
+
label="Confirmer le mot de passe"
|
|
344
|
+
type="password"
|
|
345
|
+
required
|
|
346
|
+
:rules="[validatePasswordMatch]"
|
|
347
|
+
/>
|
|
348
|
+
<v-btn type="submit" color="primary">S'inscrire</v-btn>
|
|
349
|
+
</div>
|
|
350
|
+
</SyForm>
|
|
351
|
+
`,
|
|
352
|
+
}),
|
|
353
|
+
parameters: {
|
|
354
|
+
sourceCode: [
|
|
355
|
+
{
|
|
356
|
+
name: 'Template',
|
|
357
|
+
code: `
|
|
358
|
+
<template>
|
|
359
|
+
<SyForm @submit="onSubmit">
|
|
360
|
+
<div class="d-flex flex-column gap-4">
|
|
361
|
+
<SyTextField v-model="email" label="Email" type="email" required :rules="[v => /.+@.+/.test(v) || 'E-mail invalide']" />
|
|
362
|
+
<SyTextField v-model="password" label="Mot de passe" type="password" required :rules="[v => v.length >= 8 || 'Minimum 8 caractères']" />
|
|
363
|
+
<SyTextField
|
|
364
|
+
v-model="confirmPassword"
|
|
365
|
+
label="Confirmer le mot de passe"
|
|
366
|
+
type="password"
|
|
367
|
+
required
|
|
368
|
+
:rules="[validatePasswordMatch]"
|
|
369
|
+
/>
|
|
370
|
+
<v-btn type="submit" color="primary">S'inscrire</v-btn>
|
|
371
|
+
</div>
|
|
372
|
+
</SyForm>
|
|
373
|
+
</template>
|
|
374
|
+
`,
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: 'Script',
|
|
378
|
+
code: `
|
|
379
|
+
<script setup lang="ts">
|
|
380
|
+
import { ref } from 'vue'
|
|
381
|
+
import SyForm from '@cnamts/synapse'
|
|
382
|
+
import SyTextField from '@cnamts/synapse'
|
|
383
|
+
|
|
384
|
+
const email = ref('')
|
|
385
|
+
const password = ref('')
|
|
386
|
+
const confirmPassword = ref('')
|
|
387
|
+
|
|
388
|
+
const validatePasswordMatch = () => {
|
|
389
|
+
return password.value === confirmPassword.value || 'Les mots de passe ne correspondent pas'
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const onSubmit = (event: { isValid: boolean }) => {
|
|
393
|
+
if (event.isValid) {
|
|
394
|
+
alert('Inscription réussie !')
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
</script>
|
|
398
|
+
`,
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
},
|
|
402
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { provide, inject, ref, type InjectionKey, type Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
// Type pour les composants pouvant être validés
|
|
4
|
+
export interface ValidatableComponent {
|
|
5
|
+
validateOnSubmit: () => Promise<boolean> | boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Clé d'injection pour le registre des composants validables
|
|
9
|
+
const ValidatableComponentsKey: InjectionKey<{
|
|
10
|
+
register: (component: ValidatableComponent) => void
|
|
11
|
+
unregister: (component: ValidatableComponent) => void
|
|
12
|
+
components: Ref<ValidatableComponent[]>
|
|
13
|
+
}> = Symbol('ValidatableComponents')
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Hook pour le formulaire parent qui fournit un registre pour les composants validables
|
|
17
|
+
* @returns Fonctions pour gérer la validation des composants enfants
|
|
18
|
+
*/
|
|
19
|
+
export function useFormValidation() {
|
|
20
|
+
// Liste des composants validables enregistrés
|
|
21
|
+
const validatableComponents = ref<ValidatableComponent[]>([])
|
|
22
|
+
|
|
23
|
+
// Fonction pour enregistrer un composant validable
|
|
24
|
+
const register = (component: ValidatableComponent) => {
|
|
25
|
+
if (!validatableComponents.value.includes(component)) {
|
|
26
|
+
validatableComponents.value.push(component)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Fonction pour supprimer un composant validable du registre
|
|
31
|
+
const unregister = (component: ValidatableComponent) => {
|
|
32
|
+
const index = validatableComponents.value.indexOf(component)
|
|
33
|
+
if (index !== -1) {
|
|
34
|
+
validatableComponents.value.splice(index, 1)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Fournir le registre aux composants enfants
|
|
39
|
+
provide(ValidatableComponentsKey, {
|
|
40
|
+
register,
|
|
41
|
+
unregister,
|
|
42
|
+
components: validatableComponents,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Valide tous les composants enfants enregistrés
|
|
47
|
+
* @returns Promise<boolean> - true si tous les composants sont valides
|
|
48
|
+
*/
|
|
49
|
+
const validateAll = async (): Promise<boolean> => {
|
|
50
|
+
if (validatableComponents.value.length === 0) {
|
|
51
|
+
return true
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Valider tous les composants et collecter les résultats
|
|
55
|
+
const results = await Promise.all(
|
|
56
|
+
validatableComponents.value.map(component =>
|
|
57
|
+
Promise.resolve(component.validateOnSubmit()),
|
|
58
|
+
),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
// Retourner true uniquement si tous les composants sont valides
|
|
62
|
+
return results.every(result => result === true)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
validateAll,
|
|
67
|
+
validatableComponents,
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Hook pour les composants enfants qui doivent s'enregistrer auprès du formulaire parent
|
|
73
|
+
* @returns Fonction pour s'enregistrer et se désinscrire du formulaire parent
|
|
74
|
+
*/
|
|
75
|
+
export function useValidatableComponent() {
|
|
76
|
+
// Récupérer le registre du formulaire parent
|
|
77
|
+
const formRegistry = inject(ValidatableComponentsKey, null)
|
|
78
|
+
|
|
79
|
+
// Si le composant n'est pas dans un formulaire avec useFormValidation, ne rien faire
|
|
80
|
+
if (!formRegistry) {
|
|
81
|
+
return {
|
|
82
|
+
register: () => {},
|
|
83
|
+
unregister: () => {},
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
register: formRegistry.register,
|
|
89
|
+
unregister: formRegistry.unregister,
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
|
|
2
|
+
import { useValidatableComponent } from './useFormValidation'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Hook pour rendre un composant validable automatiquement dans un SyForm
|
|
6
|
+
* Ce composable permet à un composant de s'auto-enregistrer auprès d'un formulaire parent
|
|
7
|
+
* sans avoir à modifier manuellement le code de chaque composant.
|
|
8
|
+
*
|
|
9
|
+
* @param validateMethod Fonction de validation à appeler lors de la soumission du formulaire
|
|
10
|
+
* @example
|
|
11
|
+
* // Dans un composant
|
|
12
|
+
* const validateOnSubmit = () => {
|
|
13
|
+
* // Logique de validation
|
|
14
|
+
* return isValid
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* // Enregistrer le composant auprès du formulaire parent
|
|
18
|
+
* useValidatable(validateOnSubmit)
|
|
19
|
+
*/
|
|
20
|
+
export function useValidatable(validateMethod: () => Promise<boolean> | boolean) {
|
|
21
|
+
const { register, unregister } = useValidatableComponent()
|
|
22
|
+
const instance = getCurrentInstance()
|
|
23
|
+
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
if (instance) {
|
|
26
|
+
register({
|
|
27
|
+
validateOnSubmit: validateMethod,
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
onBeforeUnmount(() => {
|
|
33
|
+
if (instance) {
|
|
34
|
+
unregister({
|
|
35
|
+
validateOnSubmit: validateMethod,
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
// Aucune valeur de retour nécessaire car ce hook gère uniquement l'enregistrement/désenregistrement
|
|
41
|
+
}
|
|
@@ -27,7 +27,7 @@ const ITEMS: AuditItem[] = [
|
|
|
27
27
|
{ composant: 'LogoBrandSection', status: STATUS.AUDITED },
|
|
28
28
|
{ composant: 'SubHeader', status: STATUS.AUDITED },
|
|
29
29
|
{ composant: 'HeaderLoading', status: STATUS.AUDITED },
|
|
30
|
-
{ composant: 'HeaderToolbar', status: STATUS.
|
|
30
|
+
{ composant: 'HeaderToolbar', status: STATUS.AUDITED },
|
|
31
31
|
{ composant: 'Footer', status: STATUS.AUDITED },
|
|
32
32
|
{ composant: 'SySelect', status: STATUS.AUDITED },
|
|
33
33
|
{ composant: 'SyInputSelect', status: STATUS.NOT_AUDITED },
|
|
@@ -40,7 +40,7 @@ const ITEMS: AuditItem[] = [
|
|
|
40
40
|
{ composant: 'CookieBanner', status: STATUS.AUDITED },
|
|
41
41
|
{ composant: 'ContextualMenu', status: STATUS.AUDITED },
|
|
42
42
|
{ composant: 'DialogBox', status: STATUS.NOT_AUDITED },
|
|
43
|
-
{ composant: 'PasswordField', status: STATUS.
|
|
43
|
+
{ composant: 'PasswordField', status: STATUS.AUDITED },
|
|
44
44
|
{ composant: 'PhoneField', status: STATUS.AUDITED },
|
|
45
45
|
{ composant: 'UserMenuBtn', status: STATUS.NOT_AUDITED },
|
|
46
46
|
{ composant: 'SyBtnSelect', status: STATUS.NOT_AUDITED },
|
|
@@ -362,7 +362,7 @@ import '../../../styles/shared.css';
|
|
|
362
362
|
<p className="tool-card-description">
|
|
363
363
|
Lecteur d'écran open-source pour Windows conçu pour les personnes malvoyantes ou aveugles. Il rend accessibles les interfaces graphiques en lisant à haute voix les éléments affichés à l'écran.
|
|
364
364
|
</p>
|
|
365
|
-
<a href="
|
|
365
|
+
<a href="/?path=/docs/accessibilité-kit-de-pré-audit-outils-lecteurs-d-écran--docs" className="tool-card-link">
|
|
366
366
|
Guide rapide de NVDA
|
|
367
367
|
<span className="tool-card-link-icon" role="img" aria-hidden="true">→</span>
|
|
368
368
|
</a>
|
|
@@ -378,7 +378,7 @@ import '../../../styles/shared.css';
|
|
|
378
378
|
<p className="tool-card-description">
|
|
379
379
|
Lecteur d'écran intégré aux appareils Android qui fournit des retours vocaux sur les éléments affichés. Essentiel pour tester l'accessibilité de vos applications mobiles.
|
|
380
380
|
</p>
|
|
381
|
-
<a href="
|
|
381
|
+
<a href="/?path=/docs/accessibilité-kit-de-pré-audit-outils-lecteurs-d-écran--docs#talkback-android" className="tool-card-link">
|
|
382
382
|
Guide rapide de TalkBack
|
|
383
383
|
<span className="tool-card-link-icon" role="img" aria-hidden="true">→</span>
|
|
384
384
|
</a>
|
|
@@ -205,7 +205,7 @@ import '../../styles/shared.css';
|
|
|
205
205
|
</div>
|
|
206
206
|
|
|
207
207
|
<div className="alert">
|
|
208
|
-
<p><strong>🔔 Rappel important :</strong> Avant de lancer votre pré-audit, vous devez définir l'échantillon de votre audit. Vous trouverez toutes les informations associées <a href="
|
|
208
|
+
<p><strong>🔔 Rappel important :</strong> Avant de lancer votre pré-audit, vous devez définir l'échantillon de votre audit. Vous trouverez toutes les informations associées <a href="/?path=/docs/accessibilit%C3%A9-kit-de-pr%C3%A9-audit-%C3%A9chantillonnage--docs">ici</a>.</p>
|
|
209
209
|
</div>
|
|
210
210
|
|
|
211
211
|
<div className="info-section">
|
|
@@ -213,7 +213,7 @@ import '../../styles/shared.css';
|
|
|
213
213
|
|
|
214
214
|
<div className="verification-card">
|
|
215
215
|
<h3>📦 Utilisation de Tanaguru</h3>
|
|
216
|
-
<p>Lancez Tanaguru sur chaque page de l'échantillon de test. Vous pouvez retrouver une documentation d'utilisation de Tanaguru <a href="
|
|
216
|
+
<p>Lancez Tanaguru sur chaque page de l'échantillon de test. Vous pouvez retrouver une documentation d'utilisation de Tanaguru <a href="/?path=/docs/accessibilité-kit-de-pré-audit-outils-tanaguru-utilisation--docs">ici</a>.</p>
|
|
217
217
|
|
|
218
218
|
<div className="alert">
|
|
219
219
|
<p><strong>Capacité de l'outil :</strong> Tanaguru peut contrôler <span className="highlight">158 tests sur les 258</span> du <abbr title="Référentiel Général d'Amélioration de l'Accessibilité">RGAA</abbr>.</p>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VBtn, VIcon, VRow, VCol, VCard, VCardText, VCardTitle } from 'vuetify/components'
|
|
2
2
|
import type { StoryObj } from '@storybook/vue3'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { mdiArrowRight, mdiNpm } from '@mdi/js'
|
|
5
5
|
|
|
6
6
|
import { version } from '../../../package.json'
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ export const Header: StoryObj = {
|
|
|
17
17
|
const theme = typeof window !== 'undefined' ? localStorage.getItem('storybook-theme') : 'cnam'
|
|
18
18
|
return {
|
|
19
19
|
arrowRight: mdiArrowRight,
|
|
20
|
-
|
|
20
|
+
npmIcon: mdiNpm,
|
|
21
21
|
version,
|
|
22
22
|
theme,
|
|
23
23
|
}
|
|
@@ -67,13 +67,13 @@ export const Header: StoryObj = {
|
|
|
67
67
|
<img src="/figma.svg" alt="Figma" width="auto" height="17" />
|
|
68
68
|
</VBtn>
|
|
69
69
|
<VBtn
|
|
70
|
-
aria-label="
|
|
71
|
-
href="https://
|
|
70
|
+
aria-label="NPM"
|
|
71
|
+
href="https://www.npmjs.com/package/@cnamts/synapse"
|
|
72
72
|
target="_blank"
|
|
73
73
|
rel="noopener noreferrer"
|
|
74
74
|
class="d-flex align-center justify-center text-lowercase ml-2"
|
|
75
75
|
>
|
|
76
|
-
<VIcon size="large" class="mr-2">{{
|
|
76
|
+
<VIcon size="large" class="mr-2">{{ npmIcon }}</VIcon>
|
|
77
77
|
<b>v{{ version }}</b>
|
|
78
78
|
</VBtn>
|
|
79
79
|
</div>
|
|
@@ -204,7 +204,7 @@ export const List: StoryObj = {
|
|
|
204
204
|
components: { VRow, VCol },
|
|
205
205
|
setup() {
|
|
206
206
|
return {
|
|
207
|
-
|
|
207
|
+
npmIcon: mdiNpm,
|
|
208
208
|
version,
|
|
209
209
|
}
|
|
210
210
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {Meta, Source} from '@storybook/addon-docs/blocks';
|
|
2
|
+
import '../styles/shared.css';
|
|
3
|
+
|
|
4
|
+
<Meta title="Guide Du Dev/Installation"/>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Installation</h1>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
- Pour un nouveau projet, téléchargez le Starter Kit <a href="https://gitlab.cnqd.cnamts.fr/human/developpement/sksn_x" target="_blank" rel="noopener noreferrer">Starter Kit Synapse</a>, le Design System est déjà intégré dans le projet et prêt à l'emploi.
|
|
12
|
+
- Pour migrer un projet existant depuis Bridge (Vue3) vers Synapse, suivez le guide [Migration depuis Bridge](/docs/guide-du-dev-migration-migration-depuis-bridge--docs).
|
|
13
|
+
- Pour migrer un projet existant depuis VueDot (Vue2) vers Synapse, suivez le guide [Migration depuis Vue2](/docs/guide-du-dev-migration-migration-depuis-vue2--docs).
|