@cnamts/synapse 0.0.5-alpha → 0.0.6-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 +481 -411
- package/dist/design-system-v3.js +2950 -2202
- package/dist/design-system-v3.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +17 -17
- package/src/assets/settings.scss +3 -0
- package/src/assets/tokens.scss +16 -16
- package/src/components/BackBtn/AccessibiliteItems.ts +0 -30
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackBtn/BackBtn.stories.ts +8 -8
- package/src/components/BackBtn/BackBtn.vue +0 -1
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +0 -30
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +1 -1
- package/src/components/CollapsibleList/Accessibilite.stories.ts +4 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +55 -62
- package/src/components/CollapsibleList/CollapsibleList.stories.ts +1 -1
- package/src/components/CookieBanner/Accessibilite.stories.ts +219 -0
- package/src/components/CookieBanner/AccessibiliteItems.ts +356 -0
- package/src/components/CookieBanner/CookieBanner.mdx +219 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +678 -0
- package/src/components/CookieBanner/CookieBanner.vue +225 -0
- package/src/components/CookieBanner/config.ts +38 -0
- package/src/components/CookieBanner/locales.ts +12 -0
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +129 -0
- package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +197 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +123 -0
- package/src/components/CookiesSelection/CookiesInformation/locales.ts +21 -0
- package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.ts +121 -0
- package/src/components/CookiesSelection/CookiesSelection.vue +127 -0
- package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +47 -0
- package/src/components/CookiesSelection/CookiesTable/headers.ts +14 -0
- package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.ts +30 -0
- package/src/components/CookiesSelection/CookiesTable/tests/__snapshots__/CookiesTable.spec.ts.snap +3 -0
- package/src/components/CookiesSelection/locales.ts +10 -0
- package/src/components/CookiesSelection/tests/CookiesSelection.spec.ts +184 -0
- package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +192 -0
- package/src/components/CookiesSelection/types.ts +15 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +0 -30
- package/src/components/CopyBtn/CopyBtn.mdx +1 -1
- package/src/components/CopyBtn/CopyBtn.stories.ts +4 -4
- package/src/components/CopyBtn/CopyBtn.vue +0 -1
- package/src/components/Customs/SyBtnSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyBtnSelect/Accessibilite.stories.ts +193 -0
- package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +139 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +3 -2
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +63 -7
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +21 -13
- package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyInputSelect/Accessibilite.stories.ts +166 -0
- package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +96 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +3 -2
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +5 -58
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +36 -4
- package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SySelect/Accessibilite.mdx +14 -0
- package/src/components/Customs/SySelect/Accessibilite.stories.ts +217 -0
- package/src/components/Customs/SySelect/AccessibiliteItems.ts +173 -0
- package/src/components/Customs/SySelect/SySelect.mdx +3 -2
- package/src/components/Customs/SySelect/SySelect.stories.ts +4 -58
- package/src/components/Customs/SySelect/SySelect.vue +35 -8
- package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyTextField/Accessibilite.mdx +14 -0
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +224 -0
- package/src/components/Customs/SyTextField/AccessibiliteItems.ts +198 -0
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +118 -7
- package/src/components/Customs/SyTextField/SyTextField.vue +27 -7
- package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +2 -1
- package/src/components/DataList/Accessibilite.mdx +14 -0
- package/src/components/DataList/Accessibilite.stories.ts +166 -0
- package/src/components/DataList/AccessibiliteItems.ts +47 -0
- package/src/components/DataList/DataList.mdx +1 -1
- package/src/components/DataList/DataList.stories.ts +10 -10
- package/src/components/DataList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DataListGroup/Accessibilite.mdx +14 -0
- package/src/components/DataListGroup/Accessibilite.stories.ts +225 -0
- package/src/components/DataListGroup/AccessibiliteItems.ts +79 -0
- package/src/components/DataListGroup/DataListGroup.mdx +1 -1
- package/src/components/DataListGroup/DataListGroup.stories.ts +7 -7
- package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DialogBox/Accessibilite.mdx +14 -0
- package/src/components/DialogBox/Accessibilite.stories.ts +189 -0
- package/src/components/DialogBox/AccessibiliteItems.ts +167 -0
- package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -31
- package/src/components/DownloadBtn/DownloadBtn.mdx +3 -3
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +6 -6
- package/src/components/ErrorPage/Accessibilite.mdx +14 -0
- package/src/components/ErrorPage/Accessibilite.stories.ts +189 -0
- package/src/components/ErrorPage/AccessibiliteItems.ts +205 -0
- package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +4 -4
- package/src/components/FooterBar/Accessibilite.mdx +14 -0
- package/src/components/FooterBar/Accessibilite.stories.ts +223 -0
- package/src/components/FooterBar/AccessibiliteItems.ts +257 -0
- package/src/components/FooterBar/FooterBar.mdx +2 -2
- package/src/components/FooterBar/FooterBar.stories.ts +14 -14
- package/src/components/FooterBar/FooterBar.vue +80 -73
- package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +22 -20
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +0 -30
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +1 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +3 -3
- package/src/components/HeaderBar/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/AccessibiliteItems.ts +194 -0
- package/src/components/HeaderBar/HeaderBar.vue +1 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +14 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +223 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +174 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +1 -1
- package/src/components/HeaderLoading/Accessibilite.mdx +14 -0
- package/src/components/HeaderLoading/Accessibilite.stories.ts +167 -0
- package/src/components/HeaderLoading/AccessibiliteItems.ts +29 -0
- package/src/components/HeaderLoading/HeaderLoading.mdx +1 -1
- package/src/components/HeaderLoading/HeaderLoading.stories.ts +1 -1
- package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +35 -33
- package/src/components/HeaderToolbar/Accessibilite.mdx +14 -0
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +203 -0
- package/src/components/HeaderToolbar/AccessibiliteItems.ts +200 -0
- package/src/components/HeaderToolbar/HeaderToolbar.mdx +1 -1
- package/src/components/HeaderToolbar/HeaderToolbar.stories.ts +2 -2
- package/src/components/HeaderToolbar/HeaderToolbar.vue +1 -0
- package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +3 -1
- package/src/components/LangBtn/AccessibiliteItems.ts +0 -31
- package/src/components/LangBtn/LangBtn.mdx +1 -1
- package/src/components/LangBtn/LangBtn.stories.ts +4 -4
- package/src/components/LangBtn/LangBtn.vue +3 -2
- package/src/components/Logo/Accessibilite.mdx +14 -0
- package/src/components/Logo/Accessibilite.stories.ts +223 -0
- package/src/components/Logo/AccessibiliteItems.ts +155 -0
- package/src/components/Logo/Logo.mdx +1 -1
- package/src/components/Logo/Logo.stories.ts +8 -8
- package/src/components/Logo/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LogoBrandSection/Accessibilite.mdx +14 -0
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +223 -0
- package/src/components/LogoBrandSection/AccessibiliteItems.ts +194 -0
- package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/MaintenancePage/Accessibilite.mdx +14 -0
- package/src/components/MaintenancePage/Accessibilite.stories.ts +189 -0
- package/src/components/MaintenancePage/AccessibiliteItems.ts +173 -0
- package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/Accessibilite.mdx +14 -0
- package/src/components/NirField/Accessibilite.stories.ts +214 -0
- package/src/components/NirField/AccessibiliteItems.ts +243 -0
- package/src/components/NirField/NirField.mdx +216 -0
- package/src/components/NirField/NirField.stories.ts +359 -0
- package/src/components/NirField/NirField.vue +450 -0
- package/src/components/NirField/config.ts +16 -0
- package/src/components/NirField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/locales.ts +12 -0
- package/src/components/NirField/nirValidation.ts +42 -0
- package/src/components/NirField/tests/NirField.spec.ts +119 -0
- package/src/components/NotFoundPage/Accessibilite.mdx +14 -0
- package/src/components/NotFoundPage/Accessibilite.stories.ts +190 -0
- package/src/components/NotFoundPage/AccessibiliteItems.ts +205 -0
- package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +4 -4
- package/src/components/NotificationBar/AccessibiliteItems.ts +0 -30
- package/src/components/NotificationBar/NotificationBar.mdx +1 -1
- package/src/components/PageContainer/PageContainer.mdx +1 -1
- package/src/components/PageContainer/PageContainer.stories.ts +4 -4
- package/src/components/PageContainer/PageContainer.vue +16 -15
- package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -1
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +2 -2
- package/src/components/PhoneField/Accessibilite.mdx +14 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +216 -0
- package/src/components/PhoneField/AccessibiliteItems.ts +238 -0
- package/src/components/PhoneField/PhoneField.mdx +1 -1
- package/src/components/PhoneField/PhoneField.stories.ts +2 -2
- package/src/components/PhoneField/PhoneField.vue +0 -1
- package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +1 -1
- package/src/components/SkipLink/SkipLink.stories.ts +2 -2
- package/src/components/SocialMediaLinks/Accessibilite.mdx +14 -0
- package/src/components/SocialMediaLinks/Accessibilite.stories.ts +170 -0
- package/src/components/SocialMediaLinks/AccessibiliteItems.ts +160 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +1 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +1 -1
- package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SubHeader/Accessibilite.mdx +14 -0
- package/src/components/SubHeader/Accessibilite.stories.ts +166 -0
- package/src/components/SubHeader/AccessibiliteItems.ts +146 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -1
- package/src/components/SubHeader/SubHeader.stories.ts +11 -11
- package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SyAlert/Accessibilite.mdx +14 -0
- package/src/components/{Alert → SyAlert}/Accessibilite.stories.ts +1 -1
- package/src/components/{Alert → SyAlert}/AccessibiliteItems.ts +2 -32
- package/src/components/{Alert/Alert.mdx → SyAlert/SyAlert.mdx} +9 -9
- package/src/components/{Alert/Alert.stories.ts → SyAlert/SyAlert.stories.ts} +22 -22
- package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/{Alert/tests/Alert.spec.ts → SyAlert/tests/SyAlert.spec.ts} +5 -5
- package/src/components/{Alert/tests/__snapshots__/Alert.spec.ts.snap → SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap} +2 -2
- package/src/components/UserMenuBtn/Accessibilite.mdx +14 -0
- package/src/components/UserMenuBtn/Accessibilite.stories.ts +189 -0
- package/src/components/UserMenuBtn/AccessibiliteItems.ts +155 -0
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +17 -17
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +121 -19
- package/src/components/UserMenuBtn/UserMenuBtn.vue +25 -29
- package/src/components/UserMenuBtn/config.ts +1 -1
- package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/index.ts +10 -4
- package/src/composables/rules/tests/useFieldValidation.spec.ts +60 -58
- package/src/composables/rules/useFieldValidation.ts +65 -28
- package/src/main.ts +1 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +67 -79
- package/src/stories/GuideDuDev/components.stories.ts +5 -5
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/Guidelines/Vuetify/Vuetify.mdx +11 -0
- package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +138 -0
- package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +350 -0
- /package/src/components/{Alert → CookieBanner}/Accessibilite.mdx +0 -0
- /package/src/components/{Alert → CookieBanner}/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/components/{Alert/Alert.vue → SyAlert/SyAlert.vue} +0 -0
- /package/src/components/{Alert → SyAlert}/locales.ts +0 -0
|
@@ -5,7 +5,8 @@ import * as SyBtnSelectStories from "./SyBtnSelect.stories";
|
|
|
5
5
|
|
|
6
6
|
# SyBtnSelect
|
|
7
7
|
|
|
8
|
-
Le composant `SyBtnSelect` est utilisé pour proposer une sélection d'options avec un bouton personnalisé, conforme au style du
|
|
8
|
+
Le composant `SyBtnSelect` est utilisé pour proposer une sélection d'options avec un bouton personnalisé, conforme au style du Design System et qui respecte les règles d'accessibilité RGAA.<br/>
|
|
9
|
+
Il est basé sur un `v-btn`.
|
|
9
10
|
|
|
10
11
|
<Canvas of={SyBtnSelectStories.Default}/>
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ Le composant `SyBtnSelect` est utilisé pour proposer une sélection d'options a
|
|
|
19
20
|
dark code={`
|
|
20
21
|
<script setup lang="ts">
|
|
21
22
|
import { ref } from 'vue'
|
|
22
|
-
import SyBtnSelect from '@cnamts/synapse'
|
|
23
|
+
import { SyBtnSelect } from '@cnamts/synapse'
|
|
23
24
|
|
|
24
25
|
const model = ref(null)
|
|
25
26
|
const menuItems = ['Option 1', 'Option 2', 'Option 3']
|
|
@@ -50,6 +50,62 @@ export const Default: Story = {
|
|
|
50
50
|
<script setup lang="ts">
|
|
51
51
|
import SyBtnSelect from './SyBtnSelect.vue'
|
|
52
52
|
|
|
53
|
+
const primaryInfo = 'Mes options'
|
|
54
|
+
const items = [
|
|
55
|
+
{ text: 'Administration', value: 'Administration', link: '/admin' },
|
|
56
|
+
{ text: 'Profil', value: 'Profil', link: '/profile' },
|
|
57
|
+
{ text: 'Paramètres', value: 'Paramètres', link: '/settings' },
|
|
58
|
+
{ text: 'Profil', value: 'Profil', link: '/profile' },
|
|
59
|
+
]
|
|
60
|
+
</script>
|
|
61
|
+
`,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
args: {
|
|
66
|
+
primaryInfo: 'Mes options',
|
|
67
|
+
menuItems: [
|
|
68
|
+
{ text: 'Administration', value: 'Administration', link: '/admin' },
|
|
69
|
+
{ text: 'Profil', value: 'Profil', link: '/profile' },
|
|
70
|
+
{ text: 'Paramètres', value: 'Paramètres', link: '/settings' },
|
|
71
|
+
{ text: 'Profil', value: 'Profil', link: '/profile' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
render: (args) => {
|
|
75
|
+
return {
|
|
76
|
+
components: { SyBtnSelect },
|
|
77
|
+
setup() {
|
|
78
|
+
return { args }
|
|
79
|
+
},
|
|
80
|
+
template: `
|
|
81
|
+
<div class="d-flex flex-wrap align-center pa-4">
|
|
82
|
+
<SyBtnSelect v-bind="args"/>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const withLink: Story = {
|
|
90
|
+
parameters: {
|
|
91
|
+
sourceCode: [
|
|
92
|
+
{
|
|
93
|
+
name: 'Template',
|
|
94
|
+
code: `
|
|
95
|
+
<template>
|
|
96
|
+
<SyBtnSelect
|
|
97
|
+
:primary-info="primaryInfo"
|
|
98
|
+
:menu-items="items"
|
|
99
|
+
/>
|
|
100
|
+
</template>
|
|
101
|
+
`,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Script',
|
|
105
|
+
code: `
|
|
106
|
+
<script setup lang="ts">
|
|
107
|
+
import SyBtnSelect from './SyBtnSelect.vue'
|
|
108
|
+
|
|
53
109
|
const primaryInfo = 'Mes options'
|
|
54
110
|
const items = ['Option 1', 'Option 2']
|
|
55
111
|
</script>
|
|
@@ -69,7 +125,7 @@ const items = ['Option 1', 'Option 2']
|
|
|
69
125
|
},
|
|
70
126
|
template: `
|
|
71
127
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
72
|
-
<SyBtnSelect v-bind="args"
|
|
128
|
+
<SyBtnSelect v-bind="args"/>
|
|
73
129
|
</div>
|
|
74
130
|
`,
|
|
75
131
|
}
|
|
@@ -117,7 +173,7 @@ const items = ['Option 1', 'Option 2']
|
|
|
117
173
|
},
|
|
118
174
|
template: `
|
|
119
175
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
120
|
-
<SyBtnSelect v-bind="args"
|
|
176
|
+
<SyBtnSelect v-bind="args"/>
|
|
121
177
|
</div>
|
|
122
178
|
`,
|
|
123
179
|
}
|
|
@@ -526,11 +582,11 @@ const items = ['Option 1', 'Option 2']
|
|
|
526
582
|
<div class="d-flex flex-wrap align-center pa-4">
|
|
527
583
|
<SyBtnSelect v-bind="args">
|
|
528
584
|
<template #prepend-icon>
|
|
529
|
-
<VIcon
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
585
|
+
<VIcon
|
|
586
|
+
:icon="mdiAccount"
|
|
587
|
+
class="mr-2"
|
|
588
|
+
color="red"
|
|
589
|
+
/>
|
|
534
590
|
</template>
|
|
535
591
|
</SyBtnSelect>
|
|
536
592
|
</div>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { ref, watch, computed, onMounted, useSlots } from 'vue'
|
|
2
|
+
import { ref, watch, computed, onMounted, useSlots, type PropType } from 'vue'
|
|
3
3
|
import { useDisplay } from 'vuetify'
|
|
4
4
|
|
|
5
|
+
type Item = string | Record<string, unknown>
|
|
6
|
+
|
|
5
7
|
const props = defineProps({
|
|
6
8
|
modelValue: {
|
|
7
9
|
type: [Object, String, null],
|
|
8
10
|
default: null,
|
|
9
11
|
},
|
|
10
12
|
menuItems: {
|
|
11
|
-
type: Array
|
|
13
|
+
type: Array as PropType<Item[]>,
|
|
12
14
|
default: () => [],
|
|
13
15
|
},
|
|
14
16
|
label: {
|
|
@@ -80,16 +82,12 @@
|
|
|
80
82
|
}
|
|
81
83
|
})
|
|
82
84
|
|
|
83
|
-
const selectItem = (item:
|
|
84
|
-
selectedItem.value = item
|
|
85
|
+
const selectItem = (item: Item | null) => {
|
|
86
|
+
selectedItem.value = item
|
|
85
87
|
emit('update:modelValue', item)
|
|
86
88
|
isOpen.value = false
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
const getItemText = (item: unknown) => {
|
|
90
|
-
return (item as Record<string, unknown>)[props.textKey]
|
|
91
|
-
}
|
|
92
|
-
|
|
93
91
|
const formattedItems = computed(() => {
|
|
94
92
|
return props.menuItems.map((item) => {
|
|
95
93
|
if (typeof item === 'string') {
|
|
@@ -145,9 +143,9 @@
|
|
|
145
143
|
:id="generatedId"
|
|
146
144
|
:class="btnPadding"
|
|
147
145
|
:height="iconOnly ? 'auto' : undefined"
|
|
148
|
-
:width="iconOnly ? 'auto' : undefined"
|
|
149
146
|
:icon="iconOnly"
|
|
150
147
|
:size="iconOnly ? 'x-large' : 'default'"
|
|
148
|
+
:width="iconOnly ? 'auto' : undefined"
|
|
151
149
|
class="vd-user-menu-btn"
|
|
152
150
|
v-bind="{
|
|
153
151
|
...menuProps,
|
|
@@ -168,19 +166,23 @@
|
|
|
168
166
|
<span
|
|
169
167
|
:class="`text-${props?.options['btn']?.textColor}`"
|
|
170
168
|
class="font-weight-bold"
|
|
171
|
-
>
|
|
169
|
+
>
|
|
170
|
+
{{ props.primaryInfo }}
|
|
172
171
|
</span>
|
|
173
172
|
<span
|
|
174
173
|
:class="`text-${props?.options['btn']?.textColor}`"
|
|
175
174
|
class="text-grey text-darken-2 font-weight-medium"
|
|
176
|
-
>
|
|
175
|
+
>
|
|
176
|
+
{{ props.secondaryInfo }}
|
|
177
177
|
</span>
|
|
178
178
|
</span>
|
|
179
179
|
<span
|
|
180
180
|
v-if="isMobileVersion && !iconOnly"
|
|
181
181
|
:class="`text-${props?.options['btn']?.textColor}`"
|
|
182
182
|
class="font-weight-bold text-caption"
|
|
183
|
-
>
|
|
183
|
+
>
|
|
184
|
+
{{ props.primaryInfo }}
|
|
185
|
+
</span>
|
|
184
186
|
<slot name="append-icon" />
|
|
185
187
|
</div>
|
|
186
188
|
</VBtn>
|
|
@@ -195,10 +197,11 @@
|
|
|
195
197
|
:key="index"
|
|
196
198
|
:class="`text-${props?.options['list']?.textColor}`"
|
|
197
199
|
v-bind="props.options['list']"
|
|
200
|
+
:href="item.link"
|
|
198
201
|
@click="selectItem(item)"
|
|
199
202
|
>
|
|
200
203
|
<VListItemTitle v-bind="props.options['list']">
|
|
201
|
-
{{
|
|
204
|
+
{{ item[props.textKey] }}
|
|
202
205
|
</VListItemTitle>
|
|
203
206
|
</VListItem>
|
|
204
207
|
<slot />
|
|
@@ -211,6 +214,7 @@
|
|
|
211
214
|
|
|
212
215
|
<style lang="scss" scoped>
|
|
213
216
|
@use '@/assets/tokens.scss';
|
|
217
|
+
@use '@/assets/tokens' as *;
|
|
214
218
|
|
|
215
219
|
.vd-user-menu-btn-ctn {
|
|
216
220
|
position: relative;
|
|
@@ -219,6 +223,10 @@
|
|
|
219
223
|
.v-btn.v-btn--density-default {
|
|
220
224
|
height: auto !important;
|
|
221
225
|
}
|
|
226
|
+
|
|
227
|
+
.v-btn {
|
|
228
|
+
text-transform: none !important;
|
|
229
|
+
}
|
|
222
230
|
}
|
|
223
231
|
|
|
224
232
|
.vd-user-menu-btn {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as AccessStories from './Accessibilite.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={AccessStories} />
|
|
5
|
+
|
|
6
|
+
Accessibilité
|
|
7
|
+
=============
|
|
8
|
+
<Story of={AccessStories.Legende} />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
<Story of={AccessStories.AccessibilitePanel} />
|
|
14
|
+
<br />
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon } from 'vuetify/components'
|
|
2
|
+
import type { StoryObj } from '@storybook/vue3'
|
|
3
|
+
import { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated } from './AccessibiliteItems'
|
|
4
|
+
import { mdiCheckboxMarkedCircle, mdiLink, mdiEye } from '@mdi/js'
|
|
5
|
+
|
|
6
|
+
const checkIcon = mdiCheckboxMarkedCircle
|
|
7
|
+
const iconEye = mdiEye
|
|
8
|
+
const linkICon = mdiLink
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Composants/Formulaires/SyInputSelect/Accessibilité',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const AccessibilitePanel: StoryObj = {
|
|
15
|
+
|
|
16
|
+
render: () => {
|
|
17
|
+
return {
|
|
18
|
+
components: { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon },
|
|
19
|
+
|
|
20
|
+
setup() {
|
|
21
|
+
const icon = checkIcon
|
|
22
|
+
|
|
23
|
+
return { AccessibiliteItemsIndeterminate, AccessibiliteItemsValidated, icon, linkICon, iconEye }
|
|
24
|
+
},
|
|
25
|
+
template: `
|
|
26
|
+
<div class="accessibiliteItems" style="display:flex; max-width: none !important;">
|
|
27
|
+
<v-col cols="6">
|
|
28
|
+
<div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
|
|
29
|
+
<h5>{{ AccessibiliteItemsIndeterminate.length }} critères à prendre en charge par le projet</h5>
|
|
30
|
+
<div style="display: flex; align-items: center;">
|
|
31
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
|
|
32
|
+
rounded>Tanaguru
|
|
33
|
+
</v-btn>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<v-expansion-panels value="opened" multiple>
|
|
38
|
+
<v-expansion-panel v-for="(item, index) in AccessibiliteItemsIndeterminate" :key="index" style="background-color: rgba(42, 96, 158, 0.1); margin-bottom: 10px;">
|
|
39
|
+
<v-expansion-panel-title>
|
|
40
|
+
<VIcon :icon="iconEye" style="margin-right: 5px; color:#5778b7;"/>
|
|
41
|
+
{{ item.title }}
|
|
42
|
+
</v-expansion-panel-title>
|
|
43
|
+
<v-expansion-panel-text>
|
|
44
|
+
<v-expansion-panels>
|
|
45
|
+
<v-expansion-panel>
|
|
46
|
+
<v-expansion-panel-title
|
|
47
|
+
style="font-weight: bold; font-size: 13px; line-height: 16px;">
|
|
48
|
+
{{ item.subtitle }}
|
|
49
|
+
</v-expansion-panel-title>
|
|
50
|
+
<v-expansion-panel-text>
|
|
51
|
+
<div v-for="(value, i) in item.items" :key="i">
|
|
52
|
+
<p style="font-size: 13px;line-height: 16px;">
|
|
53
|
+
{{ value.precision }}
|
|
54
|
+
</p>
|
|
55
|
+
<div v-for="element in value.solution"
|
|
56
|
+
style="margin-top:15px; font-size: 13px;line-height: 16px;">
|
|
57
|
+
<p style="font-weight: bold;">Méthodologie du test : <a
|
|
58
|
+
href="value.link" target="blank">
|
|
59
|
+
<VIcon :icon="linkICon"/>
|
|
60
|
+
</a></p>
|
|
61
|
+
|
|
62
|
+
<p>{{ element.info1 }}</p>
|
|
63
|
+
<p>{{ element.info2 }}</p>
|
|
64
|
+
<p>{{ element.info3 }}</p>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
<span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
|
|
68
|
+
</div>
|
|
69
|
+
</v-expansion-panel-text>
|
|
70
|
+
</v-expansion-panel>
|
|
71
|
+
</v-expansion-panels>
|
|
72
|
+
</v-expansion-panel-text>
|
|
73
|
+
</v-expansion-panel>
|
|
74
|
+
</v-expansion-panels>
|
|
75
|
+
</v-col>
|
|
76
|
+
<v-col cols="6">
|
|
77
|
+
<div style="display:flex; margin-bottom: 10px; justify-content: space-between; align-items: center;">
|
|
78
|
+
<h5>{{ AccessibiliteItemsValidated.length }} critères pris en charge par l'équipe Design System</h5>
|
|
79
|
+
<div style="display: flex; align-items: center;">
|
|
80
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 4px;font-size: 8px;"
|
|
81
|
+
rounded>Tanaguru
|
|
82
|
+
</v-btn>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<v-expansion-panels value="opened" multiple>
|
|
86
|
+
<v-expansion-panel
|
|
87
|
+
v-for="(item, index) in AccessibiliteItemsValidated"
|
|
88
|
+
:key="index" style="background-color: rgba(53,135,0,0.1); margin-bottom: 10px;">
|
|
89
|
+
<v-expansion-panel-title>
|
|
90
|
+
<VIcon color="green" :icon="icon" style="margin-right: 5px;"/>
|
|
91
|
+
{{ item.title }}
|
|
92
|
+
</v-expansion-panel-title>
|
|
93
|
+
<v-expansion-panel-text>
|
|
94
|
+
<v-expansion-panels>
|
|
95
|
+
<v-expansion-panel>
|
|
96
|
+
<v-expansion-panel-title style="font-weight: bold;font-size: 13px; line-height: 16px;">
|
|
97
|
+
{{ item.subtitle }}
|
|
98
|
+
</v-expansion-panel-title>
|
|
99
|
+
<v-expansion-panel-text>
|
|
100
|
+
<div v-for="(value, i) in item.items" :key="i">
|
|
101
|
+
<p style="font-size: 13px;line-height: 16px;">
|
|
102
|
+
{{ value.precision }}
|
|
103
|
+
</p>
|
|
104
|
+
<div v-for="element in value.solution"
|
|
105
|
+
style="margin-top:15px; font-size: 13px;line-height: 16px;">
|
|
106
|
+
<p style="font-weight: bold;">Méthodologie du test : <a
|
|
107
|
+
href="value.link" target="blank">
|
|
108
|
+
<VIcon :icon="linkICon"/>
|
|
109
|
+
</a></p>
|
|
110
|
+
<p>{{ element.info1 }}</p>
|
|
111
|
+
<p>{{ element.info2 }}</p>
|
|
112
|
+
<p>{{ element.info3 }}</p>
|
|
113
|
+
</div>
|
|
114
|
+
<span style="display:flex; justify-content:center; margin-bottom:5px;">______</span>
|
|
115
|
+
</div>
|
|
116
|
+
</v-expansion-panel-text>
|
|
117
|
+
</v-expansion-panel>
|
|
118
|
+
</v-expansion-panels>
|
|
119
|
+
</v-expansion-panel-text>
|
|
120
|
+
</v-expansion-panel>
|
|
121
|
+
</v-expansion-panels>
|
|
122
|
+
</v-col>
|
|
123
|
+
</div>
|
|
124
|
+
`,
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
tags: ['!dev'],
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const Legende: StoryObj = {
|
|
131
|
+
args: {
|
|
132
|
+
icon: checkIcon,
|
|
133
|
+
},
|
|
134
|
+
render: (args) => {
|
|
135
|
+
return {
|
|
136
|
+
components: { VIcon },
|
|
137
|
+
setup() {
|
|
138
|
+
return { args }
|
|
139
|
+
},
|
|
140
|
+
template: `
|
|
141
|
+
<p style="color: grey;font-size: 11px; margin-bottom: 12px;">Date de conception: 20/11/2024</p>
|
|
142
|
+
<div>
|
|
143
|
+
<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>
|
|
144
|
+
<p style="margin-bottom: 12px;font-weight:bold;">Pour rappel le composant seul ne garantie pas
|
|
145
|
+
l'accessibilité du site.</p>
|
|
146
|
+
<div style="font-size: 14px">
|
|
147
|
+
<p>Nous avons deux façons de relever les problèmes d'accessibilité des composants :</p>
|
|
148
|
+
<div>
|
|
149
|
+
<v-btn variant="tonal" color="grey" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
150
|
+
Audit
|
|
151
|
+
</v-btn>
|
|
152
|
+
Problèmes relevés par le projet
|
|
153
|
+
</div>
|
|
154
|
+
<div>
|
|
155
|
+
<v-btn variant="tonal" color="red" size="x-small" style="margin: 2px;font-size: 8px;" rounded>
|
|
156
|
+
Tanaguru
|
|
157
|
+
</v-btn>
|
|
158
|
+
Problèmes relevés par Tanaguru
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
`,
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
tags: ['!dev'],
|
|
166
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum'
|
|
2
|
+
|
|
3
|
+
export const AccessibiliteItemsIndeterminate = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Catégorie 10 : Présentation de l’information',
|
|
6
|
+
subtitle: '10.1 Dans le site web, des feuilles de styles sont-elles utilisées pour contrôler la présentation de l’information ? ?',
|
|
7
|
+
items: [
|
|
8
|
+
|
|
9
|
+
{
|
|
10
|
+
precision: '10.1.1 Dans chaque page web, les balises servant à la présentation de l’information ne doivent pas être présentes dans le code source généré des pages. Cette règle est-elle respectée ? ',
|
|
11
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#10.1.1',
|
|
12
|
+
solution: [{
|
|
13
|
+
info1: '1. Vérifier l’absence des éléments de présentation <basefont>, <big>, <blink>, <center>, <font>, <marquee>, <s>, <strike>, <tt> ; ',
|
|
14
|
+
info2: '2. Vérifier l’absence de l’élément <u> uniquement si le DOCTYPE du document ne correspond pas à HTML 5 ; ',
|
|
15
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
16
|
+
}],
|
|
17
|
+
expertise: ExpertiseLevelEnum.DEV,
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
export const AccessibiliteItemsValidated = [
|
|
27
|
+
{
|
|
28
|
+
title: 'Catégorie 1 : Images',
|
|
29
|
+
subtitle: '1.2 Chaque image de décoration est-elle correctement ignorée par les technologies d’assistance ?',
|
|
30
|
+
items: [
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
precision: '1.2.4 Chaque image vectorielle (balise <svg>) de décoration, sans légende, vérifie-t-elle ces conditions ?'
|
|
34
|
+
+ ' La balise <svg> possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
35
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’alternative textuelle ;'
|
|
36
|
+
+ ' Les balises <title> et <desc> sont absentes ou vides ;'
|
|
37
|
+
+ ' La balise <svg> et ses enfants sont dépourvus d’attribut title.',
|
|
38
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#1.2.4',
|
|
39
|
+
solution: [{
|
|
40
|
+
info1: '1. Retrouver dans le document les images décoratives dépourvues de légende structurées au moyen d’un élément <svg> ;',
|
|
41
|
+
info2: '2. Pour chaque image, vérifier que l’élément <svg> ne possède pas d’attributs aria-labelledby ou aria-label et qu’il :'
|
|
42
|
+
+ ' Possède un attribut WAI-ARIA aria-hidden="true" ;'
|
|
43
|
+
+ ' Et est dépourvu d’alternative textuelle (ainsi que ses éléments enfants) ;'
|
|
44
|
+
+ ' Et ne contient pas d’éléments <title> et <desc> à moins que vides de contenu ;'
|
|
45
|
+
+ ' Et est dépourvu d’attribut title (ainsi que ses éléments enfants).',
|
|
46
|
+
info3: '3. Si c’est le cas pour chaque image, le test est validé',
|
|
47
|
+
}],
|
|
48
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
49
|
+
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: 'Catégorie 3 : Couleurs',
|
|
56
|
+
subtitle: '3.2 Dans chaque page web, le contraste entre la couleur du texte et la couleur de son arrière-plan est-il suffisamment élevé?',
|
|
57
|
+
items: [
|
|
58
|
+
{
|
|
59
|
+
|
|
60
|
+
precision: '3.2.1 Dans chaque page web, le texte et le texte en image sans effet de graisse d’une taille restituée inférieure à 24px vérifient-ils une de ces conditions? Le rapport de contraste entre le texte et son arrière-plan est de 4.5:1, au moins; Un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 4.5:1, au moins.',
|
|
61
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#3.2.1',
|
|
62
|
+
solution: [{
|
|
63
|
+
info1: '1. Retrouver dans le document les textes et les textes en image sans effet de graisse d’une taille restituée inférieure à 24px qui pourraient poser des problèmes de contraste ;',
|
|
64
|
+
info2: '2. Pour chacun de ces textes, vérifier que : Soit le rapport de contraste entre le texte et son arrière-plan est de 4.5:1, au moins; Soit un mécanisme permet à l’utilisateur d’afficher le texte avec un rapport de contraste de 4.5:1, au moins.',
|
|
65
|
+
info3: '3. Si c’est le cas pour chaque texte, le test est validé',
|
|
66
|
+
}],
|
|
67
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
68
|
+
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
{
|
|
75
|
+
title: 'Catégorie 8 : Eléments Obligatoires',
|
|
76
|
+
subtitle: '8.9 Dans chaque page web, les balises ne doivent pas être utilisées uniquement à des fins de présentation',
|
|
77
|
+
items: [
|
|
78
|
+
|
|
79
|
+
{
|
|
80
|
+
precision: ' 8.9.1 Dans chaque page web les balises (à l’exception de <div>, <span> et <table>) ne doivent pas être utilisées uniquement à des fins de présentation. Cette règle est-elle respectée',
|
|
81
|
+
link: 'https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/#8.9.1',
|
|
82
|
+
solution: [{
|
|
83
|
+
info1: '1. Retrouver dans le document l’ensemble des éléments sémantiques utilisés à des fins de présentation ;',
|
|
84
|
+
info2: '2. Pour chacun de ces éléments, vérifier que :'
|
|
85
|
+
+ 'L’élément est pourvu d’un attribut role=“presentation” ;'
|
|
86
|
+
+ 'L’utilisation de cet élément à des fins de présentation reste justifée',
|
|
87
|
+
info3: '3. Si c’est le cas, le test est validé',
|
|
88
|
+
}],
|
|
89
|
+
expertise: ExpertiseLevelEnum.DESIGN,
|
|
90
|
+
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
]
|
|
@@ -5,7 +5,8 @@ import * as SyInputSelectStories from "./SyInputSelect.stories";
|
|
|
5
5
|
|
|
6
6
|
# SyInputSelect
|
|
7
7
|
|
|
8
|
-
Le composant `SyInputSelect` est utilisé pour proposer une alternative au `v-select` de Vuetify qui ne respecte pas les règles RGAA
|
|
8
|
+
Le composant `SyInputSelect` est utilisé pour proposer une alternative au `v-select` de Vuetify qui ne respecte pas les règles RGAA.<br/>
|
|
9
|
+
Il est basé sur un `v-input`.
|
|
9
10
|
|
|
10
11
|
<Canvas of={SyInputSelectStories.Default} />
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ Le composant `SyInputSelect` est utilisé pour proposer une alternative au `v-se
|
|
|
19
20
|
|
|
20
21
|
<Source dark code={`
|
|
21
22
|
<script setup lang="ts">
|
|
22
|
-
import SyInputSelect from '@cnamts/synapse'
|
|
23
|
+
import { SyInputSelect } from '@cnamts/synapse'
|
|
23
24
|
|
|
24
25
|
const items = [
|
|
25
26
|
{ text: 'Option 1', value: '1' },
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
2
2
|
import SyInputSelect from './SyInputSelect.vue'
|
|
3
3
|
import { VBtn, VMenu, VList, VListItem, VListItemTitle } from 'vuetify/components'
|
|
4
4
|
import { ref } from 'vue'
|
|
5
|
-
import
|
|
5
|
+
import SyAlert from '@/components/SyAlert/SyAlert.vue'
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
8
|
title: 'Composants/Formulaires/SyInputSelect',
|
|
@@ -16,6 +16,7 @@ const meta = {
|
|
|
16
16
|
items: { control: 'object' },
|
|
17
17
|
errorMessages: { control: 'object' },
|
|
18
18
|
required: { control: 'boolean' },
|
|
19
|
+
outlined: { control: 'boolean' },
|
|
19
20
|
textKey: { control: 'text' },
|
|
20
21
|
valueKey: { control: 'text' },
|
|
21
22
|
vuetifyOptions: { control: 'object' },
|
|
@@ -87,60 +88,6 @@ export const Default: Story = {
|
|
|
87
88
|
},
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
export const Outlined: Story = {
|
|
91
|
-
parameters: {
|
|
92
|
-
sourceCode: [
|
|
93
|
-
{
|
|
94
|
-
name: 'Template',
|
|
95
|
-
code: `
|
|
96
|
-
<template>
|
|
97
|
-
<SyInputSelect
|
|
98
|
-
v-model="value"
|
|
99
|
-
:items="items"
|
|
100
|
-
outlined
|
|
101
|
-
/>
|
|
102
|
-
</template>
|
|
103
|
-
`,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: 'Script',
|
|
107
|
-
code: `
|
|
108
|
-
<script setup lang="ts">
|
|
109
|
-
import SyInputSelect from '@cnamts/SyInputSelect'
|
|
110
|
-
|
|
111
|
-
const items = [
|
|
112
|
-
{ text: 'Option 1', value: '1' },
|
|
113
|
-
{ text: 'Option 2', value: '2' },
|
|
114
|
-
],
|
|
115
|
-
</script>
|
|
116
|
-
`,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
args: {
|
|
121
|
-
items: [
|
|
122
|
-
{ text: 'Option 1', value: '1' },
|
|
123
|
-
{ text: 'Option 2', value: '2' },
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
render: (args) => {
|
|
127
|
-
return {
|
|
128
|
-
components: { SyInputSelect, VBtn, VMenu, VList, VListItem, VListItemTitle },
|
|
129
|
-
setup() {
|
|
130
|
-
return { args }
|
|
131
|
-
},
|
|
132
|
-
template: `
|
|
133
|
-
<div class="d-flex flex-wrap align-center pa-4">
|
|
134
|
-
<SyInputSelect
|
|
135
|
-
v-bind="args"
|
|
136
|
-
outlined
|
|
137
|
-
/>
|
|
138
|
-
</div>
|
|
139
|
-
`,
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
}
|
|
143
|
-
|
|
144
91
|
export const Required: Story = {
|
|
145
92
|
parameters: {
|
|
146
93
|
sourceCode: [
|
|
@@ -399,12 +346,12 @@ export const withCustomStyles: Story = {
|
|
|
399
346
|
export const Info: Story = {
|
|
400
347
|
render: (args) => {
|
|
401
348
|
return {
|
|
402
|
-
components: {
|
|
349
|
+
components: { SyAlert },
|
|
403
350
|
setup() {
|
|
404
351
|
return { args }
|
|
405
352
|
},
|
|
406
353
|
template: `
|
|
407
|
-
<
|
|
354
|
+
<SyAlert v-model="args.modelValue" :type="args.type" :variant="tonal" :closable="false">
|
|
408
355
|
<template #default>
|
|
409
356
|
<b>Format des items :</b>
|
|
410
357
|
<ul>
|
|
@@ -412,7 +359,7 @@ export const Info: Story = {
|
|
|
412
359
|
<li>- Si les items sont un tableau de string, le composant les utilisera directement.</li>
|
|
413
360
|
</ul>
|
|
414
361
|
</template>
|
|
415
|
-
</
|
|
362
|
+
</SyAlert>
|
|
416
363
|
`,
|
|
417
364
|
}
|
|
418
365
|
},
|