@@ -28,9 +28,11 @@ import { LoadingIcon } from '../../../icons/index';
2828import { useProviderProps } from '../../../provider' ;
2929import { FieldBaseProps } from '../../../shared/index' ;
3030import {
31+ BASE_STYLES ,
3132 BasePropsWithoutChildren ,
32- BLOCK_STYLES ,
33- BlockStyleProps ,
33+ BaseStyleProps ,
34+ COLOR_STYLES ,
35+ ColorStyleProps ,
3436 extractStyles ,
3537 OUTER_STYLES ,
3638 OuterStyleProps ,
@@ -244,9 +246,10 @@ const StyledOverlayElement = styled(OverlayElement)`
244246export interface CubeSelectBaseProps < T >
245247 extends BasePropsWithoutChildren ,
246248 AriaLabelingProps ,
249+ BaseStyleProps ,
247250 OuterStyleProps ,
251+ ColorStyleProps ,
248252 FieldBaseProps ,
249- BlockStyleProps ,
250253 CollectionBase < T > ,
251254 AriaSelectProps < T > {
252255 icon ?: ReactElement ;
@@ -262,6 +265,7 @@ export interface CubeSelectBaseProps<T>
262265 triggerStyles ?: Styles ;
263266 listBoxStyles ?: Styles ;
264267 overlayStyles ?: Styles ;
268+ wrapperStyles ?: Styles ;
265269 direction ?: 'top' | 'bottom' ;
266270 shouldFlip ?: boolean ;
267271 inputProps ?: Props ;
@@ -278,6 +282,8 @@ export interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {
278282 placeholder ?: string ;
279283}
280284
285+ const PROP_STYLES = [ ...BASE_STYLES , ...OUTER_STYLES , ...COLOR_STYLES ] ;
286+
281287function Select < T extends object > (
282288 props : CubeSelectProps < T > ,
283289 ref : DOMRef < HTMLDivElement > ,
@@ -313,9 +319,10 @@ function Select<T extends object>(
313319 overlayOffset = 8 ,
314320 inputStyles,
315321 optionStyles,
316- suffix ,
322+ wrapperStyles ,
317323 listBoxStyles,
318324 overlayStyles,
325+ suffix,
319326 message,
320327 description,
321328 direction = 'bottom' ,
@@ -332,9 +339,8 @@ function Select<T extends object>(
332339 ...otherProps
333340 } = props ;
334341 let state = useSelectState ( props ) ;
335- const outerStyles = extractStyles ( otherProps , OUTER_STYLES , styles ) ;
336342
337- inputStyles = extractStyles ( otherProps , BLOCK_STYLES , inputStyles ) ;
343+ styles = extractStyles ( otherProps , PROP_STYLES , styles ) ;
338344
339345 ref = useCombinedRefs ( ref ) ;
340346 triggerRef = useCombinedRefs ( triggerRef ) ;
@@ -417,7 +423,7 @@ function Select<T extends object>(
417423 < SelectWrapperElement
418424 qa = { qa || 'Select' }
419425 mods = { modifiers }
420- styles = { outerStyles }
426+ styles = { wrapperStyles }
421427 data-size = { size }
422428 data-type = { type }
423429 data-theme = { theme }
0 commit comments