@cnamts/synapse 0.0.6-alpha → 0.0.7-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 (36) hide show
  1. package/dist/design-system-v3.d.ts +8 -6
  2. package/dist/design-system-v3.js +19 -16
  3. package/dist/design-system-v3.umd.cjs +4 -4
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/components/BackBtn/BackBtn.stories.ts +4 -1
  7. package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +3 -3
  8. package/src/components/CookieBanner/CookieBanner.stories.ts +2 -0
  9. package/src/components/CopyBtn/CopyBtn.stories.ts +5 -2
  10. package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +11 -51
  11. package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +4 -1
  12. package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +19 -7
  13. package/src/components/Customs/SySelect/SySelect.mdx +1 -2
  14. package/src/components/Customs/SySelect/SySelect.stories.ts +0 -2
  15. package/src/components/DownloadBtn/DownloadBtn.mdx +3 -4
  16. package/src/components/DownloadBtn/DownloadBtn.stories.ts +20 -21
  17. package/src/components/ErrorPage/ErrorPage.vue +1 -1
  18. package/src/components/FooterBar/FooterBar.vue +6 -2
  19. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +2 -1
  20. package/src/components/HeaderBar/HeaderBar.stories.ts +19 -12
  21. package/src/components/HeaderBar/HeaderBar.vue +8 -3
  22. package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +1 -0
  23. package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +104 -32
  24. package/src/components/HeaderToolbar/HeaderToolbar.vue +23 -1
  25. package/src/components/NirField/NirField.mdx +1 -4
  26. package/src/components/NirField/NirField.stories.ts +65 -12
  27. package/src/components/NirField/NirField.vue +5 -2
  28. package/src/components/NirField/tests/NirField.spec.ts +1 -0
  29. package/src/components/PageContainer/PageContainer.stories.ts +5 -5
  30. package/src/components/PageContainer/PageContainer.vue +9 -4
  31. package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
  32. package/src/components/SocialMediaLinks/SocialMediaLinks.vue +7 -1
  33. package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
  34. package/src/components/SubHeader/SubHeader.stories.ts +6 -3
  35. package/src/components/SyAlert/SyAlert.vue +7 -0
  36. package/src/components/index.ts +1 -0
@@ -1,13 +1,13 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3'
2
2
 
3
- import HeaderNavbar from './HeaderNavigationBar.vue'
3
+ import HeaderNavigationBar from './HeaderNavigationBar.vue'
4
4
  import { VBtn } from 'vuetify/components'
5
5
  import BackBtn from '../BackBtn/BackBtn.vue'
6
6
  import { fn } from '@storybook/test'
7
7
 
8
8
  const meta = {
9
9
  title: 'Composants/Structure/HeaderBar/HeaderNavigationBar',
10
- component: HeaderNavbar,
10
+ component: HeaderNavigationBar,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
13
13
  },
@@ -248,7 +248,7 @@ const meta = {
248
248
  },
249
249
  },
250
250
  },
251
- } satisfies Meta<typeof HeaderNavbar>
251
+ } satisfies Meta<typeof HeaderNavigationBar>
252
252
 
253
253
  export default meta
254
254
 
@@ -272,7 +272,7 @@ export const Default: Story = {
272
272
  {
273
273
  name: 'Template',
274
274
  code: `
275
- <HeaderNavbar
275
+ <HeaderNavigationBar
276
276
  :items="[
277
277
  { label: 'Home', href: '' },
278
278
  { label: 'About', href: '' },
@@ -280,6 +280,14 @@ export const Default: Story = {
280
280
  />
281
281
  `,
282
282
  },
283
+ {
284
+ name: 'Script',
285
+ code: `
286
+ <script setup lang="ts">
287
+ import { HeaderNavigationBar } from '@cnamts/synapse'
288
+ </script>
289
+ `,
290
+ },
283
291
  ],
284
292
  },
285
293
  }
@@ -313,7 +321,7 @@ export const WithScroll: Story = {
313
321
  {
314
322
  name: 'Template',
315
323
  code: `<template>
316
- <HeaderNavbar
324
+ <HeaderNavigationBar
317
325
  :items="[
318
326
  { label: 'Home', href: '' },
319
327
  { label: 'About', href: '' },
@@ -325,6 +333,14 @@ export const WithScroll: Story = {
325
333
  </template>
326
334
  `,
327
335
  },
336
+ {
337
+ name: 'Script',
338
+ code: `
339
+ <script setup lang="ts">
340
+ import { HeaderNavigationBar } from '@cnamts/synapse'
341
+ </script>
342
+ `,
343
+ },
328
344
  ],
329
345
  },
330
346
  }
@@ -371,7 +387,7 @@ export const WithManyItems: Story = {
371
387
  {
372
388
  name: 'Template',
373
389
  code: `
374
- <HeaderNavbar
390
+ <HeaderNavigationBar
375
391
  :items="[
376
392
  {
377
393
  label: 'Home',
@@ -409,6 +425,14 @@ export const WithManyItems: Story = {
409
425
  />
410
426
  `,
411
427
  },
428
+ {
429
+ name: 'Script',
430
+ code: `
431
+ <script setup lang="ts">
432
+ import { HeaderNavigationBar } from '@cnamts/synapse'
433
+ </script>
434
+ `,
435
+ },
412
436
  ],
413
437
  },
414
438
  }
@@ -419,12 +443,12 @@ export const WithSlots: Story = {
419
443
  },
420
444
  render: (args) => {
421
445
  return {
422
- components: { HeaderNavbar, VBtn, BackBtn },
446
+ components: { HeaderNavigationBar, VBtn, BackBtn },
423
447
  setup() {
424
448
  return { args }
425
449
  },
426
450
  template: `
427
- <HeaderNavbar v-bind="args">
451
+ <HeaderNavigationBar v-bind="args">
428
452
  <template #logo-brand-content>
429
453
  <svg
430
454
  width="22"
@@ -468,7 +492,7 @@ export const WithSlots: Story = {
468
492
  Besoin d’aide ?
469
493
  </VBtn>
470
494
  </template>
471
- </HeaderNavbar>
495
+ </HeaderNavigationBar>
472
496
  `,
473
497
  }
474
498
  },
@@ -477,7 +501,7 @@ export const WithSlots: Story = {
477
501
  {
478
502
  name: 'Template',
479
503
  code: `<template>
480
- <HeaderNavbar>
504
+ <HeaderNavigationBar>
481
505
  <template #logo-brand-content>
482
506
  <svg
483
507
  width="22"
@@ -521,10 +545,18 @@ export const WithSlots: Story = {
521
545
  Besoin d’aide ?
522
546
  </VBtn>
523
547
  </template>
524
- </HeaderNavbar>
548
+ </HeaderNavigationBar>
525
549
  </template>
526
550
  `,
527
551
  },
552
+ {
553
+ name: 'Script',
554
+ code: `
555
+ <script setup lang="ts">
556
+ import { HeaderNavigationBar } from '@cnamts/synapse'
557
+ </script>
558
+ `,
559
+ },
528
560
  ],
529
561
  },
530
562
  }
@@ -535,12 +567,12 @@ export const WithLogoSlot: Story = {
535
567
  },
536
568
  render: (args) => {
537
569
  return {
538
- components: { HeaderNavbar, VBtn, BackBtn },
570
+ components: { HeaderNavigationBar, VBtn, BackBtn },
539
571
  setup() {
540
572
  return { args }
541
573
  },
542
574
  template: `
543
- <HeaderNavbar v-bind="args">
575
+ <HeaderNavigationBar v-bind="args">
544
576
  <template #logo-brand-content>
545
577
  <svg
546
578
  width="22"
@@ -561,7 +593,7 @@ export const WithLogoSlot: Story = {
561
593
  height="52px"
562
594
  />
563
595
  </template>
564
- </HeaderNavbar>
596
+ </HeaderNavigationBar>
565
597
  `,
566
598
  }
567
599
  },
@@ -570,7 +602,7 @@ export const WithLogoSlot: Story = {
570
602
  {
571
603
  name: 'Template',
572
604
  code: `
573
- <HeaderNavbar>
605
+ <HeaderNavigationBar>
574
606
  <template #logo-brand-content>
575
607
  <svg
576
608
  width="22"
@@ -591,7 +623,15 @@ export const WithLogoSlot: Story = {
591
623
  height="52px"
592
624
  />
593
625
  </template>
594
- </HeaderNavbar>
626
+ </HeaderNavigationBar>
627
+ `,
628
+ },
629
+ {
630
+ name: 'Script',
631
+ code: `
632
+ <script setup lang="ts">
633
+ import { HeaderNavigationBar } from '@cnamts/synapse'
634
+ </script>
595
635
  `,
596
636
  },
597
637
  ],
@@ -605,19 +645,19 @@ export const WithNavigationBarPrependSlot: Story = {
605
645
  },
606
646
  render: (args) => {
607
647
  return {
608
- components: { HeaderNavbar, VBtn, BackBtn },
648
+ components: { HeaderNavigationBar, VBtn, BackBtn },
609
649
  setup() {
610
650
  return { args }
611
651
  },
612
652
  template: `
613
- <HeaderNavbar v-bind="args" v-model="args.burgerMenu">
653
+ <HeaderNavigationBar v-bind="args" v-model="args.burgerMenu">
614
654
  <template #navigation-bar-prepend>
615
655
  <BackBtn
616
656
  :dark="true"
617
657
  class="mr-4"
618
658
  />
619
659
  </template>
620
- </HeaderNavbar>
660
+ </HeaderNavigationBar>
621
661
  `,
622
662
  }
623
663
  },
@@ -626,14 +666,22 @@ export const WithNavigationBarPrependSlot: Story = {
626
666
  {
627
667
  name: 'Template',
628
668
  code: `
629
- <HeaderNavbar>
669
+ <HeaderNavigationBar>
630
670
  <template #navigation-bar-prepend>
631
671
  <BackBtn
632
672
  :dark="true"
633
673
  class="mr-4"
634
674
  />
635
675
  </template>
636
- </HeaderNavbar>
676
+ </HeaderNavigationBar>
677
+ `,
678
+ },
679
+ {
680
+ name: 'Script',
681
+ code: `
682
+ <script setup lang="ts">
683
+ import { HeaderNavigationBar } from '@cnamts/synapse'
684
+ </script>
637
685
  `,
638
686
  },
639
687
  ],
@@ -646,12 +694,12 @@ export const WithNavigationBarAppendSlot: Story = {
646
694
  },
647
695
  render: (args) => {
648
696
  return {
649
- components: { HeaderNavbar, VBtn, BackBtn },
697
+ components: { HeaderNavigationBar, VBtn, BackBtn },
650
698
  setup() {
651
699
  return { args }
652
700
  },
653
701
  template: `
654
- <HeaderNavbar v-bind="args">
702
+ <HeaderNavigationBar v-bind="args">
655
703
  <template #navigation-bar-append>
656
704
  <VBtn
657
705
  variant="tonal"
@@ -660,7 +708,7 @@ export const WithNavigationBarAppendSlot: Story = {
660
708
  Besoin d’aide ?
661
709
  </VBtn>
662
710
  </template>
663
- </HeaderNavbar>
711
+ </HeaderNavigationBar>
664
712
  `,
665
713
  }
666
714
  },
@@ -670,7 +718,7 @@ export const WithNavigationBarAppendSlot: Story = {
670
718
  name: 'Template',
671
719
  code: `
672
720
  <template>
673
- <HeaderNavbar>
721
+ <HeaderNavigationBar>
674
722
  <template #navigation-bar-append>
675
723
  <VBtn
676
724
  variant="tonal"
@@ -679,10 +727,18 @@ export const WithNavigationBarAppendSlot: Story = {
679
727
  Besoin d’aide ?
680
728
  </VBtn>
681
729
  </template>
682
- </HeaderNavbar>
730
+ </HeaderNavigationBar>
683
731
  </template>
684
732
  `,
685
733
  },
734
+ {
735
+ name: 'Script',
736
+ code: `
737
+ <script setup lang="ts">
738
+ import { HeaderNavigationBar } from '@cnamts/synapse'
739
+ </script>
740
+ `,
741
+ },
686
742
  ],
687
743
  },
688
744
  }
@@ -695,12 +751,12 @@ export const WithNavigationMenuAppendSlot: Story = {
695
751
  },
696
752
  render: (args) => {
697
753
  return {
698
- components: { HeaderNavbar, VBtn, BackBtn },
754
+ components: { HeaderNavigationBar, VBtn, BackBtn },
699
755
  setup() {
700
756
  return { args }
701
757
  },
702
758
  template: `
703
- <HeaderNavbar
759
+ <HeaderNavigationBar
704
760
  v-bind="args"
705
761
  v-model="args.burgerMenu"
706
762
  @update:burgerMenu="()=>{
@@ -717,7 +773,7 @@ export const WithNavigationMenuAppendSlot: Story = {
717
773
  Besoin d’aide ?
718
774
  </VBtn>
719
775
  </template>
720
- </HeaderNavbar>
776
+ </HeaderNavigationBar>
721
777
  <div style="height: 200px;"></div>
722
778
  `,
723
779
  }
@@ -728,7 +784,7 @@ export const WithNavigationMenuAppendSlot: Story = {
728
784
  name: 'Template',
729
785
  code: `
730
786
  <template>
731
- <HeaderNavbar
787
+ <HeaderNavigationBar
732
788
  maxHorizontalMenuItems="0"
733
789
  :items="[
734
790
  { label: 'Home', href: '' },
@@ -744,10 +800,18 @@ export const WithNavigationMenuAppendSlot: Story = {
744
800
  Besoin d’aide ?
745
801
  </VBtn>
746
802
  </template>
747
- </HeaderNavbar>
803
+ </HeaderNavigationBar>
748
804
  </template>
749
805
  `,
750
806
  },
807
+ {
808
+ name: 'Script',
809
+ code: `
810
+ <script setup lang="ts">
811
+ import { HeaderNavigationBar } from '@cnamts/synapse'
812
+ </script>
813
+ `,
814
+ },
751
815
  ],
752
816
  },
753
817
  }
@@ -766,7 +830,7 @@ export const WithVuetifyOptions: Story = {
766
830
  {
767
831
  name: 'Template',
768
832
  code: `
769
- <HeaderNavbar
833
+ <HeaderNavigationBar
770
834
  :items="[
771
835
  { label: 'Home', href: '' },
772
836
  { label: 'About', href: '' },
@@ -779,6 +843,14 @@ export const WithVuetifyOptions: Story = {
779
843
  />
780
844
  `,
781
845
  },
846
+ {
847
+ name: 'Script',
848
+ code: `
849
+ <script setup lang="ts">
850
+ import { HeaderNavigationBar } from '@cnamts/synapse'
851
+ </script>
852
+ `,
853
+ },
782
854
  ],
783
855
  },
784
856
  }
@@ -347,6 +347,20 @@
347
347
  font-size: 12px;
348
348
  }
349
349
  }
350
+
351
+ :deep(.sy-input-select) {
352
+ width: 100%;
353
+ display: flex;
354
+ justify-content: space-between;
355
+ @media (max-width: 768px) {
356
+ font-size: 12px;
357
+ span {
358
+ overflow: hidden;
359
+ white-space: nowrap;
360
+ text-overflow: ellipsis;
361
+ }
362
+ }
363
+ }
350
364
  }
351
365
 
352
366
  #left-menu {
@@ -368,11 +382,19 @@
368
382
  }
369
383
 
370
384
  li:nth-child(2) {
371
- min-width: 260px;
372
385
  z-index: 2;
386
+ max-height: 44px;
387
+ min-width: 260px;
373
388
  @media (max-width: 768px) {
389
+ max-height: 38px;
374
390
  min-width: 152px;
375
391
  }
392
+ a {
393
+ max-height: 44px;
394
+ @media (max-width: 768px) {
395
+ max-height: 38px;
396
+ }
397
+ }
376
398
  }
377
399
 
378
400
  li:nth-child(3) {
@@ -45,13 +45,10 @@ Le composant `NirField` est utilisé pour afficher un champ de saisie de numéro
45
45
  class="mx-16 my-6"
46
46
  @submit.prevent="handleSubmit"
47
47
  >
48
- <Nirfield
48
+ <NirField
49
49
  ref="nirFieldRef"
50
50
  v-model="model"
51
51
  :display-key="true"
52
- key-tooltip="message d'aide pour la clef"
53
- nir-tooltip="message d'aide pour le NIR"
54
- outlined
55
52
  required
56
53
  />
57
54
  <button type="submit">
@@ -90,6 +90,16 @@ const meta = {
90
90
  },
91
91
  },
92
92
  },
93
+ showSuccessMessages: {
94
+ description: 'Indique si les messages de succès sont affichés.',
95
+ control: 'boolean',
96
+ default: false,
97
+ table: {
98
+ type: {
99
+ summary: 'boolean',
100
+ },
101
+ },
102
+ },
93
103
  customNumberRules: {
94
104
  description: 'Règles de validation personnalisées pour le champ numéro.',
95
105
  control: 'object',
@@ -131,8 +141,7 @@ export const Default: Story = {
131
141
  code: `
132
142
  <template>
133
143
  <NirField
134
- modelValue=""
135
- :outlined="true"
144
+ v-model="value"
136
145
  :required="false"
137
146
  numberLabel="Numéro de sécurité sociale"
138
147
  keyLabel="Clé"
@@ -146,6 +155,9 @@ export const Default: Story = {
146
155
  code: `
147
156
  <script setup lang="ts">
148
157
  import NirField from './NirField.vue'
158
+ import { ref } from 'vue'
159
+
160
+ const value = ref('')
149
161
  </script>
150
162
  `,
151
163
  },
@@ -166,8 +178,7 @@ export const Required: Story = {
166
178
  code: `
167
179
  <template>
168
180
  <NirField
169
- modelValue=""
170
- :outlined="true"
181
+ v-model="value"
171
182
  :required="true"
172
183
  numberLabel="Numéro de sécurité sociale"
173
184
  keyLabel="Clé"
@@ -181,6 +192,9 @@ export const Required: Story = {
181
192
  code: `
182
193
  <script setup lang="ts">
183
194
  import NirField from './NirField.vue'
195
+ import { ref } from 'vue'
196
+
197
+ const value = ref('')
184
198
  </script>
185
199
  `,
186
200
  },
@@ -201,8 +215,7 @@ export const WithoutKey: Story = {
201
215
  code: `
202
216
  <template>
203
217
  <NirField
204
- modelValue=""
205
- :outlined="true"
218
+ v-model="value"
206
219
  :required="false"
207
220
  numberLabel="Numéro de sécurité sociale"
208
221
  keyLabel="Clé"
@@ -216,6 +229,46 @@ export const WithoutKey: Story = {
216
229
  code: `
217
230
  <script setup lang="ts">
218
231
  import NirField from './NirField.vue'
232
+ import { ref } from 'vue'
233
+
234
+ const value = ref('')
235
+ </script>
236
+ `,
237
+ },
238
+ ],
239
+ },
240
+ }
241
+
242
+ export const WithSuccessMessages: Story = {
243
+ args: {
244
+ ...Default.args,
245
+ showSuccessMessages: true,
246
+ },
247
+ parameters: {
248
+ ...Default.parameters,
249
+ sourceCode: [
250
+ {
251
+ name: 'Template',
252
+ code: `
253
+ <template>
254
+ <NirField
255
+ v-model="value"
256
+ :required="false"
257
+ numberLabel="Numéro de sécurité sociale"
258
+ keyLabel="Clé"
259
+ :showSuccessMessages="true"
260
+ />
261
+ </template>
262
+ `,
263
+ },
264
+ {
265
+ name: 'Script',
266
+ code: `
267
+ <script setup lang="ts">
268
+ import NirField from './NirField.vue'
269
+ import { ref } from 'vue'
270
+
271
+ const value = ref('')
219
272
  </script>
220
273
  `,
221
274
  },
@@ -256,8 +309,7 @@ export const CustomRules: Story = {
256
309
  code: `
257
310
  <template>
258
311
  <NirField
259
- modelValue=""
260
- :outlined="true"
312
+ v-model="value"
261
313
  :required="false"
262
314
  numberLabel="Numéro de sécurité sociale"
263
315
  keyLabel="Clé"
@@ -273,6 +325,9 @@ export const CustomRules: Story = {
273
325
  code: `
274
326
  <script setup lang="ts">
275
327
  import NirField from './NirField.vue'
328
+ import { ref } from 'vue'
329
+
330
+ const value = ref('')
276
331
  </script>
277
332
  `,
278
333
  },
@@ -293,8 +348,7 @@ export const WithNumberTooltip: Story = {
293
348
  code: `
294
349
  <template>
295
350
  <NirField
296
- modelValue=""
297
- :outlined="true"
351
+ v-model="value"
298
352
  :required="false"
299
353
  numberLabel="Numéro de sécurité sociale"
300
354
  keyLabel="Clé"
@@ -332,8 +386,7 @@ export const WithKeyTooltip: Story = {
332
386
  code: `
333
387
  <template>
334
388
  <NirField
335
- modelValue=""
336
- :outlined="true"
389
+ v-model="value"
337
390
  :required="false"
338
391
  numberLabel="Numéro de sécurité sociale"
339
392
  keyLabel="Clé"
@@ -20,6 +20,7 @@
20
20
  numberLabel?: string
21
21
  keyLabel?: string
22
22
  displayKey?: boolean
23
+ showSuccessMessages?: boolean
23
24
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
24
25
  customNumberRules?: any
25
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
@@ -33,6 +34,7 @@
33
34
  numberLabel: 'Numéro de sécurité sociale',
34
35
  keyLabel: 'Clé',
35
36
  displayKey: true,
37
+ showSuccessMessages: false,
36
38
  customNumberRules: [],
37
39
  customKeyRules: [],
38
40
  })
@@ -239,18 +241,19 @@
239
241
  validateOnSubmit,
240
242
  })
241
243
  </script>
244
+
242
245
  <template>
243
246
  <div class="d-flex align-start">
244
247
  <v-input
245
248
  ref="vInput"
246
249
  :class="{
247
- 'v-messages__message--success': successes.length > 0,
250
+ 'v-messages__message--success': successes.length > 0 && props.showSuccessMessages,
248
251
  'v-messages__message--error': errors.length > 0
249
252
  }"
250
253
  :error-messages="errors"
251
254
  :label="numberLabel"
252
255
  :max-errors="3"
253
- :messages="successes"
256
+ :messages="props.showSuccessMessages ? successes : []"
254
257
  :model-value="[numberValue, keyValue]"
255
258
  class="vd-nir-field__fields-wrapper multi-line"
256
259
  validate-on="blur lazy"
@@ -17,6 +17,7 @@ describe('NirField.vue', () => {
17
17
  props: {
18
18
  modelValue: '',
19
19
  required: true,
20
+ showSuccessMessages: true,
20
21
  },
21
22
  })
22
23
  })
@@ -11,12 +11,12 @@ const meta = {
11
11
  },
12
12
  argTypes: {
13
13
  size: {
14
- options: ['xl', 'l', 'm', 's'],
14
+ options: ['xl', 'lg', 'md', 'sm', 'xs'],
15
15
  control: { type: 'select' },
16
- default: 'xl',
16
+ default: undefined,
17
17
  },
18
18
  spacing: {
19
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
19
+ options: ['xl', 'lg', 'md', 'sm', 'xs'],
20
20
  control: { type: 'select' },
21
21
  default: undefined,
22
22
  },
@@ -77,7 +77,7 @@ export const Size: Story = {
77
77
  {
78
78
  name: 'Template',
79
79
  code: `<template>
80
- <PageContainer size="s">
80
+ <PageContainer size="sm">
81
81
  Contenu de la page
82
82
  </PageContainer>
83
83
  </template>
@@ -94,7 +94,7 @@ export const Size: Story = {
94
94
  },
95
95
  args: {
96
96
  default: 'Contenu de la page',
97
- size: 's',
97
+ size: 'sm',
98
98
  },
99
99
  render: (args) => {
100
100
  return {
@@ -3,11 +3,11 @@
3
3
  import { useDisplay } from 'vuetify'
4
4
 
5
5
  const props = withDefaults(defineProps<{
6
- size?: 'xl' | 'l' | 'm' | 's'
7
- spacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
6
+ size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
7
+ spacing?: 'xl' | 'lg' | 'md' | 'sm' | 'xs'
8
8
  color?: string
9
9
  }>(), {
10
- size: 'xl',
10
+ size: undefined,
11
11
  spacing: undefined,
12
12
  color: 'transparent',
13
13
  })
@@ -38,7 +38,12 @@
38
38
  })
39
39
 
40
40
  const containerSize = computed(() => {
41
- return sizeMapping[display.name.value] ?? sizeMapping[props.size ?? 'xl']
41
+ if (props.size) {
42
+ return sizeMapping[props.size]
43
+ }
44
+ else {
45
+ return sizeMapping[display.name.value] ?? sizeMapping['xl']
46
+ }
42
47
  })
43
48
 
44
49
  defineExpose({
@@ -44,7 +44,7 @@ describe('PageContainer', () => {
44
44
  it('containerSize computed property', async () => {
45
45
  const wrapper = mount(PageContainer, {
46
46
  props: {
47
- size: 'l',
47
+ size: 'md',
48
48
  },
49
49
  global: {
50
50
  plugins: [vuetify],