@@ -9,9 +9,10 @@ import {
9
9
} from 'react-select' ;
10
10
import WindowedSelect from 'react-windowed-select' ;
11
11
12
- import { Colors , Elevation } from '../../essentials' ;
12
+ import { Elevation } from '../../essentials' ;
13
13
import { ChevronDownIcon , ChevronUpIcon , CloseIcon } from '../../icons' ;
14
14
import { extractClassNameProps , extractWidthProps , extractWrapperMarginProps } from '../../utils/extractProps' ;
15
+ import { getSemanticValue } from '../../utils/cssVariables' ;
15
16
import { useGeneratedId } from '../../utils/hooks/useGeneratedId' ;
16
17
import { get } from '../../utils/themeGet' ;
17
18
import { Label } from './components/Label' ;
@@ -47,8 +48,8 @@ const customStyles: StylesConfig = {
47
48
alignItems : 'center' ,
48
49
justifyContent : 'space-between' ,
49
50
margin : 0 ,
50
- background : state . selectProps . inverted ? 'transparent' : Colors . WHITE ,
51
- color : state . selectProps . inverted ? Colors . WHITE : Colors . AUTHENTIC_BLUE_900 ,
51
+ background : getSemanticValue ( state . selectProps . inverted ? 'background- transparent' : 'background-primary-default' ) ,
52
+ color : getSemanticValue ( state . selectProps . inverted ? 'text-primaryInverted' : 'text-primary' ) ,
52
53
...variant ,
53
54
...error ,
54
55
...disabled
@@ -60,7 +61,7 @@ const customStyles: StylesConfig = {
60
61
} ) ,
61
62
menu : provided => ( {
62
63
...provided ,
63
- boxShadow : `0 0.125rem 0.5rem 0.0625rem ${ Colors . AUTHENTIC_BLUE_200 } `
64
+ boxShadow : `0 0.125rem 0.5rem 0.0625rem ${ getSemanticValue ( 'border-primary-default' ) } `
64
65
} ) ,
65
66
valueContainer : ( provided , { selectProps : { size, variant } } : WithSelectProps < Props > ) => {
66
67
let margin ;
@@ -109,7 +110,7 @@ const customStyles: StylesConfig = {
109
110
padding : '0' ,
110
111
marginRight : '0.5rem' ,
111
112
cursor : 'pointer' ,
112
- color : state . selectProps . inverted ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_550 ,
113
+ color : getSemanticValue ( state . selectProps . inverted ? 'icon-secondary-inverted' : 'icon-secondary-default' ) ,
113
114
...disabled
114
115
} ;
115
116
} ,
@@ -118,7 +119,7 @@ const customStyles: StylesConfig = {
118
119
119
120
return {
120
121
...provided ,
121
- color : state . selectProps . inverted ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_550 ,
122
+ color : getSemanticValue ( state . selectProps . inverted ? 'icon-secondary-inverted' : 'icon-secondary-default' ) ,
122
123
cursor : 'pointer' ,
123
124
padding : 0 ,
124
125
...disabled
@@ -129,27 +130,27 @@ const customStyles: StylesConfig = {
129
130
130
131
return {
131
132
...provided ,
132
- color : Colors . AUTHENTIC_BLUE_550 ,
133
+ color : getSemanticValue ( 'text-secondary' ) ,
133
134
...disabled
134
135
} ;
135
136
} ,
136
137
option : ( provided , state : WithSelectProps < Props > ) => {
137
138
const colorsByState = {
138
139
isDisabled : {
139
- color : Colors . AUTHENTIC_BLUE_350
140
+ color : getSemanticValue ( 'text-disabled' )
140
141
} ,
141
142
isFocused : {
142
- backgroundColor : Colors . ACTION_BLUE_50
143
+ backgroundColor : getSemanticValue ( 'background-info-default' )
143
144
} ,
144
145
isSelected : {
145
- backgroundColor : Colors . ACTION_BLUE_900 ,
146
- color : Colors . WHITE
146
+ backgroundColor : getSemanticValue ( 'background-info-emphasized' ) ,
147
+ color : getSemanticValue ( 'text-primaryInverted' )
147
148
}
148
149
} ;
149
150
150
151
const defaultColors = {
151
- color : Colors . AUTHENTIC_BLUE_900 ,
152
- backgroundColor : Colors . WHITE
152
+ color : getSemanticValue ( 'text-primary' ) ,
153
+ backgroundColor : getSemanticValue ( 'background-primary-default' ) ,
153
154
} ;
154
155
155
156
const colors = Object . keys ( colorsByState )
@@ -172,28 +173,28 @@ const customStyles: StylesConfig = {
172
173
multiValue : ( provided , { selectProps } : { selectProps : Props } ) => {
173
174
const styles = {
174
175
...provided ,
175
- color : Colors . ACTION_BLUE_900 ,
176
- border : `0.0625rem solid ${ Colors . ACTION_BLUE_900 } ` ,
176
+ color : getSemanticValue ( 'text-info' ) ,
177
+ border : `0.0625rem solid ${ getSemanticValue ( 'border-info-emphasized' ) } ` ,
177
178
borderRadius : '1rem' ,
178
- backgroundColor : Colors . ACTION_BLUE_50 ,
179
+ backgroundColor : getSemanticValue ( 'background-info-default' ) ,
179
180
marginRight : '0.375rem' ,
180
181
marginTop : '0.125rem' ,
181
182
marginLeft : 0 ,
182
183
marginBottom : '0.125rem' ,
183
184
maxWidth : 'calc(100% - 0.5rem)' ,
184
185
transition : 'color 125ms ease, background-color 125ms ease' ,
185
186
'&:hover' : {
186
- backgroundColor : Colors . ACTION_BLUE_900 ,
187
- color : Colors . WHITE
187
+ backgroundColor : getSemanticValue ( 'background-info-emphasized' ) ,
188
+ color : getSemanticValue ( 'text-primaryInverted' )
188
189
}
189
190
} ;
190
191
191
192
if ( selectProps . isDisabled ) {
192
193
return {
193
194
...styles ,
194
- color : Colors . AUTHENTIC_BLUE_200 ,
195
+ color : getSemanticValue ( 'text-disabled' ) ,
195
196
backgroundColor : 'transparent' ,
196
- borderColor : Colors . AUTHENTIC_BLUE_200
197
+ borderColor : getSemanticValue ( 'border-disabled-default' )
197
198
} ;
198
199
}
199
200
0 commit comments