Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nahasco authored Dec 20, 2024
2 parents 1f32bc2 + 1081536 commit 11485d0
Show file tree
Hide file tree
Showing 78 changed files with 6,728 additions and 120 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
target/
.next/
build/
dist/

/templates/
/fixtures/
2 changes: 1 addition & 1 deletion .github/workflows/prerelease-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
A new prerelease is available for testing:
```sh
npx shadcn@${{ env.BETA_PACKAGE_VERSION }}
pnpm dlx shadcn@${{ env.BETA_PACKAGE_VERSION }}
```
- name: "Remove the autorelease label once published"
Expand Down
5 changes: 4 additions & 1 deletion apps/www/actions/edit-in-v0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export async function editInV0({
// Remove v0 prefix from the name
registryItem.name = registryItem.name.replace(/^v0-/, "")

const projectName = capitalCase(name.replace(/\d+/g, ""))
registryItem.description = registryItem.description || projectName

// Replace `@/registry/new-york/` in files.
registryItem.files = registryItem.files?.map((file) => {
if (file.content?.includes("@/registry/new-york/ui")) {
Expand All @@ -53,7 +56,7 @@ export async function editInV0({
url,
},
meta: {
project: capitalCase(name.replace(/\d+/g, "")),
project: projectName,
file: `${name}.tsx`,
},
}
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/(app)/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default async function DocPage({ params }: DocPageProps) {

return (
<main className="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
<div className="mx-auto w-full min-w-0 max-w-3xl">
<div className="mx-auto w-full min-w-0 max-w-2xl">
<div className="mb-4 flex items-center space-x-1 text-sm leading-none text-muted-foreground">
<div className="truncate">Docs</div>
<ChevronRight className="h-3.5 w-3.5" />
Expand Down
7 changes: 6 additions & 1 deletion apps/www/app/(app)/themes/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { CardsDemo } from "@/components/cards"
import { ThemeWrapper } from "@/components/theme-wrapper"

import "public/registry/themes.css"

export default function ThemesPage() {
return <CardsDemo />
return (
<ThemeWrapper>
<CardsDemo />
</ThemeWrapper>
)
}
4 changes: 2 additions & 2 deletions apps/www/components/announcement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { ArrowRight } from "lucide-react"
export function Announcement() {
return (
<Link
href="/docs/components/sidebar"
href="/docs/monorepo"
className="group mb-2 inline-flex items-center px-0.5 text-sm font-medium"
>
<span className="underline-offset-4 group-hover:underline">
New sidebar component
Monorepo support
</span>
<ArrowRight className="ml-1 h-4 w-4" />
</Link>
Expand Down
10 changes: 2 additions & 8 deletions apps/www/components/cards/activity-goal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import * as React from "react"
import { Minus, Plus } from "lucide-react"
import { useTheme } from "next-themes"
import { Bar, BarChart, ResponsiveContainer } from "recharts"
import { Bar, BarChart } from "recharts"

import { useConfig } from "@/hooks/use-config"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
Expand All @@ -16,7 +14,6 @@ import {
CardTitle,
} from "@/registry/new-york/ui/card"
import { ChartConfig, ChartContainer } from "@/registry/new-york/ui/chart"
import { baseColors } from "@/registry/registry-base-colors"

const data = [
{
Expand Down Expand Up @@ -63,10 +60,7 @@ const data = [
const chartConfig = {
goal: {
label: "Goal",
theme: {
light: "black",
dark: "white",
},
color: "hsl(var(--primary))",
},
} satisfies ChartConfig

Expand Down
10 changes: 4 additions & 6 deletions apps/www/components/cards/metric.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"use client"

import { useTheme } from "next-themes"
import { Line, LineChart, ResponsiveContainer, Tooltip } from "recharts"
import { Line, LineChart } from "recharts"

import { useConfig } from "@/hooks/use-config"
import {
Card,
CardContent,
Expand All @@ -17,7 +15,6 @@ import {
ChartTooltip,
ChartTooltipContent,
} from "@/registry/new-york/ui/chart"
import { baseColors } from "@/registry/registry-base-colors"

const data = [
{
Expand Down Expand Up @@ -57,7 +54,7 @@ const chartConfig = {
},
average: {
label: "Average",
color: "hsl(var(--muted-foreground))",
color: "hsl(var(--primary))",
},
} satisfies ChartConfig

Expand All @@ -71,7 +68,7 @@ export function CardsMetric() {
</CardDescription>
</CardHeader>
<CardContent className="pb-4">
<ChartContainer config={chartConfig} className="h-[200px] w-full">
<ChartContainer config={chartConfig} className="w-full md:h-[200px]">
<LineChart
data={data}
margin={{
Expand All @@ -86,6 +83,7 @@ export function CardsMetric() {
strokeWidth={2}
dataKey="average"
stroke="var(--color-average)"
strokeOpacity={0.5}
activeDot={{
r: 6,
fill: "var(--color-average)",
Expand Down
13 changes: 3 additions & 10 deletions apps/www/components/cards/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,11 @@ const data = [
const chartConfig = {
revenue: {
label: "Revenue",
theme: {
light: "black",
dark: "white",
},
color: "hsl(var(--primary))",
},
subscription: {
label: "Subscriptions",
theme: {
light: "black",
dark: "white",
},
color: "hsl(var(--primary))",
},
} satisfies ChartConfig

Expand Down Expand Up @@ -88,11 +82,10 @@ export function CardsStats() {
type="monotone"
strokeWidth={2}
dataKey="revenue"
stroke="var(--color-revenue)"
activeDot={{
r: 6,
fill: "var(--color-revenue)",
}}
stroke="var(--color-revenue)"
/>
</LineChart>
</ChartContainer>
Expand Down
17 changes: 11 additions & 6 deletions apps/www/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export const docsConfig: DocsConfig = {
href: "/docs/cli",
items: [],
},
{
title: "Monorepo",
href: "/docs/monorepo",
items: [],
label: "New",
},
{
title: "Next.js 15 + React 19",
href: "/docs/react-19",
Expand Down Expand Up @@ -141,12 +147,6 @@ export const docsConfig: DocsConfig = {
{
title: "Components",
items: [
{
title: "Sidebar",
href: "/docs/components/sidebar",
items: [],
label: "New",
},
{
title: "Accordion",
href: "/docs/components/accordion",
Expand Down Expand Up @@ -337,6 +337,11 @@ export const docsConfig: DocsConfig = {
href: "/docs/components/sheet",
items: [],
},
{
title: "Sidebar",
href: "/docs/components/sidebar",
items: [],
},
{
title: "Skeleton",
href: "/docs/components/skeleton",
Expand Down
2 changes: 1 addition & 1 deletion apps/www/content/docs/components/data-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ links:
doc: https://tanstack.com/table/v8/docs/introduction
---

<ComponentPreview name="data-table-demo" />
<ComponentPreview name="data-table-demo" className="[&_.preview]:items-start" />

## Introduction

Expand Down
Loading

0 comments on commit 11485d0

Please sign in to comment.