diff --git a/CHANGELOG.md b/CHANGELOG.md index 73217c863..b6fedbfcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [5.2.0] - 2024-04-11 + +### Changed +- Mise à jour des icônes pour les champs de saisie. +- Masquage des icônes pour les erreurs d'input et ajout de l'icône dans le message invalid-feedback. ## [5.1.0] - 2024-03-22 diff --git a/package-lock.json b/package-lock.json index ec68c2c96..e11f42599 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@villedemontreal/hochelaga", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@villedemontreal/hochelaga", - "version": "5.1.0", + "version": "5.2.0", "license": "MIT", "dependencies": { "bootstrap": "^4.6.2", diff --git a/package.json b/package.json index c6dbe4162..394e5978a 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@villedemontreal/hochelaga", "description": "La boite à outils web", - "version": "5.1.0", + "version": "5.2.0", "publishConfig": { "access": "public" }, diff --git a/source/_patterns/02-components/entree-de-donnees/01-inputs.json b/source/_patterns/02-components/entree-de-donnees/01-inputs.json index d8ff48208..df3cd7187 100644 --- a/source/_patterns/02-components/entree-de-donnees/01-inputs.json +++ b/source/_patterns/02-components/entree-de-donnees/01-inputs.json @@ -6,6 +6,7 @@ "formGroupInputRequired": true, "formGroupInputLabel": "Libellé", "formGroupPopover": true, + "formGroupBtnClear": true, "formGroupInputPlaceholder": { "text": "Placeholder" }, @@ -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 } } ], @@ -44,7 +47,8 @@ "formGroupInputRequired": false, "formGroupInputPlaceholder": "désactivé", "formGroupInputHelpText": false, - "formGroupInputState": "disabled" + "formGroupInputState": "disabled", + "formGroupBtnClear": false }, { "formGroupClass": false, @@ -54,7 +58,8 @@ "formGroupInputRequired": false, "formGroupInputPlaceholder": "read-only", "formGroupInputHelpText": false, - "formGroupInputState": "readonly" + "formGroupInputState": "readonly", + "formGroupBtnClear": false } ] } diff --git a/source/_patterns/02-components/entree-de-donnees/01-inputs.mustache b/source/_patterns/02-components/entree-de-donnees/01-inputs.mustache index 3e78bad6e..0c0c0542d 100755 --- a/source/_patterns/02-components/entree-de-donnees/01-inputs.mustache +++ b/source/_patterns/02-components/entree-de-donnees/01-inputs.mustache @@ -9,11 +9,28 @@
Est est et dolores dolore sed justo ipsum et sit.
", + "state": false + }, + { + "class": "custom-control-card", + "id": "chk-card06-3", + "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", + "state": "checked" + }, + { + "class": "custom-control-card", + "id": "chk-card06-4", + "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", + "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": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", + "state": false + }, + { + "class": "custom-control-card is-invalid", + "id": "chkv-card06-3", + "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", + "state": "checked" + }, + { + "class": "custom-control-card", + "id": "chvk-card06-4", + "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", + "state": "disabled" + } + ] } } diff --git a/source/_patterns/02-components/entree-de-donnees/05-checkbox.mustache b/source/_patterns/02-components/entree-de-donnees/05-checkbox.mustache index 99f25f900..fa8d013bc 100644 --- a/source/_patterns/02-components/entree-de-donnees/05-checkbox.mustache +++ b/source/_patterns/02-components/entree-de-donnees/05-checkbox.mustache @@ -1,20 +1,54 @@ -{{# formCheckboxes }} +Est est et dolores dolore sed justo ipsum et sit.
", - "state": false - }, - { - "class": "custom-control-card", - "id": "chk-card06-3", - "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", - "state": "checked" - }, - { - "class": "custom-control-card", - "id": "chk-card06-4", - "label": "LibelléEst est et dolores dolore sed justo ipsum et sit.
", - "state": "disabled" - } - ] - }, - "formCheckboxesInline": false -} diff --git a/source/_patterns/02-components/entree-de-donnees/07-radio-wrapper.md b/source/_patterns/02-components/entree-de-donnees/07-radio-wrapper.md deleted file mode 100644 index 8700db332..000000000 --- a/source/_patterns/02-components/entree-de-donnees/07-radio-wrapper.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Bouton radio encadré ---- - -Dans certains cas où une longue description doit accompagner le libellé, utiliser le bouton radio encadré. - -Il vaut mieux utiliser une description plutôt que d'avoir un libellé trop long. diff --git a/source/_patterns/02-components/entree-de-donnees/07-radio.json b/source/_patterns/02-components/entree-de-donnees/07-radio.json index fa442ac02..ba4d8d615 100755 --- a/source/_patterns/02-components/entree-de-donnees/07-radio.json +++ b/source/_patterns/02-components/entree-de-donnees/07-radio.json @@ -29,6 +29,40 @@ } ] }, + "formRadiosValidation": { + "formGroupLabel": "Libellé", + "formGroupClass": "required", + "formGroupInputHelpText": { + "id": "radios-help-text-id-validation", + "text": "Texte d'assistance" + }, + "formRadioError": { + "id": "radios-form-id-validation", + "text": "Texte d'erreur" + }, + "formRadiosItems": [ + { + "class": "is-invalid", + "id": "rdio01-11", + "label": "Libellé", + "name": "radiosGroupValidation" + }, + { + "class": "is-invalid", + "id": "rdio03-11", + "label": "Libellé", + "state": "checked", + "name": "radiosGroupValidation" + }, + { + "class": "", + "id": "rdio04-11", + "label": "Libellé", + "state": "disabled", + "name": "radiosGroupValidation" + } + ] + }, "formRadiosInline": { "formRadiosItems": [ { @@ -52,5 +86,65 @@ "name": "radiosGroupInline" } ] + }, + "formRadiosWrapper": { + "formGroupLabel": "Libellé", + "formRadiosItems": [ + { + "class": "custom-control-card", + "id": "rdio01-2", + "label": "LibelléSadipscing ut ea et dolores et amet duo et dolor est, lorem ea lorem sed kasd et et. Ea diam.
", + "name": "radiosGroup1111", + "state": "disabled" + } + ] + }, + "formRadiosWrapperValidation": { + "formGroupLabel": "Libellé", + "formGroupClass": "required", + "formRadioError": { + "id": "radios-form-id-error", + "text": "Texte d'erreur" + }, + "formGroupInputAriaText": { + "id": "radios-form-id-error" + }, + "formRadiosItems": [ + { + "class": "custom-control-card is-invalid", + "id": "rdio01-22", + "label": "LibelléSadipscing ut ea et dolores et amet duo et dolor est, lorem ea lorem sed kasd et et. Ea diam.
", + "name": "radiosGroup1Validation", + "state": "disabled" + } + ] } } diff --git a/source/_patterns/02-components/entree-de-donnees/07-radio.mustache b/source/_patterns/02-components/entree-de-donnees/07-radio.mustache index d69f0791a..49fd7644d 100755 --- a/source/_patterns/02-components/entree-de-donnees/07-radio.mustache +++ b/source/_patterns/02-components/entree-de-donnees/07-radio.mustache @@ -1,20 +1,69 @@ -{{# formRadios}} +Sadipscing ut ea et dolores et amet duo et dolor est, lorem ea lorem sed kasd et et. Ea diam.
", - "name": "radiosGroup1111", - "state": "disabled" - } - ] - }, - "formRadiosInline": false -} diff --git a/source/_patterns/02-components/entree-de-donnees/_checkbox-item.mustache b/source/_patterns/02-components/entree-de-donnees/_checkbox-item.mustache index 6d120391e..40a3b7989 100755 --- a/source/_patterns/02-components/entree-de-donnees/_checkbox-item.mustache +++ b/source/_patterns/02-components/entree-de-donnees/_checkbox-item.mustache @@ -6,7 +6,7 @@ {{/ formGroupInputHelpText}} {{# formCheckboxItems}}