@@ -9,10 +9,10 @@ const Combobox = ComboboxPrimitive.Root
99const ComboboxItemLabel = ComboboxPrimitive . ItemLabel
1010const ComboboxHiddenSelect = ComboboxPrimitive . HiddenSelect
1111
12- type ComboboxItemProps = ComboboxPrimitive . ComboboxItemProps & { class ?: string | undefined }
12+ type ComboboxItemProps < T extends ValidComponent = "li" > = ComboboxPrimitive . ComboboxItemProps < T > & { class ?: string | undefined }
1313
1414const ComboboxItem = < T extends ValidComponent = "li" > (
15- props : PolymorphicProps < T , ComboboxItemProps >
15+ props : PolymorphicProps < T , ComboboxItemProps < T > >
1616) => {
1717 const [ local , others ] = splitProps ( props as ComboboxItemProps , [ "class" ] )
1818 return (
@@ -26,12 +26,12 @@ const ComboboxItem = <T extends ValidComponent = "li">(
2626 )
2727}
2828
29- type ComboboxItemIndicatorProps = ComboboxPrimitive . ComboboxItemIndicatorProps & {
29+ type ComboboxItemIndicatorProps < T extends ValidComponent = "div" > = ComboboxPrimitive . ComboboxItemIndicatorProps < T > & {
3030 children ?: JSX . Element
3131}
3232
3333const ComboboxItemIndicator = < T extends ValidComponent = "div" > (
34- props : PolymorphicProps < T , ComboboxItemIndicatorProps >
34+ props : PolymorphicProps < T , ComboboxItemIndicatorProps < T > >
3535) => {
3636 const [ local , others ] = splitProps ( props as ComboboxItemIndicatorProps , [ "children" ] )
3737 return (
@@ -54,10 +54,10 @@ const ComboboxItemIndicator = <T extends ValidComponent = "div">(
5454 )
5555}
5656
57- type ComboboxSectionProps = ComboboxPrimitive . ComboboxSectionProps & { class ?: string | undefined }
57+ type ComboboxSectionProps < T extends ValidComponent = "li" > = ComboboxPrimitive . ComboboxSectionProps < T > & { class ?: string | undefined }
5858
5959const ComboboxSection = < T extends ValidComponent = "li" > (
60- props : PolymorphicProps < T , ComboboxSectionProps >
60+ props : PolymorphicProps < T , ComboboxSectionProps < T > >
6161) => {
6262 const [ local , others ] = splitProps ( props as ComboboxSectionProps , [ "class" ] )
6363 return (
@@ -71,7 +71,7 @@ const ComboboxSection = <T extends ValidComponent = "li">(
7171 )
7272}
7373
74- type ComboboxControlProps < U > = ComboboxPrimitive . ComboboxControlProps < U > & {
74+ type ComboboxControlProps < U , T extends ValidComponent = "div" > = ComboboxPrimitive . ComboboxControlProps < U , T > & {
7575 class ?: string | undefined
7676}
7777
@@ -87,10 +87,10 @@ const ComboboxControl = <T, U extends ValidComponent = "div">(
8787 )
8888}
8989
90- type ComboboxInputProps = ComboboxPrimitive . ComboboxInputProps & { class ?: string | undefined }
90+ type ComboboxInputProps < T extends ValidComponent = "input" > = ComboboxPrimitive . ComboboxInputProps < T > & { class ?: string | undefined }
9191
9292const ComboboxInput = < T extends ValidComponent = "input" > (
93- props : PolymorphicProps < T , ComboboxInputProps >
93+ props : PolymorphicProps < T , ComboboxInputProps < T > >
9494) => {
9595 const [ local , others ] = splitProps ( props as ComboboxInputProps , [ "class" ] )
9696 return (
@@ -104,13 +104,13 @@ const ComboboxInput = <T extends ValidComponent = "input">(
104104 )
105105}
106106
107- type ComboboxTriggerProps = ComboboxPrimitive . ComboboxTriggerProps & {
107+ type ComboboxTriggerProps < T extends ValidComponent = "button" > = ComboboxPrimitive . ComboboxTriggerProps < T > & {
108108 class ?: string | undefined
109109 children ?: JSX . Element
110110}
111111
112112const ComboboxTrigger = < T extends ValidComponent = "button" > (
113- props : PolymorphicProps < T , ComboboxTriggerProps >
113+ props : PolymorphicProps < T , ComboboxTriggerProps < T > >
114114) => {
115115 const [ local , others ] = splitProps ( props as ComboboxTriggerProps , [ "class" , "children" ] )
116116 return (
@@ -136,10 +136,10 @@ const ComboboxTrigger = <T extends ValidComponent = "button">(
136136 )
137137}
138138
139- type ComboboxContentProps = ComboboxPrimitive . ComboboxContentProps & { class ?: string | undefined }
139+ type ComboboxContentProps < T extends ValidComponent = "div" > = ComboboxPrimitive . ComboboxContentProps < T > & { class ?: string | undefined }
140140
141141const ComboboxContent = < T extends ValidComponent = "div" > (
142- props : PolymorphicProps < T , ComboboxContentProps >
142+ props : PolymorphicProps < T , ComboboxContentProps < T > >
143143) => {
144144 const [ local , others ] = splitProps ( props as ComboboxContentProps , [ "class" ] )
145145 return (
0 commit comments