\n>(({ className, ...props }, ref) => (\n [role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n"
+ "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n [role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n [role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n"
}
],
"type": "components:ui"
diff --git a/apps/www/registry/default/example/card-demo.tsx b/apps/www/registry/default/example/card-demo.tsx
index 2283bb9862d..136f42ab848 100644
--- a/apps/www/registry/default/example/card-demo.tsx
+++ b/apps/www/registry/default/example/card-demo.tsx
@@ -10,7 +10,6 @@ import {
CardHeader,
CardTitle,
} from "@/registry/default/ui/card"
-import { Separator } from "@/registry/default/ui/separator"
import { Switch } from "@/registry/default/ui/switch"
const notifications = [
diff --git a/apps/www/registry/default/example/combobox-demo.tsx b/apps/www/registry/default/example/combobox-demo.tsx
index 3e55e3f282a..b16ad8fd7b5 100644
--- a/apps/www/registry/default/example/combobox-demo.tsx
+++ b/apps/www/registry/default/example/combobox-demo.tsx
@@ -68,6 +68,7 @@ export default function ComboboxDemo() {
{frameworks.map((framework) => (
{
setValue(currentValue === value ? "" : currentValue)
setOpen(false)
diff --git a/apps/www/registry/default/example/combobox-dropdown-menu.tsx b/apps/www/registry/default/example/combobox-dropdown-menu.tsx
index ae135bcf00c..de1a35afba8 100644
--- a/apps/www/registry/default/example/combobox-dropdown-menu.tsx
+++ b/apps/www/registry/default/example/combobox-dropdown-menu.tsx
@@ -83,6 +83,7 @@ export default function ComboboxDropdownMenu() {
{labels.map((label) => (
{
setLabel(value)
setOpen(false)
diff --git a/apps/www/registry/default/example/combobox-popover.tsx b/apps/www/registry/default/example/combobox-popover.tsx
index 74345a78d74..aacb34dc51e 100644
--- a/apps/www/registry/default/example/combobox-popover.tsx
+++ b/apps/www/registry/default/example/combobox-popover.tsx
@@ -95,6 +95,7 @@ export default function ComboboxPopover() {
{statuses.map((status) => (
{
setSelectedStatus(
statuses.find((priority) => priority.value === value) ||
diff --git a/apps/www/registry/default/example/input-form.tsx b/apps/www/registry/default/example/input-form.tsx
index 18ba7441e1b..1ea1bb7b3c4 100644
--- a/apps/www/registry/default/example/input-form.tsx
+++ b/apps/www/registry/default/example/input-form.tsx
@@ -26,6 +26,9 @@ const FormSchema = z.object({
export default function InputForm() {
const form = useForm>({
resolver: zodResolver(FormSchema),
+ defaultValues: {
+ username: "",
+ },
})
function onSubmit(data: z.infer) {
diff --git a/apps/www/registry/default/example/scroll-area-horizontal-demo.tsx b/apps/www/registry/default/example/scroll-area-horizontal-demo.tsx
new file mode 100644
index 00000000000..fad6de53485
--- /dev/null
+++ b/apps/www/registry/default/example/scroll-area-horizontal-demo.tsx
@@ -0,0 +1,53 @@
+import * as React from "react"
+import Image from "next/image"
+
+import { ScrollArea, ScrollBar } from "@/registry/default/ui/scroll-area"
+
+export interface Artwork {
+ artist: string
+ art: string
+}
+
+export const works: Artwork[] = [
+ {
+ artist: "Ornella Binni",
+ art: "https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80",
+ },
+ {
+ artist: "Tom Byrom",
+ art: "https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80",
+ },
+ {
+ artist: "Vladimir Malyavko",
+ art: "https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80",
+ },
+]
+
+export default function ScrollAreaHorizontalDemo() {
+ return (
+
+
+ {works.map((artwork) => (
+
+ ))}
+
+
+
+ )
+}
diff --git a/apps/www/registry/default/example/select-scrollable.tsx b/apps/www/registry/default/example/select-scrollable.tsx
new file mode 100644
index 00000000000..44ed74c15f5
--- /dev/null
+++ b/apps/www/registry/default/example/select-scrollable.tsx
@@ -0,0 +1,75 @@
+import * as React from "react"
+
+import {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
+} from "@/registry/default/ui/select"
+
+export default function SelectScrollable() {
+ return (
+
+ )
+}
diff --git a/apps/www/registry/default/example/table-demo.tsx b/apps/www/registry/default/example/table-demo.tsx
index e29b20ec8ea..3b830de01d8 100644
--- a/apps/www/registry/default/example/table-demo.tsx
+++ b/apps/www/registry/default/example/table-demo.tsx
@@ -3,6 +3,7 @@ import {
TableBody,
TableCaption,
TableCell,
+ TableFooter,
TableHead,
TableHeader,
TableRow,
@@ -75,6 +76,12 @@ export default function TableDemo() {
))}
+
+
+ Total
+ $2,500.00
+
+
)
}
diff --git a/apps/www/registry/default/ui/alert-dialog.tsx b/apps/www/registry/default/ui/alert-dialog.tsx
index 6831ce8c86c..63c1d2e72ac 100644
--- a/apps/www/registry/default/ui/alert-dialog.tsx
+++ b/apps/www/registry/default/ui/alert-dialog.tsx
@@ -15,7 +15,7 @@ const AlertDialogPortal = AlertDialogPrimitive.Portal
const AlertDialogOverlay = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
+>(({ className, ...props }, ref) => (
,
React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => {
+>(({ className, ...props }, ref) => {
return (
))
diff --git a/apps/www/registry/default/ui/select.tsx b/apps/www/registry/default/ui/select.tsx
index dabb6e4dcff..cbe5a36b695 100644
--- a/apps/www/registry/default/ui/select.tsx
+++ b/apps/www/registry/default/ui/select.tsx
@@ -2,7 +2,7 @@
import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
-import { Check, ChevronDown } from "lucide-react"
+import { Check, ChevronDown, ChevronUp } from "lucide-react"
import { cn } from "@/lib/utils"
@@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef<
span]:line-clamp-1",
className
)}
{...props}
@@ -32,6 +32,41 @@ const SelectTrigger = React.forwardRef<
))
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
+const SelectScrollUpButton = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+))
+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
+
+const SelectScrollDownButton = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+))
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName
+
const SelectContent = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
@@ -40,7 +75,7 @@ const SelectContent = React.forwardRef<
+
{children}
+
))
@@ -118,4 +155,6 @@ export {
SelectLabel,
SelectItem,
SelectSeparator,
+ SelectScrollUpButton,
+ SelectScrollDownButton,
}
diff --git a/apps/www/registry/default/ui/sheet.tsx b/apps/www/registry/default/ui/sheet.tsx
index 3e98e6fbece..6a95894ed18 100644
--- a/apps/www/registry/default/ui/sheet.tsx
+++ b/apps/www/registry/default/ui/sheet.tsx
@@ -13,13 +13,7 @@ const SheetTrigger = SheetPrimitive.Trigger
const SheetClose = SheetPrimitive.Close
-const SheetPortal = ({
- className,
- ...props
-}: SheetPrimitive.DialogPortalProps) => (
-
-)
-SheetPortal.displayName = SheetPrimitive.Portal.displayName
+const SheetPortal = SheetPrimitive.Portal
const SheetOverlay = React.forwardRef<
React.ElementRef,
diff --git a/apps/www/registry/default/ui/switch.tsx b/apps/www/registry/default/ui/switch.tsx
index 191ef52ea50..bc69cf2dbfc 100644
--- a/apps/www/registry/default/ui/switch.tsx
+++ b/apps/www/registry/default/ui/switch.tsx
@@ -11,7 +11,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
(({ className, ...props }, ref) => (
tr]:last:border-b-0",
+ className
+ )}
{...props}
/>
))
diff --git a/apps/www/registry/new-york/example/card-demo.tsx b/apps/www/registry/new-york/example/card-demo.tsx
index 4d00c1a909f..1c3f8b17371 100644
--- a/apps/www/registry/new-york/example/card-demo.tsx
+++ b/apps/www/registry/new-york/example/card-demo.tsx
@@ -10,7 +10,6 @@ import {
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
-import { Separator } from "@/registry/new-york/ui/separator"
import { Switch } from "@/registry/new-york/ui/switch"
const notifications = [
diff --git a/apps/www/registry/new-york/example/combobox-demo.tsx b/apps/www/registry/new-york/example/combobox-demo.tsx
index 7daef35e1f2..43545503a68 100644
--- a/apps/www/registry/new-york/example/combobox-demo.tsx
+++ b/apps/www/registry/new-york/example/combobox-demo.tsx
@@ -68,6 +68,7 @@ export default function ComboboxDemo() {
{frameworks.map((framework) => (
{
setValue(currentValue === value ? "" : currentValue)
setOpen(false)
diff --git a/apps/www/registry/new-york/example/combobox-dropdown-menu.tsx b/apps/www/registry/new-york/example/combobox-dropdown-menu.tsx
index 202164ccb04..c27d219e92b 100644
--- a/apps/www/registry/new-york/example/combobox-dropdown-menu.tsx
+++ b/apps/www/registry/new-york/example/combobox-dropdown-menu.tsx
@@ -75,6 +75,7 @@ export default function ComboboxDropdownMenu() {
{labels.map((label) => (
{
setLabel(value)
setOpen(false)
diff --git a/apps/www/registry/new-york/example/combobox-popover.tsx b/apps/www/registry/new-york/example/combobox-popover.tsx
index ade1658b1e2..adfe49e44e9 100644
--- a/apps/www/registry/new-york/example/combobox-popover.tsx
+++ b/apps/www/registry/new-york/example/combobox-popover.tsx
@@ -69,6 +69,7 @@ export default function ComboboxPopover() {
{statuses.map((status) => (
{
setSelectedStatus(
statuses.find((priority) => priority.value === value) ||
diff --git a/apps/www/registry/new-york/example/input-form.tsx b/apps/www/registry/new-york/example/input-form.tsx
index 4a9e32c96db..4be9df22364 100644
--- a/apps/www/registry/new-york/example/input-form.tsx
+++ b/apps/www/registry/new-york/example/input-form.tsx
@@ -26,6 +26,9 @@ const FormSchema = z.object({
export default function InputForm() {
const form = useForm>({
resolver: zodResolver(FormSchema),
+ defaultValues: {
+ username: "",
+ },
})
function onSubmit(data: z.infer) {
diff --git a/apps/www/registry/new-york/example/scroll-area-horizontal-demo.tsx b/apps/www/registry/new-york/example/scroll-area-horizontal-demo.tsx
new file mode 100644
index 00000000000..d837e0a81f3
--- /dev/null
+++ b/apps/www/registry/new-york/example/scroll-area-horizontal-demo.tsx
@@ -0,0 +1,53 @@
+import * as React from "react"
+import Image from "next/image"
+
+import { ScrollArea, ScrollBar } from "@/registry/new-york/ui/scroll-area"
+
+export interface Artwork {
+ artist: string
+ art: string
+}
+
+export const works: Artwork[] = [
+ {
+ artist: "Ornella Binni",
+ art: "https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80",
+ },
+ {
+ artist: "Tom Byrom",
+ art: "https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80",
+ },
+ {
+ artist: "Vladimir Malyavko",
+ art: "https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80",
+ },
+]
+
+export default function ScrollAreaHorizontalDemo() {
+ return (
+
+
+ {works.map((artwork) => (
+
+ ))}
+
+
+
+ )
+}
diff --git a/apps/www/registry/new-york/example/select-scrollable.tsx b/apps/www/registry/new-york/example/select-scrollable.tsx
new file mode 100644
index 00000000000..d83d8059c68
--- /dev/null
+++ b/apps/www/registry/new-york/example/select-scrollable.tsx
@@ -0,0 +1,75 @@
+import * as React from "react"
+
+import {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
+} from "@/registry/new-york/ui/select"
+
+export default function SelectScrollable() {
+ return (
+
+ )
+}
diff --git a/apps/www/registry/new-york/example/table-demo.tsx b/apps/www/registry/new-york/example/table-demo.tsx
index a7de45fd016..17a5888505c 100644
--- a/apps/www/registry/new-york/example/table-demo.tsx
+++ b/apps/www/registry/new-york/example/table-demo.tsx
@@ -3,6 +3,7 @@ import {
TableBody,
TableCaption,
TableCell,
+ TableFooter,
TableHead,
TableHeader,
TableRow,
@@ -75,6 +76,12 @@ export default function TableDemo() {
))}
+
+
+ Total
+ $2,500.00
+
+
)
}
diff --git a/apps/www/registry/new-york/ui/button.tsx b/apps/www/registry/new-york/ui/button.tsx
index 4ecf36902a3..85d20f2867c 100644
--- a/apps/www/registry/new-york/ui/button.tsx
+++ b/apps/www/registry/new-york/ui/button.tsx
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
diff --git a/apps/www/registry/new-york/ui/calendar.tsx b/apps/www/registry/new-york/ui/calendar.tsx
index 801cc8a5166..66636275bfc 100644
--- a/apps/www/registry/new-york/ui/calendar.tsx
+++ b/apps/www/registry/new-york/ui/calendar.tsx
@@ -37,7 +37,7 @@ function Calendar({
"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
row: "flex w-full mt-2",
cell: cn(
- "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent",
+ "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50",
props.mode === "range"
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
: "[&:has([aria-selected])]:rounded-md"
@@ -51,7 +51,8 @@ function Calendar({
day_selected:
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
day_today: "bg-accent text-accent-foreground",
- day_outside: "text-muted-foreground opacity-50",
+ day_outside:
+ "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
day_disabled: "text-muted-foreground opacity-50",
day_range_middle:
"aria-selected:bg-accent aria-selected:text-accent-foreground",
diff --git a/apps/www/registry/new-york/ui/radio-group.tsx b/apps/www/registry/new-york/ui/radio-group.tsx
index b50dce1d285..cf016735c0a 100644
--- a/apps/www/registry/new-york/ui/radio-group.tsx
+++ b/apps/www/registry/new-york/ui/radio-group.tsx
@@ -23,7 +23,7 @@ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName
const RadioGroupItem = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => {
+>(({ className, ...props }, ref) => {
return (
))
diff --git a/apps/www/registry/new-york/ui/select.tsx b/apps/www/registry/new-york/ui/select.tsx
index 353e1af17d0..ac2a8f2b9c7 100644
--- a/apps/www/registry/new-york/ui/select.tsx
+++ b/apps/www/registry/new-york/ui/select.tsx
@@ -1,7 +1,12 @@
"use client"
import * as React from "react"
-import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons"
+import {
+ CaretSortIcon,
+ CheckIcon,
+ ChevronDownIcon,
+ ChevronUpIcon,
+} from "@radix-ui/react-icons"
import * as SelectPrimitive from "@radix-ui/react-select"
import { cn } from "@/lib/utils"
@@ -19,7 +24,7 @@ const SelectTrigger = React.forwardRef<
span]:line-clamp-1",
className
)}
{...props}
@@ -32,6 +37,41 @@ const SelectTrigger = React.forwardRef<
))
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
+const SelectScrollUpButton = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef | | |