Skip to content

Commit

Permalink
Mettre à jour les icônes pour les champs de saisie + message d'erreur c…
Browse files Browse the repository at this point in the history
…lose #80 (#102)

Signed-off-by: Sorina Ardelean <[email protected]>
  • Loading branch information
sori-ard authored Apr 11, 2024
1 parent ee94e69 commit 7304aa1
Show file tree
Hide file tree
Showing 30 changed files with 459 additions and 147 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@villedemontreal/hochelaga",
"description": "La boite à outils web",
"version": "5.1.0",
"version": "5.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
15 changes: 10 additions & 5 deletions source/_patterns/02-components/entree-de-donnees/01-inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"formGroupInputRequired": true,
"formGroupInputLabel": "Libellé",
"formGroupPopover": true,
"formGroupBtnClear": true,
"formGroupInputPlaceholder": {
"text": "Placeholder"
},
Expand All @@ -19,20 +20,22 @@
}
}
],
"inputTextSizeError": [
"inputTextSizeValidation": [
{
"formGroupClass": "required",
"formGroupInputID": "form-control-default-error-one",
"formGroupInputClass": "is-invalid",
"formGroupInputRequired": true,
"formGroupInputLabel": "En erreur",
"formGroupBtnClear": true,
"formGroupInputLabel": "En erreur input vide",
"formGroupInputPlaceholder": {
"text": "Placeholder"
},
"formGroupInputHelpText": false,
"formGroupInputError": {
"id": "input-text-error-id",
"text": "Texte d'erreur"
"text": "Texte d'erreur",
"formAriaInputError": true
}
}
],
Expand All @@ -44,7 +47,8 @@
"formGroupInputRequired": false,
"formGroupInputPlaceholder": "désactivé",
"formGroupInputHelpText": false,
"formGroupInputState": "disabled"
"formGroupInputState": "disabled",
"formGroupBtnClear": false
},
{
"formGroupClass": false,
Expand All @@ -54,7 +58,8 @@
"formGroupInputRequired": false,
"formGroupInputPlaceholder": "read-only",
"formGroupInputHelpText": false,
"formGroupInputState": "readonly"
"formGroupInputState": "readonly",
"formGroupBtnClear": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,28 @@

<h4 class="pl-pattern-subtitle">Validation</h4>
<div class="row">
{{# inputTextSizeError}}
{{# inputTextSizeValidation}}
<div class="col-xs-6 col-md-4">
{{> components-input-text }}
</div>
{{/ inputTextSizeError}}
{{/ inputTextSizeValidation}}
<div class="col-xs-6 col-md-4">
<div class="form-group has-clear required">
<label for="form-group-input-clear">En erreur input rempli</label>
<div class="input-group-icon">
<input type="text" class="form-control is-invalid" id="form-group-input-clear-error" value="E98126-NN45" aria-invalid="true" aria-describedby="input-text-error-id" required>
<button class="btn-clear">
<span class="icon icon-x-circle icon-md" aria-hidden="true">
<span class="sr-only">Supprimer le texte saisi</span>
</button>
</div>
<div class="invalid-feedback" id="input-text-error-id">
<span class="icon icon-exclamation icon-xs" aria-hidden="true"></span>
<span class="sr-only">Erreur</span>
Texte d'erreur
</div>
</div>
</div>
</div>

<h4 class="pl-pattern-subtitle">États</h4>
Expand All @@ -29,8 +46,8 @@
<div class="input-group-icon">
<input type="text" class="form-control" id="form-group-input-clear" value="jonathan Levingston">
<button class="btn-clear">
<span class="icon icon-x-circle-full icon-sm">
<span class="sr-only">Clear search input</span>
<span class="icon icon-x-circle icon-md" aria-hidden="true">
<span class="sr-only">Supprimer le texte saisi</span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"formGroupTextareaRows": "5",
"formGroupInputError": {
"id": "form-group-textarea-error-text",
"text": "Texte d'erreur"
"text": "Texte d'erreur",
"formAriaInputError": true
}
}
],
Expand All @@ -47,7 +48,7 @@
"formGroupInputClass": false,
"formGroupInputRequired": false,
"formGroupInputLabel": "Libellé",
"formGroupInputPlaceholder":{
"formGroupInputPlaceholder": {
"text": "Placeholder"
},
"formGroupInputHelpText": {
Expand Down
19 changes: 10 additions & 9 deletions source/_patterns/02-components/entree-de-donnees/03-selects.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"defaultOption": "Option par défaut",
"options": [
{
"option-text" : "Option 1",
"option-value" : "option-1"
"option-text": "Option 1",
"option-value": "option-1"
},
{
"option-text" : "Option 2",
"option-value" : "option-2"
"option-text": "Option 2",
"option-value": "option-2"
}
]
},
Expand All @@ -35,18 +35,19 @@
"defaultOption": "Option par défaut",
"options": [
{
"option-text" : "Option 1",
"option-value" : "option-1"
"option-text": "Option 1",
"option-value": "option-1"
},
{
"option-text" : "Option 2",
"option-value" : "option-2"
"option-text": "Option 2",
"option-value": "option-2"
}
]
},
"formGroupInputError": {
"id": "custom-select-error-text",
"text": "Texte d'erreur"
"text": "Texte d'erreur",
"formAriaInputError": true
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{{> components-input-file-item-v2}}

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"listUploadedItems": [
{
"media": {
"img" : false,
"img": false,
"icon": {
"icon-name": "icon-md icon-file-pdf"
}
Expand All @@ -38,7 +38,7 @@
},
{
"media": {
"img" : false,
"img": false,
"icon": {
"icon-name": "icon-md icon-file-pdf"
}
Expand All @@ -48,7 +48,7 @@
},
{
"media": {
"img" : false,
"img": false,
"icon": {
"icon-name": "icon-md icon-file"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"listUploadedItems": [
{
"media": {
"img" : {
"img": {
"src": "https://picsum.photos/id/1062/40/40",
"alt": "Alt pour image #1."
}
Expand All @@ -38,7 +38,7 @@
},
{
"media": {
"img" : {
"img": {
"src": "https://picsum.photos/id/1062/40/40",
"alt": "Alt pour image #2."
}
Expand All @@ -48,7 +48,7 @@
},
{
"media": {
"img" : {
"img": {
"src": "https://picsum.photos/id/1062/40/40",
"alt": "Alt pour image #3."
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"formGroupClass": "required",
"formGroupInputID": "form-control-input-file-v2",
"formGroupInputLabel": "Libellé",
"formGroupInputHelpText": {
"id": "input-file-help-text",
"text": "Texte d'assistance."
},
"formGroupFileID": "file-droparea-v2",
"formGroupFileDropID": "form-group-file-upload",
"formGroupFileDropLabel": "Parcourir",
"formGroupFileDropHelpText": "ou déposer votre fichier ici",
"formGroupFileClass": "is-invalid",
"formGroupInputError": {
"id": "file-droparea-v2-error",
"text": "Texte d'erreur"
},
"dropdownMenu": {
"dropdownMenuClass": "dropdown-menu-right",
"dropdownMenuID": "dropdownMoreVertical-1",
"dropdownSection": [
{
"dropdownItem": [
{
"url": "#",
"dropdownItemLabel": "Libellé"
},
{
"url": "#",
"dropdownItemLabel": "Libellé"
}
]
}
]
}
}

This file was deleted.

90 changes: 90 additions & 0 deletions source/_patterns/02-components/entree-de-donnees/05-checkbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,95 @@
"state": "disabled"
}
]
},
"formCheckboxesWrapper": {
"formGroupLabel": "Libellé",
"formCheckboxItems": [
{
"class": "custom-control-card",
"id": "chk-card05-1",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": false
},
{
"class": "custom-control-card",
"id": "chk-card06-3",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": "checked"
},
{
"class": "custom-control-card",
"id": "chk-card06-4",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": "disabled"
}
]
},
"formCheckboxesValidation": {
"formGroupLabel": "Libellé",
"formGroupClass": "required",
"formGroupInputRequired": true,
"formGroupInputHelpText": {
"id": "checkbox-help-text-id",
"text": "Texte d'assistance"
},
"formGroupCheckboxesError": {
"id": "form-group-checkboxes-error",
"text": "Texte d'erreur"
},
"formGroupInputAriaText": {
"id": "form-group-checkboxes-error"
},
"formCheckboxItems": [
{
"class": "is-invalid",
"id": "chkv01-2",
"label": "Libellé",
"state": false
},
{
"class": "is-invalid",
"id": "chkv02-2",
"label": "Libellé",
"state": "checked"
},
{
"class": "is-invalid",
"id": "chkv03-2",
"label": "Libellé",
"state": "disabled"
}
]
},
"formCheckboxesWrapperValidation": {
"formGroupLabel": "Libellé",
"formGroupClass": "required",
"formGroupCheckboxesError": {
"id": "form-group-checkboxes-error",
"text": "Texte d'erreur"
},
"formGroupInputAriaText": {
"id": "form-group-checkboxes-error"
},
"formCheckboxItems": [
{
"class": "custom-control-card is-invalid",
"id": "chkv-card05-1",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": false
},
{
"class": "custom-control-card is-invalid",
"id": "chkv-card06-3",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": "checked"
},
{
"class": "custom-control-card",
"id": "chvk-card06-4",
"label": "<span class=\"card-title\">Libellé</span><p>Est est et dolores dolore sed justo ipsum et sit.</p>",
"state": "disabled"
}
]
}
}
Loading

0 comments on commit 7304aa1

Please sign in to comment.