@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.
Files changed (202) hide show
  1. package/dist/{AutocompleteFilter-DXd4szWO.js → AutocompleteFilter-CGF33skz.js} +1 -1
  2. package/dist/{DateFilter-BD59Kgwf.js → DateFilter-D7-MsKtx.js} +1 -1
  3. package/dist/{NumberFilter-BSMZE7uw.js → NumberFilter-bjQPPfsj.js} +1 -1
  4. package/dist/{PeriodFilter-keUdSSk0.js → PeriodFilter-B3wJpK8-.js} +1 -1
  5. package/dist/{SelectFilter-Dhvvwazl.js → SelectFilter-BN6DbKAV.js} +1 -1
  6. package/dist/{TextFilter-CU8FpXz0.js → TextFilter-BffP0J2f.js} +1 -1
  7. package/dist/{apLightTheme2026-DbS7BPUf.js → apLightTheme2026-C4ygwMHC.js} +11 -11
  8. package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +6 -6
  9. package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +6 -6
  10. package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +6 -6
  11. package/dist/components/Captcha/Captcha.d.ts +27 -16
  12. package/dist/components/Captcha/CaptchaForm.d.ts +29 -3
  13. package/dist/components/Captcha/types.d.ts +14 -0
  14. package/dist/components/Captcha/useCaptchaValidation.d.ts +37 -0
  15. package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +33 -13
  16. package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts +23 -0
  17. package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts +2 -2
  18. package/dist/components/Customs/Selects/SySelect/composables/useSySelectValidation.d.ts +2 -2
  19. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +17 -48
  20. package/dist/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.d.ts +29 -0
  21. package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +46 -0
  22. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +16 -51
  23. package/dist/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.d.ts +27 -0
  24. package/dist/components/Customs/SyCheckbox/types.d.ts +49 -0
  25. package/dist/components/Customs/SyTextField/FieldState.d.ts +5 -0
  26. package/dist/components/Customs/SyTextField/useSyTextFieldValidation.d.ts +3 -3
  27. package/dist/components/DialogBox/DialogBox.d.ts +2 -0
  28. package/dist/components/DialogBox/locales.d.ts +1 -0
  29. package/dist/components/FilterSideBar/FilterSideBar.d.ts +4 -0
  30. package/dist/components/LunarCalendar/LunarCalendar.d.ts +43 -14
  31. package/dist/components/LunarCalendar/types.d.ts +35 -0
  32. package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +11 -12
  33. package/dist/components/MonthPicker/MonthPicker.d.ts +72 -1747
  34. package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +21 -1733
  35. package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +5 -0
  36. package/dist/components/MonthPicker/locales.d.ts +1 -0
  37. package/dist/components/MonthPicker/types.d.ts +11 -0
  38. package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +37 -24
  39. package/dist/components/NirField/NirField.d.ts +6 -4
  40. package/dist/components/NirField/useNirValidation.d.ts +7 -5
  41. package/dist/components/PageContainer/PageContainer.d.ts +8 -0
  42. package/dist/components/PasswordField/PasswordField.d.ts +2 -2
  43. package/dist/components/PasswordField/usePasswordFieldValidation.d.ts +2 -2
  44. package/dist/components/PhoneField/PhoneField.d.ts +960 -1938
  45. package/dist/components/PhoneField/indicatifs.d.ts +715 -8
  46. package/dist/components/PhoneField/locales.d.ts +7 -0
  47. package/dist/components/PhoneField/types.d.ts +29 -0
  48. package/dist/components/PhoneField/usePhoneFieldValidation.d.ts +45 -0
  49. package/dist/components/PhoneField/usePhoneIndicatifs.d.ts +947 -0
  50. package/dist/components/SyTextArea/composables/useSyTextAreaValidation.d.ts +2 -2
  51. package/dist/composables/unifyValidation/documentationValidationProps.d.ts +1 -1
  52. package/dist/composables/unifyValidation/useValidation.d.ts +4 -5
  53. package/dist/design-system-v3.js +2 -2
  54. package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +10 -10
  55. package/dist/designTokens/tokens/baseTokens.d.ts +18 -18
  56. package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +10 -10
  57. package/dist/designTokens/tokens/pa/paLightTheme.d.ts +10 -10
  58. package/dist/designTokens/tokens/semanticTokens.d.ts +14 -14
  59. package/dist/{main-D8ryUoS5.js → main-C4wAktOs.js} +13718 -12991
  60. package/dist/synapse.css +1 -1
  61. package/dist/vuetifyConfig.js +1 -1
  62. package/package.json +7 -7
  63. package/src/assets/compat/_legacy-tokens.scss +91 -0
  64. package/src/assets/overrides/_utilities.scss +23 -0
  65. package/src/components/Accordion/Accordion.stories.ts +121 -1
  66. package/src/components/BackBtn/BackBtn.mdx +1 -1
  67. package/src/components/BackToTopBtn/BackToTopBtn.mdx +0 -1
  68. package/src/components/Captcha/Captcha.stories.ts +134 -31
  69. package/src/components/Captcha/Captcha.vue +95 -28
  70. package/src/components/Captcha/CaptchaForm.vue +51 -22
  71. package/src/components/Captcha/tests/Captcha.focus.spec.ts +214 -0
  72. package/src/components/Captcha/tests/Captcha.spec.ts +233 -24
  73. package/src/components/Captcha/tests/CaptchaForm.spec.ts +82 -0
  74. package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +16 -42
  75. package/src/components/Captcha/types.ts +15 -0
  76. package/src/components/Captcha/useCaptchaValidation.ts +87 -0
  77. package/src/components/Captcha/validation/validation.stories.ts +1194 -0
  78. package/src/components/ChipList/ChipList.mdx +0 -1
  79. package/src/components/CollapsibleList/CollapsibleList.mdx +0 -1
  80. package/src/components/CookieBanner/CookieBanner.mdx +0 -1
  81. package/src/components/CopyBtn/CopyBtn.mdx +0 -1
  82. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +123 -439
  83. package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +147 -41
  84. package/src/components/Customs/Selects/SelectBtnField/Validation/Validation.stories.ts +600 -0
  85. package/src/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.ts +87 -0
  86. package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +402 -33
  87. package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +52 -38
  88. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +342 -162
  89. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +77 -129
  90. package/src/components/Customs/SyCheckBoxGroup/Validation/Validation.stories.ts +1008 -0
  91. package/src/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.ts +107 -0
  92. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +180 -7
  93. package/src/components/Customs/SyCheckBoxGroup/types.ts +49 -0
  94. package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +41 -161
  95. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +71 -148
  96. package/src/components/Customs/SyCheckbox/Validation/Validation.stories.ts +654 -0
  97. package/src/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.ts +105 -0
  98. package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +106 -0
  99. package/src/components/Customs/SyCheckbox/tests/useSyCheckboxValidation.spec.ts +98 -0
  100. package/src/components/Customs/SyCheckbox/types.ts +51 -0
  101. package/src/components/Customs/SyTextField/FieldState.vue +50 -0
  102. package/src/components/Customs/SyTextField/SyTextField.vue +12 -9
  103. package/src/components/Customs/SyTextField/useSyTextFieldValidation.ts +2 -11
  104. package/src/components/DataList/DataList.mdx +0 -1
  105. package/src/components/DataListGroup/DataListGroup.mdx +0 -1
  106. package/src/components/DiacriticPicker/DiacriticPicker.mdx +0 -1
  107. package/src/components/DialogBox/DialogBox.mdx +0 -1
  108. package/src/components/DialogBox/DialogBox.stories.ts +399 -4
  109. package/src/components/DialogBox/DialogBox.vue +20 -0
  110. package/src/components/DialogBox/locales.ts +1 -0
  111. package/src/components/DialogBox/tests/DialogBox.spec.ts +73 -0
  112. package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +24 -0
  113. package/src/components/ErrorPage/ErrorPage.mdx +1 -1
  114. package/src/components/ExternalLinks/ExternalLinks.mdx +0 -1
  115. package/src/components/FileList/FileList.mdx +0 -1
  116. package/src/components/FilterInline/FilterInline.mdx +0 -1
  117. package/src/components/FilterSideBar/FilterSideBar.mdx +8 -1
  118. package/src/components/FilterSideBar/FilterSideBar.stories.ts +133 -1
  119. package/src/components/FilterSideBar/FilterSideBar.vue +19 -2
  120. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +55 -0
  121. package/src/components/FooterBar/FooterBar.mdx +0 -1
  122. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +0 -1
  123. package/src/components/HeaderBar/HeaderBar.mdx +0 -1
  124. package/src/components/HeaderLoading/HeaderLoading.mdx +0 -1
  125. package/src/components/LangBtn/LangBtn.mdx +0 -1
  126. package/src/components/Logo/Logo.mdx +1 -1
  127. package/src/components/LunarCalendar/LunarCalendar.mdx +6 -9
  128. package/src/components/LunarCalendar/LunarCalendar.stories.ts +243 -46
  129. package/src/components/LunarCalendar/LunarCalendar.vue +61 -26
  130. package/src/components/LunarCalendar/Validation/Validation.stories.ts +717 -0
  131. package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +1 -1
  132. package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +197 -6
  133. package/src/components/LunarCalendar/tests/useLunarCalendarValidation.spec.ts +287 -0
  134. package/src/components/LunarCalendar/types.ts +39 -0
  135. package/src/components/LunarCalendar/useLunarCalendarValidation.ts +115 -39
  136. package/src/components/MonthPicker/MonthPicker.stories.ts +38 -281
  137. package/src/components/MonthPicker/MonthPicker.vue +66 -17
  138. package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +44 -20
  139. package/src/components/MonthPicker/MonthPickerText/useTextField.ts +5 -0
  140. package/src/components/MonthPicker/Validation/Validation.stories.ts +1117 -0
  141. package/src/components/MonthPicker/locales.ts +1 -0
  142. package/src/components/MonthPicker/tests/MonthPicker.spec.ts +353 -2
  143. package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +12 -8
  144. package/src/components/MonthPicker/types.ts +16 -0
  145. package/src/components/MonthPicker/useMonthPickerValidation.ts +64 -27
  146. package/src/components/NirField/NirField.mdx +120 -66
  147. package/src/components/NirField/NirField.stories.ts +216 -0
  148. package/src/components/NirField/useNirValidation.ts +16 -17
  149. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +263 -245
  150. package/src/components/NotificationBar/NotificationBar.mdx +0 -1
  151. package/src/components/PageContainer/PageContainer.mdx +0 -1
  152. package/src/components/PageContainer/PageContainer.stories.ts +170 -2
  153. package/src/components/PageContainer/PageContainer.vue +63 -8
  154. package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +19 -11
  155. package/src/components/PaginatedTable/PaginatedTable.mdx +0 -1
  156. package/src/components/PeriodField/PeriodField.mdx +0 -1
  157. package/src/components/PhoneField/PhoneField.mdx +2 -3
  158. package/src/components/PhoneField/PhoneField.stories.ts +227 -410
  159. package/src/components/PhoneField/PhoneField.vue +204 -438
  160. package/src/components/PhoneField/indicatifs.ts +1 -1
  161. package/src/components/PhoneField/locales.ts +7 -0
  162. package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -1
  163. package/src/components/PhoneField/tests/PhoneField.spec.ts +517 -220
  164. package/src/components/PhoneField/types.ts +30 -0
  165. package/src/components/PhoneField/usePhoneFieldValidation.ts +119 -0
  166. package/src/components/PhoneField/usePhoneIndicatifs.ts +89 -0
  167. package/src/components/PhoneField/validation/validation.stories.ts +717 -0
  168. package/src/components/RangeField/RangeField.mdx +0 -1
  169. package/src/components/RatingPicker/RatingPicker.mdx +0 -1
  170. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +0 -1
  171. package/src/components/StatusPage/StatusPage.vue +1 -0
  172. package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +248 -230
  173. package/src/components/SubHeader/SubHeader.mdx +5 -6
  174. package/src/components/Tables/common/tests/SyTableFilter.spec.ts +11 -12
  175. package/src/components/UploadWorkflow/UploadWorkflow.mdx +0 -1
  176. package/src/components/UserMenuBtn/UserMenuBtn.mdx +0 -1
  177. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +177 -0
  178. package/src/composables/unifyValidation/documentationValidationProps.ts +1 -1
  179. package/src/composables/unifyValidation/tests/useValidation.spec.ts +13 -1
  180. package/src/composables/unifyValidation/useValidation.ts +37 -33
  181. package/src/composantsVuetify/VCard/VCard.mdx +4 -0
  182. package/src/composantsVuetify/VCard/v-card.stories.ts +93 -1
  183. package/src/composantsVuetify/VCarousel/VCarousel.mdx +74 -0
  184. package/src/composantsVuetify/VCarousel/v-carousel.stories.ts +531 -0
  185. package/src/composantsVuetify/VNavigationDrawer/VNavgationDrawer.mdx +53 -0
  186. package/src/composantsVuetify/VNavigationDrawer/v-navigation-drawer.stories.ts +310 -0
  187. package/src/composantsVuetify/VSlideGroup/VSlideGroup.mdx +105 -0
  188. package/src/composantsVuetify/VSlideGroup/v-slide-group.stories.ts +463 -0
  189. package/src/designTokens/tokens/baseColors.ts +1 -1
  190. package/src/designTokens/tokens/baseTokens.ts +18 -18
  191. package/src/stories/Components/Components.stories.ts +34 -1
  192. package/src/stories/Demarrer/Releases.stories.ts +16 -2
  193. package/src/stories/DesignTokens/Arrondis.mdx +1 -1
  194. package/src/stories/DesignTokens/Correspondances.mdx +219 -0
  195. package/src/stories/DesignTokens/UtiliserLesTokens.mdx +235 -0
  196. package/src/stories/DesignTokens/colors.stories.ts +569 -569
  197. package/src/stories/GuideDuDev/Amelipro.stories.ts +335 -267
  198. package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +0 -5
  199. package/dist/components/PhoneField/tests/types.d.ts +0 -18
  200. package/src/components/LunarCalendar/tests/useLunarCalendarRules.spec.ts +0 -184
  201. package/src/components/LunarCalendar/useLunarCalendarRules.ts +0 -96
  202. package/src/components/PhoneField/tests/types.d.ts +0 -19
@@ -0,0 +1,531 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import { VCarousel, VCarouselItem, VCard, VCardTitle, VCardText, VBtn } from 'vuetify/components'
3
+
4
+ const meta: Meta<typeof VCarousel> = {
5
+ title: 'Composants/Composants Vuetify/VCarousel',
6
+ component: VCarousel,
7
+ tags: ['!dev'],
8
+ parameters: {
9
+ docs: {
10
+ source: {
11
+ transform: (src: string) =>
12
+ src
13
+ .replace(/VCarousel/g, 'v-carousel')
14
+ .replace(/VCarouselItem/g, 'v-carousel-item'),
15
+ },
16
+ },
17
+ },
18
+ argTypes: {
19
+ cycle: {
20
+ control: { type: 'boolean' },
21
+ description: 'Active le défilement automatique',
22
+ table: {
23
+ defaultValue: { summary: 'false' },
24
+ },
25
+ },
26
+ hideDelimiters: {
27
+ control: { type: 'boolean' },
28
+ description: 'Masque les indicateurs de pagination',
29
+ table: {
30
+ defaultValue: { summary: 'false' },
31
+ },
32
+ },
33
+ hideDelimiterBackground: {
34
+ control: { type: 'boolean' },
35
+ description: 'Masque le fond des indicateurs',
36
+ table: {
37
+ defaultValue: { summary: 'false' },
38
+ },
39
+ },
40
+ showArrows: {
41
+ control: { type: 'select' },
42
+ options: [true, false, 'hover'],
43
+ description: 'Affiche les flèches de navigation',
44
+ table: {
45
+ defaultValue: { summary: 'true' },
46
+ },
47
+ },
48
+ height: {
49
+ control: { type: 'text' },
50
+ description: 'Hauteur du carousel',
51
+ table: {
52
+ defaultValue: { summary: '500' },
53
+ },
54
+ },
55
+ interval: {
56
+ control: { type: 'number' },
57
+ description: 'Intervalle de défilement automatique (ms)',
58
+ table: {
59
+ defaultValue: { summary: '6000' },
60
+ },
61
+ },
62
+ continuous: {
63
+ control: { type: 'boolean' },
64
+ description: 'Continue le défilement en boucle',
65
+ table: {
66
+ defaultValue: { summary: 'true' },
67
+ },
68
+ },
69
+ progress: {
70
+ control: { type: 'select' },
71
+ options: [false, 'primary', 'secondary', 'success', 'info', 'warning', 'error'],
72
+ description: 'Affiche une barre de progression',
73
+ },
74
+ },
75
+ }
76
+
77
+ export default meta
78
+
79
+ type Story = StoryObj<typeof VCarousel>
80
+
81
+ export const Primary: Story = {
82
+ render: args => ({
83
+ components: { VCarousel, VCarouselItem },
84
+ setup() {
85
+ const colors = ['primary', 'secondary', 'success', 'info', 'warning']
86
+ return { args, colors }
87
+ },
88
+ template: `
89
+ <VCarousel v-bind="args" class="carousel-white-controls">
90
+ <VCarouselItem
91
+ v-for="(color, i) in colors"
92
+ :key="i"
93
+ :color="color"
94
+ >
95
+ <div class="d-flex fill-height justify-center align-center">
96
+ <div class="text-h2">Slide {{ i + 1 }}</div>
97
+ </div>
98
+ </VCarouselItem>
99
+ </VCarousel>
100
+ `,
101
+ }),
102
+ args: {
103
+ height: 400,
104
+ },
105
+ parameters: {
106
+ docs: {
107
+ source: {
108
+ code: `<v-carousel :height="400">
109
+ <v-carousel-item
110
+ v-for="(color, i) in colors"
111
+ :key="i"
112
+ :color="color"
113
+ >
114
+ <div class="d-flex fill-height justify-center align-center">
115
+ <div class="text-h2">Slide {{ i + 1 }}</div>
116
+ </div>
117
+ </v-carousel-item>
118
+ </v-carousel>`,
119
+ },
120
+ },
121
+ },
122
+ }
123
+
124
+ export const WithCycle: Story = {
125
+ render: args => ({
126
+ components: { VCarousel, VCarouselItem },
127
+ setup() {
128
+ const slides = [
129
+ { title: 'Slide 1', color: 'primary' },
130
+ { title: 'Slide 2', color: 'secondary' },
131
+ { title: 'Slide 3', color: 'success' },
132
+ ]
133
+ return { args, slides }
134
+ },
135
+ template: `
136
+ <VCarousel v-bind="args">
137
+ <VCarouselItem
138
+ v-for="(slide, i) in slides"
139
+ :key="i"
140
+ :color="slide.color"
141
+ >
142
+ <div class="d-flex fill-height justify-center align-center">
143
+ <div class="text-h2">{{ slide.title }}</div>
144
+ </div>
145
+ </VCarouselItem>
146
+ </VCarousel>
147
+ `,
148
+ }),
149
+ args: {
150
+ height: 400,
151
+ cycle: true,
152
+ interval: 3000,
153
+ },
154
+ parameters: {
155
+ docs: {
156
+ source: {
157
+ code: `<v-carousel :height="400" cycle :interval="3000">
158
+ <v-carousel-item
159
+ v-for="(slide, i) in slides"
160
+ :key="i"
161
+ :color="slide.color"
162
+ >
163
+ <div class="d-flex fill-height justify-center align-center">
164
+ <div class="text-h2">{{ slide.title }}</div>
165
+ </div>
166
+ </v-carousel-item>
167
+ </v-carousel>`,
168
+ },
169
+ },
170
+ },
171
+ }
172
+
173
+ export const HideDelimiters: Story = {
174
+ render: args => ({
175
+ components: { VCarousel, VCarouselItem },
176
+ setup() {
177
+ const colors = ['primary', 'secondary', 'success']
178
+ return { args, colors }
179
+ },
180
+ template: `
181
+ <VCarousel v-bind="args">
182
+ <VCarouselItem
183
+ v-for="(color, i) in colors"
184
+ :key="i"
185
+ :color="color"
186
+ >
187
+ <div class="d-flex fill-height justify-center align-center">
188
+ <div class="text-h2">Slide {{ i + 1 }}</div>
189
+ </div>
190
+ </VCarouselItem>
191
+ </VCarousel>
192
+ `,
193
+ }),
194
+ args: {
195
+ height: 400,
196
+ hideDelimiters: true,
197
+ },
198
+ parameters: {
199
+ docs: {
200
+ source: {
201
+ code: `<v-carousel :height="400" hide-delimiters>
202
+ <v-carousel-item
203
+ v-for="(color, i) in colors"
204
+ :key="i"
205
+ :color="color"
206
+ >
207
+ <div class="d-flex fill-height justify-center align-center">
208
+ <div class="text-h2">Slide {{ i + 1 }}</div>
209
+ </div>
210
+ </v-carousel-item>
211
+ </v-carousel>`,
212
+ },
213
+ },
214
+ },
215
+ }
216
+
217
+ export const ShowArrowsOnHover: Story = {
218
+ render: args => ({
219
+ components: { VCarousel, VCarouselItem },
220
+ setup() {
221
+ const colors = ['primary', 'secondary', 'success', 'info']
222
+ return { args, colors }
223
+ },
224
+ template: `
225
+ <VCarousel v-bind="args">
226
+ <VCarouselItem
227
+ v-for="(color, i) in colors"
228
+ :key="i"
229
+ :color="color"
230
+ >
231
+ <div class="d-flex fill-height justify-center align-center">
232
+ <div class="text-h2">Slide {{ i + 1 }}</div>
233
+ </div>
234
+ </VCarouselItem>
235
+ </VCarousel>
236
+ `,
237
+ }),
238
+ args: {
239
+ height: 400,
240
+ showArrows: 'hover',
241
+ },
242
+ parameters: {
243
+ docs: {
244
+ source: {
245
+ code: `<v-carousel :height="400" show-arrows="hover">
246
+ <v-carousel-item
247
+ v-for="(color, i) in colors"
248
+ :key="i"
249
+ :color="color"
250
+ >
251
+ <div class="d-flex fill-height justify-center align-center">
252
+ <div class="text-h2">Slide {{ i + 1 }}</div>
253
+ </div>
254
+ </v-carousel-item>
255
+ </v-carousel>`,
256
+ },
257
+ },
258
+ },
259
+ }
260
+
261
+ export const WithProgress: Story = {
262
+ render: args => ({
263
+ components: { VCarousel, VCarouselItem },
264
+ setup() {
265
+ const colors = ['primary', 'secondary', 'success']
266
+ return { args, colors }
267
+ },
268
+ template: `
269
+ <VCarousel v-bind="args">
270
+ <VCarouselItem
271
+ v-for="(color, i) in colors"
272
+ :key="i"
273
+ :color="color"
274
+ >
275
+ <div class="d-flex fill-height justify-center align-center">
276
+ <div class="text-h2">Slide {{ i + 1 }}</div>
277
+ </div>
278
+ </VCarouselItem>
279
+ </VCarousel>
280
+ `,
281
+ }),
282
+ args: {
283
+ height: 400,
284
+ cycle: true,
285
+ progress: 'primary',
286
+ interval: 4000,
287
+ },
288
+ parameters: {
289
+ docs: {
290
+ source: {
291
+ code: `<v-carousel :height="400" cycle progress="primary" :interval="4000">
292
+ <v-carousel-item
293
+ v-for="(color, i) in colors"
294
+ :key="i"
295
+ :color="color"
296
+ >
297
+ <div class="d-flex fill-height justify-center align-center">
298
+ <div class="text-h2">Slide {{ i + 1 }}</div>
299
+ </div>
300
+ </v-carousel-item>
301
+ </v-carousel>`,
302
+ },
303
+ },
304
+ },
305
+ }
306
+
307
+ export const WithImages: Story = {
308
+ render: args => ({
309
+ components: { VCarousel, VCarouselItem },
310
+ setup() {
311
+ const images = [
312
+ 'https://picsum.photos/800/400?random=1',
313
+ 'https://picsum.photos/800/400?random=2',
314
+ 'https://picsum.photos/800/400?random=3',
315
+ ]
316
+ return { args, images }
317
+ },
318
+ template: `
319
+ <VCarousel v-bind="args">
320
+ <VCarouselItem
321
+ v-for="(image, i) in images"
322
+ :key="i"
323
+ :src="image"
324
+ cover
325
+ />
326
+ </VCarousel>
327
+ `,
328
+ }),
329
+ args: {
330
+ height: 400,
331
+ },
332
+ parameters: {
333
+ docs: {
334
+ source: {
335
+ code: `<v-carousel :height="400">
336
+ <v-carousel-item
337
+ v-for="(image, i) in images"
338
+ :key="i"
339
+ :src="image"
340
+ cover
341
+ />
342
+ </v-carousel>`,
343
+ },
344
+ },
345
+ },
346
+ }
347
+
348
+ export const CustomHeight: Story = {
349
+ render: args => ({
350
+ components: { VCarousel, VCarouselItem },
351
+ setup() {
352
+ const colors = ['primary', 'secondary', 'success']
353
+ return { args, colors }
354
+ },
355
+ template: `
356
+ <VCarousel v-bind="args">
357
+ <VCarouselItem
358
+ v-for="(color, i) in colors"
359
+ :key="i"
360
+ :color="color"
361
+ >
362
+ <div class="d-flex fill-height justify-center align-center">
363
+ <div class="text-h2">Slide {{ i + 1 }}</div>
364
+ </div>
365
+ </VCarouselItem>
366
+ </VCarousel>
367
+ `,
368
+ }),
369
+ args: {
370
+ height: 600,
371
+ },
372
+ parameters: {
373
+ docs: {
374
+ source: {
375
+ code: `<v-carousel :height="600">
376
+ <v-carousel-item
377
+ v-for="(color, i) in colors"
378
+ :key="i"
379
+ :color="color"
380
+ >
381
+ <div class="d-flex fill-height justify-center align-center">
382
+ <div class="text-h2">Slide {{ i + 1 }}</div>
383
+ </div>
384
+ </v-carousel-item>
385
+ </v-carousel>`,
386
+ },
387
+ },
388
+ },
389
+ }
390
+
391
+ export const WithCustomSlots: Story = {
392
+ render: args => ({
393
+ components: { VCarousel, VCarouselItem, VCard, VCardTitle, VCardText, VBtn },
394
+ setup() {
395
+ return { args }
396
+ },
397
+ template: `
398
+ <VCarousel v-bind="args">
399
+ <VCarouselItem>
400
+ <div class="d-flex fill-height justify-center align-center pa-4">
401
+ <VCard style="width: calc(100% - 112px);">
402
+ <VCardTitle>Slide 1</VCardTitle>
403
+ <VCardText>
404
+ <p class="mb-0">
405
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
406
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
407
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
408
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
409
+ </p>
410
+ <VBtn color="primary" class="mt-2">
411
+ Bouton slide 1
412
+ </VBtn>
413
+ </VCardText>
414
+ </VCard>
415
+ </div>
416
+ </VCarouselItem>
417
+
418
+ <VCarouselItem>
419
+ <div class="d-flex fill-height justify-center align-center pa-4">
420
+ <VCard style="width: calc(100% - 112px);">
421
+ <VCardTitle>Slide 2</VCardTitle>
422
+ <VCardText>
423
+ <p class="mb-0">
424
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
425
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
426
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
427
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
428
+ </p>
429
+ <VBtn color="primary" class="mt-2">
430
+ Bouton slide 2
431
+ </VBtn>
432
+ </VCardText>
433
+ </VCard>
434
+ </div>
435
+ </VCarouselItem>
436
+
437
+ <VCarouselItem>
438
+ <div class="d-flex fill-height justify-center align-center pa-4">
439
+ <VCard style="width: calc(100% - 112px);">
440
+ <VCardTitle>Slide 3</VCardTitle>
441
+ <VCardText>
442
+ <p class="mb-0">
443
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
444
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
445
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
446
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
447
+ </p>
448
+ <VBtn color="primary" class="mt-2">
449
+ Bouton slide 3
450
+ </VBtn>
451
+ </VCardText>
452
+ </VCard>
453
+ </div>
454
+ </VCarouselItem>
455
+ </VCarousel>
456
+ `,
457
+ }),
458
+ args: {
459
+ height: 500,
460
+ },
461
+ parameters: {
462
+ docs: {
463
+ source: {
464
+ code: `<template>
465
+ <v-carousel :height="500" show-arrows="hover">
466
+ <v-carousel-item>
467
+ <div class="d-flex fill-height justify-center align-center pa-4">
468
+ <v-card style="width: calc(100% - 112px);">
469
+ <v-card-title>Slide 1</v-card-title>
470
+ <v-card-text>
471
+ <p class="mb-0">
472
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
473
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
474
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
475
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
476
+ </p>
477
+ <v-btn color="primary" class="mt-2">
478
+ Bouton slide 1
479
+ </v-btn>
480
+ </v-card-text>
481
+ </v-card>
482
+ </div>
483
+ </v-carousel-item>
484
+
485
+ <v-carousel-item>
486
+ <div class="d-flex fill-height justify-center align-center pa-4">
487
+ <v-card style="width: calc(100% - 112px);">
488
+ <v-card-title>Slide 2</v-card-title>
489
+ <v-card-text>
490
+ <p class="mb-0">
491
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
492
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
493
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
494
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
495
+ </p>
496
+ <v-btn color="primary" class="mt-2">
497
+ Bouton slide 2
498
+ </v-btn>
499
+ </v-card-text>
500
+ </v-card>
501
+ </div>
502
+ </v-carousel-item>
503
+
504
+ <v-carousel-item>
505
+ <div class="d-flex fill-height justify-center align-center pa-4">
506
+ <v-card style="width: calc(100% - 112px);">
507
+ <v-card-title>Slide 3</v-card-title>
508
+ <v-card-text>
509
+ <p class="mb-0">
510
+ Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée
511
+ à titre provisoire pour calibrer une mise en page, le texte définitif venant remplacer le
512
+ faux-texte dès qu'il est prêt ou que la mise en page est achevée. Généralement, on utilise
513
+ un texte en faux latin, le Lorem ipsum ou Lipsum.
514
+ </p>
515
+ <v-btn color="primary" class="mt-2">
516
+ Bouton slide 3
517
+ </v-btn>
518
+ </v-card-text>
519
+ </v-card>
520
+ </div>
521
+ </v-carousel-item>
522
+ </v-carousel>
523
+ </template>
524
+
525
+ <script setup lang="ts">
526
+ import { VCarousel, VCarouselItem, VCard, VCardTitle, VCardText, VBtn } from 'vuetify/components'
527
+ </script>`,
528
+ },
529
+ },
530
+ },
531
+ }
@@ -0,0 +1,53 @@
1
+ import { Meta, Canvas } from '@storybook/blocks'
2
+ import * as VNavigationDrawerStories from './v-navigation-drawer.stories'
3
+
4
+ <Meta title="Composants/Composants Vuetify/VNavigationDrawer" />
5
+
6
+ <div className="header">
7
+ <h1>VNavigationDrawer</h1>
8
+ Ce composant utilise directement le composant natif `v-navigation-drawer` 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-navigation-drawer/#props).
10
+ </div>
11
+
12
+ ### Composants associés
13
+
14
+ - `v-list` : Liste des éléments de navigation
15
+ - `v-list-item` : Élément individuel de la liste
16
+ - `v-list-item-title` : Titre de l'élément
17
+ - `v-divider` : Séparateur visuel
18
+
19
+ ## Variantes
20
+
21
+ Le composant `v-navigation-drawer` propose plusieurs variantes de style :
22
+
23
+ ### Default
24
+
25
+ <Canvas of={VNavigationDrawerStories.Default} />
26
+
27
+ ### Permanent
28
+
29
+ Drawer toujours visible, non repliable.
30
+
31
+ <Canvas of={VNavigationDrawerStories.Permanent} />
32
+
33
+ ### Temporary
34
+
35
+ Drawer temporaire qui se superpose au contenu.
36
+
37
+ <Canvas of={VNavigationDrawerStories.Temporary} />
38
+
39
+ ### With Custom Content
40
+
41
+ Drawer avec contenu personnalisé.
42
+
43
+ <Canvas of={VNavigationDrawerStories.WithCustomContent} />
44
+
45
+ ## Props principales
46
+
47
+ - **modelValue** : Contrôle l'ouverture/fermeture du drawer
48
+ - **rail** : Active le mode rail (icônes seulement)
49
+ - **permanent** : Rend le drawer permanent
50
+ - **temporary** : Rend le drawer temporaire
51
+ - **location** : Position du drawer (`start`, `end`, `left`, `right`, `top`, `bottom`)
52
+ - **width** : Largeur du drawer
53
+ - **color** : Couleur de fond du drawer