@@ -11,6 +11,8 @@ import {
1111 BorderRadiusProps ,
1212 color ,
1313 ColorProps ,
14+ zIndex ,
15+ ZIndexProps ,
1416 compose ,
1517} from 'styled-system'
1618import {
@@ -37,7 +39,9 @@ import globalStyles from '../../globalStyles'
3739interface RtlProps {
3840 rtl : boolean
3941}
40- const Wrapper = styled ( Box ) < RtlProps > `
42+ interface WrapperProps extends RtlProps , ZIndexProps { }
43+ const Wrapper = styled ( Box ) < WrapperProps > `
44+ ${ zIndex }
4145 ${ ( { rtl} ) =>
4246 rtl &&
4347 css `
@@ -47,10 +51,7 @@ const Wrapper = styled(Box)<RtlProps>`
4751
4852interface InputArrowIconProps extends OpacityProps , ColorProps , RtlProps { }
4953
50- const composeInputArrowIconStyles = compose (
51- color ,
52- opacity ,
53- )
54+ const composeInputArrowIconStyles = compose ( color , opacity )
5455
5556const InputArrowIcon = styled ( ArrowIcon ) < InputArrowIconProps > `
5657 ${ composeInputArrowIconStyles }
@@ -63,11 +64,7 @@ const InputArrowIcon = styled(ArrowIcon)<InputArrowIconProps>`
6364
6465interface StyledGridProps extends BackgroundProps , BorderProps , BorderRadiusProps { }
6566
66- const composeInputGridStyles = compose (
67- background ,
68- border ,
69- borderRadius ,
70- )
67+ const composeInputGridStyles = compose ( background , border , borderRadius )
7168
7269const InputGrid = styled ( Grid ) < StyledGridProps > `
7370 ${ composeInputGridStyles }
@@ -161,6 +158,7 @@ function DateRangeInput({
161158 const datepickerWrapperRef = useRef < HTMLDivElement > ( null )
162159 const themeContext = useContext ( ThemeContext )
163160 const theme : DateRangeInputTheme = useThemeProps ( {
161+ dateRangeZIndex : null ,
164162 dateRangeBackground : 'transparent' ,
165163 dateRangeGridTemplateColumns : vertical ? '1fr 24px 1fr' : '194px 39px 194px' ,
166164 dateRangeGridTemplateRows : 'unset' ,
@@ -213,7 +211,12 @@ function DateRangeInput({
213211
214212 return (
215213 < ThemeProvider theme = { ( theme : Record < string , unknown > ) => theme || { } } >
216- < Wrapper rtl = { rtl } position = "relative" ref = { datepickerWrapperRef } >
214+ < Wrapper
215+ zIndex = { theme . dateRangeZIndex }
216+ rtl = { rtl }
217+ position = "relative"
218+ ref = { datepickerWrapperRef }
219+ >
217220 < InputGrid
218221 data-testid = "DateRangeInputGrid"
219222 background = { theme . dateRangeBackground }
0 commit comments