Skip to content

Commit 829b865

Browse files
authored
Merge pull request #340 from dnum-mi/develop
RC14
2 parents 8c1418a + a68a807 commit 829b865

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+148
-410
lines changed

build-css.mjs

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,13 @@ import fs from 'fs'
33
import mkdirp from 'mkdirp'
44
import postcss from 'postcss'
55
import atImport from 'postcss-import'
6-
import postcssNested from 'postcss-nested'
7-
import postcssPresetEnv from 'postcss-preset-env'
86
import postcssUrl from 'postcss-url'
97
import csso from 'postcss-csso'
108

119
const postcssPlugins = [
1210
atImport(),
13-
postcssNested,
1411
postcssUrl({ url: 'inline' }),
15-
postcssPresetEnv({
16-
autoprefixer: {
17-
flexbox: 'no-2009',
18-
},
19-
stage: 1,
20-
features: {
21-
'custom-properties': false,
22-
'focus-visible-pseudo-class': false,
23-
},
24-
}),
25-
csso,
12+
csso(),
2613
]
2714

2815
mkdirp.sync('dist')
@@ -56,39 +43,3 @@ fs.readFile('./src/main.css', 'utf8', (err, css) => {
5643
}
5744
})
5845
})
59-
60-
fs.readFile('src/assets/fonts-dsfr.css', 'utf8', (err, css) => {
61-
if (err) {
62-
console.error(err)
63-
throw err
64-
}
65-
postcss(postcssPlugins)
66-
.process(css, {
67-
from: 'src/assets/fonts-dsfr.css',
68-
to: 'dist/fonts-dsfr.css',
69-
})
70-
.then(result => {
71-
fs.writeFile('dist/vue-dsfr-fonts.css', result.css, () => true)
72-
if (result.map) {
73-
fs.writeFile('dist/vue-dsfr-fonts.css.map', result.map.toString(), () => true)
74-
}
75-
})
76-
})
77-
78-
fs.readFile('src/assets/fonts-essential-dsfr.css', 'utf8', (err, css) => {
79-
if (err) {
80-
console.error(err)
81-
throw err
82-
}
83-
postcss(postcssPlugins)
84-
.process(css, {
85-
from: 'src/assets/fonts-dsfr.css',
86-
to: 'dist/fonts-dsfr.css',
87-
})
88-
.then(result => {
89-
fs.writeFile('dist/vue-dsfr-fonts-essential.css', result.css, () => true)
90-
if (result.map) {
91-
fs.writeFile('dist/vue-dsfr-fonts-essential.css.map', result.map.toString(), () => true)
92-
}
93-
})
94-
})

package.json

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@laruiss/vue-dsfr",
3-
"version": "1.0.0-beta.35",
3+
"version": "1.0.0-beta.53",
44
"files": [
55
"dist",
66
"types",
@@ -24,25 +24,9 @@
2424
"require": "./dist/vue-dsfr.css",
2525
"import": "./dist/vue-dsfr.css"
2626
},
27-
"./dist/vue-dsfr-fonts.css": {
28-
"require": "./dist/vue-dsfr-fonts.css",
29-
"import": "./dist/vue-dsfr-fonts.css"
30-
},
31-
"./dist/vue-dsfr-fonts-essentials.css": {
32-
"require": "./dist/vue-dsfr-fonts-essentials.css",
33-
"import": "./dist/vue-dsfr-fonts-essentials.css"
34-
},
3527
"./styles": {
3628
"require": "./dist/vue-dsfr.css",
3729
"import": "./dist/vue-dsfr.css"
38-
},
39-
"./fonts": {
40-
"require": "./dist/vue-dsfr-fonts.css",
41-
"import": "./dist/vue-dsfr-fonts.css"
42-
},
43-
"./fonts-essentials": {
44-
"require": "./dist/vue-dsfr-fonts-essentials.css",
45-
"import": "./dist/vue-dsfr-fonts-essentials.css"
4630
}
4731
},
4832
"publishConfig": {

rollup.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ const postcssPlugins = [
3030
const baseOutput = {
3131
globals: {
3232
vue: 'vue',
33-
'oh-vue-icons': 'VIcon',
34-
'oh-vue-icons/icons': 'oh-vue-icons/icons',
35-
'oh-vue-icons/icons/ri/index.js': 'oh-vue-icons/icons/ri/index.js',
36-
'vue-router': 'vue-router',
37-
'focus-trap': 'focus-trap',
38-
'focus-trap-vue': 'focus-trap-vue',
3933
},
4034
}
4135

src/components/DsfrAccordion/DsfrAccordion.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default defineComponent({
4848
class="fr-accordion__btn"
4949
:aria-expanded="expanded"
5050
:aria-controls="id"
51+
type="button"
5152
@click="toggleExpanded()"
5253
>
5354
<!-- @slot Slot pour le contenu personnalisé du titre de l’accordéon. Une props du même nom est utilisable pour du texte simple sans mise en forme. -->

src/components/DsfrBreadcrumb/DsfrBreadcrumb.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ export default defineComponent({
2727
hideButton: false,
2828
}
2929
},
30-
31-
computed: {
32-
linkComponent () {
33-
return '$nuxt' in this ? 'nuxt-link' : 'router-link'
34-
},
35-
},
3630
})
3731
</script>
3832

@@ -64,7 +58,7 @@ export default defineComponent({
6458
:data-testid="`lis`"
6559
>
6660
<component
67-
:is="linkComponent"
61+
:is="'router-link'"
6862
v-if="link.to"
6963
class="fr-breadcrumb__link"
7064
:to="link.to"

src/components/DsfrButton/DsfrButton.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<script>
22
import { defineComponent } from 'vue'
3+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
34
45
// import '@gouvfr/dsfr/dist/component/button/button.module.js'
56
67
export default defineComponent({
78
name: 'DsfrButton',
89
10+
components: {
11+
VIcon,
12+
},
13+
914
props: {
1015
disabled: Boolean,
1116
label: {

src/components/DsfrCard/DsfrCard.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ export default defineComponent({
3333
horizontal: Boolean,
3434
},
3535
36-
computed: {
37-
linkComponent () {
38-
return '$nuxt' in this ? 'nuxt-link' : 'router-link'
39-
},
40-
},
41-
4236
methods: {
4337
goToTargetLink () {
4438
this.$refs.title.querySelector('.fr-card__link').click()
@@ -59,15 +53,14 @@ export default defineComponent({
5953
ref="title"
6054
class="fr-card__title"
6155
>
62-
<component
63-
:is="linkComponent"
56+
<router-link
6457
:to="link"
6558
class="fr-card__link"
6659
data-testid="card-link"
6760
@click="$event.stopPropagation()"
6861
>
6962
{{ title }}
70-
</component>
63+
</router-link>
7164
</h4>
7265
<p class="fr-card__desc">
7366
{{ description }}

src/components/DsfrConsent/DsfrConsent.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ export default defineComponent({
1717
isExternalLink () {
1818
return typeof this.url === 'string' && this.url.startsWith('http')
1919
},
20-
linkComponent () {
21-
return '$nuxt' in this ? 'nuxt-link' : 'router-link'
22-
},
2320
is () {
24-
return this.url ? (this.isExternalLink ? 'a' : this.linkComponent) : 'a'
21+
return this.url ? (this.isExternalLink ? 'a' : 'router-link') : 'a'
2522
},
2623
linkProps () {
2724
return { [this.isExternalLink ? 'href' : 'to']: this.url }

src/components/DsfrFooter/DsfrFooter.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script>
22
import { defineComponent } from 'vue'
3+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
34
45
import DsfrLogo from '../DsfrLogo/DsfrLogo.vue'
56
import DsfrFooterPartners from '../DsfrFooter/DsfrFooterPartners.vue'
@@ -10,6 +11,7 @@ export default defineComponent({
1011
components: {
1112
DsfrFooterPartners,
1213
DsfrLogo,
14+
VIcon,
1315
},
1416
1517
props: {
@@ -110,9 +112,6 @@ export default defineComponent({
110112
...this.afterMandatoryLinks,
111113
]
112114
},
113-
linkComponent () {
114-
return '$nuxt' in this ? 'nuxt-link' : 'router-link'
115-
},
116115
isWithSlotLinkLists () {
117116
return this.$slots['footer-link-lists']?.().length
118117
},
@@ -143,15 +142,14 @@ export default defineComponent({
143142
<div class="fr-container">
144143
<div class="fr-footer__body">
145144
<div class="fr-footer__brand fr-enlarge-link">
146-
<component
147-
:is="linkComponent"
145+
<router-link
148146
:to="homeLink"
149147
title="Retour à l’accueil"
150148
>
151149
<DsfrLogo
152150
:logo-text="logoText"
153151
/>
154-
</component>
152+
</router-link>
155153
</div>
156154
<div class="fr-footer__content">
157155
<p
@@ -189,14 +187,13 @@ export default defineComponent({
189187
:key="index"
190188
class="fr-footer__bottom-item"
191189
>
192-
<component
193-
:is="linkComponent"
190+
<router-link
194191
class="fr-footer__bottom-link"
195192
:to="link.to"
196193
:data-testid="link.to"
197194
>
198195
{{ link.label }}
199-
</component>
196+
</router-link>
200197
</li>
201198
</ul>
202199
<div class="fr-footer__bottom-copy">

src/components/DsfrFooter/DsfrFooterLinkList.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ export default defineComponent({
1414
default: () => [],
1515
},
1616
},
17-
18-
computed: {
19-
linkComponent () {
20-
return '$nuxt' in this ? 'nuxt-link' : 'router-link'
21-
},
22-
},
2317
})
2418
</script>
2519

@@ -38,14 +32,13 @@ export default defineComponent({
3832
class="fr-footer__top-link"
3933
:to="link.to"
4034
>{{ link.label }}</a>
41-
<component
42-
:is="linkComponent"
35+
<router-link
4336
v-else
4437
class="fr-footer__top-link"
4538
:to="link.to"
4639
>
4740
{{ link.label }}
48-
</component>
41+
</router-link>
4942
</li>
5043
</ul>
5144
</div>

0 commit comments

Comments
 (0)