@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
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import { VNavigationDrawer, VList, VListItem, VListItemTitle, VDivider, VBtn, VApp, VMain } from 'vuetify/components'
|
|
3
|
+
import { ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Composants/Composants Vuetify/VNavigationDrawer',
|
|
7
|
+
tags: ['!dev'],
|
|
8
|
+
component: VNavigationDrawer,
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Le composant VNavigationDrawer est utilisé pour créer des tiroirs de navigation latéraux.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
} satisfies Meta<typeof VNavigationDrawer>
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof meta>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
render: args => ({
|
|
23
|
+
components: { VNavigationDrawer, VList, VListItem, VListItemTitle, VDivider, VBtn, VApp, VMain },
|
|
24
|
+
setup() {
|
|
25
|
+
const drawer = ref(true)
|
|
26
|
+
return { args, drawer }
|
|
27
|
+
},
|
|
28
|
+
template: `
|
|
29
|
+
<VApp style="height: 400px; overflow-y: hidden;">
|
|
30
|
+
<VNavigationDrawer v-model="drawer" v-bind="args">
|
|
31
|
+
<VList>
|
|
32
|
+
<VListItem value="home">
|
|
33
|
+
<VListItemTitle>Accueil</VListItemTitle>
|
|
34
|
+
</VListItem>
|
|
35
|
+
<VListItem value="about">
|
|
36
|
+
<VListItemTitle>À propos</VListItemTitle>
|
|
37
|
+
</VListItem>
|
|
38
|
+
<VDivider />
|
|
39
|
+
<VListItem value="profile">
|
|
40
|
+
<VListItemTitle>Profil</VListItemTitle>
|
|
41
|
+
</VListItem>
|
|
42
|
+
<VListItem value="settings">
|
|
43
|
+
<VListItemTitle>Paramètres</VListItemTitle>
|
|
44
|
+
</VListItem>
|
|
45
|
+
</VList>
|
|
46
|
+
</VNavigationDrawer>
|
|
47
|
+
<VMain>
|
|
48
|
+
<div class="pa-4">
|
|
49
|
+
<VBtn @click="drawer = !drawer" color="primary">
|
|
50
|
+
Toggle Drawer
|
|
51
|
+
</VBtn>
|
|
52
|
+
</div>
|
|
53
|
+
</VMain>
|
|
54
|
+
</VApp>
|
|
55
|
+
`,
|
|
56
|
+
}),
|
|
57
|
+
args: {
|
|
58
|
+
width: 256,
|
|
59
|
+
},
|
|
60
|
+
parameters: {
|
|
61
|
+
docs: {
|
|
62
|
+
source: {
|
|
63
|
+
code: `<template>
|
|
64
|
+
<v-app>
|
|
65
|
+
<v-navigation-drawer v-model="drawer" :width="256">
|
|
66
|
+
<v-list>
|
|
67
|
+
<v-list-item value="home">
|
|
68
|
+
<v-list-item-title>Accueil</v-list-item-title>
|
|
69
|
+
</v-list-item>
|
|
70
|
+
<v-list-item value="about">
|
|
71
|
+
<v-list-item-title>À propos</v-list-item-title>
|
|
72
|
+
</v-list-item>
|
|
73
|
+
<v-divider />
|
|
74
|
+
<v-list-item value="profile">
|
|
75
|
+
<v-list-item-title>Profil</v-list-item-title>
|
|
76
|
+
</v-list-item>
|
|
77
|
+
<v-list-item value="settings">
|
|
78
|
+
<v-list-item-title>Paramètres</v-list-item-title>
|
|
79
|
+
</v-list-item>
|
|
80
|
+
</v-list>
|
|
81
|
+
</v-navigation-drawer>
|
|
82
|
+
<v-main>
|
|
83
|
+
<div class="pa-4">
|
|
84
|
+
<v-btn @click="drawer = !drawer" color="primary">
|
|
85
|
+
Toggle Drawer
|
|
86
|
+
</v-btn>
|
|
87
|
+
</div>
|
|
88
|
+
</v-main>
|
|
89
|
+
</v-app>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<script setup lang="ts">
|
|
93
|
+
import { ref } from 'vue'
|
|
94
|
+
|
|
95
|
+
const drawer = ref(true)
|
|
96
|
+
</script>`,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const Permanent: Story = {
|
|
103
|
+
render: args => ({
|
|
104
|
+
components: { VNavigationDrawer, VList, VListItem, VListItemTitle, VApp, VMain },
|
|
105
|
+
setup() {
|
|
106
|
+
return { args }
|
|
107
|
+
},
|
|
108
|
+
template: `
|
|
109
|
+
<VApp style="height: 400px; overflow-y: hidden;">
|
|
110
|
+
<VNavigationDrawer v-bind="args" permanent>
|
|
111
|
+
<VList>
|
|
112
|
+
<VListItem value="dashboard">
|
|
113
|
+
<VListItemTitle>Tableau de bord</VListItemTitle>
|
|
114
|
+
</VListItem>
|
|
115
|
+
<VListItem value="messages">
|
|
116
|
+
<VListItemTitle>Messages</VListItemTitle>
|
|
117
|
+
</VListItem>
|
|
118
|
+
<VListItem value="notifications">
|
|
119
|
+
<VListItemTitle>Notifications</VListItemTitle>
|
|
120
|
+
</VListItem>
|
|
121
|
+
</VList>
|
|
122
|
+
</VNavigationDrawer>
|
|
123
|
+
<VMain>
|
|
124
|
+
<div class="pa-4">
|
|
125
|
+
<p>Contenu principal de l'application</p>
|
|
126
|
+
</div>
|
|
127
|
+
</VMain>
|
|
128
|
+
</VApp>
|
|
129
|
+
`,
|
|
130
|
+
}),
|
|
131
|
+
args: {
|
|
132
|
+
width: 256,
|
|
133
|
+
},
|
|
134
|
+
parameters: {
|
|
135
|
+
docs: {
|
|
136
|
+
source: {
|
|
137
|
+
code: `<template>
|
|
138
|
+
<v-app>
|
|
139
|
+
<v-navigation-drawer permanent :width="256">
|
|
140
|
+
<v-list>
|
|
141
|
+
<v-list-item value="dashboard">
|
|
142
|
+
<v-list-item-title>Tableau de bord</v-list-item-title>
|
|
143
|
+
</v-list-item>
|
|
144
|
+
<v-list-item value="messages">
|
|
145
|
+
<v-list-item-title>Messages</v-list-item-title>
|
|
146
|
+
</v-list-item>
|
|
147
|
+
<v-list-item value="notifications">
|
|
148
|
+
<v-list-item-title>Notifications</v-list-item-title>
|
|
149
|
+
</v-list-item>
|
|
150
|
+
</v-list>
|
|
151
|
+
</v-navigation-drawer>
|
|
152
|
+
<v-main>
|
|
153
|
+
<div class="pa-4">
|
|
154
|
+
<p>Contenu principal de l'application</p>
|
|
155
|
+
</div>
|
|
156
|
+
</v-main>
|
|
157
|
+
</v-app>
|
|
158
|
+
</template>`,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const Temporary: Story = {
|
|
165
|
+
render: args => ({
|
|
166
|
+
components: { VNavigationDrawer, VList, VListItem, VListItemTitle, VBtn, VApp, VMain },
|
|
167
|
+
setup() {
|
|
168
|
+
const drawer = ref(false)
|
|
169
|
+
return { args, drawer }
|
|
170
|
+
},
|
|
171
|
+
template: `
|
|
172
|
+
<VApp style="height: 400px; overflow-y: hidden;">
|
|
173
|
+
<VNavigationDrawer v-model="drawer" v-bind="args" temporary>
|
|
174
|
+
<VList>
|
|
175
|
+
<VListItem value="item1">
|
|
176
|
+
<VListItemTitle>Élément 1</VListItemTitle>
|
|
177
|
+
</VListItem>
|
|
178
|
+
<VListItem value="item2">
|
|
179
|
+
<VListItemTitle>Élément 2</VListItemTitle>
|
|
180
|
+
</VListItem>
|
|
181
|
+
<VListItem value="item3">
|
|
182
|
+
<VListItemTitle>Élément 3</VListItemTitle>
|
|
183
|
+
</VListItem>
|
|
184
|
+
</VList>
|
|
185
|
+
</VNavigationDrawer>
|
|
186
|
+
<VMain>
|
|
187
|
+
<div class="pa-4">
|
|
188
|
+
<VBtn @click="drawer = !drawer" color="primary">
|
|
189
|
+
Ouvrir le drawer
|
|
190
|
+
</VBtn>
|
|
191
|
+
<p class="mt-4">Le drawer temporaire se superpose au contenu et se ferme en cliquant en dehors.</p>
|
|
192
|
+
</div>
|
|
193
|
+
</VMain>
|
|
194
|
+
</VApp>
|
|
195
|
+
`,
|
|
196
|
+
}),
|
|
197
|
+
args: {
|
|
198
|
+
width: 256,
|
|
199
|
+
},
|
|
200
|
+
parameters: {
|
|
201
|
+
docs: {
|
|
202
|
+
source: {
|
|
203
|
+
code: `<template>
|
|
204
|
+
<v-app>
|
|
205
|
+
<v-navigation-drawer v-model="drawer" temporary :width="256">
|
|
206
|
+
<v-list>
|
|
207
|
+
<v-list-item value="item1">
|
|
208
|
+
<v-list-item-title>Élément 1</v-list-item-title>
|
|
209
|
+
</v-list-item>
|
|
210
|
+
<v-list-item value="item2">
|
|
211
|
+
<v-list-item-title>Élément 2</v-list-item-title>
|
|
212
|
+
</v-list-item>
|
|
213
|
+
<v-list-item value="item3">
|
|
214
|
+
<v-list-item-title>Élément 3</v-list-item-title>
|
|
215
|
+
</v-list-item>
|
|
216
|
+
</v-list>
|
|
217
|
+
</v-navigation-drawer>
|
|
218
|
+
<v-main>
|
|
219
|
+
<div class="pa-4">
|
|
220
|
+
<v-btn @click="drawer = !drawer" color="primary">
|
|
221
|
+
Ouvrir le drawer
|
|
222
|
+
</v-btn>
|
|
223
|
+
</div>
|
|
224
|
+
</v-main>
|
|
225
|
+
</v-app>
|
|
226
|
+
</template>
|
|
227
|
+
|
|
228
|
+
<script setup lang="ts">
|
|
229
|
+
import { ref } from 'vue'
|
|
230
|
+
|
|
231
|
+
const drawer = ref(false)
|
|
232
|
+
</script>`,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export const WithCustomContent: Story = {
|
|
239
|
+
render: args => ({
|
|
240
|
+
components: { VNavigationDrawer, VList, VListItem, VListItemTitle, VDivider, VApp, VMain },
|
|
241
|
+
setup() {
|
|
242
|
+
return { args }
|
|
243
|
+
},
|
|
244
|
+
template: `
|
|
245
|
+
<VApp style="height: 400px; overflow-y: hidden;">
|
|
246
|
+
<VNavigationDrawer v-bind="args" permanent>
|
|
247
|
+
<div class="pa-4">
|
|
248
|
+
<h3 class="text-h6 mb-2">Menu Principal</h3>
|
|
249
|
+
<p class="text-caption text-medium-emphasis">Sélectionnez une option</p>
|
|
250
|
+
</div>
|
|
251
|
+
<VDivider />
|
|
252
|
+
<VList>
|
|
253
|
+
<VListItem value="option1">
|
|
254
|
+
<VListItemTitle>Option 1</VListItemTitle>
|
|
255
|
+
</VListItem>
|
|
256
|
+
<VListItem value="option2">
|
|
257
|
+
<VListItemTitle>Option 2</VListItemTitle>
|
|
258
|
+
</VListItem>
|
|
259
|
+
<VListItem value="option3">
|
|
260
|
+
<VListItemTitle>Option 3</VListItemTitle>
|
|
261
|
+
</VListItem>
|
|
262
|
+
</VList>
|
|
263
|
+
<VDivider />
|
|
264
|
+
</VNavigationDrawer>
|
|
265
|
+
<VMain>
|
|
266
|
+
<div class="pa-4">
|
|
267
|
+
<p>Contenu principal avec menu personnalisé</p>
|
|
268
|
+
</div>
|
|
269
|
+
</VMain>
|
|
270
|
+
</VApp>
|
|
271
|
+
`,
|
|
272
|
+
}),
|
|
273
|
+
args: {
|
|
274
|
+
width: 256,
|
|
275
|
+
},
|
|
276
|
+
parameters: {
|
|
277
|
+
docs: {
|
|
278
|
+
source: {
|
|
279
|
+
code: `<template>
|
|
280
|
+
<v-app>
|
|
281
|
+
<v-navigation-drawer permanent :width="256">
|
|
282
|
+
<div class="pa-4">
|
|
283
|
+
<h3 class="text-h6 mb-2">Menu Principal</h3>
|
|
284
|
+
<p class="text-caption text-medium-emphasis">Sélectionnez une option</p>
|
|
285
|
+
</div>
|
|
286
|
+
<v-divider />
|
|
287
|
+
<v-list>
|
|
288
|
+
<v-list-item value="option1">
|
|
289
|
+
<v-list-item-title>Option 1</v-list-item-title>
|
|
290
|
+
</v-list-item>
|
|
291
|
+
<v-list-item value="option2">
|
|
292
|
+
<v-list-item-title>Option 2</v-list-item-title>
|
|
293
|
+
</v-list-item>
|
|
294
|
+
<v-list-item value="option3">
|
|
295
|
+
<v-list-item-title>Option 3</v-list-item-title>
|
|
296
|
+
</v-list-item>
|
|
297
|
+
</v-list>
|
|
298
|
+
<v-divider />
|
|
299
|
+
</v-navigation-drawer>
|
|
300
|
+
<v-main>
|
|
301
|
+
<div class="pa-4">
|
|
302
|
+
<p>Contenu principal avec menu personnalisé</p>
|
|
303
|
+
</div>
|
|
304
|
+
</v-main>
|
|
305
|
+
</v-app>
|
|
306
|
+
</template>`,
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Meta, Canvas } from '@storybook/blocks'
|
|
2
|
+
import * as VSlideGroupStories from './v-slide-group.stories'
|
|
3
|
+
|
|
4
|
+
<Meta title="Composants/Composants Vuetify/VSlideGroup" />
|
|
5
|
+
|
|
6
|
+
<div className="header">
|
|
7
|
+
<h1>VSlideGroup</h1>
|
|
8
|
+
Ce composant utilise directement le composant natif `v-slide-group` de Vuetify avec les couleurs du thème actif du design system.
|
|
9
|
+
Pour l'API complète du composant, consulter la [documentation Vuetify](https://vuetifyjs.com/en/api/v-slide-group/#props).
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
### Composants associés
|
|
13
|
+
|
|
14
|
+
- `v-slide-group-item` : Élément individuel du groupe de diapositives
|
|
15
|
+
|
|
16
|
+
## Description
|
|
17
|
+
|
|
18
|
+
Le composant `v-slide-group` est utilisé pour afficher une collection d'éléments défilables horizontalement. Il est particulièrement utile pour :
|
|
19
|
+
- Afficher des catégories ou des filtres
|
|
20
|
+
- Créer des carrousels d'éléments
|
|
21
|
+
- Organiser des onglets ou des navigation horizontales
|
|
22
|
+
- Permettre la sélection parmi plusieurs options
|
|
23
|
+
|
|
24
|
+
## Variantes
|
|
25
|
+
|
|
26
|
+
### Default
|
|
27
|
+
|
|
28
|
+
Groupe de diapositives basique avec des cartes numérotées.
|
|
29
|
+
|
|
30
|
+
<Canvas of={VSlideGroupStories.Default} />
|
|
31
|
+
|
|
32
|
+
### Avec Chips
|
|
33
|
+
|
|
34
|
+
Utilisation avec des chips pour créer un système de filtres ou de tags.
|
|
35
|
+
|
|
36
|
+
<Canvas of={VSlideGroupStories.WithChips} />
|
|
37
|
+
|
|
38
|
+
### Centre l'élément actif
|
|
39
|
+
|
|
40
|
+
L'élément sélectionné est automatiquement centré.
|
|
41
|
+
|
|
42
|
+
<Canvas of={VSlideGroupStories.CenterActive} />
|
|
43
|
+
|
|
44
|
+
### Sélection multiple
|
|
45
|
+
|
|
46
|
+
Permet de sélectionner plusieurs éléments à la fois.
|
|
47
|
+
|
|
48
|
+
<Canvas of={VSlideGroupStories.MultipleSelection} />
|
|
49
|
+
|
|
50
|
+
### Pseudo carousel
|
|
51
|
+
|
|
52
|
+
Pour afficher les informations de manière créative sur les feuilles.
|
|
53
|
+
|
|
54
|
+
<Canvas of={VSlideGroupStories.Misc} />
|
|
55
|
+
|
|
56
|
+
### Cartes personnalisées
|
|
57
|
+
|
|
58
|
+
Cartes colorées avec différentes variantes selon l'état de sélection.
|
|
59
|
+
|
|
60
|
+
<Canvas of={VSlideGroupStories.CustomCards} />
|
|
61
|
+
|
|
62
|
+
## Props principales
|
|
63
|
+
|
|
64
|
+
- **showArrows** : Affiche les flèches de navigation
|
|
65
|
+
- **centerActive** : Centre automatiquement l'élément actif
|
|
66
|
+
- **multiple** : Permet la sélection multiple
|
|
67
|
+
- **mandatory** : Rend la sélection obligatoire (au moins un élément doit être sélectionné)
|
|
68
|
+
- **selectedClass** : Classe CSS personnalisée appliquée aux éléments sélectionnés
|
|
69
|
+
- **modelValue** : Valeur(s) sélectionnée(s)
|
|
70
|
+
|
|
71
|
+
## Accessibilité
|
|
72
|
+
|
|
73
|
+
### Bonnes pratiques
|
|
74
|
+
|
|
75
|
+
Le composant `v-slide-group` doit être utilisé de manière accessible :
|
|
76
|
+
|
|
77
|
+
#### Navigation au clavier
|
|
78
|
+
|
|
79
|
+
- **Tab** : Navigue entre les éléments du groupe
|
|
80
|
+
- **Flèches gauche/droite** : Défile entre les éléments
|
|
81
|
+
- **Enter/Espace** : Sélectionne l'élément focalisé
|
|
82
|
+
- **Home** : Va au premier élément
|
|
83
|
+
- **End** : Va au dernier élément
|
|
84
|
+
|
|
85
|
+
#### Contraste et lisibilité
|
|
86
|
+
|
|
87
|
+
- Assurez-vous que l'état sélectionné est clairement visible
|
|
88
|
+
- Utilisez des couleurs avec un contraste suffisant (ratio minimum de 4.5:1)
|
|
89
|
+
- Fournissez des indicateurs visuels clairs pour l'état de sélection
|
|
90
|
+
- Les flèches de navigation doivent être suffisamment grandes et contrastées
|
|
91
|
+
|
|
92
|
+
#### Focus visible
|
|
93
|
+
|
|
94
|
+
- Assurez-vous que le focus clavier est clairement visible
|
|
95
|
+
- N'utilisez pas `outline: none` sans fournir une alternative
|
|
96
|
+
- Testez la navigation au clavier
|
|
97
|
+
|
|
98
|
+
### Points d'attention
|
|
99
|
+
|
|
100
|
+
- **Évitez trop d'éléments** : Un groupe trop long peut être difficile à naviguer
|
|
101
|
+
- **Fournissez des labels clairs** : Chaque élément doit avoir un label descriptif
|
|
102
|
+
- **Testez avec des lecteurs d'écran** : Vérifiez que la navigation est logique
|
|
103
|
+
- **Assurez-vous que les flèches sont accessibles** : Elles doivent être utilisables au clavier
|
|
104
|
+
- **Considérez l'ordre de tabulation** : L'ordre doit être logique et prévisible
|
|
105
|
+
- **État de sélection clair** : L'utilisateur doit toujours savoir quel(s) élément(s) est/sont sélectionné(s)
|