Skip to content

Commit f24cb42

Browse files
authored
Merge pull request #186 from dnum-mi/feat/implementation-v1.2.1-du-dsfr
Feat/implementation v1.2.1 du dsfr
2 parents 8c7b887 + 3772a72 commit f24cb42

File tree

167 files changed

+28146
-9474
lines changed

Some content is hidden

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

167 files changed

+28146
-9474
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ temp/
283283
!.vscode/tasks.json
284284
!.vscode/launch.json
285285
!.vscode/extensions.json
286+
!.vscode/*.code-snippets
286287
*.code-workspace
287288

288289
### VisualStudioCode Patch ###

.storybook/preview.js

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ import { defineComponent } from 'vue'
22
import { app } from '@storybook/vue3'
33
import { FocusTrap } from 'focus-trap-vue'
44

5-
import '../src/assets/variables-dsfr.css'
6-
import '../src/assets/fonts-dsfr.css'
7-
import '../src/assets/core.css'
8-
import '../src/assets/utilities.css'
9-
import '../src/assets/reset-dsfr.css'
10-
import '../src/assets/objects-dsfr.css'
11-
import '../src/assets/utils-dsfr.css'
5+
import '../src/main.css'
126

137
import './theme.css'
148

@@ -27,35 +21,8 @@ export const parameters = {
2721
method: 'alphabetical',
2822
order: [
2923
'Docs',
30-
// ['1. Introduction', '2. Guide d’utilisation', '3. Guide du développeur'],
3124
'Fondamentaux',
3225
'Composants',
33-
// [
34-
// 'Titres',
35-
// 'Titres Alternatifs',
36-
// 'Alertes',
37-
// 'Fil d’Ariane - Breadcrumb',
38-
// 'Logo Officiel - Official logo',
39-
// 'Boutons - Button',
40-
// 'Groupe de Boutons - ButtonGroup',
41-
// 'Champs de saisie - Input',
42-
// 'Case à cocher - Checkbox',
43-
// 'Boutons radio - Radio button',
44-
// 'Liste déroulante - Select',
45-
// 'Interrupteur - Toggle switch',
46-
// 'Étiquettes - Tags',
47-
// ],
48-
// 'Éléments',
49-
// [
50-
// 'Carte - Card',
51-
// 'Barre de recherche - Search bar',
52-
// 'En-tête - Header',
53-
// 'Lettres d’information et réseaux - Follow',
54-
// 'Pied de page - Footer',
55-
// 'Modale - Modal',
56-
// 'Onglets - Tabs', ['Onglets', 'Titre', 'Onglets'],
57-
// 'Table'
58-
// ],
5926
],
6027
},
6128
}

ci/check-exports.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { writeFile } from 'fs/promises'
2+
import { globby } from 'globby'
3+
import path from 'path'
4+
5+
const __dirname = path.dirname(new URL(import.meta.url).pathname)
6+
7+
const sfcs = await globby([path.resolve(__dirname, '../src/components/**/*.vue')])
8+
const componentsDir = path.resolve(__dirname, '../src/components')
9+
10+
const projectFn = component => 'export { default as ' + path.basename(component, '.vue') + ' } from \'' + component.replace(componentsDir, '.') + '\''
11+
12+
const finalString = sfcs.map(projectFn).sort().join('\n')
13+
14+
// /home/stan/projects/minint/vue-dsfr/src/components/DsfrAccordion/DsfrAccordion.vue
15+
// à transformer en :
16+
// export { default as DsfrAccordion } from './DsfrAccordion/DsfrAccordion.vue'
17+
18+
// console.log(sfcs)
19+
20+
// const index = await readFile(path.resolve(__dirname, '../src/components/index.js'))
21+
22+
// console.log(index.toString())
23+
24+
await writeFile(path.resolve(__dirname, '../src/components/index.js'), finalString)

docs/.vuepress/config.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/index.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

package-lock.json

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"scripts": {
1515
"docs:dev": "vuepress dev docs",
1616
"docs:build": "vuepress build docs",
17+
"check-exports": "node ./ci/check-exports.mjs",
1718
"dev": "npm run storybook",
1819
"prebuild": "rimraf dist",
1920
"build": "run-p build:css build:js",
@@ -25,7 +26,7 @@
2526
"test:ct": "cypress open-ct",
2627
"test:ct-ci": "cypress run-ct",
2728
"format": "npm run lint -- --fix",
28-
"lint": "eslint ./src/**/*.{vue,js,jsx,ts,tsx}",
29+
"lint": "eslint ./src/**/*.{vue,js}",
2930
"storybook": "start-storybook -p 6006",
3031
"build-storybook": "build-storybook",
3132
"prepublishOnly": "npm run build",

src/App.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,28 @@ const actions = [
2929
onClick: () => { isModalOpen.value = false },
3030
},
3131
]
32+
33+
const links = [
34+
{
35+
id: 'header',
36+
text: 'Allons au header',
37+
},
38+
{
39+
id: 'content',
40+
text: 'Allons au content',
41+
},
42+
{
43+
id: 'footer',
44+
text: 'Allons au footer',
45+
},
46+
]
3247
</script>
3348

3449
<template>
35-
<div>
50+
<div style="position: relative;">
51+
<DsfrSkipLinks
52+
:links="links"
53+
/>
3654
<h1>App</h1>
3755
<DsfrButton
3856
class="m1"
@@ -65,7 +83,6 @@ const actions = [
6583
-moz-osx-font-smoothing: grayscale;
6684
text-align: center;
6785
color: #2c3e50;
68-
margin-top: 60px;
6986
}
7087
7188
.m1 {

0 commit comments

Comments
 (0)