diff --git a/packages/code-du-travail-frontend/__tests__/__snapshots__/fiche-ministere-travail.test.tsx.snap b/packages/code-du-travail-frontend/__tests__/__snapshots__/fiche-ministere-travail.test.tsx.snap
index 1466a1504a..a13089ce2b 100644
--- a/packages/code-du-travail-frontend/__tests__/__snapshots__/fiche-ministere-travail.test.tsx.snap
+++ b/packages/code-du-travail-frontend/__tests__/__snapshots__/fiche-ministere-travail.test.tsx.snap
@@ -3,38 +3,38 @@
exports[` should render 1`] = `
-
-
-
- lorem ipsum intro
-
-
-
should render 1`] = `
>
@@ -618,6 +623,7 @@ exports[` should render 1`] = `
should render 1`] = `
should render 1`] = `
>
should render 1`] = `
should render 1`] = `
class="sc-iGgWBj cRLRjd"
>
should render 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -758,13 +766,13 @@ exports[` should render 1`] = `
Code du travail numérique
Le droit du travail
@@ -840,7 +848,7 @@ exports[` should render 1`] = `
Glossaire
@@ -848,7 +856,7 @@ exports[` should render 1`] = `
À propos
@@ -856,7 +864,7 @@ exports[` should render 1`] = `
Statistiques d’utilisation
@@ -864,7 +872,7 @@ exports[` should render 1`] = `
Intégrer les outils du Code du travail numérique
@@ -874,23 +882,23 @@ exports[` should render 1`] = `
should render 1`] = `
>
@@ -599,6 +604,7 @@ exports[` should render 1`] = `
should render 1`] = `
should render 1`] = `
>
should render 1`] = `
should render 1`] = `
class="sc-iGgWBj cRLRjd"
>
should render 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
diff --git a/packages/code-du-travail-frontend/pages/outils/[slug].tsx b/packages/code-du-travail-frontend/pages/outils/[slug].tsx
index 7f54ab37b1..acdfbef908 100644
--- a/packages/code-du-travail-frontend/pages/outils/[slug].tsx
+++ b/packages/code-du-travail-frontend/pages/outils/[slug].tsx
@@ -70,15 +70,15 @@ function Outils({
-
-
-
+
+
+
{router.asPath !== "/outils/indemnite-licenciement" && (
@@ -151,5 +151,5 @@ export const ShareContainer = styled.div`
export const Flex = styled.div`
display: flex;
- flex-direction: column;
+ flex-direction: column-reverse;
`;
diff --git a/packages/code-du-travail-frontend/src/common/Answer.tsx b/packages/code-du-travail-frontend/src/common/Answer.tsx
index cd1bfd8faf..88c65738f0 100644
--- a/packages/code-du-travail-frontend/src/common/Answer.tsx
+++ b/packages/code-du-travail-frontend/src/common/Answer.tsx
@@ -102,7 +102,11 @@ function Answer({
{additionalContent}
Partager ce contenu :
-
+
diff --git a/packages/code-du-travail-frontend/src/common/Article.js b/packages/code-du-travail-frontend/src/common/Article.js
index 3adbbf480c..5ed81a68a4 100644
--- a/packages/code-du-travail-frontend/src/common/Article.js
+++ b/packages/code-du-travail-frontend/src/common/Article.js
@@ -26,48 +26,50 @@ const Article = ({
return (
-
+
+ {children}
+
+ {suptitle && {suptitle} }
+
+ {title}
+
+
+
+ {source &&
+ (source.url ? (
+
+ Source:{" "}
+
+ {source.name}
+
+
+ ) : (
+ Source: {source.name}
+ ))}
+
+ {source && date && (
+ -
+ )}
+ {date && (
+
+ {dateLabel} : {date}
+
+ )}
+
+
+
- {suptitle && {suptitle} }
-
- {title}
-
-
-
- {source &&
- (source.url ? (
-
- Source:{" "}
-
- {source.name}
-
-
- ) : (
- Source: {source.name}
- ))}
-
- {source && date && (
- -
- )}
- {date && (
-
- {dateLabel} : {date}
-
- )}
-
-
-
- {children}
+
);
@@ -113,6 +115,11 @@ const Flex = styled.div`
flex-direction: column;
`;
+const FlexReverse = styled.div`
+ display: flex;
+ flex-direction: column-reverse;
+`;
+
const ShareContainer = styled.div`
display: flex;
align-items: center;
diff --git a/packages/code-du-travail-frontend/src/common/References/__tests__/__snapshots__/ReferencesJuridiques.test.js.snap b/packages/code-du-travail-frontend/src/common/References/__tests__/__snapshots__/ReferencesJuridiques.test.js.snap
index 913d5d7aec..60dbeb9198 100644
--- a/packages/code-du-travail-frontend/src/common/References/__tests__/__snapshots__/ReferencesJuridiques.test.js.snap
+++ b/packages/code-du-travail-frontend/src/common/References/__tests__/__snapshots__/ReferencesJuridiques.test.js.snap
@@ -8,8 +8,7 @@ exports[` should render 1`] = `
{
+export const Share = ({
+ title,
+ metaDescription,
+ tabIndex,
+}: Props): JSX.Element => {
const [currentPageUrl, setCurrentPageUrl] = useState("");
const hiddenInputRef = useRef(null);
const [isUrlCopied, setUrlCopied] = useState(false);
@@ -38,6 +43,7 @@ export const Share = ({ title, metaDescription }: Props): JSX.Element => {
POPUP_OPTIONS
);
}}
+ tabIndex={tabIndex}
>
@@ -55,6 +61,7 @@ export const Share = ({ title, metaDescription }: Props): JSX.Element => {
onClick={() => {
matopush(["trackEvent", "clic_share", currentPageUrl, "email"]);
}}
+ tabIndex={tabIndex}
>
@@ -74,6 +81,7 @@ export const Share = ({ title, metaDescription }: Props): JSX.Element => {
POPUP_OPTIONS
);
}}
+ tabIndex={tabIndex}
>
@@ -85,6 +93,7 @@ export const Share = ({ title, metaDescription }: Props): JSX.Element => {
{
matopush([
"trackEvent",
diff --git a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap
index 63d6c6d2d7..9463748d21 100644
--- a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap
+++ b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap
@@ -15,10 +15,81 @@ exports[` should renders 1`] = `
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ Contenu au format
+
+ html
+
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu au format
-
- html
-
-
-
-
- Contenu supplémentaire
-
should renders 1`] = `
>
@@ -260,6 +265,7 @@ exports[` should renders 1`] = `
should renders 1`] = `
should renders 1`] = `
>
should renders 1`] = `
should renders 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -405,7 +413,7 @@ exports[` should renders a breadcrumbs 1`] = `
-
- tag2
-
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu au format
-
- html
-
-
-
-
- Contenu supplémentaire
-
should renders a breadcrumbs 1`] = `
>
@@ -752,6 +765,7 @@ exports[` should renders a breadcrumbs 1`] = `
should renders a breadcrumbs 1`] = `
should renders a breadcrumbs 1`] = `
>
should renders a breadcrumbs 1`] = `
should renders a breadcrumbs 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders a breadcrumbs 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -908,10 +924,81 @@ exports[` should renders back to results link 1`] = `
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ Contenu au format
+
+ html
+
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders back to results link 1`] = `
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu au format
-
- html
-
-
-
-
- Contenu supplémentaire
-
should renders back to results link 1`] = `
>
@@ -1153,6 +1174,7 @@ exports[` should renders back to results link 1`] = `
should renders back to results link 1`] = `
should renders back to results link 1`] = `
>
should renders back to results link 1`] = `
should renders back to results link 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders back to results link 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -1309,10 +1333,78 @@ exports[` should renders related content 1`] = `
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ annualisation du temps de travail. Annualisation de l'annualisation.
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders related content 1`] = `
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- annualisation du temps de travail. Annualisation de l'annualisation.
-
-
-
- Contenu supplémentaire
-
should renders related content 1`] = `
>
@@ -1551,6 +1580,7 @@ exports[` should renders related content 1`] = `
should renders related content 1`] = `
should renders related content 1`] = `
>
should renders related content 1`] = `
should renders related content 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders related content 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -1707,7 +1739,7 @@ exports[` should renders related content 1`] = `
class="sc-cfxfcM kMmTaI"
>
should renders related content 1`] = `
should renders related content 1`] = `
class="sc-cfxfcM kMmTaI"
>
should renders related content 1`] = `
should renders related content 1`] = `
should renders tooltip 1`] = `
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ Contenu au format
+
+ html
+
+ contenant des tooltip sur certains mot comme rescrit. match aussi les abbréviation comme APE mais pas ape ou ses variantes comme code ape
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders tooltip 1`] = `
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu au format
-
- html
-
- contenant des tooltip sur certains mot comme rescrit. match aussi les abbréviation comme APE mais pas ape ou ses variantes comme code ape
-
-
-
- Contenu supplémentaire
-
should renders tooltip 1`] = `
>
@@ -2117,6 +2154,7 @@ exports[` should renders tooltip 1`] = `
should renders tooltip 1`] = `
should renders tooltip 1`] = `
>
should renders tooltip 1`] = `
should renders tooltip 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders tooltip 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -2273,10 +2313,82 @@ exports[` should renders tooltip for words with diacritics without bre
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ Contenu au format
+
+ indemnités
+
+ comme code ape
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders tooltip for words with diacritics without bre
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu au format
-
- indemnités
-
- comme code ape
-
-
-
- Contenu supplémentaire
-
should renders tooltip for words with diacritics without bre
>
@@ -2519,6 +2564,7 @@ exports[` should renders tooltip for words with diacritics without bre
should renders tooltip for words with diacritics without bre
should renders tooltip for words with diacritics without bre
>
should renders tooltip for words with diacritics without bre
should renders tooltip for words with diacritics without bre
class="sc-iGgWBj cRLRjd"
>
should renders tooltip for words with diacritics without bre
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -2675,10 +2723,83 @@ exports[` should renders tooltip without breaking a tag 1`] = `
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders tooltip without breaking a tag 1`] = `
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- Contenu supplémentaire
-
should renders tooltip without breaking a tag 1`] = `
>
@@ -2922,6 +2975,7 @@ exports[` should renders tooltip without breaking a tag 1`] = `
should renders tooltip without breaking a tag 1`] = `
should renders tooltip without breaking a tag 1`] = `
>
should renders tooltip without breaking a tag 1`] = `
should renders tooltip without breaking a tag 1`] = `
class="sc-iGgWBj cRLRjd"
>
should renders tooltip without breaking a tag 1`] = `
Avez-vous trouvé la réponse à votre question ?
Non
Oui
@@ -3078,10 +3134,78 @@ exports[` should renders tooltip without breaking previous word 1`] =
class="sc-iGgWBj biWgIW"
>
+
+
+ intro de l'article
+
+
+
+
+ annualisation du temps de travail. Annualisation de l'annualisation.
+
+
+
+ Contenu supplémentaire
+
+
+
+
+
+
+ Article du code
+
+
+
+
+
+ Source:
+ social groove
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 03/11/1979
+
+
+
+
+
should renders tooltip without breaking previous word 1`] =
-
-
-
- Article du code
-
-
-
-
-
- Source:
- social groove
-
-
- -
-
-
- Mis à jour le
- :
- 03/11/1979
-
-
-
-
-
-
-
- intro de l'article
-
-
-
-
- annualisation du temps de travail. Annualisation de l'annualisation.
-
-
-
- Contenu supplémentaire
-
should renders tooltip without breaking previous word 1`] =
>
@@ -3320,6 +3381,7 @@ exports[` should renders tooltip without breaking previous word 1`] =
should renders tooltip without breaking previous word 1`] =
should renders tooltip without breaking previous word 1`] =
>
should renders tooltip without breaking previous word 1`] =
should renders tooltip without breaking previous word 1`] =
class="sc-iGgWBj cRLRjd"
>
should renders tooltip without breaking previous word 1`] =
Avez-vous trouvé la réponse à votre question ?
Non
Oui
diff --git a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Article.test.js.snap b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Article.test.js.snap
index 5c8799e226..70170dd451 100644
--- a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Article.test.js.snap
+++ b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Article.test.js.snap
@@ -9,10 +9,58 @@ exports[` should render 1`] = `
class="sc-iGgWBj biWgIW"
>
+ this is an Article
+
+
+
+
+
+ Contrat de travail et formalités d'embauche de l'assistante maternelle
+
+
+
+
+
+ Source:
+ Fiche service public
+
+
+ -
+
+
+ Mis à jour le
+ :
+ 26/07/2018
+
+
+
+
+
-
-
-
- Contrat de travail et formalités d'embauche de l'assistante maternelle
-
-
-
-
-
- Source:
- Fiche service public
-
-
- -
-
-
- Mis à jour le
- :
- 26/07/2018
-
-
-
-
-
- this is an Article
diff --git a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/ServiceRenseignement.test.js.snap b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/ServiceRenseignement.test.js.snap
index a6e513294b..d03f6a43ac 100644
--- a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/ServiceRenseignement.test.js.snap
+++ b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/ServiceRenseignement.test.js.snap
@@ -52,8 +52,8 @@ exports[` should render suggestions 1`] = `
>
Saisissez votre numéro de département :
-
should render suggestions 1`] = `
type="text"
value="26"
/>
-
+
renders a popup when click on button 1`]
>
Saisissez votre numéro de département :
-
renders a popup when click on button 1`]
type="text"
value=""
/>
-
+
should render 1`] = `
class="sc-eulNck bCoRam"
>
Bonjour
diff --git a/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx b/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
index bc53aa60ac..0ad1fc4933 100644
--- a/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
+++ b/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
@@ -8,17 +8,6 @@ import { A11yLink } from "../common/A11yLink";
import { useLocalStorageOnPageLoad } from "../lib/useLocalStorage";
import rehypeToReact from "./rehypeToReact";
import ReferencesJuridiques, { filteredRefs } from "./References";
-import {
- ArrowLink,
- Badge,
- Button,
- icons,
- Paragraph,
- Section,
- theme,
- Title,
- Wrapper,
-} from "@socialgouv/cdtn-ui";
import { RadioQuestion } from "../outils/Components";
import { AgreementRoute } from "../outils/common/type/WizardType";
import router from "next/router";
@@ -34,7 +23,19 @@ import { handleTrackEvent } from "../outils/common/Agreement/tracking";
import { MatomoBaseEvent } from "../lib";
import { getCc3239Informations } from "../outils";
import { Enterprise } from "../conventions/Search/api/enterprises.service";
-import { Alert, Heading } from "@socialgouv/cdtn-ui/lib";
+import {
+ Alert,
+ ArrowLink,
+ Badge,
+ Button,
+ Heading,
+ icons,
+ Paragraph,
+ Section,
+ theme,
+ Title,
+ Wrapper,
+} from "@socialgouv/cdtn-ui";
const { DirectionRight } = icons;
diff --git a/packages/code-du-travail-frontend/src/contributions/__tests__/__snapshots__/Contribution.test.tsx.snap b/packages/code-du-travail-frontend/src/contributions/__tests__/__snapshots__/Contribution.test.tsx.snap
index f6103cec25..b156a518ea 100644
--- a/packages/code-du-travail-frontend/src/contributions/__tests__/__snapshots__/Contribution.test.tsx.snap
+++ b/packages/code-du-travail-frontend/src/contributions/__tests__/__snapshots__/Contribution.test.tsx.snap
@@ -147,8 +147,8 @@ exports[` should NOT render invalid preselected convention 1`] =
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should NOT render invalid preselected convention 1`] =
type="search"
value=""
/>
-
+
@@ -329,8 +329,8 @@ exports[` should render answer references 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should render answer references 1`] = `
type="search"
value=""
/>
-
+
@@ -511,8 +511,8 @@ exports[` should render preselected convention 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should render preselected convention 1`] = `
type="search"
value=""
/>
-
+
@@ -693,8 +693,8 @@ exports[` should render with both answers 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should render with both answers 1`] = `
type="search"
value=""
/>
-
+
@@ -850,8 +850,8 @@ exports[` should render with conventions answer 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should render with conventions answer 1`] = `
type="search"
value=""
/>
-
+
diff --git a/packages/code-du-travail-frontend/src/conventions/Convention/__tests__/__snapshots__/index.test.js.snap b/packages/code-du-travail-frontend/src/conventions/Convention/__tests__/__snapshots__/index.test.js.snap
index 704b8afe8d..1a26de7af5 100644
--- a/packages/code-du-travail-frontend/src/conventions/Convention/__tests__/__snapshots__/index.test.js.snap
+++ b/packages/code-du-travail-frontend/src/conventions/Convention/__tests__/__snapshots__/index.test.js.snap
@@ -3357,8 +3357,7 @@ exports[` renders 1`] = `
@@ -49,8 +49,8 @@ exports[` should show no results when no result 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should show no results when no result 1`] = `
type="search"
value="9999"
/>
-
+
@@ -99,8 +99,8 @@ exports[` should show spinner when loading 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should show spinner when loading 1`] = `
type="search"
value="8888"
/>
-
+
@@ -194,8 +194,8 @@ exports[` when input is IDCC, should search conventions 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
when input is IDCC, should search conventions 1`] = `
type="search"
value="1234"
/>
-
+
@@ -291,8 +291,8 @@ exports[` when input is a valid IDCC, should show only the perfect mat
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
when input is a valid IDCC, should show only the perfect mat
type="search"
value="4567"
/>
-
+
@@ -370,8 +370,8 @@ exports[` when searching by text, should use enterprise API 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
when searching by text, should use enterprise API 1`] = `
type="search"
value="hello"
/>
-
+
diff --git a/packages/code-du-travail-frontend/src/conventions/Search/api/error.tsx b/packages/code-du-travail-frontend/src/conventions/Search/api/error.tsx
index ef475f9486..f3d084c6f8 100644
--- a/packages/code-du-travail-frontend/src/conventions/Search/api/error.tsx
+++ b/packages/code-du-travail-frontend/src/conventions/Search/api/error.tsx
@@ -1,16 +1,14 @@
import React from "react";
-import { InlineError } from "../../../outils/common/ErrorField";
+import { Error } from "../../../outils/common/ErrorField";
export const nafError = (
-
- <>
- Numéro d’indentification (IDCC) incorrect. Il semblerait que vous ayez
- saisi un code APE {" "}
- (Activité Principale Exercée) ou{" "}
- NAF {" "}
- (Nomenclature des Activités Françaises) et dont l’objectif est
- d’identifier l’activité principale de l’entreprise.
- >
-
+
+ Numéro d’indentification (IDCC) incorrect. Il semblerait que vous ayez saisi
+ un code APE (Activité
+ Principale Exercée) ou{" "}
+ NAF (Nomenclature
+ des Activités Françaises) et dont l’objectif est d’identifier l’activité
+ principale de l’entreprise.
+
);
diff --git a/packages/code-du-travail-frontend/src/conventions/__tests__/__snapshots__/SearchModal.test.js.snap b/packages/code-du-travail-frontend/src/conventions/__tests__/__snapshots__/SearchModal.test.js.snap
index 3361225e92..18c6577f40 100644
--- a/packages/code-du-travail-frontend/src/conventions/__tests__/__snapshots__/SearchModal.test.js.snap
+++ b/packages/code-du-travail-frontend/src/conventions/__tests__/__snapshots__/SearchModal.test.js.snap
@@ -49,8 +49,8 @@ exports[`
should render a popup when click on button 1`] = `
>
Renseignez le nom de votre convention collective, le nom de votre entreprise ou son SIRET.
-
should render a popup when click on button 1`] = `
type="search"
value=""
/>
-
+
diff --git a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/AgreementSearch.tsx b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/AgreementSearch.tsx
index 0204cd4d50..539ce9c420 100644
--- a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/AgreementSearch.tsx
+++ b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/AgreementSearch.tsx
@@ -33,7 +33,7 @@ const AgreementSearch = ({
if (selectedAgreement) {
return (
<>
-
+
Vous avez sélectionné la convention collective :
{selectedAgreement.shortTitle}
diff --git a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/NoEnterprise.tsx b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/NoEnterprise.tsx
index 4b2d03696a..767134713f 100644
--- a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/NoEnterprise.tsx
+++ b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/components/NoEnterprise.tsx
@@ -43,7 +43,6 @@ export function NoEnterprise({
onCheckboxChange(!isCheckboxChecked);
}}
checked={isCheckboxChecked}
- tabIndex={1}
/>
setIsInputVisible(!isInputVisible)}
@@ -65,7 +64,7 @@ export function NoEnterprise({
)}
{isCheckboxChecked && (
-
+
Votre convention collective est :
diff --git a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/index.tsx b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/index.tsx
index 8219616099..8debd7a369 100644
--- a/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/index.tsx
+++ b/packages/code-du-travail-frontend/src/outils/CommonSteps/Agreement/index.tsx
@@ -6,7 +6,7 @@ import {
OnSelectAgreementFn,
} from "../../common/Agreement/types";
import { Enterprise } from "../../../conventions/Search/api/enterprises.service";
-import { InlineError } from "../../common/ErrorField";
+import { Error } from "../../common/ErrorField";
import { PublicodesSimulator } from "@socialgouv/modeles-social";
import ShowAlert from "../../common/Agreement/RouteSelection/ShowAlert";
import { AgreementSearchValue, CommonAgreementStoreError } from "./store";
@@ -101,7 +101,7 @@ function AgreementStep({
alertAgreementNotSupported={undefined}
simulator={simulator}
/>
- {error?.agreement && {error.agreement} }
+ {error?.agreement && {error.agreement} }
>
)}
{selectedRoute === "enterprise" && (
@@ -127,12 +127,10 @@ function AgreementStep({
}}
/>
)}
- {error?.enterprise && {error.enterprise} }
+ {error?.enterprise && {error.enterprise} }
>
)}
- {error?.errorPublicodes && (
- {error.errorPublicodes}
- )}
+ {error?.errorPublicodes && {error.errorPublicodes} }
>
);
}
diff --git a/packages/code-du-travail-frontend/src/outils/CommonSteps/Informations/components/PubliQuestion.tsx b/packages/code-du-travail-frontend/src/outils/CommonSteps/Informations/components/PubliQuestion.tsx
index 26ae645446..3990df5cd8 100644
--- a/packages/code-du-travail-frontend/src/outils/CommonSteps/Informations/components/PubliQuestion.tsx
+++ b/packages/code-du-travail-frontend/src/outils/CommonSteps/Informations/components/PubliQuestion.tsx
@@ -103,7 +103,7 @@ const PubliQuestion: React.FC = ({
error={error}
id={name}
showRequired
- icon={unité === "€" ? icons.Euro : undefined}
+ text={unité}
subLabel={cdtn.precision}
dataTestId={name}
autoFocus={autoFocus}
diff --git a/packages/code-du-travail-frontend/src/outils/Components/RadioQuestion.tsx b/packages/code-du-travail-frontend/src/outils/Components/RadioQuestion.tsx
index e5c7de0683..0d46e1ac0d 100644
--- a/packages/code-du-travail-frontend/src/outils/Components/RadioQuestion.tsx
+++ b/packages/code-du-travail-frontend/src/outils/Components/RadioQuestion.tsx
@@ -3,7 +3,7 @@ import React from "react";
import styled from "styled-components";
import Html from "../../common/Html";
-import { InlineError } from "../common/ErrorField";
+import { Error } from "../common/ErrorField";
import { Question, Tooltip } from "../common/Question";
import { RadioContainer, SmallText } from "../common/stepStyles";
import { SubLabel } from "./SelectQuestion";
@@ -48,7 +48,7 @@ export default function RadioQuestion({
return (
<>
-
+
{label}
{subLabel && {subLabel} }
@@ -63,15 +63,10 @@ export default function RadioQuestion({
data-testid={`${name} - ${question.label}`}
checked={selectedOption === question.value}
onChange={() => onChange(question.value)}
- tabIndex={1}
autoFocus={autoFocus ? index === 0 : false}
/>
))}
- {error && (
-
- {error}
-
- )}
+ {error && {error} }
{note && {note} }
@@ -79,10 +74,6 @@ export default function RadioQuestion({
);
}
-export const ErrorWrapper = styled.div`
- display: flex;
-`;
-
export const StyledFieldset = styled(Fieldset)`
display: contents;
`;
diff --git a/packages/code-du-travail-frontend/src/outils/Components/SelectQuestion.tsx b/packages/code-du-travail-frontend/src/outils/Components/SelectQuestion.tsx
index 6cd23e2267..fb84449aea 100644
--- a/packages/code-du-travail-frontend/src/outils/Components/SelectQuestion.tsx
+++ b/packages/code-du-travail-frontend/src/outils/Components/SelectQuestion.tsx
@@ -2,7 +2,7 @@ import { Select, theme } from "@socialgouv/cdtn-ui";
import React from "react";
import styled from "styled-components";
import Html from "../../common/Html";
-import { InlineError } from "../common/ErrorField";
+import { Error } from "../common/ErrorField";
import { Question, Tooltip } from "../common/Question";
type Props = {
@@ -68,7 +68,6 @@ const SelectQuestion = ({
onChange={(v) => onChange(v.target.value)}
value={value}
data-testid={name}
- tabIndex={1}
autoFocus={autoFocus}
>
@@ -89,11 +88,7 @@ const SelectQuestion = ({
);
})}
- {error && (
-
- {error}
-
- )}
+ {error && {error} }
);
};
@@ -123,7 +118,3 @@ const StyledSelect = styled(Select)`
const Wrapper = styled.div`
margin-bottom: ${spacings.base};
`;
-
-export const ErrorWrapper = styled.div`
- display: flex;
-`;
diff --git a/packages/code-du-travail-frontend/src/outils/Components/SimulatorDecorator/Components/StepList/index.tsx b/packages/code-du-travail-frontend/src/outils/Components/SimulatorDecorator/Components/StepList/index.tsx
index ca88a36e79..274e7d002e 100644
--- a/packages/code-du-travail-frontend/src/outils/Components/SimulatorDecorator/Components/StepList/index.tsx
+++ b/packages/code-du-travail-frontend/src/outils/Components/SimulatorDecorator/Components/StepList/index.tsx
@@ -35,7 +35,6 @@ const StepList = ({
index={index}
isActive={activeIndex === index}
ref={activeIndex === index ? listRef : undefined}
- tabIndex={activeIndex === index ? "-1" : undefined}
aria-live={activeIndex === index ? "polite" : undefined}
title={activeIndex === index ? "onglet actif" : null}
>
diff --git a/packages/code-du-travail-frontend/src/outils/Components/SimulatorNavigation.tsx b/packages/code-du-travail-frontend/src/outils/Components/SimulatorNavigation.tsx
index 17eb0ef1bc..7734e9eb89 100644
--- a/packages/code-du-travail-frontend/src/outils/Components/SimulatorNavigation.tsx
+++ b/packages/code-du-travail-frontend/src/outils/Components/SimulatorNavigation.tsx
@@ -22,13 +22,7 @@ const SimulatorNavigation = ({
return (
{onPrevious && (
-
+
Précédent
)}
@@ -37,7 +31,6 @@ const SimulatorNavigation = ({
variant="primary"
onClick={onStart}
data-testid="commencer"
- tabIndex={1}
>
Commencer
@@ -50,14 +43,13 @@ const SimulatorNavigation = ({
type="button"
variant="primary"
onClick={onNext}
- tabIndex={1}
>
Suivant
)}
{onPrint && (
-
+
Imprimer le résultat
)}
diff --git a/packages/code-du-travail-frontend/src/outils/Components/TextQuestion.tsx b/packages/code-du-travail-frontend/src/outils/Components/TextQuestion.tsx
index ffbfd7c2f5..57b4949707 100644
--- a/packages/code-du-travail-frontend/src/outils/Components/TextQuestion.tsx
+++ b/packages/code-du-travail-frontend/src/outils/Components/TextQuestion.tsx
@@ -1,10 +1,10 @@
import { Input, InputDate, theme } from "@socialgouv/cdtn-ui";
-import React, { FunctionComponent, useEffect, useRef, useState } from "react";
+import React, { FunctionComponent, useEffect, useState } from "react";
import styled from "styled-components";
import xss from "xss";
import Html from "../../common/Html";
-import { InlineError } from "../common/ErrorField";
+import { Error } from "../common/ErrorField";
import { Question, Tooltip } from "../common/Question";
import { SmallText } from "../common/stepStyles";
import { SubLabel } from "./SelectQuestion";
@@ -19,6 +19,7 @@ type Props = {
placeholder?: string;
subLabel?: string;
smallText?: string;
+ title?: string;
showRequired?: boolean;
icon?: FunctionComponent;
id: string;
@@ -37,6 +38,7 @@ export default function TextQuestion({
onChange,
smallText,
subLabel,
+ title,
showRequired,
icon,
id,
@@ -77,20 +79,18 @@ export default function TextQuestion({
type={inputType === "date" ? "text" : inputType}
updateOnScrollDisabled
data-testid={dataTestId}
- tabIndex={1}
autoFocus={autoFocus}
+ title={title}
/>
{error && (
-
-
-
-
-
+
+
+
)}
);
diff --git a/packages/code-du-travail-frontend/src/outils/ConventionCollective/steps/AgreementSelection.tsx b/packages/code-du-travail-frontend/src/outils/ConventionCollective/steps/AgreementSelection.tsx
index 44fd6fddaa..456157c3ea 100644
--- a/packages/code-du-travail-frontend/src/outils/ConventionCollective/steps/AgreementSelection.tsx
+++ b/packages/code-du-travail-frontend/src/outils/ConventionCollective/steps/AgreementSelection.tsx
@@ -1,5 +1,5 @@
import { getLabelBySource, SOURCES } from "@socialgouv/cdtn-utils";
-import { Button, FlatList, Paragraph, theme } from "@socialgouv/cdtn-ui";
+import { Button, FlatList, Paragraph, theme, Tile } from "@socialgouv/cdtn-ui";
import Link from "next/link";
import React from "react";
import styled from "styled-components";
@@ -9,7 +9,6 @@ import { ScreenType, useNavContext } from "../common/NavContext";
import { TrackingProps } from "../types";
import { AgreementTile } from "../../common/Agreement/AgreementSearch/AgreementInput/AgreementTile";
import { useRouter } from "next/router";
-import { Tile } from "@socialgouv/cdtn-ui/lib";
type EnterpriseSearchStepProps = {
onBackClick: () => void;
diff --git a/packages/code-du-travail-frontend/src/outils/DureePreavisDemission/__tests__/__snapshots__/index.test.tsx.snap b/packages/code-du-travail-frontend/src/outils/DureePreavisDemission/__tests__/__snapshots__/index.test.tsx.snap
index 0e61293ff7..2bf5400043 100644
--- a/packages/code-du-travail-frontend/src/outils/DureePreavisDemission/__tests__/__snapshots__/index.test.tsx.snap
+++ b/packages/code-du-travail-frontend/src/outils/DureePreavisDemission/__tests__/__snapshots__/index.test.tsx.snap
@@ -95,7 +95,6 @@ exports[` should render 1`] = `
should render CC answer 1`] = `
À partir des éléments que vous avez saisis, la durée du préavis de démission est estimée à :
2 mois
*
.
*
Le préavis débute le jour où le salarié remet sa lettre de démission en main propre ou à la date de première présentation de la lettre recommandée, peu importe le jour de son retrait par l’employeur.
Exemple : si l’employeur reçoit le courrier recommandé le
@@ -41,7 +42,7 @@ exports[` should render CC answer 1`] = `
4 juin
.
Si le
@@ -50,7 +51,7 @@ exports[` should render CC answer 1`] = `
L’employeur et le salarié peuvent fixer d’un commun accord une date de départ anticipée, libérant ainsi le salarié de l’exécution de la totalité ou d’une partie du préavis.
@@ -59,8 +60,7 @@ exports[` should render CC answer 1`] = `
should render 1`] = `
should render with O duration 1`] = `
Durée du préavis
Aucun préavis
@@ -18,8 +19,7 @@ exports[` should render with O duration 1`] = `
should render with O duration 1`] = `
should render with O duration 1`] = `
class="sc-dSCufp gAzXIi"
>
Attention il peut exister une durée plus favorable
@@ -206,28 +206,29 @@ exports[`
should render with both CC duration and CDT duration 1`]
À partir des éléments que vous avez saisis, la durée du préavis de licenciement est estimée à :
1 mois
*
.
*
Le préavis débute à la date de première présentation de la notification du licenciement par lettre recommandée, peu importe le jour de son retrait par le salarié.
Exemple : si le salarié reçoit le courrier recommandé le
@@ -240,7 +241,7 @@ exports[` should render with both CC duration and CDT duration 1`]
tombe un samedi, un dimanche, un jour férié ou un jour qui n’est habituellement pas travaillé dans l’entreprise, le salarié effectuera son dernier jour dans l’entreprise le jour ouvrable suivant.
L’employeur et le salarié peuvent fixer d’un commun accord une date de départ anticipée, libérant ainsi le salarié de l’exécution de la totalité ou d’une partie du préavis.
@@ -249,8 +250,7 @@ exports[` should render with both CC duration and CDT duration 1`]
should render with both CC duration and CDT duration 1`]
should render with both CC duration and CDT duration 1`]
class="sc-dSCufp gAzXIi"
>
Attention il peut exister une durée plus favorable
@@ -402,7 +402,8 @@ exports[`
should render with only CC duration 1`] = `
Durée du préavis
Aucun préavis
@@ -412,8 +413,7 @@ exports[`
should render with only CC duration 1`] = `
should render with only CC duration 1`] = `
should render with only CC duration 1`] = `
class="sc-dSCufp gAzXIi"
>
Attention il peut exister une durée plus favorable
@@ -568,28 +568,29 @@ exports[`
should render with when no CC 1`] = `
À partir des éléments que vous avez saisis, la durée du préavis de licenciement est estimée à :
2 mois
*
.
*
Le préavis débute à la date de première présentation de la notification du licenciement par lettre recommandée, peu importe le jour de son retrait par le salarié.
Exemple : si le salarié reçoit le courrier recommandé le
@@ -602,7 +603,7 @@ exports[` should render with when no CC 1`] = `
tombe un samedi, un dimanche, un jour férié ou un jour qui n’est habituellement pas travaillé dans l’entreprise, le salarié effectuera son dernier jour dans l’entreprise le jour ouvrable suivant.
L’employeur et le salarié peuvent fixer d’un commun accord une date de départ anticipée, libérant ainsi le salarié de l’exécution de la totalité ou d’une partie du préavis.
@@ -611,8 +612,7 @@ exports[` should render with when no CC 1`] = `
should render with when no CC 1`] = `
should render with when no CC 1`] = `
class="sc-dSCufp gAzXIi"
>
Attention il peut exister une durée plus favorable
@@ -748,28 +748,29 @@ exports[`
should render with when unhandled CC 1`] = `
À partir des éléments que vous avez saisis, la durée du préavis de licenciement est estimée à :
2 mois
*
.
*
Le préavis débute à la date de première présentation de la notification du licenciement par lettre recommandée, peu importe le jour de son retrait par le salarié.
Exemple : si le salarié reçoit le courrier recommandé le
@@ -782,7 +783,7 @@ exports[` should render with when unhandled CC 1`] = `
tombe un samedi, un dimanche, un jour férié ou un jour qui n’est habituellement pas travaillé dans l’entreprise, le salarié effectuera son dernier jour dans l’entreprise le jour ouvrable suivant.
L’employeur et le salarié peuvent fixer d’un commun accord une date de départ anticipée, libérant ainsi le salarié de l’exécution de la totalité ou d’une partie du préavis.
@@ -791,8 +792,7 @@ exports[` should render with when unhandled CC 1`] = `
should render with when unhandled CC 1`] = `
should render with when unhandled CC 1`] = `
class="sc-dSCufp gAzXIi"
>
Attention il peut exister une durée plus favorable
diff --git a/packages/code-du-travail-frontend/src/outils/DureePreavisLicenciement/steps/__tests__/__snapshots__/Status.test.js.snap b/packages/code-du-travail-frontend/src/outils/DureePreavisLicenciement/steps/__tests__/__snapshots__/Status.test.js.snap
index 087c34a34c..b0694b0a86 100644
--- a/packages/code-du-travail-frontend/src/outils/DureePreavisLicenciement/steps/__tests__/__snapshots__/Status.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/DureePreavisLicenciement/steps/__tests__/__snapshots__/Status.test.js.snap
@@ -3,7 +3,7 @@
exports[`
should render 1`] = `
should render 1`] = `
exports[` should render coefficient 1`] = `
should render coefficient 1`] = `
should render coefficient 1`] = `
class="sc-kqGoIF jVxPSE"
>
@@ -304,7 +304,7 @@ exports[` should render coefficient 1`] = `
exports[` should render seriousMisconduct 1`] = `
should render seriousMisconduct 1`] = `
should render 1`] = `
should render no results 1`] = `
should render with duration 1`] = `
D’après les éléments saisis, durant son préavis, le salarié peut s’absenter pour rechercher un emploi pendant
:
2 heures par jour
@@ -178,8 +178,7 @@ exports[` should render with duration 1`] = `
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/agreements/29-hospitalisation-privee-but-non-lucratif/Component.tsx b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/agreements/29-hospitalisation-privee-but-non-lucratif/Component.tsx
index 3438f03b46..5bebb61f30 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/agreements/29-hospitalisation-privee-but-non-lucratif/Component.tsx
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/agreements/29-hospitalisation-privee-but-non-lucratif/Component.tsx
@@ -69,7 +69,7 @@ export default function Agreement29() {
error={errorSixBestSalariesTotal}
id="sixBestSalariesTotal"
showRequired
- icon={icons.Euro}
+ text="€"
smallText="Prendre en compte les primes et avantages en nature."
/>
)}
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/index.tsx b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/index.tsx
index c8848c761c..c0ced57570 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/index.tsx
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/index.tsx
@@ -19,6 +19,7 @@ import {
import { ToolName } from "../types";
import { PublicodesSimulator } from "@socialgouv/modeles-social";
import { Feedback } from "../common/Feedback";
+import styled from "styled-components";
type Props = {
icon: string;
@@ -120,7 +121,7 @@ const IndemniteLicenciementSimulator = ({
};
return (
- <>
+
simulator={PublicodesSimulator.INDEMNITE_LICENCIEMENT}
title={title}
@@ -158,7 +159,7 @@ const IndemniteLicenciementSimulator = ({
hiddenStep={getHiddenSteps()}
/>
- >
+
);
};
@@ -184,3 +185,7 @@ export const CalculateurIndemnite = ({
);
};
+export const Flex = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Resultat/Ineligible.tsx b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Resultat/Ineligible.tsx
index a0716712f3..2972453e46 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Resultat/Ineligible.tsx
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Resultat/Ineligible.tsx
@@ -18,9 +18,12 @@ export default function Ineligible() {
return (
<>
Indemnité de licenciement
-
- Il n'y a pas d'indemnité de licenciement dans cette situation
-
+
+
+ Il n'y a pas d'indemnité de licenciement dans cette
+ situation
+
+
{getEligibilityError()}
{!agreementHasNoLegalIndemnity && infoWarning && (
onChangeSalaries(index, e.target.value)}
onBlur={() => setIsFirstEdit(false)}
data-testid={dataTestidSalaries ?? "salary-input"}
autoFocus={autoFocus ? index === 0 : false}
- tabIndex={1}
/>
{errorsSalaries[`${index}`] && (
@@ -146,7 +144,7 @@ export const SalaireTempsPlein = ({
name={`prime.${index}`}
type="number"
invalid={errorsPrimes[`${index}`]}
- icon={icons.Euro}
+ text="€"
onChange={(e) =>
onChangeLocalPrimes(index, e.target.value)
}
@@ -157,7 +155,6 @@ export const SalaireTempsPlein = ({
? "prime-" + dataTestidSalaries
: "prime-input"
}
- tabIndex={1}
/>
{errorsPrimes[`${index}`] && (
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/components/__tests__/SalaireTempsPlein.test.tsx b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/components/__tests__/SalaireTempsPlein.test.tsx
index d4f97a0a57..a4240a8540 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/components/__tests__/SalaireTempsPlein.test.tsx
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/components/__tests__/SalaireTempsPlein.test.tsx
@@ -56,7 +56,7 @@ describe(" ", () => {
/>
);
const input1 = getByTitle(
- /Salaire mensuel brut pour le mois/i
+ /Salaire mensuel brut en € pour le mois/i
) as HTMLInputElement;
fireEvent.change(input1, { target: { value: "1500" } });
expect(initObject[0].value).toBe(1500);
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/index.tsx b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/index.tsx
index f8c3b01e30..c1d46d65e1 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/index.tsx
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/Salaires/index.tsx
@@ -4,7 +4,7 @@ import {
useIndemniteLicenciementStore,
} from "../../store";
import { RadioQuestion, TextQuestion } from "../../../Components";
-import { TempsPartiel, SalaireTempsPlein } from "./components";
+import { SalaireTempsPlein, TempsPartiel } from "./components";
import { getSupportedAgreement } from "@socialgouv/modeles-social";
import { IndemniteLicenciementStepName } from "../..";
import { AgreementsInjector } from "../../agreements";
@@ -12,7 +12,6 @@ import {
getSalairesTempsPleinSubtitle,
getTooltipSalairesMensuel,
} from "../../agreements/ui-customizations";
-import { icons } from "@socialgouv/cdtn-ui";
import {
generateSalaireTempsPleinQuestion,
generateSameSalaryQuestion,
@@ -121,13 +120,14 @@ const StepSalaires = () => {
diff --git a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.tsx.snap b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.tsx.snap
index 0c2bbcdab8..a388a301b8 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.tsx.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.tsx.snap
@@ -95,7 +95,6 @@ exports[` should render 1`] = `
should add a salaire 1`] = `
should add a salaire 1`] = `
should add a salaire 1`] = `
exports[` should delete a salaires 1`] = `
should delete a salaires 1`] = `
exports[` should render 1`] = `
should render 1`] = `
should render 1`] = `
should render 1`] = `
should render 1`] = `
should render 1`] = `
should render 1`] = `
should render 1`] = `
should render cdd indemnite with conventional provision message 1`] = `
Montant
@@ -11,7 +11,8 @@ exports[`
should render cdd indemnite with conventional provisi
La prime d'intervention
est estimée à :
180
€
@@ -21,8 +22,7 @@ exports[` should render cdd indemnite with conventional provisi
should render cdd indemnite with conventional provisi
class="sc-fjvvzt gtrYRc"
>
Éléments saisis
@@ -75,285 +75,282 @@ exports[` should render cdd indemnite with conventional provisi
Formule
-
-
-
-
-
-
-
- 6
-
-
- 100
-
-
-
- ×
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- l
-
-
- S
-
-
- a
-
-
- l
-
-
- a
-
-
- i
-
-
- r
-
-
- e
-
-
- s
-
-
- "
-
-
-
+
+
+
+ 6
+
+
+ 100
+
+
+
+ ×
+
+
- \\frac{6}{100} \\times "totalSalaires"
-
-
-
-
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ l
+
+
+ S
+
+
+ a
+
+
+ l
+
+
+ a
+
+
+ i
+
+
+ r
+
+
+ e
+
+
+ s
+
+
+ "
+
+
+
+ \\frac{6}{100} \\times "totalSalaires"
+
+
+
+
+
+
-
+
-
-
- 100
-
+ 100
+
+
-
-
-
+ class="pstrut"
+ style="height:3em;"
+ />
+
+
+
+
-
-
- 6
-
+ 6
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- ×
+
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- lS
-
-
- a
-
-
- l
-
-
- ai
-
-
- res
-
-
- "
-
+ ×
+
+
+
+
+
+
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ lS
+
+
+ a
+
+
+ l
+
+
+ ai
+
+
+ res
+
+
+ "
-
+
Sources
@@ -392,7 +389,7 @@ exports[` should render cdd indemnite with conventional provisi
should render cdd indemnite with conventional provisi
class="sc-dSCufp gAzXIi"
>
Attention il peut exister un montant plus favorable
@@ -449,7 +446,7 @@ exports[`
should render cdd indemnite with conventional provisi
exports[`
should render cdd indemnite with no ccn message 1`] = `
Montant
@@ -457,7 +454,8 @@ exports[`
should render cdd indemnite with no ccn message 1`] =
La prime de précarité
est estimée à :
300
€
@@ -467,8 +465,7 @@ exports[` should render cdd indemnite with no ccn message 1`] =
should render cdd indemnite with no ccn message 1`] =
class="sc-fjvvzt gtrYRc"
>
Éléments saisis
@@ -521,285 +518,282 @@ exports[` should render cdd indemnite with no ccn message 1`] =
Formule
-
-
-
-
-
-
-
- 10
-
-
- 100
-
-
-
- ×
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- l
-
-
- S
-
-
- a
-
-
- l
-
-
- a
-
-
- i
-
-
- r
-
-
- e
-
-
- s
-
-
- "
-
-
-
+
+
+
+ 10
+
+
+ 100
+
+
+
+ ×
+
+
- \\frac{10}{100} \\times "totalSalaires"
-
-
-
-
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ l
+
+
+ S
+
+
+ a
+
+
+ l
+
+
+ a
+
+
+ i
+
+
+ r
+
+
+ e
+
+
+ s
+
+
+ "
+
+
+
+ \\frac{10}{100} \\times "totalSalaires"
+
+
+
+
+
+
-
+
-
-
- 100
-
+ 100
+
+
-
-
-
+ class="pstrut"
+ style="height:3em;"
+ />
+
+
+
+
-
-
- 10
-
+ 10
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- ×
+
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- lS
-
-
- a
-
-
- l
-
-
- ai
-
-
- res
-
-
- "
-
+ ×
+
+
+
+
+
+
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ lS
+
+
+ a
+
+
+ l
+
+
+ ai
+
+
+ res
+
+
+ "
-
+
Sources
@@ -828,7 +822,7 @@ exports[` should render cdd indemnite with no ccn message 1`] =
should render cdd indemnite with no ccn message 1`] =
class="sc-dSCufp gAzXIi"
>
Attention il peut exister un montant plus favorable
@@ -888,7 +882,7 @@ exports[`
should render cdd indemnite with no ccn message 1`] =
exports[`
should render cdd indemnite with no conventional provision message 1`] = `
Montant
@@ -896,7 +890,8 @@ exports[`
should render cdd indemnite with no conventional prov
La prime de précarité
est estimée à :
300
€
@@ -906,8 +901,7 @@ exports[` should render cdd indemnite with no conventional prov
should render cdd indemnite with no conventional prov
class="sc-fjvvzt gtrYRc"
>
Éléments saisis
@@ -960,285 +954,282 @@ exports[` should render cdd indemnite with no conventional prov
Formule
-
-
-
-
-
-
-
- 10
-
-
- 100
-
-
-
- ×
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- l
-
-
- S
-
-
- a
-
-
- l
-
-
- a
-
-
- i
-
-
- r
-
-
- e
-
-
- s
-
-
- "
-
-
-
+
+
+
+ 10
+
+
+ 100
+
+
+
+ ×
+
+
- \\frac{10}{100} \\times "totalSalaires"
-
-
-
-
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ l
+
+
+ S
+
+
+ a
+
+
+ l
+
+
+ a
+
+
+ i
+
+
+ r
+
+
+ e
+
+
+ s
+
+
+ "
+
+
+
+ \\frac{10}{100} \\times "totalSalaires"
+
+
+
+
+
+
-
+
-
-
- 100
-
+ 100
+
+
+
+
+
+
+
-
-
-
-
-
-
- 10
-
+ 10
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- ×
+
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- lS
-
-
- a
-
-
- l
-
-
- ai
-
-
- res
-
-
- "
-
+ ×
+
+
+
+
+
+
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ lS
+
+
+ a
+
+
+ l
+
+
+ ai
+
+
+ res
+
+
+ "
-
+
Sources
@@ -1277,7 +1268,7 @@ exports[` should render cdd indemnite with no conventional prov
should render cdd indemnite with no conventional prov
class="sc-dSCufp gAzXIi"
>
Attention il peut exister un montant plus favorable
@@ -1337,7 +1328,7 @@ exports[`
should render cdd indemnite with no conventional prov
exports[`
should render cdd indemnite with unhandled cc message 1`] = `
Montant
@@ -1345,7 +1336,8 @@ exports[`
should render cdd indemnite with unhandled cc message
La prime de précarité
est estimée à :
300
€
@@ -1355,8 +1347,7 @@ exports[` should render cdd indemnite with unhandled cc message
should render cdd indemnite with unhandled cc message
class="sc-fjvvzt gtrYRc"
>
Éléments saisis
@@ -1409,285 +1400,282 @@ exports[` should render cdd indemnite with unhandled cc message
Formule
-
-
-
-
-
-
-
- 10
-
-
- 100
-
-
-
- ×
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- l
-
-
- S
-
-
- a
-
-
- l
-
-
- a
-
-
- i
-
-
- r
-
-
- e
-
-
- s
-
-
- "
-
-
-
+
+
+
+ 10
+
+
+ 100
+
+
+
+ ×
+
+
- \\frac{10}{100} \\times "totalSalaires"
-
-
-
-
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ l
+
+
+ S
+
+
+ a
+
+
+ l
+
+
+ a
+
+
+ i
+
+
+ r
+
+
+ e
+
+
+ s
+
+
+ "
+
+
+
+ \\frac{10}{100} \\times "totalSalaires"
+
+
+
+
+
+
-
+
-
-
- 100
-
+ 100
+
+
-
-
-
+ class="pstrut"
+ style="height:3em;"
+ />
+
+
+
+
-
-
- 10
-
+ 10
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- ×
-
-
+
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- lS
-
-
- a
-
-
- l
-
-
- ai
-
-
- res
-
-
- "
-
+ ×
+
+
+
+
+
+
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ lS
+
+
+ a
+
+
+ l
+
+
+ ai
+
+
+ res
+
+
+ "
-
+
Sources
@@ -1716,7 +1704,7 @@ exports[` should render cdd indemnite with unhandled cc message
should render cdd indemnite with unhandled cc message
class="sc-dSCufp gAzXIi"
>
Attention il peut exister un montant plus favorable
@@ -1776,7 +1764,7 @@ exports[`
should render cdd indemnite with unhandled cc message
exports[`
should render ctt indemnite 1`] = `
Montant
@@ -1784,7 +1772,8 @@ exports[`
should render ctt indemnite 1`] = `
La prime de précarité
est estimée à :
300
€
@@ -1794,8 +1783,7 @@ exports[` should render ctt indemnite 1`] = `
should render ctt indemnite 1`] = `
class="sc-fjvvzt gtrYRc"
>
Éléments saisis
@@ -1848,285 +1836,282 @@ exports[` should render ctt indemnite 1`] = `
Formule
-
-
-
-
-
-
-
- 10
-
-
- 100
-
-
-
- ×
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- l
-
-
- S
-
-
- a
-
-
- l
-
-
- a
-
-
- i
-
-
- r
-
-
- e
-
-
- s
-
-
- "
-
-
-
+
+
+
+ 10
+
+
+ 100
+
+
+
+ ×
+
+
- \\frac{10}{100} \\times "totalSalaires"
-
-
-
-
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ l
+
+
+ S
+
+
+ a
+
+
+ l
+
+
+ a
+
+
+ i
+
+
+ r
+
+
+ e
+
+
+ s
+
+
+ "
+
+
+
+ \\frac{10}{100} \\times "totalSalaires"
+
+
+
+
+
+
-
+
-
-
- 100
-
+ 100
+
+
-
-
-
+ class="pstrut"
+ style="height:3em;"
+ />
+
+
+
+
-
-
- 10
-
+ 10
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- ×
-
-
+
-
-
- "
-
-
- t
-
-
- o
-
-
- t
-
-
- a
-
-
- lS
-
-
- a
-
-
- l
-
-
- ai
-
-
- res
-
-
- "
-
+ ×
+
+
+
+
+
+
+ "
+
+
+ t
+
+
+ o
+
+
+ t
+
+
+ a
+
+
+ lS
+
+
+ a
+
+
+ l
+
+
+ ai
+
+
+ res
+
+
+ "
-
+
Sources
@@ -2155,7 +2140,7 @@ exports[` should render ctt indemnite 1`] = `
should render ctt indemnite 1`] = `
class="sc-dSCufp gAzXIi"
>
Attention il peut exister un montant plus favorable
diff --git a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/InfosGenerales.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/InfosGenerales.test.js.snap
index 15e53a7d13..3f90f3e296 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/InfosGenerales.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/InfosGenerales.test.js.snap
@@ -4,7 +4,7 @@ exports[`
should render 1`] = `
should render with CTT 1`] = `
should render multiple inputs 1`] = `
should render multiple inputs 1`] = `
should render multiple inputs 1`] = `
Montant :
@@ -91,41 +91,33 @@ exports[` should render multiple inputs 1`] = `
Supprimer
should render multiple inputs 1`] = `
Montant :
@@ -151,41 +143,33 @@ exports[` should render multiple inputs 1`] = `
Supprimer
should render multiple inputs 1`] = `
should render multiple inputs 1`] = `
Ajouter un salaire
Majorations, indemnités, primes et accessoires compris sauf les remboursements de frais et l’indemnité de congés payés.
@@ -230,7 +214,7 @@ exports[` should render multiple inputs 1`] = `
exports[` should render one input 1`] = `
should render one input 1`] = `
@@ -310,35 +294,27 @@ exports[` should render one input 1`] = `
Majorations, indemnités, primes et accessoires compris sauf les remboursements de frais et l’indemnité de congés payés.
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementInput/SearchAgreementInput.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementInput/SearchAgreementInput.tsx
index fd702dba5d..853dd9504b 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementInput/SearchAgreementInput.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementInput/SearchAgreementInput.tsx
@@ -57,7 +57,6 @@ export const SearchAgreementInput = ({
type: "search",
value: query,
"data-testid": "agreement-search-input",
- tabIndex: "1",
autoFocus: true,
};
return (
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementNoResult.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementNoResult.tsx
index f43f89000a..68078598f5 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementNoResult.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementNoResult.tsx
@@ -1,4 +1,4 @@
-import { SOURCES } from "@socialgouv/cdtn-utils";
+import { Agreement, SOURCES } from "@socialgouv/cdtn-utils";
import {
AlertWithIcon,
Button,
@@ -12,11 +12,9 @@ import Link from "next/link";
import React from "react";
import Spinner from "react-svg-spinner";
import styled from "styled-components";
-
-import { Agreement } from "@socialgouv/cdtn-utils";
import { FetchReducerState } from "../components/Suggester";
import { TrackingProps, UserAction } from "../../../ConventionCollective/types";
-import { InlineError } from "../../ErrorField";
+import { Error } from "../../ErrorField";
import { HelpModal } from "../components/Modal";
type Props = {
@@ -37,15 +35,11 @@ const AgreementNoResult = ({ onUserAction, state }: Props): JSX.Element => {
);
}
- if (state.isError) {
+ if (state.error && state.isError) {
if (typeof state.error === "string") {
- return (
-
- );
+ return {state.error} ;
}
- return ;
+ return ;
}
if (state.data && !state.data.length) {
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementSearch.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementSearch.tsx
index 3896842cff..851b93ba02 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementSearch.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/AgreementSearch/AgreementSearch.tsx
@@ -35,7 +35,7 @@ const AgreementSearch = ({
if (selectedAgreement) {
return (
<>
-
+
Vous avez sélectionné la convention collective :
+
{showTitleWithHighlight ? (
{highlightLabel}
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchInput/SearchEnterpriseInput.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchInput/SearchEnterpriseInput.tsx
index 1e0767d1d1..6b9b20bd67 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchInput/SearchEnterpriseInput.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchInput/SearchEnterpriseInput.tsx
@@ -81,7 +81,6 @@ export const SearchEnterpriseInput = ({
autoComplete="off"
data-testid="agreement-company-search-input"
disabled={isDisabled}
- tabIndex={1}
/>
@@ -105,7 +104,6 @@ export const SearchEnterpriseInput = ({
autoComplete="off"
data-testid="agreement-postal-code-search-input"
disabled={isDisabled}
- tabIndex={1}
/>
Rechercher
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchResult.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchResult.tsx
index e0fdaafaad..b21f3c365f 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchResult.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/EntrepriseSearchResult.tsx
@@ -10,7 +10,7 @@ import Spinner from "react-svg-spinner";
import styled from "styled-components";
import { FetchReducerState } from "../components/Suggester";
import { TrackingProps, UserAction } from "../../../ConventionCollective/types";
-import { InlineError } from "../../ErrorField";
+import { Error } from "../../ErrorField";
import { ListItem, ResultList } from "../components/ResultList";
import { HelpModal } from "../components/Modal";
import { Enterprise } from "../../../../conventions/Search/api/enterprises.service";
@@ -49,13 +49,9 @@ const EntrepriseSearchResults = ({
if (state.isError) {
if (typeof state.error === "string") {
- return (
-
- );
+ return {state.error} ;
}
- return ;
+ return ;
}
if (!state.data) {
return <>>;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/SelectedEnterprise.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/SelectedEnterprise.tsx
index a37294cd46..7bf13bcfa0 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/SelectedEnterprise.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/SelectedEnterprise.tsx
@@ -16,7 +16,7 @@ const SelectedEnterprise = ({
}: Props): JSX.Element => {
return (
<>
-
+
Vous avez sélectionné l'entreprise :
{enterprise.simpleLabel}
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreement.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreement.tsx
index 1189867bfc..3e2af6cf5c 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreement.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreement.tsx
@@ -22,7 +22,7 @@ const ShowAgreement = ({
}: Props): JSX.Element => {
return (
<>
-
+
Une convention collective a été trouvée pour cette entreprise :
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx
index 5654735129..f158203a19 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx
@@ -31,7 +31,7 @@ const ShowAgreements = ({
return (
<>
-
+
{enterprise.conventions.length} conventions collectives ont été trouvées
pour cette entreprise, sélectionnez la vôtre :
diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/components/ResultList.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/components/ResultList.tsx
index 741172bfc5..43a339b696 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Agreement/components/ResultList.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/components/ResultList.tsx
@@ -9,7 +9,7 @@ type Props = {
export function ResultList({ query, children }: Props): JSX.Element {
const viewMoreButton = (onClick) => (
-
+
Voir plus
);
diff --git a/packages/code-du-travail-frontend/src/outils/common/CurrencyField.js b/packages/code-du-travail-frontend/src/outils/common/CurrencyField.js
index b228451239..a891d31286 100644
--- a/packages/code-du-travail-frontend/src/outils/common/CurrencyField.js
+++ b/packages/code-du-travail-frontend/src/outils/common/CurrencyField.js
@@ -37,7 +37,7 @@ function CurrencyField({
{...input}
type="number"
invalid={touched && invalid}
- icon={icons.Euro}
+ text="€"
/>
{error && touched && invalid ? (
diff --git a/packages/code-du-travail-frontend/src/outils/common/ErrorField.tsx b/packages/code-du-travail-frontend/src/outils/common/ErrorField.tsx
index 2b861554fc..79fd8db950 100644
--- a/packages/code-du-travail-frontend/src/outils/common/ErrorField.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/ErrorField.tsx
@@ -27,7 +27,9 @@ const ErrorField = ({ name, errorText }: Props): JSX.Element => (
/>
);
-const Error = styled.p`
+const Error = styled.p.attrs(() => ({
+ role: "alert",
+}))`
margin: ${theme.spacings.small} 0 ${theme.spacings.base};
color: ${({ theme }) => theme.error};
font-weight: 600;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/Questionnaire.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/Questionnaire.tsx
index edbbc97545..9ff93cd0ee 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/Questionnaire.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/Questionnaire.tsx
@@ -1,8 +1,8 @@
import styled from "styled-components";
-import { Button, Heading } from "@socialgouv/cdtn-ui";
+import { Button, Heading, theme } from "@socialgouv/cdtn-ui";
-import { QuestionnaireItem, Status } from "./QuestionnaireItem";
-import { trackFeedback, EVENT_ACTION, FEEDBACK_RESULT } from "./tracking";
+import { QuestionnaireItem } from "./QuestionnaireItem";
+import { EVENT_ACTION, FEEDBACK_RESULT, trackFeedback } from "./tracking";
import { useState } from "react";
type QuestionnaireProps = {
@@ -14,10 +14,10 @@ export const Questionnaire = ({ onClick }: QuestionnaireProps): JSX.Element => {
const [displayError, setDisplayError] = useState(false);
return (
<>
-
+
Comment s'est passée cette simulation pour vous ?
-
-
+ {
);
};
-const StyledHeading = styled(Heading)`
- margin-left: 0;
- margin-bottom: 0;
- padding-top: 6px;
-`;
-
const StyledButton = styled(Button)`
- margin: 12px auto 24px 24px;
-`;
-
-const StyledQuestionnaireItem = styled(QuestionnaireItem)`
- padding: 24px;
+ margin: 0 ${theme.spacings.xmedium};
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireAdvanced.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireAdvanced.tsx
index a1ec4a87b7..db1790bb08 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireAdvanced.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireAdvanced.tsx
@@ -1,4 +1,4 @@
-import { Button, Heading } from "@socialgouv/cdtn-ui";
+import { Button, Heading, theme } from "@socialgouv/cdtn-ui";
import { QuestionnaireItem } from "./QuestionnaireItem";
import { QuestionnaireText } from "./QuestionnaireText";
import styled from "styled-components";
@@ -25,11 +25,11 @@ export const QuestionnaireAdvanced = ({
const [feedbackText, setFeedbackText] = useState();
return (
<>
-
+
Merci pour votre aide ! Pouvez-vous nous en dire plus ?
-
-
-
+
+
-
-
-
+
{
@@ -96,20 +96,6 @@ export const QuestionnaireAdvanced = ({
);
};
-const StyledHeading = styled(Heading)`
- margin-left: 0;
- margin-bottom: 0;
- padding-top: 6px;
-`;
-
const StyledButton = styled(Button)`
- margin: 12px auto 24px 24px;
-`;
-
-const FormContainer = styled.div`
- padding: 0 24px;
-`;
-
-const StyledQuestionnaireItem = styled(QuestionnaireItem)`
- margin: 24px 0;
+ margin: 0 ${theme.spacings.xmedium};
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireEnd.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireEnd.tsx
index 9155f6bc8a..1d4b82b08e 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireEnd.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireEnd.tsx
@@ -1,12 +1,12 @@
-import { Heading } from "@socialgouv/cdtn-ui";
+import { Heading, theme } from "@socialgouv/cdtn-ui";
import styled from "styled-components";
export const QuestionnaireEnd = (): JSX.Element => {
return (
<>
-
+
Merci pour votre aide !
-
+
Votre évaluation sera étudiée au plus vite par nos équipes
@@ -14,11 +14,6 @@ export const QuestionnaireEnd = (): JSX.Element => {
);
};
-const StyledHeading = styled(Heading)`
- margin-left: 0;
- padding-top: 6px;
-`;
-
-const StyledText = styled.span`
- margin: 12px auto 24px 24px;
+const StyledText = styled.p`
+ padding: 0 ${theme.spacings.medium};
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireItem.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireItem.tsx
index da8f3ff176..1964061bfc 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireItem.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireItem.tsx
@@ -39,7 +39,7 @@ export const QuestionnaireItem = ({
}: QuestionnaireItemProps): JSX.Element => {
const [status, setStatus] = useState();
return (
-
+
{title && {title} }
Vous devez choisir une des réponses
)}
-
+
);
};
@@ -108,3 +108,7 @@ const StyledButton = styled(Button)`
const StyledError = styled.span`
color: ${colors.error};
`;
+
+const Div = styled.div`
+ padding: 0 ${theme.spacings.xmedium} ${theme.spacings.large};
+`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireText.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireText.tsx
index acb4a6485e..c03a3ed445 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireText.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/QuestionnaireText.tsx
@@ -1,4 +1,4 @@
-import { Textarea } from "@socialgouv/cdtn-ui";
+import { Textarea, theme } from "@socialgouv/cdtn-ui";
import styled from "styled-components";
type QuestionnaireItemProps = {
@@ -34,6 +34,7 @@ export const QuestionnaireText = ({
const StyledContainer = styled.div`
display: flex;
flex-direction: column;
+ padding: 0 ${theme.spacings.xmedium} ${theme.spacings.large};
`;
const StyledTextarea = styled(Textarea)`
@@ -41,7 +42,7 @@ const StyledTextarea = styled(Textarea)`
max-width: 100%;
`;
-const MaxCharacterText = styled.span`
+const MaxCharacterText = styled.p`
margin: 12px 0;
font-size: 14px;
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/index.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/index.tsx
index 46356480f8..2fc7c21d02 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/index.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/index.tsx
@@ -1,10 +1,11 @@
import styled from "styled-components";
-import { theme, icons, Wrapper } from "@socialgouv/cdtn-ui";
+import { icons, theme, Wrapper } from "@socialgouv/cdtn-ui";
import { Introduction } from "./introduction";
import { useState } from "react";
import { Questionnaire } from "./Questionnaire";
import { QuestionnaireAdvanced } from "./QuestionnaireAdvanced";
import { QuestionnaireEnd } from "./QuestionnaireEnd";
+import { Button } from "@socialgouv/cdtn-ui/lib";
export const Feedback = (): JSX.Element => {
const [status, setStatus] = useState<
@@ -13,14 +14,26 @@ export const Feedback = (): JSX.Element => {
const [closed, setClosed] = useState(false);
const [position, setPosition] = useState(0);
const [bodyPosition, setBodyPosition] = useState(0);
+ const closeButton = (
+ setClosed(true)}
+ >
+ setClosed(true)}
+ data-testid="feedbackCloseButton"
+ title="Fermer la modale"
+ />
+
+ );
return !closed ? (
- <>
+
{!status && (
- setClosed(true)}
- data-testid="feedbackCloseButton"
- />
+ {closeButton}
{
setStatus("questionnaire");
@@ -38,10 +51,7 @@ export const Feedback = (): JSX.Element => {
setBodyPosition(document.body.getBoundingClientRect().top);
}}
>
- setClosed(true)}
- data-testid="feedbackCloseButton"
- />
+ {closeButton}
{status === "questionnaire" && (
{
@@ -60,35 +70,38 @@ export const Feedback = (): JSX.Element => {
{status === "questionnaireEnd" && }
)}
- >
+
) : (
<>>
);
};
-const { colors } = theme;
+const { colors, box } = theme;
-const IntroContainer = styled(Wrapper)`
+const Div = styled.div`
+ display: flex;
+ justify-content: flex-end;
+`;
+
+const IntroContainer = styled.div`
border: 1px solid ${colors.secondary};
- border-radius: 6px;
- width: 460px;
+ border-radius: ${box.borderRadius};
+ background-color: ${theme.colors.white};
+ min-width: 460px;
max-width: 100%;
- display: flex;
- flex-direction: column;
- margin: 42px 0 0 auto;
- padding: 0 0 28px 0 !important;
+ padding: 0;
position: relative;
`;
const StyledContainer = styled(IntroContainer)`
width: 520px;
+ padding: ${theme.spacings.xmedium} 0;
`;
-const StyledCloseIcon = styled(icons.Close)`
+const CloseButton = styled(Button)`
position: absolute;
top: 8px;
right: 8px;
width: 24px;
- cursor: pointer;
- z-index: 10;
+ color: ${({ theme }) => theme.secondary};
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Feedback/introduction.tsx b/packages/code-du-travail-frontend/src/outils/common/Feedback/introduction.tsx
index f7366af5f8..a1087d6d05 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Feedback/introduction.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Feedback/introduction.tsx
@@ -1,5 +1,5 @@
import styled from "styled-components";
-import { Button, theme } from "@socialgouv/cdtn-ui";
+import { Button, Paragraph, theme } from "@socialgouv/cdtn-ui";
type IntroductionProps = {
onClick: () => void;
@@ -7,25 +7,16 @@ type IntroductionProps = {
export const Introduction = ({ onClick }: IntroductionProps): JSX.Element => {
return (
- <>
-
+
+
Votre avis sur ce simulateur nous intéresse
-
- Donner mon avis
- >
+
+
Donner mon avis
+
);
};
-const { fonts } = theme;
-
-const StyledHeading = styled.span`
+const Div = styled.div`
text-align: center;
- color: ${({ theme }) => theme.title};
- font-weight: 600;
- font-size: ${fonts.sizes.headings.small};
- margin: 32px auto 20px;
-`;
-
-const StyledButton = styled(Button)`
- margin: 0 auto;
+ padding: ${theme.spacings.large};
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/MathFormula.js b/packages/code-du-travail-frontend/src/outils/common/MathFormula.js
index 1c6cc032b9..30b23c59e0 100644
--- a/packages/code-du-travail-frontend/src/outils/common/MathFormula.js
+++ b/packages/code-du-travail-frontend/src/outils/common/MathFormula.js
@@ -1,7 +1,6 @@
import TeX from "@matejmazur/react-katex";
import PropTypes from "prop-types";
import React from "react";
-import styled from "styled-components";
export const asciiMathToTex = (ascii) => {
// multiplications
@@ -23,19 +22,16 @@ export const asciiMathToTex = (ascii) => {
export const MathFormula = ({ formula }) => {
return (
-
-
- {asciiMathToTex(formula)}
-
-
+
+ {asciiMathToTex(formula)}
+
);
};
MathFormula.propTypes = {
formula: PropTypes.string.isRequired,
};
-
-const StyledFormula = styled.div`
- display: flex;
- width: "fit-content";
-`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/Question.tsx b/packages/code-du-travail-frontend/src/outils/common/Question.tsx
index 633d9eec1f..d9b21613d2 100644
--- a/packages/code-du-travail-frontend/src/outils/common/Question.tsx
+++ b/packages/code-du-travail-frontend/src/outils/common/Question.tsx
@@ -10,7 +10,6 @@ export type Tooltip = {
trackableFn?: (actualVisibility: boolean) => void;
};
type Props = {
- as?: string;
required?: boolean;
tooltip?: Tooltip;
children: React.ReactNode;
@@ -35,10 +34,7 @@ export const Question = ({
{...otherProps}
data-testid={"question-label"}
>
-
+
{children}
{required && (obligatoire) }
{tooltip && (
@@ -69,18 +65,8 @@ export const Question = ({
);
};
-const { breakpoints, fonts, spacings } = theme;
+const { spacings } = theme;
const StyledLegend = styled(Legend)`
- font-weight: 600;
- display: block;
margin: ${spacings.small} 0;
- cursor: ${(props) => (props.as ? "default" : "pointer")};
- @media (max-width: ${breakpoints.mobile}) {
- font-size: ${fonts.sizes.default};
- }
- p,
- div {
- font-weight: 100 !important;
- }
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/StepList.js b/packages/code-du-travail-frontend/src/outils/common/StepList.js
index 179e3811b4..fdf73aeea7 100644
--- a/packages/code-du-travail-frontend/src/outils/common/StepList.js
+++ b/packages/code-du-travail-frontend/src/outils/common/StepList.js
@@ -20,7 +20,6 @@ export function StepList({ activeIndex = 0, items = [], anchorRef }) {
index={index}
isActive={activeIndex === index}
ref={activeIndex === index ? anchorRef : undefined}
- tabIndex={activeIndex === index ? "-1" : undefined}
aria-live={activeIndex === index ? "polite" : undefined}
title={activeIndex === index ? "onglet actif" : null}
>
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/MathFormula.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/MathFormula.test.js.snap
index ab5502e0c1..c5d9a0ee73 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/MathFormula.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/MathFormula.test.js.snap
@@ -3,264 +3,261 @@
exports[` renders 1`] = `
-
-
-
-
-
-
-
- 1
-
-
- 4
-
-
-
- ×
-
-
- S
-
-
- r
-
-
- e
-
-
- f
-
-
- ×
-
-
- A
-
-
- ×
-
+
+
+
- 2
+ 1
-
-
- \\frac{1}{4} \\times Sref \\times A \\times 2
-
-
-
-
+
+ 4
+
+
+
+ ×
+
+
+ S
+
+
+ r
+
+
+ e
+
+
+ f
+
+
+ ×
+
+
+ A
+
+
+ ×
+
+
+ 2
+
+
+
+ \\frac{1}{4} \\times Sref \\times A \\times 2
+
+
+
+
+
+
-
+
-
-
- 4
-
+ 4
+
+
-
-
-
+ class="pstrut"
+ style="height:3em;"
+ />
+
+
+
+
-
-
- 1
-
+ 1
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- ×
+
-
-
- S
-
-
- re
-
-
- f
-
-
-
- ×
-
-
+ ×
+
+
+
+
-
-
- A
-
-
-
- ×
-
-
+ S
-
-
- 2
-
+ re
+
+
+ f
+
+
+
+ ×
+
+
+
+
+
+
+ A
+
+
+
+ ×
+
+
+
+
+
+
+ 2
-
+
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/SelectQuestion.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/SelectQuestion.test.js.snap
index 418849f24b..cccb02f4b7 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/SelectQuestion.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/SelectQuestion.test.js.snap
@@ -6,7 +6,7 @@ exports[` should render with default value 1`] = `
class="sc-iapWAC huEEnQ"
>
@@ -90,7 +90,7 @@ exports[` should render with selectedValue value 1`] = `
class="sc-iapWAC huEEnQ"
>
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
index 441bd1294a..aea713e662 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
@@ -39,7 +39,6 @@ exports[` should render 1`] = `
should call navigate the previous step when click on précé
class="sc-iGgWBj biWgIW"
>
Étape
s
1/2
@@ -45,22 +45,21 @@ exports[` should call navigate the previous step when click on précé
>
1
First Step
2
@@ -72,15 +71,15 @@ exports[` should call navigate the previous step when click on précé
Premiere Etape
Commencer
should handle initialState.stepIndex 1`] = `
class="sc-iGgWBj biWgIW"
>
Étape
s
2/2
@@ -141,10 +140,10 @@ exports[` should handle initialState.stepIndex 1`] = `
class="sc-cfxfcM kMmTaI"
>
1
@@ -152,12 +151,11 @@ exports[` should handle initialState.stepIndex 1`] = `
2
@@ -180,16 +178,16 @@ exports[` should handle initialState.stepIndex 1`] = `
/>
Précédent
Imprimer le résultat
@@ -206,35 +204,35 @@ exports[` should handle initialValues 1`] = `
class="sc-iGgWBj biWgIW"
>
Étape
s
1/3
@@ -245,32 +243,31 @@ exports[` should handle initialValues 1`] = `
>
1
First Step
2
Second Step
3
@@ -282,15 +279,15 @@ exports[` should handle initialValues 1`] = `
Premiere Etape
Commencer
should navigate to the second step when click on Commencer 1
class="sc-iGgWBj biWgIW"
>
Étape
s
2/2
@@ -351,10 +348,10 @@ exports[` should navigate to the second step when click on Commencer 1
class="sc-cfxfcM kMmTaI"
>
1
@@ -362,12 +359,11 @@ exports[` should navigate to the second step when click on Commencer 1
2
@@ -390,16 +386,16 @@ exports[` should navigate to the second step when click on Commencer 1
/>
Précédent
Imprimer le résultat
@@ -416,35 +412,35 @@ exports[` should render a step 1`] = `
class="sc-iGgWBj biWgIW"
>
Étape
s
1/2
@@ -455,22 +451,21 @@ exports[` should render a step 1`] = `
>
1
First Step
2
@@ -482,15 +477,15 @@ exports[` should render a step 1`] = `
Premiere Etape
Commencer
should render 1`] = `
({
+ role: "alert",
+}))`
color: ${({ theme }) => theme.primary};
font-weight: 700;
- font-size: ${fonts.sizes.headings.small};
+ font-size: ${fonts.sizes.headings.xmedium};
white-space: pre-line;
@media (max-width: ${breakpoints.mobile}) {
- font-size: ${fonts.sizes.default};
+ font-size: ${fonts.sizes.medium};
}
`;
-export const HighlightResult = styled(Highlight)`
- font-size: 1.5em;
-`;
-
export const SmallText = styled.p`
color: ${colors.paragraph};
font-size: ${fonts.sizes.small};
diff --git a/packages/code-du-travail-frontend/src/questionnaire/Components/Question/Question.tsx b/packages/code-du-travail-frontend/src/questionnaire/Components/Question/Question.tsx
index 725ce949bf..2c10772376 100644
--- a/packages/code-du-travail-frontend/src/questionnaire/Components/Question/Question.tsx
+++ b/packages/code-du-travail-frontend/src/questionnaire/Components/Question/Question.tsx
@@ -6,7 +6,6 @@ import { Fieldset, Legend, Text } from "@socialgouv/cdtn-ui";
import { InfoBulle } from "../../../outils/common/InfoBulle";
import { trackClickHelp } from "../../tracking";
import React, { useContext } from "react";
-import { Paragraph } from "@socialgouv/cdtn-ui/lib";
type QuestionProps = {
widgetMode: boolean;
diff --git a/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap b/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
index 226c376cb5..fb4b07d88d 100644
--- a/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
+++ b/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
@@ -136,7 +136,7 @@ exports[` should render results 1`] = `
class="sc-eulNck bCoRam"
>
Consulter
@@ -207,7 +207,7 @@ exports[` should render results 1`] = `
class="sc-eulNck bCoRam"
>
Consulter
@@ -302,7 +302,7 @@ exports[` should render results 1`] = `
class="sc-eulNck bCoRam"
>
Consulter
diff --git a/packages/react-ui/src/Collapse/__snapshots__/test.js.snap b/packages/react-ui/src/Collapse/__snapshots__/test.js.snap
index 3d2ffc6f5d..cb0e26d204 100644
--- a/packages/react-ui/src/Collapse/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Collapse/__snapshots__/test.js.snap
@@ -5,8 +5,7 @@ exports[` renders 1`] = `
{
const [active, setActive] = React.useState(false);
const [height, setHeight] = React.useState("0px");
@@ -32,10 +31,6 @@ export const Collapse = ({
variant="naked"
narrow
type="button"
- // eslint-disable-next-line jsx-a11y/no-autofocus
- autoFocus={autoFocus}
- // eslint-disable-next-line jsx-a11y/tabindex-no-positive
- tabIndex={1}
>
@@ -73,6 +68,7 @@ const StyledLink = styled(Button)`
&[aria-expanded="true"] {
color: ${({ theme }) => theme.paragraph};
}
+
padding: 0;
`;
const StyledText = styled.span`
@@ -81,7 +77,6 @@ const StyledText = styled.span`
`;
Collapse.propTypes = {
- autoFocus: PropTypes.boolean,
children: PropTypes.node.isRequired,
className: PropTypes.string,
onClickHandler: PropTypes.func,
diff --git a/packages/react-ui/src/Toast/index.js b/packages/react-ui/src/Toast/index.js
index 03dab0a1e9..1e1beb90b6 100644
--- a/packages/react-ui/src/Toast/index.js
+++ b/packages/react-ui/src/Toast/index.js
@@ -3,7 +3,7 @@ import React, { useEffect } from "react";
import { X } from "react-feather";
import styled, { css } from "styled-components";
-import { Button } from "../Button/index.js";
+import { Button } from "../Button";
import { fromBottom, fromLeft, fromRight, fromTop } from "../keyframes.js";
import { box, spacings } from "../theme";
@@ -28,7 +28,6 @@ export const Toast = ({ children, onRemove, timeout, variant, ...props }) => {
small
aria-label="Fermer"
onClick={onRemove}
- tabIndex={props.tabIndex}
>
@@ -48,7 +47,6 @@ Toast.propTypes = {
onRemove: PropTypes.func,
shadow: PropTypes.bool,
squared: PropTypes.bool,
- tabIndex: PropTypes.number,
timeout: PropTypes.number,
variant: PropTypes.oneOf(["primary", "secondary"]),
wide: PropTypes.bool,
diff --git a/packages/react-ui/src/field/Input.js b/packages/react-ui/src/field/Input.js
index 80de458074..eeafa95672 100644
--- a/packages/react-ui/src/field/Input.js
+++ b/packages/react-ui/src/field/Input.js
@@ -63,9 +63,8 @@ Input.defaultProps = {
export const INPUT_HEIGHT = "5.4rem";
-const StyledWrapper = styled.span`
+const StyledWrapper = styled.div`
position: relative;
- display: inline-block;
@media (max-width: ${breakpoints.mobile}) {
width: 100%;
}
diff --git a/packages/react-ui/src/field/InputDate.js b/packages/react-ui/src/field/InputDate.js
index b13af2b378..77a17a739f 100644
--- a/packages/react-ui/src/field/InputDate.js
+++ b/packages/react-ui/src/field/InputDate.js
@@ -165,7 +165,7 @@ const StyledInput = styled.input`
border-color: transparent;
outline: none;
border-radius: ${box.borderRadius};
- width: 160px;
+ width: 15rem;
@media (max-width: ${breakpoints.mobile}) {
width: 100%;
}
@@ -181,7 +181,7 @@ const StyledDiv = styled.div`
justify-content: center;
align-items: center;
cursor: pointer;
- width: 40px;
+ width: 4rem;
height: 100%;
`;
diff --git a/packages/react-ui/src/field/__snapshots__/test.js.snap b/packages/react-ui/src/field/__snapshots__/test.js.snap
index 0bb0255bc5..2642472bdd 100644
--- a/packages/react-ui/src/field/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/field/__snapshots__/test.js.snap
@@ -2,14 +2,14 @@
exports[`
should render input field 1`] = `
-
-
+
`;
@@ -36,13 +36,13 @@ exports[` should render input date field 1`] = `
class="sc-iGgWBj kZPIXv"
>