Skip to content

Commit ae17c66

Browse files
authored
Merge pull request #1030 from dnum-mi/tech/use-dsfr-1.13
tech/use dsfr 1.13
2 parents 8f65110 + d6ec5ad commit ae17c66

File tree

20 files changed

+344
-837
lines changed

20 files changed

+344
-837
lines changed

.vitepress/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ const composants = [
357357
{
358358
text: 'DsfrTag',
359359
link: '/composants/DsfrTag.md',
360+
items: [
361+
{
362+
text: 'DsfrTags',
363+
link: '/composants/DsfrTags.md',
364+
},
365+
],
360366
},
361367
{
362368
text: 'DsfrTile',

demo-app/main.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.flex {
2+
display: flex;
3+
}
4+
5+
.justify-center {
6+
justify-content: center;
7+
}
8+
9+
.items-center {
10+
align-items: center;
11+
}

demo-app/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import '@gouvfr/dsfr/dist/utility/utility.main.min.css'
1212

1313
import '@gouvfr/dsfr/dist/utility/icons/icons.main.min.css'
1414

15+
import './main.css'
16+
1517
createApp(App)
1618
.use(router)
1719
.use(VueDsfr)

demo-app/views/AppHome.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,26 +167,28 @@ const rows = [
167167
</DsfrTooltip>
168168
</template>
169169
<template v-else>
170-
<DsfrTooltip
171-
:content="`(${colKey})`"
172-
on-hover
173-
>
170+
<div class="flex items-center">
174171
{{ cell }}
175-
</DsfrTooltip>
172+
<DsfrTooltip
173+
:content="`(${colKey})`"
174+
href="#"
175+
/>
176+
</div>
176177
</template>
177178
</template>
178179
</DsfrDataTable>
179180
</div>
180181

181-
<div class="flex justify-between w-full relative">
182+
<div class="flex justify-between items-center gap-2 w-full relative">
182183
<DsfrTooltip
183184
on-hover
184185
content="Texte de l’info-bulle qui apparaît au survol"
185186
>
186187
Au survol
187188
</DsfrTooltip>
188189

189-
Et au clic avec une icône seulement :
190+
<span>Et au clic avec une icône seulement :</span>
191+
190192
<DsfrTooltip
191193
content="Texte de l’info-bulle qui apparaît au clic"
192194
/>

demo-app/views/AppTags.vue

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script lang="ts" setup>
2+
import { ref } from 'vue'
3+
24
import DsfrTag from '../../src/components/DsfrTag/DsfrTag.vue'
35
import DsfrTags from '../../src/components/DsfrTag/DsfrTags.vue'
6+
import type { DsfrTagProps } from '../../src/components/DsfrTag/DsfrTags.types'
47
58
const tags = [
69
{
@@ -12,19 +15,64 @@ const tags = [
1215
label: 'Elément 2 de la liste de tags',
1316
},
1417
]
18+
19+
const tagSet: (DsfrTagProps)[] = [
20+
{
21+
icon: 'fr-icon-ancient-pavilion-fill',
22+
label: 'Les tags individuels',
23+
selectable: true,
24+
selected: true,
25+
value: 'individualTags',
26+
},
27+
{
28+
icon: 'ri-notification-3-line',
29+
label: 'Les ensembles de tags',
30+
selectable: true,
31+
value: 'tagSets',
32+
},
33+
]
34+
35+
const loneTag = ref(false)
36+
37+
const filters = ref(['individualTags', 'tagSets'])
1538
</script>
1639

1740
<template>
18-
<div>
41+
<div class="fr-mt-2w">
42+
<DsfrTags
43+
v-model="filters"
44+
:tags="tagSet"
45+
/>
46+
</div>
47+
<div
48+
v-show="filters.includes('individualTags')"
49+
>
1950
<DsfrTag label="Bonjour VueDsfr !" />
2051
</div>
21-
<div class="fr-mt-2w">
52+
<div
53+
v-show="filters.includes('individualTags')"
54+
class="fr-mt-2w"
55+
>
2256
<DsfrTag
2357
label="Vue Power"
2458
icon="ri-notification-3-line"
2559
/>
2660
</div>
27-
<div class="fr-mt-2w">
61+
<div
62+
v-show="filters.includes('individualTags')"
63+
class="fr-mt-2w"
64+
>
65+
<DsfrTag
66+
label="Tag tout cliquable seul !"
67+
selectable
68+
:selected="loneTag"
69+
@select="loneTag = !loneTag"
70+
/>
71+
</div>
72+
<div
73+
v-show="filters.includes('tagSets')"
74+
class="fr-mt-2w"
75+
>
2876
<DsfrTags :tags="tags" />
2977
</div>
3078
</template>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"vue-router": "^4.5.0"
8686
},
8787
"dependencies": {
88-
"@gouvfr/dsfr": "~1.12.1",
88+
"@gouvfr/dsfr": "~1.13.0",
8989
"focus-trap": "^7.6.4",
9090
"focus-trap-vue": "^4.0.3",
9191
"vue": "^3.5.13",
@@ -179,6 +179,6 @@
179179
]
180180
},
181181
"volta": {
182-
"node": "20.11.0"
182+
"node": "22.13.1"
183183
}
184184
}

0 commit comments

Comments
 (0)