@@ -13,39 +13,38 @@ import {
1313 useHover ,
1414 useOverlayPosition ,
1515 AriaComboBoxProps ,
16+ AriaTextFieldProps ,
1617} from 'react-aria' ;
1718import { Item , useComboBoxState } from 'react-stately' ;
1819
1920import { useFieldProps , useFormProps , wrapWithField } from '../../form' ;
21+ import { DEFAULT_INPUT_STYLES , INPUT_WRAPPER_STYLES } from '../index' ;
2022import { useProviderProps } from '../../../provider' ;
2123import {
2224 BLOCK_STYLES ,
2325 extractStyles ,
2426 OUTER_STYLES ,
2527 tasty ,
26- } from '../../../tasty/index ' ;
28+ } from '../../../tasty' ;
2729import { useFocus } from '../../../utils/react/interactions' ;
2830import {
2931 mergeProps ,
3032 modAttrs ,
3133 useCombinedRefs ,
3234 useLayoutEffect ,
33- } from '../../../utils/react/index ' ;
35+ } from '../../../utils/react' ;
3436import { CubeSelectBaseProps , ListBoxPopup } from '../Select' ;
35- import { DEFAULT_INPUT_STYLES , INPUT_WRAPPER_STYLES } from '../index' ;
3637import { OverlayWrapper } from '../../overlays/OverlayWrapper' ;
37- import { LoadingIcon } from '../../../icons/index ' ;
38+ import { LoadingIcon } from '../../../icons' ;
3839import { InvalidIcon } from '../../shared/InvalidIcon' ;
3940import { ValidIcon } from '../../shared/ValidIcon' ;
4041
4142import type { KeyboardDelegate , LoadingState } from '@react-types/shared' ;
4243
43- export type MenuTriggerAction = 'focus' | 'input' | 'manual' ;
44-
45- export type { AriaComboBoxProps } ;
46-
4744type FilterFn = ( textValue : string , inputValue : string ) => boolean ;
4845
46+ export type MenuTriggerAction = 'focus' | 'input' | 'manual' ;
47+
4948function CaretDownIcon ( ) {
5049 return (
5150 < svg
@@ -105,7 +104,8 @@ export interface CubeComboBoxProps<T>
105104 CubeSelectBaseProps < T > ,
106105 'onOpenChange' | 'onBlur' | 'onFocus' | 'validate' | 'onSelectionChange'
107106 > ,
108- AriaComboBoxProps < T > {
107+ AriaComboBoxProps < T > ,
108+ AriaTextFieldProps {
109109 icon ?: ReactElement ;
110110 multiLine ?: boolean ;
111111 autoComplete ?: string ;
@@ -189,14 +189,27 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
189189 let isAsync = loadingState != null ;
190190 let { contains } = useFilter ( { sensitivity : 'base' } ) ;
191191
192- const comboBoxProps = {
192+ const comboboxProps = {
193193 ...props ,
194+ children : props . children ,
195+ items : props . items ,
196+ label : props . label ,
197+ isDisabled : props . isDisabled ,
198+ validationState : props . validationState ,
199+ description : props . description ,
200+ autoFocus : props . autoFocus ,
201+ isRequired : props . isRequired ,
202+ allowsCustomValue : props . allowsCustomValue ,
203+ menuTrigger,
204+ disabledKeys : props . disabledKeys ,
205+ name : props . name ,
206+ isReadOnly : props . isReadOnly ,
194207 defaultFilter : filter || contains ,
195208 allowsEmptyCollection : isAsync ,
196- } ;
209+ } as const ;
197210
198211 let state = useComboBoxState ( {
199- comboBoxProps ,
212+ ... comboboxProps ,
200213 defaultFilter : filter || contains ,
201214 allowsEmptyCollection : isAsync ,
202215 } ) ;
@@ -230,7 +243,7 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
230243 buttonProps : triggerProps ,
231244 } = useComboBox (
232245 {
233- ...comboBoxProps ,
246+ ...comboboxProps ,
234247 inputRef,
235248 buttonRef : triggerRef ,
236249 listBoxRef,
0 commit comments