diff --git a/.github/DISCUSSION_TEMPLATE/blocks-request.yml b/.github/DISCUSSION_TEMPLATE/blocks-request.yml new file mode 100644 index 00000000000..d23ca304a3e --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/blocks-request.yml @@ -0,0 +1,25 @@ +title: "[blocks]: " +labels: ["Blocks Request"] +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create a block request! Please search open/closed requests before submitting, as the block or a similar one may have already been requested. + + - type: textarea + id: block-description + attributes: + label: Description + description: Tell us about your block request + placeholder: "A dashboard for an e-commerce website showing sales, orders, and customers..." + validations: + required: true + + - type: input + id: block-example-url + attributes: + label: Example + description: Link to an example of the block + placeholder: ex. https://example.com + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000000..52219469df4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,85 @@ +name: "Bug report" +description: Report an issue +title: '[bug]: ' +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create a bug report. Please search open/closed issues before submitting, as the issue may have already been reported/addressed. + + - type: markdown + attributes: + value: | + #### If you aren't sure this is a bug or not, please open a discussion instead: + - [Discussions](https://github.com/shadcn-ui/ui/discussions/new?category=general) + + - type: textarea + id: bug-description + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us how in the description. Thanks! + placeholder: Bug description + validations: + required: true + + - type: input + id: components-affected + attributes: + label: Affected component/components + description: Which shadcn/ui components are affected? + placeholder: ex. Button, Checkbox... + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: How to reproduce + description: A step-by-step description of how to reproduce the bug. + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. See error + validations: + required: true + + - type: input + id: codesandbox-stackblitz + attributes: + label: Codesandbox/StackBlitz link + description: | + A link to a CodeSandbox or StackBlitz that includes a minimal reproduction of the problem. In rare cases when not applicable, you can link to a GitHub repository that we can easily run to recreate the issue. If a report is vague and does not have a reproduction, it will be closed without warning. + + > [!CAUTION] + > If you skip this step, this issue might be **labeled** with `please add a reproduction` and **closed**. + validations: + required: false + + - type: textarea + id: logs + attributes: + label: Logs + description: "Please include browser console and server logs around the time this bug occurred. Optional if provided reproduction. Please try not to insert an image but copy paste the log text." + render: bash + + - type: textarea + id: system-info + attributes: + label: System Info + description: Information about browsers, system or binaries that's relevant. + render: bash + placeholder: System, Binaries, Browsers + validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: Before submitting + description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://github.com/shadcn-ui/ui/blob/main/CONTRIBUTING.md). + options: + - label: I've made research efforts and searched the documentation + required: true + - label: I've searched for existing issues + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..c5942150437 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Get Help + url: https://github.com/shadcn-ui/ui/discussions/new?category=general + about: If you can't get something to work the way you expect, open a question in our discussion forums. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000000..0640a75dcdf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,55 @@ +name: "Feature request" +description: Create a feature request for shadcn/ui +title: '[feat]: ' +labels: ['area: request'] +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create a feature request! Please search open/closed issues before submitting, as the issue may have already been reported/addressed. + + - type: markdown + attributes: + value: | + #### If you aren't sure this is a bug or not, please open a discussion instead: + - [Discussions](https://github.com/shadcn-ui/ui/discussions/new?category=general) + + - type: textarea + id: feature-description + attributes: + label: Feature description + description: Tell us about your feature request + placeholder: 'I think this feature would be great because...' + value: 'Describe your feature request...' + validations: + required: true + + - type: input + id: components-affected + attributes: + label: Affected component/components + description: Is this feature request relevant to any of the already existing components? + placeholder: ex. Button, Checkbox... + validations: + required: false + + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context about the feature here. + placeholder: ex. screenshots, Stack Overflow links, forum links, etc. + value: 'Additional details here...' + validations: + required: false + + - type: checkboxes + id: terms + attributes: + label: Before submitting + description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://github.com/shadcn-ui/ui/blob/main/CONTRIBUTING.md). + options: + - label: I've made research efforts and searched the documentation + required: true + - label: I've searched for existing issues and PRs + required: true diff --git a/.github/workflows/issue-stale.yml b/.github/workflows/issue-stale.yml index e509e0c0586..e34856dad69 100644 --- a/.github/workflows/issue-stale.yml +++ b/.github/workflows/issue-stale.yml @@ -17,8 +17,9 @@ jobs: with: repo-token: ${{ secrets.STALE_TOKEN }} close-issue-message: "This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you." - days-before-issue-close: 1 + days-before-issue-close: 7 days-before-issue-stale: 15 + stale-pr-label: "stale?" days-before-pr-close: -1 days-before-pr-stale: -1 exempt-issue-labels: "roadmap,next,bug" diff --git a/.nvmrc b/.nvmrc index 7950a445767..8c60e1e54f3 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.17.0 +v20.5.1 diff --git a/apps/www/__registry__/default/block/authentication-01.tsx b/apps/www/__registry__/default/block/authentication-01.tsx new file mode 100644 index 00000000000..ad62585fa44 --- /dev/null +++ b/apps/www/__registry__/default/block/authentication-01.tsx @@ -0,0 +1,45 @@ +import { Button } from "@/registry/default/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/default/ui/card" +import { Input } from "@/registry/default/ui/input" +import { Label } from "@/registry/default/ui/label" + +export const description = + "A simple login form with email and password. The submit button says 'Sign in'." + +export const iframeHeight = "600px" + +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" + +export default function LoginForm() { + return ( + + + Login + + Enter your email below to login to your account. + + + +
+ + +
+
+ + +
+
+ + + +
+ ) +} diff --git a/apps/www/__registry__/default/block/authentication-02.tsx b/apps/www/__registry__/default/block/authentication-02.tsx new file mode 100644 index 00000000000..b4ccaddd92b --- /dev/null +++ b/apps/www/__registry__/default/block/authentication-02.tsx @@ -0,0 +1,67 @@ +import Link from "next/link" + +import { Button } from "@/registry/default/ui/button" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/default/ui/card" +import { Input } from "@/registry/default/ui/input" +import { Label } from "@/registry/default/ui/label" + +export const description = + "A login form with email and password. There's an option to login with Google and a link to sign up if you don't have an account." + +export const iframeHeight = "600px" + +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" + +export default function LoginForm() { + return ( + + + Login + + Enter your email below to login to your account + + + +
+
+ + +
+
+
+ + + Forgot your password? + +
+ +
+ + +
+
+ Don't have an account?{" "} + + Sign up + +
+
+
+ ) +} diff --git a/apps/www/__registry__/default/block/authentication-03.tsx b/apps/www/__registry__/default/block/authentication-03.tsx new file mode 100644 index 00000000000..65e7c939a7a --- /dev/null +++ b/apps/www/__registry__/default/block/authentication-03.tsx @@ -0,0 +1,72 @@ +import Link from "next/link" + +import { Button } from "@/registry/default/ui/button" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/default/ui/card" +import { Input } from "@/registry/default/ui/input" +import { Label } from "@/registry/default/ui/label" + +export const description = + "A sign up form with first name, last name, email and password inside a card. There's an option to sign up with GitHub and a link to login if you already have an account" + +export const iframeHeight = "600px" + +export const containerClassName = + "w-full h-screen flex items-center justify-center px-4" + +export default function LoginForm() { + return ( + + + Sign Up + + Enter your information to create an account + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+ + +
+
+ Already have an account?{" "} + + Sign in + +
+
+
+ ) +} diff --git a/apps/www/__registry__/default/block/authentication-04.tsx b/apps/www/__registry__/default/block/authentication-04.tsx new file mode 100644 index 00000000000..1ccce939230 --- /dev/null +++ b/apps/www/__registry__/default/block/authentication-04.tsx @@ -0,0 +1,74 @@ +import Image from "next/image" +import Link from "next/link" + +import { Button } from "@/registry/default/ui/button" +import { Input } from "@/registry/default/ui/input" +import { Label } from "@/registry/default/ui/label" + +export const description = + "A login page with two columns. The first column has the login form with email and password. There's a Forgot your passwork link and a link to sign up if you do not have an account. The second column has a cover image." + +export const iframeHeight = "800px" + +export const containerClassName = "w-full h-full p-4 lg:p-0" + +export default function Dashboard() { + return ( +
+
+
+
+

Login

+

+ Enter your email below to login to your account +

+
+
+
+ + +
+
+
+ + + Forgot your password? + +
+ +
+ + +
+
+ Don't have an account?{" "} + + Sign up + +
+
+
+
+ Image +
+
+ ) +} diff --git a/apps/www/__registry__/default/block/dashboard-01.tsx b/apps/www/__registry__/default/block/dashboard-01.tsx new file mode 100644 index 00000000000..74bc72a8cde --- /dev/null +++ b/apps/www/__registry__/default/block/dashboard-01.tsx @@ -0,0 +1,455 @@ +import Link from "next/link" +import { + Activity, + ArrowUpRight, + CircleUser, + CreditCard, + DollarSign, + Menu, + Package2, + Search, + Users, +} from "lucide-react" + +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "@/registry/default/ui/avatar" +import { Badge } from "@/registry/default/ui/badge" +import { Button } from "@/registry/default/ui/button" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/default/ui/card" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/default/ui/dropdown-menu" +import { Input } from "@/registry/default/ui/input" +import { Sheet, SheetContent, SheetTrigger } from "@/registry/default/ui/sheet" +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/registry/default/ui/table" + +export const description = + "An application shell with a header and main content area. The header has a navbar, a search input and and a user nav dropdown. The user nav is toggled by a button with an avatar image." + +export const iframeHeight = "825px" + +export const containerClassName = "w-full h-full" + +export default function Dashboard() { + return ( +
+
+ + + + + + + + + +
+
+
+ + +
+
+ + + + + + My Account + + Settings + Support + + Logout + + +
+
+
+
+ + + + Total Revenue + + + + +
$45,231.89
+

+ +20.1% from last month +

+
+
+ + + + Subscriptions + + + + +
+2350
+

+ +180.1% from last month +

+
+
+ + + Sales + + + +
+12,234
+

+ +19% from last month +

+
+
+ + + Active Now + + + +
+573
+

+ +201 since last hour +

+
+
+
+
+ + +
+ Transactions + + Recent transactions from your store. + +
+ +
+ + + + + Customer + + Type + + + Status + + + Date + + Amount + + + + + +
Liam Johnson
+
+ liam@example.com +
+
+ + Sale + + + + Approved + + + + 2023-06-23 + + $250.00 +
+ + +
Olivia Smith
+
+ olivia@example.com +
+
+ + Refund + + + + Declined + + + + 2023-06-24 + + $150.00 +
+ + +
Noah Williams
+
+ noah@example.com +
+
+ + Subscription + + + + Approved + + + + 2023-06-25 + + $350.00 +
+ + +
Emma Brown
+
+ emma@example.com +
+
+ + Sale + + + + Approved + + + + 2023-06-26 + + $450.00 +
+ + +
Liam Johnson
+
+ liam@example.com +
+
+ + Sale + + + + Approved + + + + 2023-06-27 + + $550.00 +
+
+
+
+
+ + + Recent Sales + + +
+ + + OM + +
+

+ Olivia Martin +

+

+ olivia.martin@email.com +

+
+
+$1,999.00
+
+
+ + + JL + +
+

+ Jackson Lee +

+

+ jackson.lee@email.com +

+
+
+$39.00
+
+
+ + + IN + +
+

+ Isabella Nguyen +

+

+ isabella.nguyen@email.com +

+
+
+$299.00
+
+
+ + + WK + +
+

+ William Kim +

+

+ will@email.com +

+
+
+$99.00
+
+
+ + + SD + +
+

+ Sofia Davis +

+

+ sofia.davis@email.com +

+
+
+$39.00
+
+
+
+
+
+
+ ) +} diff --git a/apps/www/__registry__/default/block/dashboard-02.tsx b/apps/www/__registry__/default/block/dashboard-02.tsx new file mode 100644 index 00000000000..10e217352a4 --- /dev/null +++ b/apps/www/__registry__/default/block/dashboard-02.tsx @@ -0,0 +1,247 @@ +import Link from "next/link" +import { + Bell, + CircleUser, + Home, + LineChart, + Menu, + Package, + Package2, + Search, + ShoppingCart, + Users, +} from "lucide-react" + +import { Badge } from "@/registry/default/ui/badge" +import { Button } from "@/registry/default/ui/button" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/default/ui/card" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/default/ui/dropdown-menu" +import { Input } from "@/registry/default/ui/input" +import { Sheet, SheetContent, SheetTrigger } from "@/registry/default/ui/sheet" + +export const description = + "A products dashboard with a sidebar navigation and a main content area. The dashboard has a header with a search input and a user menu. The sidebar has a logo, navigation links, and a card with a call to action. The main content area shows an empty state with a call to action." + +export const iframeHeight = "800px" + +export const containerClassName = "w-full h-full" + +export default function Dashboard() { + return ( +
+
+
+
+ + + Acme Inc + + +
+
+ +
+
+ + + Upgrade to Pro + + Unlock all features and get unlimited access to our support + team. + + + + + + +
+
+
+
+
+ + + + + + +
+ + + Upgrade to Pro + + Unlock all features and get unlimited access to our + support team. + + + + + + +
+
+
+
+
+
+ + +
+
+
+ + + + + + My Account + + Settings + Support + + Logout + + +
+
+
+

Inventory

+
+
+
+

+ You have no products +

+

+ You can start selling as soon as you add a product. +

+ +
+
+
+
+
+ ) +} diff --git a/apps/www/__registry__/default/block/dashboard-03.tsx b/apps/www/__registry__/default/block/dashboard-03.tsx new file mode 100644 index 00000000000..ea89e0e67a9 --- /dev/null +++ b/apps/www/__registry__/default/block/dashboard-03.tsx @@ -0,0 +1,464 @@ +import { + Bird, + Book, + Bot, + Code2, + CornerDownLeft, + LifeBuoy, + Mic, + Paperclip, + Rabbit, + Settings, + Settings2, + Share, + SquareTerminal, + SquareUser, + Triangle, + Turtle, +} from "lucide-react" + +import { Badge } from "@/registry/default/ui/badge" +import { Button } from "@/registry/default/ui/button" +import { + Drawer, + DrawerContent, + DrawerDescription, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from "@/registry/default/ui/drawer" +import { Input } from "@/registry/default/ui/input" +import { Label } from "@/registry/default/ui/label" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/registry/default/ui/select" +import { Textarea } from "@/registry/default/ui/textarea" +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/registry/default/ui/tooltip" + +export const description = + "An AI playground with a sidebar navigation and a main content area. The playground has a header with a settings drawer and a share button. The sidebar has navigation links and a user menu. The main content area shows a form to configure the model and messages." + +export const iframeHeight = "740px" + +export const containerClassName = "w-full h-full" + +export default function Dashboard() { + return ( +
+ +
+
+

Playground

+ + + + + + + Configuration + + Configure the settings for the model and messages. + + +
+
+ + Settings + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + Messages + +
+ + +
+
+ +