You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Would you help us implement [the components](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon)?
4
4
Thank you so much to anyone that would!
5
5
6
-
To get you started you can check out [the `<Alert />` component](https://react-dsfr-components.etalab.studio/?path=/docs/components-alert--default).
6
+
To get you started you can check out [the `<Alert />` component](https://components.react-dsfr.fr/?path=/docs/components-alert--default).
7
7
8
8
- Here is it's definition from the SIG: [systeme-de-design.gouv.fr/elements-d-interface/composants/alerte](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/alerte) (Pro tip: the real source of truth for DSFR component is [here](https://main--ds-gouv.netlify.app/example/component/))
9
9
- Here is its implementation [src/Alert.tsx](https://github.com/codegouvfr/react-dsfr/blob/main/src/Alert.tsx)
@@ -18,10 +18,10 @@ A few things:
18
18
- 🙏🏻 Don't be afraid to push even if you aren't 100% happy with your code or [if it's still WIP](https://github.com/codegouvfr/react-dsfr/blob/1fdcf15cb085c67d37c31badf6ffa4725795ba0f/stories/Accordion.stories.tsx#L6).
19
19
- 📣 Let everyone know what component you are working on by [oppening an issue](https://github.com/codegouvfr/react-dsfr/issues).
20
20
- 📚 You can draw inspiration from [`dataesr/react-dsfr`](https://github.com/dataesr/react-dsfr/tree/master/src/components/interface) and the implementation of [france connect](https://github.com/france-connect/sources/tree/main/front/libs/dsfr).
21
-
- 🔗 Use the component returned by `getLink()` instead of `<a />`. [Example in the `<Header />` component](https://github.com/codegouvfr/react-dsfr/blob/bbaf4a81d78de08d6fdcb059a9f4cb8a78ce4d5a/src/Header.tsx#L84-L87). We want to [play nice with all routing libraries](https://react-dsfr.etalab.studio/integration-with-routing-libraries).
22
-
- 🕹️ When it's relevant, try to enable components to be used either in controlled or uncontrolled mode. [Example with <Tabs />](https://react-dsfr-components.etalab.studio/?path=/docs/components-tabs--default).
23
-
- 🌎 Avoid hard coding text in JSX, use [the i18n mechanism](https://react-dsfr.etalab.studio/i18n) instead. [Here is an example](https://github.com/codegouvfr/react-dsfr/blob/bbaf4a81d78de08d6fdcb059a9f4cb8a78ce4d5a/src/DarkModeSwitch.tsx#L162-L199). (Don't worry about providing translations other than French.)
24
-
- 🍳 If you have to arbitrate between ease of use and customisability I'd encourage you to favor ease of use. People that would need a greater level of customizability can always fall back to making their own wrapper from the reference documentation using [`fr.cx()`](https://react-dsfr.etalab.studio/cx).
21
+
- 🔗 Use the component returned by `getLink()` instead of `<a />`. [Example in the `<Header />` component](https://github.com/codegouvfr/react-dsfr/blob/bbaf4a81d78de08d6fdcb059a9f4cb8a78ce4d5a/src/Header.tsx#L84-L87). We want to [play nice with all routing libraries](https://guides.react-dsfr.fr/integration-with-routing-libraries).
22
+
- 🕹️ When it's relevant, try to enable components to be used either in controlled or uncontrolled mode. [Example with <Tabs />](https://components.react-dsfr.fr/?path=/docs/components-tabs--default).
23
+
- 🌎 Avoid hard coding text in JSX, use [the i18n mechanism](https://guides.react-dsfr.fr/i18n) instead. [Here is an example](https://github.com/codegouvfr/react-dsfr/blob/bbaf4a81d78de08d6fdcb059a9f4cb8a78ce4d5a/src/DarkModeSwitch.tsx#L162-L199). (Don't worry about providing translations other than French.)
24
+
- 🍳 If you have to arbitrate between ease of use and customisability I'd encourage you to favor ease of use. People that would need a greater level of customizability can always fall back to making their own wrapper from the reference documentation using [`fr.cx()`](https://guides.react-dsfr.fr/cx).
-[x] exactement le même aspect et ressenti qu'avec [@gouvfr/dsfr](https://www.npmjs.com/package/@gouvfr/dsfr), il s'agit d'une couche de compatibilité et non pas d'une implémentation alternative.
47
47
-[x] pas de [flash d'écran blanc lors du basculement automatique du thème clair vers le thème sombre](https://github.com/codegouvfr/@codegouvfr/react-dsfr/issues/2#issuecomment-1257263480).
48
48
-[x] la plupart des composants peuvent être rendus directement sur le serveur (voir [RSC](https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html)). Les autres sont étiquetés `"use client";`.
49
-
-[x][Intégration clef en main pour les différents frameworks de développement: vite, Next.js, y compris la version beta de Next 13 (configuration AppDir) et Create React App](https://react-dsfr.etalab.studio/) si votre
49
+
-[x][Intégration clef en main pour les différents frameworks de développement: vite, Next.js, y compris la version beta de Next 13 (configuration AppDir) et Create React App](https://guides.react-dsfr.fr/) si votre
50
50
framework n'est pas supporté, il suffit de demander notre **il manque un mot là** , nous avons pour but de couvrir tous les cas d'usage effectifs.
51
-
-[x] (Presque) tout [les composants de référence](https://www.systeme-de-design.gouv.fr/elements-d-interface) sont [implémenté](https://react-dsfr-components.etalab.studio/).
51
+
-[x] (Presque) tout [les composants de référence](https://www.systeme-de-design.gouv.fr/elements-d-interface) sont [implémenté](https://components.react-dsfr.fr/).
52
52
-[x] seulement le code des composants que vous utilisez effectivement sera inclus dans votre projet final.
53
53
-[x] Intégration facultative avec [MUI](https://mui.com/). Si vous utilisez des composants MUI ils seront automatiquement adaptés pour ressembler à des composants DSFR.
54
-
Voir la [documentation](https://react-dsfr.etalab.studio/mui-integration).
54
+
Voir la [documentation](https://guides.react-dsfr.fr/mui-integration).
55
55
-[x] permet de développer à l'aide d'outil de CSS-in-JS comme [Styled component](https://styled-components.com/), [Emotion](https://emotion.sh/docs/introduction) ou [TSS](https://www.tss-react.dev/).
56
56
-[x] prévoit un système de traduction pour les textes présents dans les composants (i18n).
57
-
-[x][s'intègre avec les librairies de routing](https://react-dsfr.etalab.studio/routing) comme [React Router](https://reactrouter.com/en/main), [TanStack Router](https://tanstack.com/router/v1) ou encore [Type route](https://type-route.zilch.dev/).
57
+
-[x][s'intègre avec les librairies de routing](https://guides.react-dsfr.fr/routing) comme [React Router](https://reactrouter.com/en/main), [TanStack Router](https://tanstack.com/router/v1) ou encore [Type route](https://type-route.zilch.dev/).
58
58
59
59
Ce travail est un produit de [CodeGouvFr](https://communs.numerique.gouv.fr/), la mission logiciel libre de [la direction interministérielle du numérique](https://www.numerique.gouv.fr/dinum/) (DINUM).
## Migration depuis [`@dataesr/react-dsfr`](https://github.com/dataesr/react-dsfr)?
66
66
67
67
Si votre projet utilise [`@dataesr/react-dsfr`](https://github.com/dataesr/react-dsfr) et que vous n'êtes pas enclin a migrer ver `@codegouvfr/react-dsfr` vous pouvez tout de même profiter de plusieurs fonctionalités de ce dernier:
68
68
69
-
- Profitez de [l'auto complétion des classes en `fr-*`](https://react-dsfr.etalab.studio/class-names-type-safety).
70
-
- Utilisez [le système de couleur strictement typer](https://react-dsfr.etalab.studio/css-in-js#colors).
69
+
- Profitez de [l'auto complétion des classes en `fr-*`](https://guides.react-dsfr.fr/class-names-type-safety).
70
+
- Utilisez [le système de couleur strictement typer](https://guides.react-dsfr.fr/css-in-js#colors).
71
71
- Utilisez le thème MUI.
72
-
- Utilisez [le système d'espacement](https://react-dsfr.etalab.studio/css-in-js#fr.spacing) et de
73
-
[point de rupture](https://react-dsfr.etalab.studio/css-in-js#fr.breakpoints).
72
+
- Utilisez [le système d'espacement](https://guides.react-dsfr.fr/css-in-js#fr.spacing) et de
73
+
[point de rupture](https://guides.react-dsfr.fr/css-in-js#fr.breakpoints).
74
74
75
75
[Voici un bac à sable pour expérimenter](https://stackblitz.com/edit/react-ts-fph9bh?file=App.tsx).
@@ -45,32 +45,32 @@ This module is an advanced toolkit that leverage [@gouvfr/dsfr](https://github.c
45
45
-[x] Exactly the same look and feel than with [@gouvfr/dsfr](https://www.npmjs.com/package/@gouvfr/dsfr).
46
46
-[x] No [white flash when reloading in SSR setup](https://github.com/codegouvfr/@codegouvfr/react-dsfr/issues/2#issuecomment-1257263480).
47
47
-[x] Most components are server component ready. The others are labeled with `"use client";`
48
-
-[x][Perfect integration with all major React framework: Next.js (PagesDir and AppDir), Create React App, Vue](https://react-dsfr.etalab.studio/).
49
-
-[x] (Almost) All [the components](https://www.systeme-de-design.gouv.fr/elements-d-interface) are [implemented](https://react-dsfr-components.etalab.studio/)
48
+
-[x][Perfect integration with all major React framework: Next.js (PagesDir and AppDir), Create React App, Vue](https://guides.react-dsfr.fr/).
49
+
-[x] (Almost) All [the components](https://www.systeme-de-design.gouv.fr/elements-d-interface) are [implemented](https://components.react-dsfr.fr/)
50
50
-[x] Three shakable distribution, cherry pick the components you import. (It's not all in a big .js bundle)
51
51
-[x] Optional integration with [MUI](https://mui.com/). If you use MUI components they will
52
-
be automatically adapted to look like [DSFR components](https://www.systeme-de-design.gouv.fr/elements-d-interface). See [documentation](https://react-dsfr.etalab.studio/mui-integration).
52
+
be automatically adapted to look like [DSFR components](https://www.systeme-de-design.gouv.fr/elements-d-interface). See [documentation](https://guides.react-dsfr.fr/mui-integration).
53
53
-[x] Enable CSS in JS by providing a `useColors()` hooks that exposes the correct colors options and decision
54
54
for the currently enabled color scheme.
55
55
-[x] Opt-in i18n, built in text can be displayed in multiple languages and user can provide extra translations.
56
-
-[x][Support routing libraries](https://react-dsfr.etalab.studio/routing) like react-router.
56
+
-[x][Support routing libraries](https://guides.react-dsfr.fr/routing) like react-router.
57
57
58
58
This module is a product of [Etalab's Free and open source software pole](https://communs.numerique.gouv.fr/a-propos/).
59
59
I'm working full time on this project. You can expect rapid development.
60
60
61
61
<palign="center">
62
-
<ahref="https://react-dsfr.etalab.studio/">🚀 Get started 🚀 </a>
62
+
<ahref="https://guides.react-dsfr.fr/">🚀 Get started 🚀 </a>
63
63
</p>
64
64
65
65
# Migrating from [`@dataesr/react-dsfr`](https://github.com/dataesr/react-dsfr)?
66
66
67
67
If your project is using [`@dataesr/react-dsfr`](https://github.com/dataesr/react-dsfr) and you're not willing to migrate to `@codegouvfr/react-dsfr` you can still benefit from some of this project features:
68
68
69
-
- The [`fr-*` classes autocompletion and type safety](https://react-dsfr.etalab.studio/class-names-type-safety).
70
-
- Use [the type safe color system](https://react-dsfr.etalab.studio/css-in-js#colors).
69
+
- The [`fr-*` classes autocompletion and type safety](https://guides.react-dsfr.fr/class-names-type-safety).
70
+
- Use [the type safe color system](https://guides.react-dsfr.fr/css-in-js#colors).
71
71
- Use the MUI theme.
72
-
- The [the spacing system](https://react-dsfr.etalab.studio/css-in-js#fr.spacing) and
73
-
[breakpoints util for building responsive UI](https://react-dsfr.etalab.studio/css-in-js#fr.breakpoints).
72
+
- The [the spacing system](https://guides.react-dsfr.fr/css-in-js#fr.spacing) and
73
+
[breakpoints util for building responsive UI](https://guides.react-dsfr.fr/css-in-js#fr.breakpoints).
74
74
75
75
[Here is a playground to demonstrate it](https://stackblitz.com/edit/react-ts-fph9bh?file=App.tsx).
0 commit comments