1.0.21 • Published 9 days ago

@inseefr/lunatic-dsfr v1.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

lunatic-DSFR

Lunatic-DSFR is a library of customised Lunatic components built with TypeScript and React-DSFR.

This library is designed to be an opt-in solution to replace the native style of Lunatic with the style of the French Design system.

WARNING: This Design System is only meant to be used for official French's public service websites.
Its main purpose is to make it easy to identify governmental websites for citizens. See terms.

Getting Started

To visualise the Storybook

Currently the storybook is not deployed. In order to visualise and test the components you can launch the storybook locally. It is also recommended that any proposed changes to any components or any new components be tested in the storybook before proposing a PR.

To launch the storybook locally, ensure that you have cloned the repository.

git clone https://github.com/InseeFr/Lunatic-DSFR.git

Once you have the repository cloned locally, navigate to the folder containing the repository and ensure that the necessary packages are available.

cd lunatic-dsfr
yarn install

Now you are ready to launch the storybook, which will be accessible at localhost:6006

Connect Lunatic-DSFR with useLunatic()

In any application that uses the Lunatic components library, it is possible to over-ride the native Lunatic components by injecting Lunatic-DSFR as an argument in the uselunatic() function.

To use Lunatic-DSFR, first install the package into your application that calls useLunatic():

yarn add @inseefr/lunatic-dsfr

Import the Lunatic-DSFR components in the file where you call useLunatic():

import * as custom from "@inseefr/lunatic-dsfr";

Then inject custom as an argument of the useLunatic() function:

const {
    getComponents,
    goPreviousPage,
    goNextPage,
    isFirstPage,
    isLastPage,
    goToPage,
    getData,
    Provider,
    compileControls,
    pageTag,
} = useLunatic(source, data, {
    getReferentiel,
    preferences,
    features,
    savingType,
    autoSuggesterloading,
    onChange,
    custom,
});
2.0.0-rc.16

9 days ago

2.0.0-rc.15

10 days ago

2.0.0-rc.13

13 days ago

2.0.0-rc.14

13 days ago

2.0.0-rc.12

24 days ago

2.0.0-rc.11

25 days ago

2.0.0-rc.10

30 days ago

2.0.0-rc.9

1 month ago

2.0.0-rc.8

1 month ago

2.0.0-rc.7

2 months ago

2.0.0-rc.5

2 months ago

2.0.0-rc.6

2 months ago

2.0.0-rc.2

2 months ago

2.0.0-rc.3

2 months ago

2.0.0-rc.4

2 months ago

2.0.0-rc.0

2 months ago

2.0.0-rc.1

2 months ago

1.0.21

4 months ago

1.0.20

4 months ago

1.0.19

5 months ago

1.0.2

7 months ago

1.0.18

5 months ago

1.0.1

7 months ago

1.0.17

5 months ago

1.0.0

8 months ago

1.0.16

6 months ago

0.0.19-suggester-2

10 months ago

1.0.9

6 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

0.0.37

8 months ago

0.0.30

8 months ago

0.0.31

8 months ago

0.0.32

8 months ago

0.0.33

8 months ago

0.0.34

8 months ago

0.0.35

8 months ago

0.0.36

8 months ago

0.0.26

9 months ago

0.0.27

9 months ago

0.0.28

9 months ago

0.0.29

8 months ago

0.0.20

9 months ago

0.0.21

9 months ago

0.0.22

9 months ago

0.0.23

9 months ago

0.0.24

9 months ago

0.0.25

9 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.15

6 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

0.0.19

11 months ago

0.0.10

12 months ago

0.0.11

12 months ago

0.0.12

12 months ago

0.0.13

12 months ago

0.0.14

12 months ago

0.0.15

12 months ago

0.0.9

1 year ago

0.0.16

11 months ago

0.0.17

11 months ago

0.0.18

11 months ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago