@cnamts/synapse 0.0.0-alpha.0

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 (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/design-system-v3.d.ts +246 -0
  4. package/dist/design-system-v3.js +5425 -0
  5. package/dist/design-system-v3.umd.cjs +2 -0
  6. package/dist/style.css +1 -0
  7. package/package.json +104 -0
  8. package/src/assets/tokens.scss +500 -0
  9. package/src/components/Alert/Alert.mdx +36 -0
  10. package/src/components/Alert/Alert.stories.ts +115 -0
  11. package/src/components/Alert/Alert.vue +248 -0
  12. package/src/components/Alert/locales.ts +3 -0
  13. package/src/components/Alert/tests/Alert.spec.ts +105 -0
  14. package/src/components/Alert/tests/__snapshots__/Alert.spec.ts.snap +15 -0
  15. package/src/components/BackBtn/BackBtn.mdx +26 -0
  16. package/src/components/BackBtn/BackBtn.stories.ts +138 -0
  17. package/src/components/BackBtn/BackBtn.vue +60 -0
  18. package/src/components/BackBtn/locales.ts +3 -0
  19. package/src/components/BackBtn/tests/BackBtn.spec.ts +103 -0
  20. package/src/components/BackBtn/tests/__snapshots__/BackBtn.spec.ts.snap +9 -0
  21. package/src/components/BackToTopBtn/BackToTopBtn.mdx +52 -0
  22. package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +188 -0
  23. package/src/components/BackToTopBtn/BackToTopBtn.vue +137 -0
  24. package/src/components/BackToTopBtn/config.ts +12 -0
  25. package/src/components/BackToTopBtn/locales.ts +3 -0
  26. package/src/components/BackToTopBtn/tests/BackToTopBtn.spec.ts +173 -0
  27. package/src/components/BackToTopBtn/tests/__snapshots__/BackToTopBtn.spec.ts.snap +17 -0
  28. package/src/components/Beta/beta.mdx +5 -0
  29. package/src/components/CopyBtn/CopyBtn.mdx +38 -0
  30. package/src/components/CopyBtn/CopyBtn.stories.ts +209 -0
  31. package/src/components/CopyBtn/CopyBtn.vue +103 -0
  32. package/src/components/CopyBtn/config.ts +17 -0
  33. package/src/components/CopyBtn/locales.ts +3 -0
  34. package/src/components/CopyBtn/tests/CopyBtn.spec.ts +99 -0
  35. package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +7 -0
  36. package/src/components/Deprecated/deprecated.mdx +5 -0
  37. package/src/components/DownloadBtn/DownloadBtn.mdx +94 -0
  38. package/src/components/DownloadBtn/DownloadBtn.stories.ts +211 -0
  39. package/src/components/DownloadBtn/DownloadBtn.vue +113 -0
  40. package/src/components/DownloadBtn/config.ts +13 -0
  41. package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +82 -0
  42. package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +17 -0
  43. package/src/components/DownloadBtn/tests/data/filePromise.ts +53 -0
  44. package/src/components/DownloadBtn/tests/data/test.json +0 -0
  45. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +34 -0
  46. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +92 -0
  47. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +154 -0
  48. package/src/components/FranceConnectBtn/locales.ts +6 -0
  49. package/src/components/FranceConnectBtn/tests/FranceConnectBtn.spec.ts +62 -0
  50. package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +36 -0
  51. package/src/components/LangBtn/LangBtn.mdx +37 -0
  52. package/src/components/LangBtn/LangBtn.stories.ts +147 -0
  53. package/src/components/LangBtn/LangBtn.vue +167 -0
  54. package/src/components/LangBtn/config.ts +17 -0
  55. package/src/components/LangBtn/locales.ts +3 -0
  56. package/src/components/LangBtn/tests/Config.spec.ts +24 -0
  57. package/src/components/LangBtn/tests/LangBtn.spec.ts +283 -0
  58. package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +11 -0
  59. package/src/components/LangBtn/types.d.ts +7 -0
  60. package/src/components/NotificationBar/NotificationBar.mdx +94 -0
  61. package/src/components/NotificationBar/NotificationBar.stories.ts +366 -0
  62. package/src/components/NotificationBar/NotificationBar.vue +296 -0
  63. package/src/components/NotificationBar/options.ts +15 -0
  64. package/src/components/NotificationBar/tests/NotificationBar.spec.ts +332 -0
  65. package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +7 -0
  66. package/src/components/NotificationBar/types.ts +7 -0
  67. package/src/components/PageContainer/PageContainer.mdx +29 -0
  68. package/src/components/PageContainer/PageContainer.stories.ts +115 -0
  69. package/src/components/PageContainer/PageContainer.vue +68 -0
  70. package/src/components/PageContainer/tests/PageContainer.spec.ts +56 -0
  71. package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +7 -0
  72. package/src/components/SkipLink/SkipLink.mdx +55 -0
  73. package/src/components/SkipLink/SkipLink.stories.ts +70 -0
  74. package/src/components/SkipLink/SkipLink.vue +79 -0
  75. package/src/components/SkipLink/locales.ts +3 -0
  76. package/src/components/SkipLink/tests/__snapshots__/skipLink.spec.ts.snap +3 -0
  77. package/src/components/SkipLink/tests/skipLink.spec.ts +46 -0
  78. package/src/components/index.ts +8 -0
  79. package/src/composables/useCustomizableOptions.ts +23 -0
  80. package/src/designTokens/bootstrapColors.md +66 -0
  81. package/src/designTokens/cnamColors.md +193 -0
  82. package/src/designTokens/index.ts +15 -0
  83. package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +158 -0
  84. package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +22 -0
  85. package/src/designTokens/tokens/cnam/cnamColors.ts +171 -0
  86. package/src/designTokens/tokens/cnam/cnamContextual.ts +58 -0
  87. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +90 -0
  88. package/src/designTokens/tokens/cnam/cnamSemantic.ts +87 -0
  89. package/src/designTokens/tokens/json/contextual-tokens.json +156 -0
  90. package/src/designTokens/tokens/json/primitives.json +209 -0
  91. package/src/designTokens/tokens/json/semantic.json +120 -0
  92. package/src/designTokens/utils/convertGaps.ts +11 -0
  93. package/src/designTokens/utils/convertSemanticsToken.ts +32 -0
  94. package/src/designTokens/utils/createFlattenTheme.ts +19 -0
  95. package/src/designTokens/utils/index.ts +4 -0
  96. package/src/main.ts +2 -0
  97. package/src/services/NotificationService.ts +27 -0
  98. package/src/stories/Fondamentaux/Accessibilite/Accessibilite.mdx +52 -0
  99. package/src/stories/Fondamentaux/Accessibilite/Accessibilite.stories.ts +36 -0
  100. package/src/stories/Fondamentaux/Accessibilite/AccessibiliteItems.ts +706 -0
  101. package/src/stories/Fondamentaux/Accessibilite/constants/ExpertiseLevelEnum.ts +5 -0
  102. package/src/stories/Fondamentaux/Accessibilite/constants/RGAALevelEnum.ts +4 -0
  103. package/src/stories/Fondamentaux/EcoConception/EcoConception.mdx +24 -0
  104. package/src/stories/Fondamentaux/EcoConception/Econception.stories.ts +30 -0
  105. package/src/stories/Fondamentaux/EcoConception/ecoDesignItems.ts +55 -0
  106. package/src/stories/GuideDuDev/CommentContribuer.mdx +22 -0
  107. package/src/stories/GuideDuDev/components.stories.ts +23 -0
  108. package/src/stories/GuideDuDev/moduleDeNotification.mdx +182 -0
  109. package/src/stories/GuideDuDev/vuetifyOptions.mdx +72 -0
  110. package/src/stories/Guidelines/Colors.mdx +220 -0
  111. package/src/stories/Guidelines/CustomisationEtThemes.mdx +3 -0
  112. package/src/stories/Guidelines/Introduction.mdx +35 -0
  113. package/src/stories/Guidelines/Typo.mdx +53 -0
  114. package/src/stories/Home/Accueil.mdx +7 -0
  115. package/src/stories/Home/PolitiqueDeConfidentialite.mdx +4 -0
  116. package/src/stories/Home/synapse.webp +0 -0
  117. package/src/temp/TestA11y.vue +14 -0
  118. package/src/temp/TestComponent.vue +37 -0
  119. package/src/temp/TestDTComponent.vue +93 -0
  120. package/src/temp/customizableOptions.vue +18 -0
  121. package/src/temp/gridsTests.vue +54 -0
  122. package/src/temp/options.json +5 -0
  123. package/src/types/vuetifyTypes.ts +3 -0
  124. package/src/utils/convertToUnit/index.ts +16 -0
  125. package/src/utils/convertToUnit/test/convertToUnit.spec.ts +32 -0
  126. package/src/utils/functions/copyToClipboard/index.ts +38 -0
  127. package/src/utils/functions/copyToClipboard/tests/copyToClipboard.spec.ts +104 -0
  128. package/src/utils/functions/downloadFile/index.ts +37 -0
  129. package/src/utils/functions/downloadFile/tests/downloadFile.spec.ts +69 -0
  130. package/src/utils/functions/downloadFile/types.ts +1 -0
@@ -0,0 +1,154 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { locales } from './locales'
4
+ import { mdiOpenInNew } from '@mdi/js'
5
+ import { useTheme } from 'vuetify'
6
+
7
+ const props = withDefaults(defineProps<{
8
+ href: string
9
+ isConnectPlus?: boolean
10
+ dark?: boolean
11
+ }>(), {
12
+ isConnectPlus: false,
13
+ dark: false,
14
+ })
15
+
16
+ const theme = useTheme()
17
+ const isDark = computed(() => theme.current.value.dark || props.dark)
18
+
19
+ const franceConnectInfoUrl = props.isConnectPlus
20
+ ? 'https://franceconnect.gouv.fr/france-connect-plus'
21
+ : 'https://franceconnect.gouv.fr/'
22
+
23
+ const btnWidth = computed(() => props.isConnectPlus ? '245px' : '209px')
24
+ const infoUrl = computed(() => franceConnectInfoUrl)
25
+ </script>
26
+
27
+ <template>
28
+ <div
29
+ class="vd-france-connect-btn d-flex flex-column align-start"
30
+ :class="{
31
+ 'vd-france-connect-btn--dark': isDark,
32
+ }"
33
+ >
34
+ <a
35
+ :href="href"
36
+ :aria-label="locales.btnLabel(isConnectPlus)"
37
+ class="vd-france-connect-link d-inline-flex"
38
+ >
39
+ <svg
40
+ :viewBox="`0 0 ${props.isConnectPlus ? '245' : '209'} 56`"
41
+ :width="btnWidth"
42
+ height="56"
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ >
45
+ <path
46
+ fill="#000091"
47
+ d="m47 19.1-15-8.68-15 8.76a.6.6 0 0 0-.3.53v16.94a.67.67 0 0 0 .3.53l15 8.6 14.99-8.7a.67.67 0 0 0 .3-.53V19.63a.6.6 0 0 0-.3-.53Z"
48
+ />
49
+
50
+ <path
51
+ fill="#e1000f"
52
+ d="m26.64 19.6-5.03 8.63-4.55-9.18 5.39-3.11 4.48 3.16-.29.5ZM47.3 36.58V19.62a.6.6 0 0 0-.3-.52l-15-8.68"
53
+ />
54
+
55
+ <path
56
+ fill="#0063cb"
57
+ d="M16.7 36.58 32 10.42v35.36l-15-8.6a.67.67 0 0 1-.3-.53V19.71v16.87Zm24.67-20.74L46.83 19l-4.5 9.15-5.38-9.24 4.42-3.07Z"
58
+ />
59
+
60
+ <path
61
+ fill="#fff"
62
+ d="M51.6 16.3 32.43 5.28a.93.93 0 0 0-.84 0L12.4 16.3a.89.89 0 0 0-.39.7v22a.89.89 0 0 0 .4.7l19.18 11.02a.93.93 0 0 0 .84 0L51.6 39.7A.89.89 0 0 0 52 39V17a.89.89 0 0 0-.4-.7ZM22.8 34.06h.08c-.04 0-.08 0-.08.05 0 .1.15 0 .2.1-.24 0-.46.1-.63.27 0 .06.1.06.15.06-.07.1-.23.05-.28.15l.1.05c-.05 0-.1 0-.1.05v.15c-.12 0-.17.1-.27.15.2.15.32 0 .52 0-.52.2-.95.48-1.48.63-.1 0 0 .15-.1.15.15.1.23-.05.38-.05-.66.38-1.34.7-2.04 1.13a.35.35 0 0 0-.1.2h-.2c-.1.05-.05.18-.15.28.23.15.5-.2.65 0 .05 0-.1.05-.2.05-.05 0-.05.1-.1.1H19c-.1.07-.2.12-.2.27a.22.22 0 0 0-.23.1c1.08 0 2.14-.2 3.15-.57.78-.4 1.48-.93 2.09-1.56l.05.1c-.15.43-.43.81-.81 1.08-.28.15-.48.37-.7.48-.15.08-.3.17-.43.27-.63.2-1.28.34-1.94.41l-.3.05-.67.1-2-1.13a.65.65 0 0 1-.28-.41.58.58 0 0 0 .09-.07.26.26 0 0 0-.11-.07v-.65a12.8 12.8 0 0 0 3.04-.94 8.75 8.75 0 0 0-3.04-1.34v-1.52c.55.1 1.1.22 1.64.4.41.15.8.34 1.18.57.15.14.3.27.48.38a.91.91 0 0 0 .8.05h.33a3.96 3.96 0 0 0 1.93-.9c0 .04.05.04.1.04-.07.4-.22.79-.42 1.14 0 .05-.05.15.05.2Zm2.82 3.57c.25-.1.4-.28.63-.38-.05.05-.05.15-.1.2a3.7 3.7 0 0 0-.53.4c-.57.5-1.1 1.04-1.59 1.61-.25.3-.53.58-.8.86l-.3.24-2.54-1.45c.36.03.73.02 1.08-.05a5 5 0 0 0 .86-.33v.1c.7-.27 1.23-.9 1.93-1.13.03 0 .13.1.23.05a1.88 1.88 0 0 1 1.5-.7c0 .05 0 .1.06.1h.02c-.15.13-.32.25-.5.38-.05.05 0 .1.05.1Zm-8.91-6.16v-.19c.52-.14 1.05-.2 1.59-.19a5.86 5.86 0 0 0-1.59.37Zm30.6 5.08a.67.67 0 0 1-.3.53L36.9 42.93a32.3 32.3 0 0 1-3.4-1.19 2.83 2.83 0 0 1-.05-2.24c.07-.3.2-.6.35-.88.02-.03.05-.05.05-.08h.01l.01-.03c.11-.19.24-.38.38-.55l.01-.02.02-.02.02-.01c0-.03.02-.05.05-.08.02-.05.07-.07.1-.12.17-.19.37-.36.58-.5.21-.08.43-.14.65-.18.81.06 1.62.17 2.42.33.1.01.19.05.27.1.3.06.62.04.9-.05a1.14 1.14 0 0 0 .86-.7 1.21 1.21 0 0 0 .05-1.07c-.17-.27 0-.43.19-.59l.06-.05c.09-.06.17-.14.23-.22.13-.25-.1-.4-.15-.63-.05-.1-.22-.05-.32-.2.35-.15.85-.43.63-.86-.16-.22-.38-.63-.1-.85.35-.2.85-.15 1-.48a1.14 1.14 0 0 0-.3-1.09l-.07-.1-.2-.32a6.9 6.9 0 0 0-.53-.76 4.3 4.3 0 0 1-.53-1.01c-.15-.38.05-.7.05-1.08.01-.73-.1-1.46-.33-2.15-.13-.35-.18-.73-.33-1.06-.02-.2-.1-.4-.22-.58a.37.37 0 0 1 0-.33c.2-.14.4-.3.58-.47a.57.57 0 0 0-.2-.71c-.33-.15-.3.33-.53.43h-.15c-.05-.13.05-.18.15-.28 0-.05 0-.15-.05-.15-.2 0-.38-.05-.43-.15a3.96 3.96 0 0 0-1.86-1.29c.19.06.38.1.58.1.34.08.69.04 1-.1.23-.07.28-.48.38-.7a.8.8 0 0 0-.15-.63c-.23-.33-.54-.6-.9-.76a9.13 9.13 0 0 1-.94-.48c-2.96-1.48-9.07-.2-9.53 0-.44.13-.86.29-1.26.48a3.92 3.92 0 0 0-2.36 2.46c-.57.38-1.03.9-1.34 1.51-.42.8-1.05 1.51-.95 2.41.1.78.28 1.49.43 2.3.04.27.1.53.2.8s0 .62.15.85c.07.15.02.33.22.43v.2c.05.05.05.1.16.1v.2c.43.42.8.9 1.1 1.43.1.28-.48.15-.7.05-.41-.27-.8-.6-1.13-.96a.18.18 0 0 0-.05.1c.2.36.9.78.53 1.01-.2.1-.43-.15-.63.05-.05.08 0 .18 0 .28-.28-.2-.58-.1-.86-.2-.2-.05-.25-.43-.48-.43-.6-.14-1.2-.25-1.8-.33-.58-.08-1.16-.14-1.75-.16V19.71a.6.6 0 0 1 .31-.53L32 10.42l15 8.68a.6.6 0 0 1 .3.52v16.93Zm-7.96-8.26a.32.32 0 0 1-.28.15l-.28.27c.1 0 0 .15.1.15-.2.23.08.7-.2.8-.37.1-.76.1-1.13 0a.72.72 0 0 1 .17-.02h.08a.38.38 0 0 0 .34-.13v-.2c0-.05-.05-.05-.1-.05a.16.16 0 0 1-.1.05.22.22 0 0 0-.16-.2.8.8 0 0 1-.72-.27.67.67 0 0 1 .44-.05c.13 0 .08-.23.23-.33h.16c.3-.37.87-.47.97-.84 0-.1-.28-.1-.49-.15a2.26 2.26 0 0 0-.82.05c-.36.05-.7.14-1.05.27.28-.2.6-.36.92-.47.24-.09.48-.15.72-.2l.13-.02.14-.03a.97.97 0 0 1 .55 0c.23.1.62.1.67.25.1.27-.15.54-.44.74-.05.08.15.14.15.23Z"
63
+ />
64
+
65
+ <path
66
+ :fill="isDark ? '#000091' : '#f5f5fe'"
67
+ d="M64.99 24.87a4.9 4.9 0 0 0 4.08 1.95c2.1 0 3.69-1.3 3.69-3.36 0-3.96-5.63-3.35-5.63-6.02 0-1.02.75-1.75 1.92-1.75 1.02 0 1.85.56 2.55 1.56l1.2-1.05a4.54 4.54 0 0 0-3.77-1.94c-2.07 0-3.53 1.45-3.53 3.21 0 3.93 5.64 3.35 5.64 6.04 0 1.09-.77 1.88-2.1 1.88-1.1 0-2.05-.56-2.86-1.61l-1.2 1.09Zm10.81-5.71 1.75-4.56H75.9l-1.44 4.56h1.34Zm4.82-3.46a1 1 0 0 0 1-1.01 1 1 0 0 0-1-1c-.56 0-1.02.45-1.02 1 0 .56.46 1.02 1.02 1.02Zm-.73 10.8h1.45v-8.57h-1.45v8.57Zm3.77-4.28c0 2.5 1.72 4.62 4.4 4.62 1.28 0 2.28-.5 3.04-1.36v1.02h1.45V13.75H91.1v5.2a3.89 3.89 0 0 0-3.04-1.36c-2.68 0-4.4 2.13-4.4 4.63Zm1.53 0c0-1.82 1.22-3.27 3.04-3.27 1.17 0 2.21.56 2.87 1.58v3.37a3.33 3.33 0 0 1-2.87 1.58c-1.82 0-3.04-1.45-3.04-3.26Zm18.02 2.87-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.15-1.24-3.2-3.3h6.58c.05-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.68 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm6.32 7.68h1.45v-5.93c.54-.9 1.32-1.62 2.56-1.62 1.33 0 2.2.89 2.2 2.42v5.13h1.44v-5.18c0-2.44-1.43-3.73-3.35-3.73-1.27 0-2.16.55-2.85 1.31v-.97h-1.45v8.57Zm11.06-2.87c0 2.09 1.07 3.04 2.97 3.04.61 0 1.07-.07 1.48-.24v-1.29c-.32.14-.72.2-1.28.2-1.03 0-1.71-.37-1.71-1.71v-4.39h2.97v-1.3H118v-2.15h-1.46v2.14h-1.62v1.31h1.62v4.39Zm7.37-7.92a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.45v-8.57h-1.45v8.57Zm3.38-8.57v1.31h1.61v7.26h1.47v-7.26h2.97v-1.3h-2.97v-1.1c0-1.12.64-1.78 1.61-1.78.5 0 .88.15 1.2.39l.65-1.2c-.47-.28-1.1-.5-1.88-.5-1.87 0-3.05 1.3-3.05 3.13v1.05h-1.61Zm8.54-2.22a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.44v-8.57h-1.44v8.57Zm12.11-1.41-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.83 0-3.14-1.24-3.2-3.3h6.59c.05-.23.1-.56.1-.9 0-2.1-1.51-3.74-3.84-3.74-2.66 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.88-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.3-2.3 2.7-2.3Zm6.33 7.68h1.44v-5.88c.53-.87 1.26-1.45 2.38-1.45.34 0 .6.04.85.1v-1.4a3.13 3.13 0 0 0-3.23 1.14v-1.08h-1.44v8.57Zm13.66.24c1.11 0 2.23-.5 2.88-1.33v1.09h1.44v-5.75c0-1.88-1.29-3.16-3.47-3.16-1.5 0-2.7.63-3.45 1.65l1.1.83a2.78 2.78 0 0 1 2.3-1.19c1.23 0 2.08.68 2.08 1.87v.6l-2.9.47c-1.81.31-2.8 1.23-2.8 2.52 0 1.46 1.14 2.4 2.82 2.4Zm-1.36-2.45c0-.73.53-1.26 1.7-1.46l2.54-.43v1.69a3 3 0 0 1-2.64 1.46c-1 0-1.6-.53-1.6-1.26Zm7.2-6.36 3.36 8.57h1.9l3.35-8.57h-1.56L172.54 25l-2.74-7.06h-1.56Zm17.86 7.16-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.14-1.24-3.2-3.3h6.58c.06-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.31 2.02-4.31 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm10.24 6.66c-1.86 0-3.17-1.43-3.17-3.26 0-1.82 1.31-3.27 3.15-3.27 1.07 0 1.94.51 2.46 1.26l1.14-.87a4.43 4.43 0 0 0-3.6-1.75 4.51 4.51 0 0 0-4.66 4.63c0 2.5 1.82 4.62 4.66 4.62 1.56 0 2.8-.68 3.6-1.75l-1.14-.87a2.95 2.95 0 0 1-2.44 1.26ZM65.85 44.5h2.56v-5.36h4.07V37H68.4v-2.99h4.79V31.9h-7.35v12.6Zm8.9 0h2.3v-5.81a2.48 2.48 0 0 1 2.17-1.2c.41 0 .72.06 1 .13v-2.25a2.52 2.52 0 0 0-.79-.12c-1.02 0-1.8.47-2.39 1.08v-.9h-2.29v9.07Zm9.43.27c1.07 0 2.15-.45 2.72-1.15v.88h2.29v-5.87c0-2-1.35-3.56-3.98-3.56-1.66 0-2.99.68-3.8 1.8l1.68 1.28a2.46 2.46 0 0 1 2.05-1.08c1.04 0 1.76.6 1.76 1.56v.24l-2.77.46c-1.94.33-3 1.35-3 2.72 0 1.68 1.24 2.72 3.05 2.72Zm-.79-2.83c0-.55.4-.95 1.35-1.11l2.16-.36v1.28c-.45.72-1.2 1.2-2.25 1.2-.77 0-1.26-.4-1.26-1Zm8.42 2.56h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm15.44-1.8c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.09 1.04l1.78-1.37a4.69 4.69 0 0 0-3.84-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 3-.72 3.84-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.06 1.04Zm13.54.32-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.65-4.08-4.17-4.08-2.97 0-4.67 2.21-4.67 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.95.92 1.98 1.84h-4.17c.25-1.2 1.02-1.84 2.2-1.84Zm12.5 5.53c-2.38 0-4.07-1.86-4.07-4.27 0-2.41 1.7-4.27 4.07-4.27 1.44 0 2.57.7 3.3 1.73l2-1.56a6.53 6.53 0 0 0-5.3-2.56 6.55 6.55 0 0 0-6.7 6.66c0 3.6 2.72 6.66 6.7 6.66 2.28 0 4.16-1 5.3-2.57l-2-1.55a3.94 3.94 0 0 1-3.3 1.73Zm11.36-7.4a4.8 4.8 0 0 0-4.96 4.9 4.8 4.8 0 0 0 4.96 4.89 4.8 4.8 0 0 0 4.97-4.9 4.8 4.8 0 0 0-4.97-4.9Zm.04 7.63c-1.51 0-2.63-1.15-2.63-2.74 0-1.58 1.12-2.73 2.63-2.73 1.46 0 2.56 1.15 2.56 2.73 0 1.57-1.1 2.74-2.56 2.74Zm7.02 1.8h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.13 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm11.09 0h2.28v-5.92c.35-.58.96-1.35 2.11-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.3v-5.4c0-2.68-1.56-4.03-3.52-4.03-1.2 0-2.06.47-2.69 1.08v-.72h-2.28v9.07Zm19.44-1.48-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.66-4.08-4.18-4.08-2.97 0-4.66 2.21-4.66 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.94.92 1.98 1.84h-4.18c.26-1.2 1.03-1.84 2.2-1.84Zm10.75 5.76c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.08 1.04l1.78-1.37a4.69 4.69 0 0 0-3.83-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 2.99-.72 3.83-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.05 1.04Zm6.2-1.51c0 2.21 1.09 3.49 3.35 3.49.76 0 1.3-.09 1.75-.29v-2c-.3.13-.72.2-1.35.2-.9 0-1.44-.4-1.44-1.4v-3.71h2.77v-2.05h-2.77v-2.27h-2.3v2.27h-1.7v2.05h1.7v3.7Z"
68
+ />
69
+
70
+ <path
71
+ v-if="isConnectPlus"
72
+ :fill="isDark ? '#000091' : '#f5f5fe'"
73
+ d="M233 30.571V25.429H223.6V16H218.448V25.429H209V30.572H218.448V40H223.6V30.571H233Z"
74
+ />
75
+ </svg>
76
+ </a>
77
+
78
+ <a
79
+ :href="infoUrl"
80
+ target="_blank"
81
+ rel="noopener noreferrer"
82
+ class="vd-france-connect-info-link text-decoration-none mt-3"
83
+ >
84
+ {{ locales.infoLinkLabel(isConnectPlus) }}
85
+
86
+ <VIcon
87
+ size="1em"
88
+ class="ml-1 mb-1"
89
+ >
90
+ {{ mdiOpenInNew }}
91
+ </VIcon>
92
+ </a>
93
+ </div>
94
+ </template>
95
+
96
+ <style lang="scss" scoped>
97
+ .vd-france-connect-btn a {
98
+ color: #000091;
99
+
100
+ &:focus {
101
+ outline-offset: 3px;
102
+ }
103
+ }
104
+
105
+ .vd-france-connect-link {
106
+ background: #000091;
107
+ &:hover {
108
+ background: #1212ff;
109
+ transition: all 0.2s ease-in-out;
110
+ }
111
+
112
+ &:active {
113
+ background: #2323ff;
114
+ }
115
+
116
+ &:focus {
117
+ outline-offset: 3px;
118
+ }
119
+ }
120
+
121
+ .vd-france-connect-btn--dark {
122
+ .vd-france-connect-link {
123
+ color: #FFFFFF;
124
+ background-color: #8585F6;
125
+
126
+ &:hover {
127
+ background-color: #B1B1F9;
128
+ }
129
+
130
+ &:active {
131
+ background-color: #C6C6FB;
132
+ }
133
+ }
134
+
135
+ .vd-france-connect-info-link {
136
+ color: #8585F6;
137
+ }
138
+ }
139
+
140
+ .vd-france-connect-info-link {
141
+ background-image: linear-gradient(currentColor, currentColor);
142
+ background-position: 0% 100%;
143
+ background-repeat: no-repeat;
144
+ background-size: 100% 1px;
145
+
146
+ &:hover {
147
+ background-size: 100% 2px;
148
+ }
149
+ }
150
+
151
+ :deep(&:focus) {
152
+ border-radius: 0 !important;
153
+ }
154
+ </style>
@@ -0,0 +1,6 @@
1
+ export const locales = {
2
+ btnLabel: (connectPlus: boolean) =>
3
+ `S’identifier avec FranceConnect${connectPlus ? '+' : ''}`,
4
+ infoLinkLabel: (connectPlus: boolean) =>
5
+ `Qu’est-ce que FranceConnect${connectPlus ? '+' : ''} ?`,
6
+ }
@@ -0,0 +1,62 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { mount } from '@vue/test-utils'
3
+ import { vuetify } from '@tests/unit/setup'
4
+ import FranceConnectBtn from '../FranceConnectBtn.vue'
5
+ import { VThemeProvider } from 'vuetify/components'
6
+
7
+ describe('FranceConnectBtn', () => {
8
+ it('renders correctly', () => {
9
+ const wrapper = mount(FranceConnectBtn, {
10
+ global: {
11
+ plugins: [vuetify],
12
+ },
13
+ propsData: {
14
+ href: 'https://app.franceconnect.gouv.fr/',
15
+ },
16
+ })
17
+
18
+ expect(wrapper.html()).toMatchSnapshot()
19
+ expect(wrapper.find('.vd-france-connect-link').attributes('href')).toBe('https://app.franceconnect.gouv.fr/')
20
+ })
21
+
22
+ it('renders correctly with connect-plus', () => {
23
+ const wrapper = mount(FranceConnectBtn, {
24
+ global: {
25
+ plugins: [vuetify],
26
+ },
27
+ propsData: {
28
+ href: 'https://app.franceconnect.gouv.fr/',
29
+ isConnectPlus: true,
30
+ },
31
+ })
32
+
33
+ expect(wrapper.html()).toMatchSnapshot()
34
+
35
+ const fillValue = wrapper.findAll('path').at(-1)?.attributes('fill')
36
+
37
+ expect(fillValue).toBe('#f5f5fe')
38
+ })
39
+
40
+ it('renders correctly in black', () => {
41
+ const wrapper = mount({
42
+ components: { FranceConnectBtn, VThemeProvider },
43
+ template: `
44
+ <VThemeProvider
45
+ theme="dark"
46
+ with-background
47
+ >
48
+ <FranceConnectBtn href="https://app.franceconnect.gouv.fr/" isConnectPlus />
49
+ </VThemeProvider>`,
50
+ }, {
51
+ global: {
52
+ plugins: [vuetify],
53
+ },
54
+ })
55
+
56
+ expect(wrapper.html()).toMatchSnapshot()
57
+
58
+ const fillValue = wrapper.findAll('path').at(-1)?.attributes('fill')
59
+
60
+ expect(fillValue).toBe('#000091')
61
+ })
62
+ })
@@ -0,0 +1,36 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`FranceConnectBtn > renders correctly 1`] = `
4
+ "<div data-v-dc72de41="" class="vd-france-connect-btn d-flex flex-column align-start"><a data-v-dc72de41="" href="https://app.franceconnect.gouv.fr/" aria-label="S’identifier avec FranceConnect" class="vd-france-connect-link d-inline-flex"><svg data-v-dc72de41="" viewBox="0 0 209 56" width="209px" height="56" xmlns="http://www.w3.org/2000/svg">
5
+ <path data-v-dc72de41="" fill="#000091" d="m47 19.1-15-8.68-15 8.76a.6.6 0 0 0-.3.53v16.94a.67.67 0 0 0 .3.53l15 8.6 14.99-8.7a.67.67 0 0 0 .3-.53V19.63a.6.6 0 0 0-.3-.53Z"></path>
6
+ <path data-v-dc72de41="" fill="#e1000f" d="m26.64 19.6-5.03 8.63-4.55-9.18 5.39-3.11 4.48 3.16-.29.5ZM47.3 36.58V19.62a.6.6 0 0 0-.3-.52l-15-8.68"></path>
7
+ <path data-v-dc72de41="" fill="#0063cb" d="M16.7 36.58 32 10.42v35.36l-15-8.6a.67.67 0 0 1-.3-.53V19.71v16.87Zm24.67-20.74L46.83 19l-4.5 9.15-5.38-9.24 4.42-3.07Z"></path>
8
+ <path data-v-dc72de41="" fill="#fff" d="M51.6 16.3 32.43 5.28a.93.93 0 0 0-.84 0L12.4 16.3a.89.89 0 0 0-.39.7v22a.89.89 0 0 0 .4.7l19.18 11.02a.93.93 0 0 0 .84 0L51.6 39.7A.89.89 0 0 0 52 39V17a.89.89 0 0 0-.4-.7ZM22.8 34.06h.08c-.04 0-.08 0-.08.05 0 .1.15 0 .2.1-.24 0-.46.1-.63.27 0 .06.1.06.15.06-.07.1-.23.05-.28.15l.1.05c-.05 0-.1 0-.1.05v.15c-.12 0-.17.1-.27.15.2.15.32 0 .52 0-.52.2-.95.48-1.48.63-.1 0 0 .15-.1.15.15.1.23-.05.38-.05-.66.38-1.34.7-2.04 1.13a.35.35 0 0 0-.1.2h-.2c-.1.05-.05.18-.15.28.23.15.5-.2.65 0 .05 0-.1.05-.2.05-.05 0-.05.1-.1.1H19c-.1.07-.2.12-.2.27a.22.22 0 0 0-.23.1c1.08 0 2.14-.2 3.15-.57.78-.4 1.48-.93 2.09-1.56l.05.1c-.15.43-.43.81-.81 1.08-.28.15-.48.37-.7.48-.15.08-.3.17-.43.27-.63.2-1.28.34-1.94.41l-.3.05-.67.1-2-1.13a.65.65 0 0 1-.28-.41.58.58 0 0 0 .09-.07.26.26 0 0 0-.11-.07v-.65a12.8 12.8 0 0 0 3.04-.94 8.75 8.75 0 0 0-3.04-1.34v-1.52c.55.1 1.1.22 1.64.4.41.15.8.34 1.18.57.15.14.3.27.48.38a.91.91 0 0 0 .8.05h.33a3.96 3.96 0 0 0 1.93-.9c0 .04.05.04.1.04-.07.4-.22.79-.42 1.14 0 .05-.05.15.05.2Zm2.82 3.57c.25-.1.4-.28.63-.38-.05.05-.05.15-.1.2a3.7 3.7 0 0 0-.53.4c-.57.5-1.1 1.04-1.59 1.61-.25.3-.53.58-.8.86l-.3.24-2.54-1.45c.36.03.73.02 1.08-.05a5 5 0 0 0 .86-.33v.1c.7-.27 1.23-.9 1.93-1.13.03 0 .13.1.23.05a1.88 1.88 0 0 1 1.5-.7c0 .05 0 .1.06.1h.02c-.15.13-.32.25-.5.38-.05.05 0 .1.05.1Zm-8.91-6.16v-.19c.52-.14 1.05-.2 1.59-.19a5.86 5.86 0 0 0-1.59.37Zm30.6 5.08a.67.67 0 0 1-.3.53L36.9 42.93a32.3 32.3 0 0 1-3.4-1.19 2.83 2.83 0 0 1-.05-2.24c.07-.3.2-.6.35-.88.02-.03.05-.05.05-.08h.01l.01-.03c.11-.19.24-.38.38-.55l.01-.02.02-.02.02-.01c0-.03.02-.05.05-.08.02-.05.07-.07.1-.12.17-.19.37-.36.58-.5.21-.08.43-.14.65-.18.81.06 1.62.17 2.42.33.1.01.19.05.27.1.3.06.62.04.9-.05a1.14 1.14 0 0 0 .86-.7 1.21 1.21 0 0 0 .05-1.07c-.17-.27 0-.43.19-.59l.06-.05c.09-.06.17-.14.23-.22.13-.25-.1-.4-.15-.63-.05-.1-.22-.05-.32-.2.35-.15.85-.43.63-.86-.16-.22-.38-.63-.1-.85.35-.2.85-.15 1-.48a1.14 1.14 0 0 0-.3-1.09l-.07-.1-.2-.32a6.9 6.9 0 0 0-.53-.76 4.3 4.3 0 0 1-.53-1.01c-.15-.38.05-.7.05-1.08.01-.73-.1-1.46-.33-2.15-.13-.35-.18-.73-.33-1.06-.02-.2-.1-.4-.22-.58a.37.37 0 0 1 0-.33c.2-.14.4-.3.58-.47a.57.57 0 0 0-.2-.71c-.33-.15-.3.33-.53.43h-.15c-.05-.13.05-.18.15-.28 0-.05 0-.15-.05-.15-.2 0-.38-.05-.43-.15a3.96 3.96 0 0 0-1.86-1.29c.19.06.38.1.58.1.34.08.69.04 1-.1.23-.07.28-.48.38-.7a.8.8 0 0 0-.15-.63c-.23-.33-.54-.6-.9-.76a9.13 9.13 0 0 1-.94-.48c-2.96-1.48-9.07-.2-9.53 0-.44.13-.86.29-1.26.48a3.92 3.92 0 0 0-2.36 2.46c-.57.38-1.03.9-1.34 1.51-.42.8-1.05 1.51-.95 2.41.1.78.28 1.49.43 2.3.04.27.1.53.2.8s0 .62.15.85c.07.15.02.33.22.43v.2c.05.05.05.1.16.1v.2c.43.42.8.9 1.1 1.43.1.28-.48.15-.7.05-.41-.27-.8-.6-1.13-.96a.18.18 0 0 0-.05.1c.2.36.9.78.53 1.01-.2.1-.43-.15-.63.05-.05.08 0 .18 0 .28-.28-.2-.58-.1-.86-.2-.2-.05-.25-.43-.48-.43-.6-.14-1.2-.25-1.8-.33-.58-.08-1.16-.14-1.75-.16V19.71a.6.6 0 0 1 .31-.53L32 10.42l15 8.68a.6.6 0 0 1 .3.52v16.93Zm-7.96-8.26a.32.32 0 0 1-.28.15l-.28.27c.1 0 0 .15.1.15-.2.23.08.7-.2.8-.37.1-.76.1-1.13 0a.72.72 0 0 1 .17-.02h.08a.38.38 0 0 0 .34-.13v-.2c0-.05-.05-.05-.1-.05a.16.16 0 0 1-.1.05.22.22 0 0 0-.16-.2.8.8 0 0 1-.72-.27.67.67 0 0 1 .44-.05c.13 0 .08-.23.23-.33h.16c.3-.37.87-.47.97-.84 0-.1-.28-.1-.49-.15a2.26 2.26 0 0 0-.82.05c-.36.05-.7.14-1.05.27.28-.2.6-.36.92-.47.24-.09.48-.15.72-.2l.13-.02.14-.03a.97.97 0 0 1 .55 0c.23.1.62.1.67.25.1.27-.15.54-.44.74-.05.08.15.14.15.23Z"></path>
9
+ <path data-v-dc72de41="" fill="#f5f5fe" d="M64.99 24.87a4.9 4.9 0 0 0 4.08 1.95c2.1 0 3.69-1.3 3.69-3.36 0-3.96-5.63-3.35-5.63-6.02 0-1.02.75-1.75 1.92-1.75 1.02 0 1.85.56 2.55 1.56l1.2-1.05a4.54 4.54 0 0 0-3.77-1.94c-2.07 0-3.53 1.45-3.53 3.21 0 3.93 5.64 3.35 5.64 6.04 0 1.09-.77 1.88-2.1 1.88-1.1 0-2.05-.56-2.86-1.61l-1.2 1.09Zm10.81-5.71 1.75-4.56H75.9l-1.44 4.56h1.34Zm4.82-3.46a1 1 0 0 0 1-1.01 1 1 0 0 0-1-1c-.56 0-1.02.45-1.02 1 0 .56.46 1.02 1.02 1.02Zm-.73 10.8h1.45v-8.57h-1.45v8.57Zm3.77-4.28c0 2.5 1.72 4.62 4.4 4.62 1.28 0 2.28-.5 3.04-1.36v1.02h1.45V13.75H91.1v5.2a3.89 3.89 0 0 0-3.04-1.36c-2.68 0-4.4 2.13-4.4 4.63Zm1.53 0c0-1.82 1.22-3.27 3.04-3.27 1.17 0 2.21.56 2.87 1.58v3.37a3.33 3.33 0 0 1-2.87 1.58c-1.82 0-3.04-1.45-3.04-3.26Zm18.02 2.87-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.15-1.24-3.2-3.3h6.58c.05-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.68 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm6.32 7.68h1.45v-5.93c.54-.9 1.32-1.62 2.56-1.62 1.33 0 2.2.89 2.2 2.42v5.13h1.44v-5.18c0-2.44-1.43-3.73-3.35-3.73-1.27 0-2.16.55-2.85 1.31v-.97h-1.45v8.57Zm11.06-2.87c0 2.09 1.07 3.04 2.97 3.04.61 0 1.07-.07 1.48-.24v-1.29c-.32.14-.72.2-1.28.2-1.03 0-1.71-.37-1.71-1.71v-4.39h2.97v-1.3H118v-2.15h-1.46v2.14h-1.62v1.31h1.62v4.39Zm7.37-7.92a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.45v-8.57h-1.45v8.57Zm3.38-8.57v1.31h1.61v7.26h1.47v-7.26h2.97v-1.3h-2.97v-1.1c0-1.12.64-1.78 1.61-1.78.5 0 .88.15 1.2.39l.65-1.2c-.47-.28-1.1-.5-1.88-.5-1.87 0-3.05 1.3-3.05 3.13v1.05h-1.61Zm8.54-2.22a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.44v-8.57h-1.44v8.57Zm12.11-1.41-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.83 0-3.14-1.24-3.2-3.3h6.59c.05-.23.1-.56.1-.9 0-2.1-1.51-3.74-3.84-3.74-2.66 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.88-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.3-2.3 2.7-2.3Zm6.33 7.68h1.44v-5.88c.53-.87 1.26-1.45 2.38-1.45.34 0 .6.04.85.1v-1.4a3.13 3.13 0 0 0-3.23 1.14v-1.08h-1.44v8.57Zm13.66.24c1.11 0 2.23-.5 2.88-1.33v1.09h1.44v-5.75c0-1.88-1.29-3.16-3.47-3.16-1.5 0-2.7.63-3.45 1.65l1.1.83a2.78 2.78 0 0 1 2.3-1.19c1.23 0 2.08.68 2.08 1.87v.6l-2.9.47c-1.81.31-2.8 1.23-2.8 2.52 0 1.46 1.14 2.4 2.82 2.4Zm-1.36-2.45c0-.73.53-1.26 1.7-1.46l2.54-.43v1.69a3 3 0 0 1-2.64 1.46c-1 0-1.6-.53-1.6-1.26Zm7.2-6.36 3.36 8.57h1.9l3.35-8.57h-1.56L172.54 25l-2.74-7.06h-1.56Zm17.86 7.16-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.14-1.24-3.2-3.3h6.58c.06-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.31 2.02-4.31 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm10.24 6.66c-1.86 0-3.17-1.43-3.17-3.26 0-1.82 1.31-3.27 3.15-3.27 1.07 0 1.94.51 2.46 1.26l1.14-.87a4.43 4.43 0 0 0-3.6-1.75 4.51 4.51 0 0 0-4.66 4.63c0 2.5 1.82 4.62 4.66 4.62 1.56 0 2.8-.68 3.6-1.75l-1.14-.87a2.95 2.95 0 0 1-2.44 1.26ZM65.85 44.5h2.56v-5.36h4.07V37H68.4v-2.99h4.79V31.9h-7.35v12.6Zm8.9 0h2.3v-5.81a2.48 2.48 0 0 1 2.17-1.2c.41 0 .72.06 1 .13v-2.25a2.52 2.52 0 0 0-.79-.12c-1.02 0-1.8.47-2.39 1.08v-.9h-2.29v9.07Zm9.43.27c1.07 0 2.15-.45 2.72-1.15v.88h2.29v-5.87c0-2-1.35-3.56-3.98-3.56-1.66 0-2.99.68-3.8 1.8l1.68 1.28a2.46 2.46 0 0 1 2.05-1.08c1.04 0 1.76.6 1.76 1.56v.24l-2.77.46c-1.94.33-3 1.35-3 2.72 0 1.68 1.24 2.72 3.05 2.72Zm-.79-2.83c0-.55.4-.95 1.35-1.11l2.16-.36v1.28c-.45.72-1.2 1.2-2.25 1.2-.77 0-1.26-.4-1.26-1Zm8.42 2.56h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm15.44-1.8c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.09 1.04l1.78-1.37a4.69 4.69 0 0 0-3.84-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 3-.72 3.84-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.06 1.04Zm13.54.32-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.65-4.08-4.17-4.08-2.97 0-4.67 2.21-4.67 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.95.92 1.98 1.84h-4.17c.25-1.2 1.02-1.84 2.2-1.84Zm12.5 5.53c-2.38 0-4.07-1.86-4.07-4.27 0-2.41 1.7-4.27 4.07-4.27 1.44 0 2.57.7 3.3 1.73l2-1.56a6.53 6.53 0 0 0-5.3-2.56 6.55 6.55 0 0 0-6.7 6.66c0 3.6 2.72 6.66 6.7 6.66 2.28 0 4.16-1 5.3-2.57l-2-1.55a3.94 3.94 0 0 1-3.3 1.73Zm11.36-7.4a4.8 4.8 0 0 0-4.96 4.9 4.8 4.8 0 0 0 4.96 4.89 4.8 4.8 0 0 0 4.97-4.9 4.8 4.8 0 0 0-4.97-4.9Zm.04 7.63c-1.51 0-2.63-1.15-2.63-2.74 0-1.58 1.12-2.73 2.63-2.73 1.46 0 2.56 1.15 2.56 2.73 0 1.57-1.1 2.74-2.56 2.74Zm7.02 1.8h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.13 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm11.09 0h2.28v-5.92c.35-.58.96-1.35 2.11-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.3v-5.4c0-2.68-1.56-4.03-3.52-4.03-1.2 0-2.06.47-2.69 1.08v-.72h-2.28v9.07Zm19.44-1.48-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.66-4.08-4.18-4.08-2.97 0-4.66 2.21-4.66 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.94.92 1.98 1.84h-4.18c.26-1.2 1.03-1.84 2.2-1.84Zm10.75 5.76c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.08 1.04l1.78-1.37a4.69 4.69 0 0 0-3.83-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 2.99-.72 3.83-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.05 1.04Zm6.2-1.51c0 2.21 1.09 3.49 3.35 3.49.76 0 1.3-.09 1.75-.29v-2c-.3.13-.72.2-1.35.2-.9 0-1.44-.4-1.44-1.4v-3.71h2.77v-2.05h-2.77v-2.27h-2.3v2.27h-1.7v2.05h1.7v3.7Z"></path>
10
+ <!--v-if-->
11
+ </svg></a><a data-v-dc72de41="" href="https://franceconnect.gouv.fr/" target="_blank" rel="noopener noreferrer" class="vd-france-connect-info-link text-decoration-none mt-3">Qu’est-ce que FranceConnect ? <i data-v-dc72de41="" class="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z mdi v-icon notranslate v-theme--light ml-1 mb-1" style="font-size: 1em; height: 1em; width: 1em;" aria-hidden="true"></i></a></div>"
12
+ `;
13
+
14
+ exports[`FranceConnectBtn > renders correctly in black 1`] = `
15
+ "<div class="v-theme-provider v-theme--dark">
16
+ <div data-v-dc72de41="" class="vd-france-connect-btn d-flex flex-column align-start vd-france-connect-btn--dark"><a data-v-dc72de41="" href="https://app.franceconnect.gouv.fr/" aria-label="S’identifier avec FranceConnect+" class="vd-france-connect-link d-inline-flex"><svg data-v-dc72de41="" viewBox="0 0 245 56" width="245px" height="56" xmlns="http://www.w3.org/2000/svg">
17
+ <path data-v-dc72de41="" fill="#000091" d="m47 19.1-15-8.68-15 8.76a.6.6 0 0 0-.3.53v16.94a.67.67 0 0 0 .3.53l15 8.6 14.99-8.7a.67.67 0 0 0 .3-.53V19.63a.6.6 0 0 0-.3-.53Z"></path>
18
+ <path data-v-dc72de41="" fill="#e1000f" d="m26.64 19.6-5.03 8.63-4.55-9.18 5.39-3.11 4.48 3.16-.29.5ZM47.3 36.58V19.62a.6.6 0 0 0-.3-.52l-15-8.68"></path>
19
+ <path data-v-dc72de41="" fill="#0063cb" d="M16.7 36.58 32 10.42v35.36l-15-8.6a.67.67 0 0 1-.3-.53V19.71v16.87Zm24.67-20.74L46.83 19l-4.5 9.15-5.38-9.24 4.42-3.07Z"></path>
20
+ <path data-v-dc72de41="" fill="#fff" d="M51.6 16.3 32.43 5.28a.93.93 0 0 0-.84 0L12.4 16.3a.89.89 0 0 0-.39.7v22a.89.89 0 0 0 .4.7l19.18 11.02a.93.93 0 0 0 .84 0L51.6 39.7A.89.89 0 0 0 52 39V17a.89.89 0 0 0-.4-.7ZM22.8 34.06h.08c-.04 0-.08 0-.08.05 0 .1.15 0 .2.1-.24 0-.46.1-.63.27 0 .06.1.06.15.06-.07.1-.23.05-.28.15l.1.05c-.05 0-.1 0-.1.05v.15c-.12 0-.17.1-.27.15.2.15.32 0 .52 0-.52.2-.95.48-1.48.63-.1 0 0 .15-.1.15.15.1.23-.05.38-.05-.66.38-1.34.7-2.04 1.13a.35.35 0 0 0-.1.2h-.2c-.1.05-.05.18-.15.28.23.15.5-.2.65 0 .05 0-.1.05-.2.05-.05 0-.05.1-.1.1H19c-.1.07-.2.12-.2.27a.22.22 0 0 0-.23.1c1.08 0 2.14-.2 3.15-.57.78-.4 1.48-.93 2.09-1.56l.05.1c-.15.43-.43.81-.81 1.08-.28.15-.48.37-.7.48-.15.08-.3.17-.43.27-.63.2-1.28.34-1.94.41l-.3.05-.67.1-2-1.13a.65.65 0 0 1-.28-.41.58.58 0 0 0 .09-.07.26.26 0 0 0-.11-.07v-.65a12.8 12.8 0 0 0 3.04-.94 8.75 8.75 0 0 0-3.04-1.34v-1.52c.55.1 1.1.22 1.64.4.41.15.8.34 1.18.57.15.14.3.27.48.38a.91.91 0 0 0 .8.05h.33a3.96 3.96 0 0 0 1.93-.9c0 .04.05.04.1.04-.07.4-.22.79-.42 1.14 0 .05-.05.15.05.2Zm2.82 3.57c.25-.1.4-.28.63-.38-.05.05-.05.15-.1.2a3.7 3.7 0 0 0-.53.4c-.57.5-1.1 1.04-1.59 1.61-.25.3-.53.58-.8.86l-.3.24-2.54-1.45c.36.03.73.02 1.08-.05a5 5 0 0 0 .86-.33v.1c.7-.27 1.23-.9 1.93-1.13.03 0 .13.1.23.05a1.88 1.88 0 0 1 1.5-.7c0 .05 0 .1.06.1h.02c-.15.13-.32.25-.5.38-.05.05 0 .1.05.1Zm-8.91-6.16v-.19c.52-.14 1.05-.2 1.59-.19a5.86 5.86 0 0 0-1.59.37Zm30.6 5.08a.67.67 0 0 1-.3.53L36.9 42.93a32.3 32.3 0 0 1-3.4-1.19 2.83 2.83 0 0 1-.05-2.24c.07-.3.2-.6.35-.88.02-.03.05-.05.05-.08h.01l.01-.03c.11-.19.24-.38.38-.55l.01-.02.02-.02.02-.01c0-.03.02-.05.05-.08.02-.05.07-.07.1-.12.17-.19.37-.36.58-.5.21-.08.43-.14.65-.18.81.06 1.62.17 2.42.33.1.01.19.05.27.1.3.06.62.04.9-.05a1.14 1.14 0 0 0 .86-.7 1.21 1.21 0 0 0 .05-1.07c-.17-.27 0-.43.19-.59l.06-.05c.09-.06.17-.14.23-.22.13-.25-.1-.4-.15-.63-.05-.1-.22-.05-.32-.2.35-.15.85-.43.63-.86-.16-.22-.38-.63-.1-.85.35-.2.85-.15 1-.48a1.14 1.14 0 0 0-.3-1.09l-.07-.1-.2-.32a6.9 6.9 0 0 0-.53-.76 4.3 4.3 0 0 1-.53-1.01c-.15-.38.05-.7.05-1.08.01-.73-.1-1.46-.33-2.15-.13-.35-.18-.73-.33-1.06-.02-.2-.1-.4-.22-.58a.37.37 0 0 1 0-.33c.2-.14.4-.3.58-.47a.57.57 0 0 0-.2-.71c-.33-.15-.3.33-.53.43h-.15c-.05-.13.05-.18.15-.28 0-.05 0-.15-.05-.15-.2 0-.38-.05-.43-.15a3.96 3.96 0 0 0-1.86-1.29c.19.06.38.1.58.1.34.08.69.04 1-.1.23-.07.28-.48.38-.7a.8.8 0 0 0-.15-.63c-.23-.33-.54-.6-.9-.76a9.13 9.13 0 0 1-.94-.48c-2.96-1.48-9.07-.2-9.53 0-.44.13-.86.29-1.26.48a3.92 3.92 0 0 0-2.36 2.46c-.57.38-1.03.9-1.34 1.51-.42.8-1.05 1.51-.95 2.41.1.78.28 1.49.43 2.3.04.27.1.53.2.8s0 .62.15.85c.07.15.02.33.22.43v.2c.05.05.05.1.16.1v.2c.43.42.8.9 1.1 1.43.1.28-.48.15-.7.05-.41-.27-.8-.6-1.13-.96a.18.18 0 0 0-.05.1c.2.36.9.78.53 1.01-.2.1-.43-.15-.63.05-.05.08 0 .18 0 .28-.28-.2-.58-.1-.86-.2-.2-.05-.25-.43-.48-.43-.6-.14-1.2-.25-1.8-.33-.58-.08-1.16-.14-1.75-.16V19.71a.6.6 0 0 1 .31-.53L32 10.42l15 8.68a.6.6 0 0 1 .3.52v16.93Zm-7.96-8.26a.32.32 0 0 1-.28.15l-.28.27c.1 0 0 .15.1.15-.2.23.08.7-.2.8-.37.1-.76.1-1.13 0a.72.72 0 0 1 .17-.02h.08a.38.38 0 0 0 .34-.13v-.2c0-.05-.05-.05-.1-.05a.16.16 0 0 1-.1.05.22.22 0 0 0-.16-.2.8.8 0 0 1-.72-.27.67.67 0 0 1 .44-.05c.13 0 .08-.23.23-.33h.16c.3-.37.87-.47.97-.84 0-.1-.28-.1-.49-.15a2.26 2.26 0 0 0-.82.05c-.36.05-.7.14-1.05.27.28-.2.6-.36.92-.47.24-.09.48-.15.72-.2l.13-.02.14-.03a.97.97 0 0 1 .55 0c.23.1.62.1.67.25.1.27-.15.54-.44.74-.05.08.15.14.15.23Z"></path>
21
+ <path data-v-dc72de41="" fill="#000091" d="M64.99 24.87a4.9 4.9 0 0 0 4.08 1.95c2.1 0 3.69-1.3 3.69-3.36 0-3.96-5.63-3.35-5.63-6.02 0-1.02.75-1.75 1.92-1.75 1.02 0 1.85.56 2.55 1.56l1.2-1.05a4.54 4.54 0 0 0-3.77-1.94c-2.07 0-3.53 1.45-3.53 3.21 0 3.93 5.64 3.35 5.64 6.04 0 1.09-.77 1.88-2.1 1.88-1.1 0-2.05-.56-2.86-1.61l-1.2 1.09Zm10.81-5.71 1.75-4.56H75.9l-1.44 4.56h1.34Zm4.82-3.46a1 1 0 0 0 1-1.01 1 1 0 0 0-1-1c-.56 0-1.02.45-1.02 1 0 .56.46 1.02 1.02 1.02Zm-.73 10.8h1.45v-8.57h-1.45v8.57Zm3.77-4.28c0 2.5 1.72 4.62 4.4 4.62 1.28 0 2.28-.5 3.04-1.36v1.02h1.45V13.75H91.1v5.2a3.89 3.89 0 0 0-3.04-1.36c-2.68 0-4.4 2.13-4.4 4.63Zm1.53 0c0-1.82 1.22-3.27 3.04-3.27 1.17 0 2.21.56 2.87 1.58v3.37a3.33 3.33 0 0 1-2.87 1.58c-1.82 0-3.04-1.45-3.04-3.26Zm18.02 2.87-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.15-1.24-3.2-3.3h6.58c.05-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.68 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm6.32 7.68h1.45v-5.93c.54-.9 1.32-1.62 2.56-1.62 1.33 0 2.2.89 2.2 2.42v5.13h1.44v-5.18c0-2.44-1.43-3.73-3.35-3.73-1.27 0-2.16.55-2.85 1.31v-.97h-1.45v8.57Zm11.06-2.87c0 2.09 1.07 3.04 2.97 3.04.61 0 1.07-.07 1.48-.24v-1.29c-.32.14-.72.2-1.28.2-1.03 0-1.71-.37-1.71-1.71v-4.39h2.97v-1.3H118v-2.15h-1.46v2.14h-1.62v1.31h1.62v4.39Zm7.37-7.92a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.45v-8.57h-1.45v8.57Zm3.38-8.57v1.31h1.61v7.26h1.47v-7.26h2.97v-1.3h-2.97v-1.1c0-1.12.64-1.78 1.61-1.78.5 0 .88.15 1.2.39l.65-1.2c-.47-.28-1.1-.5-1.88-.5-1.87 0-3.05 1.3-3.05 3.13v1.05h-1.61Zm8.54-2.22a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.44v-8.57h-1.44v8.57Zm12.11-1.41-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.83 0-3.14-1.24-3.2-3.3h6.59c.05-.23.1-.56.1-.9 0-2.1-1.51-3.74-3.84-3.74-2.66 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.88-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.3-2.3 2.7-2.3Zm6.33 7.68h1.44v-5.88c.53-.87 1.26-1.45 2.38-1.45.34 0 .6.04.85.1v-1.4a3.13 3.13 0 0 0-3.23 1.14v-1.08h-1.44v8.57Zm13.66.24c1.11 0 2.23-.5 2.88-1.33v1.09h1.44v-5.75c0-1.88-1.29-3.16-3.47-3.16-1.5 0-2.7.63-3.45 1.65l1.1.83a2.78 2.78 0 0 1 2.3-1.19c1.23 0 2.08.68 2.08 1.87v.6l-2.9.47c-1.81.31-2.8 1.23-2.8 2.52 0 1.46 1.14 2.4 2.82 2.4Zm-1.36-2.45c0-.73.53-1.26 1.7-1.46l2.54-.43v1.69a3 3 0 0 1-2.64 1.46c-1 0-1.6-.53-1.6-1.26Zm7.2-6.36 3.36 8.57h1.9l3.35-8.57h-1.56L172.54 25l-2.74-7.06h-1.56Zm17.86 7.16-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.14-1.24-3.2-3.3h6.58c.06-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.31 2.02-4.31 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm10.24 6.66c-1.86 0-3.17-1.43-3.17-3.26 0-1.82 1.31-3.27 3.15-3.27 1.07 0 1.94.51 2.46 1.26l1.14-.87a4.43 4.43 0 0 0-3.6-1.75 4.51 4.51 0 0 0-4.66 4.63c0 2.5 1.82 4.62 4.66 4.62 1.56 0 2.8-.68 3.6-1.75l-1.14-.87a2.95 2.95 0 0 1-2.44 1.26ZM65.85 44.5h2.56v-5.36h4.07V37H68.4v-2.99h4.79V31.9h-7.35v12.6Zm8.9 0h2.3v-5.81a2.48 2.48 0 0 1 2.17-1.2c.41 0 .72.06 1 .13v-2.25a2.52 2.52 0 0 0-.79-.12c-1.02 0-1.8.47-2.39 1.08v-.9h-2.29v9.07Zm9.43.27c1.07 0 2.15-.45 2.72-1.15v.88h2.29v-5.87c0-2-1.35-3.56-3.98-3.56-1.66 0-2.99.68-3.8 1.8l1.68 1.28a2.46 2.46 0 0 1 2.05-1.08c1.04 0 1.76.6 1.76 1.56v.24l-2.77.46c-1.94.33-3 1.35-3 2.72 0 1.68 1.24 2.72 3.05 2.72Zm-.79-2.83c0-.55.4-.95 1.35-1.11l2.16-.36v1.28c-.45.72-1.2 1.2-2.25 1.2-.77 0-1.26-.4-1.26-1Zm8.42 2.56h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm15.44-1.8c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.09 1.04l1.78-1.37a4.69 4.69 0 0 0-3.84-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 3-.72 3.84-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.06 1.04Zm13.54.32-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.65-4.08-4.17-4.08-2.97 0-4.67 2.21-4.67 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.95.92 1.98 1.84h-4.17c.25-1.2 1.02-1.84 2.2-1.84Zm12.5 5.53c-2.38 0-4.07-1.86-4.07-4.27 0-2.41 1.7-4.27 4.07-4.27 1.44 0 2.57.7 3.3 1.73l2-1.56a6.53 6.53 0 0 0-5.3-2.56 6.55 6.55 0 0 0-6.7 6.66c0 3.6 2.72 6.66 6.7 6.66 2.28 0 4.16-1 5.3-2.57l-2-1.55a3.94 3.94 0 0 1-3.3 1.73Zm11.36-7.4a4.8 4.8 0 0 0-4.96 4.9 4.8 4.8 0 0 0 4.96 4.89 4.8 4.8 0 0 0 4.97-4.9 4.8 4.8 0 0 0-4.97-4.9Zm.04 7.63c-1.51 0-2.63-1.15-2.63-2.74 0-1.58 1.12-2.73 2.63-2.73 1.46 0 2.56 1.15 2.56 2.73 0 1.57-1.1 2.74-2.56 2.74Zm7.02 1.8h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.13 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm11.09 0h2.28v-5.92c.35-.58.96-1.35 2.11-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.3v-5.4c0-2.68-1.56-4.03-3.52-4.03-1.2 0-2.06.47-2.69 1.08v-.72h-2.28v9.07Zm19.44-1.48-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.66-4.08-4.18-4.08-2.97 0-4.66 2.21-4.66 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.94.92 1.98 1.84h-4.18c.26-1.2 1.03-1.84 2.2-1.84Zm10.75 5.76c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.08 1.04l1.78-1.37a4.69 4.69 0 0 0-3.83-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 2.99-.72 3.83-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.05 1.04Zm6.2-1.51c0 2.21 1.09 3.49 3.35 3.49.76 0 1.3-.09 1.75-.29v-2c-.3.13-.72.2-1.35.2-.9 0-1.44-.4-1.44-1.4v-3.71h2.77v-2.05h-2.77v-2.27h-2.3v2.27h-1.7v2.05h1.7v3.7Z"></path>
22
+ <path data-v-dc72de41="" fill="#000091" d="M233 30.571V25.429H223.6V16H218.448V25.429H209V30.572H218.448V40H223.6V30.571H233Z"></path>
23
+ </svg></a><a data-v-dc72de41="" href="https://franceconnect.gouv.fr/france-connect-plus" target="_blank" rel="noopener noreferrer" class="vd-france-connect-info-link text-decoration-none mt-3">Qu’est-ce que FranceConnect+ ? <i data-v-dc72de41="" class="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z mdi v-icon notranslate v-theme--dark ml-1 mb-1" style="font-size: 1em; height: 1em; width: 1em;" aria-hidden="true"></i></a></div>
24
+ </div>"
25
+ `;
26
+
27
+ exports[`FranceConnectBtn > renders correctly with connect-plus 1`] = `
28
+ "<div data-v-dc72de41="" class="vd-france-connect-btn d-flex flex-column align-start"><a data-v-dc72de41="" href="https://app.franceconnect.gouv.fr/" aria-label="S’identifier avec FranceConnect+" class="vd-france-connect-link d-inline-flex"><svg data-v-dc72de41="" viewBox="0 0 245 56" width="245px" height="56" xmlns="http://www.w3.org/2000/svg">
29
+ <path data-v-dc72de41="" fill="#000091" d="m47 19.1-15-8.68-15 8.76a.6.6 0 0 0-.3.53v16.94a.67.67 0 0 0 .3.53l15 8.6 14.99-8.7a.67.67 0 0 0 .3-.53V19.63a.6.6 0 0 0-.3-.53Z"></path>
30
+ <path data-v-dc72de41="" fill="#e1000f" d="m26.64 19.6-5.03 8.63-4.55-9.18 5.39-3.11 4.48 3.16-.29.5ZM47.3 36.58V19.62a.6.6 0 0 0-.3-.52l-15-8.68"></path>
31
+ <path data-v-dc72de41="" fill="#0063cb" d="M16.7 36.58 32 10.42v35.36l-15-8.6a.67.67 0 0 1-.3-.53V19.71v16.87Zm24.67-20.74L46.83 19l-4.5 9.15-5.38-9.24 4.42-3.07Z"></path>
32
+ <path data-v-dc72de41="" fill="#fff" d="M51.6 16.3 32.43 5.28a.93.93 0 0 0-.84 0L12.4 16.3a.89.89 0 0 0-.39.7v22a.89.89 0 0 0 .4.7l19.18 11.02a.93.93 0 0 0 .84 0L51.6 39.7A.89.89 0 0 0 52 39V17a.89.89 0 0 0-.4-.7ZM22.8 34.06h.08c-.04 0-.08 0-.08.05 0 .1.15 0 .2.1-.24 0-.46.1-.63.27 0 .06.1.06.15.06-.07.1-.23.05-.28.15l.1.05c-.05 0-.1 0-.1.05v.15c-.12 0-.17.1-.27.15.2.15.32 0 .52 0-.52.2-.95.48-1.48.63-.1 0 0 .15-.1.15.15.1.23-.05.38-.05-.66.38-1.34.7-2.04 1.13a.35.35 0 0 0-.1.2h-.2c-.1.05-.05.18-.15.28.23.15.5-.2.65 0 .05 0-.1.05-.2.05-.05 0-.05.1-.1.1H19c-.1.07-.2.12-.2.27a.22.22 0 0 0-.23.1c1.08 0 2.14-.2 3.15-.57.78-.4 1.48-.93 2.09-1.56l.05.1c-.15.43-.43.81-.81 1.08-.28.15-.48.37-.7.48-.15.08-.3.17-.43.27-.63.2-1.28.34-1.94.41l-.3.05-.67.1-2-1.13a.65.65 0 0 1-.28-.41.58.58 0 0 0 .09-.07.26.26 0 0 0-.11-.07v-.65a12.8 12.8 0 0 0 3.04-.94 8.75 8.75 0 0 0-3.04-1.34v-1.52c.55.1 1.1.22 1.64.4.41.15.8.34 1.18.57.15.14.3.27.48.38a.91.91 0 0 0 .8.05h.33a3.96 3.96 0 0 0 1.93-.9c0 .04.05.04.1.04-.07.4-.22.79-.42 1.14 0 .05-.05.15.05.2Zm2.82 3.57c.25-.1.4-.28.63-.38-.05.05-.05.15-.1.2a3.7 3.7 0 0 0-.53.4c-.57.5-1.1 1.04-1.59 1.61-.25.3-.53.58-.8.86l-.3.24-2.54-1.45c.36.03.73.02 1.08-.05a5 5 0 0 0 .86-.33v.1c.7-.27 1.23-.9 1.93-1.13.03 0 .13.1.23.05a1.88 1.88 0 0 1 1.5-.7c0 .05 0 .1.06.1h.02c-.15.13-.32.25-.5.38-.05.05 0 .1.05.1Zm-8.91-6.16v-.19c.52-.14 1.05-.2 1.59-.19a5.86 5.86 0 0 0-1.59.37Zm30.6 5.08a.67.67 0 0 1-.3.53L36.9 42.93a32.3 32.3 0 0 1-3.4-1.19 2.83 2.83 0 0 1-.05-2.24c.07-.3.2-.6.35-.88.02-.03.05-.05.05-.08h.01l.01-.03c.11-.19.24-.38.38-.55l.01-.02.02-.02.02-.01c0-.03.02-.05.05-.08.02-.05.07-.07.1-.12.17-.19.37-.36.58-.5.21-.08.43-.14.65-.18.81.06 1.62.17 2.42.33.1.01.19.05.27.1.3.06.62.04.9-.05a1.14 1.14 0 0 0 .86-.7 1.21 1.21 0 0 0 .05-1.07c-.17-.27 0-.43.19-.59l.06-.05c.09-.06.17-.14.23-.22.13-.25-.1-.4-.15-.63-.05-.1-.22-.05-.32-.2.35-.15.85-.43.63-.86-.16-.22-.38-.63-.1-.85.35-.2.85-.15 1-.48a1.14 1.14 0 0 0-.3-1.09l-.07-.1-.2-.32a6.9 6.9 0 0 0-.53-.76 4.3 4.3 0 0 1-.53-1.01c-.15-.38.05-.7.05-1.08.01-.73-.1-1.46-.33-2.15-.13-.35-.18-.73-.33-1.06-.02-.2-.1-.4-.22-.58a.37.37 0 0 1 0-.33c.2-.14.4-.3.58-.47a.57.57 0 0 0-.2-.71c-.33-.15-.3.33-.53.43h-.15c-.05-.13.05-.18.15-.28 0-.05 0-.15-.05-.15-.2 0-.38-.05-.43-.15a3.96 3.96 0 0 0-1.86-1.29c.19.06.38.1.58.1.34.08.69.04 1-.1.23-.07.28-.48.38-.7a.8.8 0 0 0-.15-.63c-.23-.33-.54-.6-.9-.76a9.13 9.13 0 0 1-.94-.48c-2.96-1.48-9.07-.2-9.53 0-.44.13-.86.29-1.26.48a3.92 3.92 0 0 0-2.36 2.46c-.57.38-1.03.9-1.34 1.51-.42.8-1.05 1.51-.95 2.41.1.78.28 1.49.43 2.3.04.27.1.53.2.8s0 .62.15.85c.07.15.02.33.22.43v.2c.05.05.05.1.16.1v.2c.43.42.8.9 1.1 1.43.1.28-.48.15-.7.05-.41-.27-.8-.6-1.13-.96a.18.18 0 0 0-.05.1c.2.36.9.78.53 1.01-.2.1-.43-.15-.63.05-.05.08 0 .18 0 .28-.28-.2-.58-.1-.86-.2-.2-.05-.25-.43-.48-.43-.6-.14-1.2-.25-1.8-.33-.58-.08-1.16-.14-1.75-.16V19.71a.6.6 0 0 1 .31-.53L32 10.42l15 8.68a.6.6 0 0 1 .3.52v16.93Zm-7.96-8.26a.32.32 0 0 1-.28.15l-.28.27c.1 0 0 .15.1.15-.2.23.08.7-.2.8-.37.1-.76.1-1.13 0a.72.72 0 0 1 .17-.02h.08a.38.38 0 0 0 .34-.13v-.2c0-.05-.05-.05-.1-.05a.16.16 0 0 1-.1.05.22.22 0 0 0-.16-.2.8.8 0 0 1-.72-.27.67.67 0 0 1 .44-.05c.13 0 .08-.23.23-.33h.16c.3-.37.87-.47.97-.84 0-.1-.28-.1-.49-.15a2.26 2.26 0 0 0-.82.05c-.36.05-.7.14-1.05.27.28-.2.6-.36.92-.47.24-.09.48-.15.72-.2l.13-.02.14-.03a.97.97 0 0 1 .55 0c.23.1.62.1.67.25.1.27-.15.54-.44.74-.05.08.15.14.15.23Z"></path>
33
+ <path data-v-dc72de41="" fill="#f5f5fe" d="M64.99 24.87a4.9 4.9 0 0 0 4.08 1.95c2.1 0 3.69-1.3 3.69-3.36 0-3.96-5.63-3.35-5.63-6.02 0-1.02.75-1.75 1.92-1.75 1.02 0 1.85.56 2.55 1.56l1.2-1.05a4.54 4.54 0 0 0-3.77-1.94c-2.07 0-3.53 1.45-3.53 3.21 0 3.93 5.64 3.35 5.64 6.04 0 1.09-.77 1.88-2.1 1.88-1.1 0-2.05-.56-2.86-1.61l-1.2 1.09Zm10.81-5.71 1.75-4.56H75.9l-1.44 4.56h1.34Zm4.82-3.46a1 1 0 0 0 1-1.01 1 1 0 0 0-1-1c-.56 0-1.02.45-1.02 1 0 .56.46 1.02 1.02 1.02Zm-.73 10.8h1.45v-8.57h-1.45v8.57Zm3.77-4.28c0 2.5 1.72 4.62 4.4 4.62 1.28 0 2.28-.5 3.04-1.36v1.02h1.45V13.75H91.1v5.2a3.89 3.89 0 0 0-3.04-1.36c-2.68 0-4.4 2.13-4.4 4.63Zm1.53 0c0-1.82 1.22-3.27 3.04-3.27 1.17 0 2.21.56 2.87 1.58v3.37a3.33 3.33 0 0 1-2.87 1.58c-1.82 0-3.04-1.45-3.04-3.26Zm18.02 2.87-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.15-1.24-3.2-3.3h6.58c.05-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.68 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm6.32 7.68h1.45v-5.93c.54-.9 1.32-1.62 2.56-1.62 1.33 0 2.2.89 2.2 2.42v5.13h1.44v-5.18c0-2.44-1.43-3.73-3.35-3.73-1.27 0-2.16.55-2.85 1.31v-.97h-1.45v8.57Zm11.06-2.87c0 2.09 1.07 3.04 2.97 3.04.61 0 1.07-.07 1.48-.24v-1.29c-.32.14-.72.2-1.28.2-1.03 0-1.71-.37-1.71-1.71v-4.39h2.97v-1.3H118v-2.15h-1.46v2.14h-1.62v1.31h1.62v4.39Zm7.37-7.92a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.45v-8.57h-1.45v8.57Zm3.38-8.57v1.31h1.61v7.26h1.47v-7.26h2.97v-1.3h-2.97v-1.1c0-1.12.64-1.78 1.61-1.78.5 0 .88.15 1.2.39l.65-1.2c-.47-.28-1.1-.5-1.88-.5-1.87 0-3.05 1.3-3.05 3.13v1.05h-1.61Zm8.54-2.22a1 1 0 0 0 1-1.03 1 1 0 0 0-1-1c-.56 0-1.02.46-1.02 1 0 .57.46 1.03 1.02 1.03Zm-.73 10.79h1.44v-8.57h-1.44v8.57Zm12.11-1.41-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.83 0-3.14-1.24-3.2-3.3h6.59c.05-.23.1-.56.1-.9 0-2.1-1.51-3.74-3.84-3.74-2.66 0-4.32 2.02-4.32 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.88-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.3-2.3 2.7-2.3Zm6.33 7.68h1.44v-5.88c.53-.87 1.26-1.45 2.38-1.45.34 0 .6.04.85.1v-1.4a3.13 3.13 0 0 0-3.23 1.14v-1.08h-1.44v8.57Zm13.66.24c1.11 0 2.23-.5 2.88-1.33v1.09h1.44v-5.75c0-1.88-1.29-3.16-3.47-3.16-1.5 0-2.7.63-3.45 1.65l1.1.83a2.78 2.78 0 0 1 2.3-1.19c1.23 0 2.08.68 2.08 1.87v.6l-2.9.47c-1.81.31-2.8 1.23-2.8 2.52 0 1.46 1.14 2.4 2.82 2.4Zm-1.36-2.45c0-.73.53-1.26 1.7-1.46l2.54-.43v1.69a3 3 0 0 1-2.64 1.46c-1 0-1.6-.53-1.6-1.26Zm7.2-6.36 3.36 8.57h1.9l3.35-8.57h-1.56L172.54 25l-2.74-7.06h-1.56Zm17.86 7.16-1.07-.83a3.19 3.19 0 0 1-2.6 1.27c-1.84 0-3.14-1.24-3.2-3.3h6.58c.06-.23.1-.56.1-.9 0-2.1-1.5-3.74-3.84-3.74-2.65 0-4.31 2.02-4.31 4.63a4.5 4.5 0 0 0 4.67 4.62c1.6 0 2.87-.68 3.67-1.75Zm-4.06-6.27a2.31 2.31 0 0 1 2.43 2.3h-5.13c.3-1.47 1.29-2.3 2.7-2.3Zm10.24 6.66c-1.86 0-3.17-1.43-3.17-3.26 0-1.82 1.31-3.27 3.15-3.27 1.07 0 1.94.51 2.46 1.26l1.14-.87a4.43 4.43 0 0 0-3.6-1.75 4.51 4.51 0 0 0-4.66 4.63c0 2.5 1.82 4.62 4.66 4.62 1.56 0 2.8-.68 3.6-1.75l-1.14-.87a2.95 2.95 0 0 1-2.44 1.26ZM65.85 44.5h2.56v-5.36h4.07V37H68.4v-2.99h4.79V31.9h-7.35v12.6Zm8.9 0h2.3v-5.81a2.48 2.48 0 0 1 2.17-1.2c.41 0 .72.06 1 .13v-2.25a2.52 2.52 0 0 0-.79-.12c-1.02 0-1.8.47-2.39 1.08v-.9h-2.29v9.07Zm9.43.27c1.07 0 2.15-.45 2.72-1.15v.88h2.29v-5.87c0-2-1.35-3.56-3.98-3.56-1.66 0-2.99.68-3.8 1.8l1.68 1.28a2.46 2.46 0 0 1 2.05-1.08c1.04 0 1.76.6 1.76 1.56v.24l-2.77.46c-1.94.33-3 1.35-3 2.72 0 1.68 1.24 2.72 3.05 2.72Zm-.79-2.83c0-.55.4-.95 1.35-1.11l2.16-.36v1.28c-.45.72-1.2 1.2-2.25 1.2-.77 0-1.26-.4-1.26-1Zm8.42 2.56h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm15.44-1.8c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.09 1.04l1.78-1.37a4.69 4.69 0 0 0-3.84-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 3-.72 3.84-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.06 1.04Zm13.54.32-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.65-4.08-4.17-4.08-2.97 0-4.67 2.21-4.67 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.95.92 1.98 1.84h-4.17c.25-1.2 1.02-1.84 2.2-1.84Zm12.5 5.53c-2.38 0-4.07-1.86-4.07-4.27 0-2.41 1.7-4.27 4.07-4.27 1.44 0 2.57.7 3.3 1.73l2-1.56a6.53 6.53 0 0 0-5.3-2.56 6.55 6.55 0 0 0-6.7 6.66c0 3.6 2.72 6.66 6.7 6.66 2.28 0 4.16-1 5.3-2.57l-2-1.55a3.94 3.94 0 0 1-3.3 1.73Zm11.36-7.4a4.8 4.8 0 0 0-4.96 4.9 4.8 4.8 0 0 0 4.96 4.89 4.8 4.8 0 0 0 4.97-4.9 4.8 4.8 0 0 0-4.97-4.9Zm.04 7.63c-1.51 0-2.63-1.15-2.63-2.74 0-1.58 1.12-2.73 2.63-2.73 1.46 0 2.56 1.15 2.56 2.73 0 1.57-1.1 2.74-2.56 2.74Zm7.02 1.8h2.28v-5.92c.34-.58.96-1.35 2.1-1.35 1.13 0 1.8.75 1.8 1.96v5.31h2.31v-5.4c0-2.68-1.56-4.03-3.53-4.03-1.2 0-2.05.47-2.68 1.08v-.72h-2.28v9.07Zm11.09 0h2.28v-5.92c.35-.58.96-1.35 2.11-1.35 1.12 0 1.8.75 1.8 1.96v5.31h2.3v-5.4c0-2.68-1.56-4.03-3.52-4.03-1.2 0-2.06.47-2.69 1.08v-.72h-2.28v9.07Zm19.44-1.48-1.63-1.3a2.91 2.91 0 0 1-2.34 1.09c-1.43 0-2.47-.69-2.69-2.38h6.36c.07-.3.14-.77.14-1.28 0-2.37-1.66-4.08-4.18-4.08-2.97 0-4.66 2.21-4.66 4.9 0 2.64 1.82 4.89 5.04 4.89 1.71 0 3.12-.7 3.96-1.84Zm-4.39-6.08c1.28 0 1.94.92 1.98 1.84h-4.18c.26-1.2 1.03-1.84 2.2-1.84Zm10.75 5.76c-1.53 0-2.63-1.13-2.63-2.74 0-1.58 1.1-2.73 2.6-2.73.93 0 1.65.41 2.08 1.04l1.78-1.37a4.69 4.69 0 0 0-3.83-1.83c-3.13 0-5 2.25-5 4.9 0 2.64 1.87 4.89 5 4.89 1.66 0 2.99-.72 3.83-1.84l-1.78-1.36a2.42 2.42 0 0 1-2.05 1.04Zm6.2-1.51c0 2.21 1.09 3.49 3.35 3.49.76 0 1.3-.09 1.75-.29v-2c-.3.13-.72.2-1.35.2-.9 0-1.44-.4-1.44-1.4v-3.71h2.77v-2.05h-2.77v-2.27h-2.3v2.27h-1.7v2.05h1.7v3.7Z"></path>
34
+ <path data-v-dc72de41="" fill="#f5f5fe" d="M233 30.571V25.429H223.6V16H218.448V25.429H209V30.572H218.448V40H223.6V30.571H233Z"></path>
35
+ </svg></a><a data-v-dc72de41="" href="https://franceconnect.gouv.fr/france-connect-plus" target="_blank" rel="noopener noreferrer" class="vd-france-connect-info-link text-decoration-none mt-3">Qu’est-ce que FranceConnect+ ? <i data-v-dc72de41="" class="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z mdi v-icon notranslate v-theme--light ml-1 mb-1" style="font-size: 1em; height: 1em; width: 1em;" aria-hidden="true"></i></a></div>"
36
+ `;
@@ -0,0 +1,37 @@
1
+ import { Controls, Canvas, Meta, Source } from '@storybook/blocks';import * as LangBtnStories from './LangBtn.stories';
2
+
3
+ <Meta of={LangBtnStories} />
4
+
5
+ # LangBtn
6
+
7
+ Le composant `LangBtn` est utilisé pour afficher une alerte à l’utilisateur.
8
+
9
+ <Canvas of={LangBtnStories.Default} />
10
+
11
+ # API
12
+
13
+ <Controls of={LangBtnStories.Default} />
14
+
15
+ # Exemple d'utilisation
16
+
17
+ <Source dark code={`
18
+ <script setup lang="ts">
19
+ import LangBtn from '@/components/LangBtn/LangBtn.vue'
20
+ import { ref } from 'vue'
21
+
22
+ const value = ref('fr')
23
+ const items = ['fr', 'en', 'co']
24
+ const ariaLabel = 'Choix de la langue'
25
+ </script>
26
+
27
+ <template>
28
+ <div class="mt-12 ml-12">
29
+ <LangBtn
30
+ v-model="value"
31
+ :available-languages="items"
32
+ :aria-label="ariaLabel"
33
+ hide-down-arrow
34
+ />
35
+ </div>
36
+ </template>
37
+ `} />
@@ -0,0 +1,147 @@
1
+ import LangBtn from './LangBtn.vue'
2
+ import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import { VBtn, VMenu, VList, VListItem, VListItemTitle } from 'vuetify/components'
4
+
5
+ const meta: Meta<typeof LangBtn> = {
6
+ title: 'Components/LangBtn',
7
+ component: LangBtn,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ controls: { exclude: ['currentLangData', 'updateLang', 'selectedLanguage'] },
11
+ },
12
+ argTypes: {
13
+ modelValue: { control: 'text' },
14
+ hideDownArrow: { control: 'boolean' },
15
+ ariaLabel: { control: 'text' },
16
+ // @ts-expect-error Type '"array"' is not assignable to type 'Control | undefined'.
17
+ availableLanguages: { control: { type: 'array' } },
18
+ vuetifyOptions: {
19
+ constrol: { type: 'object' },
20
+ default: () => ({
21
+ menu: {
22
+ offsetY: true,
23
+ },
24
+ btn: {
25
+ color: 'primary',
26
+ variant: 'outlined',
27
+ ripple: true,
28
+ },
29
+ icon: {
30
+ class: 'ml-1',
31
+ },
32
+ }),
33
+ },
34
+ },
35
+ }
36
+
37
+ export default meta
38
+
39
+ type Story = StoryObj<typeof meta>
40
+
41
+ export const Default: Story = {
42
+ args: {
43
+ modelValue: 'en',
44
+ hideDownArrow: false,
45
+ ariaLabel: 'Select a language',
46
+ availableLanguages: ['fr', 'co', 'es'],
47
+ vuetifyOptions: {
48
+ menu: {
49
+ offsetY: true,
50
+ },
51
+ btn: {
52
+ color: 'primary',
53
+ variant: 'outlined',
54
+ ripple: true,
55
+ },
56
+ icon: {
57
+ class: 'ml-1',
58
+ },
59
+ },
60
+ },
61
+ render: (args) => {
62
+ return {
63
+ components: { LangBtn, VBtn, VMenu, VList, VListItem, VListItemTitle },
64
+ setup() {
65
+ return { args }
66
+ },
67
+ template: `
68
+ <div class="pa-4">
69
+ <LangBtn :vuetify-options="args.vuetifyOptions" v-bind="args" @update:modelValue="args['update:modelValue']" />
70
+ </div>
71
+ `,
72
+ }
73
+ },
74
+ }
75
+
76
+ export const AllLanguages: Story = {
77
+ args: {
78
+ modelValue: 'fr',
79
+ hideDownArrow: false,
80
+ ariaLabel: 'Select a language',
81
+ availableLanguages: '*',
82
+ },
83
+ render: (args) => {
84
+ return {
85
+ components: { LangBtn, VBtn, VMenu, VList, VListItem, VListItemTitle },
86
+ setup() {
87
+ return { args }
88
+ },
89
+ template: `
90
+ <div class="pa-4">
91
+ <LangBtn v-bind="args" @update:modelValue="args['update:modelValue']" />
92
+ </div>
93
+ `,
94
+ }
95
+ },
96
+ }
97
+
98
+ export const NoDownArrow: Story = {
99
+ args: {
100
+ modelValue: 'fr',
101
+ hideDownArrow: true,
102
+ ariaLabel: 'Select a language',
103
+ availableLanguages: ['fr', 'en', 'de'],
104
+ },
105
+ render: (args) => {
106
+ return {
107
+ components: { LangBtn, VBtn, VMenu, VList, VListItem, VListItemTitle },
108
+ setup() {
109
+ return { args }
110
+ },
111
+ template: `
112
+ <div class="pa-4">
113
+ <LangBtn v-bind="args" @update:modelValue="args['update:modelValue']" />
114
+ </div>
115
+ `,
116
+ }
117
+ },
118
+ }
119
+
120
+ export const FlatBtn: Story = {
121
+ args: {
122
+ modelValue: 'fr',
123
+ hideDownArrow: false,
124
+ ariaLabel: 'Select a language',
125
+ availableLanguages: ['fr', 'en', 'de'],
126
+ vuetifyOptions: {
127
+ btn: {
128
+ color: 'primary',
129
+ variant: 'flat',
130
+ ripple: true,
131
+ },
132
+ },
133
+ },
134
+ render: (args) => {
135
+ return {
136
+ components: { LangBtn, VBtn, VMenu, VList, VListItem, VListItemTitle },
137
+ setup() {
138
+ return { args }
139
+ },
140
+ template: `
141
+ <div class="pa-4">
142
+ <LangBtn :vuetify-options="args.vuetifyOptions" v-bind="args" @update:modelValue="args['update:modelValue']" />
143
+ </div>
144
+ `,
145
+ }
146
+ },
147
+ }