@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
@@ -89,6 +89,37 @@ const meta = {
89
89
  },
90
90
  },
91
91
  },
92
+ 'title': {
93
+ description: 'Titre affiché au-dessus des filtres du panneau',
94
+ control: {
95
+ type: 'text',
96
+ },
97
+ table: {
98
+ category: 'props',
99
+ type: {
100
+ summary: 'string',
101
+ },
102
+ defaultValue: {
103
+ summary: 'undefined',
104
+ },
105
+ },
106
+ },
107
+ 'headingLevel': {
108
+ description: 'Niveau sémantique du titre (balise h1 à h6), pour l’intégration dans la hiérarchie de titres de la page',
109
+ control: {
110
+ type: 'select',
111
+ },
112
+ options: [1, 2, 3, 4, 5, 6],
113
+ table: {
114
+ category: 'props',
115
+ type: {
116
+ summary: '1 | 2 | 3 | 4 | 5 | 6',
117
+ },
118
+ defaultValue: {
119
+ summary: '2',
120
+ },
121
+ },
122
+ },
92
123
  'onUpdate:modelValue': {
93
124
  description: 'Événement déclenché lors de la mise à jour des filtres',
94
125
  control: {
@@ -254,7 +285,6 @@ export const Default: Story = {
254
285
 
255
286
  <template #profession="{ props }">
256
287
  <SearchListField
257
- label="Profession"
258
288
  v-bind="props"
259
289
  label="Profession"
260
290
  :items="professionList"
@@ -836,6 +866,108 @@ const professionList = [
836
866
  },
837
867
  }
838
868
 
869
+ export const Title: Story = {
870
+ parameters: {
871
+ sourceCode: [
872
+ {
873
+ name: 'Template',
874
+ code: `
875
+ <template>
876
+ <FilterSideBar
877
+ v-model="filters"
878
+ title="Filtres du tableau personnalisé"
879
+ >
880
+ <template #name="{ props }">
881
+ <SyTextField
882
+ v-bind="props"
883
+ label="Nom"
884
+ variant="outlined"
885
+ hide-details
886
+ />
887
+ </template>
888
+
889
+ <template #folder="{ props }">
890
+ <SyTextField
891
+ v-bind="props"
892
+ label="Type de dossier"
893
+ variant="outlined"
894
+ hide-details
895
+ />
896
+ </template>
897
+ </FilterSideBar>
898
+ </template>
899
+ `,
900
+ },
901
+ {
902
+ name: 'Script',
903
+ code: `
904
+ <script setup lang="ts">
905
+ import { ref } from 'vue'
906
+ import { FilterSideBar, SyTextField } from '@cnamts/synapse'
907
+
908
+ const filters = ref([
909
+ {
910
+ name: 'name',
911
+ title: 'Identité',
912
+ },
913
+ {
914
+ name: 'folder',
915
+ title: 'Type de dossier',
916
+ },
917
+ ])
918
+ </script>
919
+ `,
920
+ },
921
+ ],
922
+ },
923
+ args: {
924
+ 'onUpdate:modelValue': fn(),
925
+ 'title': 'Filtres du tableau personnalisé',
926
+ },
927
+ decorators: Default.decorators,
928
+ render: args => ({
929
+ components: { FilterSideBar, SyTextField },
930
+ setup() {
931
+ const filters = ref([
932
+ {
933
+ name: 'name',
934
+ title: 'Identité',
935
+ },
936
+ {
937
+ name: 'folder',
938
+ title: 'Type de dossier',
939
+ },
940
+ ])
941
+
942
+ return { args, filters }
943
+ },
944
+ template: `
945
+ <FilterSideBar
946
+ v-bind="args"
947
+ v-model="filters"
948
+ >
949
+ <template #name="{ props }">
950
+ <SyTextField
951
+ v-bind="props"
952
+ label="Nom"
953
+ variant="outlined"
954
+ hide-details
955
+ />
956
+ </template>
957
+
958
+ <template #folder="{ props }">
959
+ <SyTextField
960
+ v-bind="props"
961
+ label="Type de dossier"
962
+ variant="outlined"
963
+ hide-details
964
+ />
965
+ </template>
966
+ </FilterSideBar>
967
+ `,
968
+ }),
969
+ }
970
+
839
971
  export const ZIndex: Story = {
840
972
  args: {
841
973
  'onUpdate:modelValue': fn(),
@@ -2,30 +2,38 @@
2
2
  import type { FilterProp } from '@/composables/useFilterable/useFilterable'
3
3
  import useFilterable from '@/composables/useFilterable/useFilterable'
4
4
  import { mdiFilterVariant } from '@mdi/js'
5
- import { computed, onMounted, ref, toRef, watch } from 'vue'
5
+ import { computed, onMounted, ref, toRef, useId, watch } from 'vue'
6
6
  import type { VBtn } from 'vuetify/components/VBtn'
7
7
  import type { VNavigationDrawer } from 'vuetify/components/VNavigationDrawer'
8
8
  import ChipList from '../ChipList/ChipList.vue'
9
9
  import SyIcon from '../Customs/SyIcon/SyIcon.vue'
10
10
  import { locales as defaultLocales } from './locales'
11
11
  import vLockFocus from '@/directives/lockFocus'
12
+ import SyHeading from '@/components/SyHeading/SyHeading.vue'
12
13
 
13
14
  const props = withDefaults(defineProps<{
14
15
  modelValue?: FilterProp
15
16
  modale?: boolean
16
17
  locales?: typeof defaultLocales
17
18
  zIndex?: number
19
+ title?: string
20
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6
18
21
  }>(), {
19
22
  modelValue: () => [],
20
23
  modale: false,
21
24
  locales: () => defaultLocales,
22
25
  zIndex: undefined,
26
+ title: undefined,
27
+ headingLevel: 2,
23
28
  })
24
29
 
25
30
  const emits = defineEmits<{
26
31
  (e: 'update:modelValue', value: FilterProp): void
27
32
  }>()
28
33
 
34
+ // Id du titre pour lier le nom accessible du panneau au titre visible (aria-labelledby)
35
+ const titleId = useId()
36
+
29
37
  const {
30
38
  filters,
31
39
  removeChip,
@@ -133,7 +141,8 @@
133
141
  :aria-hidden="drawer ? undefined : 'true'"
134
142
  :inert="drawer ? undefined : 'true'"
135
143
  :aria-modal="props.modale"
136
- :aria-label="locales.modaleLabel"
144
+ :aria-label="props.title ? undefined : locales.modaleLabel"
145
+ :aria-labelledby="props.title ? titleId : undefined"
137
146
  :style="zIndexStyle"
138
147
  @keydown.escape.prevent="drawer = false"
139
148
  >
@@ -141,6 +150,14 @@
141
150
  v-lock-focus="$props.modale"
142
151
  @submit.prevent="applyFilters"
143
152
  >
153
+ <SyHeading
154
+ v-if="props.title"
155
+ :id="titleId"
156
+ class="sy-filters-side-bar__title px-4 pt-4 pb-2 text-h6 font-weight-bold"
157
+ :level="props.headingLevel"
158
+ >
159
+ {{ props.title }}
160
+ </SyHeading>
144
161
  <VExpansionPanels
145
162
  variant="accordion"
146
163
  tag="ul"
@@ -370,4 +370,59 @@ describe('FilterSideBar', () => {
370
370
  const drawer = wrapper.find('.v-navigation-drawer')
371
371
  expect(drawer.attributes('style') ?? '').not.toContain('z-index: 2401')
372
372
  })
373
+
374
+ const mountWithTitle = (title?: string, headingLevel?: 1 | 2 | 3 | 4 | 5 | 6) =>
375
+ mount(
376
+ defineComponent({
377
+ components: { VApp, FiltersSideBar: FilterSideBar },
378
+ data: () => ({ title, headingLevel }),
379
+ template: `
380
+ <VApp>
381
+ <FiltersSideBar :model-value="[]" :title="title" :heading-level="headingLevel" />
382
+ </VApp>
383
+ `,
384
+ }),
385
+ { global: { stubs: { Teleport: true } } },
386
+ )
387
+
388
+ it('displays the title heading above the filters when title is provided', () => {
389
+ const wrapper = mountWithTitle('Filtres du tableau')
390
+
391
+ const heading = wrapper.find('.sy-filters-side-bar__title')
392
+ expect(heading.exists()).toBe(true)
393
+ expect(heading.text()).toBe('Filtres du tableau')
394
+ // Niveau sémantique par défaut : h2
395
+ expect(heading.element.tagName).toBe('H2')
396
+ })
397
+
398
+ it('does not render the title heading when no title is provided', () => {
399
+ const wrapper = mountWithTitle()
400
+ expect(wrapper.find('.sy-filters-side-bar__title').exists()).toBe(false)
401
+ })
402
+
403
+ it('renders the title with the requested heading level', () => {
404
+ const wrapper = mountWithTitle('Filtres', 3)
405
+ expect(wrapper.find('.sy-filters-side-bar__title').element.tagName).toBe('H3')
406
+ })
407
+
408
+ it('links the drawer accessible name to the title via aria-labelledby', () => {
409
+ const wrapper = mountWithTitle('Filtres du tableau')
410
+
411
+ const heading = wrapper.find('.sy-filters-side-bar__title')
412
+ const drawer = wrapper.find('.v-navigation-drawer')
413
+ const titleId = heading.attributes('id')
414
+
415
+ expect(titleId).toBeTruthy()
416
+ expect(drawer.attributes('aria-labelledby')).toBe(titleId)
417
+ // aria-label retiré au profit de aria-labelledby quand un titre est fourni
418
+ expect(drawer.attributes('aria-label')).toBeUndefined()
419
+ })
420
+
421
+ it('falls back to the default aria-label when no title is provided', () => {
422
+ const wrapper = mountWithTitle()
423
+ const drawer = wrapper.find('.v-navigation-drawer')
424
+
425
+ expect(drawer.attributes('aria-label')).toBe('Filtres')
426
+ expect(drawer.attributes('aria-labelledby')).toBeUndefined()
427
+ })
373
428
  })
@@ -64,7 +64,6 @@ import * as FooterBarStories from './FooterBar.stories.ts';
64
64
  },
65
65
  ]
66
66
  const { smAndDown } = useDisplay()
67
- import '../../stories/styles/shared.css';
68
67
  const isMobile = computed(() => smAndDown.value)
69
68
  </script>
70
69
 
@@ -21,7 +21,6 @@ import * as FranceConnectBtnStories from './FranceConnectBtn.stories';
21
21
  <script setup lang="ts">
22
22
  import { FranceConnectBtn } from '@cnamts/synapse'
23
23
  </script>
24
- import '../../stories/styles/shared.css';
25
24
 
26
25
  <template>
27
26
  <FranceConnectBtn href="/" />
@@ -254,7 +254,6 @@ Il est nécessaire de faire attention à la place que prendront les éléments e
254
254
  <script setup lang="ts">
255
255
  import { mdiMagnify, mdiAccountCircleOutline } from '@mdi/js'
256
256
  </script>
257
- import '../../stories/styles/shared.css';
258
257
 
259
258
  <template>
260
259
  <HeaderBar>
@@ -20,7 +20,6 @@ import * as HeaderLoading from './HeaderLoading.stories';
20
20
  <script setup lang="ts">
21
21
  import { HeaderLoading } from '@cnamts/synapse'
22
22
  </script>
23
- import '../../stories/styles/shared.css';
24
23
 
25
24
  <template>
26
25
  <div class="pa-4">
@@ -22,7 +22,6 @@ import * as LangBtnStories from './LangBtn.stories';
22
22
  import { ref } from 'vue'
23
23
 
24
24
  const value = ref('fr')
25
- import '../../stories/styles/shared.css';
26
25
  const items = ['fr', 'en', 'co']
27
26
  const ariaLabel = 'Choix de la langue'
28
27
  </script>
@@ -21,7 +21,7 @@ import Logo from './Logo.vue';
21
21
  <script setup lang='ts'>
22
22
  import { Logo } from '@cnamts/synapse'
23
23
  </script>
24
- import '../../stories/styles/shared.css';
24
+
25
25
  <template>
26
26
  <Logo :hideSignature="false" :hideOrganism="false" :risquePro="false" ariaLabel="" :avatar="false" :dark="false" />
27
27
  </template>
@@ -17,17 +17,14 @@ import * as LunarCalendarStories from './LunarCalendar.stories';
17
17
 
18
18
  # Exemples d'utilisation
19
19
 
20
- ## Avec contraintes d'années
20
+ ## Champ requis
21
21
 
22
- <Canvas of={LunarCalendarStories.WithYearConstraints} />
22
+ <Canvas of={LunarCalendarStories.Required} />
23
23
 
24
- Limitation de la saisie entre deux années spécifiques.
24
+ ## Avec bouton de suppression
25
25
 
26
- ## Avec année minimale seulement
26
+ <Canvas of={LunarCalendarStories.WithClearable} />
27
27
 
28
- <Canvas of={LunarCalendarStories.WithMinYearOnly} />
29
-
30
- ## Avec année maximale seulement
31
-
32
- <Canvas of={LunarCalendarStories.WithMaxYearOnly} />
28
+ ## Avec texte d'aide
33
29
 
30
+ <Canvas of={LunarCalendarStories.HelpText} />