@cnamts/synapse 1.0.1 → 1.0.2

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 (217) hide show
  1. package/README.md +1 -1
  2. package/dist/{DateFilter-BmRuzQ9Z.js → DateFilter-YWOTbfeL.js} +1 -1
  3. package/dist/{NumberFilter-CnIPDHqx.js → NumberFilter-DMmMgALM.js} +1 -1
  4. package/dist/{PeriodFilter-CZwZ8CnQ.js → PeriodFilter-Bok5BHcn.js} +1 -1
  5. package/dist/SelectFilter-BKud2WhN.js +136 -0
  6. package/dist/{TextFilter-DTxZHJwX.js → TextFilter-DvMf2thH.js} +1 -1
  7. package/dist/components/Accordion/Accordion.d.ts +2 -1
  8. package/dist/components/Accordion/composables/useAccordionGroupCommunication.d.ts +5 -0
  9. package/dist/components/Accordion/composables/useAccordionKeyboardNavigation.d.ts +12 -0
  10. package/dist/components/Accordion/composables/useAccordionState.d.ts +13 -0
  11. package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +85 -0
  12. package/dist/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
  13. package/dist/components/Customs/SySelect/SySelect.d.ts +33 -13
  14. package/dist/components/Customs/SyTextField/SyTextField.d.ts +2 -2
  15. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +1585 -1452
  16. package/dist/components/DatePicker/DatePicker/DatePicker.d.ts +16 -2
  17. package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +3 -1
  18. package/dist/components/DatePicker/composables/index.d.ts +2 -0
  19. package/dist/components/DatePicker/composables/useAsteriskDisplay.d.ts +14 -0
  20. package/dist/components/DatePicker/composables/useDateAutoClamp.d.ts +16 -0
  21. package/dist/components/DatePicker/composables/useDateRangeInput.d.ts +1 -1
  22. package/dist/components/DatePicker/composables/useDisplayedDateString.d.ts +3 -0
  23. package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +1 -0
  24. package/dist/components/DatePicker/composables/useMonthButtonCustomization.d.ts +5 -2
  25. package/dist/components/NirField/NirField.d.ts +7 -3
  26. package/dist/components/NirField/nirValidation.d.ts +1 -1
  27. package/dist/components/PasswordField/PasswordField.d.ts +2 -0
  28. package/dist/components/PeriodField/PeriodField.d.ts +52 -8
  29. package/dist/components/PhoneField/PhoneField.d.ts +2 -2
  30. package/dist/components/RangeField/RangeField.d.ts +2 -0
  31. package/dist/components/SearchListField/SearchListField.d.ts +9 -0
  32. package/dist/components/SyTextArea/SyTextArea.d.ts +2 -0
  33. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +14 -9
  34. package/dist/components/Tables/SyTable/SyTable.d.ts +12 -7
  35. package/dist/components/Tables/common/SyTablePagination.d.ts +1636 -0
  36. package/dist/components/Tables/common/TableHeader.d.ts +2 -20
  37. package/dist/components/Tables/common/filters/SelectFilter.d.ts +5 -5
  38. package/dist/components/Tables/common/filters/getFilterComponent.d.ts +1 -0
  39. package/dist/components/Tables/common/filters/locales.d.ts +4 -0
  40. package/dist/components/Tables/common/filters/logics/date.d.ts +1 -0
  41. package/dist/components/Tables/common/filters/logics/number.d.ts +1 -0
  42. package/dist/components/Tables/common/filters/logics/period.d.ts +1 -0
  43. package/dist/components/Tables/common/filters/logics/select.d.ts +1 -0
  44. package/dist/components/Tables/common/filters/logics/text.d.ts +1 -0
  45. package/dist/components/Tables/common/locales.d.ts +21 -0
  46. package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +267 -0
  47. package/dist/components/Tables/common/organizeColumns/sortHeaders.d.ts +2 -0
  48. package/dist/components/Tables/common/tableFilterUtils.d.ts +1 -0
  49. package/dist/components/Tables/common/tableStorageUtils.d.ts +41 -1
  50. package/dist/components/Tables/common/tableUtils.d.ts +42 -5
  51. package/dist/components/Tables/common/types.d.ts +19 -8
  52. package/dist/components/Tables/common/usePagination.d.ts +22 -0
  53. package/dist/components/Tables/common/useTableCheckbox.d.ts +20 -0
  54. package/dist/components/Tables/common/useTableHeaders.d.ts +76 -0
  55. package/dist/components/Tables/common/useTableItems.d.ts +24 -0
  56. package/dist/components/Tables/common/useTableOptions.d.ts +18 -0
  57. package/dist/components/ToolbarContainer/ToolbarContainer.d.ts +11 -0
  58. package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +9 -2
  59. package/dist/components/index.d.ts +8 -6
  60. package/dist/design-system-v3.js +58 -56
  61. package/dist/design-system-v3.umd.cjs +22 -22
  62. package/dist/main-Cx8qG7YR.js +16344 -0
  63. package/dist/stories/Accessibilite/Vuetify/VuetifyItems.d.ts +14 -2
  64. package/dist/stories/DesignTokens/StylesTypographiques.stories.new.d.ts +8 -0
  65. package/dist/stories/DesignTokens/TypographyDisplay.d.ts +28 -0
  66. package/dist/stories/DesignTokens/vue-shims.d.ts +6 -0
  67. package/dist/style.css +1 -1
  68. package/package.json +1 -1
  69. package/src/common/imgs/accessibility-svgrepo-com.svg +4 -0
  70. package/src/components/Accordion/Accessibilite/AccessibilityGuide.mdx +249 -0
  71. package/src/components/Accordion/Accordion.vue +48 -76
  72. package/src/components/Accordion/composables/__tests__/useAccordionGroupCommunication.spec.ts +146 -0
  73. package/src/components/Accordion/composables/__tests__/useAccordionKeyboardNavigation.spec.ts +209 -0
  74. package/src/components/Accordion/composables/__tests__/useAccordionState.spec.ts +144 -0
  75. package/src/components/Accordion/composables/useAccordionGroupCommunication.ts +52 -0
  76. package/src/components/Accordion/composables/useAccordionKeyboardNavigation.ts +111 -0
  77. package/src/components/Accordion/composables/useAccordionState.ts +59 -0
  78. package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +3 -0
  79. package/src/components/Customs/SyCheckbox/Accessibilite.mdx +303 -0
  80. package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +50 -0
  81. package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +630 -0
  82. package/src/components/Customs/SyCheckbox/SyCheckbox.vue +326 -0
  83. package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +201 -0
  84. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +1 -0
  85. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +8 -1
  86. package/src/components/Customs/SySelect/SySelect.stories.ts +160 -0
  87. package/src/components/Customs/SySelect/SySelect.vue +291 -32
  88. package/src/components/Customs/SySelect/tests/SySelect.spec.ts +230 -0
  89. package/src/components/Customs/SyTextField/SyTextField.stories.ts +3 -2
  90. package/src/components/Customs/SyTextField/SyTextField.vue +19 -8
  91. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +241 -31
  92. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +305 -57
  93. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.events.spec.ts +161 -0
  94. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +4 -2
  95. package/src/components/DatePicker/DatePicker/DatePicker.stories.ts +259 -137
  96. package/src/components/DatePicker/DatePicker/DatePicker.vue +153 -25
  97. package/src/components/DatePicker/DatePicker/tests/DatePicker.events.spec.ts +189 -0
  98. package/src/components/DatePicker/DatePicker/{DatePicker.spec.ts → tests/DatePicker.spec.ts} +1 -15
  99. package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +24 -14
  100. package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +148 -0
  101. package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +3 -1
  102. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +200 -5
  103. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +241 -31
  104. package/src/components/DatePicker/composables/index.ts +2 -0
  105. package/src/components/DatePicker/composables/tests/useDateAutoClamp.spec.ts +190 -0
  106. package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +182 -4
  107. package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +105 -80
  108. package/src/components/DatePicker/composables/useAsteriskDisplay.ts +31 -0
  109. package/src/components/DatePicker/composables/useDateAutoClamp.ts +136 -0
  110. package/src/components/DatePicker/composables/useDateRangeInput.ts +21 -18
  111. package/src/components/DatePicker/composables/useDisplayedDateString.ts +13 -1
  112. package/src/components/DatePicker/composables/useInputBlurHandler.ts +84 -20
  113. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +149 -51
  114. package/src/components/DiacriticPicker/DiacriticPicker.stories.ts +10 -0
  115. package/src/components/ErrorPage/Accessibilite.stories.ts +8 -0
  116. package/src/components/ErrorPage/ErrorPage.vue +12 -6
  117. package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +4 -4
  118. package/src/components/NirField/NirField.mdx +22 -9
  119. package/src/components/NirField/NirField.stories.ts +26 -2
  120. package/src/components/NirField/NirField.vue +209 -22
  121. package/src/components/NirField/nirValidation.ts +17 -3
  122. package/src/components/NirField/tests/NirField.spec.ts +2 -2
  123. package/src/components/NotFoundPage/Accessibilite.stories.ts +8 -0
  124. package/src/components/NotFoundPage/NotFoundPage.vue +2 -1
  125. package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +8 -6
  126. package/src/components/PaginatedTable/PaginatedTable.mdx +2 -0
  127. package/src/components/PasswordField/PasswordField.stories.ts +4 -0
  128. package/src/components/PasswordField/PasswordField.vue +3 -0
  129. package/src/components/PeriodField/PeriodField.vue +2 -0
  130. package/src/components/PhoneField/PhoneField.stories.ts +15 -15
  131. package/src/components/PhoneField/PhoneField.vue +1 -1
  132. package/src/components/RangeField/RangeField.stories.ts +9 -0
  133. package/src/components/RangeField/RangeField.vue +4 -0
  134. package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +12 -0
  135. package/src/components/SearchListField/SearchListField.vue +5 -0
  136. package/src/components/SyTextArea/SyTextArea.vue +3 -0
  137. package/src/components/SyTextArea/tests/SyTextArea.spec.ts +0 -1
  138. package/src/components/Tables/SyServerTable/FilterRules.stories.ts +632 -15
  139. package/src/components/Tables/SyServerTable/SyServerTable.mdx +15 -5
  140. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +2844 -1377
  141. package/src/components/Tables/SyServerTable/SyServerTable.vue +155 -66
  142. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +256 -4
  143. package/src/components/Tables/SyTable/FilterRules.stories.ts +183 -0
  144. package/src/components/Tables/SyTable/SyTable.mdx +14 -4
  145. package/src/components/Tables/SyTable/SyTable.stories.ts +1265 -477
  146. package/src/components/Tables/SyTable/SyTable.vue +152 -72
  147. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +366 -4
  148. package/src/components/Tables/common/SyTableFilter.vue +3 -56
  149. package/src/components/Tables/common/SyTablePagination.vue +375 -0
  150. package/src/components/Tables/common/TableHeader.vue +10 -26
  151. package/src/components/Tables/common/filters/SelectFilter.vue +131 -22
  152. package/src/components/Tables/common/filters/getFilterComponent.ts +54 -0
  153. package/src/components/Tables/common/filters/locales.ts +4 -0
  154. package/src/components/Tables/common/filters/logics/date.ts +12 -0
  155. package/src/components/Tables/common/filters/logics/number.ts +48 -0
  156. package/src/components/Tables/common/filters/logics/period.ts +25 -0
  157. package/src/components/Tables/common/filters/logics/select.ts +27 -0
  158. package/src/components/Tables/common/filters/logics/tests/TextFilterLogic.spec.ts +177 -0
  159. package/src/components/Tables/common/filters/logics/text.ts +62 -0
  160. package/src/components/Tables/common/filters/tests/TextFilter.spec.ts +11 -11
  161. package/src/components/Tables/common/locales.ts +24 -0
  162. package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +269 -0
  163. package/src/components/Tables/common/organizeColumns/sortHeaders.ts +9 -0
  164. package/src/components/Tables/common/tableFilterUtils.ts +43 -295
  165. package/src/components/Tables/common/tableStorageUtils.ts +27 -2
  166. package/src/components/Tables/common/tableStyles.scss +26 -0
  167. package/src/components/Tables/common/tableUtils.ts +3 -16
  168. package/src/components/Tables/common/tests/SyTablePagination.spec.ts +170 -0
  169. package/src/components/Tables/common/tests/filterByRange.spec.ts +215 -0
  170. package/src/components/Tables/common/tests/tableFilterUtils.spec.ts +0 -14
  171. package/src/components/Tables/common/tests/tableUtils.spec.ts +7 -51
  172. package/src/components/Tables/common/types.ts +17 -6
  173. package/src/components/Tables/common/usePagination.ts +83 -0
  174. package/src/components/Tables/common/useTableCheckbox.ts +58 -0
  175. package/src/components/Tables/common/useTableHeaders.ts +88 -0
  176. package/src/components/Tables/common/useTableItems.ts +87 -0
  177. package/src/components/Tables/common/useTableOptions.ts +93 -0
  178. package/src/components/ToolbarContainer/ToolbarContainer.mdx +16 -0
  179. package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +675 -0
  180. package/src/components/ToolbarContainer/ToolbarContainer.vue +128 -0
  181. package/src/components/ToolbarContainer/tests/ToolbarContainer.spec.ts +156 -0
  182. package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +74 -0
  183. package/src/components/UserMenuBtn/UserMenuBtn.vue +19 -17
  184. package/src/components/index.ts +8 -6
  185. package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +293 -20
  186. package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +448 -54
  187. package/src/stories/Accessibilite/Audit/RGAA.mdx +231 -23
  188. package/src/stories/Accessibilite/Avancement/Avancement.mdx +591 -7
  189. package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +139 -38
  190. package/src/stories/Accessibilite/Introduction.mdx +258 -18
  191. package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +221 -31
  192. package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +204 -22
  193. package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +537 -24
  194. package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +577 -70
  195. package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +382 -31
  196. package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +419 -81
  197. package/src/stories/Accessibilite/Vuetify/Vuetify.mdx +132 -6
  198. package/src/stories/Accessibilite/Vuetify/Vuetify.stories.ts +370 -146
  199. package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +35 -57
  200. package/src/stories/Demarrer/Accueil.stories.ts +20 -5
  201. package/src/stories/DesignTokens/StylesTypographiques.mdx +10 -9
  202. package/src/stories/DesignTokens/StylesTypographiques.stories.new.ts +397 -0
  203. package/src/stories/DesignTokens/StylesTypographiques.stories.ts +397 -0
  204. package/src/stories/DesignTokens/TypographyDisplay.vue +155 -0
  205. package/src/stories/DesignTokens/vue-shims.d.ts +6 -0
  206. package/src/stories/GuideDuDev/LesBreackingChanges.mdx +0 -2
  207. package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +1 -1
  208. package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +1 -1
  209. package/src/stories/GuideDuDev/PortailAgent.mdx +10 -0
  210. package/src/stories/GuideDuDev/PortailAgent.stories.ts +506 -0
  211. package/src/stories/GuideDuDev/Theme.mdx +41 -0
  212. package/dist/SelectFilter-Cj-GW2Cc.js +0 -97
  213. package/dist/main-WDqeoGM-.js +0 -14788
  214. package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +0 -886
  215. package/src/components/Tables/SyServerTable/tests/__snapshots__/SyServerTable.spec.ts.snap +0 -521
  216. package/src/components/Tables/SyTable/tests/__snapshots__/SyTable.spec.ts.snap +0 -521
  217. package/src/stories/DesignTokens/ThemePA.mdx +0 -35
@@ -0,0 +1,397 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import { computed } from 'vue'
3
+ // Import Vue component with proper type declaration from vue-shims.d.ts
4
+ import TypographyDisplay from './TypographyDisplay.vue'
5
+ import { cnamFontsTokens } from '@/designTokens/tokens/cnam/cnamFonts'
6
+ import { paFontsTokens } from '@/designTokens/tokens/pa/paFonts'
7
+
8
+ const meta: Meta = {
9
+ title: 'Design Tokens/Styles typographiques',
10
+ component: TypographyDisplay,
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Introduction: StoryObj = {
16
+ render: () => {
17
+ return {
18
+ setup() {
19
+ const theme = computed(() => typeof window !== 'undefined' ? localStorage.getItem('storybook-theme') : 'cnam')
20
+ return {
21
+ theme,
22
+ cnamFontFamily: cnamFontsTokens.family.primary,
23
+ paFontFamily: paFontsTokens.family.primary,
24
+ }
25
+ },
26
+ template: `
27
+ <p style="font-size: 14px; margin: 16px 0; line-height: 24px; color: rgb(46, 52, 56);">
28
+ Les styles typographiques sont un élément essentiel de notre système de design. Ils permettent de créer une hiérarchie visuelle claire et cohérente dans nos interfaces.
29
+ </p>
30
+ <p style="font-size: 14px; margin: 16px 0; line-height: 24px; color: rgb(46, 52, 56);">
31
+ Notre système typographique utilise la police {{ theme === 'cnam' ? cnamFontFamily : paFontFamily }} pour tous les éléments textuels, avec différentes tailles et graisses pour créer une hiérarchie visuelle claire.
32
+ </p>
33
+ `,
34
+ }
35
+ },
36
+ tags: ['!dev'],
37
+ }
38
+
39
+ export const HeadingStyles: StoryObj = {
40
+ render: () => {
41
+ return {
42
+ components: { TypographyDisplay },
43
+ setup() {
44
+ const cnamTypography = {
45
+ h1: {
46
+ fontFamily: cnamFontsTokens.heading.h1.fontFamily,
47
+ fontSize: cnamFontsTokens.heading.h1.fontSize,
48
+ fontWeight: cnamFontsTokens.heading.h1.fontWeight,
49
+ lineHeight: `${cnamFontsTokens.heading.h1.lineHeight}`,
50
+ sample: 'Titre de niveau 1',
51
+ description: 'Utilisé pour les titres principaux de page',
52
+ },
53
+ h2: {
54
+ fontFamily: cnamFontsTokens.heading.h2.fontFamily,
55
+ fontSize: cnamFontsTokens.heading.h2.fontSize,
56
+ fontWeight: cnamFontsTokens.heading.h2.fontWeight,
57
+ lineHeight: `${cnamFontsTokens.heading.h2.lineHeight}`,
58
+ sample: 'Titre de niveau 2',
59
+ description: 'Utilisé pour les sections principales',
60
+ },
61
+ h3: {
62
+ fontFamily: cnamFontsTokens.heading.h3.fontFamily,
63
+ fontSize: cnamFontsTokens.heading.h3.fontSize,
64
+ fontWeight: cnamFontsTokens.heading.h3.fontWeight,
65
+ lineHeight: `${cnamFontsTokens.heading.h3.lineHeight}`,
66
+ sample: 'Titre de niveau 3',
67
+ description: 'Utilisé pour les sous-sections',
68
+ },
69
+ h4: {
70
+ fontFamily: cnamFontsTokens.heading.h4.fontFamily,
71
+ fontSize: cnamFontsTokens.heading.h4.fontSize,
72
+ fontWeight: cnamFontsTokens.heading.h4.fontWeight,
73
+ lineHeight: `${cnamFontsTokens.heading.h4.lineHeight}`,
74
+ sample: 'Titre de niveau 4',
75
+ description: 'Utilisé pour les composants importants',
76
+ },
77
+ h5: {
78
+ fontFamily: cnamFontsTokens.heading.h5.fontFamily,
79
+ fontSize: cnamFontsTokens.heading.h5.fontSize,
80
+ fontWeight: cnamFontsTokens.heading.h5.fontWeight,
81
+ lineHeight: `${cnamFontsTokens.heading.h5.lineHeight}`,
82
+ sample: 'Titre de niveau 5',
83
+ description: 'Utilisé pour les éléments secondaires',
84
+ },
85
+ h6: {
86
+ fontFamily: cnamFontsTokens.heading.h6.fontFamily,
87
+ fontSize: cnamFontsTokens.heading.h6.fontSize,
88
+ fontWeight: cnamFontsTokens.heading.h6.fontWeight,
89
+ lineHeight: `${cnamFontsTokens.heading.h6.lineHeight}`,
90
+ sample: 'Titre de niveau 6',
91
+ description: 'Utilisé pour les éléments tertiaires',
92
+ },
93
+ }
94
+ const paTypography = {
95
+ h1: {
96
+ fontFamily: paFontsTokens.heading.h1.fontFamily,
97
+ fontSize: paFontsTokens.heading.h1.fontSize,
98
+ fontWeight: paFontsTokens.heading.h1.fontWeight,
99
+ lineHeight: `${paFontsTokens.heading.h1.lineHeight}`,
100
+ sample: 'Titre de niveau 1',
101
+ description: 'Utilisé pour les titres principaux de page',
102
+ },
103
+ h2: {
104
+ fontFamily: paFontsTokens.heading.h2.fontFamily,
105
+ fontSize: paFontsTokens.heading.h2.fontSize,
106
+ fontWeight: paFontsTokens.heading.h2.fontWeight,
107
+ lineHeight: `${paFontsTokens.heading.h2.lineHeight}`,
108
+ sample: 'Titre de niveau 2',
109
+ description: 'Utilisé pour les sections principales',
110
+ },
111
+ h3: {
112
+ fontFamily: paFontsTokens.heading.h3.fontFamily,
113
+ fontSize: paFontsTokens.heading.h3.fontSize,
114
+ fontWeight: paFontsTokens.heading.h3.fontWeight,
115
+ lineHeight: `${paFontsTokens.heading.h3.lineHeight}`,
116
+ sample: 'Titre de niveau 3',
117
+ description: 'Utilisé pour les sous-sections',
118
+ },
119
+ h4: {
120
+ fontFamily: paFontsTokens.heading.h4.fontFamily,
121
+ fontSize: paFontsTokens.heading.h4.fontSize,
122
+ fontWeight: paFontsTokens.heading.h4.fontWeight,
123
+ lineHeight: `${paFontsTokens.heading.h4.lineHeight}`,
124
+ sample: 'Titre de niveau 4',
125
+ description: 'Utilisé pour les composants importants',
126
+ },
127
+ h5: {
128
+ fontFamily: paFontsTokens.heading.h5.fontFamily,
129
+ fontSize: paFontsTokens.heading.h5.fontSize,
130
+ fontWeight: paFontsTokens.heading.h5.fontWeight,
131
+ lineHeight: `${paFontsTokens.heading.h5.lineHeight}`,
132
+ sample: 'Titre de niveau 5',
133
+ description: 'Utilisé pour les éléments secondaires',
134
+ },
135
+ h6: {
136
+ fontFamily: paFontsTokens.heading.h6.fontFamily,
137
+ fontSize: paFontsTokens.heading.h6.fontSize,
138
+ fontWeight: paFontsTokens.heading.h6.fontWeight,
139
+ lineHeight: `${paFontsTokens.heading.h6.lineHeight}`,
140
+ sample: 'Titre de niveau 6',
141
+ description: 'Utilisé pour les éléments tertiaires',
142
+ },
143
+ }
144
+ return {
145
+ cnamTypography,
146
+ paTypography,
147
+ }
148
+ },
149
+ template: `
150
+ <TypographyDisplay
151
+ typographyCategory="headings"
152
+ :cnamTypography="cnamTypography"
153
+ :paTypography="paTypography"
154
+ />
155
+ `,
156
+ }
157
+ },
158
+ tags: ['!dev'],
159
+ }
160
+
161
+ export const DisplayHeadingStyles: StoryObj = {
162
+ render: () => {
163
+ return {
164
+ components: { TypographyDisplay },
165
+ setup() {
166
+ const cnamTypography = {
167
+ 'display-1': {
168
+ fontFamily: cnamFontsTokens.display.display1.fontFamily,
169
+ fontSize: cnamFontsTokens.display.display1.fontSize,
170
+ fontWeight: cnamFontsTokens.display.display1.fontWeight,
171
+ lineHeight: `${cnamFontsTokens.display.display1.lineHeight}`,
172
+ sample: 'Display 1',
173
+ description: 'Pour les mises en avant principales',
174
+ },
175
+ 'display-2': {
176
+ fontFamily: cnamFontsTokens.display.display2.fontFamily,
177
+ fontSize: cnamFontsTokens.display.display2.fontSize,
178
+ fontWeight: cnamFontsTokens.display.display2.fontWeight,
179
+ lineHeight: `${cnamFontsTokens.display.display2.lineHeight}`,
180
+ sample: 'Display 2',
181
+ description: 'Pour les bannières et sections importantes',
182
+ },
183
+ }
184
+ const paTypography = {
185
+ 'display-1': {
186
+ fontFamily: paFontsTokens.display?.display1?.fontFamily || paFontsTokens.family.primary,
187
+ fontSize: paFontsTokens.display?.display1?.fontSize || '2.5rem',
188
+ fontWeight: paFontsTokens.display?.display1?.fontWeight || 300,
189
+ lineHeight: `${paFontsTokens.display?.display1?.lineHeight || 1.2}`,
190
+ sample: 'Display 1',
191
+ description: 'Pour les mises en avant principales',
192
+ },
193
+ 'display-2': {
194
+ fontFamily: paFontsTokens.display?.display2?.fontFamily || paFontsTokens.family.primary,
195
+ fontSize: paFontsTokens.display?.display2?.fontSize || '1.875rem',
196
+ fontWeight: paFontsTokens.display?.display2?.fontWeight || 300,
197
+ lineHeight: `${paFontsTokens.display?.display2?.lineHeight || 1.1}`,
198
+ sample: 'Display 2',
199
+ description: 'Pour les bannières et sections importantes',
200
+ },
201
+ }
202
+ return {
203
+ cnamTypography,
204
+ paTypography,
205
+ }
206
+ },
207
+ template: `
208
+ <TypographyDisplay
209
+ typographyCategory="display-headings"
210
+ :cnamTypography="cnamTypography"
211
+ :paTypography="paTypography"
212
+ />
213
+ `,
214
+ }
215
+ },
216
+ tags: ['!dev'],
217
+ }
218
+
219
+ export const BodyTextStyles: StoryObj = {
220
+ render: () => {
221
+ return {
222
+ components: { TypographyDisplay },
223
+ setup() {
224
+ const cnamTypography = {
225
+ 'body-lg': {
226
+ fontFamily: cnamFontsTokens.body.body1.fontFamily,
227
+ fontSize: cnamFontsTokens.body.body1.fontSize,
228
+ fontWeight: cnamFontsTokens.body.body1.fontWeight,
229
+ lineHeight: `${cnamFontsTokens.body.body1.lineHeight}`,
230
+ sample: 'Texte corps large',
231
+ description: 'Pour les paragraphes importants et introductions',
232
+ },
233
+ 'body': {
234
+ fontFamily: cnamFontsTokens.body.body2.fontFamily,
235
+ fontSize: cnamFontsTokens.body.body2.fontSize,
236
+ fontWeight: cnamFontsTokens.body.body2.fontWeight,
237
+ lineHeight: `${cnamFontsTokens.body.body2.lineHeight}`,
238
+ sample: 'Texte corps standard',
239
+ description: 'Pour le contenu principal des pages',
240
+ },
241
+ 'body-sm': {
242
+ fontFamily: cnamFontsTokens.caption.fontFamily,
243
+ fontSize: cnamFontsTokens.caption.fontSize,
244
+ fontWeight: cnamFontsTokens.caption.fontWeight,
245
+ lineHeight: `${cnamFontsTokens.caption.lineHeight}`,
246
+ sample: 'Texte corps petit',
247
+ description: 'Pour les informations secondaires',
248
+ },
249
+ 'body-xs': {
250
+ fontFamily: cnamFontsTokens.family.primary,
251
+ fontSize: cnamFontsTokens.size.xs,
252
+ fontWeight: cnamFontsTokens.weight.regular,
253
+ lineHeight: `${cnamFontsTokens.lineHeight.normal}`,
254
+ sample: 'Texte corps très petit',
255
+ description: 'Pour les mentions légales et notes de bas de page',
256
+ },
257
+ }
258
+ const paTypography = {
259
+ 'body-lg': {
260
+ fontFamily: paFontsTokens.body?.body1?.fontFamily || paFontsTokens.family.primary,
261
+ fontSize: paFontsTokens.body?.body1?.fontSize || '1.125rem',
262
+ fontWeight: paFontsTokens.body?.body1?.fontWeight || 400,
263
+ lineHeight: `${paFontsTokens.body?.body1?.lineHeight || 1.5}`,
264
+ sample: 'Texte corps large',
265
+ description: 'Pour les paragraphes importants et introductions',
266
+ },
267
+ 'body': {
268
+ fontFamily: paFontsTokens.body?.body2?.fontFamily || paFontsTokens.family.primary,
269
+ fontSize: paFontsTokens.body?.body2?.fontSize || '1rem',
270
+ fontWeight: paFontsTokens.body?.body2?.fontWeight || 400,
271
+ lineHeight: `${paFontsTokens.body?.body2?.lineHeight || 1.5}`,
272
+ sample: 'Texte corps standard',
273
+ description: 'Pour le contenu principal des pages',
274
+ },
275
+ 'body-sm': {
276
+ fontFamily: paFontsTokens.caption?.fontFamily || paFontsTokens.family.primary,
277
+ fontSize: paFontsTokens.caption?.fontSize || '0.875rem',
278
+ fontWeight: paFontsTokens.caption?.fontWeight || 400,
279
+ lineHeight: `${paFontsTokens.caption?.lineHeight || 1.5}`,
280
+ sample: 'Texte corps petit',
281
+ description: 'Pour les informations secondaires',
282
+ },
283
+ 'body-xs': {
284
+ fontFamily: paFontsTokens.family.primary,
285
+ fontSize: paFontsTokens.size.xs,
286
+ fontWeight: paFontsTokens.weight.regular,
287
+ lineHeight: `${paFontsTokens.lineHeight.normal}`,
288
+ sample: 'Texte corps très petit',
289
+ description: 'Pour les mentions légales et notes de bas de page',
290
+ },
291
+ }
292
+ return {
293
+ cnamTypography,
294
+ paTypography,
295
+ }
296
+ },
297
+ template: `
298
+ <TypographyDisplay
299
+ typographyCategory="body-text"
300
+ :cnamTypography="cnamTypography"
301
+ :paTypography="paTypography"
302
+ />
303
+ `,
304
+ }
305
+ },
306
+ tags: ['!dev'],
307
+ }
308
+
309
+ export const LinksAndLabels: StoryObj = {
310
+ render: () => {
311
+ return {
312
+ components: { TypographyDisplay },
313
+ setup() {
314
+ const cnamTypography = {
315
+ link: {
316
+ fontFamily: cnamFontsTokens.family.primary,
317
+ fontSize: cnamFontsTokens.size.base,
318
+ fontWeight: cnamFontsTokens.weight.medium,
319
+ lineHeight: `${cnamFontsTokens.lineHeight.normal}`,
320
+ sample: 'Lien textuel',
321
+ description: 'Pour les liens dans le texte',
322
+ },
323
+ label: {
324
+ fontFamily: cnamFontsTokens.family.primary,
325
+ fontSize: cnamFontsTokens.size.sm,
326
+ fontWeight: cnamFontsTokens.weight.medium,
327
+ lineHeight: `${cnamFontsTokens.lineHeight.normal}`,
328
+ sample: 'Label',
329
+ description: 'Pour les étiquettes et badges',
330
+ },
331
+ button: {
332
+ fontFamily: cnamFontsTokens.family.primary,
333
+ fontSize: cnamFontsTokens.size.base,
334
+ fontWeight: cnamFontsTokens.weight.medium,
335
+ lineHeight: `${cnamFontsTokens.lineHeight.normal}`,
336
+ sample: 'Bouton',
337
+ description: 'Pour le texte des boutons',
338
+ },
339
+ caption: {
340
+ fontFamily: cnamFontsTokens.caption.fontFamily,
341
+ fontSize: cnamFontsTokens.caption.fontSize,
342
+ fontWeight: cnamFontsTokens.caption.fontWeight,
343
+ lineHeight: `${cnamFontsTokens.caption.lineHeight}`,
344
+ sample: 'Légende',
345
+ description: 'Pour les légendes et notes en petit',
346
+ },
347
+ }
348
+ const paTypography = {
349
+ link: {
350
+ fontFamily: paFontsTokens.family.primary,
351
+ fontSize: paFontsTokens.size.base,
352
+ fontWeight: paFontsTokens.weight.medium,
353
+ lineHeight: `${paFontsTokens.lineHeight.normal}`,
354
+ sample: 'Lien textuel',
355
+ description: 'Pour les liens dans le texte',
356
+ },
357
+ label: {
358
+ fontFamily: paFontsTokens.family.primary,
359
+ fontSize: paFontsTokens.size.sm,
360
+ fontWeight: paFontsTokens.weight.medium,
361
+ lineHeight: `${paFontsTokens.lineHeight.normal}`,
362
+ sample: 'Label',
363
+ description: 'Pour les étiquettes et badges',
364
+ },
365
+ button: {
366
+ fontFamily: paFontsTokens.family.primary,
367
+ fontSize: paFontsTokens.size.base,
368
+ fontWeight: paFontsTokens.weight.medium,
369
+ lineHeight: `${paFontsTokens.lineHeight.normal}`,
370
+ sample: 'Bouton',
371
+ description: 'Pour le texte des boutons',
372
+ },
373
+ caption: {
374
+ fontFamily: paFontsTokens.caption?.fontFamily || paFontsTokens.family.primary,
375
+ fontSize: paFontsTokens.caption?.fontSize || '0.75rem',
376
+ fontWeight: paFontsTokens.caption?.fontWeight || 400,
377
+ lineHeight: `${paFontsTokens.caption?.lineHeight || 1.5}`,
378
+ sample: 'Légende',
379
+ description: 'Pour les légendes et notes en petit',
380
+ },
381
+ }
382
+ return {
383
+ cnamTypography,
384
+ paTypography,
385
+ }
386
+ },
387
+ template: `
388
+ <TypographyDisplay
389
+ typographyCategory="links-and-labels"
390
+ :cnamTypography="cnamTypography"
391
+ :paTypography="paTypography"
392
+ />
393
+ `,
394
+ }
395
+ },
396
+ tags: ['!dev'],
397
+ }