@cnamts/synapse 0.0.3-alpha → 0.0.4-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.
- package/dist/design-system-v3.d.ts +712 -27
- package/dist/design-system-v3.js +2715 -1485
- package/dist/design-system-v3.umd.cjs +10 -1
- package/dist/style.css +1 -1
- package/package.json +5 -2
- package/src/components/Alert/Alert.mdx +1 -1
- package/src/components/Alert/Alert.stories.ts +91 -1
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +84 -1
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +3 -3
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +172 -11
- package/src/components/CollapsibleList/CollapsibleList.mdx +2 -2
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +37 -1
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +120 -1
- package/src/components/CopyBtn/CopyBtn.vue +1 -1
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +6 -8
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.stories.ts +270 -4
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.vue +80 -53
- package/src/components/Customs/CustomInputSelect/config.ts +10 -0
- package/src/components/Customs/CustomSelect/CustomSelect.mdx +3 -3
- package/src/components/Customs/CustomSelect/CustomSelect.stories.ts +158 -2
- package/src/components/Customs/CustomSelect/CustomSelect.vue +25 -6
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +44 -0
- package/src/components/Customs/CustomTextField/CustomTextField.stories.ts +403 -0
- package/src/components/Customs/CustomTextField/CustomTextField.vue +110 -0
- package/src/components/Customs/CustomTextField/tests/CustomTextField.spec.ts +93 -0
- package/src/components/Customs/CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap +59 -0
- package/src/components/Customs/CustomTextField/types.d.ts +3 -0
- package/src/components/DataList/DataList.mdx +77 -0
- package/src/components/DataList/DataList.stories.ts +960 -0
- package/src/components/DataList/DataList.vue +140 -0
- package/src/components/DataList/DataListLoading/DataListLoading.vue +56 -0
- package/src/components/DataList/DataListLoading/tests/DataListLoading.spec.ts +23 -0
- package/src/components/DataList/locales.ts +3 -0
- package/src/components/DataList/tests/DataList.spec.ts +194 -0
- package/src/components/DataList/types.d.ts +23 -0
- package/src/components/DataListGroup/DataListGroup.mdx +77 -0
- package/src/components/DataListGroup/DataListGroup.stories.ts +987 -0
- package/src/components/DataListGroup/DataListGroup.vue +59 -0
- package/src/components/DataListGroup/tests/DataListGroup.spec.ts +54 -0
- package/src/components/DataListGroup/tests/data/dataListGroupItems.ts +41 -0
- package/src/components/DataListGroup/types.d.ts +15 -0
- package/src/components/DataListItem/DataListItem.vue +135 -0
- package/src/components/DataListItem/config.ts +17 -0
- package/src/components/DataListItem/locales.ts +3 -0
- package/src/components/DataListItem/tests/DataListItem.spec.ts +156 -0
- package/src/components/DataListItem/types.d.ts +23 -0
- package/src/components/DownloadBtn/Accessibilite.mdx +14 -0
- package/src/components/DownloadBtn/Accessibilite.stories.ts +166 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +129 -0
- package/src/components/DownloadBtn/DownloadBtn.mdx +5 -6
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +207 -2
- package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +58 -1
- package/src/components/HeaderBar/HeaderBar.mdx +164 -45
- package/src/components/HeaderBar/HeaderBar.stories.ts +559 -15
- package/src/components/HeaderBar/HeaderBar.vue +60 -22
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.mdx +433 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.stories.ts +1089 -0
- package/src/components/HeaderBar/{HeaderComplexMenu/HeaderComplexMenu.vue → HeaderBurgerMenu/HeaderBurgerMenu.vue} +74 -45
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.mdx +38 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +89 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/__snapshots__/HeaderMenuItem.spec.ts.snap +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.mdx +17 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +121 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/HeaderMenuSection.vue +2 -2
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuSection/tests/HeaderMenuSection.spec.ts +1 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.mdx +43 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +261 -0
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/HeaderSubMenu.vue +17 -3
- package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderSubMenu/tests/HeaderSubMenu.spec.ts +1 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +180 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +13 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +62 -25
- package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +49 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +19 -23
- package/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.ts +70 -0
- package/src/components/HeaderBar/Usages.mdx +85 -0
- package/src/components/HeaderBar/consts.scss +0 -1
- package/src/components/HeaderBar/tests/HeaderBar.spec.ts +8 -2
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +5 -10
- package/src/components/HeaderLoading/HeaderLoading.mdx +28 -0
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +62 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +45 -0
- package/src/components/HeaderLoading/tests/HeaderLoading.spec.ts +22 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +128 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +784 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +194 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +74 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/config.ts +18 -0
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +127 -0
- package/src/components/HeaderNavigationBar/types.ts +7 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +31 -0
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +343 -0
- package/src/components/HeaderToolbar/HeaderToolbar.vue +487 -0
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +196 -0
- package/src/components/HeaderToolbar/types.d.ts +20 -0
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +125 -8
- package/src/components/Logo/Logo.mdx +2 -2
- package/src/components/Logo/Logo.stories.ts +147 -1
- package/src/components/LogoBrandSection/LogoBrandSection.mdx +14 -0
- package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +158 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +312 -0
- package/src/components/LogoBrandSection/assets/ameli-pro.svg +1 -0
- package/src/components/LogoBrandSection/assets/ameli.svg +1 -0
- package/src/components/LogoBrandSection/assets/cnam.svg +1 -0
- package/src/components/LogoBrandSection/assets/compte-ameli.svg +1 -0
- package/src/components/LogoBrandSection/dividerDimensionsMapping.ts +14 -0
- package/src/components/LogoBrandSection/locales.ts +14 -0
- package/src/components/LogoBrandSection/secondaryLogoMapping.ts +24 -0
- package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +365 -0
- package/src/components/LogoBrandSection/tests/__snapshots__/LogoBrandSection.spec.ts.snap +14 -0
- package/src/components/LogoBrandSection/types.ts +8 -0
- package/src/components/NotificationBar/NotificationBar.mdx +6 -6
- package/src/components/NotificationBar/NotificationBar.stories.ts +1 -1
- package/src/components/NotificationBar/NotificationBar.vue +2 -2
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +1 -1
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +86 -1
- package/src/components/PhoneField/PhoneField.mdx +49 -0
- package/src/components/PhoneField/PhoneField.stories.ts +869 -0
- package/src/components/PhoneField/PhoneField.vue +230 -0
- package/src/components/PhoneField/indicatifs.ts +104 -0
- package/src/components/PhoneField/locales.ts +4 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +179 -0
- package/src/components/SkipLink/SkipLink.stories.ts +50 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +28 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +37 -1
- package/src/components/SubHeader/SubHeader.mdx +31 -0
- package/src/components/SubHeader/SubHeader.stories.ts +1032 -0
- package/src/components/SubHeader/SubHeader.vue +185 -0
- package/src/components/SubHeader/config.ts +12 -0
- package/src/components/SubHeader/locales.ts +3 -0
- package/src/components/SubHeader/tests/SubHeader.spec.ts +144 -0
- package/src/components/index.ts +24 -7
- package/src/composables/widthable/index.ts +29 -0
- package/src/composables/widthable/tests/widthable.spec.ts +52 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -2
- package/src/main.ts +1 -0
- package/src/modules.d.ts +4 -0
- package/src/services/index.ts +1 -0
- package/src/stories/Demarrer/Accueil.mdx +10 -0
- package/src/stories/Demarrer/Accueil.stories.ts +76 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.mdx +9 -0
- package/src/stories/Demarrer/PolitiqueDeConfidentialite.stories.ts +20 -0
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.mdx +1 -2
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/Fondamentaux/EcoConception/Econception.stories.ts +1 -1
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +52 -48
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +31 -28
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +1 -1
- package/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.ts +47 -0
- package/src/utils/functions/throttleDisplayFn/throttleDisplayFn.ts +26 -0
- package/src/utils/rules/exactLength/index.ts +33 -0
- package/src/utils/rules/exactLength/locales.ts +6 -0
- package/src/utils/rules/required/index.ts +25 -0
- package/src/utils/rules/required/locales.ts +5 -0
- package/src/utils/rules/required/ruleMessageHelper.ts +14 -0
- package/src/utils/rules/required/tests/index.spec.ts +47 -0
- package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +22 -0
- package/src/utils/rules/types.d.ts +15 -0
- package/src/components/Beta/beta.mdx +0 -5
- package/src/components/Deprecated/deprecated.mdx +0 -5
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderComplexMenu.stories.ts +0 -272
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuItem/HeaderMenuItem.stories.ts +0 -49
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderMenuSection/HeaderMenuSection.stories.ts +0 -56
- package/src/components/HeaderBar/HeaderComplexMenu/HeaderSubMenu/HeaderSubMenu.stories.ts +0 -137
- package/src/components/HeaderBar/HeaderComplexMenu/tests/HeaderComplexMenu.spec.ts +0 -129
- package/src/components/HeaderBar/HeaderComplexMenu/tests/__snapshots__/HeaderComplexMenu.spec.ts.snap +0 -18
- package/src/stories/Home/Accueil.mdx +0 -7
- package/src/stories/Home/PolitiqueDeConfidentialite.mdx +0 -4
- package/src/stories/Home/synapse.webp +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/HeaderMenuItem.vue +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/HeaderMenuItem/tests/HeaderMenuItem.spec.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/conts.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/locals.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/tests/useHandleSubMenus.spec.ts +0 -0
- /package/src/components/HeaderBar/{HeaderComplexMenu → HeaderBurgerMenu}/useHandleSubMenus.ts +0 -0
- /package/src/components/Logo/{types.d.ts → types.ts} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import throttleDisplayFn from '@/utils/functions/throttleDisplayFn/throttleDisplayFn'
|
|
3
|
+
import { computed, onMounted, onUnmounted, provide, ref, watch, type CSSProperties, type DeepReadonly, type Ref } from 'vue'
|
|
4
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
3
5
|
import HeaderLogo from './HeaderLogo/HeaderLogo.vue'
|
|
4
6
|
import { registerHeaderMenuKey } from './consts'
|
|
5
7
|
import { locales } from './locales'
|
|
@@ -16,6 +18,11 @@
|
|
|
16
18
|
homeAriaLabel?: string
|
|
17
19
|
serviceTitle?: string
|
|
18
20
|
serviceSubtitle?: string
|
|
21
|
+
homeLink?: {
|
|
22
|
+
ariaLabel?: string
|
|
23
|
+
to?: RouteLocationRaw
|
|
24
|
+
href?: string
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
defineSlots<{
|
|
@@ -23,6 +30,7 @@
|
|
|
23
30
|
'append': (props: SlotProps) => unknown
|
|
24
31
|
'menu': (props: SlotProps) => unknown
|
|
25
32
|
'logo': (props: SlotProps & LogoProps) => unknown
|
|
33
|
+
'logo-brand-content': (props: SlotProps & LogoProps) => unknown
|
|
26
34
|
'header-side': (props: SlotProps) => unknown
|
|
27
35
|
}>()
|
|
28
36
|
|
|
@@ -34,6 +42,11 @@
|
|
|
34
42
|
* Need 'sticky' at true,
|
|
35
43
|
*/
|
|
36
44
|
hideWhenDown?: boolean
|
|
45
|
+
homeLink?: {
|
|
46
|
+
ariaLabel?: string
|
|
47
|
+
to?: RouteLocationRaw
|
|
48
|
+
href?: string
|
|
49
|
+
}
|
|
37
50
|
} & LogoProps>(),
|
|
38
51
|
{
|
|
39
52
|
sticky: true,
|
|
@@ -41,9 +54,10 @@
|
|
|
41
54
|
homeAriaLabel: locales.homeAriaLabel,
|
|
42
55
|
serviceTitle: undefined,
|
|
43
56
|
serviceSubtitle: undefined,
|
|
57
|
+
homeLink: undefined,
|
|
44
58
|
})
|
|
45
59
|
|
|
46
|
-
function registerHeaderMenu(childMenuStatus: Ref<boolean
|
|
60
|
+
function registerHeaderMenu(childMenuStatus: DeepReadonly<Ref<boolean>>) {
|
|
47
61
|
watch(childMenuStatus, (newVal) => {
|
|
48
62
|
menuOpen.value = newVal
|
|
49
63
|
})
|
|
@@ -57,6 +71,8 @@
|
|
|
57
71
|
const headerMinHeight = ref('auto')
|
|
58
72
|
/** The position of the header (when static) from the top of the page */
|
|
59
73
|
const headerOffset = ref(0)
|
|
74
|
+
/** The width of the header to have the same width when fixed and in a container */
|
|
75
|
+
const headerWidth = ref<string | number>('auto')
|
|
60
76
|
/** Is the top of the header visible in the viewport when static */
|
|
61
77
|
const isTopOfHeaderVisible = ref(true)
|
|
62
78
|
/** Is the header out of the viewport */
|
|
@@ -67,7 +83,8 @@
|
|
|
67
83
|
function handleScroll() {
|
|
68
84
|
const headerRec = header.value!.getBoundingClientRect()
|
|
69
85
|
headerOffset.value = headerRec.top + window.scrollY
|
|
70
|
-
headerMinHeight.value =
|
|
86
|
+
headerMinHeight.value = `${headerSticky.value!.offsetHeight}px`
|
|
87
|
+
headerWidth.value = `${header.value!.offsetWidth}px`
|
|
71
88
|
isTopOfHeaderVisible.value = window.scrollY <= headerOffset.value
|
|
72
89
|
isScrollBelowHeader.value = window.scrollY > headerOffset.value + headerRec.height
|
|
73
90
|
|
|
@@ -75,15 +92,17 @@
|
|
|
75
92
|
shouldAnimateHideHeader.value = window.scrollY > headerOffset.value + (headerRec.height * 2)
|
|
76
93
|
}
|
|
77
94
|
|
|
95
|
+
const throttledHandleScroll = throttleDisplayFn(handleScroll, 16)
|
|
96
|
+
|
|
78
97
|
onMounted(() => {
|
|
79
98
|
handleScroll()
|
|
80
|
-
window.addEventListener('scroll',
|
|
81
|
-
window.addEventListener('resize',
|
|
99
|
+
window.addEventListener('scroll', throttledHandleScroll)
|
|
100
|
+
window.addEventListener('resize', throttledHandleScroll)
|
|
82
101
|
})
|
|
83
102
|
|
|
84
103
|
onUnmounted(() => {
|
|
85
|
-
window.removeEventListener('scroll',
|
|
86
|
-
window.removeEventListener('resize',
|
|
104
|
+
window.removeEventListener('scroll', throttledHandleScroll)
|
|
105
|
+
window.removeEventListener('resize', throttledHandleScroll)
|
|
87
106
|
})
|
|
88
107
|
|
|
89
108
|
const headerStyle = computed<CSSProperties>(() => {
|
|
@@ -114,19 +133,23 @@
|
|
|
114
133
|
|
|
115
134
|
return {
|
|
116
135
|
position: staticHeader ? 'relative' : 'fixed',
|
|
136
|
+
width: staticHeader ? '100%' : headerWidth.value,
|
|
117
137
|
top: staticHeader ? 'auto' : '0',
|
|
118
138
|
transform: hide ? 'translateY(-100%)' : 'none',
|
|
119
139
|
transition: shouldAnimateHideHeader.value ? 'transform 0.3s ease' : 'none',
|
|
120
140
|
}
|
|
121
141
|
}
|
|
122
142
|
|
|
143
|
+
const fixedHeader = !isTopOfHeaderVisible.value && props.sticky
|
|
123
144
|
return {
|
|
124
|
-
position:
|
|
125
|
-
|
|
145
|
+
position: fixedHeader ? 'fixed' : 'relative',
|
|
146
|
+
width: fixedHeader ? headerWidth.value : '100%',
|
|
147
|
+
top: fixedHeader ? '0' : 'auto',
|
|
126
148
|
transform: 'none',
|
|
127
149
|
transition: 'none',
|
|
128
150
|
}
|
|
129
151
|
})
|
|
152
|
+
|
|
130
153
|
</script>
|
|
131
154
|
|
|
132
155
|
<template>
|
|
@@ -149,7 +172,7 @@
|
|
|
149
172
|
:menu-open
|
|
150
173
|
/>
|
|
151
174
|
</div>
|
|
152
|
-
<div class="inner-header
|
|
175
|
+
<div class="inner-header">
|
|
153
176
|
<slot
|
|
154
177
|
name="menu"
|
|
155
178
|
:menu-open
|
|
@@ -167,7 +190,21 @@
|
|
|
167
190
|
:aria-label="homeAriaLabel"
|
|
168
191
|
:service-title="serviceTitle"
|
|
169
192
|
:service-subtitle="serviceSubtitle"
|
|
170
|
-
|
|
193
|
+
:home-link
|
|
194
|
+
>
|
|
195
|
+
<template
|
|
196
|
+
#brand-content
|
|
197
|
+
>
|
|
198
|
+
<slot
|
|
199
|
+
name="logo-brand-content"
|
|
200
|
+
:menu-open
|
|
201
|
+
:home-aria-label
|
|
202
|
+
:service-title
|
|
203
|
+
:service-subtitle
|
|
204
|
+
:home-link
|
|
205
|
+
/>
|
|
206
|
+
</template>
|
|
207
|
+
</HeaderLogo>
|
|
171
208
|
</slot>
|
|
172
209
|
</div>
|
|
173
210
|
<div
|
|
@@ -198,30 +235,27 @@
|
|
|
198
235
|
@use './consts' as *;
|
|
199
236
|
|
|
200
237
|
.header {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
height: $header-height;
|
|
204
|
-
max-width: $header-max-width;
|
|
205
|
-
margin: 0 auto;
|
|
238
|
+
position: relative;
|
|
239
|
+
z-index: 1;
|
|
206
240
|
}
|
|
207
241
|
|
|
208
242
|
.sticky-header {
|
|
209
243
|
background-color: $neutral-white;
|
|
210
|
-
border-bottom: solid 1px $blue-lighten-80;
|
|
211
244
|
width: 100%;
|
|
212
|
-
height: $header-height;
|
|
213
|
-
max-width: $header-max-width;
|
|
214
245
|
z-index: 1000;
|
|
215
246
|
}
|
|
216
247
|
|
|
217
248
|
.inner-header {
|
|
218
249
|
display: flex;
|
|
219
250
|
align-items: center;
|
|
220
|
-
height:
|
|
251
|
+
height: $header-height;
|
|
252
|
+
max-width: $header-max-width;
|
|
253
|
+
margin: 0 auto;
|
|
254
|
+
border-bottom: solid 1px $blue-lighten-80;
|
|
221
255
|
}
|
|
222
256
|
|
|
223
257
|
.header-logo {
|
|
224
|
-
margin-left:
|
|
258
|
+
margin-left: 1rem;
|
|
225
259
|
}
|
|
226
260
|
|
|
227
261
|
.header-side {
|
|
@@ -231,7 +265,11 @@
|
|
|
231
265
|
}
|
|
232
266
|
|
|
233
267
|
@media screen and (min-width: $header-breakpoint) {
|
|
234
|
-
.header
|
|
268
|
+
.header-logo {
|
|
269
|
+
margin-left: 2rem;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.inner-header {
|
|
235
273
|
height: $header-height-desktop;
|
|
236
274
|
}
|
|
237
275
|
}
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta, Source } from "@storybook/blocks";
|
|
2
|
+
import * as HeaderBurgerMenuStories from "./HeaderBurgerMenu.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={HeaderBurgerMenuStories} />
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# HeaderBurgerMenu
|
|
8
|
+
|
|
9
|
+
L'utilisation de ce menu est à privilégier pour les application à destination du publique ou pour créer des menus contenant plus de six éléments.
|
|
10
|
+
|
|
11
|
+
## Utilisation
|
|
12
|
+
|
|
13
|
+
Ce menu est prévu pour être utilisé dans le composant `HeaderBar` via le slot `menu` de ce composant.
|
|
14
|
+
|
|
15
|
+
<Source
|
|
16
|
+
dark
|
|
17
|
+
code={`
|
|
18
|
+
<template>
|
|
19
|
+
<HeaderBar>
|
|
20
|
+
<template #menu>
|
|
21
|
+
<HeaderBurgerMenu>
|
|
22
|
+
menu content
|
|
23
|
+
</HeaderBurgerMenu>
|
|
24
|
+
</template>
|
|
25
|
+
</HeaderBar>
|
|
26
|
+
</template>
|
|
27
|
+
`}
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
Ce menu s'utilise conjointement avec les composants `HeaderMenuSection` et `HeaderMenuItem` pour structurer le menu.
|
|
31
|
+
|
|
32
|
+
Un composant `HeaderMenuSection` peut contenir plusieurs `HeaderMenuItem`.
|
|
33
|
+
|
|
34
|
+
Un Composant `HeaderMenuItem` doit obligatoirement être contenu dans un `HeaderMenuSection`.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<Canvas of={HeaderBurgerMenuStories.Default} />
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
<Controls of={HeaderBurgerMenuStories.Default} />
|
|
42
|
+
|
|
43
|
+
## Menu à un seul niveau
|
|
44
|
+
|
|
45
|
+
Le menu peut être utilisé avec un seul niveau de profondeur.
|
|
46
|
+
|
|
47
|
+
<Canvas
|
|
48
|
+
of={HeaderBurgerMenuStories.WithAnItem}
|
|
49
|
+
source={{
|
|
50
|
+
language: 'html',
|
|
51
|
+
format: 'dedent',
|
|
52
|
+
code:`
|
|
53
|
+
<HeaderBar>
|
|
54
|
+
<template #menu>
|
|
55
|
+
<HeaderBurgerMenu>
|
|
56
|
+
<HeaderMenuSection>
|
|
57
|
+
<HeaderMenuItem>
|
|
58
|
+
<a href="/">Item 1</a>
|
|
59
|
+
</HeaderMenuItem>
|
|
60
|
+
</HeaderMenuSection>
|
|
61
|
+
</HeaderBurgerMenu>
|
|
62
|
+
</template>
|
|
63
|
+
</HeaderBar>
|
|
64
|
+
`}}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
Il est possible d'utiliser des liens de navigation avec les composants `RouterLink` ou `NuxtLink`.
|
|
68
|
+
|
|
69
|
+
<Source
|
|
70
|
+
dark
|
|
71
|
+
code={`
|
|
72
|
+
<script setup lang="ts">
|
|
73
|
+
import { HeaderBar, HeaderBurgerMenu, HeaderMenuSection, HeaderMenuItem } from '@cnamts/synapse'
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<HeaderBar>
|
|
78
|
+
<template #menu>
|
|
79
|
+
<HeaderBurgerMenu>
|
|
80
|
+
<HeaderMenuSection>
|
|
81
|
+
<HeaderMenuItem>
|
|
82
|
+
<a href="/">Home</a>
|
|
83
|
+
</HeaderMenuItem>
|
|
84
|
+
<HeaderMenuItem>
|
|
85
|
+
<a href="/about">About</a>
|
|
86
|
+
</HeaderMenuItem>
|
|
87
|
+
<HeaderMenuItem>
|
|
88
|
+
<RouterLink to="/services">Services</RouterLink>
|
|
89
|
+
</HeaderMenuItem>
|
|
90
|
+
<HeaderMenuItem>
|
|
91
|
+
<NuxtLink to="/contact">Contact</NuxtLink>
|
|
92
|
+
</HeaderMenuItem>
|
|
93
|
+
</HeaderMenuSection>
|
|
94
|
+
</HeaderBurgerMenu>
|
|
95
|
+
</template>
|
|
96
|
+
</HeaderBar>
|
|
97
|
+
</template>
|
|
98
|
+
`}
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Menu à plusieurs niveaux
|
|
104
|
+
|
|
105
|
+
Vous pouvez également constituer votre menu avec plusieurs niveaux de profondeur. Dans ce cas là, il convient d'utiliser le composant `HeaderSubMenu` pour définir les sous-menus.
|
|
106
|
+
|
|
107
|
+
Pour conserver la logique sémantique du menu, le composant `HeaderSubMenu` doit être contenu dans un `HeaderMenuItem`.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<Canvas
|
|
111
|
+
of={HeaderBurgerMenuStories.Populated}
|
|
112
|
+
source={{
|
|
113
|
+
language: 'html',
|
|
114
|
+
code:`
|
|
115
|
+
<HeaderBar>
|
|
116
|
+
<template #menu>
|
|
117
|
+
<HeaderMenu>
|
|
118
|
+
<HeaderMenuSection >
|
|
119
|
+
<template #title>
|
|
120
|
+
Section 1
|
|
121
|
+
</template>
|
|
122
|
+
<HeaderMenuItem>
|
|
123
|
+
<a>Item 1</a>
|
|
124
|
+
</HeaderMenuItem>
|
|
125
|
+
<HeaderMenuItem>
|
|
126
|
+
<a>Item 2</a>
|
|
127
|
+
</HeaderMenuItem>
|
|
128
|
+
<headerMenuItem>
|
|
129
|
+
<HeaderSubMenu>
|
|
130
|
+
<template #title>
|
|
131
|
+
Menu de premier niveau 1
|
|
132
|
+
</template>
|
|
133
|
+
<HeaderMenuSection>
|
|
134
|
+
<template #title>
|
|
135
|
+
Section 1
|
|
136
|
+
</template>
|
|
137
|
+
<HeaderMenuItem>
|
|
138
|
+
<a>Item</a>
|
|
139
|
+
</HeaderMenuItem>
|
|
140
|
+
<HeaderSubMenu>
|
|
141
|
+
<template #title>
|
|
142
|
+
Menu de deuxième niveau 1
|
|
143
|
+
</template>
|
|
144
|
+
<HeaderMenuItem>
|
|
145
|
+
<a>Item</a>
|
|
146
|
+
</HeaderMenuItem>
|
|
147
|
+
</HeaderSubMenu>
|
|
148
|
+
</HeaderMenuSection>
|
|
149
|
+
</HeaderSubMenu>
|
|
150
|
+
</headerMenuItem>
|
|
151
|
+
</HeaderMenuSection>
|
|
152
|
+
<HeaderMenuSection>
|
|
153
|
+
<template #title>
|
|
154
|
+
Section 2
|
|
155
|
+
</template>
|
|
156
|
+
<headerMenuItem>
|
|
157
|
+
<HeaderSubMenu>
|
|
158
|
+
<template #title>
|
|
159
|
+
Menu de premier niveau 2
|
|
160
|
+
</template>
|
|
161
|
+
<HeaderMenuItem>
|
|
162
|
+
<a>Item 1</a>
|
|
163
|
+
</HeaderMenuItem>
|
|
164
|
+
<HeaderMenuItem>
|
|
165
|
+
<HeaderSubMenu>
|
|
166
|
+
<template #title>
|
|
167
|
+
Menu de deuxième niveau 2
|
|
168
|
+
</template>
|
|
169
|
+
<HeaderMenuItem>
|
|
170
|
+
<a>Item 1</a>
|
|
171
|
+
</HeaderMenuItem>
|
|
172
|
+
</HeaderSubMenu>
|
|
173
|
+
</HeaderMenuItem>
|
|
174
|
+
<HeaderMenuItem>
|
|
175
|
+
<HeaderSubMenu>
|
|
176
|
+
<template #title>
|
|
177
|
+
Menu de deuxième niveau 3
|
|
178
|
+
</template>
|
|
179
|
+
<HeaderMenuSection>
|
|
180
|
+
<template #title>
|
|
181
|
+
Section 1
|
|
182
|
+
</template>
|
|
183
|
+
<HeaderMenuItem>
|
|
184
|
+
<a>Item 1</a>
|
|
185
|
+
</HeaderMenuItem>
|
|
186
|
+
</HeaderMenuSection>
|
|
187
|
+
</HeaderSubMenu>
|
|
188
|
+
</HeaderMenuItem>
|
|
189
|
+
</HeaderSubMenu>
|
|
190
|
+
</headerMenuItem>
|
|
191
|
+
<HeaderMenuItem>
|
|
192
|
+
<a>Item 3</a>
|
|
193
|
+
</HeaderMenuItem>
|
|
194
|
+
</HeaderMenuSection>
|
|
195
|
+
<div class="pa-4">
|
|
196
|
+
<p class="font-weight-bold">Veillez vous connecter</p>
|
|
197
|
+
<VBtn variant="tonal" class="mt-4 font-weight-medium" color="primary">Je me connecte</VBtn>
|
|
198
|
+
</div>
|
|
199
|
+
</HeaderMenu>
|
|
200
|
+
</template>
|
|
201
|
+
</HeaderBar>
|
|
202
|
+
`}}
|
|
203
|
+
/>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## Construire un menu de façon dynamique
|
|
207
|
+
|
|
208
|
+
Voici un exemple de menu construit de façon dynamique.
|
|
209
|
+
|
|
210
|
+
<Canvas
|
|
211
|
+
of={HeaderBurgerMenuStories.Generated}
|
|
212
|
+
story={{
|
|
213
|
+
height: '500px',
|
|
214
|
+
}}
|
|
215
|
+
source={{
|
|
216
|
+
language: 'html',
|
|
217
|
+
format: 'dedent',
|
|
218
|
+
code:`
|
|
219
|
+
<script setup lang="ts">
|
|
220
|
+
import { HeaderBar, HeaderBurgerMenu, HeaderMenuSection, HeaderMenuItem, HeaderSubMenu } from '@cnamts/synapse'
|
|
221
|
+
import { mdiMapMarker } from '@mdi/js'
|
|
222
|
+
|
|
223
|
+
const marker = mdiMapMarker
|
|
224
|
+
|
|
225
|
+
const menu = [
|
|
226
|
+
{
|
|
227
|
+
title: 'Vous informer',
|
|
228
|
+
items: [
|
|
229
|
+
{ title: 'Actualités', href: 'https://www.ameli.fr/assure/actualites' },
|
|
230
|
+
{
|
|
231
|
+
subMenuTitle: 'Droits et démarches',
|
|
232
|
+
subMenuSubtitle: 'selon votre situation',
|
|
233
|
+
sections: [
|
|
234
|
+
{
|
|
235
|
+
title: undefined,
|
|
236
|
+
items: [
|
|
237
|
+
{ title: 'Les essentiels de l\'assuré', href: 'https://www.ameli.fr/assure/droits-demarches/principes' },
|
|
238
|
+
{ title: 'Parentalité, couple', href: 'https://www.ameli.fr/assure/droits-demarches/famille' },
|
|
239
|
+
{ title: 'Fin de vie, deuil', href: 'https://www.ameli.fr/assure/droits-demarches/fin-de-vie-deuil' },
|
|
240
|
+
{ title: 'Etudes et stages', href: 'https://www.ameli.fr/assure/droits-demarches/etudes-stages' },
|
|
241
|
+
{ title: 'Vie professionnelle, retraite', href: 'https://www.ameli.fr/assure/droits-demarches/vie-professionnelle-retraite' },
|
|
242
|
+
{ title: 'Difficultés d\'accès aux droits et aux soins', href: 'https://www.ameli.fr/assure/droits-demarches/difficultes-acces-droits-soins' },
|
|
243
|
+
{ title: 'Maladie, accident, hospitalisation', href: 'https://www.ameli.fr/assure/droits-demarches/maladie-accident-hospitalisation' },
|
|
244
|
+
{ title: 'invalidité, handicap', href: 'https://www.ameli.fr/assure/droits-demarches/invalidite-handicap' },
|
|
245
|
+
{ title: 'situations particulières', href: 'https://www.ameli.fr/assure/droits-demarches/situations-particulieres' },
|
|
246
|
+
{ title: 'réclamation, médiation, recours', href: 'https://www.ameli.fr/assure/droits-demarches/reclamation-mediation-voies-de-recours' },
|
|
247
|
+
{ title: 'Europe, international', href: 'https://www.ameli.fr/assure/droits-demarches/europe-international' },
|
|
248
|
+
],
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
subMenuTitle: 'Remboursements',
|
|
254
|
+
subMenuSubtitle: 'prestations et aides',
|
|
255
|
+
sections: [
|
|
256
|
+
{
|
|
257
|
+
title: undefined,
|
|
258
|
+
items: [
|
|
259
|
+
{ title: 'Ce qui est remboursé', href: 'https://www.ameli.fr/assure/remboursements/rembourse' },
|
|
260
|
+
{ title: 'ce qui reste à votre charge', href: 'https://www.ameli.fr/assure/remboursements/reste-charge' },
|
|
261
|
+
{ title: 'Être bien remboursé', href: 'https://www.ameli.fr/assure/remboursements/etre-bien-rembourse' },
|
|
262
|
+
{ title: 'Indemnités journalières maladie, maternité, paternité', href: 'https://www.ameli.fr/assure/remboursements/indemnites-journalieres-maladie-maternite-paternite' },
|
|
263
|
+
{ title: 'Accident du travail : prise en charge et indemnités journalières', href: 'https://www.ameli.fr/assure/remboursements/accident-travail' },
|
|
264
|
+
{ title: 'Maladie professionnelle : prise en charge et indemnités journalières', href: 'https://www.ameli.fr/assure/remboursements/maladie-professionnelle' },
|
|
265
|
+
{ title: 'Pensions, allocations et rentes', href: 'https://www.ameli.fr/assure/remboursements/pensions-allocations-rentes' },
|
|
266
|
+
{ title: 'Incapacité permanente', href: 'https://www.ameli.fr/assure/remboursements/incapacite-permanente' },
|
|
267
|
+
{ title: 'Complémentaire santé solidaire : vous n\'avez rien à payer dans la plupart des cas ', href: 'https://www.ameli.fr/assure/remboursements/cmu-aides-financieres/complementaire-sante-solidaire' },
|
|
268
|
+
{ title: 'Aide médicale de l\'État et soins urgents', href: 'https://www.ameli.fr/assure/remboursements/aide-medicale-etat-soins-urgents' },
|
|
269
|
+
{ title: 'Compte ameli, mode d\'emploi', href: 'https://www.ameli.fr/assure/remboursements/suivre-remboursements' },
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
subMenuTitle: 'Maladies et prévention',
|
|
276
|
+
sections: [
|
|
277
|
+
{
|
|
278
|
+
title: undefined,
|
|
279
|
+
items: [
|
|
280
|
+
{ title: 'Tous les thèmes de santé', href: 'https://www.ameli.fr/assure/sante/themes' },
|
|
281
|
+
{ title: 'L\'Assurance Maladie vous accompagne', href: 'https://www.ameli.fr/assure/remboursements/reste-charge' },
|
|
282
|
+
{ title: 'Mon espace santé', href: 'https://www.ameli.fr/assure/sante/mon-espace-sante' },
|
|
283
|
+
{ title: 'Mon bilan prévention', href: 'https://www.ameli.fr/assure/sante/mon-bilan-prevention' },
|
|
284
|
+
{ title: 'Réagir en cas d\'urgence ', href: 'https://www.ameli.fr/assure/sante/urgence' },
|
|
285
|
+
{ title: 'Accomplir les bons gestes ', href: 'https://www.ameli.fr/assure/sante/bons-gestes' },
|
|
286
|
+
{ title: 'Médicaments et vaccins', href: 'https://www.ameli.fr/assure/sante/medicaments' },
|
|
287
|
+
{ title: 'Déroulement d\'un examen', href: 'https://www.ameli.fr/assure/sante/examen' },
|
|
288
|
+
{ title: 'Certificat médical : dans quels cas et pour qui est-il obligatoire ?', href: 'https://www.ameli.fr/assure/sante/certificat-medical-quand-et-pour-qui' },
|
|
289
|
+
{ title: 'Devenir parent', href: 'https://www.ameli.fr/assure/sante/devenir-parent' },
|
|
290
|
+
{ title: 'Enfants', href: 'https://www.ameli.fr/assure/sante/enfants' },
|
|
291
|
+
{ title: 'Jeunes 16-25 ans', href: 'https://www.ameli.fr/assure/sante/jeunes-16-25-ans' },
|
|
292
|
+
{ title: 'Seniors', href: 'https://www.ameli.fr/assure/sante/seniors' },
|
|
293
|
+
{ title: 'Télésanté, la santé à distance', href: 'https://www.ameli.fr/assure/sante/telesante' },
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
title: 'Besoin d\'aide',
|
|
302
|
+
items: [
|
|
303
|
+
{
|
|
304
|
+
title: 'Contacter l\'Assurance Maladie',
|
|
305
|
+
subtitle: 'obtenir une attestation, envoyer une feuille de soins, contacter sa caisse, etc.',
|
|
306
|
+
href: 'https://www.ameli.fr/assure/adresses-contacts',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
title: 'Trouver un professionnel de santé',
|
|
310
|
+
subtitle: 'médecins, infirmiers...',
|
|
311
|
+
href: 'https://www.ameli.fr/assure/adresses-contacts',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
title: 'Télécharger un formulaire (ex: cerfa)',
|
|
315
|
+
href: 'https://www.ameli.fr/assure/droits-demarches/formulaires',
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
title: 'Consulter le forum',
|
|
319
|
+
href: 'https://forum-assures.ameli.fr/',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
title: 'Sourds et malentendants',
|
|
323
|
+
href: 'https://elioz.fr/elioz-connect/annuaire/assurance-maladie-annuaire/',
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
},
|
|
327
|
+
]
|
|
328
|
+
</script>
|
|
329
|
+
|
|
330
|
+
<template>
|
|
331
|
+
<HeaderBar>
|
|
332
|
+
<template #menu>
|
|
333
|
+
<HeaderBurgerMenu>
|
|
334
|
+
<HeaderMenuSection
|
|
335
|
+
v-for="section in menu"
|
|
336
|
+
:key="section.title"
|
|
337
|
+
:title="section.title"
|
|
338
|
+
>
|
|
339
|
+
<HeaderMenuItem
|
|
340
|
+
v-for="item in section.items"
|
|
341
|
+
:key="item.title"
|
|
342
|
+
>
|
|
343
|
+
<HeaderSubMenu v-if="'subMenuTitle' in item">
|
|
344
|
+
<template #title>
|
|
345
|
+
{{ item.subMenuTitle }}
|
|
346
|
+
<em
|
|
347
|
+
v-if="item?.subMenuSubtitle"
|
|
348
|
+
style="font-style: normal; color: #757777;"
|
|
349
|
+
>{{ item.subMenuSubtitle }}</em>
|
|
350
|
+
</template>
|
|
351
|
+
<HeaderMenuSection
|
|
352
|
+
v-for="subSection in item.sections"
|
|
353
|
+
:key="subSection.title"
|
|
354
|
+
:title="subSection.title"
|
|
355
|
+
>
|
|
356
|
+
<HeaderMenuItem
|
|
357
|
+
v-for="subItem in subSection.items"
|
|
358
|
+
:key="subItem.title"
|
|
359
|
+
>
|
|
360
|
+
<a :href="subItem.href">{{ subItem.title }}</a>
|
|
361
|
+
</HeaderMenuItem>
|
|
362
|
+
</HeaderMenuSection>
|
|
363
|
+
</HeaderSubMenu>
|
|
364
|
+
<a
|
|
365
|
+
v-else
|
|
366
|
+
:href="item.href"
|
|
367
|
+
>
|
|
368
|
+
{{ item.title }}
|
|
369
|
+
<em
|
|
370
|
+
v-if="'subtitle' in item"
|
|
371
|
+
style="font-style: normal; color: #757777;"
|
|
372
|
+
>{{ item.subtitle }}</em>
|
|
373
|
+
</a>
|
|
374
|
+
</HeaderMenuItem>
|
|
375
|
+
</HeaderMenuSection>
|
|
376
|
+
<h2
|
|
377
|
+
class="border-b-sm mb-2"
|
|
378
|
+
style="font-size: 1.1rem; padding: 40px 16px 8px 20px;"
|
|
379
|
+
>
|
|
380
|
+
Votre caisse
|
|
381
|
+
</h2>
|
|
382
|
+
<div style="padding: 16px 50px 16px 20px;">
|
|
383
|
+
<div class="d-flex align-center ga-2 font-weight-bold">
|
|
384
|
+
<VIcon
|
|
385
|
+
aria-label="Localisation"
|
|
386
|
+
role="img"
|
|
387
|
+
aria-hidden="false"
|
|
388
|
+
color="primary"
|
|
389
|
+
>
|
|
390
|
+
{{ marker }}
|
|
391
|
+
</VIcon>
|
|
392
|
+
<p>Vous n'avez pas sélectionné votre caisse</p>
|
|
393
|
+
</div>
|
|
394
|
+
<VBtn
|
|
395
|
+
class="mt-3 mb-4 font-weight-bold text-capitalize"
|
|
396
|
+
base-color="primary"
|
|
397
|
+
density="comfortable"
|
|
398
|
+
flat
|
|
399
|
+
height="37"
|
|
400
|
+
>
|
|
401
|
+
Sélectionner
|
|
402
|
+
</VBtn>
|
|
403
|
+
<p class="mb-8">
|
|
404
|
+
Les pages d'ameli seront alors enrichies des informations locales de votre caisse (contacts, événements régionaux, etc.)
|
|
405
|
+
</p>
|
|
406
|
+
</div>
|
|
407
|
+
</HeaderBurgerMenu>
|
|
408
|
+
</template>
|
|
409
|
+
</HeaderBar>
|
|
410
|
+
</template>
|
|
411
|
+
|
|
412
|
+
`}}
|
|
413
|
+
/>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
## Gérer la navigation avec un RouterLink
|
|
417
|
+
|
|
418
|
+
Si vous positionnez le composant dans un layout ou à la racine de votre application et que vous utilisez un routeur pour gérer la navigation, le menu ne se fermera pas automatiquement lors de la navigation.
|
|
419
|
+
|
|
420
|
+
Si vous souhaitez que le menu se ferme lors de la navigation, vous pouvez utiliser le `v-model` par défaut pour gérer l'état du menu.
|
|
421
|
+
|
|
422
|
+
<Source
|
|
423
|
+
dark
|
|
424
|
+
language="typescript"
|
|
425
|
+
format="dedent"
|
|
426
|
+
code={`
|
|
427
|
+
const menuOpen = ref(false)
|
|
428
|
+
const curRoute = useRoute()
|
|
429
|
+
watch(curRoute, () => {
|
|
430
|
+
menuOpen.value = false
|
|
431
|
+
})
|
|
432
|
+
`}
|
|
433
|
+
/>
|