@cnamts/synapse 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AutocompleteFilter-DXd4szWO.js → AutocompleteFilter-CGF33skz.js} +1 -1
- package/dist/{DateFilter-BD59Kgwf.js → DateFilter-D7-MsKtx.js} +1 -1
- package/dist/{NumberFilter-BSMZE7uw.js → NumberFilter-bjQPPfsj.js} +1 -1
- package/dist/{PeriodFilter-keUdSSk0.js → PeriodFilter-B3wJpK8-.js} +1 -1
- package/dist/{SelectFilter-Dhvvwazl.js → SelectFilter-BN6DbKAV.js} +1 -1
- package/dist/{TextFilter-CU8FpXz0.js → TextFilter-BffP0J2f.js} +1 -1
- package/dist/{apLightTheme2026-DbS7BPUf.js → apLightTheme2026-C4ygwMHC.js} +11 -11
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +6 -6
- package/dist/components/Captcha/Captcha.d.ts +27 -16
- package/dist/components/Captcha/CaptchaForm.d.ts +29 -3
- package/dist/components/Captcha/types.d.ts +14 -0
- package/dist/components/Captcha/useCaptchaValidation.d.ts +37 -0
- package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +33 -13
- package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts +23 -0
- package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts +2 -2
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectValidation.d.ts +2 -2
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +17 -48
- package/dist/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.d.ts +29 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +46 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +16 -51
- package/dist/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.d.ts +27 -0
- package/dist/components/Customs/SyCheckbox/types.d.ts +49 -0
- package/dist/components/Customs/SyTextField/FieldState.d.ts +5 -0
- package/dist/components/Customs/SyTextField/useSyTextFieldValidation.d.ts +3 -3
- package/dist/components/DialogBox/DialogBox.d.ts +2 -0
- package/dist/components/DialogBox/locales.d.ts +1 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +4 -0
- package/dist/components/LunarCalendar/LunarCalendar.d.ts +43 -14
- package/dist/components/LunarCalendar/types.d.ts +35 -0
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +11 -12
- package/dist/components/MonthPicker/MonthPicker.d.ts +72 -1747
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +21 -1733
- package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +5 -0
- package/dist/components/MonthPicker/locales.d.ts +1 -0
- package/dist/components/MonthPicker/types.d.ts +11 -0
- package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +37 -24
- package/dist/components/NirField/NirField.d.ts +6 -4
- package/dist/components/NirField/useNirValidation.d.ts +7 -5
- package/dist/components/PageContainer/PageContainer.d.ts +8 -0
- package/dist/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/components/PasswordField/usePasswordFieldValidation.d.ts +2 -2
- package/dist/components/PhoneField/PhoneField.d.ts +960 -1938
- package/dist/components/PhoneField/indicatifs.d.ts +715 -8
- package/dist/components/PhoneField/locales.d.ts +7 -0
- package/dist/components/PhoneField/types.d.ts +29 -0
- package/dist/components/PhoneField/usePhoneFieldValidation.d.ts +45 -0
- package/dist/components/PhoneField/usePhoneIndicatifs.d.ts +947 -0
- package/dist/components/SyTextArea/composables/useSyTextAreaValidation.d.ts +2 -2
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +1 -1
- package/dist/composables/unifyValidation/useValidation.d.ts +4 -5
- package/dist/design-system-v3.js +2 -2
- package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/baseTokens.d.ts +18 -18
- package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/pa/paLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/semanticTokens.d.ts +14 -14
- package/dist/{main-D8ryUoS5.js → main-C4wAktOs.js} +13718 -12991
- package/dist/synapse.css +1 -1
- package/dist/vuetifyConfig.js +1 -1
- package/package.json +7 -7
- package/src/assets/compat/_legacy-tokens.scss +91 -0
- package/src/assets/overrides/_utilities.scss +23 -0
- package/src/components/Accordion/Accordion.stories.ts +121 -1
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +0 -1
- package/src/components/Captcha/Captcha.stories.ts +134 -31
- package/src/components/Captcha/Captcha.vue +95 -28
- package/src/components/Captcha/CaptchaForm.vue +51 -22
- package/src/components/Captcha/tests/Captcha.focus.spec.ts +214 -0
- package/src/components/Captcha/tests/Captcha.spec.ts +233 -24
- package/src/components/Captcha/tests/CaptchaForm.spec.ts +82 -0
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +16 -42
- package/src/components/Captcha/types.ts +15 -0
- package/src/components/Captcha/useCaptchaValidation.ts +87 -0
- package/src/components/Captcha/validation/validation.stories.ts +1194 -0
- package/src/components/ChipList/ChipList.mdx +0 -1
- package/src/components/CollapsibleList/CollapsibleList.mdx +0 -1
- package/src/components/CookieBanner/CookieBanner.mdx +0 -1
- package/src/components/CopyBtn/CopyBtn.mdx +0 -1
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +123 -439
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +147 -41
- package/src/components/Customs/Selects/SelectBtnField/Validation/Validation.stories.ts +600 -0
- package/src/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.ts +87 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +402 -33
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +52 -38
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +342 -162
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +77 -129
- package/src/components/Customs/SyCheckBoxGroup/Validation/Validation.stories.ts +1008 -0
- package/src/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.ts +107 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +180 -7
- package/src/components/Customs/SyCheckBoxGroup/types.ts +49 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +41 -161
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +71 -148
- package/src/components/Customs/SyCheckbox/Validation/Validation.stories.ts +654 -0
- package/src/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.ts +105 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +106 -0
- package/src/components/Customs/SyCheckbox/tests/useSyCheckboxValidation.spec.ts +98 -0
- package/src/components/Customs/SyCheckbox/types.ts +51 -0
- package/src/components/Customs/SyTextField/FieldState.vue +50 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +12 -9
- package/src/components/Customs/SyTextField/useSyTextFieldValidation.ts +2 -11
- package/src/components/DataList/DataList.mdx +0 -1
- package/src/components/DataListGroup/DataListGroup.mdx +0 -1
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +0 -1
- package/src/components/DialogBox/DialogBox.mdx +0 -1
- package/src/components/DialogBox/DialogBox.stories.ts +399 -4
- package/src/components/DialogBox/DialogBox.vue +20 -0
- package/src/components/DialogBox/locales.ts +1 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +73 -0
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +24 -0
- package/src/components/ErrorPage/ErrorPage.mdx +1 -1
- package/src/components/ExternalLinks/ExternalLinks.mdx +0 -1
- package/src/components/FileList/FileList.mdx +0 -1
- package/src/components/FilterInline/FilterInline.mdx +0 -1
- package/src/components/FilterSideBar/FilterSideBar.mdx +8 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +133 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +19 -2
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +55 -0
- package/src/components/FooterBar/FooterBar.mdx +0 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +0 -1
- package/src/components/HeaderBar/HeaderBar.mdx +0 -1
- package/src/components/HeaderLoading/HeaderLoading.mdx +0 -1
- package/src/components/LangBtn/LangBtn.mdx +0 -1
- package/src/components/Logo/Logo.mdx +1 -1
- package/src/components/LunarCalendar/LunarCalendar.mdx +6 -9
- package/src/components/LunarCalendar/LunarCalendar.stories.ts +243 -46
- package/src/components/LunarCalendar/LunarCalendar.vue +61 -26
- package/src/components/LunarCalendar/Validation/Validation.stories.ts +717 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +1 -1
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +197 -6
- package/src/components/LunarCalendar/tests/useLunarCalendarValidation.spec.ts +287 -0
- package/src/components/LunarCalendar/types.ts +39 -0
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +115 -39
- package/src/components/MonthPicker/MonthPicker.stories.ts +38 -281
- package/src/components/MonthPicker/MonthPicker.vue +66 -17
- package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +44 -20
- package/src/components/MonthPicker/MonthPickerText/useTextField.ts +5 -0
- package/src/components/MonthPicker/Validation/Validation.stories.ts +1117 -0
- package/src/components/MonthPicker/locales.ts +1 -0
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +353 -2
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +12 -8
- package/src/components/MonthPicker/types.ts +16 -0
- package/src/components/MonthPicker/useMonthPickerValidation.ts +64 -27
- package/src/components/NirField/NirField.mdx +120 -66
- package/src/components/NirField/NirField.stories.ts +216 -0
- package/src/components/NirField/useNirValidation.ts +16 -17
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +263 -245
- package/src/components/NotificationBar/NotificationBar.mdx +0 -1
- package/src/components/PageContainer/PageContainer.mdx +0 -1
- package/src/components/PageContainer/PageContainer.stories.ts +170 -2
- package/src/components/PageContainer/PageContainer.vue +63 -8
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +19 -11
- package/src/components/PaginatedTable/PaginatedTable.mdx +0 -1
- package/src/components/PeriodField/PeriodField.mdx +0 -1
- package/src/components/PhoneField/PhoneField.mdx +2 -3
- package/src/components/PhoneField/PhoneField.stories.ts +227 -410
- package/src/components/PhoneField/PhoneField.vue +204 -438
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/PhoneField/locales.ts +7 -0
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -1
- package/src/components/PhoneField/tests/PhoneField.spec.ts +517 -220
- package/src/components/PhoneField/types.ts +30 -0
- package/src/components/PhoneField/usePhoneFieldValidation.ts +119 -0
- package/src/components/PhoneField/usePhoneIndicatifs.ts +89 -0
- package/src/components/PhoneField/validation/validation.stories.ts +717 -0
- package/src/components/RangeField/RangeField.mdx +0 -1
- package/src/components/RatingPicker/RatingPicker.mdx +0 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +0 -1
- package/src/components/StatusPage/StatusPage.vue +1 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +248 -230
- package/src/components/SubHeader/SubHeader.mdx +5 -6
- package/src/components/Tables/common/tests/SyTableFilter.spec.ts +11 -12
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +0 -1
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +0 -1
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +177 -0
- package/src/composables/unifyValidation/documentationValidationProps.ts +1 -1
- package/src/composables/unifyValidation/tests/useValidation.spec.ts +13 -1
- package/src/composables/unifyValidation/useValidation.ts +37 -33
- package/src/composantsVuetify/VCard/VCard.mdx +4 -0
- package/src/composantsVuetify/VCard/v-card.stories.ts +93 -1
- package/src/composantsVuetify/VCarousel/VCarousel.mdx +74 -0
- package/src/composantsVuetify/VCarousel/v-carousel.stories.ts +531 -0
- package/src/composantsVuetify/VNavigationDrawer/VNavgationDrawer.mdx +53 -0
- package/src/composantsVuetify/VNavigationDrawer/v-navigation-drawer.stories.ts +310 -0
- package/src/composantsVuetify/VSlideGroup/VSlideGroup.mdx +105 -0
- package/src/composantsVuetify/VSlideGroup/v-slide-group.stories.ts +463 -0
- package/src/designTokens/tokens/baseColors.ts +1 -1
- package/src/designTokens/tokens/baseTokens.ts +18 -18
- package/src/stories/Components/Components.stories.ts +34 -1
- package/src/stories/Demarrer/Releases.stories.ts +16 -2
- package/src/stories/DesignTokens/Arrondis.mdx +1 -1
- package/src/stories/DesignTokens/Correspondances.mdx +219 -0
- package/src/stories/DesignTokens/UtiliserLesTokens.mdx +235 -0
- package/src/stories/DesignTokens/colors.stories.ts +569 -569
- package/src/stories/GuideDuDev/Amelipro.stories.ts +335 -267
- package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +0 -5
- package/dist/components/PhoneField/tests/types.d.ts +0 -18
- package/src/components/LunarCalendar/tests/useLunarCalendarRules.spec.ts +0 -184
- package/src/components/LunarCalendar/useLunarCalendarRules.ts +0 -96
- package/src/components/PhoneField/tests/types.d.ts +0 -19
package/dist/vuetifyConfig.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as e, h as b, f as S, a as h, c as u, i as w, e as k, d as z } from "./apLightTheme2026-
|
|
1
|
+
import { g as e, h as b, f as S, a as h, c as u, i as w, e as k, d as z } from "./apLightTheme2026-C4ygwMHC.js";
|
|
2
2
|
import * as W from "vuetify/components";
|
|
3
3
|
import * as H from "vuetify/directives";
|
|
4
4
|
import { mdi as F, aliases as V } from "vuetify/iconsets/mdi-svg";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cnamts/synapse",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CNAM DS v3",
|
|
6
6
|
"type": "module",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"cross-env": "^10.1.0",
|
|
96
96
|
"cypress": "^15.13.0",
|
|
97
97
|
"eslint": "^9.13.0",
|
|
98
|
-
"eslint-plugin-storybook": "^0.
|
|
98
|
+
"eslint-plugin-storybook": "^0.12.0",
|
|
99
99
|
"eslint-plugin-vue": "^9.30.0",
|
|
100
100
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
101
101
|
"happy-dom": "^20.8.8",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"vitest": "^4.1.0",
|
|
123
123
|
"vitest-axe": "^0.1.0",
|
|
124
124
|
"vue": "^3.5.18",
|
|
125
|
-
"vue-component-type-helpers": "2.2.
|
|
125
|
+
"vue-component-type-helpers": "2.2.12",
|
|
126
126
|
"vue-router": "^4.4.5",
|
|
127
127
|
"vue-tsc": "^2.1.8",
|
|
128
128
|
"vue3-snapshot-serializer": "^2.9.0"
|
|
@@ -144,17 +144,17 @@
|
|
|
144
144
|
"access": "public"
|
|
145
145
|
},
|
|
146
146
|
"overrides": {
|
|
147
|
-
"esbuild": "
|
|
147
|
+
"esbuild": ">=0.28.1",
|
|
148
148
|
"parse5": "7.1.2",
|
|
149
149
|
"npm": "^11.8.1",
|
|
150
|
-
"undici": "
|
|
150
|
+
"undici": ">=6.27.0 <8",
|
|
151
151
|
"rollup": "^4.59.0",
|
|
152
152
|
"immutable": ">=5.1.5"
|
|
153
153
|
},
|
|
154
154
|
"pnpm": {
|
|
155
155
|
"overrides": {
|
|
156
|
-
"esbuild": "
|
|
157
|
-
"undici": "
|
|
156
|
+
"esbuild": ">=0.28.1",
|
|
157
|
+
"undici": ">=6.27.0 <8",
|
|
158
158
|
"glob": ">=10.5.0",
|
|
159
159
|
"js-yaml": ">=4.1.1",
|
|
160
160
|
"parse5": "7.1.2",
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Shim de compatibilité — ré-expose les anciens tokens SCSS (<= 1.0.24)
|
|
3
|
+
// vers les variables CSS du thème (>= 1.0.25).
|
|
4
|
+
// À utiliser UNIQUEMENT pour faciliter la migration d'un projet qui consommait
|
|
5
|
+
// l'ancien export SCSS (`$gap-2`, `$radius-rounded-lg`, …). À terme, préférez
|
|
6
|
+
// directement les variables CSS (`var(--v-gap-N)`, `var(--v-radius-…)`, …).
|
|
7
|
+
// Usage (côté projet) :
|
|
8
|
+
// @use '@cnamts/synapse/assets/compat/legacy-tokens' as *;
|
|
9
|
+
// .box { gap: $gap-2; } // -> gap: var(--v-gap-2);
|
|
10
|
+
// Limite : ces variables contiennent une `var(--…)` (résolue au runtime).
|
|
11
|
+
// Elles conviennent pour des affectations directes (`gap`, `padding`, `margin`,
|
|
12
|
+
// `border-radius`, `font-size`, `color`…) mais PAS pour des opérations SCSS
|
|
13
|
+
// compile-time (`calc` Sass, fonctions de couleur…). Pour ces cas, utilisez
|
|
14
|
+
// `calc()` CSS ou des valeurs en dur.
|
|
15
|
+
// =============================================================================
|
|
16
|
+
|
|
17
|
+
// --- Espacements : $gap-0 … $gap-16 -> var(--v-gap-N) ------------------------
|
|
18
|
+
$gap-0: var(--v-gap-0) !default;
|
|
19
|
+
$gap-1: var(--v-gap-1) !default;
|
|
20
|
+
$gap-2: var(--v-gap-2) !default;
|
|
21
|
+
$gap-3: var(--v-gap-3) !default;
|
|
22
|
+
$gap-4: var(--v-gap-4) !default;
|
|
23
|
+
$gap-5: var(--v-gap-5) !default;
|
|
24
|
+
$gap-6: var(--v-gap-6) !default;
|
|
25
|
+
$gap-7: var(--v-gap-7) !default;
|
|
26
|
+
$gap-8: var(--v-gap-8) !default;
|
|
27
|
+
$gap-9: var(--v-gap-9) !default;
|
|
28
|
+
$gap-10: var(--v-gap-10) !default;
|
|
29
|
+
$gap-11: var(--v-gap-11) !default;
|
|
30
|
+
$gap-12: var(--v-gap-12) !default;
|
|
31
|
+
$gap-13: var(--v-gap-13) !default;
|
|
32
|
+
$gap-14: var(--v-gap-14) !default;
|
|
33
|
+
$gap-15: var(--v-gap-15) !default;
|
|
34
|
+
$gap-16: var(--v-gap-16) !default;
|
|
35
|
+
|
|
36
|
+
// --- Paddings : $padding-N -> var(--v-padding-N) -----------------------------
|
|
37
|
+
$padding-0: var(--v-padding-0) !default;
|
|
38
|
+
$padding-2: var(--v-padding-2) !default;
|
|
39
|
+
$padding-3: var(--v-padding-3) !default;
|
|
40
|
+
$padding-4: var(--v-padding-4) !default;
|
|
41
|
+
$padding-6: var(--v-padding-6) !default;
|
|
42
|
+
$padding-8: var(--v-padding-8) !default;
|
|
43
|
+
$padding-10: var(--v-padding-10) !default;
|
|
44
|
+
$padding-14: var(--v-padding-14) !default;
|
|
45
|
+
$padding-16: var(--v-padding-16) !default;
|
|
46
|
+
|
|
47
|
+
// --- Arrondis : $radius-rounded-* -> var(--v-radius-*) -----------------------
|
|
48
|
+
$radius-rounded-0: var(--v-radius-rounded0) !default;
|
|
49
|
+
$radius-rounded: var(--v-radius-rounded) !default;
|
|
50
|
+
$radius-rounded-md: var(--v-radius-rounded) !default; // 'md' (4px) = rounded
|
|
51
|
+
$radius-rounded-lg: var(--v-radius-roundedLg) !default;
|
|
52
|
+
$radius-rounded-pill: var(--v-radius-roundedPill) !default;
|
|
53
|
+
|
|
54
|
+
// --- Typographie : $font-size-* -> var(--v-fontSize-*) -----------------------
|
|
55
|
+
$font-size-title: var(--v-fontSize-titres) !default;
|
|
56
|
+
$font-size-alt-title: var(--v-fontSize-titresAlternatifs) !default;
|
|
57
|
+
$font-size-body-text: var(--v-fontSize-corpsDeTexte) !default;
|
|
58
|
+
$font-size-link-label: var(--v-fontSize-liensEtLibelles) !default;
|
|
59
|
+
|
|
60
|
+
// --- Espacements sémantiques : $spacing-* -> échelle gap (mêmes valeurs) ------
|
|
61
|
+
// (Pas de variable CSS dédiée : on réutilise --v-gap-N de valeur identique.)
|
|
62
|
+
$spacing-none: var(--v-gap-0) !default;
|
|
63
|
+
$spacing-xx-small: var(--v-gap-1) !default; // 4px
|
|
64
|
+
$spacing-x-small: var(--v-gap-2) !default; // 8px
|
|
65
|
+
$spacing-small: var(--v-gap-4) !default; // 16px
|
|
66
|
+
$spacing-medium: var(--v-gap-6) !default; // 24px
|
|
67
|
+
$spacing-large: var(--v-gap-8) !default; // 32px
|
|
68
|
+
$spacing-x-large: var(--v-gap-10) !default; // 40px
|
|
69
|
+
$spacing-xx-large: var(--v-gap-14) !default; // 56px
|
|
70
|
+
$spacing-xxx-large: var(--v-gap-16) !default; // 64px
|
|
71
|
+
$spacing-huge: 80px !default; // pas d'équivalent (> gap-16) : valeur en dur
|
|
72
|
+
|
|
73
|
+
$spacing-horizontal-none: var(--v-gap-0) !default;
|
|
74
|
+
$spacing-horizontal-xx-small: var(--v-gap-1) !default;
|
|
75
|
+
$spacing-horizontal-x-small: var(--v-gap-2) !default;
|
|
76
|
+
$spacing-horizontal-small: var(--v-gap-4) !default;
|
|
77
|
+
$spacing-horizontal-medium: var(--v-gap-6) !default;
|
|
78
|
+
$spacing-horizontal-large: var(--v-gap-8) !default;
|
|
79
|
+
$spacing-horizontal-x-large: var(--v-gap-10) !default;
|
|
80
|
+
$spacing-horizontal-xx-large: var(--v-gap-14) !default;
|
|
81
|
+
$spacing-horizontal-xxx-large: var(--v-gap-16) !default;
|
|
82
|
+
$spacing-horizontal-huge: 80px !default;
|
|
83
|
+
|
|
84
|
+
// --- Couleurs ----------------------------------------------------------------
|
|
85
|
+
// Les couleurs de thème sont des triplets RVB : utilisez-les directement via
|
|
86
|
+
// color: rgb(var(--v-theme-primary));
|
|
87
|
+
// background: rgba(var(--v-theme-primary), 0.08);
|
|
88
|
+
// Palette : rgb(var(--v-theme-<couleur>-<variante>)), ex. var(--v-theme-blue-base).
|
|
89
|
+
// Le shim ne ré-expose volontairement pas l'ancienne palette en dur (> 100 valeurs)
|
|
90
|
+
// pour rester aligné sur le thème actif. Si besoin ponctuel, aliasez côté projet :
|
|
91
|
+
// $primary: rgb(var(--v-theme-primary));
|
|
@@ -7,3 +7,26 @@
|
|
|
7
7
|
.theme-ap2026 {
|
|
8
8
|
--footer-background: rgb(var(--v-theme-primary));
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
.theme-cnam,
|
|
12
|
+
.theme-pa,
|
|
13
|
+
.theme-ap,
|
|
14
|
+
.theme-ap2026 {
|
|
15
|
+
--carousel-controls-background: rgb(255 255 255);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.v-carousel .v-carousel__controls {
|
|
19
|
+
background-color: var(--carousel-controls-background) !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Style pour tous les indicateurs (non actifs)
|
|
23
|
+
.v-carousel .v-carousel__controls .v-btn .v-icon {
|
|
24
|
+
color: rgb(var(--v-theme-disabled)) !important;
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Style pour l'indicateur actif
|
|
29
|
+
.v-carousel .v-carousel__controls .v-btn--active .v-icon {
|
|
30
|
+
color: rgb(var(--v-theme-primary)) !important;
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import { fn } from '@storybook/test'
|
|
3
3
|
import Accordion from './Accordion.vue'
|
|
4
|
-
import {
|
|
4
|
+
import { SyIcon } from '@/components'
|
|
5
|
+
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
6
|
+
import { mdiCloseCircleOutline } from '@mdi/js'
|
|
7
|
+
import {
|
|
8
|
+
VStepper,
|
|
9
|
+
VStepperHeader,
|
|
10
|
+
VStepperItem,
|
|
11
|
+
VStepperWindow,
|
|
12
|
+
VStepperWindowItem,
|
|
13
|
+
VStepperActions,
|
|
14
|
+
} from 'vuetify/components'
|
|
15
|
+
import { computed, reactive, ref } from 'vue'
|
|
5
16
|
|
|
6
17
|
const meta: Meta<typeof Accordion> = {
|
|
7
18
|
title: 'Composants/Données/Accordion',
|
|
@@ -489,3 +500,112 @@ export const PreOpened: Story = {
|
|
|
489
500
|
`,
|
|
490
501
|
}),
|
|
491
502
|
}
|
|
503
|
+
|
|
504
|
+
export const WithCustomContent: Story = {
|
|
505
|
+
parameters: {
|
|
506
|
+
sourceCode: [
|
|
507
|
+
{
|
|
508
|
+
language: 'vue',
|
|
509
|
+
code: `<template>
|
|
510
|
+
<Accordion
|
|
511
|
+
:items="[
|
|
512
|
+
{ id: 'item1', title: 'Section 1', content: 'Contenu de la section 1' },
|
|
513
|
+
{ id: 'item2', title: 'Section 2', content: 'Contenu de la section 2' },
|
|
514
|
+
]"
|
|
515
|
+
:heading-level="5"
|
|
516
|
+
/>
|
|
517
|
+
</template>`,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
},
|
|
521
|
+
args: {
|
|
522
|
+
items: defaultItems.slice(0, 1),
|
|
523
|
+
headingLevel: 3,
|
|
524
|
+
},
|
|
525
|
+
render: args => ({
|
|
526
|
+
components: {
|
|
527
|
+
Accordion,
|
|
528
|
+
VStepper,
|
|
529
|
+
VStepperHeader,
|
|
530
|
+
VStepperItem,
|
|
531
|
+
VStepperWindow,
|
|
532
|
+
VStepperWindowItem,
|
|
533
|
+
VStepperActions,
|
|
534
|
+
SyCheckbox,
|
|
535
|
+
SyIcon,
|
|
536
|
+
},
|
|
537
|
+
setup() {
|
|
538
|
+
const steps = reactive([
|
|
539
|
+
{ id: 1, error: false, complete: true, editable: true },
|
|
540
|
+
{ id: 2, error: true, complete: false, editable: true },
|
|
541
|
+
{ id: 3, error: false, complete: false, editable: true },
|
|
542
|
+
])
|
|
543
|
+
const step = ref(2)
|
|
544
|
+
|
|
545
|
+
const close = mdiCloseCircleOutline
|
|
546
|
+
|
|
547
|
+
const hasError = computed(() =>
|
|
548
|
+
steps.some(s => s.error),
|
|
549
|
+
)
|
|
550
|
+
return { args, step, close, steps, hasError }
|
|
551
|
+
},
|
|
552
|
+
template: `
|
|
553
|
+
<div class="pa-4">
|
|
554
|
+
<Accordion v-bind="args" >
|
|
555
|
+
<template #right-content>
|
|
556
|
+
<SyIcon
|
|
557
|
+
v-if="hasError"
|
|
558
|
+
:icon="close"
|
|
559
|
+
color="rgb(var(--v-theme-error))"
|
|
560
|
+
/> </template>
|
|
561
|
+
<template #content="{ item }">
|
|
562
|
+
<VStepper v-model="step">
|
|
563
|
+
<template #default="{ prev, next }">
|
|
564
|
+
<VStepperHeader>
|
|
565
|
+
<VStepperItem
|
|
566
|
+
v-for="stepItem in steps"
|
|
567
|
+
:key="stepItem.id"
|
|
568
|
+
:value="stepItem.id"
|
|
569
|
+
:error="stepItem.error"
|
|
570
|
+
:editable="stepItem.editable"
|
|
571
|
+
:complete="stepItem.complete"
|
|
572
|
+
:title="'Étape ' + stepItem.id"
|
|
573
|
+
/>
|
|
574
|
+
</VStepperHeader>
|
|
575
|
+
|
|
576
|
+
<VStepperWindow>
|
|
577
|
+
<VStepperWindowItem
|
|
578
|
+
v-for="(step) in steps"
|
|
579
|
+
:key="step.id"
|
|
580
|
+
:value="step.id"
|
|
581
|
+
>
|
|
582
|
+
<div style="padding: 24px;">
|
|
583
|
+
<h3>Contenu de l'étape {{ step.id }}</h3>
|
|
584
|
+
|
|
585
|
+
<SyCheckbox
|
|
586
|
+
v-model="step.error"
|
|
587
|
+
label="Cochez pour obtenir une erreur"
|
|
588
|
+
/>
|
|
589
|
+
|
|
590
|
+
<p v-if="step.error" style="color: rgb(var(--v-theme-error));">
|
|
591
|
+
Cette étape contient des erreurs.
|
|
592
|
+
</p>
|
|
593
|
+
|
|
594
|
+
<p v-else-if="step.complete">
|
|
595
|
+
Cette étape est complétée.
|
|
596
|
+
</p>
|
|
597
|
+
|
|
598
|
+
<p v-else>
|
|
599
|
+
Ceci est le contenu de l'étape {{ step.id }}.
|
|
600
|
+
</p>
|
|
601
|
+
</div>
|
|
602
|
+
</VStepperWindowItem>
|
|
603
|
+
</VStepperWindow>
|
|
604
|
+
</template>
|
|
605
|
+
</VStepper>
|
|
606
|
+
</template>
|
|
607
|
+
</Accordion>
|
|
608
|
+
</div>
|
|
609
|
+
`,
|
|
610
|
+
}),
|
|
611
|
+
}
|
|
@@ -27,7 +27,6 @@ Ce composant peut être utilisé à la racine de la page ou bien dans un composa
|
|
|
27
27
|
import { BackToTopBtn } from '@cnamts/synapse'
|
|
28
28
|
import { VCard, VSheet } from 'vuetify/components'
|
|
29
29
|
</script>
|
|
30
|
-
import '../../stories/styles/shared.css';
|
|
31
30
|
|
|
32
31
|
<template>
|
|
33
32
|
<VCard
|
|
@@ -3,6 +3,7 @@ import type { StoryObj } from '@storybook/vue3'
|
|
|
3
3
|
import { fn } from '@storybook/test'
|
|
4
4
|
import { ref, watch } from 'vue'
|
|
5
5
|
import SyAlert from '../SyAlert/SyAlert.vue'
|
|
6
|
+
import { getValidationDocumentation } from '@/composables/unifyValidation/documentationValidationProps.ts'
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Composants/Formulaires/Captcha',
|
|
@@ -17,6 +18,7 @@ export default {
|
|
|
17
18
|
control: false,
|
|
18
19
|
table: {
|
|
19
20
|
type: { summary: 'string' },
|
|
21
|
+
category: 'props',
|
|
20
22
|
},
|
|
21
23
|
},
|
|
22
24
|
'urlGetImage': {
|
|
@@ -24,6 +26,7 @@ export default {
|
|
|
24
26
|
control: false,
|
|
25
27
|
table: {
|
|
26
28
|
type: { summary: 'string' },
|
|
29
|
+
category: 'props',
|
|
27
30
|
},
|
|
28
31
|
},
|
|
29
32
|
'urlGetAudio': {
|
|
@@ -31,11 +34,16 @@ export default {
|
|
|
31
34
|
control: false,
|
|
32
35
|
table: {
|
|
33
36
|
type: { summary: 'string' },
|
|
37
|
+
category: 'props',
|
|
34
38
|
},
|
|
35
39
|
},
|
|
36
40
|
'modelValue': {
|
|
37
41
|
description: 'La valeur du champs de captcha',
|
|
38
42
|
control: 'string',
|
|
43
|
+
table: {
|
|
44
|
+
type: { summary: 'string' },
|
|
45
|
+
category: 'props',
|
|
46
|
+
},
|
|
39
47
|
},
|
|
40
48
|
'type': {
|
|
41
49
|
description: 'Le type de captcha affiché.',
|
|
@@ -46,26 +54,31 @@ export default {
|
|
|
46
54
|
table: {
|
|
47
55
|
type: { summary: 'image | audio | choice' },
|
|
48
56
|
defaultValue: { summary: '"image"' },
|
|
57
|
+
category: 'props',
|
|
49
58
|
},
|
|
50
59
|
},
|
|
51
|
-
'
|
|
52
|
-
description: '
|
|
60
|
+
'tagTitle': {
|
|
61
|
+
description: 'Le tag du titre de la section.',
|
|
53
62
|
control: 'text',
|
|
54
63
|
table: {
|
|
55
64
|
type: { summary: 'string' },
|
|
65
|
+
defaultValue: { summary: 'h2' },
|
|
66
|
+
category: 'props',
|
|
56
67
|
},
|
|
57
68
|
},
|
|
58
|
-
'tagTitle': {
|
|
59
|
-
description: 'Le tag du titre de la section.',
|
|
60
|
-
},
|
|
61
69
|
'helpDesk': {
|
|
62
70
|
description: 'Le numéro de téléphone du support pour garantir l\'accessibilité du parcours aux personnes en situation de handicap.',
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: 'string' },
|
|
73
|
+
category: 'props',
|
|
74
|
+
},
|
|
63
75
|
},
|
|
64
76
|
'locale': {
|
|
65
77
|
description: 'La locale (langue) à utiliser pour la génération du captcha. Par défaut, la langue du navigateur est utilisée.',
|
|
66
78
|
control: 'text',
|
|
67
79
|
table: {
|
|
68
80
|
type: { summary: 'string' },
|
|
81
|
+
category: 'props',
|
|
69
82
|
},
|
|
70
83
|
},
|
|
71
84
|
'locales': {
|
|
@@ -74,6 +87,7 @@ export default {
|
|
|
74
87
|
table: {
|
|
75
88
|
type: { summary: 'object' },
|
|
76
89
|
defaultValue: { summary: 'locales (importé depuis le fichier locales.ts)' },
|
|
90
|
+
category: 'props',
|
|
77
91
|
},
|
|
78
92
|
},
|
|
79
93
|
'update:modelValue': {
|
|
@@ -81,6 +95,7 @@ export default {
|
|
|
81
95
|
control: false,
|
|
82
96
|
table: {
|
|
83
97
|
type: { summary: 'string' },
|
|
98
|
+
category: 'events',
|
|
84
99
|
},
|
|
85
100
|
},
|
|
86
101
|
'update:type': {
|
|
@@ -88,6 +103,7 @@ export default {
|
|
|
88
103
|
control: false,
|
|
89
104
|
table: {
|
|
90
105
|
type: { summary: 'image | audio' },
|
|
106
|
+
category: 'events',
|
|
91
107
|
},
|
|
92
108
|
},
|
|
93
109
|
'imageError': {
|
|
@@ -95,6 +111,7 @@ export default {
|
|
|
95
111
|
control: false,
|
|
96
112
|
table: {
|
|
97
113
|
type: { summary: 'void' },
|
|
114
|
+
category: 'events',
|
|
98
115
|
},
|
|
99
116
|
},
|
|
100
117
|
'audioError': {
|
|
@@ -102,6 +119,7 @@ export default {
|
|
|
102
119
|
control: false,
|
|
103
120
|
table: {
|
|
104
121
|
type: { summary: 'void' },
|
|
122
|
+
category: 'events',
|
|
105
123
|
},
|
|
106
124
|
},
|
|
107
125
|
'creationError': {
|
|
@@ -109,16 +127,59 @@ export default {
|
|
|
109
127
|
control: false,
|
|
110
128
|
table: {
|
|
111
129
|
type: { summary: 'void' },
|
|
130
|
+
category: 'events',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
'isClearable': {
|
|
134
|
+
description: 'Indique si le champ de captcha est effaçable ou non.',
|
|
135
|
+
control: 'boolean',
|
|
136
|
+
table: {
|
|
137
|
+
type: { summary: 'boolean' },
|
|
138
|
+
defaultValue: { summary: 'false' },
|
|
139
|
+
category: 'props',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
'captchaId': {
|
|
143
|
+
description: 'L\'identifiant du captcha en cours. Utile pour les tests et la validation.',
|
|
144
|
+
control: false,
|
|
145
|
+
table: {
|
|
146
|
+
type: { summary: 'string' },
|
|
147
|
+
category: 'expose',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
'clearValidation': {
|
|
151
|
+
description: 'Méthode exposée pour effacer la validation du captcha.',
|
|
152
|
+
control: false,
|
|
153
|
+
table: {
|
|
154
|
+
type: { summary: '() => void' },
|
|
155
|
+
category: 'expose',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
'validateOnSubmit': {
|
|
159
|
+
description: 'Méthode exposée pour déclencher les règles de validation.',
|
|
160
|
+
control: false,
|
|
161
|
+
table: {
|
|
162
|
+
type: { summary: '() => Promise<boolean>' },
|
|
163
|
+
category: 'expose',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
'reset': {
|
|
167
|
+
description: 'Méthode exposée pour réinitialiser le captcha.',
|
|
168
|
+
control: false,
|
|
169
|
+
table: {
|
|
170
|
+
type: { summary: '() => void' },
|
|
171
|
+
category: 'expose',
|
|
112
172
|
},
|
|
113
173
|
},
|
|
174
|
+
...getValidationDocumentation(),
|
|
114
175
|
},
|
|
115
|
-
|
|
116
176
|
}
|
|
117
177
|
|
|
118
178
|
type Story = StoryObj<typeof Captcha>
|
|
119
179
|
|
|
120
180
|
export const Default: Story = {
|
|
121
181
|
args: {
|
|
182
|
+
'showSuccessMessages': true,
|
|
122
183
|
'onUpdate:modelValue': fn(),
|
|
123
184
|
'onUpdate:type': fn(),
|
|
124
185
|
'onImageError': fn(),
|
|
@@ -133,26 +194,52 @@ export const Default: Story = {
|
|
|
133
194
|
watch(() => args.modelValue, () => {
|
|
134
195
|
captchaValue.value = args.modelValue
|
|
135
196
|
})
|
|
197
|
+
|
|
198
|
+
// Vérification simulée : seules ces réponses correspondent à l'image.
|
|
136
199
|
const verifyCaptcha = () => {
|
|
137
200
|
if (captchaValue.value === 'ytqZNq' || captchaValue.value === '941335') {
|
|
138
201
|
return Promise.resolve({ response: { data: { message: 'Success' } } })
|
|
139
202
|
}
|
|
140
|
-
|
|
141
|
-
return Promise.reject({ response: { data: { message: 'Le captcha est incorrect' } } })
|
|
142
|
-
}
|
|
203
|
+
return Promise.reject({ response: { data: { message: 'Le captcha est incorrect' } } })
|
|
143
204
|
}
|
|
144
205
|
|
|
145
|
-
|
|
206
|
+
const customRules = [
|
|
207
|
+
{
|
|
208
|
+
type: 'custom',
|
|
209
|
+
options: {
|
|
210
|
+
validate: (value: string) => String(value || '').length >= 6,
|
|
211
|
+
message: 'Le captcha doit contenir au moins 6 caractères.',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
type: 'custom',
|
|
216
|
+
options: {
|
|
217
|
+
validate: async () => {
|
|
218
|
+
try {
|
|
219
|
+
const r = await verifyCaptcha()
|
|
220
|
+
return r.response.data.message === 'Success'
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
return false
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
message: 'Le captcha est incorrect',
|
|
227
|
+
successMessage: 'Le captcha est correct',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
]
|
|
231
|
+
|
|
232
|
+
return { args, captchaValue, customRules }
|
|
146
233
|
},
|
|
147
234
|
template: `
|
|
148
235
|
<VCard class="pa-8" max-width="600" min-width="300">
|
|
149
|
-
<Captcha
|
|
236
|
+
<Captcha
|
|
150
237
|
url-create="https://free.mockerapi.com/mock/0adac32b-e832-4553-aa7f-0011b7f35f0c"
|
|
151
238
|
url-get-image="/captcha/captcha.png"
|
|
152
239
|
url-get-audio="/captcha/captcha.mp3"
|
|
153
|
-
:service="verifyCaptcha"
|
|
154
240
|
v-bind="args"
|
|
155
241
|
v-model="captchaValue"
|
|
242
|
+
:custom-rules="customRules"
|
|
156
243
|
/>
|
|
157
244
|
</VCard>
|
|
158
245
|
`,
|
|
@@ -164,15 +251,12 @@ export const Default: Story = {
|
|
|
164
251
|
name: 'Template',
|
|
165
252
|
code: `<template>
|
|
166
253
|
<VCard class="pa-8" max-width="600">
|
|
167
|
-
<Captcha
|
|
254
|
+
<Captcha
|
|
168
255
|
url-create="..."
|
|
169
256
|
url-get-image="..."
|
|
170
257
|
url-get-audio="/..."
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}"
|
|
174
|
-
@validation:success="(e) => { ... }"
|
|
175
|
-
@validation:error="(e) => { ... }"
|
|
258
|
+
:custom-rules="customRules"
|
|
259
|
+
show-success-messages
|
|
176
260
|
/>
|
|
177
261
|
</VCard>
|
|
178
262
|
</template>
|
|
@@ -183,6 +267,36 @@ export const Default: Story = {
|
|
|
183
267
|
code: `<script setup lang="ts">
|
|
184
268
|
import { Captcha } from '@cnamts/Captcha'
|
|
185
269
|
import { VCard } from 'vuetify/components'
|
|
270
|
+
|
|
271
|
+
const verifyCaptcha = () => {
|
|
272
|
+
// Appelle l'API pour vérifier le captcha et retourne la réponse
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const customRules = [
|
|
276
|
+
{
|
|
277
|
+
type: 'custom',
|
|
278
|
+
options: {
|
|
279
|
+
validate: (value) => String(value || '').length >= 6,
|
|
280
|
+
message: 'Le captcha doit contenir au moins 6 caractères.',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
type: 'custom',
|
|
285
|
+
options: {
|
|
286
|
+
validate: async () => {
|
|
287
|
+
try {
|
|
288
|
+
const r = await verifyCaptcha()
|
|
289
|
+
return r.response.data.message === 'Success'
|
|
290
|
+
}
|
|
291
|
+
catch {
|
|
292
|
+
return false
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
message: 'Le captcha est incorrect',
|
|
296
|
+
successMessage: 'Le captcha est correct',
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
]
|
|
186
300
|
</script>
|
|
187
301
|
`,
|
|
188
302
|
},
|
|
@@ -207,15 +321,8 @@ export const Choice: Story = {
|
|
|
207
321
|
watch(() => args.modelValue, () => {
|
|
208
322
|
captchaValue.value = args.modelValue
|
|
209
323
|
})
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return Promise.resolve({ response: { data: { message: 'Success' } } })
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
return Promise.reject({ response: { data: { message: 'Le captcha est incorrect' } } })
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return { args, captchaValue, verifyCaptcha }
|
|
324
|
+
|
|
325
|
+
return { args, captchaValue }
|
|
219
326
|
},
|
|
220
327
|
template: `
|
|
221
328
|
<VCard class="pa-8" max-width="600" min-width="300">
|
|
@@ -224,7 +331,6 @@ export const Choice: Story = {
|
|
|
224
331
|
url-get-image="/captcha/captcha.png"
|
|
225
332
|
url-get-audio="/captcha/captcha.mp3"
|
|
226
333
|
v-bind="args"
|
|
227
|
-
:service="verifyCaptcha"
|
|
228
334
|
v-model="captchaValue"
|
|
229
335
|
/>
|
|
230
336
|
</VCard>
|
|
@@ -241,9 +347,6 @@ export const Choice: Story = {
|
|
|
241
347
|
url-create="..."
|
|
242
348
|
url-get-image="..."
|
|
243
349
|
url-get-audio="/..."
|
|
244
|
-
service="(e) => {
|
|
245
|
-
// call the API to verify the captcha and return the response
|
|
246
|
-
}"
|
|
247
350
|
@validation:success="(e) => { ... }"
|
|
248
351
|
@validation:error="(e) => { ... }"
|
|
249
352
|
type="choice"
|