@@ -7,7 +7,6 @@ import { isIOSApp } from 'cozy-device-helper'
77
88import Icon from '../Icon'
99import CheckIcon from '../Icons/Check'
10- import { dodgerBlue , silver , coolGrey , paleGrey } from '../palette'
1110import withBreakpoints from '../helpers/withBreakpoints'
1211import TopIcon from '../Icons/Top'
1312import BottomIcon from '../Icons/Bottom'
@@ -23,28 +22,40 @@ const heights = {
2322
2423const borderStyle = ( props , state ) => {
2524 if ( props . inset ) {
26- return '.125rem solid white '
25+ return '.125rem solid var(--paperBackgroundColor) '
2726 }
28- return `.0625rem solid ${ state . isFocused ? dodgerBlue : silver } `
27+ return `.0625rem solid ${
28+ state . isFocused ? 'var(--primaryColor)' : 'var(--borderMainColor)'
29+ } `
2930}
3031
3132const customStyles = props => ( {
3233 control : ( base , state ) => ( {
3334 ...base ,
3435 // The gray background color is managed via the select--disabled
3536 // class applied below
36- backgroundColor : props . disabled ? 'transparent' : 'white' ,
37+ backgroundColor : props . disabled
38+ ? 'transparent'
39+ : 'var(--paperBackgroundColor)' ,
3740 border : borderStyle ( props , state ) ,
3841 ':hover' : {
39- borderColor : props . inset ? 'white' : coolGrey ,
40- backgroundColor : props . inset ? paleGrey : 'white' ,
42+ borderColor : props . inset
43+ ? 'var(--paperBackgroundColor)'
44+ : 'var(--hintTextColor)' ,
45+ backgroundColor : props . inset
46+ ? 'var(--defaultBackgroundColor)'
47+ : 'var(--paperBackgroundColor)' ,
4148 cursor : 'pointer'
4249 } ,
4350 borderRadius : '.1875rem' ,
4451 boxShadow : 'unset' ,
4552 height : heights [ props . size ] ,
4653 minHeight : heights [ props . size ]
4754 } ) ,
55+ placeholder : base => ( {
56+ ...base ,
57+ color : 'var(--secondaryTextColor)'
58+ } ) ,
4859 dropdownIndicator : base => ( {
4960 ...base ,
5061 marginRight : '.75rem' ,
@@ -57,10 +68,19 @@ const customStyles = props => ({
5768 } ) ,
5869 valueContainer : base => ( {
5970 ...base ,
60- color : 'black'
71+ color : 'var(--primaryTextColor)'
72+ } ) ,
73+ singleValue : base => ( {
74+ ...base ,
75+ color : 'var(--primaryTextColor)'
76+ } ) ,
77+ multiValue : base => ( {
78+ ...base ,
79+ backgroundColor : 'var(--hintTextColor)'
6180 } ) ,
6281 menu : base => ( {
6382 ...base ,
83+ backgroundColor : 'var(--paperBackgroundColor)' ,
6484 zIndex : 10
6585 } )
6686} )
@@ -103,7 +123,7 @@ const DropdownIndicator = props => {
103123 < components . DropdownIndicator { ...props } >
104124 < Icon
105125 icon = { props . selectProps . menuIsOpen ? TopIcon : BottomIcon }
106- color = { coolGrey }
126+ color = "var(--iconTextColor)"
107127 width = "20"
108128 height = "16"
109129 />
@@ -158,7 +178,11 @@ const Option = ({
158178 { ! withCheckbox && (
159179 < span className = { styles [ 'select-option__checkmark' ] } >
160180 { isSelected && (
161- < Icon icon = { CheckIcon } color = { dodgerBlue } className = "u-ph-half" />
181+ < Icon
182+ icon = { CheckIcon }
183+ color = "var(--primaryColor)"
184+ className = "u-ph-half"
185+ />
162186 ) }
163187 </ span >
164188 ) }
@@ -186,7 +210,9 @@ const ActionsOption = ({ actions, ...props }) => (
186210 { ...action . iconProps }
187211 key = { index }
188212 icon = { action . icon }
189- color = { props . isFocused ? coolGrey : silver }
213+ color = {
214+ props . isFocused ? 'var(--iconTextColor)' : 'var(--hintTextColor)'
215+ }
190216 className = "u-ph-half"
191217 onClick = { e => {
192218 e . stopPropagation ( )
0 commit comments