amelioration(combobox): utilise une loupe plutot qu'un chevron bas pour les combobox en mode autocomplete
This commit is contained in:
parent
95fd6c2a69
commit
0caacdaf59
3 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
exclude:
|
exclude:
|
||||||
- 'app/assets/stylesheets/reset.scss'
|
- 'app/assets/stylesheets/reset.scss'
|
||||||
- 'app/assets/stylesheets/direct_uploads.scss'
|
- 'app/assets/stylesheets/direct_uploads.scss'
|
||||||
|
- 'app/assets/stylesheets/dsfr.scss'
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
BangFormat:
|
BangFormat:
|
||||||
|
|
|
@ -33,6 +33,13 @@ trix-editor.fr-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.fr-autocomplete{
|
||||||
|
// override dsfr chevron down which is
|
||||||
|
// --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z'></path></svg>");
|
||||||
|
// use a magnifier instead
|
||||||
|
--data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 24 24' ><path fill='%23161616' d='M12,13.1l5-4.9l1.4,1.4L12,15.9L5.6,9.5l1.4-1.4L12,13.1z'/></svg>");
|
||||||
|
background-image: var(--data-uri-svg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 62em) {
|
@media (max-width: 62em) {
|
||||||
|
|
|
@ -37,7 +37,11 @@ class Dsfr::ComboboxComponent < ApplicationComponent
|
||||||
end
|
end
|
||||||
|
|
||||||
def input_class
|
def input_class
|
||||||
"#{@input_html_options[:class].presence || ''} fr-select"
|
class_names(
|
||||||
|
"#{@input_html_options[:class]}": @input_html_options[:class].presence,
|
||||||
|
'fr-select': true,
|
||||||
|
'fr-autocomplete': @url.presence
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def selected_option_label_input_value
|
def selected_option_label_input_value
|
||||||
|
|
Loading…
Reference in a new issue