Skip to content

Commit f24215f

Browse files
authored
chore: update to kobalte@0.13.2 (#100)
1 parent d112dbc commit f24215f

28 files changed

Lines changed: 190 additions & 190 deletions

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@corvu/drawer": "^0.2.0",
1616
"@corvu/resizable": "^0.2.0",
1717
"@fontsource/inter": "^5.0.18",
18-
"@kobalte/core": "0.13.0",
18+
"@kobalte/core": "0.13.2",
1919
"@mdx-js/mdx": "^2.3.0",
2020
"@modular-forms/solid": "^0.20.0",
2121
"@solid-primitives/keyboard": "^1.2.8",

apps/docs/src/registry/ui/accordion.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ import { cn } from "~/lib/utils"
77

88
const Accordion = AccordionPrimitive.Root
99

10-
type AccordionItemProps = AccordionPrimitive.AccordionItemProps & {
10+
type AccordionItemProps<T extends ValidComponent = "div"> = AccordionPrimitive.AccordionItemProps<T> & {
1111
class?: string | undefined
1212
}
1313

1414
const AccordionItem = <T extends ValidComponent = "div">(
15-
props: PolymorphicProps<T, AccordionItemProps>
15+
props: PolymorphicProps<T, AccordionItemProps<T>>
1616
) => {
1717
const [local, others] = splitProps(props as AccordionItemProps, ["class"])
1818
return <AccordionPrimitive.Item class={cn("border-b", local.class)} {...others} />
1919
}
2020

21-
type AccordionTriggerProps = AccordionPrimitive.AccordionTriggerProps & {
21+
type AccordionTriggerProps<T extends ValidComponent = "button"> = AccordionPrimitive.AccordionTriggerProps<T> & {
2222
class?: string | undefined
2323
children?: JSX.Element
2424
}
2525

2626
const AccordionTrigger = <T extends ValidComponent = "button">(
27-
props: PolymorphicProps<T, AccordionTriggerProps>
27+
props: PolymorphicProps<T, AccordionTriggerProps<T>>
2828
) => {
2929
const [local, others] = splitProps(props as AccordionTriggerProps, ["class", "children"])
3030
return (
@@ -54,13 +54,13 @@ const AccordionTrigger = <T extends ValidComponent = "button">(
5454
)
5555
}
5656

57-
type AccordionContentProps = AccordionPrimitive.AccordionContentProps & {
57+
type AccordionContentProps<T extends ValidComponent = "div"> = AccordionPrimitive.AccordionContentProps<T> & {
5858
class?: string | undefined
5959
children?: JSX.Element
6060
}
6161

6262
const AccordionContent = <T extends ValidComponent = "div">(
63-
props: PolymorphicProps<T, AccordionContentProps>
63+
props: PolymorphicProps<T, AccordionContentProps<T>>
6464
) => {
6565
const [local, others] = splitProps(props as AccordionContentProps, ["class", "children"])
6666
return (

apps/docs/src/registry/ui/alert-dialog.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ const AlertDialog = AlertDialogPrimitive.Root
99
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
1010
const AlertDialogPortal = AlertDialogPrimitive.Portal
1111

12-
type AlertDialogOverlayProps = AlertDialogPrimitive.AlertDialogOverlayProps & {
12+
type AlertDialogOverlayProps<T extends ValidComponent = "div"> = AlertDialogPrimitive.AlertDialogOverlayProps<T> & {
1313
class?: string | undefined
1414
}
1515

1616
const AlertDialogOverlay = <T extends ValidComponent = "div">(
17-
props: PolymorphicProps<T, AlertDialogOverlayProps>
17+
props: PolymorphicProps<T, AlertDialogOverlayProps<T>>
1818
) => {
1919
const [local, others] = splitProps(props as AlertDialogOverlayProps, ["class"])
2020
return (
@@ -28,13 +28,13 @@ const AlertDialogOverlay = <T extends ValidComponent = "div">(
2828
)
2929
}
3030

31-
type AlertDialogContentProps = AlertDialogPrimitive.AlertDialogContentProps & {
31+
type AlertDialogContentProps<T extends ValidComponent = "div"> = AlertDialogPrimitive.AlertDialogContentProps<T> & {
3232
class?: string | undefined
3333
children?: JSX.Element
3434
}
3535

3636
const AlertDialogContent = <T extends ValidComponent = "div">(
37-
props: PolymorphicProps<T, AlertDialogContentProps>
37+
props: PolymorphicProps<T, AlertDialogContentProps<T>>
3838
) => {
3939
const [local, others] = splitProps(props as AlertDialogContentProps, ["class", "children"])
4040
return (
@@ -69,23 +69,23 @@ const AlertDialogContent = <T extends ValidComponent = "div">(
6969
)
7070
}
7171

72-
type AlertDialogTitleProps = AlertDialogPrimitive.AlertDialogTitleProps & {
72+
type AlertDialogTitleProps<T extends ValidComponent = "h2"> = AlertDialogPrimitive.AlertDialogTitleProps<T> & {
7373
class?: string | undefined
7474
}
7575

7676
const AlertDialogTitle = <T extends ValidComponent = "h2">(
77-
props: PolymorphicProps<T, AlertDialogTitleProps>
77+
props: PolymorphicProps<T, AlertDialogTitleProps<T>>
7878
) => {
7979
const [local, others] = splitProps(props as AlertDialogTitleProps, ["class"])
8080
return <AlertDialogPrimitive.Title class={cn("text-lg font-semibold", local.class)} {...others} />
8181
}
8282

83-
type AlertDialogDescriptionProps = AlertDialogPrimitive.AlertDialogDescriptionProps & {
83+
type AlertDialogDescriptionProps<T extends ValidComponent = "p"> = AlertDialogPrimitive.AlertDialogDescriptionProps<T> & {
8484
class?: string | undefined
8585
}
8686

8787
const AlertDialogDescription = <T extends ValidComponent = "p">(
88-
props: PolymorphicProps<T, AlertDialogDescriptionProps>
88+
props: PolymorphicProps<T, AlertDialogDescriptionProps<T>>
8989
) => {
9090
const [local, others] = splitProps(props as AlertDialogDescriptionProps, ["class"])
9191
return (

apps/docs/src/registry/ui/alert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const alertVariants = cva(
2424
}
2525
)
2626

27-
type AlertRootProps = AlertPrimitive.AlertRootProps &
27+
type AlertRootProps<T extends ValidComponent = "div"> = AlertPrimitive.AlertRootProps<T> &
2828
VariantProps<typeof alertVariants> & { class?: string | undefined }
2929

30-
const Alert = <T extends ValidComponent = "div">(props: PolymorphicProps<T, AlertRootProps>) => {
30+
const Alert = <T extends ValidComponent = "div">(props: PolymorphicProps<T, AlertRootProps<T>>) => {
3131
const [local, others] = splitProps(props as AlertRootProps, ["class", "variant"])
3232
return (
3333
<AlertPrimitive.Root

apps/docs/src/registry/ui/avatar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { PolymorphicProps } from "@kobalte/core/polymorphic"
55

66
import { cn } from "~/lib/utils"
77

8-
type AvatarRootProps = ImagePrimitive.ImageRootProps & { class?: string | undefined }
8+
type AvatarRootProps<T extends ValidComponent = "span"> = ImagePrimitive.ImageRootProps<T> & { class?: string | undefined }
99

10-
const Avatar = <T extends ValidComponent = "span">(props: PolymorphicProps<T, AvatarRootProps>) => {
10+
const Avatar = <T extends ValidComponent = "span">(props: PolymorphicProps<T, AvatarRootProps<T>>) => {
1111
const [local, others] = splitProps(props as AvatarRootProps, ["class"])
1212
return (
1313
<ImagePrimitive.Root
@@ -17,19 +17,19 @@ const Avatar = <T extends ValidComponent = "span">(props: PolymorphicProps<T, Av
1717
)
1818
}
1919

20-
type AvatarImageProps = ImagePrimitive.ImageImgProps & { class?: string | undefined }
20+
type AvatarImageProps<T extends ValidComponent = "img"> = ImagePrimitive.ImageImgProps<T> & { class?: string | undefined }
2121

2222
const AvatarImage = <T extends ValidComponent = "img">(
23-
props: PolymorphicProps<T, AvatarImageProps>
23+
props: PolymorphicProps<T, AvatarImageProps<T>>
2424
) => {
2525
const [local, others] = splitProps(props as AvatarImageProps, ["class"])
2626
return <ImagePrimitive.Img class={cn("aspect-square size-full", local.class)} {...others} />
2727
}
2828

29-
type AvatarFallbackProps = ImagePrimitive.ImageFallbackProps & { class?: string | undefined }
29+
type AvatarFallbackProps<T extends ValidComponent = "span"> = ImagePrimitive.ImageFallbackProps<T> & { class?: string | undefined }
3030

3131
const AvatarFallback = <T extends ValidComponent = "span">(
32-
props: PolymorphicProps<T, AvatarFallbackProps>
32+
props: PolymorphicProps<T, AvatarFallbackProps<T>>
3333
) => {
3434
const [local, others] = splitProps(props as AvatarFallbackProps, ["class"])
3535
return (

apps/docs/src/registry/ui/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ const buttonVariants = cva(
3333
}
3434
)
3535

36-
type ButtonProps = ButtonPrimitive.ButtonRootProps &
36+
type ButtonProps<T extends ValidComponent = "button"> = ButtonPrimitive.ButtonRootProps<T> &
3737
VariantProps<typeof buttonVariants> & { class?: string | undefined; children?: JSX.Element }
3838

39-
const Button = <T extends ValidComponent = "button">(props: PolymorphicProps<T, ButtonProps>) => {
39+
const Button = <T extends ValidComponent = "button">(props: PolymorphicProps<T, ButtonProps<T>>) => {
4040
const [local, others] = splitProps(props as ButtonProps, ["variant", "size", "class"])
4141
return (
4242
<ButtonPrimitive.Root

apps/docs/src/registry/ui/checkbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { PolymorphicProps } from "@kobalte/core/polymorphic"
55

66
import { cn } from "~/lib/utils"
77

8-
type CheckboxRootProps = CheckboxPrimitive.CheckboxRootProps & { class?: string | undefined }
8+
type CheckboxRootProps<T extends ValidComponent = "div"> = CheckboxPrimitive.CheckboxRootProps<T> & { class?: string | undefined }
99

1010
const Checkbox = <T extends ValidComponent = "div">(
11-
props: PolymorphicProps<T, CheckboxRootProps>
11+
props: PolymorphicProps<T, CheckboxRootProps<T>>
1212
) => {
1313
const [local, others] = splitProps(props as CheckboxRootProps, ["class"])
1414
return (

apps/docs/src/registry/ui/combobox.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const Combobox = ComboboxPrimitive.Root
99
const ComboboxItemLabel = ComboboxPrimitive.ItemLabel
1010
const 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

1414
const 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

3333
const 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

5959
const 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

9292
const 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

112112
const 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

141141
const 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

Comments
 (0)