Skip to content

Commit 3fa1077

Browse files
authored
Merge pull request #645 from dnum-mi/develop
Develop
2 parents 660e4d5 + a338116 commit 3fa1077

File tree

108 files changed

+12678
-23071
lines changed

Some content is hidden

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

108 files changed

+12678
-23071
lines changed

.babelrc.json

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

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
1+
/* eslint-env node */
12
require('@rushstack/eslint-patch/modern-module-resolution')
23

34
module.exports = {
45
root: true,
5-
globals: {
6-
defineEmits: 'readonly',
7-
defineProps: 'readonly',
8-
},
9-
env: {
10-
'vue/setup-compiler-macros': true,
11-
node: true,
12-
},
136
extends: [
147
'plugin:vue/vue3-recommended',
158
'@vue/eslint-config-typescript/recommended',
169
'@vue/standard',
1710
'plugin:storybook/recommended',
18-
],
19-
parser: 'vue-eslint-parser',
20-
parserOptions: {
21-
ecmaVersion: 2020,
22-
parser: '@typescript-eslint/parser',
23-
},
24-
plugins: [
25-
'vue',
26-
'html',
11+
2712
],
2813
rules: {
29-
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
30-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
3114
'comma-dangle': [2, 'always-multiline'],
3215
'no-irregular-whitespace': 1,
3316
'@typescript-eslint/ban-ts-comment': [
@@ -54,6 +37,7 @@ module.exports = {
5437
files: [
5538
'cypress/support/*.{js,ts,jsx,tsx}',
5639
'cypress/integration/*.{spec,e2e}.{js,ts,jsx,tsx}',
40+
'cypress/e2e/**/*.{cy,spec,e2e}.{js,ts,jsx,tsx}',
5741
'src/**/*.ct.{js,ts,jsx,tsx}',
5842
'**/src/**/*.e2e.{j,t}s?(x)',
5943
],
@@ -63,4 +47,7 @@ module.exports = {
6347
extends: ['plugin:cypress/recommended'],
6448
},
6549
],
50+
parserOptions: {
51+
ecmaVersion: 'latest',
52+
},
6653
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ logs
159159
npm-debug.log*
160160
yarn-debug.log*
161161
yarn-error.log*
162+
pnpm-debug.log*
162163
lerna-debug.log*
163164

164165
# Diagnostic reports (https://nodejs.org/api/report.html)

.storybook/main.js

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

.storybook/main.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { StorybookConfig } from '@storybook/vue3-vite';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: [
6+
'@storybook/addon-links',
7+
'@storybook/addon-essentials',
8+
'@storybook/addon-interactions',
9+
'@storybook/addon-themes',
10+
'@storybook/addon-a11y',
11+
'@storybook/addon-styling',
12+
],
13+
staticsDir: ['../public'],
14+
framework: {
15+
name: '@storybook/vue3-vite',
16+
options: {},
17+
},
18+
docs: {
19+
autodocs: true,
20+
},
21+
};
22+
export default config;

.storybook/manager.js

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

.storybook/manager.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { addons } from '@storybook/manager-api'
2+
import { themes } from '@storybook/theming'
3+
import VueDsfrTheme from './vue-dsfr-theme.js'
4+
5+
addons.setConfig({
6+
theme: { ...themes.normal, ...VueDsfrTheme },
7+
})

.storybook/preview-head.html

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

.storybook/preview.js

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

.storybook/preview.ts

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import type { Preview } from "@storybook/vue3"
2+
import { themes } from '@storybook/theming'
3+
import { withThemeByDataAttribute } from "@storybook/addon-styling"
4+
5+
import VueDsfrTheme from './vue-dsfr-theme.js'
6+
import '../src/assets/variables-fdr.css'
7+
import '@gouvfr/dsfr/dist/dsfr.min.css'
8+
import '@gouvfr/dsfr/dist/utility/utility.main.min.css'
9+
import '@gouvfr/dsfr/dist/utility/icons/icons.main.min.css'
10+
11+
import '../src/main.css'
12+
13+
import './theme.css'
14+
// import '@gouvfr/dsfr/dist/core/core.min.css'
15+
16+
export const decorators = [
17+
withThemeByDataAttribute({
18+
themes: {
19+
Clair: 'light',
20+
Sombre: 'dark',
21+
},
22+
defaultTheme: 'light',
23+
attributeName: 'data-fr-theme',
24+
})
25+
]
26+
27+
const preview: Preview = {
28+
parameters: {
29+
docs: {
30+
theme: { ...themes.normal, ...VueDsfrTheme },
31+
},
32+
actions: { argTypesRegex: "^on[A-Z].*" },
33+
controls: {
34+
matchers: {
35+
color: /(background|color)$/i,
36+
date: /Date$/i,
37+
},
38+
},
39+
viewport: {
40+
viewports: {
41+
DSFR_XS: {
42+
name: 'DSFR XS',
43+
styles: {
44+
width: '320px',
45+
height: '768px',
46+
},
47+
},
48+
DSFR_SM: {
49+
name: 'DSFR SM',
50+
styles: {
51+
width: '576px',
52+
height: '1024px',
53+
},
54+
},
55+
DSFR_MD: {
56+
name: 'DSFR MD',
57+
styles: {
58+
width: '768px',
59+
height: '1200px',
60+
},
61+
},
62+
DSFR_LG: {
63+
name: 'DSFR LG',
64+
styles: {
65+
width: '992px',
66+
height: '1600px',
67+
},
68+
},
69+
DSFR_XL: {
70+
name: 'DSFR XL',
71+
styles: {
72+
width: '1440px',
73+
height: '1900px',
74+
},
75+
},
76+
}
77+
},
78+
options: {
79+
storySort: {
80+
method: 'alphabetical',
81+
order: [
82+
'Docs',
83+
'Fondamentaux',
84+
'Composables',
85+
'Composants',
86+
],
87+
},
88+
},
89+
},
90+
}
91+
92+
export default preview;

0 commit comments

Comments
 (0)