Skip to content

Commit

Permalink
Merge pull request #974 from dnum-mi/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
laruiss authored Oct 31, 2024
2 parents cbc986a + d9bba2b commit 29edbbd
Show file tree
Hide file tree
Showing 149 changed files with 2,627 additions and 1,139 deletions.
1 change: 1 addition & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { addons } from '@storybook/manager-api'
import { themes } from '@storybook/theming'

import VueDsfrTheme from './vue-dsfr-theme.js'

addons.setConfig({
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { setup } from '@storybook/vue3'
import { FocusTrap } from 'focus-trap-vue'
import { defineComponent } from 'vue'
import type { Preview } from '@storybook/vue3'

import VIcon from '../src/components/VIcon/VIcon.vue'

import VueDsfrTheme from './vue-dsfr-theme.js'
Expand Down
1 change: 1 addition & 0 deletions .storybook/vue-dsfr-theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { create } from '@storybook/theming'

import brandImage from '../src/assets/icone-marianne-seule.png'

export default create({
Expand Down
5 changes: 5 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath, URL } from 'node:url'
import { whyframe } from '@whyframe/core'
import { whyframeVue } from '@whyframe/vue'
import { defineConfig } from 'vitepress'

import { hmrFix } from './plugins/hmrFix.js'

const minimalToc = [
Expand Down Expand Up @@ -231,6 +232,10 @@ const composants = [
text: 'DsfrModal',
link: '/composants/DsfrModal.md',
},
{
text: 'DsfrMultiselect',
link: '/composants/DsfrMultiselect.md',
},
{
text: 'DsfrNotice',
link: '/composants/DsfrNotice.md',
Expand Down
1 change: 1 addition & 0 deletions .vitepress/plugins/hmrFix.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fileURLToPath } from 'node:url'

import fullReload from 'vite-plugin-full-reload'
import type { Plugin } from 'vitepress'

Expand Down
1 change: 1 addition & 0 deletions .vitepress/theme/Story.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { useData } from 'vitepress'
import { onMounted, onUnmounted, ref, watchEffect } from 'vue'
import { useScheme, type UseSchemeResult } from '../../src/index'
withDefaults(defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { RouterLink } from 'vue-router'
import type { Theme } from 'vitepress'

import VIcon from '../../src/components/VIcon/VIcon.vue'

import AppColors from './AppColors.vue'
import AppIcons from './AppIcons.vue'
import Story from './Story.vue'

import VIconLink from './VIconLink.vue'
import './official-icons.css'
import '@gouvfr/dsfr/dist/utility/icons/icons.main.css'
Expand Down
5 changes: 3 additions & 2 deletions demo-app/App.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useRoute } from 'vue-router'
import DsfrBreadcrumb from '../src/components/DsfrBreadcrumb/DsfrBreadcrumb.vue'
import DsfrBreadcrumb from '../src/components/DsfrBreadcrumb/DsfrBreadcrumb.vue'
import DsfrFooter from '../src/components/DsfrFooter/DsfrFooter.vue'
import DsfrHeader, { type DsfrHeaderProps } from '../src/components/DsfrHeader/DsfrHeader.vue'
import DsfrModal from '../src/components/DsfrModal/DsfrModal.vue'
import DsfrNavigation, { type DsfrNavigationProps } from '../src/components/DsfrNavigation/DsfrNavigation.vue'
import DsfrSkipLinks, { type DsfrSkipLinksProps } from '../src/components/DsfrSkipLinks/DsfrSkipLinks.vue'
import AppToaster from './components/AppToaster.vue'
import useToaster from './composables/use-toaster.js'
Expand Down Expand Up @@ -280,6 +280,7 @@ const currentRoute = computed(() => route.name)
v-model="search"
:quick-links="quickLinks"
show-search
service-title="VueDSFR demo App"
placeholder="Rechercher placeholder"
>
<template #mainnav>
Expand Down
5 changes: 3 additions & 2 deletions demo-app/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import VueDsfr from '@/index'

import { createApp } from 'vue'

import App from './App.vue'
import router from './router.js'

import VueDsfr from '@/index'
import '@gouvfr/dsfr/dist/core/core.main.min.css'
import '@gouvfr/dsfr/dist/scheme/scheme.min.css'

Expand Down
4 changes: 2 additions & 2 deletions demo-app/views/AppAccordions.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
import DsfrAccordion from '@/components/DsfrAccordion/DsfrAccordion.vue'
import { ref } from 'vue'
import DsfrAccordion from '@/components/DsfrAccordion/DsfrAccordion.vue'
import DsfrAccordionsGroup from '@/components/DsfrAccordion/DsfrAccordionsGroup.vue'
import DsfrTranscription from '@/components/DsfrTranscription/DsfrTranscription.vue'
import { ref } from 'vue'
const activeAccordion = ref(-1)
const activeAccordionInGroup = ref(-1)
Expand Down
3 changes: 2 additions & 1 deletion demo-app/views/AppAlerts.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script setup>
import { ref } from 'vue'
import DsfrAlert from '@/components/DsfrAlert/DsfrAlert.vue'
import DsfrNotice from '@/components/DsfrNotice/DsfrNotice.vue'
// @ts-check
import { ref } from 'vue'
const noticeClosed = ref(false)
Expand Down
3 changes: 2 additions & 1 deletion demo-app/views/AppForm.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup lang="ts">
import { ref } from 'vue'
import DsfrAlert from '@/components/DsfrAlert/DsfrAlert.vue'
import DsfrButton from '@/components/DsfrButton/DsfrButton.vue'
import DsfrCheckboxSet from '@/components/DsfrCheckbox/DsfrCheckboxSet.vue'
import DsfrFileUpload from '@/components/DsfrFileUpload/DsfrFileUpload.vue'
import DsfrRadioButtonSet from '@/components/DsfrRadioButton/DsfrRadioButtonSet.vue'
import { ref } from 'vue'
import type { DsfrCheckboxSetProps } from '@/components/DsfrCheckbox/DsfrCheckbox.types'
const inputValue = ref('')
Expand Down
1 change: 1 addition & 0 deletions demo-app/views/CardTile.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import svgSchool from '@gouvfr/dsfr/dist/artwork/pictograms/buildings/school.svg'
import DsfrTile from '../../src/components/DsfrTile/DsfrTile.vue'
</script>

Expand Down
5 changes: 2 additions & 3 deletions demo-app/views/SchemeSettings.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<script setup>
import DsfrButton from '@/components/DsfrButton/DsfrButton.vue'
import { onMounted, reactive, watchEffect } from 'vue'
import DsfrButton from '@/components/DsfrButton/DsfrButton.vue'
import DsfrRadioButtonSet from '@/components/DsfrRadioButton/DsfrRadioButtonSet.vue'
import { useScheme } from '@/composables'
import { onMounted, reactive, watchEffect } from 'vue'
const options = [
{
label: 'System',
Expand Down
4 changes: 2 additions & 2 deletions demo-app/views/SideMenu.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
import DsfrSideMenu from '@/components/DsfrSideMenu/DsfrSideMenu.vue'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import DsfrSideMenu from '@/components/DsfrSideMenu/DsfrSideMenu.vue'
const buttonLabel = 'Dans cette rubrique'
const headingTitle = 'Titre de la rubrique'
const route = useRoute()
Expand Down
5 changes: 3 additions & 2 deletions demo-app/views/SimpleModal.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup lang="ts">
import DsfrModal from '@/components/DsfrModal/DsfrModal.vue'
import { useScheme } from '@/composables/index'
import darkThemeSvg from '@gouvfr/dsfr/dist/artwork/pictograms/environment/moon.svg'
import lightThemeSvg from '@gouvfr/dsfr/dist/artwork/pictograms/environment/sun.svg'
import systemThemeSvg from '@gouvfr/dsfr/dist/artwork/pictograms/system/system.svg'
import { onMounted, reactive, ref, watchEffect } from 'vue'
import { useScheme } from '@/composables/index'
import DsfrModal from '@/components/DsfrModal/DsfrModal.vue'
import type { Preferences, UseSchemeResult } from '@/composables/index'
const isModalOpen = ref(false)
Expand Down
3 changes: 2 additions & 1 deletion docs/docs-demo/DsfrCheckboxSetV7Demo.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts" setup>
import DsfrCheckboxSet from '@/components/DsfrCheckbox/DsfrCheckboxSet.vue'
import { ref } from 'vue'
import DsfrCheckboxSet from '@/components/DsfrCheckbox/DsfrCheckboxSet.vue'
import type { DsfrCheckboxSetProps } from '@/components/DsfrCheckbox/DsfrCheckbox.types'
const selectedCheckboxes = ref([])
Expand Down
1 change: 1 addition & 0 deletions docs/guide/pour-commencer.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Ajouter la bibliothèque en tant que plugin a deux conséquences :

```js
import { createApp } from 'vue'

import App from './App.vue'

const app = createApp(App)
Expand Down
3 changes: 2 additions & 1 deletion docs/recettes/toaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ Ce composant `AppToaster` sera ajouté une seule fois dans l’application : da
```vue [App.vue]
<script setup lang="ts">
// (...)
import AppToaster from '@/components/AppToaster.vue'
import { ref } from 'vue' // Import du composant AppToaster
import AppToaster from '@/components/AppToaster.vue'
// (...)
</script>
Expand Down
15 changes: 8 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import antfu from '@antfu/eslint-config'

// const compat = new FlatCompat({
// baseDirectory: import.meta.dirname,
// })

export default antfu({
vue: true,
}, [
{
rules: {
'test/prefer-lowercase-title': 'off',
'sort-imports': 'off', // Should be 'error'
'import/order': 'off', // Should be 'error'
'import/order': ['error', {
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
}],
'antfu/top-level-function': 'off', // Should be 'error'
'style/quote-props': ['error', 'as-needed'], // Should be ['error', 'consistent-as-needed']
'vue/quote-props': ['error', 'as-needed'], // Should be ['error', 'consistent-as-needed']
Expand All @@ -21,6 +20,8 @@ export default antfu({
'style/max-statements-per-line': 'off', // Should be 'error'
'vue/no-irregular-whitespace': 'warn',
'no-irregular-whitespace': 'warn',
'perfectionist/sort-imports': 'off', // import/order is better
'perfectionist/sort-exports': 'off', // Think about it
'style/space-before-function-paren': ['error', 'always'],
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
curly: ['error', 'all'],
Expand Down Expand Up @@ -70,9 +71,9 @@ export default antfu({
},
},
{
files: ['src/components/index.ts'],
files: ['ci/**/*.mjs'],
rules: {
'perfectionist/sort-exports': 'off',
'antfu/no-top-level-await': 'off',
},
},
])
78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,75 +76,75 @@
},
"dependencies": {
"@gouvfr/dsfr": "~1.12.1",
"focus-trap": "^7.5.4",
"focus-trap": "^7.6.0",
"focus-trap-vue": "^4.0.3",
"pnpm": "^9.10.0",
"vue": "^3.5.4",
"vue-router": "^4.4.4"
"vue": "^3.5.12",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@antfu/eslint-config": "^3.5.1",
"@antfu/eslint-config": "^3.8.0",
"@chromatic-com/storybook": "^2.0.2",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@iconify/vue": "^4.1.2",
"@playwright/test": "1.48.1",
"@storybook/addon-a11y": "^8.3.0",
"@storybook/addon-docs": "^8.3.0",
"@storybook/addon-essentials": "^8.3.0",
"@storybook/addon-interactions": "^8.3.0",
"@storybook/addon-links": "^8.3.0",
"@storybook/addon-mdx-gfm": "^8.3.0",
"@storybook/addon-a11y": "^8.3.6",
"@storybook/addon-docs": "^8.3.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/addon-mdx-gfm": "^8.3.6",
"@storybook/addon-styling": "^1.3.7",
"@storybook/addon-themes": "^8.3.0",
"@storybook/blocks": "^8.3.0",
"@storybook/test": "^8.3.0",
"@storybook/addon-themes": "^8.3.6",
"@storybook/blocks": "^8.3.6",
"@storybook/test": "^8.3.6",
"@storybook/test-runner": "^0.19.1",
"@storybook/theming": "^8.3.0",
"@storybook/vue3": "^8.3.0",
"@storybook/vue3-vite": "^8.3.0",
"@storybook/theming": "^8.3.6",
"@storybook/vue3": "^8.3.6",
"@storybook/vue3-vite": "^8.3.6",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.1.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^20.16.5",
"@vitejs/plugin-vue": "^5.1.3",
"@types/node": "^20.17.4",
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"@vueuse/core": "^11.0.3",
"@vueuse/shared": "^11.0.3",
"@vueuse/core": "^11.2.0",
"@vueuse/shared": "^11.2.0",
"@whyframe/core": "^0.1.11",
"@whyframe/vue": "^0.1.7",
"browserslist": "^4.23.3",
"browserslist": "^4.24.2",
"chalk": "^5.3.0",
"commitlint": "^19.4.1",
"commitlint": "^19.5.0",
"cross-env": "^7.0.3",
"eslint": "^9.10.0",
"eslint-plugin-vue": "^9.28.0",
"eslint": "^9.13.0",
"eslint-plugin-vue": "^9.30.0",
"globby": "^14.0.2",
"husky": "^9.1.5",
"husky": "^9.1.6",
"inquirer": "^10.2.2",
"jsdom": "^25.0.0",
"jsdom": "^25.0.1",
"lightningcss": "^1.27.0",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"p-debounce": "^4.0.0",
"publint": "^0.2.10",
"pnpm": "^9.10.0",
"publint": "^0.2.12",
"regenerator-runtime": "^0.14.1",
"rimraf": "^6.0.1",
"semantic-release": "^24.1.1",
"start-server-and-test": "^2.0.7",
"storybook": "^8.3.0",
"semantic-release": "^24.2.0",
"start-server-and-test": "^2.0.8",
"storybook": "^8.3.6",
"typescript": "~5.5.4",
"vite": "^5.4.4",
"vite-node": "^2.0.5",
"vite": "^5.4.10",
"vite-node": "^2.1.4",
"vite-plugin-full-reload": "^1.2.0",
"vitepress": "^1.3.4",
"vitest": "^2.0.5",
"vitepress": "^1.4.2",
"vitest": "^2.1.4",
"vue-demi": "^0.14.10",
"vue-tsc": "^2.1.6"
"vue-tsc": "^2.1.10"
},
"lint-staged": {
"*.{vue,js,jsx,ts,tsx}": "run-s check-exports-ci lint --"
Expand Down
Loading

0 comments on commit 29edbbd

Please sign in to comment.