@cnamts/synapse 0.0.14-alpha → 0.0.15-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/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -2
- package/dist/components/Customs/SySelect/SySelect.d.ts +24 -12
- package/dist/components/Customs/SySelect/locales.d.ts +3 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.d.ts +732 -16
- package/dist/components/DatePicker/DateTextInput.d.ts +8 -8
- package/dist/components/DialogBox/config.d.ts +1 -1
- package/dist/components/DownloadBtn/DownloadBtn.d.ts +2 -0
- package/dist/components/LangBtn/LangBtn.d.ts +467 -1
- package/dist/components/LangBtn/config.d.ts +1 -3
- package/dist/components/NirField/NirField.d.ts +13 -13
- package/dist/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/components/PeriodField/PeriodField.d.ts +1462 -30
- package/dist/components/PhoneField/PhoneField.d.ts +3 -3
- package/dist/components/SelectBtnField/SelectBtnField.d.ts +1 -1
- package/dist/components/SkipLink/SkipLink.d.ts +3 -2
- package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/design-system-v3.js +3038 -2936
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/vuetifyConfig.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/BackBtn/Accessibilite.stories.ts +4 -0
- package/src/components/BackBtn/BackBtn.vue +2 -1
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +4 -0
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +78 -21
- package/src/components/BackToTopBtn/BackToTopBtn.vue +15 -0
- package/src/components/BackToTopBtn/config.ts +2 -2
- package/src/components/BackToTopBtn/tests/__snapshots__/BackToTopBtn.spec.ts.snap +4 -4
- package/src/components/CopyBtn/Accessibilite.stories.ts +4 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +2 -2
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +0 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +3 -3
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +4 -4
- package/src/components/Customs/SySelect/SySelect.stories.ts +4 -0
- package/src/components/Customs/SySelect/SySelect.vue +75 -10
- package/src/components/Customs/SySelect/locales.ts +3 -0
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +24 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +1 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +3 -3
- package/src/components/DatePicker/DatePicker.vue +82 -57
- package/src/components/DatePicker/DatePickerValidation.mdx +338 -0
- package/src/components/DatePicker/DatePickerValidation.stories.ts +22 -0
- package/src/components/DatePicker/DatePickerValidationExamples.vue +535 -0
- package/src/components/DatePicker/DateTextInput.vue +3 -3
- package/src/components/DatePicker/tests/DateTextInput.spec.ts +2 -2
- package/src/components/DialogBox/DialogBox.stories.ts +5 -2
- package/src/components/DialogBox/DialogBox.vue +1 -1
- package/src/components/DialogBox/config.ts +1 -1
- package/src/components/DownloadBtn/Accessibilite.stories.ts +4 -0
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +17 -8
- package/src/components/DownloadBtn/DownloadBtn.vue +13 -6
- package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +0 -2
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +19 -0
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +12 -2
- package/src/components/LangBtn/Accessibilite.stories.ts +4 -0
- package/src/components/LangBtn/LangBtn.stories.ts +1 -4
- package/src/components/LangBtn/LangBtn.vue +68 -9
- package/src/components/LangBtn/config.ts +0 -1
- package/src/components/LangBtn/tests/LangBtn.spec.ts +30 -2
- package/src/components/PageContainer/Accessibilite.stories.ts +36 -23
- package/src/components/PaginatedTable/PaginatedTable.stories.ts +144 -18
- package/src/components/PasswordField/PasswordField.stories.ts +6 -6
- package/src/components/PasswordField/PasswordField.vue +3 -3
- package/src/components/PeriodField/PeriodField.vue +4 -4
- package/src/components/PhoneField/PhoneField.stories.ts +216 -24
- package/src/components/PhoneField/PhoneField.vue +32 -2
- package/src/components/PhoneField/tests/PhoneField.spec.ts +161 -14
- package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +2 -1
- package/src/components/RatingPicker/RatingPicker.stories.ts +1 -1
- package/src/components/SkipLink/Accessibilite.stories.ts +8 -0
- package/src/components/SkipLink/SkipLink.vue +11 -9
- package/src/components/SkipLink/tests/__snapshots__/skipLink.spec.ts.snap +7 -4
- package/src/components/SkipLink/tests/skipLink.spec.ts +120 -6
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +56 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +4 -2
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +41 -0
- package/src/components/index.ts +1 -0
- package/src/composables/rules/useFieldValidation.ts +26 -3
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +1 -1
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +31 -2
- package/src/components/LangBtn/tests/Config.spec.ts +0 -24
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
filePromise: () => Promise<AxiosResponse<Blob>>
|
|
20
20
|
fallbackFilename?: string
|
|
21
21
|
backgroundColor?: string
|
|
22
|
+
dark?: boolean
|
|
22
23
|
locales?: typeof defaultLocales
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -29,13 +30,19 @@
|
|
|
29
30
|
const props = withDefaults(defineProps<Props & CustomizableOptions>(), {
|
|
30
31
|
fallbackFilename: undefined,
|
|
31
32
|
backgroundColor: 'white',
|
|
33
|
+
dark: false,
|
|
32
34
|
locales: () => defaultLocales,
|
|
33
35
|
})
|
|
36
|
+
|
|
34
37
|
const emits = defineEmits(['error', 'success'])
|
|
35
38
|
const attrs = useAttrs()
|
|
36
39
|
const state = ref<State>('idle')
|
|
37
40
|
const options = useCustomizableOptions(config, props)
|
|
38
41
|
const btnOptions = computed(() => deepmerge(options.value.btn, attrs))
|
|
42
|
+
const isDark = computed(() => props.dark ?? false)
|
|
43
|
+
const buttonColor = computed(() => isDark.value ? 'white' : options.value.btn.color)
|
|
44
|
+
const buttonBgColor = computed(() => isDark.value ? 'transparent' : props.backgroundColor)
|
|
45
|
+
const iconColor = computed(() => isDark.value ? 'white' : options.value.icon.color)
|
|
39
46
|
|
|
40
47
|
/**
|
|
41
48
|
* Get filename and content type from headers
|
|
@@ -88,12 +95,16 @@
|
|
|
88
95
|
v-bind="btnOptions"
|
|
89
96
|
:loading="state === 'loading'"
|
|
90
97
|
class="sy-download-btn"
|
|
91
|
-
:
|
|
98
|
+
:color="buttonColor"
|
|
99
|
+
:class="`bg-${buttonBgColor}`"
|
|
92
100
|
data-testid="download-btn"
|
|
93
101
|
@click="download"
|
|
94
102
|
>
|
|
95
103
|
<slot name="icon">
|
|
96
|
-
<VIcon
|
|
104
|
+
<VIcon
|
|
105
|
+
v-bind="options.icon"
|
|
106
|
+
:color="iconColor"
|
|
107
|
+
>
|
|
97
108
|
{{ mdiDownload }}
|
|
98
109
|
</VIcon>
|
|
99
110
|
</slot>
|
|
@@ -141,8 +152,4 @@
|
|
|
141
152
|
.sy-download-btn:focus-visible::after {
|
|
142
153
|
opacity: 1;
|
|
143
154
|
}
|
|
144
|
-
|
|
145
|
-
.outlined-style {
|
|
146
|
-
border: 1px solid currentcolor;
|
|
147
|
-
}
|
|
148
155
|
</style>
|
|
@@ -4,7 +4,6 @@ exports[`DownloadBtn > renders correctly 1`] = `
|
|
|
4
4
|
<button
|
|
5
5
|
class="
|
|
6
6
|
bg-white
|
|
7
|
-
outlined-style
|
|
8
7
|
sy-download-btn
|
|
9
8
|
text-primary
|
|
10
9
|
text-wrap
|
|
@@ -47,7 +46,6 @@ exports[`DownloadBtn > with slots 1`] = `
|
|
|
47
46
|
<button
|
|
48
47
|
class="
|
|
49
48
|
bg-white
|
|
50
|
-
outlined-style
|
|
51
49
|
sy-download-btn
|
|
52
50
|
text-primary
|
|
53
51
|
text-wrap
|
|
@@ -187,6 +187,10 @@ export const Legende: StoryObj = {
|
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
</div>
|
|
190
|
+
<div class="mt-4">
|
|
191
|
+
<p>Rapport d’audit manuel : <a href="/audits/FranceConnectBtn.xlsx" style="color:#0C41BD;">Voir le rapport</a></p>
|
|
192
|
+
<p style="color: grey; font-size: 14px">Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system/issues/4005" target="_blank" style="color:#0C41BD;">issue #4005</a>)</p>
|
|
193
|
+
</div>
|
|
190
194
|
`,
|
|
191
195
|
}
|
|
192
196
|
},
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<style lang="scss" scoped>
|
|
12
12
|
@use '@/assets/tokens.scss' as *;
|
|
13
|
+
@use '../menu';
|
|
13
14
|
|
|
14
15
|
.header-menu-item {
|
|
15
16
|
color: rgb(var(--v-theme-primary));
|
|
@@ -37,6 +38,8 @@
|
|
|
37
38
|
&::first-letter {
|
|
38
39
|
text-transform: uppercase;
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
@include menu.item-focused;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
<style lang="scss" scoped>
|
|
64
64
|
@use '@/assets/tokens.scss' as *;
|
|
65
65
|
@use '../../consts' as *;
|
|
66
|
+
@use '../menu';
|
|
66
67
|
|
|
67
68
|
.sub-menu-btn {
|
|
68
69
|
display: flex;
|
|
@@ -83,6 +84,8 @@
|
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
@include menu.item-focused;
|
|
88
|
+
|
|
86
89
|
&::first-letter {
|
|
87
90
|
text-transform: uppercase;
|
|
88
91
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use '@/assets/tokens';
|
|
3
|
+
|
|
4
|
+
$red: color.channel(tokens.$primary-base, 'red');
|
|
5
|
+
$green: color.channel(tokens.$primary-base, 'green');
|
|
6
|
+
$blue: color.channel(tokens.$primary-base, 'blue');
|
|
7
|
+
$primary: $red, $green, $blue;
|
|
8
|
+
|
|
9
|
+
@mixin item-focused() {
|
|
10
|
+
border-top: 2px solid transparent;
|
|
11
|
+
border-bottom: 2px solid transparent;
|
|
12
|
+
transition: border-color 0.1s ease;
|
|
13
|
+
|
|
14
|
+
&:focus-visible {
|
|
15
|
+
outline: 0;
|
|
16
|
+
border-top: 2px solid rgb(var(--v-theme-primary, $primary));
|
|
17
|
+
border-bottom: 2px solid rgb(var(--v-theme-primary, $primary));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -48,12 +48,22 @@
|
|
|
48
48
|
font-weight: 700;
|
|
49
49
|
background-color: rgb(var(--v-theme-primary));
|
|
50
50
|
color: tokens.$neutral-white;
|
|
51
|
-
border
|
|
52
|
-
|
|
51
|
+
border: 2px solid transparent;
|
|
52
|
+
border-bottom:
|
|
53
|
+
solid 2px linear-gradient(
|
|
54
|
+
180deg,
|
|
55
|
+
transparent 0%,
|
|
56
|
+
transparent 50%,
|
|
57
|
+
tokens.$blue-lighten-80 50%,
|
|
58
|
+
tokens.$blue-lighten-80 100%
|
|
59
|
+
);
|
|
60
|
+
transition: color 0.15s 0.1s, background-color 0.15s 0.1s, border 0.15s 0.1s;
|
|
53
61
|
|
|
54
62
|
&:focus-visible {
|
|
55
63
|
background-color: tokens.$neutral-white;
|
|
56
64
|
color: rgb(var(--v-theme-primary));
|
|
65
|
+
outline: none;
|
|
66
|
+
border: 2px solid rgb(var(--v-theme-primary));
|
|
57
67
|
}
|
|
58
68
|
}
|
|
59
69
|
|
|
@@ -159,6 +159,10 @@ export const Legende: StoryObj = {
|
|
|
159
159
|
</v-btn>
|
|
160
160
|
Problèmes relevés par Tanaguru
|
|
161
161
|
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="mt-4">
|
|
164
|
+
<p>Rapport d’audit manuel : <a href="/audits/LangBtn.xlsx" style="color:#0C41BD;">Voir le rapport</a></p>
|
|
165
|
+
<p style="color: grey; font-size: 14px">Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system/issues/4009" target="_blank" style="color:#0C41BD;">issue #4009</a>)</p>
|
|
162
166
|
</div>
|
|
163
167
|
</div>
|
|
164
168
|
`,
|
|
@@ -13,13 +13,11 @@ const meta: Meta<typeof LangBtn> = {
|
|
|
13
13
|
modelValue: { control: 'text' },
|
|
14
14
|
hideDownArrow: { control: 'boolean' },
|
|
15
15
|
ariaLabel: { control: 'text' },
|
|
16
|
-
|
|
17
|
-
availableLanguages: { control: { type: 'array' } },
|
|
16
|
+
availableLanguages: { control: { type: 'object' } },
|
|
18
17
|
vuetifyOptions: {
|
|
19
18
|
control: { type: 'object' },
|
|
20
19
|
default: () => ({
|
|
21
20
|
menu: {
|
|
22
|
-
offsetY: true,
|
|
23
21
|
},
|
|
24
22
|
btn: {
|
|
25
23
|
color: 'primary',
|
|
@@ -73,7 +71,6 @@ export const Default: Story = {
|
|
|
73
71
|
availableLanguages: ['fr', 'en', 'es'],
|
|
74
72
|
vuetifyOptions: {
|
|
75
73
|
menu: {
|
|
76
|
-
offsetY: true,
|
|
77
74
|
},
|
|
78
75
|
btn: {
|
|
79
76
|
color: 'primary',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, watch } from 'vue'
|
|
2
|
+
import { computed, nextTick, ref, watch } from 'vue'
|
|
3
3
|
import type { AllLanguagesChar } from '@/components/LangBtn/types'
|
|
4
4
|
import { mdiMenuDown } from '@mdi/js'
|
|
5
5
|
import { locales } from './locales'
|
|
6
6
|
import ISO6391 from 'iso-639-1'
|
|
7
7
|
import useCustomizableOptions, { type CustomizableOptions } from '@/composables/useCustomizableOptions'
|
|
8
8
|
import defaultOptions from './config'
|
|
9
|
+
import type { VBtn, VListItem } from 'vuetify/components'
|
|
9
10
|
|
|
10
11
|
const props = withDefaults(defineProps<CustomizableOptions & {
|
|
11
12
|
modelValue?: string
|
|
@@ -90,6 +91,30 @@
|
|
|
90
91
|
}
|
|
91
92
|
})
|
|
92
93
|
|
|
94
|
+
const itemRef = ref<Array<VListItem>>([])
|
|
95
|
+
const btnRef = ref<VBtn | null>(null)
|
|
96
|
+
watch(
|
|
97
|
+
menu,
|
|
98
|
+
(newVal) => {
|
|
99
|
+
setTimeout(async () => {
|
|
100
|
+
if (newVal) {
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
requestAnimationFrame(() => {
|
|
103
|
+
const inputElement = itemRef.value[0]?.$el
|
|
104
|
+
if (inputElement) {
|
|
105
|
+
inputElement.focus()
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}, 0)
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
await nextTick()
|
|
112
|
+
btnRef.value?.$el.focus()
|
|
113
|
+
}
|
|
114
|
+
}, 0)
|
|
115
|
+
},
|
|
116
|
+
)
|
|
117
|
+
|
|
93
118
|
defineExpose({
|
|
94
119
|
currentLangData,
|
|
95
120
|
updateLang,
|
|
@@ -101,7 +126,7 @@
|
|
|
101
126
|
<div :id="menuId">
|
|
102
127
|
<VMenu
|
|
103
128
|
v-bind="options.menu"
|
|
104
|
-
|
|
129
|
+
id="lang-menu"
|
|
105
130
|
v-model="menu"
|
|
106
131
|
scroll-strategy="none"
|
|
107
132
|
role="menu"
|
|
@@ -110,15 +135,16 @@
|
|
|
110
135
|
<template #activator="{ props: activatorProps }">
|
|
111
136
|
<VBtn
|
|
112
137
|
id="lang-menu-btn"
|
|
138
|
+
v-bind="{
|
|
139
|
+
...options.btn,
|
|
140
|
+
...activatorProps,
|
|
141
|
+
}"
|
|
142
|
+
ref="btnRef"
|
|
113
143
|
:aria-label="`${props.ariaLabel} ${currentLangData.name}`"
|
|
114
144
|
aria-haspopup="menu"
|
|
115
145
|
:aria-controls="menuId"
|
|
116
146
|
:aria-owns="menuId"
|
|
117
147
|
:aria-expanded="isMenuOpen"
|
|
118
|
-
v-bind="{
|
|
119
|
-
...options.btn,
|
|
120
|
-
...activatorProps,
|
|
121
|
-
}"
|
|
122
148
|
class="vd-lang-btn"
|
|
123
149
|
>
|
|
124
150
|
{{ currentLangData.name }}
|
|
@@ -134,15 +160,22 @@
|
|
|
134
160
|
<VList
|
|
135
161
|
v-bind="options.list"
|
|
136
162
|
aria-labelledby="lang-menu-btn"
|
|
163
|
+
color="secondary"
|
|
164
|
+
:aria-activedescendant="`lang-item-${selectedLanguage}`"
|
|
165
|
+
role="menu"
|
|
137
166
|
>
|
|
138
167
|
<VListItem
|
|
139
|
-
v-for="(langData, code
|
|
168
|
+
v-for="(langData, code) in languagesData"
|
|
140
169
|
v-bind="options.listTile"
|
|
170
|
+
:id="`lang-item-${code}`"
|
|
141
171
|
:key="code"
|
|
172
|
+
ref="itemRef"
|
|
173
|
+
:active="selectedLanguage === code"
|
|
142
174
|
role="menuitem"
|
|
143
|
-
:
|
|
175
|
+
:lang="code"
|
|
176
|
+
color="primary"
|
|
177
|
+
tabindex="0"
|
|
144
178
|
:aria-label="`${props.ariaLabel} ${langData.nativeName}`"
|
|
145
|
-
:aria-labelledby="`${menuId} ${langData.nativeName}`"
|
|
146
179
|
@click="updateLang(code)"
|
|
147
180
|
>
|
|
148
181
|
<VListItemTitle v-bind="options.listTileTitle">
|
|
@@ -160,6 +193,17 @@
|
|
|
160
193
|
background-color: rgba(tokens.$colors-overlay, 0.005);
|
|
161
194
|
}
|
|
162
195
|
|
|
196
|
+
.v-list-item:focus-visible {
|
|
197
|
+
&::after {
|
|
198
|
+
color: rgb(var(--v-theme-primary));
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:deep(.v-list-item__overlay) {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
163
207
|
.vd-lang-btn {
|
|
164
208
|
font-size: 16px;
|
|
165
209
|
|
|
@@ -167,5 +211,20 @@
|
|
|
167
211
|
|
|
168
212
|
text-transform: none;
|
|
169
213
|
letter-spacing: inherit;
|
|
214
|
+
|
|
215
|
+
&:deep() {
|
|
216
|
+
.v-btn__underlay,
|
|
217
|
+
.v-btn__overlay {
|
|
218
|
+
display: none;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.vd-lang-btn:focus-visible {
|
|
224
|
+
outline: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.vd-lang-btn:focus-visible::after {
|
|
228
|
+
opacity: 1;
|
|
170
229
|
}
|
|
171
230
|
</style>
|
|
@@ -78,6 +78,28 @@ describe('LangBtn', () => {
|
|
|
78
78
|
})
|
|
79
79
|
|
|
80
80
|
it('updates language when a language is selected', async () => {
|
|
81
|
+
wrapper = mount(LangBtn, {
|
|
82
|
+
props: {
|
|
83
|
+
availableLanguages: ['fr', 'co', 'es'],
|
|
84
|
+
modelValue: 'es',
|
|
85
|
+
},
|
|
86
|
+
global: {
|
|
87
|
+
plugins: [vuetify],
|
|
88
|
+
},
|
|
89
|
+
attachTo: document.body,
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
const activatorButton = wrapper.find('.vd-lang-btn')
|
|
93
|
+
await activatorButton.trigger('click')
|
|
94
|
+
await wrapper.vm.$nextTick()
|
|
95
|
+
|
|
96
|
+
const languageItem = document.body.querySelectorAll('.v-list-item')[1] as HTMLElement
|
|
97
|
+
languageItem.click()
|
|
98
|
+
await wrapper.vm.$nextTick()
|
|
99
|
+
|
|
100
|
+
expect(wrapper.find('.vd-lang-btn').text()).toBe('corsu')
|
|
101
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
102
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['co'])
|
|
81
103
|
})
|
|
82
104
|
|
|
83
105
|
it('opens the menu when clicked', async () => {
|
|
@@ -103,7 +125,10 @@ describe('LangBtn', () => {
|
|
|
103
125
|
|
|
104
126
|
it('hides down arrow when hideDownArrow is true', () => {
|
|
105
127
|
wrapper = mount(LangBtn, {
|
|
106
|
-
props: {
|
|
128
|
+
props: {
|
|
129
|
+
hideDownArrow: true,
|
|
130
|
+
availableLanguages: ['fr', 'co', 'es'],
|
|
131
|
+
},
|
|
107
132
|
global: {
|
|
108
133
|
plugins: [vuetify],
|
|
109
134
|
},
|
|
@@ -113,7 +138,10 @@ describe('LangBtn', () => {
|
|
|
113
138
|
|
|
114
139
|
it('shows down arrow when hideDownArrow is false', () => {
|
|
115
140
|
wrapper = mount(LangBtn, {
|
|
116
|
-
props: {
|
|
141
|
+
props: {
|
|
142
|
+
hideDownArrow: false,
|
|
143
|
+
availableLanguages: ['fr', 'co', 'es'],
|
|
144
|
+
},
|
|
117
145
|
global: {
|
|
118
146
|
plugins: [vuetify],
|
|
119
147
|
},
|
|
@@ -2,6 +2,7 @@ import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPane
|
|
|
2
2
|
import type { StoryObj } from '@storybook/vue3'
|
|
3
3
|
import { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated } from './AccessibiliteItems'
|
|
4
4
|
import { mdiCheckboxMarkedCircle, mdiLink, mdiEye } from '@mdi/js'
|
|
5
|
+
import SyAlert from '@/components/SyAlert/SyAlert.vue'
|
|
5
6
|
|
|
6
7
|
const checkIcon = mdiCheckboxMarkedCircle
|
|
7
8
|
const iconEye = mdiEye
|
|
@@ -15,14 +16,22 @@ export const AccessibilitePanel: StoryObj = {
|
|
|
15
16
|
|
|
16
17
|
render: () => {
|
|
17
18
|
return {
|
|
18
|
-
components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon },
|
|
19
|
+
components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon, SyAlert },
|
|
19
20
|
|
|
20
21
|
setup() {
|
|
21
22
|
const icon = checkIcon
|
|
22
23
|
|
|
23
|
-
return { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated, icon, linkICon, iconEye }
|
|
24
|
+
return { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated, icon, linkICon, iconEye, SyAlert }
|
|
24
25
|
},
|
|
25
26
|
template: `
|
|
27
|
+
<div class="mt-6 mb-6">
|
|
28
|
+
<SyAlert
|
|
29
|
+
title="Attention au contraste"
|
|
30
|
+
:closable="false"
|
|
31
|
+
>
|
|
32
|
+
<p> Le composant étant libre dans son implémentation, l'utilisateur doit veiller à la conformité de ce critère au regard de son intégration.</p>
|
|
33
|
+
</SyAlert>
|
|
34
|
+
</div>
|
|
26
35
|
<div class="accessibiliteItems" style="display:flex; max-width: none !important;">
|
|
27
36
|
<v-col cols="6">
|
|
28
37
|
<div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
|
|
@@ -138,28 +147,32 @@ export const Legende: StoryObj = {
|
|
|
138
147
|
return { args }
|
|
139
148
|
},
|
|
140
149
|
template: `
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
<p style="color: grey;font-size: 11px; margin-bottom: 12px;">Date de conception: 20/11/2024</p>
|
|
151
|
+
<div>
|
|
152
|
+
<p>Le tableau ci-dessous liste nos recommandations suivant les <a target="blank" style="color:#0C41BD;" href="https://www.numerique.gouv.fr/publications/rgaa-accessibilite/#contenu">catégories du RGAA</a>.</p>
|
|
153
|
+
<p style="margin-bottom: 12px;font-weight:bold;">Pour rappel le composant seul ne garantie pas
|
|
154
|
+
l'accessibilité du site.</p>
|
|
155
|
+
<div style="font-size: 14px">
|
|
156
|
+
<p>Nous avons deux façons de relever les problèmes d'accessibilité des composants :</p>
|
|
157
|
+
<div>
|
|
158
|
+
<v-btn variant="tonal" color="grey" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
159
|
+
Audit
|
|
160
|
+
</v-btn>
|
|
161
|
+
Problèmes relevés par le projet
|
|
162
|
+
</div>
|
|
163
|
+
<div>
|
|
164
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
165
|
+
Tanaguru
|
|
166
|
+
</v-btn>
|
|
167
|
+
Problèmes relevés par Tanaguru
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
160
170
|
</div>
|
|
161
|
-
|
|
162
|
-
|
|
171
|
+
<div class="mt-4">
|
|
172
|
+
<p>Rapport d’audit manuel : <a href="/audits/PageContainer.xlsx" style="color:#0C41BD;">Voir le rapport</a></p>
|
|
173
|
+
<p style="color: grey; font-size: 14px">Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system/issues/4011" target="_blank" style="color:#0C41BD;">issue #4011</a>)</p>
|
|
174
|
+
</div>
|
|
175
|
+
`,
|
|
163
176
|
}
|
|
164
177
|
},
|
|
165
178
|
tags: ['!dev'],
|