Skip to content

Commit

Permalink
Merge pull request #115 from InseeFr/fix/radio-checkbox-error-spacing
Browse files Browse the repository at this point in the history
fix: error states checkbox, radio
  • Loading branch information
jdirand authored Oct 19, 2023
2 parents a84e8c2 + b64d94f commit 72a08be
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inseefr/lunatic-dsfr",
"version": "1.0.4",
"version": "1.0.5",
"description": "Couche graphique pour Lunatic reposant sur le Système de Design de l'État (DSFR)",
"repository": {
"type": "git",
Expand Down
8 changes: 5 additions & 3 deletions src/CheckboxGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import { makeStyles } from "tss-react/dsfr";
const useStyles = makeStyles()({
root: {
"> legend": {
paddingBottom: "1rem",
paddingLeft: "0.75rem",
paddingRight: "0.75rem",
marginLeft: "-0.25rem",
marginRight: "-0.25rem",
fontSize: "1.75rem !important",
lineHeight: "2.25rem !important",
padding: "0",
margin: "0 0 1.5rem 0.25rem",
fontWeight: "700 !important",
},
},
});
Expand Down
8 changes: 5 additions & 3 deletions src/ComponentSet/ComponentSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ const useStyles = makeStyles()({
"> legend": {
fontSize: "1rem !important",
lineHeight: "2.25rem !important",
padding: "0",
margin: "0 0 1.5rem 0.25rem",
fontWeight: "700 !important",
paddingBottom: "1rem",
paddingLeft: "0.75rem",
paddingRight: "0.75rem",
marginLeft: "-0.25rem",
marginRight: "-0.25rem",
},
},
},
Expand Down
8 changes: 5 additions & 3 deletions src/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ const useStyles = makeStyles()({
"> legend": {
fontSize: "1.75rem !important",
lineHeight: "2.25rem !important",
padding: "0",
margin: "0 0 1.5rem 0.25rem",
fontWeight: "700 !important",
paddingBottom: "1rem",
paddingLeft: "0.75rem",
paddingRight: "0.75rem",
marginLeft: "-0.25rem",
marginRight: "-0.25rem",
},
},
});
Expand Down
34 changes: 33 additions & 1 deletion src/stories/component-set/source1.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"type": "VTL"
},
"errorMessage": {
"value": "\"Prénom cannot be null\"",
"value": "\"Veuillez renseigner un prénom\"",
"type": "VTL|MD"
},
"bindingDependencies": ["PRENOMS"]
Expand Down Expand Up @@ -85,6 +85,22 @@
"type": "VTL"
},
"conditionFilter": { "value": "true", "type": "VTL" },
"controls": [
{
"id": "prenom",
"typeOfControl": "CONSISTENCY",
"criticality": "WARN",
"control": {
"value": "not(nvl(Q1, \"\") = \"\")",
"type": "VTL"
},
"errorMessage": {
"value": "\"Veuillez répondre à cette question\"",
"type": "VTL|MD"
},
"bindingDependencies": ["Q1"]
}
],
"options": [
{
"value": "1",
Expand Down Expand Up @@ -115,6 +131,22 @@
"label": { "type": "VTL", "value": "\"Birthday \"" },
"conditionFilter": { "type": "VTL", "value": "true" },
"dateFormat": "YYYY-MM-DD",
"controls": [
{
"id": "prenom",
"typeOfControl": "CONSISTENCY",
"criticality": "WARN",
"control": {
"value": "not(nvl(DATENAISS, \"\") = \"\")",
"type": "VTL"
},
"errorMessage": {
"value": "\"Veuillez renseigner une date de naissance\"",
"type": "VTL|MD"
},
"bindingDependencies": ["DATENAISS"]
}
],
"description": {
"type": "VTL",
"value": "\"Please enter your birthday in the below field\""
Expand Down

0 comments on commit 72a08be

Please sign in to comment.