@cnamts/synapse 0.0.6-alpha → 0.0.8-alpha

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 (122) hide show
  1. package/dist/design-system-v3.d.ts +331 -372
  2. package/dist/design-system-v3.js +2794 -2637
  3. package/dist/design-system-v3.umd.cjs +1 -10
  4. package/dist/style.css +1 -1
  5. package/package.json +10 -2
  6. package/src/assets/settings.scss +2 -2
  7. package/src/assets/tokens.scss +107 -112
  8. package/src/components/BackBtn/BackBtn.stories.ts +4 -1
  9. package/src/components/BackBtn/BackBtn.vue +4 -4
  10. package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +3 -3
  11. package/src/components/BackToTopBtn/BackToTopBtn.vue +1 -0
  12. package/src/components/CollapsibleList/CollapsibleList.mdx +1 -1
  13. package/src/components/CollapsibleList/CollapsibleList.vue +43 -44
  14. package/src/components/ContextualMenu/ContextualMenu.mdx +118 -0
  15. package/src/components/ContextualMenu/ContextualMenu.stories.ts +430 -0
  16. package/src/components/ContextualMenu/ContextualMenu.vue +101 -0
  17. package/src/components/ContextualMenu/tests/ContextualMenu.spec.ts +115 -0
  18. package/src/components/ContextualMenu/tests/__snapshots__/ContextualMenu.spec.ts.snap +10 -0
  19. package/src/components/ContextualMenu/types.ts +5 -0
  20. package/src/components/CookieBanner/CookieBanner.stories.ts +3 -2
  21. package/src/components/CookieBanner/CookieBanner.vue +13 -10
  22. package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +17 -15
  23. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +6 -1
  24. package/src/components/CookiesSelection/CookiesInformation/locales.ts +1 -0
  25. package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +1 -0
  26. package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +17 -15
  27. package/src/components/CopyBtn/CopyBtn.stories.ts +5 -2
  28. package/src/components/CopyBtn/CopyBtn.vue +7 -7
  29. package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +11 -51
  30. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +26 -26
  31. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +4 -1
  32. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +19 -7
  33. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +24 -24
  34. package/src/components/Customs/SySelect/SySelect.mdx +1 -2
  35. package/src/components/Customs/SySelect/SySelect.stories.ts +0 -2
  36. package/src/components/Customs/SySelect/SySelect.vue +27 -26
  37. package/src/components/DataList/DataList.stories.ts +3 -2
  38. package/src/components/DataList/DataList.vue +1 -1
  39. package/src/components/DataListGroup/DataListGroup.stories.ts +3 -2
  40. package/src/components/DataListItem/DataListItem.vue +12 -12
  41. package/src/components/DialogBox/DialogBox.mdx +28 -2
  42. package/src/components/DialogBox/DialogBox.stories.ts +1 -1
  43. package/src/components/DialogBox/DialogBox.vue +3 -2
  44. package/src/components/DownloadBtn/DownloadBtn.mdx +3 -4
  45. package/src/components/DownloadBtn/DownloadBtn.stories.ts +20 -21
  46. package/src/components/DownloadBtn/DownloadBtn.vue +2 -1
  47. package/src/components/ErrorPage/ErrorPage.vue +1 -1
  48. package/src/components/ExternalLinks/ExternalLinks.mdx +86 -0
  49. package/src/components/ExternalLinks/ExternalLinks.stories.ts +553 -0
  50. package/src/components/ExternalLinks/ExternalLinks.vue +200 -0
  51. package/src/components/ExternalLinks/config.ts +34 -0
  52. package/src/components/ExternalLinks/locales.ts +4 -0
  53. package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +154 -0
  54. package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +159 -0
  55. package/src/components/FooterBar/FooterBar.vue +111 -82
  56. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +2 -1
  57. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +14 -13
  58. package/src/components/HeaderBar/HeaderBar.stories.ts +19 -12
  59. package/src/components/HeaderBar/HeaderBar.vue +8 -3
  60. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +12 -7
  61. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +5 -5
  62. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +2 -2
  63. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +10 -8
  64. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -2
  65. package/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.vue +2 -1
  66. package/src/components/HeaderBar/HeaderLogo/logos/Logo.vue +2 -1
  67. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +10 -10
  68. package/src/components/HeaderBar/consts.scss +1 -1
  69. package/src/components/HeaderLoading/HeaderLoading.vue +12 -11
  70. package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +104 -32
  71. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
  72. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +9 -9
  73. package/src/components/HeaderToolbar/HeaderToolbar.vue +215 -180
  74. package/src/components/LangBtn/LangBtn.vue +8 -6
  75. package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +2 -2
  76. package/src/components/NirField/NirField.mdx +1 -4
  77. package/src/components/NirField/NirField.stories.ts +71 -18
  78. package/src/components/NirField/NirField.vue +49 -49
  79. package/src/components/NirField/tests/NirField.spec.ts +1 -0
  80. package/src/components/NotFoundPage/NotFoundPage.stories.ts +33 -2
  81. package/src/components/NotFoundPage/NotFoundPage.vue +17 -0
  82. package/src/components/NotificationBar/NotificationBar.mdx +5 -5
  83. package/src/components/NotificationBar/NotificationBar.stories.ts +410 -314
  84. package/src/components/NotificationBar/NotificationBar.vue +43 -41
  85. package/src/components/PageContainer/PageContainer.stories.ts +5 -5
  86. package/src/components/PageContainer/PageContainer.vue +13 -8
  87. package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
  88. package/src/components/PasswordField/PasswordField.mdx +70 -0
  89. package/src/components/PasswordField/PasswordField.stories.ts +213 -0
  90. package/src/components/PasswordField/PasswordField.vue +189 -0
  91. package/src/components/PasswordField/config.ts +11 -0
  92. package/src/components/PasswordField/locales.ts +4 -0
  93. package/src/components/PasswordField/tests/PasswordField.spec.ts +96 -0
  94. package/src/components/PhoneField/PhoneField.mdx +0 -2
  95. package/src/components/PhoneField/PhoneField.stories.ts +10 -50
  96. package/src/components/PhoneField/PhoneField.vue +34 -34
  97. package/src/components/SkipLink/SkipLink.vue +10 -10
  98. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +29 -21
  99. package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
  100. package/src/components/SubHeader/SubHeader.stories.ts +6 -3
  101. package/src/components/SubHeader/SubHeader.vue +32 -31
  102. package/src/components/SyAlert/SyAlert.vue +15 -8
  103. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -1
  104. package/src/components/UserMenuBtn/config.ts +1 -1
  105. package/src/components/index.ts +10 -6
  106. package/src/designTokens/index.ts +6 -4
  107. package/src/designTokens/{bootstrapColors.md → paColors.md} +1 -1
  108. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -0
  109. package/src/designTokens/tokens/pa/paColors.ts +171 -0
  110. package/src/designTokens/tokens/pa/paContextual.ts +58 -0
  111. package/src/designTokens/tokens/pa/paDarkTheme.ts +5 -0
  112. package/src/designTokens/tokens/pa/paLightTheme.ts +123 -0
  113. package/src/designTokens/tokens/pa/paSemantic.ts +87 -0
  114. package/src/stories/GuideDuDev/CreerUneIssue.mdx +64 -0
  115. package/src/stories/GuideDuDev/{CommentUtiliserLesRules.mdx → UtiliserLesRules.mdx} +2 -2
  116. package/src/stories/GuideDuDev/components.stories.ts +9 -7
  117. package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +163 -88
  118. package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +250 -23
  119. package/src/temp/TestDTComponent.vue +5 -6
  120. package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +0 -158
  121. package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +0 -22
  122. package/src/stories/GuideDuDev/CommentContribuer.mdx +0 -22
@@ -158,7 +158,6 @@
158
158
  </template>
159
159
 
160
160
  <style lang="scss" scoped>
161
-
162
161
  .vd-cookie-banner {
163
162
  position: fixed;
164
163
  left: 50%;
@@ -176,16 +175,17 @@
176
175
  display: flex;
177
176
  flex-direction: column;
178
177
  width: 100%;
179
- background: transparent;
178
+ background: transparent;
180
179
  }
181
180
 
182
181
  .vd-cookie-banner-content {
183
182
  overflow-y: auto;
184
183
  padding-right: 8px;
185
- background: transparent;
186
- div {
187
- background: transparent;
188
- }
184
+ background: transparent;
185
+
186
+ div {
187
+ background: transparent;
188
+ }
189
189
  }
190
190
 
191
191
  .vd-cookie-banner-action-ctn .v-btn {
@@ -193,12 +193,13 @@
193
193
  }
194
194
 
195
195
  .v-btn--icon {
196
- color: rgba(0, 0, 0, 0.54);
196
+ color: rgb(0 0 0 / 54%);
197
197
  position: absolute;
198
198
  right: 24px;
199
199
  }
200
200
 
201
- .height-enter-active, .height-leave-active {
201
+ .height-enter-active,
202
+ .height-leave-active {
202
203
  box-sizing: border-box;
203
204
  transition: height 2s ease;
204
205
  interpolate-size: allow-keywords;
@@ -214,11 +215,13 @@
214
215
  transition: height 0.1s ease;
215
216
  }
216
217
 
217
- .height-enter-from, .height-leave-to {
218
+ .height-enter-from,
219
+ .height-leave-to {
218
220
  height: 0;
219
221
  }
220
222
 
221
- .height-enter-to, .height-leave-from {
223
+ .height-enter-to,
224
+ .height-leave-from {
222
225
  height: auto;
223
226
  }
224
227
 
@@ -42,9 +42,9 @@ exports[`CookieBanner > does not close the dialog when the customize button is c
42
42
  <table>
43
43
  <thead data-v-d0e8c396="">
44
44
  <tr data-v-d0e8c396="">
45
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
46
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
47
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
45
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
46
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
47
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
48
48
  </tr>
49
49
  </thead>
50
50
  <tbody data-v-d0e8c396="">
@@ -77,9 +77,9 @@ exports[`CookieBanner > does not close the dialog when the customize button is c
77
77
  <table>
78
78
  <thead data-v-d0e8c396="">
79
79
  <tr data-v-d0e8c396="">
80
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
81
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
82
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
80
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
81
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
82
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
83
83
  </tr>
84
84
  </thead>
85
85
  <tbody data-v-d0e8c396="">
@@ -96,9 +96,10 @@ exports[`CookieBanner > does not close the dialog when the customize button is c
96
96
  </details>
97
97
  <div data-v-2ca04413="" class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-radio-group vd-cookies-information__radio-group" data-test-id="radio-group">
98
98
  <!---->
99
- <div class="v-input__control">
100
- <!---->
101
- <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" aria-describedby="radio-group-7-messages">
99
+ <div class="v-input__control"><label class="v-label" id="radio-group-7">
100
+ <!---->Accepter les cookies de type Cookies fonctionnels, ce champ est requis.
101
+ </label>
102
+ <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" label="Accepter les cookies de type Cookies fonctionnels, ce champ est requis." aria-describedby="radio-group-7-messages" aria-labelledby="radio-group-7">
102
103
  <div data-v-2ca04413="" class="v-spacer"></div>
103
104
  <div data-v-2ca04413="" class="v-selection-control v-selection-control--inline v-selection-control--density-default v-radio">
104
105
  <div class="v-selection-control__wrapper">
@@ -133,9 +134,9 @@ exports[`CookieBanner > does not close the dialog when the customize button is c
133
134
  <table>
134
135
  <thead data-v-d0e8c396="">
135
136
  <tr data-v-d0e8c396="">
136
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
137
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
138
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
137
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
138
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
139
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
139
140
  </tr>
140
141
  </thead>
141
142
  <tbody data-v-d0e8c396="">
@@ -152,9 +153,10 @@ exports[`CookieBanner > does not close the dialog when the customize button is c
152
153
  </details>
153
154
  <div data-v-2ca04413="" class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-radio-group vd-cookies-information__radio-group" data-test-id="radio-group">
154
155
  <!---->
155
- <div class="v-input__control">
156
- <!---->
157
- <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" aria-describedby="radio-group-12-messages">
156
+ <div class="v-input__control"><label class="v-label" id="radio-group-12">
157
+ <!---->Accepter les cookies de type Cookies d’analyse, ce champ est requis.
158
+ </label>
159
+ <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" label="Accepter les cookies de type Cookies d’analyse, ce champ est requis." aria-describedby="radio-group-12-messages" aria-labelledby="radio-group-12">
158
160
  <div data-v-2ca04413="" class="v-spacer"></div>
159
161
  <div data-v-2ca04413="" class="v-selection-control v-selection-control--inline v-selection-control--density-default v-radio">
160
162
  <div class="v-selection-control__wrapper">
@@ -73,6 +73,7 @@
73
73
  :rules="[required]"
74
74
  data-test-id="radio-group"
75
75
  inline
76
+ :label="locales.fieldLabel(locales[type].title)"
76
77
  hide-details="auto"
77
78
  class="vd-cookies-information__radio-group"
78
79
  @update:model-value="status = $event === 'accept'"
@@ -96,7 +97,7 @@
96
97
  </template>
97
98
 
98
99
  <style lang="scss" scoped>
99
- @use '@/assets/tokens.scss';
100
+ @use '@/assets/tokens';
100
101
 
101
102
  details > summary {
102
103
  cursor: pointer;
@@ -119,5 +120,9 @@ details > summary {
119
120
  :deep(.v-messages) {
120
121
  text-align: end;
121
122
  }
123
+
124
+ :deep(.v-label) {
125
+ justify-content: end;
126
+ }
122
127
  }
123
128
  </style>
@@ -18,4 +18,5 @@ export const locales = {
18
18
  hideInformation: 'Masquer les cookies',
19
19
  reject: 'Refuser',
20
20
  accept: 'Accepter',
21
+ fieldLabel: (cookieCategory: string) => `Accepter les cookies de type ${cookieCategory}, ce champ est requis.`,
21
22
  } as const
@@ -14,6 +14,7 @@
14
14
  :key="index"
15
15
  :style="{ width: item.width }"
16
16
  class="text-left"
17
+ scope="col"
17
18
  >
18
19
  {{ item.label }}
19
20
  </th>
@@ -42,9 +42,9 @@ exports[`CookiesSelection > renders correctly 1`] = `
42
42
  <table>
43
43
  <thead data-v-d0e8c396="">
44
44
  <tr data-v-d0e8c396="">
45
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
46
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
47
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
45
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
46
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
47
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
48
48
  </tr>
49
49
  </thead>
50
50
  <tbody data-v-d0e8c396="">
@@ -77,9 +77,9 @@ exports[`CookiesSelection > renders correctly 1`] = `
77
77
  <table>
78
78
  <thead data-v-d0e8c396="">
79
79
  <tr data-v-d0e8c396="">
80
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
81
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
82
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
80
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
81
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
82
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
83
83
  </tr>
84
84
  </thead>
85
85
  <tbody data-v-d0e8c396="">
@@ -96,9 +96,10 @@ exports[`CookiesSelection > renders correctly 1`] = `
96
96
  </details>
97
97
  <div data-v-2ca04413="" class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-radio-group vd-cookies-information__radio-group" data-test-id="radio-group">
98
98
  <!---->
99
- <div class="v-input__control">
100
- <!---->
101
- <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" aria-describedby="radio-group-2-messages">
99
+ <div class="v-input__control"><label class="v-label" id="radio-group-2">
100
+ <!---->Accepter les cookies de type Cookies fonctionnels, ce champ est requis.
101
+ </label>
102
+ <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" label="Accepter les cookies de type Cookies fonctionnels, ce champ est requis." aria-describedby="radio-group-2-messages" aria-labelledby="radio-group-2">
102
103
  <div data-v-2ca04413="" class="v-spacer"></div>
103
104
  <div data-v-2ca04413="" class="v-selection-control v-selection-control--inline v-selection-control--density-default v-radio">
104
105
  <div class="v-selection-control__wrapper">
@@ -133,9 +134,9 @@ exports[`CookiesSelection > renders correctly 1`] = `
133
134
  <table>
134
135
  <thead data-v-d0e8c396="">
135
136
  <tr data-v-d0e8c396="">
136
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Dénomination du cookie</th>
137
- <th data-v-d0e8c396="" style="width: 328px;" class="text-left">Finalité</th>
138
- <th data-v-d0e8c396="" style="width: 180px;" class="text-left">Durée de conservation</th>
137
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Dénomination du cookie</th>
138
+ <th data-v-d0e8c396="" style="width: 328px;" class="text-left" scope="col">Finalité</th>
139
+ <th data-v-d0e8c396="" style="width: 180px;" class="text-left" scope="col">Durée de conservation</th>
139
140
  </tr>
140
141
  </thead>
141
142
  <tbody data-v-d0e8c396="">
@@ -152,9 +153,10 @@ exports[`CookiesSelection > renders correctly 1`] = `
152
153
  </details>
153
154
  <div data-v-2ca04413="" class="v-input v-input--horizontal v-input--center-affix v-input--density-default v-theme--light v-locale--is-ltr v-radio-group vd-cookies-information__radio-group" data-test-id="radio-group">
154
155
  <!---->
155
- <div class="v-input__control">
156
- <!---->
157
- <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" aria-describedby="radio-group-7-messages">
156
+ <div class="v-input__control"><label class="v-label" id="radio-group-7">
157
+ <!---->Accepter les cookies de type Cookies d’analyse, ce champ est requis.
158
+ </label>
159
+ <div class="v-selection-control-group v-selection-control-group--inline" role="radiogroup" label="Accepter les cookies de type Cookies d’analyse, ce champ est requis." aria-describedby="radio-group-7-messages" aria-labelledby="radio-group-7">
158
160
  <div data-v-2ca04413="" class="v-spacer"></div>
159
161
  <div data-v-2ca04413="" class="v-selection-control v-selection-control--inline v-selection-control--density-default v-radio">
160
162
  <div class="v-selection-control__wrapper">
@@ -207,8 +207,11 @@ export const SlotIcon: Story = {
207
207
  <CopyBtn
208
208
  label="Copier le numéro de patient"
209
209
  text-to-copy="1970756541"
210
- :icon="duplicateIcon"
211
- />
210
+ >
211
+ <template #icon>
212
+ <VIcon :icon="duplicateIcon" />
213
+ </template>
214
+ </CopyBtn>
212
215
  </div>
213
216
  </template>
214
217
  `,
@@ -86,17 +86,17 @@
86
86
  </template>
87
87
 
88
88
  <style lang="scss">
89
- @use '@/assets/tokens.scss';
89
+ @use '@/assets/tokens';
90
90
 
91
91
  .vd-copy-tooltip-menu {
92
- padding: 6px 16px;
93
- box-shadow: none;
94
- margin-top: 2px;
95
- background: rgba(84, 88, 89, 0.95);
96
- color: white;
92
+ padding: 6px 16px;
93
+ box-shadow: none;
94
+ margin-top: 2px;
95
+ background: rgb(84 88 89 / 95%);
96
+ color: white;
97
97
  }
98
98
 
99
99
  .v-btn--icon .v-icon {
100
- color: tokens.$grey-lighten-20;
100
+ color: tokens.$grey-lighten-20;
101
101
  }
102
102
  </style>
@@ -86,52 +86,6 @@ const items = [
86
86
  },
87
87
  }
88
88
 
89
- export const withLink: Story = {
90
- parameters: {
91
- sourceCode: [
92
- {
93
- name: 'Template',
94
- code: `
95
- <template>
96
- <SyBtnSelect
97
- :primary-info="primaryInfo"
98
- :menu-items="items"
99
- />
100
- </template>
101
- `,
102
- },
103
- {
104
- name: 'Script',
105
- code: `
106
- <script setup lang="ts">
107
- import SyBtnSelect from './SyBtnSelect.vue'
108
-
109
- const primaryInfo = 'Mes options'
110
- const items = ['Option 1', 'Option 2']
111
- </script>
112
- `,
113
- },
114
- ],
115
- },
116
- args: {
117
- primaryInfo: 'Mes options',
118
- menuItems: ['Option 1', 'Option 2'],
119
- },
120
- render: (args) => {
121
- return {
122
- components: { SyBtnSelect },
123
- setup() {
124
- return { args }
125
- },
126
- template: `
127
- <div class="d-flex flex-wrap align-center pa-4">
128
- <SyBtnSelect v-bind="args"/>
129
- </div>
130
- `,
131
- }
132
- },
133
- }
134
-
135
89
  export const MobileView: Story = {
136
90
  parameters: {
137
91
  sourceCode: [
@@ -203,6 +157,7 @@ export const WithSlotPrependIcon: Story = {
203
157
  code: `
204
158
  <script setup lang="ts">
205
159
  import SyBtnSelect from './SyBtnSelect.vue'
160
+ import { mdiAccount } from '@mdi/js'
206
161
 
207
162
  const primaryInfo = 'Jane Doe'
208
163
  const items = ['Option 1', 'Option 2']
@@ -260,6 +215,7 @@ export const WithSlotAppendIcon: Story = {
260
215
  code: `
261
216
  <script setup lang="ts">
262
217
  import SyBtnSelect from './SyBtnSelect.vue'
218
+ import { mdiAccount } from '@mdi/js'
263
219
 
264
220
  const primaryInfo = 'Jane Doe'
265
221
  const items = ['Option 1', 'Option 2']
@@ -315,6 +271,7 @@ export const WithIconOnly: Story = {
315
271
  code: `
316
272
  <script setup lang="ts">
317
273
  import SyBtnSelect from './SyBtnSelect.vue'
274
+ import { mdiAccount } from '@mdi/js'
318
275
 
319
276
  const primaryInfo = 'Jane Doe'
320
277
  const items = ['Option 1', 'Option 2']
@@ -359,7 +316,7 @@ export const WithLogoutItemSlot: Story = {
359
316
  :menu-items="items"
360
317
  >
361
318
  <template #footer-list-item>
362
- <VListItem @click="args.logout">
319
+ <VListItem @click="console.log('logout')">
363
320
  <VListItemTitle>Logout</VListItemTitle>
364
321
  </VListItem>
365
322
  </template>
@@ -394,7 +351,7 @@ const items = ['Option 1', 'Option 2']
394
351
  <div class="d-flex flex-wrap align-center pa-4">
395
352
  <SyBtnSelect v-bind="args">
396
353
  <template #footer-list-item>
397
- <VListItem @click="args.logout">
354
+ <VListItem @click="console.log('logout')">
398
355
  <VListItemTitle>Logout</VListItemTitle>
399
356
  </VListItem>
400
357
  </template>
@@ -413,7 +370,6 @@ export const WithCustomKeys: Story = {
413
370
  code: `
414
371
  <template>
415
372
  <SyBtnSelect
416
- v-bind="args"
417
373
  text-key="customText"
418
374
  value-key="customValue"
419
375
  :menu-items="menuItems"
@@ -430,6 +386,7 @@ export const WithCustomKeys: Story = {
430
386
  code: `
431
387
  <script setup lang="ts">
432
388
  import SyBtnSelect from './SyBtnSelect.vue'
389
+ import { mdiAccount } from '@mdi/js'
433
390
 
434
391
  const primaryInfo = 'Information principale'
435
392
  const menuItems = [
@@ -485,7 +442,7 @@ export const WithMultipleSlots: Story = {
485
442
  <VIcon :icon="mdiAccount" />
486
443
  </template>
487
444
  <template #footer-list-item>
488
- <VListItem @click="args.logout">
445
+ <VListItem @click="console.log('logout')">
489
446
  <VListItemTitle>Se déconnecter</VListItemTitle>
490
447
  </VListItem>
491
448
  </template>
@@ -498,6 +455,7 @@ export const WithMultipleSlots: Story = {
498
455
  code: `
499
456
  <script setup lang="ts">
500
457
  import SyBtnSelect from './SyBtnSelect.vue'
458
+ import { mdiAccount } from '@mdi/js'
501
459
 
502
460
  const primaryInfo = 'Information principale'
503
461
  const menuItems = ['Option 1', 'Option 2']
@@ -522,7 +480,7 @@ const menuItems = ['Option 1', 'Option 2']
522
480
  <VIcon :icon="mdiAccount"/>
523
481
  </template>
524
482
  <template #footer-list-item>
525
- <VListItem @click="args.logout">
483
+ <VListItem @click="console.log('logout')">
526
484
  <VListItemTitle>Se déconnecter</VListItemTitle>
527
485
  </VListItem>
528
486
  </template>
@@ -560,6 +518,7 @@ export const WithCustomStyles: Story = {
560
518
  code: `
561
519
  <script setup lang="ts">
562
520
  import SyBtnSelect from './SyBtnSelect.vue'
521
+ import { mdiAccount } from '@mdi/js'
563
522
 
564
523
  const primaryInfo = 'Jane Doe'
565
524
  const items = ['Option 1', 'Option 2']
@@ -619,6 +578,7 @@ export const WithStyledOptions: Story = {
619
578
  code: `
620
579
  <script setup lang="ts">
621
580
  import SyBtnSelect from './SyBtnSelect.vue'
581
+ import { mdiAccount } from '@mdi/js'
622
582
 
623
583
  const primaryInfo = 'Information principale'
624
584
  const menuItems = ['Option 1', 'Option 2']
@@ -213,42 +213,42 @@
213
213
  </template>
214
214
 
215
215
  <style lang="scss" scoped>
216
- @use '@/assets/tokens.scss';
216
+ @use '@/assets/tokens';
217
217
  @use '@/assets/tokens' as *;
218
218
 
219
219
  .vd-user-menu-btn-ctn {
220
- position: relative;
221
- z-index: 1;
220
+ position: relative;
221
+ z-index: 1;
222
222
 
223
- .v-btn.v-btn--density-default {
224
- height: auto !important;
225
- }
223
+ .v-btn.v-btn--density-default {
224
+ height: auto !important;
225
+ }
226
226
 
227
- .v-btn {
228
- text-transform: none !important;
229
- }
227
+ .v-btn {
228
+ text-transform: none !important;
229
+ }
230
230
  }
231
231
 
232
232
  .vd-user-menu-btn {
233
- outline: none;
234
- padding: 12px !important;
235
-
236
- &:hover:before {
237
- background: #000;
238
- opacity: 0.05;
239
- }
240
-
241
- &:focus:before {
242
- background: tokens.$blue-base;
243
- opacity: 0.08;
244
- }
245
-
246
- &:focus {
247
- background: rgba(tokens.$blue-base, 0.08) !important;
248
- }
233
+ outline: none;
234
+ padding: 12px !important;
235
+
236
+ &:hover::before {
237
+ background: #000;
238
+ opacity: 0.05;
239
+ }
240
+
241
+ &:focus::before {
242
+ background: tokens.$blue-base;
243
+ opacity: 0.08;
244
+ }
245
+
246
+ &:focus {
247
+ background: rgba(tokens.$blue-base, 0.08) !important;
248
+ }
249
249
  }
250
250
 
251
251
  :deep(.vd-user-menu-btn:focus > .v-btn__overlay) {
252
- opacity: 0 !important;
252
+ opacity: 0 !important;
253
253
  }
254
254
  </style>
@@ -21,11 +21,14 @@ Il est basé sur un `v-input`.
21
21
  <Source dark code={`
22
22
  <script setup lang="ts">
23
23
  import { SyInputSelect } from '@cnamts/synapse'
24
+ import { ref } from 'vue'
24
25
 
25
26
  const items = [
26
27
  { text: 'Option 1', value: '1' },
27
28
  { text: 'Option 2', value: '2' },
28
- ],
29
+ ]
30
+
31
+ const value = ref(undefined)
29
32
  </script>
30
33
 
31
34
  <template>
@@ -44,12 +44,15 @@ export const Default: Story = {
44
44
  name: 'Script',
45
45
  code: `
46
46
  <script setup lang="ts">
47
- import SyInputSelect from '@cnamts/SyInputSelect'
47
+ import SyInputSelect from '@cnamts/synapse'
48
+ import { ref } from 'vue'
48
49
 
49
50
  const items = [
50
51
  { text: 'Option 1', value: '1' },
51
52
  { text: 'Option 2', value: '2' },
52
53
  ],
54
+
55
+ const value = ref(undefined)
53
56
  </script>
54
57
  `,
55
58
  },
@@ -107,12 +110,15 @@ export const Required: Story = {
107
110
  name: 'Script',
108
111
  code: `
109
112
  <script setup lang="ts">
110
- import SyInputSelect from '@cnamts/SyInputSelect'
113
+ import SyInputSelect from '@cnamts/synapse'
114
+ import { ref } from 'vue'
111
115
 
112
116
  const items = [
113
117
  { text: 'Option 1', value: '1' },
114
118
  { text: 'Option 2', value: '2' },
115
119
  ],
120
+
121
+ const value = ref(undefined)
116
122
  </script>
117
123
  `,
118
124
  },
@@ -165,7 +171,7 @@ export const withCustomError: Story = {
165
171
  name: 'Script',
166
172
  code: `
167
173
  <script setup lang="ts">
168
- import SyInputSelect from '@cnamts/SyInputSelect'
174
+ import SyInputSelect from '@cnamts/synapse'
169
175
  import { ref } from 'vue'
170
176
 
171
177
  const items = [
@@ -178,6 +184,8 @@ export const withCustomError: Story = {
178
184
  const triggerError = () => {
179
185
  errorMessages.value = ['This is a test error message']
180
186
  }
187
+
188
+ const value = ref(undefined)
181
189
  </script>
182
190
  `,
183
191
  },
@@ -226,7 +234,6 @@ export const withCustomKey: Story = {
226
234
  v-model="value"
227
235
  :items="items"
228
236
  text-key="customKey"
229
- outlined
230
237
  />
231
238
  </template>
232
239
  `,
@@ -235,12 +242,15 @@ export const withCustomKey: Story = {
235
242
  name: 'Script',
236
243
  code: `
237
244
  <script setup lang="ts">
238
- import SyInputSelect from '@cnamts/SyInputSelect'
245
+ import SyInputSelect from '@cnamts/synapse'
246
+ import { ref } from 'vue'
239
247
 
240
248
  const items = [
241
249
  { customKey: 'Choix 1', value: '1' },
242
250
  { customKey: 'Choix 2', value: '2' }
243
251
  ]
252
+
253
+ const value = ref(undefined)
244
254
  </script>
245
255
  `,
246
256
  },
@@ -262,7 +272,6 @@ export const withCustomKey: Story = {
262
272
  <div class="d-flex flex-wrap align-center pa-4">
263
273
  <SyInputSelect
264
274
  v-bind="args"
265
- outlined
266
275
  text-key="customKey"
267
276
  />
268
277
  </div>
@@ -290,7 +299,8 @@ export const withCustomStyles: Story = {
290
299
  name: 'Script',
291
300
  code: `
292
301
  <script setup lang="ts">
293
- import SyInputSelect from '@cnamts/SyInputSelect'
302
+ import SyInputSelect from '@cnamts/synapse'
303
+ import { ref } from 'vue'
294
304
 
295
305
  const items = [
296
306
  { text: 'Option 1', value: '1' },
@@ -305,6 +315,8 @@ export const withCustomStyles: Story = {
305
315
  color: 'secondary',
306
316
  },
307
317
  }
318
+
319
+ const value = ref(undefined)
308
320
  </script>
309
321
  `,
310
322
  },