Skip to content

Commit

Permalink
🐛 fix(search, input, select): color token & cancel button (#740)
Browse files Browse the repository at this point in the history
- corrige le token de couleur de l'intitulé et des icones dans les champs de saisie et du select.
- customisation de l'icone de suppression du champs de recherche : close-circle-fill
  • Loading branch information
keryanS authored Nov 6, 2023
1 parent d40ef3e commit 5242f4c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/component/input/input-base/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@mixin _input-scheme($legacy: false) {
#{ns(input)} {
@include color.text(label grey, (legacy:$legacy));
@include color.text(default grey, (legacy:$legacy));
@include color.background(contrast grey, (legacy:$legacy));
@include color.box-shadow(plain grey, (legacy:$legacy), bottom-2-in);

Expand All @@ -30,7 +30,7 @@
@if not $legacy {
@supports selector(::-webkit-calendar-picker-indicator) {
&[type=date] {
@include color.data-uri-svg(text title grey, (legacy: $legacy), $input-calendar-line);
@include color.data-uri-svg(text action-high grey, (legacy: $legacy), $input-calendar-line);

@include disabled.selector((legacy: $legacy), (text: true, box-shadow: bottom-2-in)) {
@include color.data-uri-svg(text disabled grey, (legacy: $legacy), $input-calendar-line);
Expand Down
2 changes: 2 additions & 0 deletions src/component/search/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

@import '../../core/index';
@import '../button/index';
@import 'style/setting';

13 changes: 7 additions & 6 deletions src/component/search/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
border-radius: spacing.space(1v) 0 0;
@include max-height(10v);

/* TODO: intégrer la croix en background pour effacer la search bar
&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
*/

&::placeholder {
font-style: italic;
}

&::-webkit-search-cancel-button {
-webkit-appearance: none;
@include size(4v, 4v);
background-repeat: no-repeat;
background-size: spacing.space(4v) spacing.space(4v);
}
}

@include nest-btn(md, only, search-line) {
Expand Down
10 changes: 4 additions & 6 deletions src/component/search/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@
#{ns(input)} {
@include color.box-shadow(action-high blue-france, (legacy:$legacy), bottom-2-in);

/**
* Modificateur pour le champ validés
*/
&--valid {
@include color.box-shadow(plain success, (legacy:$legacy), bottom-2-in);
}

/**
* Modificateur pour le champ présentant des erreurs
*/
&--error {
@include color.box-shadow(plain error, (legacy:$legacy), bottom-2-in);
}

&::-webkit-search-cancel-button {
@include color.data-uri-svg(text label grey, (legacy: $legacy), $input-search-cancel);
}
}
}
}
6 changes: 6 additions & 0 deletions src/component/search/style/_setting.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
////
/// Input Setting
/// @group input
////

$input-search-cancel: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="$COLOR" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-11.414L9.172 7.757 7.757 9.172 10.586 12l-2.829 2.828 1.415 1.415L12 13.414l2.828 2.829 1.415-1.415L13.414 12l2.829-2.828-1.415-1.415L12 10.586z"/></svg>';
4 changes: 2 additions & 2 deletions src/component/select/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

@mixin _select-scheme($legacy: false) {
#{ns(select)} {
@include color.text(title grey, (legacy:$legacy));
@include color.text(default grey, (legacy:$legacy));
@include color.background(contrast grey, (legacy:$legacy));
@include color.box-shadow(plain grey, (legacy:$legacy), bottom-2-in);

@include color.data-uri-svg(text title grey, (legacy: $legacy), $select-arrow-down-svg);
@include color.data-uri-svg(text label grey, (legacy: $legacy), $select-arrow-down-svg);

#{ns(fieldset--valid)} &,
&-group--valid & {
Expand Down

0 comments on commit 5242f4c

Please sign in to comment.