@cnamts/synapse 1.0.6 → 1.0.8

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 (235) hide show
  1. package/dist/{DateFilter-BlOpwEVq.js → DateFilter-DkqG0pmr.js} +1 -1
  2. package/dist/{NumberFilter-BPUXE4wY.js → NumberFilter-Ck7AwD39.js} +1 -1
  3. package/dist/{PeriodFilter-B2yx329_.js → PeriodFilter-LRI6YpgU.js} +1 -1
  4. package/dist/{SelectFilter-CedKn1oV.js → SelectFilter-DPc70Jk7.js} +1 -1
  5. package/dist/{TextFilter-DkhJjRtR.js → TextFilter-DRQL7uD8.js} +1 -1
  6. package/dist/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.d.ts +116 -0
  7. package/dist/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
  8. package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +220 -0
  9. package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.d.ts +68 -0
  10. package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.d.ts +70 -0
  11. package/dist/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.d.ts +204 -0
  12. package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +26 -26
  13. package/dist/components/Amelipro/AmeliproBadge/AmeliproBadge.d.ts +59 -0
  14. package/dist/components/Amelipro/AmeliproBtn/AmeliproBtn.d.ts +3 -3
  15. package/dist/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.d.ts +1 -1
  16. package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +214 -0
  17. package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +70 -0
  18. package/dist/components/Amelipro/AmeliproCarousel/types.d.ts +7 -0
  19. package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +125 -0
  20. package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +1 -1
  21. package/dist/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.d.ts +2 -2
  22. package/dist/components/Amelipro/AmeliproResultList/AmeliproResultList.d.ts +164 -0
  23. package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +27 -27
  24. package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +1 -1
  25. package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +1 -1
  26. package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +32 -32
  27. package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +6 -6
  28. package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +7 -7
  29. package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +1 -1
  30. package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +2 -2
  31. package/dist/components/ChipList/ChipList.d.ts +4 -0
  32. package/dist/components/ChipList/locales.d.ts +4 -2
  33. package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +8 -8
  34. package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +329 -1296
  35. package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +0 -1
  36. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +2 -0
  37. package/dist/components/Customs/SyTabs/SyTabs.d.ts +71 -0
  38. package/dist/components/Customs/SyTabs/config.d.ts +17 -0
  39. package/dist/components/Customs/SyTabs/types.d.ts +11 -0
  40. package/dist/components/Customs/SyTextField/SyTextField.d.ts +9 -9
  41. package/dist/components/DataList/DataList.d.ts +1 -1
  42. package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4811 -240
  43. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +52 -33
  44. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +23 -10
  45. package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +1 -0
  46. package/dist/components/DatePicker/composables/useTodayButton.d.ts +1 -0
  47. package/dist/components/DialogBox/DialogBox.d.ts +219 -0
  48. package/dist/components/HeaderLoading/HeaderLoading.d.ts +27 -0
  49. package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +110 -3
  50. package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +19 -1
  51. package/dist/components/LangBtn/LangBtn.d.ts +2 -2
  52. package/dist/components/NirField/NirField.d.ts +18 -18
  53. package/dist/components/PeriodField/PeriodField.d.ts +10766 -1620
  54. package/dist/components/PhoneField/PhoneField.d.ts +1866 -2
  55. package/dist/components/PhoneField/indicatifs.d.ts +1 -0
  56. package/dist/components/PhoneField/locales.d.ts +1 -0
  57. package/dist/components/RangeField/RangeField.d.ts +1 -1
  58. package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +1 -1
  59. package/dist/components/SubHeader/SubHeader.d.ts +8 -0
  60. package/dist/components/SubHeader/locales.d.ts +1 -0
  61. package/dist/components/SyTextArea/SyTextArea.d.ts +6 -6
  62. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
  63. package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
  64. package/dist/components/Tables/common/SyTablePagination.d.ts +333 -1296
  65. package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +2 -2
  66. package/dist/components/Tables/common/types.d.ts +2 -0
  67. package/dist/components/index.d.ts +9 -0
  68. package/dist/design-system-v3.js +173 -164
  69. package/dist/design-system-v3.umd.cjs +286 -263
  70. package/dist/{main-BXPFSAB4.js → main-DXMoMtj5.js} +13176 -11457
  71. package/dist/services/NotificationService.d.ts +1 -0
  72. package/dist/style.css +1 -1
  73. package/package.json +1 -1
  74. package/src/assets/amelipro/icons.ts +38 -11
  75. package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.mdx +20 -0
  76. package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.stories.ts +135 -0
  77. package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.vue +107 -0
  78. package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +37 -0
  79. package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/__snapshots__/AmeliproAccordionGroup.spec.ts.snap +513 -0
  80. package/src/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
  81. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.mdx +16 -0
  82. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +300 -0
  83. package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +288 -0
  84. package/src/components/Amelipro/AmeliproAccordionList/__tests__/AmeliproAccordionList.spec.ts +38 -0
  85. package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +1712 -0
  86. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.mdx +19 -0
  87. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +68 -0
  88. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue +66 -0
  89. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +145 -0
  90. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/AmeliproAccordionResultTemplate.spec.ts +24 -0
  91. package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +127 -0
  92. package/src/components/Amelipro/AmeliproAccordionResult/__tests__/AmeliproAccordionResult.spec.ts +24 -0
  93. package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +123 -0
  94. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.mdx +20 -0
  95. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +273 -0
  96. package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +275 -0
  97. package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/AmeliproAccordionResultList.spec.ts +38 -0
  98. package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +1593 -0
  99. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.mdx +15 -0
  100. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.stories.ts +54 -0
  101. package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +76 -0
  102. package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +20 -0
  103. package/src/components/Amelipro/AmeliproBadge/__tests__/__snapshots__/AmeliproBadge.spec.ts.snap +19 -0
  104. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.mdx +15 -0
  105. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.stories.ts +191 -0
  106. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +263 -0
  107. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.vue +93 -0
  108. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/AmeliproCarouselItem.spec.ts +24 -0
  109. package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/__snapshots__/AmeliproCarouselItem.spec.ts.snap +43 -0
  110. package/src/components/Amelipro/AmeliproCarousel/__tests__/AmeliproCarousel.spec.ts +40 -0
  111. package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +342 -0
  112. package/src/components/Amelipro/AmeliproCarousel/types.d.ts +8 -0
  113. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.mdx +18 -0
  114. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +67 -0
  115. package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +233 -0
  116. package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +21 -0
  117. package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +140 -0
  118. package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +7 -1
  119. package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +5 -4
  120. package/src/components/Amelipro/AmeliproIcon/iconList.ts +6 -0
  121. package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +5 -4
  122. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.mdx +15 -0
  123. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +264 -0
  124. package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +231 -0
  125. package/src/components/Amelipro/AmeliproResultList/__tests__/AmeliproResultList.spec.ts +37 -0
  126. package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +434 -0
  127. package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +6 -5
  128. package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +23 -26
  129. package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +2 -2
  130. package/src/components/ChipList/Accessibilite.stories.ts +4 -0
  131. package/src/components/ChipList/ChipList.vue +185 -42
  132. package/src/components/ChipList/locales.ts +4 -2
  133. package/src/components/ChipList/tests/chipList.spec.ts +7 -4
  134. package/src/components/Customs/Selects/SelectOverview.mdx +34 -66
  135. package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts +10 -10
  136. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.mdx +3 -0
  137. package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.stories.ts +14 -0
  138. package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +14 -6
  139. package/src/components/Customs/Selects/SySelect/SySelect.vue +268 -205
  140. package/src/components/Customs/Selects/SySelect/composables/tests/useSySelectKeyboard.spec.ts +0 -10
  141. package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +0 -5
  142. package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +184 -25
  143. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +3 -1
  144. package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +165 -0
  145. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +28 -9
  146. package/src/components/Customs/SyTabs/Accessibilite.mdx +309 -0
  147. package/src/components/Customs/SyTabs/SyTabs.mdx +117 -0
  148. package/src/components/Customs/SyTabs/SyTabs.stories.ts +354 -0
  149. package/src/components/Customs/SyTabs/SyTabs.vue +413 -0
  150. package/src/components/Customs/SyTabs/config.ts +17 -0
  151. package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +425 -0
  152. package/src/components/Customs/SyTabs/types.ts +12 -0
  153. package/src/components/Customs/SyTextField/SyTextField.mdx +3 -0
  154. package/src/components/Customs/SyTextField/SyTextField.stories.ts +142 -1
  155. package/src/components/Customs/SyTextField/SyTextField.vue +19 -16
  156. package/src/components/DataList/DataList.vue +47 -49
  157. package/src/components/DataListGroup/DataListGroup.vue +1 -1
  158. package/src/components/DataListItem/DataListItem.vue +67 -63
  159. package/src/components/DataListItem/tests/DataListItem.spec.ts +2 -2
  160. package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +3 -3
  161. package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
  162. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +412 -649
  163. package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +215 -0
  164. package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +218 -0
  165. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +2 -0
  166. package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
  167. package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +218 -0
  168. package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +281 -0
  169. package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +17 -4
  170. package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +111 -18
  171. package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +238 -6
  172. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +716 -757
  173. package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +4 -4
  174. package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +17 -10
  175. package/src/components/DatePicker/composables/useDateInputEditing.ts +52 -22
  176. package/src/components/DatePicker/composables/useDisplayedDateString.ts +18 -4
  177. package/src/components/DatePicker/composables/useTodayButton.ts +13 -1
  178. package/src/components/DatePicker/utils/dateFormattingUtils.ts +79 -14
  179. package/src/components/DialogBox/DialogBox.stories.ts +12 -0
  180. package/src/components/DialogBox/DialogBox.vue +16 -11
  181. package/src/components/DialogBox/tests/DialogBox.spec.ts +22 -0
  182. package/src/components/HeaderLoading/Accessibilite.mdx +429 -8
  183. package/src/components/HeaderLoading/Accessibilite.stories.ts +4 -0
  184. package/src/components/HeaderLoading/HeaderLoading.vue +59 -0
  185. package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +17 -2
  186. package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +91 -2
  187. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +37 -1
  188. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +284 -21
  189. package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +2 -2
  190. package/src/components/NirField/NirField.mdx +3 -0
  191. package/src/components/NirField/NirField.vue +10 -1
  192. package/src/components/NirField/tests/NirField.spec.ts +81 -0
  193. package/src/components/NotificationBar/NotificationBar.stories.ts +128 -2
  194. package/src/components/NotificationBar/NotificationBar.vue +16 -1
  195. package/src/components/NotificationBar/tests/NotificationBar.spec.ts +65 -0
  196. package/src/components/PasswordField/PasswordField.mdx +3 -0
  197. package/src/components/PeriodField/PeriodField.mdx +2 -0
  198. package/src/components/PeriodField/PeriodField.stories.ts +195 -0
  199. package/src/components/PhoneField/Accessibilite.stories.ts +4 -0
  200. package/src/components/PhoneField/PhoneField.mdx +3 -1
  201. package/src/components/PhoneField/PhoneField.stories.ts +285 -1
  202. package/src/components/PhoneField/PhoneField.vue +228 -95
  203. package/src/components/PhoneField/indicatifs.ts +102 -102
  204. package/src/components/PhoneField/locales.ts +1 -0
  205. package/src/components/PhoneField/tests/PhoneField.spec.ts +419 -2
  206. package/src/components/SkipLink/SkipLink.vue +3 -31
  207. package/src/components/SkipLink/tests/skipLink.spec.ts +0 -21
  208. package/src/components/SubHeader/Accessibilite.stories.ts +8 -0
  209. package/src/components/SubHeader/SubHeader.mdx +1 -0
  210. package/src/components/SubHeader/SubHeader.stories.ts +179 -60
  211. package/src/components/SubHeader/SubHeader.vue +45 -15
  212. package/src/components/SubHeader/locales.ts +1 -0
  213. package/src/components/SyAlert/SyAlert.vue +6 -0
  214. package/src/components/Tables/SyServerTable/SyServerTable.mdx +3 -10
  215. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +242 -0
  216. package/src/components/Tables/SyServerTable/SyServerTable.vue +29 -10
  217. package/src/components/Tables/SyTable/SyTable.mdx +3 -10
  218. package/src/components/Tables/SyTable/SyTable.stories.ts +242 -0
  219. package/src/components/Tables/SyTable/SyTable.vue +2 -0
  220. package/src/components/Tables/common/SyTablePagination.vue +13 -6
  221. package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +6 -1
  222. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +157 -0
  223. package/src/components/Tables/common/types.ts +2 -0
  224. package/src/components/index.ts +9 -0
  225. package/src/composables/useFilterable/useFilterable.ts +10 -0
  226. package/src/designTokens/tokens/amelipro/apColors.ts +1 -1
  227. package/src/designTokens/tokens/cnam/cnamSemantic.ts +3 -3
  228. package/src/services/NotificationService.ts +9 -0
  229. package/src/stories/Components/Components.stories.ts +1 -1
  230. package/src/stories/GuideDuDev/FormValidationGuide.mdx +342 -0
  231. package/src/stories/Templates/Templates.stories.ts +1 -1
  232. package/src/utils/functions/ameliproColors/ameliproColors.ts +1 -1
  233. package/dist/components/DataList/locales.d.ts +0 -3
  234. package/src/components/DataList/locales.ts +0 -3
  235. package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +0 -266
@@ -1,8 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { computed } from 'vue'
3
2
  import type { PropType } from 'vue'
4
3
 
5
- import { locales } from './locales'
6
4
  import DataListItem from '@/components/DataListItem/DataListItem.vue'
7
5
  import DataListLoading from './DataListLoading/DataListLoading.vue'
8
6
 
@@ -68,12 +66,14 @@
68
66
  },
69
67
  })
70
68
 
69
+ const uniqueId = Math.random().toString(36).substr(2, 9)
70
+
71
+ const sectionTitleId = `data-list-section-title-${uniqueId}`
72
+
71
73
  const { widthStyles } = useWidthable(props)
72
74
 
73
75
  const emit = defineEmits(['click:item-action'])
74
76
 
75
- const label = computed(() => (props.loading ? locales.loadingLabel : undefined))
76
-
77
77
  const getIcon = (iconName?: string): string | undefined => {
78
78
  if (!iconName || !props.icons) {
79
79
  return
@@ -90,54 +90,52 @@
90
90
  </script>
91
91
 
92
92
  <template>
93
- <div
94
- :aria-label="label"
95
- :style="widthStyles"
96
- class="sy-data-list"
97
- >
98
- <VFadeTransition mode="out-in">
99
- <DataListLoading
100
- v-if="loading"
101
- :items-number="itemsNumberLoading"
102
- :heading="headingLoading"
103
- :title-class="titleClass"
104
- :row="row"
105
- />
93
+ <VFadeTransition mode="out-in">
94
+ <DataListLoading
95
+ v-if="loading"
96
+ :items-number="itemsNumberLoading"
97
+ :heading="headingLoading"
98
+ :row="row"
99
+ />
106
100
 
107
- <dl v-else>
108
- <dt>
109
- <slot name="title">
110
- <component
111
- :is="titleTag"
112
- v-if="listTitle"
113
- :class="titleClass"
114
- >
115
- {{ listTitle }}
116
- </component>
117
- </slot>
118
- </dt>
101
+ <component
102
+ :is="listTitle ? 'section' : 'div'"
103
+ v-else
104
+ :aria-labelledby="listTitle ? sectionTitleId : undefined"
105
+ :style="widthStyles"
106
+ class="sy-data-list"
107
+ >
108
+ <slot name="title">
109
+ <component
110
+ :is="titleTag"
111
+ v-if="listTitle"
112
+ :id="sectionTitleId"
113
+ :class="titleClass"
114
+ >
115
+ {{ listTitle }}
116
+ </component>
117
+ </slot>
119
118
 
120
- <dd v-if="items.length">
121
- <DataListItem
122
- v-for="(item, index) in items"
123
- :key="index"
124
- :label="item.key"
125
- :value="item.value"
126
- :action="item.action"
127
- :chip="item.chip"
128
- :row="row"
129
- :render-html-value="renderHtmlValue"
130
- :icon="getIcon(item.icon)"
131
- :placeholder="placeholder"
132
- :vuetify-options="item.options"
133
- :class="getItemClass(index, item.class)"
134
- class="sy-data-list-item text-body-1"
135
- @click:action="emit('click:item-action', index)"
136
- />
137
- </dd>
119
+ <dl v-if="items.length">
120
+ <DataListItem
121
+ v-for="(item, index) in items"
122
+ :key="index"
123
+ :label="item.key"
124
+ :value="item.value"
125
+ :action="item.action"
126
+ :chip="item.chip"
127
+ :row="row"
128
+ :render-html-value="renderHtmlValue"
129
+ :icon="getIcon(item.icon)"
130
+ :placeholder="placeholder"
131
+ :vuetify-options="item.options"
132
+ :class="getItemClass(index, item.class)"
133
+ class="sy-data-list-item text-body-1"
134
+ @click:action="emit('click:item-action', index)"
135
+ />
138
136
  </dl>
139
- </VFadeTransition>
140
- </div>
137
+ </component>
138
+ </VFadeTransition>
141
139
  </template>
142
140
 
143
141
  <style lang="scss" scoped>
@@ -44,7 +44,7 @@
44
44
  </script>
45
45
 
46
46
  <template>
47
- <ul class="sy-data-list-group d-flex flex-wrap max-width-none ma-n4">
47
+ <ul class="sy-data-list-group d-flex max-width-none ma-n4">
48
48
  <li
49
49
  v-for="(dataList, index) in props.items"
50
50
  :key="`sy-data-list-${index}`"
@@ -33,7 +33,7 @@
33
33
 
34
34
  const labelColor = computed(() => {
35
35
  return theme.current.value.dark
36
- ? 'rgba(255, 255, 255, .7)'
36
+ ? 'rgba(255, 255, 255, .85)'
37
37
  : 'rgba(0, 0, 0, .6)'
38
38
  })
39
39
 
@@ -45,66 +45,73 @@
45
45
  }
46
46
  return props.value || props.placeholder
47
47
  })
48
+
49
+ const actionButtonColor = computed(() => {
50
+ return theme.current.value.dark ? 'white' : 'primary'
51
+ })
48
52
  </script>
49
53
 
50
54
  <template>
51
- <div class="sy-data-list-item d-flex flex-wrap">
52
- <slot name="icon">
53
- <SyIcon
54
- v-if="icon"
55
- v-bind="options.icon"
56
- :icon="icon"
57
- :decorative="true"
58
- />
59
- </slot>
60
-
61
- <div class="sy-data-list-item-content">
62
- <div :class="{ 'sy-row': row }">
63
- <div
64
- class="sy-data-list-item-label text-caption"
65
- :style="{ color: labelColor }"
55
+ <div
56
+ :class="{ 'sy-row': row }"
57
+ class="sy-data-list-item"
58
+ >
59
+ <dt
60
+ class="sy-data-list-item-label text-caption"
61
+ :style="{ color: labelColor }"
62
+ >
63
+ <slot name="icon">
64
+ <SyIcon
65
+ v-if="icon"
66
+ v-bind="options.icon"
67
+ :icon="icon"
68
+ :decorative="true"
69
+ />
70
+ </slot>
71
+ <span>{{ label }} :</span>
72
+ </dt>
73
+
74
+ <dd
75
+ class="sy-data-list-item-value d-flex align-center ga-2"
76
+ :class="{ 'has-icon': icon }"
77
+ >
78
+ <slot
79
+ name="value"
80
+ v-bind="{ itemValue }"
81
+ >
82
+ <VChip
83
+ v-if="chip"
84
+ v-bind="options.chip"
66
85
  >
67
- {{ label }}
68
- </div>
69
-
70
- <div class="sy-data-list-item-value">
71
- <slot
72
- name="value"
73
- v-bind="{ itemValue }"
86
+ {{ itemValue }}
87
+ </VChip>
88
+
89
+ <span
90
+ v-else-if="renderHtmlValue"
91
+ class="text-body-1"
92
+ v-html="itemValue"
93
+ />
94
+
95
+ <span
96
+ v-else
97
+ class="text-body-1"
98
+ v-text="itemValue"
99
+ />
100
+
101
+ <slot name="action">
102
+ <VBtn
103
+ v-if="action"
104
+ class="sy-data-list-item-action-btn px-2"
105
+ size="small"
106
+ variant="tonal"
107
+ :color="actionButtonColor"
108
+ @click="emits('click:action')"
74
109
  >
75
- <VChip
76
- v-if="chip"
77
- v-bind="options.chip"
78
- >
79
- {{ itemValue }}
80
- </VChip>
81
-
82
- <div
83
- v-else-if="renderHtmlValue"
84
- class="text-body-1"
85
- v-html="itemValue"
86
- />
87
-
88
- <div
89
- v-else
90
- class="text-body-1"
91
- v-text="itemValue"
92
- />
93
- </slot>
94
- </div>
95
- </div>
96
-
97
- <slot name="action">
98
- <VBtn
99
- v-if="action"
100
- v-bind="options.actionBtn"
101
- class="sy-data-list-item-action-btn"
102
- @click="emits('click:action')"
103
- >
104
- {{ action }}
105
- </VBtn>
110
+ {{ action }}
111
+ </VBtn>
112
+ </slot>
106
113
  </slot>
107
- </div>
114
+ </dd>
108
115
  </div>
109
116
  </template>
110
117
 
@@ -112,21 +119,18 @@
112
119
  .sy-row {
113
120
  display: flex;
114
121
  flex-wrap: wrap;
122
+ gap: 0.25rem;
115
123
 
116
124
  .sy-data-list-item-label {
117
125
  align-self: center;
118
-
119
- &::after {
120
- content: ':';
121
- margin: 0 4px;
122
- }
123
126
  }
124
127
  }
125
128
 
126
- .sy-data-list-item-action-btn.v-btn {
127
- min-width: 0;
128
- margin: 0 -1px;
129
+ .sy-data-list-item-value.has-icon {
130
+ margin-left: 2.5rem;
131
+ }
129
132
 
133
+ .sy-data-list-item-action-btn.v-btn {
130
134
  &:focus-visible::after {
131
135
  opacity: 1;
132
136
  }
@@ -66,7 +66,7 @@ describe('DataListItem', () => {
66
66
  },
67
67
  })
68
68
 
69
- const elValue = wrapper.find('.sy-data-list-item-value div')
69
+ const elValue = wrapper.find('.sy-data-list-item-value span')
70
70
 
71
71
  expect(elValue.text()).toBe('<span>Custom Value</span>')
72
72
  })
@@ -83,7 +83,7 @@ describe('DataListItem', () => {
83
83
  },
84
84
  })
85
85
 
86
- const elValue = wrapper.find('.sy-data-list-item-value div')
86
+ const elValue = wrapper.find('.sy-data-list-item-value span')
87
87
 
88
88
  expect(elValue.text()).toBe('Paul Dupont')
89
89
  })
@@ -622,8 +622,8 @@ export const WithError: Story = {
622
622
  v-model="date"
623
623
  placeholder="notAfterToday"
624
624
  :custom-rules="[
625
- { type: 'notAfterToday', options: { message: 'La date ne peut pas être après aujourd'hui' } }
626
- ]"
625
+ { type: 'notAfterToday', options: { message: 'La date ne peut pas être après aujourd'hui' } },
626
+ ]"
627
627
  />
628
628
  </template>
629
629
  `,
@@ -656,7 +656,7 @@ export const WithError: Story = {
656
656
  'noCalendar': false,
657
657
  'modelValue': '01/01/2100',
658
658
  'customRules': [
659
- { type: 'notAfterToday', options: { message: 'La date ne peut pas être après aujourd\'hui' } },
659
+ { type: 'notAfterToday', options: { message: 'La date ne peut pas être après aujourd hui' } },
660
660
  ],
661
661
  'onUpdate:modelValue': fn(),
662
662
  'onFocus': fn(),
@@ -68,6 +68,7 @@
68
68
  max?: string
69
69
  }
70
70
  autoClamp?: boolean
71
+ isValidateOnBlur?: boolean
71
72
  }>(), {
72
73
  modelValue: undefined,
73
74
  label: DATE_PICKER_MESSAGES.LABEL_DEFAULT,
@@ -106,13 +107,14 @@
106
107
  max: '',
107
108
  }),
108
109
  autoClamp: false,
110
+ isValidateOnBlur: true,
109
111
  })
110
112
 
111
113
  // La compatibilité entre isBirthDate et birthDate est gérée directement dans l'appel au composable
112
114
 
113
115
  // Utilisation des composables pour les fonctionnalités du CalendarMode
114
116
  const { displayWeekendDays } = useWeekendDays(props)
115
- const { todayInString } = useTodayButton(props)
117
+ const { todayInString, headerDate } = useTodayButton(props)
116
118
  const { labelWithAsterisk } = useAsteriskDisplay(props)
117
119
 
118
120
  const selectedDates = ref<Date | Date[] | null>(
@@ -125,9 +127,12 @@
125
127
  todayInString,
126
128
  })
127
129
 
130
+ const onblur = ref(false)
131
+
128
132
  const dateTextInputRef = ref<null | ComponentPublicInstance<typeof DateTextInput>>()
129
133
  const dateCalendarTextInputRef = ref<null | ComponentPublicInstance<typeof SyTextField>>()
130
134
  const datePickerRef = ref<null | ComponentPublicInstance<typeof VDatePicker>>()
135
+ const complexDatePickerRef = ref<null | ComponentPublicInstance<typeof ComplexDatePicker>>()
131
136
 
132
137
  // Fonction pour sélectionner la date du jour
133
138
  const handleSelectToday = () => {
@@ -151,6 +156,12 @@
151
156
 
152
157
  // Mettre à jour l'affichage formaté
153
158
  updateDisplayFormattedDate()
159
+
160
+ // Mettre à jour les variables currentMonth et currentYear pour refléter la date d'aujourd'hui
161
+ currentMonth.value = today.getMonth().toString()
162
+ currentYear.value = today.getFullYear().toString()
163
+ currentMonthName.value = dayjs(today).format('MMMM')
164
+ currentYearName.value = today.getFullYear().toString()
154
165
  }
155
166
 
156
167
  const emit = defineEmits<{
@@ -210,6 +221,10 @@
210
221
  if (props.readonly) {
211
222
  return
212
223
  }
224
+ // Ne pas afficher d'erreur si on est sur une perte de focus et si isValidateOnBlur est false
225
+ if (onblur.value && !props.isValidateOnBlur) {
226
+ return
227
+ }
213
228
  // Ne pas afficher d'erreur si on est dans le contexte du mounted initial
214
229
  if (shouldDisplayErrors && (!isInitialValidation.value || forceValidation)) {
215
230
  errors.value.push(DATE_PICKER_MESSAGES.ERROR_REQUIRED)
@@ -550,9 +565,14 @@
550
565
  })
551
566
 
552
567
  const validateOnSubmit = () => {
568
+ // Si le mode noCalendar est activé, on délègue la validation au DateTextInput
553
569
  if (props.noCalendar) {
554
570
  return dateTextInputRef.value?.validateOnSubmit()
555
571
  }
572
+ // Si le mode combiné est activé, on délègue la validation au ComplexDatePicker
573
+ else if (props.useCombinedMode) {
574
+ return complexDatePickerRef.value?.validateOnSubmit()
575
+ }
556
576
  // Forcer la validation pour ignorer les conditions de validation interactive
557
577
  validateDates(true)
558
578
  // Retourner directement un booléen pour maintenir la compatibilité avec les tests existants
@@ -657,7 +677,10 @@
657
677
 
658
678
  const handleInputBlur = () => {
659
679
  emit('blur')
660
- validateDates(true)
680
+ onblur.value = true
681
+ if (props.isValidateOnBlur) {
682
+ validateDates(true)
683
+ }
661
684
  }
662
685
 
663
686
  watch(isDatePickerVisible, async (isVisible) => {
@@ -670,15 +693,7 @@
670
693
  resetViewMode()
671
694
  }
672
695
 
673
- if (isVisible) {
674
- // set the focus on the date picker
675
- await nextTick()
676
- const firstButton = datePickerRef.value?.$el?.querySelector?.('button')
677
- if (firstButton) {
678
- firstButton.focus({ preventScroll: true })
679
- }
680
- }
681
- else {
696
+ if (!isVisible) {
682
697
  // set the focus on the text input
683
698
  // wait for VMenu to finish DOM updates & transition
684
699
  setTimeout(() => {
@@ -798,8 +813,9 @@
798
813
  customizeMonthButton()
799
814
  }
800
815
 
816
+ // Ne plus ouvrir automatiquement le calendrier au focus, juste émettre l'événement
801
817
  const openDatePickerOnFocus = () => {
802
- openDatePicker()
818
+ // openDatePicker() - désactivé pour améliorer l'accessibilité
803
819
  emit('focus')
804
820
  }
805
821
 
@@ -807,6 +823,22 @@
807
823
  toggleDatePicker()
808
824
  }
809
825
 
826
+ // Gestionnaire d'événement clavier pour l'input
827
+ const handleInputKeydown = (event: KeyboardEvent) => {
828
+ // Ouvrir le calendrier uniquement lorsque la touche Entrée est pressée
829
+ if (event.key === 'Enter') {
830
+ openDatePicker()
831
+ event.preventDefault() // Empêcher la soumission du formulaire
832
+ }
833
+ // Fermer le calendrier lorsque la touche Escape est pressée
834
+ else if ((event.key === 'Escape' || event.key === 'Esc') && isDatePickerVisible.value) {
835
+ isDatePickerVisible.value = false
836
+ emit('closed')
837
+ validateDates() // Valider les dates à la fermeture
838
+ event.preventDefault()
839
+ }
840
+ }
841
+
810
842
  defineExpose({
811
843
  validateOnSubmit,
812
844
  isDatePickerVisible,
@@ -852,6 +884,7 @@
852
884
  :period="props.period"
853
885
  :auto-clamp="props.autoClamp"
854
886
  :display-asterisk="props.displayAsterisk"
887
+ :is-validate-on-blur="props.isValidateOnBlur"
855
888
  @update:model-value="handleDateTextInputUpdate"
856
889
  @date-selected="handleDateTextInputSelection"
857
890
  @blur="handleInputBlur"
@@ -860,6 +893,7 @@
860
893
  </template>
861
894
  <template v-else-if="props.useCombinedMode">
862
895
  <ComplexDatePicker
896
+ ref="complexDatePickerRef"
863
897
  :model-value="props.modelValue"
864
898
  :format="props.format"
865
899
  :date-format-return="props.dateFormatReturn"
@@ -891,6 +925,7 @@
891
925
  :auto-clamp="props.autoClamp"
892
926
  :label="props.label"
893
927
  :placeholder="props.placeholder"
928
+ :is-validate-on-blur="props.isValidateOnBlur"
894
929
  @update:model-value="emit('update:modelValue', $event)"
895
930
  @focus="emit('focus')"
896
931
  @blur="emit('blur')"
@@ -943,6 +978,7 @@
943
978
  @click="openDatePickerOnClick"
944
979
  @focus="openDatePickerOnFocus"
945
980
  @blur="handleInputBlur"
981
+ @keydown="handleInputKeydown"
946
982
  @update:model-value="updateSelectedDates"
947
983
  @prepend-icon-click="openDatePickerOnIconClick"
948
984
  @append-icon-click="openDatePickerOnIconClick"
@@ -975,7 +1011,7 @@
975
1011
  </template>
976
1012
  <template #header>
977
1013
  <h3 class="mx-auto my-auto ml-5 mb-4">
978
- {{ displayedDateString }}
1014
+ {{ selectedDates ? displayedDateString : headerDate }}
979
1015
  </h3>
980
1016
  </template>
981
1017
  <template