@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
@@ -0,0 +1,96 @@
1
+ import { mount } from '@vue/test-utils'
2
+ import PasswordField from '../PasswordField.vue'
3
+ import { describe, it, expect, beforeEach } from 'vitest'
4
+ import { createVuetify } from 'vuetify'
5
+
6
+ // 1. Define an interface for the properties/methods you're testing
7
+ interface PasswordFieldVM {
8
+ showEyeIcon: boolean
9
+ errors: string[]
10
+ isValidating: boolean
11
+ validateOnSubmit: () => boolean
12
+ }
13
+
14
+ describe('PasswordField.vue', () => {
15
+ let vuetify
16
+
17
+ beforeEach(() => {
18
+ vuetify = createVuetify()
19
+ })
20
+
21
+ it('renders the password field', () => {
22
+ const wrapper = mount(PasswordField, {
23
+ global: {
24
+ plugins: [vuetify],
25
+ },
26
+ })
27
+ expect(wrapper.exists()).toBe(true)
28
+ })
29
+
30
+ it('toggles password visibility', async () => {
31
+ const wrapper = mount(PasswordField, {
32
+ global: {
33
+ plugins: [vuetify],
34
+ },
35
+ })
36
+ // 2. Cast wrapper.vm as your interface
37
+ const vm = wrapper.vm as unknown as PasswordFieldVM
38
+
39
+ const button = wrapper.find('button')
40
+ expect(vm.showEyeIcon).toBe(false) // from your interface
41
+ await button.trigger('click')
42
+ expect(vm.showEyeIcon).toBe(true)
43
+ await button.trigger('click')
44
+ expect(vm.showEyeIcon).toBe(false)
45
+ })
46
+
47
+ it('emits update:modelValue event on input', async () => {
48
+ const wrapper = mount(PasswordField, {
49
+ global: {
50
+ plugins: [vuetify],
51
+ },
52
+ })
53
+ const input = wrapper.find('input')
54
+ await input.setValue('new-password')
55
+ expect(wrapper.emitted()['update:modelValue'][0]).toEqual(['new-password'])
56
+ })
57
+
58
+ it('validates the password field on blur', async () => {
59
+ const wrapper = mount(PasswordField, {
60
+ global: {
61
+ plugins: [vuetify],
62
+ },
63
+ props: {
64
+ required: true,
65
+ },
66
+ })
67
+ const vm = wrapper.vm as unknown as PasswordFieldVM
68
+
69
+ const input = wrapper.find('input')
70
+ await input.trigger('blur')
71
+ expect(vm.errors).toContain('Le mot de passe est requis.')
72
+ })
73
+
74
+ it('validates fields on submit and sets validating flag', async () => {
75
+ const wrapper = mount(PasswordField, {
76
+ global: {
77
+ plugins: [vuetify],
78
+ },
79
+ props: {
80
+ modelValue: '',
81
+ outlined: false,
82
+ required: true,
83
+ },
84
+ })
85
+ const vm = wrapper.vm as unknown as PasswordFieldVM
86
+
87
+ const result = vm.validateOnSubmit()
88
+ expect(vm.isValidating).toBe(true)
89
+ expect(result).toBe(false)
90
+
91
+ // This awaits the Vue microtask queue to let any reactive data settle
92
+ await wrapper.vm.$nextTick()
93
+
94
+ expect(vm.errors).toContain('Le mot de passe est requis.')
95
+ })
96
+ })
@@ -41,8 +41,6 @@ const customIndicatifs = ref([
41
41
  display-format="code-abbreviation"
42
42
  :custom-indicatifs="customIndicatifs"
43
43
  :use-custom-indicatifs-only="true"
44
- outlined
45
- outlined-indicatif
46
44
  @change="handleChange"
47
45
  />
48
46
  </template>
@@ -47,8 +47,6 @@ export const Default: Story = {
47
47
  <PhoneField
48
48
  v-model="modelValue"
49
49
  :required="required"
50
- :outlined="outlined"
51
- :outlinedIndicatif="outlinedIndicatif"
52
50
  :withCountryCode="withCountryCode"
53
51
  :countryCodeRequired="countryCodeRequired"
54
52
  :displayFormat="displayFormat"
@@ -63,12 +61,10 @@ export const Default: Story = {
63
61
  name: 'Script',
64
62
  code: `
65
63
  <script setup lang="ts">
66
- import PhoneField from '@cnamts/PhoneField'
64
+ import { PhoneField } from '@cnamts/synapse'
67
65
 
68
66
  const modelValue = ref('')
69
67
  const required = ref(true)
70
- const outlined = ref(true)
71
- const outlinedIndicatif = ref(true)
72
68
  const withCountryCode = ref(true)
73
69
  const countryCodeRequired = ref(true)
74
70
  const displayFormat = ref('code')
@@ -129,8 +125,6 @@ export const Required: Story = {
129
125
  <PhoneField
130
126
  v-model="modelValue"
131
127
  :required="required"
132
- :outlined="outlined"
133
- :outlinedIndicatif="outlinedIndicatif"
134
128
  :withCountryCode="withCountryCode"
135
129
  :countryCodeRequired="countryCodeRequired"
136
130
  :displayFormat="displayFormat"
@@ -145,12 +139,10 @@ export const Required: Story = {
145
139
  name: 'Script',
146
140
  code: `
147
141
  <script setup lang="ts">
148
- import PhoneField from '@cnamts/PhoneField'
142
+ import { PhoneField } from '@cnamts/synapse'
149
143
 
150
144
  const modelValue = ref('')
151
145
  const required = ref(true)
152
- const outlined = ref(true)
153
- const outlinedIndicatif = ref(true)
154
146
  const withCountryCode = ref(true)
155
147
  const countryCodeRequired = ref(true)
156
148
  const displayFormat = ref('code')
@@ -210,8 +202,6 @@ export const CustomIndicatifs: Story = {
210
202
  <PhoneField
211
203
  v-model="modelValue"
212
204
  :required="required"
213
- :outlined="outlined"
214
- :outlinedIndicatif="outlinedIndicatif"
215
205
  :withCountryCode="withCountryCode"
216
206
  :countryCodeRequired="countryCodeRequired"
217
207
  :displayFormat="displayFormat"
@@ -226,12 +216,10 @@ export const CustomIndicatifs: Story = {
226
216
  name: 'Script',
227
217
  code: `
228
218
  <script setup lang="ts">
229
- import PhoneField from '@cnamts/PhoneField'
219
+ import { PhoneField } from '@cnamts/synapse'
230
220
 
231
221
  const modelValue = ref('')
232
222
  const required = ref(true)
233
- const outlined = ref(true)
234
- const outlinedIndicatif = ref(true)
235
223
  const withCountryCode = ref(true)
236
224
  const countryCodeRequired = ref(true)
237
225
  const displayFormat = ref('code')
@@ -301,8 +289,6 @@ export const NotValidatedOnBlur: Story = {
301
289
  <PhoneField
302
290
  v-model="modelValue"
303
291
  :required="required"
304
- :outlined="outlined"
305
- :outlinedIndicatif="outlinedIndicatif"
306
292
  :withCountryCode="withCountryCode"
307
293
  :countryCodeRequired="countryCodeRequired"
308
294
  :displayFormat="displayFormat"
@@ -317,12 +303,10 @@ export const NotValidatedOnBlur: Story = {
317
303
  name: 'Script',
318
304
  code: `
319
305
  <script setup lang="ts">
320
- import PhoneField from '@cnamts/PhoneField'
306
+ import { PhoneField } from '@cnamts/synapse'
321
307
 
322
308
  const modelValue = ref('')
323
309
  const required = ref(true)
324
- const outlined = ref(true)
325
- const outlinedIndicatif = ref(true)
326
310
  const withCountryCode = ref(true)
327
311
  const countryCodeRequired = ref(true)
328
312
  const displayFormat = ref('code')
@@ -382,8 +366,6 @@ export const DisplayFormatCode: Story = {
382
366
  <PhoneField
383
367
  v-model="modelValue"
384
368
  :required="required"
385
- :outlined="outlined"
386
- :outlinedIndicatif="outlinedIndicatif"
387
369
  :withCountryCode="withCountryCode"
388
370
  :countryCodeRequired="countryCodeRequired"
389
371
  :displayFormat="displayFormat"
@@ -398,12 +380,10 @@ export const DisplayFormatCode: Story = {
398
380
  name: 'Script',
399
381
  code: `
400
382
  <script setup lang="ts">
401
- import PhoneField from '@cnamts/PhoneField'
383
+ import { PhoneField } from '@cnamts/synapse'
402
384
 
403
385
  const modelValue = ref('')
404
386
  const required = ref(true)
405
- const outlined = ref(true)
406
- const outlinedIndicatif = ref(true)
407
387
  const withCountryCode = ref(true)
408
388
  const countryCodeRequired = ref(true)
409
389
  const displayFormat = ref('code')
@@ -463,8 +443,6 @@ export const DisplayFormatCodeAbbreviation: Story = {
463
443
  <PhoneField
464
444
  v-model="modelValue"
465
445
  :required="required"
466
- :outlined="outlined"
467
- :outlinedIndicatif="outlinedIndicatif"
468
446
  :withCountryCode="withCountryCode"
469
447
  :countryCodeRequired="countryCodeRequired"
470
448
  :displayFormat="displayFormat"
@@ -479,12 +457,10 @@ export const DisplayFormatCodeAbbreviation: Story = {
479
457
  name: 'Script',
480
458
  code: `
481
459
  <script setup lang="ts">
482
- import PhoneField from '@cnamts/PhoneField'
460
+ import { PhoneField } from '@cnamts/synapse'
483
461
 
484
462
  const modelValue = ref('')
485
463
  const required = ref(true)
486
- const outlined = ref(true)
487
- const outlinedIndicatif = ref(true)
488
464
  const withCountryCode = ref(true)
489
465
  const countryCodeRequired = ref(true)
490
466
  const displayFormat = ref('code-abbreviation')
@@ -544,8 +520,6 @@ export const DisplayFormatCodeCountry: Story = {
544
520
  <PhoneField
545
521
  v-model="modelValue"
546
522
  :required="required"
547
- :outlined="outlined"
548
- :outlinedIndicatif="outlinedIndicatif"
549
523
  :withCountryCode="withCountryCode"
550
524
  :countryCodeRequired="countryCodeRequired"
551
525
  :displayFormat="displayFormat"
@@ -560,12 +534,10 @@ export const DisplayFormatCodeCountry: Story = {
560
534
  name: 'Script',
561
535
  code: `
562
536
  <script setup lang="ts">
563
- import PhoneField from '@cnamts/PhoneField'
537
+ import { PhoneField } from '@cnamts/synapse'
564
538
 
565
539
  const modelValue = ref('')
566
540
  const required = ref(true)
567
- const outlined = ref(true)
568
- const outlinedIndicatif = ref(true)
569
541
  const withCountryCode = ref(true)
570
542
  const countryCodeRequired = ref(true)
571
543
  const displayFormat = ref('code-country')
@@ -625,8 +597,6 @@ export const DisplayFormatCountry: Story = {
625
597
  <PhoneField
626
598
  v-model="modelValue"
627
599
  :required="required"
628
- :outlined="outlined"
629
- :outlinedIndicatif="outlinedIndicatif"
630
600
  :withCountryCode="withCountryCode"
631
601
  :countryCodeRequired="countryCodeRequired"
632
602
  :displayFormat="displayFormat"
@@ -641,12 +611,10 @@ export const DisplayFormatCountry: Story = {
641
611
  name: 'Script',
642
612
  code: `
643
613
  <script setup lang="ts">
644
- import PhoneField from '@cnamts/PhoneField'
614
+ import { PhoneField } from '@cnamts/synapse'
645
615
 
646
616
  const modelValue = ref('')
647
617
  const required = ref(true)
648
- const outlined = ref(true)
649
- const outlinedIndicatif = ref(true)
650
618
  const withCountryCode = ref(true)
651
619
  const countryCodeRequired = ref(true)
652
620
  const displayFormat = ref('country')
@@ -706,8 +674,6 @@ export const DisplayFormatAbbreviation: Story = {
706
674
  <PhoneField
707
675
  v-model="modelValue"
708
676
  :required="required"
709
- :outlined="outlined"
710
- :outlinedIndicatif="outlinedIndicatif"
711
677
  :withCountryCode="withCountryCode"
712
678
  :countryCodeRequired="countryCodeRequired"
713
679
  :displayFormat="displayFormat"
@@ -722,12 +688,10 @@ export const DisplayFormatAbbreviation: Story = {
722
688
  name: 'Script',
723
689
  code: `
724
690
  <script setup lang="ts">
725
- import PhoneField from '@cnamts/PhoneField'
691
+ import { PhoneField } from '@cnamts/synapse'
726
692
 
727
693
  const modelValue = ref('')
728
694
  const required = ref(true)
729
- const outlined = ref(true)
730
- const outlinedIndicatif = ref(true)
731
695
  const withCountryCode = ref(true)
732
696
  const countryCodeRequired = ref(true)
733
697
  const displayFormat = ref('abbreviation')
@@ -791,8 +755,6 @@ export const DisplayModels: Story = {
791
755
  v-model="modelValue"
792
756
  v-model:selectedDialCode="selectedDialCode"
793
757
  :required="required"
794
- :outlined="outlined"
795
- :outlinedIndicatif="outlinedIndicatif"
796
758
  :withCountryCode="withCountryCode"
797
759
  :countryCodeRequired="countryCodeRequired"
798
760
  :displayFormat="displayFormat"
@@ -807,13 +769,11 @@ export const DisplayModels: Story = {
807
769
  name: 'Script',
808
770
  code: `
809
771
  <script setup lang="ts">
810
- import PhoneField from '@cnamts/PhoneField'
772
+ import { PhoneField } from '@cnamts/synapse'
811
773
 
812
774
  const modelValue = ref('')
813
775
  const selectedDialCode = ref('')
814
776
  const required = ref(true)
815
- const outlined = ref(true)
816
- const outlinedIndicatif = ref(true)
817
777
  const withCountryCode = ref(true)
818
778
  const countryCodeRequired = ref(true)
819
779
  const displayFormat = ref('code-country')
@@ -24,8 +24,8 @@
24
24
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
25
25
  dialCodeModel: { type: [String, Object] as PropType<string | Record<string, any>>, default: '' },
26
26
  required: { type: Boolean, default: false },
27
- outlined: { type: Boolean, default: false },
28
- outlinedIndicatif: { type: Boolean, default: false },
27
+ outlined: { type: Boolean, default: true },
28
+ outlinedIndicatif: { type: Boolean, default: true },
29
29
  withCountryCode: { type: Boolean, default: false },
30
30
  countryCodeRequired: { type: Boolean, default: false },
31
31
  displayFormat: { type: String as PropType<DisplayFormat>, default: 'code' },
@@ -163,7 +163,7 @@
163
163
  :label="locales.label"
164
164
  :variant="outlined ? 'outlined' : 'underlined'"
165
165
  color="primary"
166
- class="phoneField"
166
+ class="phone-field"
167
167
  @input="handlePhoneInput"
168
168
  @blur="validateInputOnBlur"
169
169
  >
@@ -184,46 +184,46 @@
184
184
 
185
185
  <style scoped>
186
186
  .phone-field-container {
187
- display: flex;
188
- flex-direction: column;
189
- align-items: flex-start;
190
- width: 100%;
187
+ display: flex;
188
+ flex-direction: column;
189
+ align-items: flex-start;
190
+ width: 100%;
191
191
  }
192
192
 
193
- .phoneField {
194
- width: 100%;
193
+ .phone-field {
194
+ width: 100%;
195
195
  }
196
196
 
197
197
  .custom-select {
198
- width: 30%;
198
+ width: 30%;
199
199
  }
200
200
 
201
- @media (min-width: 600px) {
202
- .phone-field-container {
203
- flex-direction: row;
204
- align-items: center;
205
- }
206
-
207
- .custom-select {
208
- margin-right: 1rem;
209
- margin-bottom: 0;
210
- min-width: 144px;
211
- }
212
-
213
- .phoneField {
214
- min-width: 350px;
215
- }
201
+ @media (width >= 600px) {
202
+ .phone-field-container {
203
+ flex-direction: row;
204
+ align-items: center;
205
+ }
206
+
207
+ .custom-select {
208
+ margin-right: 1rem;
209
+ margin-bottom: 0;
210
+ min-width: 144px;
211
+ }
212
+
213
+ .phone-field {
214
+ min-width: 350px;
215
+ }
216
216
  }
217
217
 
218
218
  :deep(.v-list) {
219
- position: absolute;
220
- left: inherit !important;
221
- background-color: white;
222
- max-height: 300px;
223
- padding: 0;
224
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
225
- border-radius: 4px;
226
- overflow-y: auto;
227
- z-index: 2;
219
+ position: absolute;
220
+ left: inherit !important;
221
+ background-color: white;
222
+ max-height: 300px;
223
+ padding: 0;
224
+ box-shadow: 0 2px 5px rgb(0 0 0 / 12%), 0 2px 10px rgb(0 0 0 / 8%);
225
+ border-radius: 4px;
226
+ overflow-y: auto;
227
+ z-index: 2;
228
228
  }
229
229
  </style>
@@ -63,17 +63,17 @@
63
63
  </template>
64
64
 
65
65
  <style lang="scss" scoped>
66
- @use '/src/assets/tokens.scss';
66
+ @use '/src/assets/tokens';
67
67
 
68
68
  .vd-skip-link {
69
- z-index: 150;
70
- position: fixed;
71
- top: 0;
72
- right: 0;
73
- transition: none;
74
- width: 100%;
75
- background: #fff;
76
- outline: none; // Disable outline to use border
77
- border: 2px solid tokens.$blue-darken-60;
69
+ z-index: 150;
70
+ position: fixed;
71
+ top: 0;
72
+ right: 0;
73
+ transition: none;
74
+ width: 100%;
75
+ background: #fff;
76
+ outline: none; // Disable outline to use border
77
+ border: 2px solid tokens.$blue-darken-60;
78
78
  }
79
79
  </style>
@@ -17,7 +17,7 @@
17
17
  {{ locales.followUs }}
18
18
  </span>
19
19
 
20
- <ul class="d-flex max-width-none">
20
+ <ul class="vd-social-media-links-content d-flex max-width-none">
21
21
  <li
22
22
  v-for="(social, index) in props.links"
23
23
  :key="index"
@@ -44,49 +44,57 @@
44
44
  </template>
45
45
 
46
46
  <style lang="scss" scoped>
47
- @use '@/assets/tokens.scss';
47
+ @use '@/assets/tokens';
48
48
 
49
49
  .vd-social-media-links {
50
- display: flex;
51
- flex-direction: column;
50
+ display: flex;
51
+ flex-direction: column;
52
52
  }
53
53
 
54
54
  li {
55
- list-style: none;
55
+ list-style: none;
56
56
  }
57
57
 
58
58
  .vd-social-media-links-label.text--primary {
59
- color: tokens.$blue-base;
60
- font-weight: 600;
59
+ color: tokens.$blue-base;
60
+ font-weight: 600;
61
61
  }
62
62
 
63
63
  .v-theme--dark .vd-social-media-links-label.text--primary {
64
- color: white;
64
+ color: white;
65
65
  }
66
66
 
67
67
  .vd-social-media-links-icon {
68
- color: tokens.$grey-base;
68
+ color: tokens.$grey-base;
69
69
  }
70
70
 
71
71
  .v-btn--icon {
72
- width: calc(var(--v-btn-height) + 5px);
73
- height: calc(var(--v-btn-height) + 5px);
74
- border: 0;
72
+ width: calc(var(--v-btn-height) + 5px);
73
+ height: calc(var(--v-btn-height) + 5px);
74
+ border: 0;
75
75
  }
76
76
 
77
77
  .v-theme--dark .v-btn--variant-text:hover :deep() {
78
- background: rgba(white, 0.1);
78
+ background: rgba(white, 0.1);
79
79
  }
80
80
 
81
- @media (min-width: 768px) {
82
- .vd-social-media-links-label {
83
- text-align: right;
84
- }
81
+ @media (width >= 768px) {
82
+ .vd-social-media-links-label {
83
+ text-align: right;
84
+ }
85
+
86
+ .vd-social-media-links-content {
87
+ justify-content: flex-end;
88
+ }
85
89
  }
86
90
 
87
- @media (max-width: 767px) {
88
- .vd-social-media-links-label {
89
- text-align: left;
90
- }
91
+ @media (width <= 767px) {
92
+ .vd-social-media-links-label {
93
+ text-align: left;
94
+ }
95
+
96
+ .vd-social-media-links-content {
97
+ justify-content: flex-start;
98
+ }
91
99
  }
92
100
  </style>
@@ -2,13 +2,13 @@
2
2
 
3
3
  exports[`SocialMediaLinks > renders correctly with default props 1`] = `
4
4
  "<div data-v-9d3df26f="" class="d-flex flex-column"><span data-v-9d3df26f="" class="vd-social-media-links-label text-subtitle-2 text--primary">Suivez-nous :</span>
5
- <ul data-v-9d3df26f="" class="d-flex max-width-none"></ul>
5
+ <ul data-v-9d3df26f="" class="vd-social-media-links-content d-flex max-width-none"></ul>
6
6
  </div>"
7
7
  `;
8
8
 
9
9
  exports[`SocialMediaLinks > renders correctly with provided links 1`] = `
10
10
  "<div data-v-9d3df26f="" class="d-flex flex-column"><span data-v-9d3df26f="" class="vd-social-media-links-label text-subtitle-2 text--primary">Suivez-nous :</span>
11
- <ul data-v-9d3df26f="" class="d-flex max-width-none">
11
+ <ul data-v-9d3df26f="" class="vd-social-media-links-content d-flex max-width-none">
12
12
  <li data-v-9d3df26f=""><a data-v-9d3df26f="" class="v-btn v-btn--icon v-theme--light v-btn--density-default v-btn--size-default v-btn--variant-text" href="https://twitter.com" id="social-btn-0" target="_blank" rel="noopener noreferrer" aria-label="Lien vers Twitter"><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
13
13
  <!----><span class="v-btn__content" data-no-activator=""><i data-v-9d3df26f="" class="mdi-twitter mdi v-icon notranslate v-theme--light vd-social-media-links-icon" style="font-size: 30px; height: 30px; width: 30px;" aria-hidden="true"></i></span>
14
14
  <!---->
@@ -295,8 +295,9 @@ export const ActionBtn: Story = {
295
295
  code: `
296
296
  <script setup lang="ts">
297
297
  import { SubHeader } from '@cnamts/synapse'
298
+ import { ref } from 'vue'
298
299
 
299
- const items = [
300
+ const items = ref([
300
301
  {
301
302
  title: 'Informations patient',
302
303
  items: [
@@ -317,10 +318,12 @@ export const ActionBtn: Story = {
317
318
  { key: 'Dernière modification', value: '04/06/2020' },
318
319
  ],
319
320
  },
320
- ]
321
+ ])
321
322
 
322
323
  const updateInfo = (eventValue: { dataListIndex: number, itemIndex: number }) => {
323
- items[eventValue.dataListIndex].items[eventValue.itemIndex].value = '25/09/1970'
324
+ if (items) {
325
+ items[eventValue.dataListIndex].items[eventValue.itemIndex].value = '25/09/1970'
326
+ }
324
327
  }
325
328
  </script>
326
329
  `,
@@ -137,49 +137,50 @@
137
137
 
138
138
  <style lang="scss" scoped>
139
139
  .vd-sub-header {
140
- overflow-x: auto;
140
+ overflow-x: auto;
141
141
  }
142
142
 
143
143
  .vd-sub-header-back-btn {
144
- margin: 0 -6px;
144
+ margin: 0 -6px;
145
145
  }
146
146
 
147
147
  .vd-data-list-group,
148
148
  .vd-sub-header-informations {
149
- // Don't take all available space
150
- max-width: none;
149
+ // Don't take all available space
150
+ max-width: none;
151
151
  }
152
152
 
153
153
  .vd-data-list-group :deep(.vd-data-list) {
154
- max-width: 200px;
155
-
156
- // Apply margin right to avoid empty
157
- // space on smaller screens
158
- &:not(:last-child) {
159
- margin-right: 80px !important;
160
- }
161
-
162
- .vd-key {
163
- display: inline-block;
164
- font-size: 0.75rem !important;
165
- }
166
-
167
- .vd-data-list-item-label {
168
- color: rgba(255, 255, 255, 0.7) !important;
169
- }
170
-
171
- .vd-data-list-item-action-btn {
172
- color: #fff !important;
173
- }
154
+ max-width: 200px;
155
+
156
+ // Apply margin right to avoid empty
157
+ // space on smaller screens
158
+ &:not(:last-child) {
159
+ margin-right: 80px !important;
160
+ }
161
+
162
+ .vd-key {
163
+ display: inline-block;
164
+ font-size: 0.75rem !important;
165
+ }
166
+
167
+ .vd-data-list-item-label {
168
+ color: rgb(255 255 255 / 70%) !important;
169
+ }
170
+
171
+ .vd-data-list-item-action-btn {
172
+ color: #fff !important;
173
+ }
174
174
  }
175
175
 
176
176
  .vd-subheader-loading :deep() {
177
- background: transparent;
178
- .v-skeleton-loader__button {
179
- margin: 0;
180
- min-height: 28px;
181
- height: auto;
182
- background: rgba(white, var(--v-border-opacity));
183
- }
177
+ background: transparent;
178
+
179
+ .v-skeleton-loader__button {
180
+ margin: 0;
181
+ min-height: 28px;
182
+ height: auto;
183
+ background: rgba(white, var(--v-border-opacity));
184
+ }
184
185
  }
185
186
  </style>