@cnamts/synapse 0.0.11-alpha → 0.0.13-alpha
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/design-system-v3.js +5394 -3813
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/src/components/Amelipro/types/types.d.ts +38 -0
- package/dist/src/components/CookieBanner/CookieBanner.d.ts +1 -1
- package/dist/src/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
- package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +31 -23
- package/dist/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +105 -102
- package/dist/src/components/DatePicker/DateTextInput.d.ts +82 -74
- package/dist/src/components/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/src/components/FileList/FileList.d.ts +1 -0
- package/dist/src/components/FileList/UploadItem/UploadItem.d.ts +1 -1
- package/dist/src/components/FilterInline/AccessibiliteItems.d.ts +30 -0
- package/dist/src/components/FilterInline/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FilterSideBar/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/FilterSideBar/FilterSideBar.d.ts +31 -0
- package/dist/src/components/FilterSideBar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FilterSideBar/locales.d.ts +7 -0
- package/dist/src/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/src/components/NirField/NirField.d.ts +952 -0
- package/dist/src/components/NotificationBar/NotificationBar.d.ts +6 -6
- package/dist/src/components/PasswordField/PasswordField.d.ts +42 -8
- package/dist/src/components/PeriodField/PeriodField.d.ts +259 -235
- package/dist/src/components/PhoneField/PhoneField.d.ts +33 -3
- package/dist/src/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/NumberPicker/NumberPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/StarsPicker/StarsPicker.d.ts +1 -1
- package/dist/src/components/UploadWorkflow/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/config.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/UploadWorkflow/locales.d.ts +7 -0
- package/dist/src/components/UploadWorkflow/types.d.ts +19 -0
- package/dist/src/components/UploadWorkflow/useFileList.d.ts +10 -0
- package/dist/src/components/UploadWorkflow/useFileUploadJourney.d.ts +9 -0
- package/dist/src/components/Usages/Usages.d.ts +10 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/composables/date/tests/useDateFormat.spec.d.ts +1 -0
- package/dist/src/composables/date/tests/useDateInitialization.spec.d.ts +1 -0
- package/dist/src/composables/date/tests/useDatePickerAccessibility.spec.d.ts +1 -0
- package/dist/src/composables/date/useDateFormat.d.ts +26 -0
- package/dist/src/composables/date/useDateInitialization.d.ts +18 -0
- package/dist/src/composables/date/useDatePickerAccessibility.d.ts +8 -0
- package/dist/src/composables/rules/useFieldValidation.d.ts +1 -0
- package/dist/src/composables/useFilterable/useFilterable.d.ts +1 -1
- package/dist/src/composables/validation/tests/useValidation.spec.d.ts +1 -0
- package/dist/src/composables/validation/useValidation.d.ts +40 -0
- package/dist/src/designTokens/index.d.ts +3 -1
- package/dist/src/main.d.ts +1 -0
- package/dist/src/utils/formatDate/index.d.ts +3 -0
- package/dist/src/utils/formatDate/tests/formatDate.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateAfter/index.d.ts +2 -0
- package/dist/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateBefore/index.d.ts +2 -0
- package/dist/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateInRange/index.d.ts +3 -0
- package/dist/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateValid/index.d.ts +9 -0
- package/dist/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isEmailValid/tests/isEmailValid.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isWeekend/index.d.ts +3 -0
- package/dist/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.d.ts +1 -0
- package/dist/src/utils/parseDate/index.d.ts +3 -0
- package/dist/src/utils/parseDate/tests/parseDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/doMatchPattern/index.d.ts +3 -0
- package/dist/src/utils/rules/doMatchPattern/tests/matchPattern.spec.d.ts +1 -0
- package/dist/src/utils/rules/index.d.ts +11 -0
- package/dist/src/utils/rules/isDateValid/index.d.ts +4 -0
- package/dist/src/utils/rules/isDateValid/tests/isDateValid.spec.d.ts +1 -0
- package/dist/src/utils/rules/isExactLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isExactLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isExactLength/tests/exactLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isMaxLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isMaxLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isMaxLength/tests/isMaxLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isMinLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isMinLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isMinLength/tests/isMinLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotAfterDate/index.d.ts +3 -0
- package/dist/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotAfterToday/index.d.ts +4 -0
- package/dist/src/utils/rules/isNotAfterToday/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotBeforeDate/index.d.ts +3 -0
- package/dist/src/utils/rules/isNotBeforeDate/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotBeforeToday/index.d.ts +4 -0
- package/dist/src/utils/rules/isNotBeforeToday/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.d.ts +1 -0
- package/dist/src/utils/rules/isRequired/index.d.ts +4 -0
- package/dist/src/utils/rules/isRequired/locales.d.ts +2 -0
- package/dist/src/utils/rules/isRequired/tests/isRequred.spec.d.ts +1 -0
- package/dist/src/utils/rules/isValidEmail/index.d.ts +4 -0
- package/dist/src/utils/rules/isValidEmail/locales.d.ts +2 -0
- package/dist/src/utils/rules/isValidEmail/tests/isValidEmail.spec.d.ts +1 -0
- package/dist/src/vuetifyConfig.d.ts +81 -0
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/src/assets/_elevations.scss +89 -0
- package/src/assets/_fonts.scss +6 -0
- package/src/assets/_radius.scss +92 -0
- package/src/assets/_spacers.scss +149 -0
- package/src/assets/settings.scss +15 -3
- package/src/assets/tokens.scss +32 -29
- package/src/components/Amelipro/types/types.ts +40 -0
- package/src/components/ChipList/ChipList.stories.ts +26 -27
- package/src/components/ChipList/ChipList.vue +5 -1
- package/src/components/ChipList/config.ts +1 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +2 -2
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +1 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +1 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +13 -3
- package/src/components/Customs/SySelect/SySelect.mdx +1 -1
- package/src/components/Customs/SySelect/SySelect.stories.ts +88 -5
- package/src/components/Customs/SySelect/SySelect.vue +55 -14
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +135 -2
- package/src/components/Customs/SyTextField/SyTextField.mdx +2 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +809 -79
- package/src/components/Customs/SyTextField/SyTextField.vue +135 -104
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +190 -38
- package/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/src/components/DatePicker/DatePicker.stories.ts +177 -5
- package/src/components/DatePicker/DatePicker.vue +302 -233
- package/src/components/DatePicker/DateTextInput.vue +101 -246
- package/src/components/DatePicker/tests/DatePicker.spec.ts +123 -60
- package/src/components/DatePicker/tests/DateTextInput.spec.ts +202 -6
- package/src/components/FileList/Accessibilite.stories.ts +1 -1
- package/src/components/FileList/AccessibiliteItems.ts +22 -0
- package/src/components/FileList/FileList.vue +2 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +10 -0
- package/src/components/FileUpload/FileUpload.stories.ts +93 -7
- package/src/components/FileUpload/FileUpload.vue +1 -0
- package/src/components/FileUpload/tests/FileUpload.spec.ts +4 -4
- package/src/components/FilterInline/Accessibilite.mdx +14 -0
- package/src/components/FilterInline/Accessibilite.stories.ts +216 -0
- package/src/components/FilterInline/AccessibiliteItems.ts +132 -0
- package/src/components/FilterInline/FilterInline.mdx +180 -34
- package/src/components/FilterInline/FilterInline.stories.ts +363 -6
- package/src/components/FilterInline/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FilterSideBar/Accessibilite.mdx +14 -0
- package/src/components/FilterSideBar/Accessibilite.stories.ts +216 -0
- package/src/components/FilterSideBar/AccessibiliteItems.ts +153 -0
- package/src/components/FilterSideBar/FilterSideBar.mdx +237 -0
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +798 -0
- package/src/components/FilterSideBar/FilterSideBar.vue +193 -0
- package/src/components/FilterSideBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FilterSideBar/locales.ts +8 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +305 -0
- package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +39 -0
- package/src/components/HeaderBar/Usages.mdx +1 -1
- package/src/components/NirField/NirField.stories.ts +738 -29
- package/src/components/NirField/NirField.vue +401 -359
- package/src/components/NirField/examples//342/200/257dataset/342/200/257.md +12 -0
- package/src/components/NirField/tests/NirField.spec.ts +88 -52
- package/src/components/NirField/tests/config.spec.ts +65 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +4 -0
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/NotificationBar.stories.ts +66 -13
- package/src/components/NotificationBar/NotificationBar.vue +42 -114
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +28 -33
- package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +1 -1
- package/src/components/PaginatedTable/PaginatedTable.vue +6 -10
- package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +4 -4
- package/src/components/PasswordField/PasswordField.mdx +129 -47
- package/src/components/PasswordField/PasswordField.stories.ts +1111 -120
- package/src/components/PasswordField/PasswordField.vue +212 -99
- package/src/components/PasswordField/tests/PasswordField.spec.ts +138 -9
- package/src/components/PeriodField/PeriodField.stories.ts +214 -118
- package/src/components/PeriodField/PeriodField.vue +238 -190
- package/src/components/PeriodField/tests/PeriodField.spec.ts +146 -0
- package/src/components/PhoneField/PhoneField.stories.ts +170 -0
- package/src/components/PhoneField/PhoneField.vue +76 -17
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/PhoneField/tests/PhoneField.spec.ts +40 -0
- package/src/components/RatingPicker/RatingPicker.stories.ts +7 -7
- package/src/components/SearchListField/SearchListField.stories.ts +1 -1
- package/src/components/UploadWorkflow/Accessibilite.mdx +14 -0
- package/src/components/UploadWorkflow/Accessibilite.stories.ts +216 -0
- package/src/components/UploadWorkflow/AccessibiliteItems.ts +192 -0
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +75 -0
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +943 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +230 -0
- package/src/components/UploadWorkflow/config.ts +29 -0
- package/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/UploadWorkflow/locales.ts +8 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +257 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +54 -0
- package/src/components/UploadWorkflow/types.ts +21 -0
- package/src/components/UploadWorkflow/useFileList.ts +84 -0
- package/src/components/UploadWorkflow/useFileUploadJourney.ts +18 -0
- package/src/components/Usages/tests/Usages.spec.ts +183 -0
- package/src/components/index.ts +5 -0
- package/src/composables/date/tests/useDateFormat.spec.ts +67 -0
- package/src/composables/date/tests/useDateInitialization.spec.ts +89 -0
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +102 -0
- package/src/composables/date/useDateFormat.ts +94 -0
- package/src/composables/date/useDateInitialization.ts +92 -0
- package/src/composables/date/useDatePickerAccessibility.ts +78 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +385 -4
- package/src/composables/rules/useFieldValidation.ts +5 -2
- package/src/composables/useFilterable/useFilterable.ts +5 -4
- package/src/composables/validation/tests/useValidation.spec.ts +154 -0
- package/src/composables/validation/useValidation.ts +180 -0
- package/src/designTokens/index.ts +4 -0
- package/src/main.ts +1 -0
- package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +28 -0
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +2 -2
- package/src/stories/Accessibilite/Audit/RGAA.mdx +6 -6
- package/src/stories/Accessibilite/Introduction.mdx +2 -1
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +1 -1
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +1 -1
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +8 -11
- package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +77 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +9 -3
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +2 -2
- package/src/stories/Demarrer/Accueil.mdx +1 -1
- package/src/stories/Demarrer/Introduction.stories.ts +3 -3
- package/src/stories/Demarrer/Releases.mdx +8 -0
- package/src/stories/Demarrer/Releases.stories.ts +66 -0
- package/src/stories/DesignTokens/Conteneurs.stories.ts +3 -3
- package/src/stories/DesignTokens/ThemePA.mdx +4 -30
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +36 -0
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +321 -78
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/utils/formatDate/index.ts +6 -0
- package/src/utils/formatDate/tests/formatDate.spec.ts +18 -0
- package/src/utils/functions/validation/isDateAfter/index.ts +9 -0
- package/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.ts +18 -0
- package/src/utils/functions/validation/isDateBefore/index.ts +9 -0
- package/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.ts +23 -0
- package/src/utils/functions/validation/isDateInRange/index.ts +22 -0
- package/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.ts +28 -0
- package/src/utils/functions/validation/isDateValid/index.ts +67 -0
- package/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.ts +46 -0
- package/src/utils/functions/validation/isEmailValid/index.ts +9 -0
- package/src/utils/functions/validation/isWeekend/index.ts +10 -0
- package/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.ts +16 -0
- package/src/utils/parseDate/index.ts +29 -0
- package/src/utils/parseDate/tests/parseDate.spec.ts +52 -0
- package/src/utils/rules/Rules.mdx +16 -0
- package/src/utils/rules/doMatchPattern/DoMachPattern.mdx +66 -0
- package/src/utils/rules/doMatchPattern/DoMatchPattern.stories.ts +106 -0
- package/src/utils/rules/doMatchPattern/index.ts +28 -0
- package/src/utils/rules/doMatchPattern/locales.ts +5 -0
- package/src/utils/rules/doMatchPattern/tests/matchPattern.spec.ts +38 -0
- package/src/utils/rules/index.ts +11 -0
- package/src/utils/rules/isDateValid/IsDateValid.mdx +87 -0
- package/src/utils/rules/isDateValid/IsDateValid.stories.ts +113 -0
- package/src/utils/rules/isDateValid/index.ts +32 -0
- package/src/utils/rules/isDateValid/locales.ts +10 -0
- package/src/utils/rules/isDateValid/tests/isDateValid.spec.ts +27 -0
- package/src/utils/rules/isExactLength/IsExactLenght.mdx +68 -0
- package/src/utils/rules/isExactLength/IsExactLength.stories.ts +151 -0
- package/src/utils/rules/{exactLength → isExactLength}/index.ts +2 -4
- package/src/utils/rules/isExactLength/tests/exactLength.spec.ts +48 -0
- package/src/utils/rules/isMaxLength/IsMaxLength.mdx +68 -0
- package/src/utils/rules/isMaxLength/IsMaxLength.stories.ts +152 -0
- package/src/utils/rules/isMaxLength/index.ts +30 -0
- package/src/utils/rules/isMaxLength/locales.ts +6 -0
- package/src/utils/rules/isMaxLength/tests/isMaxLength.spec.ts +42 -0
- package/src/utils/rules/isMinLength/IsMinLength.mdx +68 -0
- package/src/utils/rules/isMinLength/IsMinLength.stories.ts +152 -0
- package/src/utils/rules/isMinLength/index.ts +30 -0
- package/src/utils/rules/isMinLength/locales.ts +6 -0
- package/src/utils/rules/isMinLength/tests/isMinLength.spec.ts +42 -0
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.mdx +68 -0
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.stories.ts +109 -0
- package/src/utils/rules/isNotAfterDate/index.ts +25 -0
- package/src/utils/rules/isNotAfterDate/locales.ts +6 -0
- package/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.ts +25 -0
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.mdx +83 -0
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.stories.ts +110 -0
- package/src/utils/rules/isNotAfterToday/index.ts +28 -0
- package/src/utils/rules/isNotAfterToday/locales.ts +5 -0
- package/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.ts +30 -0
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.mdx +68 -0
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.stories.ts +114 -0
- package/src/utils/rules/isNotBeforeDate/index.ts +25 -0
- package/src/utils/rules/isNotBeforeDate/locales.ts +6 -0
- package/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.ts +25 -0
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.mdx +83 -0
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.stories.ts +110 -0
- package/src/utils/rules/isNotBeforeToday/index.ts +28 -0
- package/src/utils/rules/isNotBeforeToday/locales.ts +5 -0
- package/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.ts +36 -0
- package/src/utils/rules/isRequired/IsRequired.mdx +81 -0
- package/src/utils/rules/isRequired/IsRequired.stories.ts +101 -0
- package/src/utils/rules/{required → isRequired}/index.ts +3 -3
- package/src/utils/rules/{required/tests/index.spec.ts → isRequired/tests/isRequred.spec.ts} +9 -9
- package/src/utils/rules/isValidEmail/IsValidEmail.mdx +81 -0
- package/src/utils/rules/isValidEmail/IsValidEmail.stories.ts +101 -0
- package/src/utils/rules/{email → isValidEmail}/index.ts +3 -5
- package/src/utils/rules/{email/tests/email.spec.ts → isValidEmail/tests/isValidEmail.spec.ts} +5 -5
- package/src/vuetifyConfig.ts +61 -0
- package/dist/src/utils/rules/email/index.d.ts +0 -4
- package/dist/src/utils/rules/exactLength/index.d.ts +0 -4
- package/dist/src/utils/rules/required/index.d.ts +0 -4
- package/dist/src/utils/rules/required/ruleMessageHelper.d.ts +0 -3
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +0 -58
- package/src/composables/useFilterable/__snapshots__/useFilterable.spec.ts.snap +0 -3
- package/src/utils/functions/isEmailValid/index.ts +0 -8
- package/src/utils/rules/required/ruleMessageHelper.ts +0 -14
- package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +0 -22
- /package/dist/src/{utils/functions/isEmailValid/tests/isEmailValid.spec.d.ts → components/FilterSideBar/tests/FilterSideBar.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/email/tests/email.spec.d.ts → components/NirField/tests/config.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/required/tests/index.spec.d.ts → components/UploadWorkflow/tests/UploadWorkflow.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/required/tests/rulesMessageHelper.spec.d.ts → components/Usages/tests/Usages.spec.d.ts} +0 -0
- /package/dist/src/utils/functions/{isEmailValid → validation/isEmailValid}/index.d.ts +0 -0
- /package/dist/src/utils/rules/{exactLength → doMatchPattern}/locales.d.ts +0 -0
- /package/dist/src/utils/rules/{email → isDateValid}/locales.d.ts +0 -0
- /package/dist/src/utils/rules/{required → isNotAfterDate}/locales.d.ts +0 -0
- /package/src/utils/functions/{isEmailValid → validation/isEmailValid}/tests/isEmailValid.spec.ts +0 -0
- /package/src/utils/rules/{exactLength → isExactLength}/locales.ts +0 -0
- /package/src/utils/rules/{required → isRequired}/locales.ts +0 -0
- /package/src/utils/rules/{email → isValidEmail}/locales.ts +0 -0
|
@@ -30,6 +30,8 @@ const meta = {
|
|
|
30
30
|
description: 'Permet d\'utiliser uniquement les indicatifs que vous renseignez dans la props customIndicatifs',
|
|
31
31
|
},
|
|
32
32
|
isValidatedOnBlur: { control: 'boolean' },
|
|
33
|
+
displayAsterisk: { control: 'boolean' },
|
|
34
|
+
disableErrorHandling: { control: 'boolean' },
|
|
33
35
|
},
|
|
34
36
|
} satisfies Meta<typeof PhoneField>
|
|
35
37
|
|
|
@@ -192,6 +194,74 @@ export const Required: Story = {
|
|
|
192
194
|
},
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Story avec champ requis et astérisque.
|
|
199
|
+
*/
|
|
200
|
+
export const RequiredWithAsterisk: Story = {
|
|
201
|
+
args: {
|
|
202
|
+
...Default.args,
|
|
203
|
+
required: true,
|
|
204
|
+
displayAsterisk: true,
|
|
205
|
+
},
|
|
206
|
+
parameters: {
|
|
207
|
+
docs: {
|
|
208
|
+
description: {
|
|
209
|
+
story: 'Version du champ téléphone requis avec un astérisque visuel.',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
sourceCode: [
|
|
213
|
+
{
|
|
214
|
+
name: 'Template',
|
|
215
|
+
code: `
|
|
216
|
+
<template>
|
|
217
|
+
<PhoneField
|
|
218
|
+
v-model="phoneNumber"
|
|
219
|
+
required
|
|
220
|
+
display-asterisk
|
|
221
|
+
/>
|
|
222
|
+
</template>
|
|
223
|
+
`,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'Script',
|
|
227
|
+
code: `
|
|
228
|
+
<script setup lang="ts">
|
|
229
|
+
import { ref } from 'vue'
|
|
230
|
+
import PhoneField from '@cnamts/synapse'
|
|
231
|
+
|
|
232
|
+
const phoneNumber = ref('')
|
|
233
|
+
</script>
|
|
234
|
+
`,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
render: (args) => {
|
|
239
|
+
return {
|
|
240
|
+
components: { PhoneField },
|
|
241
|
+
setup() {
|
|
242
|
+
return { args }
|
|
243
|
+
},
|
|
244
|
+
template: `
|
|
245
|
+
<div class="pa-4">
|
|
246
|
+
<PhoneField
|
|
247
|
+
v-model="args.modelValue"
|
|
248
|
+
:required="args.required"
|
|
249
|
+
:outlined="args.outlined"
|
|
250
|
+
:outlinedIndicatif="args.outlinedIndicatif"
|
|
251
|
+
:withCountryCode="args.withCountryCode"
|
|
252
|
+
:countryCodeRequired="args.countryCodeRequired"
|
|
253
|
+
:displayFormat="args.displayFormat"
|
|
254
|
+
:customIndicatifs="args.customIndicatifs"
|
|
255
|
+
:useCustomIndicatifsOnly="args.useCustomIndicatifsOnly"
|
|
256
|
+
:isValidatedOnBlur="args.isValidatedOnBlur"
|
|
257
|
+
:display-asterisk="args.displayAsterisk"
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
`,
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
}
|
|
264
|
+
|
|
195
265
|
export const CustomIndicatifs: Story = {
|
|
196
266
|
parameters: {
|
|
197
267
|
sourceCode: [
|
|
@@ -827,3 +897,103 @@ export const DisplayModels: Story = {
|
|
|
827
897
|
}
|
|
828
898
|
},
|
|
829
899
|
}
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Story qui montre le comportement du composant lorsque la gestion des erreurs est désactivée.
|
|
903
|
+
* Aucun message d'erreur ne sera affiché, même si le champ est requis et vide.
|
|
904
|
+
*/
|
|
905
|
+
export const DisabledErrorHandling: Story = {
|
|
906
|
+
parameters: {
|
|
907
|
+
sourceCode: [
|
|
908
|
+
{
|
|
909
|
+
name: 'Template',
|
|
910
|
+
code: `
|
|
911
|
+
<template>
|
|
912
|
+
<PhoneField
|
|
913
|
+
v-model="modelValue"
|
|
914
|
+
:required="required"
|
|
915
|
+
:withCountryCode="withCountryCode"
|
|
916
|
+
:countryCodeRequired="countryCodeRequired"
|
|
917
|
+
:displayFormat="displayFormat"
|
|
918
|
+
:isValidatedOnBlur="isValidatedOnBlur"
|
|
919
|
+
:disableErrorHandling="disableErrorHandling"
|
|
920
|
+
/>
|
|
921
|
+
</template>
|
|
922
|
+
`,
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
name: 'Script',
|
|
926
|
+
code: `
|
|
927
|
+
<script setup lang="ts">
|
|
928
|
+
import { PhoneField } from '@cnamts/synapse'
|
|
929
|
+
|
|
930
|
+
const modelValue = ref('')
|
|
931
|
+
const required = ref(true)
|
|
932
|
+
const withCountryCode = ref(true)
|
|
933
|
+
const countryCodeRequired = ref(true)
|
|
934
|
+
const displayFormat = ref('code')
|
|
935
|
+
const isValidatedOnBlur = ref(true)
|
|
936
|
+
const disableErrorHandling = ref(true)
|
|
937
|
+
</script>
|
|
938
|
+
`,
|
|
939
|
+
},
|
|
940
|
+
],
|
|
941
|
+
},
|
|
942
|
+
args: {
|
|
943
|
+
modelValue: '',
|
|
944
|
+
required: true,
|
|
945
|
+
outlined: true,
|
|
946
|
+
outlinedIndicatif: true,
|
|
947
|
+
withCountryCode: true,
|
|
948
|
+
countryCodeRequired: true,
|
|
949
|
+
displayFormat: 'code',
|
|
950
|
+
customIndicatifs: [],
|
|
951
|
+
useCustomIndicatifsOnly: false,
|
|
952
|
+
isValidatedOnBlur: true,
|
|
953
|
+
disableErrorHandling: true,
|
|
954
|
+
},
|
|
955
|
+
render: (args) => {
|
|
956
|
+
return {
|
|
957
|
+
components: { PhoneField },
|
|
958
|
+
setup() {
|
|
959
|
+
return { args }
|
|
960
|
+
},
|
|
961
|
+
template: `
|
|
962
|
+
<div class="pa-4">
|
|
963
|
+
<h3>Gestion des erreurs désactivée</h3>
|
|
964
|
+
<p>Ce champ est requis mais n'affichera pas d'erreur même s'il est vide.</p>
|
|
965
|
+
<PhoneField
|
|
966
|
+
v-model="args.modelValue"
|
|
967
|
+
:required="args.required"
|
|
968
|
+
:outlined="args.outlined"
|
|
969
|
+
:outlinedIndicatif="args.outlinedIndicatif"
|
|
970
|
+
:withCountryCode="args.withCountryCode"
|
|
971
|
+
:countryCodeRequired="args.countryCodeRequired"
|
|
972
|
+
:displayFormat="args.displayFormat"
|
|
973
|
+
:customIndicatifs="args.customIndicatifs"
|
|
974
|
+
:useCustomIndicatifsOnly="args.useCustomIndicatifsOnly"
|
|
975
|
+
:isValidatedOnBlur="args.isValidatedOnBlur"
|
|
976
|
+
:disableErrorHandling="args.disableErrorHandling"
|
|
977
|
+
/>
|
|
978
|
+
<div class="mt-6">
|
|
979
|
+
<h3>Comparaison avec gestion des erreurs activée</h3>
|
|
980
|
+
<p>Ce champ est requis et affichera une erreur s'il est vide.</p>
|
|
981
|
+
<PhoneField
|
|
982
|
+
v-model="args.modelValue"
|
|
983
|
+
:required="args.required"
|
|
984
|
+
:outlined="args.outlined"
|
|
985
|
+
:outlinedIndicatif="args.outlinedIndicatif"
|
|
986
|
+
:withCountryCode="args.withCountryCode"
|
|
987
|
+
:countryCodeRequired="args.countryCodeRequired"
|
|
988
|
+
:displayFormat="args.displayFormat"
|
|
989
|
+
:customIndicatifs="args.customIndicatifs"
|
|
990
|
+
:useCustomIndicatifsOnly="args.useCustomIndicatifsOnly"
|
|
991
|
+
:isValidatedOnBlur="args.isValidatedOnBlur"
|
|
992
|
+
:disableErrorHandling="false"
|
|
993
|
+
/>
|
|
994
|
+
</div>
|
|
995
|
+
</div>
|
|
996
|
+
`,
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { computed, ref, watch } from 'vue'
|
|
3
3
|
import type { PropType } from 'vue'
|
|
4
|
-
import {
|
|
5
|
-
import { exactLength } from '@/utils/rules/exactLength'
|
|
6
|
-
import { mdiPhone, mdiInformation } from '@mdi/js'
|
|
4
|
+
import { mdiPhone } from '@mdi/js'
|
|
7
5
|
import { indicatifs } from './indicatifs'
|
|
8
6
|
import { vMaska } from 'maska/vue'
|
|
9
7
|
import { locales } from './locales'
|
|
10
8
|
import SySelect from '@/components/Customs/SySelect/SySelect.vue'
|
|
11
9
|
import SyTextField from '@/components/Customs/SyTextField/SyTextField.vue'
|
|
10
|
+
import { useValidation, type ValidationRule } from '@/composables/validation/useValidation'
|
|
12
11
|
|
|
13
12
|
type DisplayFormat = 'code' | 'code-abbreviation' | 'code-country' | 'country' | 'abbreviation'
|
|
14
13
|
type Indicatif = {
|
|
@@ -32,6 +31,8 @@
|
|
|
32
31
|
customIndicatifs: { type: Array as PropType<Indicatif[]>, default: () => [] },
|
|
33
32
|
useCustomIndicatifsOnly: { type: Boolean, default: false },
|
|
34
33
|
isValidatedOnBlur: { type: Boolean, default: true },
|
|
34
|
+
displayAsterisk: { type: Boolean, default: false },
|
|
35
|
+
disableErrorHandling: { type: Boolean, default: false },
|
|
35
36
|
})
|
|
36
37
|
|
|
37
38
|
const emit = defineEmits(['update:modelValue', 'update:selectedDialCode', 'change'])
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
const dialCode = ref<string | Record<string, any>>(props.dialCodeModel || '')
|
|
42
43
|
const counter = ref(10)
|
|
43
44
|
const phoneMask = ref('## ## ## ## ##')
|
|
44
|
-
const hasError = ref(false)
|
|
45
45
|
const onBlur = ref(false)
|
|
46
46
|
|
|
47
47
|
function formatPhoneNumber(value: string): string {
|
|
@@ -94,25 +94,74 @@
|
|
|
94
94
|
return format[props.displayFormat] || ind.code
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
const validationRules = computed(() => {
|
|
98
|
-
const rules = [
|
|
97
|
+
const validationRules = computed<ValidationRule[]>(() => {
|
|
98
|
+
const rules = [{
|
|
99
|
+
type: 'exactLength',
|
|
100
|
+
options: {
|
|
101
|
+
length: counter.value,
|
|
102
|
+
ignoreSpace: true, // Ignorer les espaces dans la validation
|
|
103
|
+
message: `Le numéro de téléphone doit contenir ${counter.value} chiffres.`,
|
|
104
|
+
fieldIdentifier: locales.label,
|
|
105
|
+
},
|
|
106
|
+
}]
|
|
99
107
|
if (props.required) {
|
|
100
|
-
rules.unshift(
|
|
108
|
+
rules.unshift({
|
|
109
|
+
type: 'required',
|
|
110
|
+
options: {
|
|
111
|
+
length: counter.value,
|
|
112
|
+
ignoreSpace: true, // Ignorer les espaces dans la validation
|
|
113
|
+
message: `Le champ ${locales.label} est requis.`,
|
|
114
|
+
fieldIdentifier: locales.label,
|
|
115
|
+
},
|
|
116
|
+
})
|
|
101
117
|
}
|
|
102
118
|
return rules
|
|
103
119
|
})
|
|
104
120
|
|
|
121
|
+
// Initialisation du composable de validation
|
|
122
|
+
const validation = useValidation({
|
|
123
|
+
customRules: validationRules.value,
|
|
124
|
+
showSuccessMessages: true,
|
|
125
|
+
fieldIdentifier: locales.label,
|
|
126
|
+
disableErrorHandling: props.disableErrorHandling,
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
// Computed pour l'affichage des états
|
|
130
|
+
const hasError = computed(() => validation.hasError.value)
|
|
131
|
+
const hasWarning = computed(() => validation.hasWarning.value)
|
|
132
|
+
const hasSuccess = computed(() => validation.hasSuccess.value)
|
|
133
|
+
|
|
134
|
+
const errors = computed(() => validation.errors.value)
|
|
135
|
+
const warnings = computed(() => validation.warnings.value)
|
|
136
|
+
const successes = computed(() => validation.successes.value)
|
|
137
|
+
|
|
105
138
|
function validateInputOnBlur() {
|
|
106
139
|
if (!props.isValidatedOnBlur) return
|
|
107
140
|
|
|
108
|
-
hasError.value = false
|
|
109
|
-
const requiredValidation = !props.required || RequiredRule(phoneNumber.value) === true
|
|
110
|
-
const lengthValidation = exactLength(counter.value, true)(phoneNumber.value) === true
|
|
111
|
-
|
|
112
|
-
hasError.value = !(requiredValidation && lengthValidation)
|
|
113
141
|
onBlur.value = true
|
|
142
|
+
// On nettoie la valeur des espaces avant de la valider
|
|
143
|
+
const cleanedValue = phoneNumber.value.replace(/\s/g, '')
|
|
144
|
+
validation.validateField(cleanedValue, validationRules.value)
|
|
114
145
|
}
|
|
115
146
|
|
|
147
|
+
// Mise à jour de la validation lorsque le numéro de téléphone change
|
|
148
|
+
watch(phoneNumber, (newValue) => {
|
|
149
|
+
if (!props.isValidatedOnBlur || onBlur.value) {
|
|
150
|
+
// On nettoie la valeur des espaces avant de la valider
|
|
151
|
+
const cleanedValue = newValue.replace(/\s/g, '')
|
|
152
|
+
validation.validateField(cleanedValue, validationRules.value)
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
// Mise à jour de la validation lorsque les règles changent
|
|
157
|
+
watch(validationRules, () => {
|
|
158
|
+
if (onBlur.value) {
|
|
159
|
+
// On nettoie la valeur des espaces avant de la valider
|
|
160
|
+
const cleanedValue = phoneNumber.value.replace(/\s/g, '')
|
|
161
|
+
validation.validateField(cleanedValue, validationRules.value)
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
|
|
116
165
|
defineExpose({
|
|
117
166
|
computedValue,
|
|
118
167
|
dialCode,
|
|
@@ -121,6 +170,7 @@
|
|
|
121
170
|
hasError,
|
|
122
171
|
phoneNumber,
|
|
123
172
|
mergedDialCodes,
|
|
173
|
+
validation,
|
|
124
174
|
})
|
|
125
175
|
</script>
|
|
126
176
|
|
|
@@ -133,6 +183,9 @@
|
|
|
133
183
|
:label="locales.indicatifLabel"
|
|
134
184
|
:outlined="outlinedIndicatif"
|
|
135
185
|
:required="props.countryCodeRequired"
|
|
186
|
+
:display-asterisk="props.displayAsterisk"
|
|
187
|
+
:disable-error-handling="props.disableErrorHandling"
|
|
188
|
+
:return-object="true"
|
|
136
189
|
class="custom-select"
|
|
137
190
|
text-key="displayText"
|
|
138
191
|
value-key="code"
|
|
@@ -144,9 +197,18 @@
|
|
|
144
197
|
:counter-value="(value: string) => value.replace(/\s/g, '').length"
|
|
145
198
|
:label="locales.label"
|
|
146
199
|
:required="props.required"
|
|
147
|
-
:
|
|
200
|
+
:error="hasError"
|
|
201
|
+
:error-messages="errors"
|
|
202
|
+
:warning-messages="warnings"
|
|
203
|
+
:success-messages="successes"
|
|
148
204
|
:variant="outlined ? 'outlined' : 'underlined'"
|
|
149
|
-
|
|
205
|
+
:display-asterisk="props.displayAsterisk"
|
|
206
|
+
:class="{
|
|
207
|
+
'phone-field': true,
|
|
208
|
+
'error-field': hasError,
|
|
209
|
+
'warning-field': hasWarning,
|
|
210
|
+
'success-field': hasSuccess
|
|
211
|
+
}"
|
|
150
212
|
color="primary"
|
|
151
213
|
@blur="validateInputOnBlur"
|
|
152
214
|
@input="handlePhoneInput"
|
|
@@ -158,9 +220,6 @@
|
|
|
158
220
|
>
|
|
159
221
|
{{ mdiPhone }}
|
|
160
222
|
</VIcon>
|
|
161
|
-
<VIcon v-if="hasError">
|
|
162
|
-
{{ mdiInformation }}
|
|
163
|
-
</VIcon>
|
|
164
223
|
</template>
|
|
165
224
|
</SyTextField>
|
|
166
225
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const indicatifs = [
|
|
2
|
-
{ code: '+1', country: 'USA/Canada', abbreviation: 'US/CA', phoneLength: 10, mask: '
|
|
2
|
+
{ code: '+1', country: 'USA/Canada', abbreviation: 'US/CA', phoneLength: 10, mask: '### ### ####' },
|
|
3
3
|
{ code: '+7', country: 'Russia/Kazakhstan', abbreviation: 'RU/KZ', phoneLength: 10, mask: '### ### ## ##' },
|
|
4
4
|
{ code: '+20', country: 'Egypt', abbreviation: 'EG', phoneLength: 9, mask: '### ### ####' },
|
|
5
5
|
{ code: '+27', country: 'South Africa', abbreviation: 'ZA', phoneLength: 9, mask: '### ### ####' },
|
|
@@ -161,4 +161,44 @@ describe('PhoneField', () => {
|
|
|
161
161
|
const textField = wrapper.findComponent({ name: 'VTextField' })
|
|
162
162
|
expect(textField.props('variant')).toBe('underlined')
|
|
163
163
|
})
|
|
164
|
+
|
|
165
|
+
it('passes dialCode object to SyTextField when dialCode is set', async () => {
|
|
166
|
+
const wrapper = mount(PhoneField, {
|
|
167
|
+
global: {
|
|
168
|
+
plugins: [vuetify],
|
|
169
|
+
},
|
|
170
|
+
props: {
|
|
171
|
+
withCountryCode: true,
|
|
172
|
+
dialCodeModel: { code: '+33', abbreviation: 'FR', country: 'France', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
173
|
+
},
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
// Vérifier que le dialCode est bien un objet
|
|
177
|
+
expect(typeof wrapper.vm.dialCode).toBe('object')
|
|
178
|
+
|
|
179
|
+
// Trouver le composant SyTextField
|
|
180
|
+
const textField = wrapper.findComponent({ name: 'SyTextField' })
|
|
181
|
+
expect(textField.exists()).toBe(true)
|
|
182
|
+
|
|
183
|
+
// Vérifier que les propriétés du SyTextField sont correctement définies en fonction du dialCode
|
|
184
|
+
expect(wrapper.vm.phoneMask).toBe('## ## ## ## ##')
|
|
185
|
+
expect(wrapper.vm.counter).toBe(10)
|
|
186
|
+
|
|
187
|
+
// Vérifier que le SyTextField reçoit les bonnes propriétés
|
|
188
|
+
expect(textField.props('counter')).toBe(10)
|
|
189
|
+
|
|
190
|
+
// Vérifier que le SySelect est présent et reçoit l'objet dialCode
|
|
191
|
+
const select = wrapper.findComponent({ name: 'SySelect' })
|
|
192
|
+
expect(select.exists()).toBe(true)
|
|
193
|
+
expect(select.props('returnObject')).toBe(true)
|
|
194
|
+
|
|
195
|
+
// Vérifier que l'objet dialCode est correctement passé au SySelect via v-model
|
|
196
|
+
expect(wrapper.vm.dialCode).toEqual({
|
|
197
|
+
code: '+33',
|
|
198
|
+
abbreviation: 'FR',
|
|
199
|
+
country: 'France',
|
|
200
|
+
phoneLength: 10,
|
|
201
|
+
mask: '## ## ## ## ##',
|
|
202
|
+
})
|
|
203
|
+
})
|
|
164
204
|
})
|
|
@@ -141,7 +141,7 @@ export const Default: Story = {
|
|
|
141
141
|
code: `
|
|
142
142
|
<script setup lang="ts">
|
|
143
143
|
import { ref } from 'vue'
|
|
144
|
-
import RatingPicker from '@cnamts/synapse'
|
|
144
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
145
145
|
|
|
146
146
|
const ratingEmotion = ref(-1)
|
|
147
147
|
</script>
|
|
@@ -192,7 +192,7 @@ export const TwoEmotions: Story = {
|
|
|
192
192
|
code: `
|
|
193
193
|
<script setup lang="ts">
|
|
194
194
|
import { ref } from 'vue'
|
|
195
|
-
import RatingPicker from '@cnamts/synapse'
|
|
195
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
196
196
|
|
|
197
197
|
const ratingEmotion = ref(-1)
|
|
198
198
|
</script>
|
|
@@ -241,7 +241,7 @@ export const Numbers: Story = {
|
|
|
241
241
|
code: `
|
|
242
242
|
<script setup lang="ts">
|
|
243
243
|
import { ref } from 'vue'
|
|
244
|
-
import RatingPicker from '@cnamts/synapse'
|
|
244
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
245
245
|
|
|
246
246
|
const ratingNumber = ref(-1)
|
|
247
247
|
</script>
|
|
@@ -290,7 +290,7 @@ export const Stars: Story = {
|
|
|
290
290
|
code: `
|
|
291
291
|
<script setup lang="ts">
|
|
292
292
|
import { ref } from 'vue'
|
|
293
|
-
import RatingPicker from '@cnamts/synapse'
|
|
293
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
294
294
|
|
|
295
295
|
const ratingStar = ref(-1)
|
|
296
296
|
</script>
|
|
@@ -341,7 +341,7 @@ export const ReadOnly: Story = {
|
|
|
341
341
|
code: `
|
|
342
342
|
<script setup lang="ts">
|
|
343
343
|
import { ref } from 'vue'
|
|
344
|
-
import RatingPicker from '@cnamts/synapse'
|
|
344
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
345
345
|
|
|
346
346
|
const ratingEmotion = ref(-1)
|
|
347
347
|
</script>
|
|
@@ -392,7 +392,7 @@ export const HideAlert: Story = {
|
|
|
392
392
|
code: `
|
|
393
393
|
<script setup lang="ts">
|
|
394
394
|
import { ref } from 'vue'
|
|
395
|
-
import RatingPicker from '@cnamts/synapse'
|
|
395
|
+
import { RatingPicker } from '@cnamts/synapse'
|
|
396
396
|
|
|
397
397
|
const ratingEmotion = ref(-1)
|
|
398
398
|
</script>
|
|
@@ -488,7 +488,7 @@ export const DefaultSlot: Story = {
|
|
|
488
488
|
code: `
|
|
489
489
|
<script setup lang="ts">
|
|
490
490
|
import { ref } from 'vue'
|
|
491
|
-
import {RatingPicker, SySelect} from '@cnamts/synapse'
|
|
491
|
+
import { RatingPicker, SySelect } from '@cnamts/synapse'
|
|
492
492
|
import { VBtn, VSpacer } from 'vuetify/components'
|
|
493
493
|
|
|
494
494
|
const ratingEmotion = ref(-1)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={AccessStories} />
|
|
5
|
+
|
|
6
|
+
Accessibilité
|
|
7
|
+
=============
|
|
8
|
+
<Story of={AccessStories.Legende} />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
<Story of={AccessStories.AccessibilitePanel} />
|
|
14
|
+
<br />
|