@cnamts/synapse 0.0.7-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 (102) hide show
  1. package/dist/design-system-v3.d.ts +325 -368
  2. package/dist/design-system-v3.js +2791 -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.vue +4 -4
  9. package/src/components/BackToTopBtn/BackToTopBtn.vue +1 -0
  10. package/src/components/CollapsibleList/CollapsibleList.mdx +1 -1
  11. package/src/components/CollapsibleList/CollapsibleList.vue +43 -44
  12. package/src/components/ContextualMenu/ContextualMenu.mdx +118 -0
  13. package/src/components/ContextualMenu/ContextualMenu.stories.ts +430 -0
  14. package/src/components/ContextualMenu/ContextualMenu.vue +101 -0
  15. package/src/components/ContextualMenu/tests/ContextualMenu.spec.ts +115 -0
  16. package/src/components/ContextualMenu/tests/__snapshots__/ContextualMenu.spec.ts.snap +10 -0
  17. package/src/components/ContextualMenu/types.ts +5 -0
  18. package/src/components/CookieBanner/CookieBanner.stories.ts +1 -2
  19. package/src/components/CookieBanner/CookieBanner.vue +13 -10
  20. package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +17 -15
  21. package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +6 -1
  22. package/src/components/CookiesSelection/CookiesInformation/locales.ts +1 -0
  23. package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +1 -0
  24. package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +17 -15
  25. package/src/components/CopyBtn/CopyBtn.vue +7 -7
  26. package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +26 -26
  27. package/src/components/Customs/SyInputSelect/SyInputSelect.vue +24 -24
  28. package/src/components/Customs/SySelect/SySelect.vue +27 -26
  29. package/src/components/DataList/DataList.stories.ts +3 -2
  30. package/src/components/DataList/DataList.vue +1 -1
  31. package/src/components/DataListGroup/DataListGroup.stories.ts +3 -2
  32. package/src/components/DataListItem/DataListItem.vue +12 -12
  33. package/src/components/DialogBox/DialogBox.mdx +28 -2
  34. package/src/components/DialogBox/DialogBox.stories.ts +1 -1
  35. package/src/components/DialogBox/DialogBox.vue +3 -2
  36. package/src/components/DownloadBtn/DownloadBtn.vue +2 -1
  37. package/src/components/ExternalLinks/ExternalLinks.mdx +86 -0
  38. package/src/components/ExternalLinks/ExternalLinks.stories.ts +553 -0
  39. package/src/components/ExternalLinks/ExternalLinks.vue +200 -0
  40. package/src/components/ExternalLinks/config.ts +34 -0
  41. package/src/components/ExternalLinks/locales.ts +4 -0
  42. package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +154 -0
  43. package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +159 -0
  44. package/src/components/FooterBar/FooterBar.vue +105 -80
  45. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +14 -13
  46. package/src/components/HeaderBar/HeaderBar.vue +3 -3
  47. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +11 -7
  48. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +5 -5
  49. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +2 -2
  50. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +10 -8
  51. package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -2
  52. package/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.vue +2 -1
  53. package/src/components/HeaderBar/HeaderLogo/logos/Logo.vue +2 -1
  54. package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +10 -10
  55. package/src/components/HeaderBar/consts.scss +1 -1
  56. package/src/components/HeaderLoading/HeaderLoading.vue +12 -11
  57. package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
  58. package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +9 -9
  59. package/src/components/HeaderToolbar/HeaderToolbar.vue +215 -202
  60. package/src/components/LangBtn/LangBtn.vue +8 -6
  61. package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +2 -2
  62. package/src/components/NirField/NirField.stories.ts +7 -7
  63. package/src/components/NirField/NirField.vue +44 -47
  64. package/src/components/NotFoundPage/NotFoundPage.stories.ts +33 -2
  65. package/src/components/NotFoundPage/NotFoundPage.vue +17 -0
  66. package/src/components/NotificationBar/NotificationBar.mdx +5 -5
  67. package/src/components/NotificationBar/NotificationBar.stories.ts +410 -314
  68. package/src/components/NotificationBar/NotificationBar.vue +43 -41
  69. package/src/components/PageContainer/PageContainer.vue +4 -4
  70. package/src/components/PasswordField/PasswordField.mdx +70 -0
  71. package/src/components/PasswordField/PasswordField.stories.ts +213 -0
  72. package/src/components/PasswordField/PasswordField.vue +189 -0
  73. package/src/components/PasswordField/config.ts +11 -0
  74. package/src/components/PasswordField/locales.ts +4 -0
  75. package/src/components/PasswordField/tests/PasswordField.spec.ts +96 -0
  76. package/src/components/PhoneField/PhoneField.mdx +0 -2
  77. package/src/components/PhoneField/PhoneField.stories.ts +10 -50
  78. package/src/components/PhoneField/PhoneField.vue +34 -34
  79. package/src/components/SkipLink/SkipLink.vue +10 -10
  80. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +28 -26
  81. package/src/components/SubHeader/SubHeader.vue +32 -31
  82. package/src/components/SyAlert/SyAlert.vue +12 -12
  83. package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -1
  84. package/src/components/UserMenuBtn/config.ts +1 -1
  85. package/src/components/index.ts +10 -7
  86. package/src/designTokens/index.ts +6 -4
  87. package/src/designTokens/{bootstrapColors.md → paColors.md} +1 -1
  88. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -0
  89. package/src/designTokens/tokens/pa/paColors.ts +171 -0
  90. package/src/designTokens/tokens/pa/paContextual.ts +58 -0
  91. package/src/designTokens/tokens/pa/paDarkTheme.ts +5 -0
  92. package/src/designTokens/tokens/pa/paLightTheme.ts +123 -0
  93. package/src/designTokens/tokens/pa/paSemantic.ts +87 -0
  94. package/src/stories/GuideDuDev/CreerUneIssue.mdx +64 -0
  95. package/src/stories/GuideDuDev/{CommentUtiliserLesRules.mdx → UtiliserLesRules.mdx} +2 -2
  96. package/src/stories/GuideDuDev/components.stories.ts +9 -7
  97. package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +163 -88
  98. package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +250 -23
  99. package/src/temp/TestDTComponent.vue +5 -6
  100. package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +0 -158
  101. package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +0 -22
  102. package/src/stories/GuideDuDev/CommentContribuer.mdx +0 -22
@@ -151,6 +151,7 @@
151
151
 
152
152
  <style lang="scss" scoped>
153
153
  @use '@/assets/tokens' as *;
154
+
154
155
  .v-card__title > * {
155
156
  line-height: 1em;
156
157
  }
@@ -166,7 +167,7 @@ h2 {
166
167
  text-wrap: balance;
167
168
  }
168
169
 
169
- .vd-dialog-box-actions-ctn {
170
+ .vd-dialog-box-actions-ctn {
170
171
  display: flex;
171
172
  flex-direction: column-reverse;
172
173
  justify-content: stretch;
@@ -174,7 +175,7 @@ h2 {
174
175
  }
175
176
 
176
177
  @media screen and (min-width: $container-mobile-max-width) {
177
- .vd-dialog-box-actions-ctn {
178
+ .vd-dialog-box-actions-ctn {
178
179
  flex-direction: row;
179
180
  }
180
181
  }
@@ -102,12 +102,13 @@
102
102
  .v-btn__content {
103
103
  flex-wrap: wrap;
104
104
  }
105
+
105
106
  .v-icon {
106
107
  flex: none;
107
108
  }
108
109
  }
109
110
 
110
111
  .outlined-style {
111
- border: 1px solid currentColor;
112
+ border: 1px solid currentcolor;
112
113
  }
113
114
  </style>
@@ -0,0 +1,86 @@
1
+ import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
2
+
3
+ import * as ExternalLinksStories from './ExternalLinks.stories.ts'
4
+
5
+ <Meta of={ExternalLinksStories} />
6
+
7
+
8
+ # ExternalLinks
9
+
10
+ L'élément `ExternalLinks` est utilisé pour afficher un menu avec une liste vers des liens externes.
11
+
12
+ <Canvas of={ExternalLinksStories.Default} />
13
+
14
+
15
+ # API
16
+
17
+ <Controls of={ExternalLinksStories.Default} />
18
+
19
+
20
+ ## Décalage
21
+
22
+ Vous pouvez décaler le composant vers le haut ou vers le bas en utilisant les props `nudge-top` et `nude-bottom`.
23
+
24
+ <Canvas of={ExternalLinksStories.NudgeTop} />
25
+
26
+
27
+ ## Absence de données
28
+
29
+ Lorsqu'il n'y a pas de données, un message par défaut est affiché.
30
+
31
+ <Canvas of={ExternalLinksStories.NoData} />
32
+
33
+ ## Composants Vuetify
34
+
35
+ Il est possibles de personnalisé les props passé aux composants utilisés en interne en utilisant la props `vuetifyOptions`.
36
+
37
+ <Canvas of={ExternalLinksStories.VuetifyOptions} />
38
+
39
+
40
+ ## Slot `link-icon`
41
+
42
+ Vous pouvez utiliser le slot `link-icon` pour remplacer l'icône dans les liens.
43
+
44
+ <Canvas
45
+ of={ExternalLinksStories.CustomLinksIcon}
46
+ source={{
47
+ language: 'html',
48
+ format: 'dedent',
49
+ code: `
50
+ <script lang="ts" setup>
51
+ import { ExternalLinks } from '@cnamts/synapse'
52
+ import { VIcon } from 'vuetify/components'
53
+ import { mdiArrowTopRight } from '@mdi/js'
54
+
55
+ const items = [
56
+ {
57
+ text: 'ameli.fr',
58
+ href: 'https://www.ameli.fr',
59
+ },
60
+ {
61
+ text: 'Github',
62
+ href: 'https://www.github.com',
63
+ },
64
+ {
65
+ text: 'Twitter',
66
+ href: 'https://www.twitter.com',
67
+ },
68
+ ]
69
+
70
+ const arrowIcon = mdiArrowTopRight
71
+ </script>
72
+
73
+ <template>
74
+ <ExternalLinks
75
+ :items
76
+ >
77
+ <template #link-icon>
78
+ <VIcon>
79
+ {{ arrowIcon }}
80
+ </VIcon>
81
+ </template>
82
+ </ExternalLinks>
83
+ </template>
84
+ `
85
+ }}
86
+ />
@@ -0,0 +1,553 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import ExternalLinks from './ExternalLinks.vue'
3
+ import { mdiArrowTopRight } from '@mdi/js'
4
+ import { VIcon } from 'vuetify/components'
5
+
6
+ const meta = {
7
+ title: 'Composants/Navigation/ExternalLinks',
8
+ component: ExternalLinks,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ argTypes: {
13
+ 'position': {
14
+ control: {
15
+ type: 'select',
16
+ },
17
+ options: ['top left', 'top right', 'bottom left', 'bottom right'],
18
+ table: {
19
+ defaultValue: {
20
+ summary: 'top left',
21
+ },
22
+ type: {
23
+ summary: `'top left' | 'top right' | 'bottom left' | 'bottom right'`,
24
+ },
25
+ },
26
+ },
27
+ 'items': {
28
+ control: {
29
+ type: 'object',
30
+ },
31
+ table: {
32
+ type: {
33
+ summary: 'Array<{ text: string, href: string }>',
34
+ },
35
+ category: 'props',
36
+ },
37
+ description: 'List des liens',
38
+ },
39
+ 'btnText': {
40
+ control: {
41
+ type: 'text',
42
+ },
43
+ table: {
44
+ defaultValue: {
45
+ summary: 'Consulter les données externes',
46
+ },
47
+ type: {
48
+ summary: 'string',
49
+ },
50
+ },
51
+ description: 'Text affiché dans le bouton',
52
+ },
53
+ 'nudgeTop': {
54
+ control: {
55
+ type: 'text',
56
+ },
57
+ table: {
58
+ defaultValue: {
59
+ summary: '0px',
60
+ },
61
+ type: {
62
+ summary: 'string|number',
63
+ },
64
+ },
65
+ },
66
+ 'nudgeBottom': {
67
+ control: {
68
+ type: 'text',
69
+ },
70
+ table: {
71
+ defaultValue: {
72
+ summary: '0px',
73
+ },
74
+ type: {
75
+ summary: 'string|number',
76
+ },
77
+ },
78
+ },
79
+ 'fixed': {
80
+ control: {
81
+ type: 'boolean',
82
+ },
83
+ table: {
84
+ defaultValue: {
85
+ summary: 'false',
86
+ },
87
+ type: {
88
+ summary: 'boolean',
89
+ },
90
+ },
91
+ },
92
+ 'link-icon': {
93
+ description: 'Remplace l\'icône des liens',
94
+ control: {
95
+ type: 'text',
96
+ },
97
+ },
98
+ 'vuetifyOptions': {
99
+ control: { type: 'object' },
100
+ description:
101
+ 'Permet de personnaliser les props des composants vuetify `VMenu`, `VBtn`, `VIcon`, `VList`, `VListItem` et `VSheet` utilisés en interne.',
102
+ table: {
103
+ category: 'props',
104
+ type: {
105
+ summary: 'object',
106
+ detail: `{
107
+ menu: Record<string, any>,
108
+ btn: Record<string, any>,
109
+ btnIcon: Record<string, any>,
110
+ linkIcon: Record<string, any>,
111
+ list: Record<string, any>,
112
+ listItem: Record<string, any>,
113
+ sheet: Record<string, any>,
114
+ }`,
115
+ },
116
+ defaultValue: {
117
+ summary: 'object',
118
+ detail: `{
119
+ menu: {
120
+ tile: true,
121
+ zIndex: 4,
122
+ offset: 0,
123
+ },
124
+ btn: {
125
+ tile: true,
126
+ minHeight: '48px',
127
+ minWidth: '328px',
128
+ color: cnamColorsTokens.blue.lighten20,
129
+ class: 'd-flex px-3',
130
+ },
131
+ btnIcon: {
132
+ color: 'white',
133
+ },
134
+ linkIcon: {
135
+ color: 'rgba(0, 0, 0, .54)',
136
+ },
137
+ list: {
138
+ border: false,
139
+ elevation: 0,
140
+ class: 'py-0',
141
+ },
142
+ listItem: {
143
+ target: '_blank',
144
+ rel: 'noopener noreferrer',
145
+ },
146
+ sheet: {
147
+ class: 'px-4 py-3',
148
+ },
149
+ }`,
150
+ },
151
+ },
152
+ },
153
+ },
154
+ decorators: [() => ({ template: '<div style="min-height: 300px; overflow: hidden; position: relative"><story/></div>' })],
155
+ } satisfies Meta<typeof ExternalLinks>
156
+
157
+ export default meta
158
+
159
+ type Story = StoryObj<typeof ExternalLinks>
160
+
161
+ export const Default: Story = {
162
+ args: {
163
+ position: 'top left',
164
+ items: [
165
+ {
166
+ text: 'ameli.fr',
167
+ href: 'https://www.ameli.fr',
168
+ },
169
+ {
170
+ text: 'Github',
171
+ href: 'https://www.github.com',
172
+ },
173
+ {
174
+ text: 'Twitter',
175
+ href: 'https://www.twitter.com',
176
+ },
177
+ ],
178
+ },
179
+ parameters: {
180
+ sourceCode: [
181
+ {
182
+ name: 'Template',
183
+ code: `
184
+ <ExternalLinks
185
+ position="top left"
186
+ :items="items"
187
+ />
188
+ `,
189
+ },
190
+ {
191
+ name: 'Script',
192
+ code: `
193
+ import { ExternalLinks } from '@cnamts/synapse'
194
+
195
+ const items = [
196
+ {
197
+ text: 'ameli.fr',
198
+ href: 'https://www.ameli.fr',
199
+ },
200
+ {
201
+ text: 'Github',
202
+ href: 'https://www.github.com',
203
+ },
204
+ {
205
+ text: 'Twitter',
206
+ href: 'https://www.twitter.com',
207
+ },
208
+ ]
209
+ `,
210
+ },
211
+ ],
212
+ },
213
+ }
214
+
215
+ export const NudgeTop: Story = {
216
+ args: {
217
+ position: 'top left',
218
+ nudgeTop: '50px',
219
+ items: [
220
+ {
221
+ text: 'ameli.fr',
222
+ href: 'https://www.ameli.fr',
223
+ },
224
+ {
225
+ text: 'Github',
226
+ href: 'https://www.github.com',
227
+ },
228
+ {
229
+ text: 'Twitter',
230
+ href: 'https://www.twitter.com',
231
+ },
232
+ ],
233
+ },
234
+ parameters: {
235
+ sourceCode: [
236
+ {
237
+ name: 'Template',
238
+ code: `
239
+ <ExternalLinks
240
+ position="top left"
241
+ :items="items"
242
+ nudgeTop="50px"
243
+ />
244
+ `,
245
+ },
246
+ {
247
+ name: 'Script',
248
+ code: `
249
+ import { ExternalLinks } from '@cnamts/synapse'
250
+
251
+ const items = [
252
+ {
253
+ text: 'ameli.fr',
254
+ href: 'https://www.ameli.fr',
255
+ },
256
+ {
257
+ text: 'Github',
258
+ href: 'https://www.github.com',
259
+ },
260
+ {
261
+ text: 'Twitter',
262
+ href: 'https://www.twitter.com',
263
+ },
264
+ ]
265
+ `,
266
+ },
267
+ ],
268
+ },
269
+ }
270
+
271
+ export const NudgeBottom: Story = {
272
+ args: {
273
+ position: 'bottom left',
274
+ nudgeBottom: '50px',
275
+ items: [
276
+ {
277
+ text: 'ameli.fr',
278
+ href: 'https://www.ameli.fr',
279
+ },
280
+ {
281
+ text: 'Github',
282
+ href: 'https://www.github.com',
283
+ },
284
+ {
285
+ text: 'Twitter',
286
+ href: 'https://www.twitter.com',
287
+ },
288
+ ],
289
+ },
290
+ parameters: {
291
+ sourceCode: [
292
+ {
293
+ name: 'Template',
294
+ code: `
295
+ <ExternalLinks
296
+ position="bottom left"
297
+ :items="items"
298
+ nudgeBottom="50px"
299
+ />
300
+ `,
301
+ },
302
+ {
303
+ name: 'Script',
304
+ code: `
305
+ import { ExternalLinks } from '@cnamts/synapse'
306
+
307
+ const items = [
308
+ {
309
+ text: 'ameli.fr',
310
+ href: 'https://www.ameli.fr',
311
+ },
312
+ {
313
+ text: 'Github',
314
+ href: 'https://www.github.com',
315
+ },
316
+ {
317
+ text: 'Twitter',
318
+ href: 'https://www.twitter.com',
319
+ },
320
+ ]
321
+ `,
322
+ },
323
+ ],
324
+ },
325
+ }
326
+
327
+ export const NoData: Story = {
328
+ args: {
329
+ position: 'top left',
330
+ items: [],
331
+ },
332
+ parameters: {
333
+ sourceCode: [
334
+ {
335
+ name: 'Template',
336
+ code: `
337
+ <ExternalLinks
338
+ position="top left"
339
+ :items="[]"
340
+ />
341
+ `,
342
+ },
343
+ {
344
+ name: 'Script',
345
+ code: `
346
+ import { ExternalLinks } from '@cnamts/synapse'
347
+
348
+ `,
349
+ },
350
+ ],
351
+ },
352
+ }
353
+
354
+ export const BtnText: Story = {
355
+ args: {
356
+ items: [
357
+ {
358
+ text: 'ameli.fr',
359
+ href: 'https://www.ameli.fr',
360
+ },
361
+ {
362
+ text: 'Github',
363
+ href: 'https://www.github.com',
364
+ },
365
+ {
366
+ text: 'Twitter',
367
+ href: 'https://www.twitter.com',
368
+ },
369
+ ],
370
+ btnText: 'Afficher les liens externes',
371
+ },
372
+ parameters: {
373
+ sourceCode: [
374
+ {
375
+ name: 'Template',
376
+ code: `
377
+ <ExternalLinks
378
+ position="top left"
379
+ btn-text="Afficher les liens externes"
380
+ :items="items"
381
+ />
382
+ `,
383
+ },
384
+ {
385
+ name: 'Script',
386
+ code: `
387
+ import { ExternalLinks } from '@cnamts/synapse'
388
+
389
+ const items = [
390
+ {
391
+ text: 'ameli.fr',
392
+ href: 'https://www.ameli.fr',
393
+ },
394
+ {
395
+ text: 'Github',
396
+ href: 'https://www.github.com',
397
+ },
398
+ {
399
+ text: 'Twitter',
400
+ href: 'https://www.twitter.com',
401
+ },
402
+ ]
403
+ `,
404
+ },
405
+ ],
406
+ },
407
+ }
408
+
409
+ export const VuetifyOptions: Story = {
410
+ args: {
411
+ vuetifyOptions: {
412
+ btn: {
413
+ color: 'secondary',
414
+ },
415
+ list: {
416
+ density: 'compact',
417
+ },
418
+ },
419
+ items: [
420
+ {
421
+ text: 'ameli.fr',
422
+ href: 'https://www.ameli.fr',
423
+ },
424
+ {
425
+ text: 'Github',
426
+ href: 'https://www.github.com',
427
+ },
428
+ {
429
+ text: 'Twitter',
430
+ href: 'https://www.twitter.com',
431
+ },
432
+ ],
433
+ },
434
+ parameters: {
435
+ sourceCode: [
436
+ {
437
+ name: 'Template',
438
+ code: `
439
+ <ExternalLinks
440
+ :items
441
+ :vuetifyOptions="options"
442
+ />
443
+ `,
444
+ },
445
+ {
446
+ name: 'Script',
447
+ code: `
448
+ import { ExternalLinks } from '@cnamts/synapse'
449
+
450
+ const items = [
451
+ {
452
+ text: 'ameli.fr',
453
+ href: 'https://www.ameli.fr',
454
+ },
455
+ {
456
+ text: 'Github',
457
+ href: 'https://www.github.com',
458
+ },
459
+ {
460
+ text: 'Twitter',
461
+ href: 'https://www.twitter.com',
462
+ },
463
+ ]
464
+
465
+ const options = {
466
+ btn: {
467
+ color: 'secondary',
468
+ },
469
+ list: {
470
+ density: 'compact',
471
+ },
472
+ }
473
+ `,
474
+ },
475
+ ],
476
+ },
477
+ }
478
+
479
+ export const CustomLinksIcon: Story = {
480
+ render: (args) => {
481
+ return {
482
+ components: { ExternalLinks, VIcon },
483
+ setup() {
484
+ const items = [
485
+ {
486
+ text: 'ameli.fr',
487
+ href: 'https://www.ameli.fr',
488
+ },
489
+ {
490
+ text: 'Github',
491
+ href: 'https://www.github.com',
492
+ },
493
+ {
494
+ text: 'Twitter',
495
+ href: 'https://www.twitter.com',
496
+ },
497
+ ]
498
+ const arrowIcon = mdiArrowTopRight
499
+ return { args, items, arrowIcon }
500
+ },
501
+ template: `
502
+ <ExternalLinks :items>
503
+ <template #link-icon>
504
+ <VIcon color="rgba(0, 0, 0, 0.5)">
505
+ {{ arrowIcon }}
506
+ </VIcon>
507
+ </template>
508
+ </ExternalLinks>
509
+ `,
510
+ }
511
+ },
512
+ parameters: {
513
+ sourceCode: [
514
+ {
515
+ name: 'Template',
516
+ code: `
517
+ <ExternalLinks :items>
518
+ <template #link-icon>
519
+ <VIcon color="rgba(0, 0, 0, 0.5)">
520
+ {{ arrowIcon }}
521
+ </VIcon>
522
+ </template>
523
+ </ExternalLinks>
524
+ `,
525
+ },
526
+ {
527
+ name: 'Script',
528
+ code: `
529
+ import { ExternalLinks } from '@cnamts/synapse'
530
+ import { VIcon } from 'vuetify/components'
531
+ import { mdiArrowTopRight } from '@mdi/js'
532
+
533
+ const items = [
534
+ {
535
+ text: 'ameli.fr',
536
+ href: 'https://www.ameli.fr',
537
+ },
538
+ {
539
+ text: 'Github',
540
+ href: 'https://www.github.com',
541
+ },
542
+ {
543
+ text: 'Twitter',
544
+ href: 'https://www.twitter.com',
545
+ },
546
+ ]
547
+
548
+ const arrowIcon = mdiArrowTopRight
549
+ `,
550
+ },
551
+ ],
552
+ },
553
+ }