@cnamts/synapse 1.0.20 → 1.0.21

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 (135) hide show
  1. package/dist/{DateFilter-XURUmpMl.js → DateFilter-uN8OURoP.js} +1 -1
  2. package/dist/{NumberFilter-BZc0O8wV.js → NumberFilter-sm1dQNQi.js} +1 -1
  3. package/dist/{PeriodFilter-ZNdXcl3p.js → PeriodFilter-Cklsxnh9.js} +1 -1
  4. package/dist/{SelectFilter-DshYU5OK.js → SelectFilter-CWefj27Z.js} +1 -1
  5. package/dist/{TextFilter-D_c5dRPl.js → TextFilter-Ddyj885L.js} +1 -1
  6. package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
  7. package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
  8. package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
  9. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
  10. package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
  11. package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
  12. package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
  13. package/dist/components/ErrorPage/locales.d.ts +18 -3
  14. package/dist/components/FileUpload/FileUpload.d.ts +2 -0
  15. package/dist/components/MaintenancePage/locales.d.ts +18 -2
  16. package/dist/components/NotFoundPage/locales.d.ts +20 -4
  17. package/dist/components/StatusPage/StatusPage.d.ts +39 -0
  18. package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
  19. package/dist/components/index.d.ts +3 -0
  20. package/dist/design-system-v3.js +126 -123
  21. package/dist/design-system-v3.umd.cjs +163 -163
  22. package/dist/{main-CuI6xaPq.js → main-CWniLr0s.js} +15191 -14668
  23. package/dist/style.css +1 -1
  24. package/dist/utils/theme/index.d.ts +6 -0
  25. package/package.json +7 -4
  26. package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
  27. package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +67 -11
  28. package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
  29. package/src/components/CookieBanner/CookieBanner.vue +20 -5
  30. package/src/components/CookieBanner/accessibilite/Accessibility.mdx +67 -11
  31. package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
  32. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
  33. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
  34. package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
  35. package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
  36. package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
  37. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
  38. package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
  39. package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
  40. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
  41. package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +1 -1
  42. package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
  43. package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
  44. package/src/components/DatePicker/CalendarMode/DatePicker.vue +35 -11
  45. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
  46. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
  47. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
  48. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
  49. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
  50. package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
  51. package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
  52. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
  53. package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
  54. package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
  55. package/src/components/ErrorPage/ErrorPage.mdx +6 -16
  56. package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
  57. package/src/components/ErrorPage/ErrorPage.vue +38 -125
  58. package/src/components/ErrorPage/accessibilite/Accessibility.mdx +68 -6
  59. package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
  60. package/src/components/ErrorPage/locales.ts +21 -3
  61. package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
  62. package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
  63. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
  64. package/src/components/FileUpload/FileUpload.vue +5 -0
  65. package/src/components/FooterBar/FooterBar.stories.ts +18 -14
  66. package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
  67. package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
  68. package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
  69. package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +61 -6
  70. package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
  71. package/src/components/MaintenancePage/locales.ts +24 -3
  72. package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
  73. package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
  74. package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
  75. package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
  76. package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
  77. package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
  78. package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +78 -6
  79. package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
  80. package/src/components/NotFoundPage/locales.ts +24 -4
  81. package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
  82. package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
  83. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
  84. package/src/components/NotificationBar/NotificationBar.mdx +2 -2
  85. package/src/components/NotificationBar/accessibilite/Accessibility.mdx +68 -8
  86. package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
  87. package/src/components/PhoneField/PhoneField.stories.ts +46 -38
  88. package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
  89. package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
  90. package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
  91. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
  92. package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +63 -11
  93. package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
  94. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
  95. package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
  96. package/src/components/StatusPage/StatusPage.mdx +22 -0
  97. package/src/components/StatusPage/StatusPage.stories.ts +193 -0
  98. package/src/components/StatusPage/StatusPage.vue +145 -0
  99. package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
  100. package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
  101. package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
  102. package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
  103. package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
  104. package/src/components/TableToolbar/TableToolbar.vue +1 -1
  105. package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
  106. package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
  107. package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
  108. package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
  109. package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
  110. package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
  111. package/src/components/UploadWorkflow/useFileList.ts +7 -0
  112. package/src/components/index.ts +3 -0
  113. package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
  114. package/src/composables/rules/useFieldValidation.ts +24 -9
  115. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
  116. package/src/utils/theme/index.ts +19 -0
  117. package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
  118. package/dist/components/MaintenancePage/index.d.ts +0 -2
  119. package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
  120. package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
  121. package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
  122. package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
  123. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
  124. package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
  125. package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
  126. package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
  127. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
  128. package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
  129. package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
  130. package/src/components/MaintenancePage/index.ts +0 -3
  131. package/src/components/PageContainer/Accessibilite/AccessibilityGuide.mdx +0 -0
  132. package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
  133. package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
  134. /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
  135. /package/src/components/PageContainer/{Accessibilite → accessibilite}/Accessibility.mdx +0 -0
@@ -345,6 +345,7 @@ export const Default: Story = {
345
345
  <template>
346
346
  <DatePicker
347
347
  v-model="date"
348
+ label="Sélectionner une date"
348
349
  placeholder="Sélectionner une date"
349
350
  useCombinedMode
350
351
  format="DD/MM/YYYY"
@@ -366,6 +367,7 @@ export const Default: Story = {
366
367
  ],
367
368
  },
368
369
  args: {
370
+ 'label': 'Sélectionner une date',
369
371
  'placeholder': 'Sélectionner une date',
370
372
  'format': 'DD/MM/YYYY',
371
373
  'isBirthDate': false,
@@ -417,6 +419,7 @@ export const Required: Story = {
417
419
  <template>
418
420
  <DatePicker
419
421
  v-model="date"
422
+ label="Sélectionner une date"
420
423
  placeholder="Sélectionner une date"
421
424
  useCombinedMode
422
425
  required
@@ -424,6 +427,7 @@ export const Required: Story = {
424
427
  />
425
428
  <DatePicker
426
429
  v-model="date"
430
+ label="Sélectionner une date"
427
431
  placeholder="Sélectionner une date"
428
432
  useCombinedMode
429
433
  required
@@ -501,6 +505,7 @@ export const DateRange: Story = {
501
505
  <template>
502
506
  <DatePicker
503
507
  v-model="dateRange"
508
+ label="Sélectionner une période"
504
509
  placeholder="Sélectionner une période"
505
510
  format="DD/MM/YYYY"
506
511
  display-range
@@ -523,6 +528,7 @@ export const DateRange: Story = {
523
528
  ],
524
529
  },
525
530
  args: {
531
+ 'label': 'Sélectionner une période',
526
532
  'placeholder': 'Sélectionner une période',
527
533
  'format': 'DD/MM/YYYY',
528
534
  'dateFormatReturn': '',
@@ -572,6 +578,7 @@ export const BirthDate: Story = {
572
578
  <template>
573
579
  <DatePicker
574
580
  v-model="date"
581
+ label="Date de naissance"
575
582
  placeholder="Date de naissance"
576
583
  format="DD/MM/YYYY"
577
584
  isBirthDate
@@ -594,6 +601,7 @@ export const BirthDate: Story = {
594
601
  ],
595
602
  },
596
603
  args: {
604
+ label: 'Date de naissance',
597
605
  placeholder: 'Date de naissance',
598
606
  format: 'DD/MM/YYYY',
599
607
  isBirthDate: true,
@@ -637,6 +645,7 @@ export const WithValidation: Story = {
637
645
  <template>
638
646
  <DatePicker
639
647
  v-model="date"
648
+ label="Date requise"
640
649
  placeholder="Date requise"
641
650
  format="DD/MM/YYYY"
642
651
  required
@@ -676,6 +685,7 @@ export const WithValidation: Story = {
676
685
  ],
677
686
  },
678
687
  args: {
688
+ label: 'Date requise',
679
689
  placeholder: 'Date requise',
680
690
  format: 'DD/MM/YYYY',
681
691
  required: true,
@@ -726,6 +736,7 @@ export const DifferentFormats: Story = {
726
736
  <div class="d-flex flex-column">
727
737
  <DatePicker
728
738
  v-model="europeanDate"
739
+ label="Format européen"
729
740
  placeholder="Format européen"
730
741
  format="DD/MM/YYYY"
731
742
  class="mb-4"
@@ -733,6 +744,7 @@ export const DifferentFormats: Story = {
733
744
  />
734
745
  <DatePicker
735
746
  v-model="americanDate"
747
+ label="Format américain"
736
748
  placeholder="Format américain"
737
749
  format="MM/DD/YYYY"
738
750
  class="mb-4"
@@ -740,6 +752,7 @@ export const DifferentFormats: Story = {
740
752
  />
741
753
  <DatePicker
742
754
  v-model="isoDate"
755
+ label="Format ISO"
743
756
  placeholder="Format ISO"
744
757
  format="YYYY-MM-DD"
745
758
  useCombinedMode
@@ -777,6 +790,7 @@ export const DifferentFormats: Story = {
777
790
  <div class="d-flex flex-column pa-4">
778
791
  <DatePicker
779
792
  v-model="europeanDate"
793
+ label="Format européen"
780
794
  placeholder="Format européen"
781
795
  format="DD/MM/YYYY"
782
796
  class="mb-4"
@@ -784,6 +798,7 @@ export const DifferentFormats: Story = {
784
798
  />
785
799
  <DatePicker
786
800
  v-model="americanDate"
801
+ label="Format américain"
787
802
  placeholder="Format américain"
788
803
  format="MM/DD/YYYY"
789
804
  class="mb-4"
@@ -791,6 +806,7 @@ export const DifferentFormats: Story = {
791
806
  />
792
807
  <DatePicker
793
808
  v-model="isoDate"
809
+ label="Format ISO"
794
810
  placeholder="Format ISO"
795
811
  format="YYYY-MM-DD"
796
812
  useCombinedMode
@@ -814,6 +830,7 @@ export const WithDateFormatReturn: Story = {
814
830
  <div class="d-flex flex-column">
815
831
  <DatePicker
816
832
  v-model="date"
833
+ label="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
817
834
  placeholder="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
818
835
  format="DD/MM/YYYY"
819
836
  dateFormatReturn="YYYY-MM-DD"
@@ -849,10 +866,10 @@ export const WithDateFormatReturn: Story = {
849
866
  <div class="d-flex flex-column pa-4">
850
867
  <DatePicker
851
868
  v-model="date"
869
+ label="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
852
870
  placeholder="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
853
871
  format="DD/MM/YYYY"
854
872
  dateFormatReturn="YYYY-MM-DD"
855
- class="mb-4"
856
873
  useCombinedMode
857
874
  />
858
875
  <div>Valeur du modèle: {{ date }}</div>
@@ -874,6 +891,7 @@ export const DisablePickerInteraction: Story = {
874
891
  <template>
875
892
  <DatePicker
876
893
  v-model="date"
894
+ label="Saisie manuelle uniquement"
877
895
  placeholder="Saisie manuelle uniquement"
878
896
  format="DD/MM/YYYY"
879
897
  useCombinedMode
@@ -896,6 +914,7 @@ export const DisablePickerInteraction: Story = {
896
914
  ],
897
915
  },
898
916
  args: {
917
+ label: 'Saisie manuelle uniquement',
899
918
  placeholder: 'Saisie manuelle uniquement',
900
919
  format: 'DD/MM/YYYY',
901
920
  displayIcon: true,
@@ -935,6 +954,7 @@ export const AutoFormattingInput: Story = {
935
954
  <div class="d-flex flex-column">
936
955
  <DatePicker
937
956
  v-model="date"
957
+ label="Saisie avec formatage automatique"
938
958
  placeholder="Saisie avec formatage automatique"
939
959
  format="DD-MM-YYYY"
940
960
  useCombinedMode
@@ -957,6 +977,7 @@ export const AutoFormattingInput: Story = {
957
977
  ],
958
978
  },
959
979
  args: {
980
+ label: 'Saisie avec formatage automatique',
960
981
  placeholder: 'Saisie avec formatage automatique',
961
982
  format: 'DD-MM-YYYY',
962
983
  useCombinedMode: true,
@@ -990,6 +1011,7 @@ export const CustomDateFormat: Story = {
990
1011
  <template>
991
1012
  <DatePicker
992
1013
  v-model="date"
1014
+ label="Format AAAA.MM.JJ"
993
1015
  placeholder="Format AAAA.MM.JJ"
994
1016
  format="AAAA.MM.JJ"
995
1017
  useCombinedMode
@@ -1011,6 +1033,7 @@ export const CustomDateFormat: Story = {
1011
1033
  ],
1012
1034
  },
1013
1035
  args: {
1036
+ label: 'Format AAAA.MM.JJ',
1014
1037
  placeholder: 'Format AAAA.MM.JJ',
1015
1038
  format: 'YYYY.MM.DD',
1016
1039
  useCombinedMode: true,
@@ -1047,6 +1070,7 @@ export const ReadonlyMode: Story = {
1047
1070
  <template>
1048
1071
  <DatePicker
1049
1072
  v-model="date"
1073
+ label="Date en lecture seule"
1050
1074
  placeholder="Date en lecture seule"
1051
1075
  format="DD/MM/YYYY"
1052
1076
  useCombinedMode
@@ -1074,6 +1098,7 @@ export const ReadonlyMode: Story = {
1074
1098
  ],
1075
1099
  },
1076
1100
  args: {
1101
+ label: 'Date en lecture seule',
1077
1102
  placeholder: 'Date en lecture seule',
1078
1103
  format: 'DD/MM/YYYY',
1079
1104
  useCombinedMode: true,
@@ -1116,6 +1141,7 @@ export const AppendIcon: Story = {
1116
1141
  <template>
1117
1142
  <DatePicker
1118
1143
  v-model="date"
1144
+ label="Date avec icône à la fin"
1119
1145
  placeholder="Date avec icône à la fin"
1120
1146
  format="DD/MM/YYYY"
1121
1147
  useCombinedMode
@@ -1139,6 +1165,7 @@ export const AppendIcon: Story = {
1139
1165
  ],
1140
1166
  },
1141
1167
  args: {
1168
+ label: 'Date avec icône à la fin',
1142
1169
  placeholder: 'Date avec icône à la fin',
1143
1170
  format: 'DD/MM/YYYY',
1144
1171
  useCombinedMode: true,
@@ -1177,6 +1204,7 @@ export const WithCustomPeriod: Story = {
1177
1204
  <template>
1178
1205
  <DatePicker
1179
1206
  v-model="date"
1207
+ label="Date avec icône à la fin"
1180
1208
  placeholder="Date avec icône à la fin"
1181
1209
  format="DD/MM/YYYY"
1182
1210
  useCombinedMode
@@ -1226,6 +1254,7 @@ export const WithCustomPeriod: Story = {
1226
1254
  ],
1227
1255
  },
1228
1256
  args: {
1257
+ label: 'Date avec icône à la fin',
1229
1258
  placeholder: 'Date avec icône à la fin',
1230
1259
  format: 'DD/MM/YYYY',
1231
1260
  useCombinedMode: true,
@@ -1292,6 +1321,7 @@ export const WithTextFieldActivator: Story = {
1292
1321
  <template>
1293
1322
  <DatePicker
1294
1323
  v-model="date"
1324
+ label="Cliquez sur le champ pour ouvrir"
1295
1325
  placeholder="Cliquez sur le champ pour ouvrir"
1296
1326
  format="DD/MM/YYYY"
1297
1327
  useCombinedMode
@@ -1314,6 +1344,7 @@ export const WithTextFieldActivator: Story = {
1314
1344
  ],
1315
1345
  },
1316
1346
  args: {
1347
+ label: 'Cliquez sur le champ pour ouvrir',
1317
1348
  placeholder: 'Cliquez sur le champ pour ouvrir',
1318
1349
  format: 'DD/MM/YYYY',
1319
1350
  useCombinedMode: true,
@@ -1355,6 +1386,7 @@ export const AutoClampFeature: Story = {
1355
1386
  <h4 class="mt-4">Format JJ/MM/AAAA (séparateur /)</h4>
1356
1387
  <DatePicker
1357
1388
  v-model="dateSlash"
1389
+ label="Saisie avec auto clamp - séparateur /"
1358
1390
  placeholder="Saisie avec auto clamp - séparateur /"
1359
1391
  format="DD/MM/YYYY"
1360
1392
  useCombinedMode
@@ -1364,6 +1396,7 @@ export const AutoClampFeature: Story = {
1364
1396
  <h4 class="mt-4">Format JJ-MM-AAAA (séparateur -)</h4>
1365
1397
  <DatePicker
1366
1398
  v-model="dateDash"
1399
+ label="Saisie avec auto clamp - séparateur -"
1367
1400
  placeholder="Saisie avec auto clamp - séparateur -"
1368
1401
  format="DD-MM-YYYY"
1369
1402
  useCombinedMode
@@ -1373,6 +1406,7 @@ export const AutoClampFeature: Story = {
1373
1406
  <h4 class="mt-4">Format AAAA.MM.JJ (séparateur .)</h4>
1374
1407
  <DatePicker
1375
1408
  v-model="dateDot"
1409
+ label="Saisie avec auto clamp - séparateur ."
1376
1410
  placeholder="Saisie avec auto clamp - séparateur ."
1377
1411
  format="YYYY.MM.DD"
1378
1412
  useCombinedMode
@@ -1414,6 +1448,7 @@ export const AutoClampFeature: Story = {
1414
1448
  <h4 class="mb-2">Format JJ/MM/AAAA (séparateur /)</h4>
1415
1449
  <DatePicker
1416
1450
  v-model="dateSlash"
1451
+ label="Saisie avec auto clamp - séparateur /"
1417
1452
  placeholder="Saisie avec auto clamp - séparateur /"
1418
1453
  format="DD/MM/YYYY"
1419
1454
  useCombinedMode
@@ -1424,6 +1459,7 @@ export const AutoClampFeature: Story = {
1424
1459
  <h4 class="mb-2">Format JJ-MM-AAAA (séparateur -)</h4>
1425
1460
  <DatePicker
1426
1461
  v-model="dateDash"
1462
+ label="Saisie avec auto clamp - séparateur -"
1427
1463
  placeholder="Saisie avec auto clamp - séparateur -"
1428
1464
  format="DD-MM-YYYY"
1429
1465
  useCombinedMode
@@ -1434,6 +1470,7 @@ export const AutoClampFeature: Story = {
1434
1470
  <h4 class="mb-2">Format AAAA.MM.JJ (séparateur .)</h4>
1435
1471
  <DatePicker
1436
1472
  v-model="dateDot"
1473
+ label="Saisie avec auto clamp - séparateur ."
1437
1474
  placeholder="Saisie avec auto clamp - séparateur ."
1438
1475
  format="YYYY.MM.DD"
1439
1476
  useCombinedMode
@@ -1460,6 +1497,7 @@ export const WithFormSubmission: Story = {
1460
1497
  <DatePicker
1461
1498
  ref="datePicker"
1462
1499
  v-model="date"
1500
+ label="Date requise"
1463
1501
  placeholder="Date requise"
1464
1502
  format="DD/MM/YYYY"
1465
1503
  required
@@ -1524,10 +1562,11 @@ export const WithFormSubmission: Story = {
1524
1562
  <DatePicker
1525
1563
  ref="datePicker"
1526
1564
  v-model="date"
1565
+ label="Date requise"
1527
1566
  placeholder="Date requise"
1528
1567
  format="DD/MM/YYYY"
1529
1568
  required
1530
- class="mb-4"
1569
+ class="mb-4"
1531
1570
  useCombinedMode
1532
1571
  />
1533
1572
  <v-btn type="submit" color="primary">Soumettre</v-btn>
@@ -1553,6 +1592,7 @@ export const CustomRules: Story = {
1553
1592
  <template>
1554
1593
  <DatePicker
1555
1594
  v-model="date"
1595
+ label="Date de rendez-vous"
1556
1596
  placeholder="Date requise"
1557
1597
  format="DD/MM/YYYY"
1558
1598
  required
@@ -1631,6 +1671,7 @@ export const CustomWarningRules: Story = {
1631
1671
  <template>
1632
1672
  <DatePicker
1633
1673
  v-model="date"
1674
+ label="Date requise"
1634
1675
  placeholder="Date requise"
1635
1676
  format="DD/MM/YYYY"
1636
1677
  required
@@ -103,30 +103,57 @@
103
103
 
104
104
  /**
105
105
  * =====================
106
- * Validation setup (safe wrapper for readonly)
106
+ * Validation setup (safe wrapper for readonly, reactive to toggles)
107
107
  * =====================
108
108
  */
109
- const validationApi = !readonly.value
110
- ? useValidation({
111
- showSuccessMessages: props.showSuccessMessages,
112
- fieldIdentifier: props.label || props.placeholder,
113
- disableErrorHandling: props.disableErrorHandling,
114
- })
115
- : {
116
- errors: ref<string[]>([]),
117
- warnings: ref<string[]>([]),
118
- successes: ref<string[]>([]),
119
- hasError: ref(false),
120
- clearValidation: () => {},
121
- validateField: () => ({
122
- hasError: false,
123
- hasWarning: false,
124
- hasSuccess: false,
125
- state: { errors: [], warnings: [], successes: [] },
126
- } as ValidationResult),
127
- }
109
+ const baseValidation = useValidation({
110
+ showSuccessMessages: props.showSuccessMessages,
111
+ fieldIdentifier: props.label || props.placeholder,
112
+ disableErrorHandling: props.disableErrorHandling,
113
+ })
128
114
 
129
- const { errors, warnings, successes, hasError, clearValidation, validateField } = validationApi
115
+ const readonlyValidation = {
116
+ errors: ref<string[]>([]),
117
+ warnings: ref<string[]>([]),
118
+ successes: ref<string[]>([]),
119
+ hasError: ref(false),
120
+ clearValidation: () => {},
121
+ validateField: () => ({
122
+ hasError: false,
123
+ hasWarning: false,
124
+ hasSuccess: false,
125
+ state: { errors: [], warnings: [], successes: [] },
126
+ } as ValidationResult),
127
+ }
128
+
129
+ const validationApi = computed(() => (readonly.value ? readonlyValidation : baseValidation))
130
+
131
+ const errors = computed({
132
+ get: () => validationApi.value.errors.value,
133
+ set: (value) => { validationApi.value.errors.value = value },
134
+ })
135
+ const warnings = computed({
136
+ get: () => validationApi.value.warnings.value,
137
+ set: (value) => { validationApi.value.warnings.value = value },
138
+ })
139
+ const successes = computed({
140
+ get: () => validationApi.value.successes.value,
141
+ set: (value) => { validationApi.value.successes.value = value },
142
+ })
143
+ const hasError = computed(() => {
144
+ const api = validationApi.value
145
+ // baseValidation exposes a computed hasError, readonly stub exposes a ref
146
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- computed/ref dual shape
147
+ return (api as any).hasError?.value ?? api.errors.value.length > 0
148
+ })
149
+
150
+ const clearValidation = () => validationApi.value.clearValidation()
151
+
152
+ const validateField = (
153
+ value: unknown,
154
+ rules?: ValidationRule[],
155
+ warningRules?: ValidationRule[],
156
+ ): ValidationResult => validationApi.value.validateField(value, rules, warningRules)
130
157
 
131
158
  // Agrégation des erreurs internes et externes
132
159
  const errorMessages = computed(() => [...errors.value, ...props.externalErrorMessages])
@@ -231,6 +231,45 @@ export default meta
231
231
  type Story = StoryObj<typeof meta>
232
232
 
233
233
  export const Default: Story = {
234
+ parameters: {
235
+ sourceCode: [
236
+ {
237
+ name: 'Script',
238
+ code: `
239
+ <script setup lang="ts">
240
+ import { ref } from 'vue'
241
+ import { DatePicker } from '@cnamts/synapse'
242
+
243
+ const date = ref<string | null>(null)
244
+ </script>
245
+ `,
246
+ },
247
+ {
248
+ name: 'Template',
249
+ code: `
250
+ <template>
251
+ <div>
252
+ <DatePicker
253
+ v-model="date"
254
+ format="DD/MM/YYYY"
255
+ date-format-return=""
256
+ placeholder="JJ/MM/AAAA"
257
+ label="Date avec règles de validation"
258
+ required
259
+ is-outlined
260
+ display-icon
261
+ :no-icon="false"
262
+ :no-calendar="true"
263
+ />
264
+ <div style="margin-top: 10px; font-family: monospace; color: #666;">
265
+ Valeur : {{ date }}
266
+ </div>
267
+ </div>
268
+ </template>
269
+ `,
270
+ },
271
+ ],
272
+ },
234
273
  args: {
235
274
  'noCalendar': true,
236
275
  'format': 'DD/MM/YYYY',
@@ -275,6 +314,51 @@ export const Default: Story = {
275
314
  }
276
315
 
277
316
  export const Required: Story = {
317
+ parameters: {
318
+ sourceCode: [
319
+ {
320
+ name: 'Script',
321
+ code: `
322
+ <script setup lang="ts">
323
+ import { ref } from 'vue'
324
+ import { DatePicker } from '@cnamts/synapse'
325
+
326
+ const date = ref<string | null>(null)
327
+ </script>
328
+ `,
329
+ },
330
+ {
331
+ name: 'Template',
332
+ code: `
333
+ <template>
334
+ <div>
335
+ <h4 class="mb-4">Sans astérisque :</h4>
336
+ <DatePicker
337
+ v-model="date"
338
+ format="DD/MM/YYYY"
339
+ placeholder="JJ/MM/AAAA"
340
+ label="Date avec règles de validation"
341
+ required
342
+ is-outlined
343
+ :no-calendar="true"
344
+ />
345
+ <h4 class="mb-4">Avec astérisque :</h4>
346
+ <DatePicker
347
+ v-model="date"
348
+ format="DD/MM/YYYY"
349
+ placeholder="JJ/MM/AAAA"
350
+ label="Date avec règles de validation"
351
+ required
352
+ is-outlined
353
+ :no-calendar="true"
354
+ display-asterisk
355
+ />
356
+ </div>
357
+ </template>
358
+ `,
359
+ },
360
+ ],
361
+ },
278
362
  args: {
279
363
  'noCalendar': true,
280
364
  'format': 'DD/MM/YYYY',
@@ -359,6 +443,7 @@ export const EuropeanFormat: Story = {
359
443
  'format': 'DD/MM/YYYY',
360
444
  'dateFormatReturn': 'YYYY/MM/DD',
361
445
  'placeholder': 'JJ/MM/AAAA',
446
+ 'label': 'Date avec règles de validation',
362
447
  'required': true,
363
448
  'noIcon': true,
364
449
  'onUpdate:modelValue': fn(),
@@ -421,6 +506,7 @@ export const CustomRules: Story = {
421
506
  'noCalendar': true,
422
507
  'format': 'DD/MM/YYYY',
423
508
  'dateFormatReturn': 'DD/MM/YYYY',
509
+ 'label': 'Date avec règles personnalisées',
424
510
  'placeholder': 'DD/MM/YYYY',
425
511
  'required': true,
426
512
  'customRules': [{
@@ -492,6 +578,7 @@ export const WarningRules: Story = {
492
578
  'noCalendar': true,
493
579
  'format': 'DD/MM/YYYY',
494
580
  'placeholder': 'JJ/MM/AAAA',
581
+ 'label': 'Date avec règles d\'avertissement',
495
582
  'customWarningRules': [{
496
583
  type: 'custom',
497
584
  options: {
@@ -553,6 +640,7 @@ export const WithAppendIcon: Story = {
553
640
  'noCalendar': true,
554
641
  'format': 'DD/MM/YYYY',
555
642
  'placeholder': 'JJ/MM/AAAA',
643
+ 'label': 'Date avec icône en suffixe',
556
644
  'displayAppendIcon': true,
557
645
  'onUpdate:modelValue': fn(),
558
646
  'onFocus': fn(),
@@ -623,6 +711,7 @@ export const WithErrorDisabled: Story = {
623
711
  format: 'DD/MM/YYYY',
624
712
  dateFormatReturn: 'YYYY/MM/DD',
625
713
  placeholder: 'Date requise sans erreur',
714
+ label: 'Date requise sans erreur',
626
715
  required: true,
627
716
  noIcon: true,
628
717
  disableErrorHandling: true,
@@ -757,6 +846,7 @@ export const AutoClampFeature: Story = {
757
846
  <DatePicker
758
847
  v-model="dateSlash"
759
848
  placeholder="Saisie avec auto clamp - séparateur /"
849
+ label="Date"
760
850
  format="DD/MM/YYYY"
761
851
  noCalendar
762
852
  autoClamp
@@ -767,6 +857,7 @@ export const AutoClampFeature: Story = {
767
857
  <DatePicker
768
858
  v-model="dateDash"
769
859
  placeholder="Saisie avec auto clamp - séparateur -"
860
+ label="Date"
770
861
  format="DD-MM-YYYY"
771
862
  noCalendar
772
863
  autoClamp
@@ -777,6 +868,7 @@ export const AutoClampFeature: Story = {
777
868
  <DatePicker
778
869
  v-model="dateDot"
779
870
  placeholder="Saisie avec auto clamp - séparateur ."
871
+ label="Date"
780
872
  format="YYYY.MM.DD"
781
873
  noCalendar
782
874
  autoClamp
@@ -787,6 +879,7 @@ export const AutoClampFeature: Story = {
787
879
  <DatePicker
788
880
  v-model="dateRange"
789
881
  placeholder="Saisie plage avec auto clamp"
882
+ label="Date"
790
883
  format="DD/MM/YYYY"
791
884
  displayRange
792
885
  noCalendar
@@ -874,6 +967,7 @@ export const DifferentFormats: Story = {
874
967
  <DatePicker
875
968
  v-model="value1"
876
969
  placeholder="Format JJ/MM/AAAA"
970
+ label="Date"
877
971
  format="DD/MM/YYYY"
878
972
  no-calendar
879
973
  class="py-4"
@@ -881,6 +975,7 @@ export const DifferentFormats: Story = {
881
975
  <DatePicker
882
976
  v-model="value2"
883
977
  placeholder="Format MM/JJ/AAAA"
978
+ label="Date"
884
979
  format="MM/DD/YYYY"
885
980
  no-calendar
886
981
  class="py-4"
@@ -888,6 +983,7 @@ export const DifferentFormats: Story = {
888
983
  <DatePicker
889
984
  v-model="value3"
890
985
  placeholder="Format AAAA-MM-JJ"
986
+ label="Date"
891
987
  format="YYYY-MM-DD"
892
988
  no-calendar
893
989
  class="py-4"
@@ -895,6 +991,7 @@ export const DifferentFormats: Story = {
895
991
  <DatePicker
896
992
  v-model="value4"
897
993
  placeholder="Format JJ-MM-AA"
994
+ label="Date"
898
995
  format="DD-MM-YY"
899
996
  no-calendar
900
997
  class="py-4"
@@ -902,6 +999,7 @@ export const DifferentFormats: Story = {
902
999
  <DatePicker
903
1000
  v-model="value5"
904
1001
  placeholder="Format JJ.MM.AAAA"
1002
+ label="Date"
905
1003
  format="DD.MM.YYYY"
906
1004
  no-calendar
907
1005
  class="py-4"
@@ -0,0 +1,83 @@
1
+ import { Controls, Canvas, Meta, Source } from '@storybook/blocks';
2
+
3
+ import * as DeclarationAccessibilityPageStories from './DeclarationAccessibilityPage.stories.ts';
4
+
5
+ <Meta of={DeclarationAccessibilityPageStories} />
6
+
7
+ # DeclarationAccessibilityPage
8
+
9
+ Le composant `DeclarationAccessibilityPage` permet de générer une déclaration d'accessibilité conforme aux exigences légales françaises (RGAA) pour un site ou une application web.
10
+
11
+ <Canvas of={DeclarationAccessibilityPageStories.Default} />
12
+
13
+ ## API
14
+
15
+ <Controls />
16
+
17
+ ## Utilisation standard
18
+
19
+ La version standard de la déclaration d'accessibilité contient les informations minimales requises.
20
+
21
+ <Canvas of={DeclarationAccessibilityPageStories.Default} />
22
+
23
+ ## Cas simple
24
+
25
+ Un exemple de déclaration avec les informations minimales requises.
26
+
27
+ <Canvas of={DeclarationAccessibilityPageStories.SimpleCase} />
28
+
29
+ ## Avec non-conformités
30
+
31
+ Exemple de déclaration incluant des non-conformités identifiées.
32
+
33
+ <Canvas of={DeclarationAccessibilityPageStories.WithNonConformities} />
34
+
35
+ ## Avec dérogations
36
+
37
+ Exemple de déclaration incluant des dérogations pour charge disproportionnée.
38
+
39
+ <Canvas of={DeclarationAccessibilityPageStories.WithExemptions} />
40
+
41
+ ## Avec environnements de tests
42
+
43
+ Exemple de déclaration incluant les environnements de tests utilisés pour l'audit d'accessibilité.
44
+
45
+ <Canvas of={DeclarationAccessibilityPageStories.WithTestsEnvironement} />
46
+
47
+ ## Avec plan d'accessibilité
48
+
49
+ Exemple de déclaration incluant un plan d'accessibilité avec des libellés personnalisés.
50
+
51
+ <Canvas of={DeclarationAccessibilityPageStories.WithAccessibilityPlan} />
52
+
53
+ ## Accessibilité
54
+
55
+ Le composant `DeclarationAccessibilityPage` est lui-même conçu pour être pleinement accessible :
56
+ - Structure sémantique avec utilisation appropriée des balises HTML5
57
+ - Contraste des couleurs conforme aux exigences RGAA
58
+ - Navigation au clavier facilitée
59
+ - Compatibilité avec les technologies d'assistance
60
+
61
+
62
+ ## Exemple d'utilisation
63
+
64
+ <Source dark code={`
65
+ <script setup lang="ts">
66
+ import { DeclarationAccessibilityPage } from '@cnamts/synapse'
67
+ </script>
68
+
69
+ <template>
70
+ <DeclarationAccessibilityPage
71
+ entityName="L'Assurance Maladie"
72
+ siteName="ameli.fr"
73
+ siteUrl="https://www.ameli.fr"
74
+ :averageComplianceRate="78"
75
+ auditEntity="Société d'audit AccessiWeb"
76
+ contactEmail="accessibilite@ameli.fr"
77
+ :nonConformities="[
78
+ 'La vidéo de présentation n\'a pas de transcription. Cette erreur sera corrigée avant le 31 mars 2023.',
79
+ 'Le bouton d\'envoi du formulaire contient un intitulé incorrect. Cette erreur sera corrigée prochainement.'
80
+ ]"
81
+ />
82
+ </template>
83
+ `} />