diff --git a/.changeset/config.json b/.changeset/config.json index 5e1305538ef..a7fd7aec885 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["www", "**-template"] + "ignore": ["www"] } diff --git a/.changeset/empty-pants-care.md b/.changeset/empty-pants-care.md new file mode 100644 index 00000000000..f08611ed3fc --- /dev/null +++ b/.changeset/empty-pants-care.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +Update spread/unspread helpers to handle ArrayLiteralExpression and nested values within arrays diff --git a/.changeset/fifty-rivers-sparkle.md b/.changeset/fifty-rivers-sparkle.md new file mode 100644 index 00000000000..599dcc320d7 --- /dev/null +++ b/.changeset/fifty-rivers-sparkle.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +support aliases longer than one char diff --git a/.changeset/fresh-turtles-cheat.md b/.changeset/fresh-turtles-cheat.md new file mode 100644 index 00000000000..c338eb0c79b --- /dev/null +++ b/.changeset/fresh-turtles-cheat.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +fix handling of aliases diff --git a/.github/workflows/issue-stale.yml b/.github/workflows/issue-stale.yml index e34856dad69..500d781b08a 100644 --- a/.github/workflows/issue-stale.yml +++ b/.github/workflows/issue-stale.yml @@ -16,11 +16,12 @@ jobs: name: "Close stale issues with no reproduction" 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." + 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 reopen or leave a comment. Thank you.\n(This is an automated message.)" days-before-issue-close: 7 - days-before-issue-stale: 15 + days-before-issue-stale: 30 stale-pr-label: "stale?" - days-before-pr-close: -1 - days-before-pr-stale: -1 + days-before-pr-close: 7 + days-before-pr-stale: 15 + only-pr-labels: "postpone: more info or changes requested,please add a reproduction" exempt-issue-labels: "roadmap,next,bug" operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f354abc95a2..1f1932756aa 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -54,7 +54,7 @@ jobs: path: packages/shadcn - name: Upload packaged artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: npm-package-shadcn@${{ steps.package-version.outputs.current-version }}-pr-${{ github.event.number }} # encode the PR number into the artifact name path: packages/shadcn/dist/index.js diff --git a/.gitignore b/.gitignore index 24c1ac82436..865a3fd3be3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,9 @@ yarn-error.log* .turbo .contentlayer -tsconfig.tsbuildinfo \ No newline at end of file +tsconfig.tsbuildinfo + +# ide +.idea +.fleet +.vscode diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f45807d242e..fd64b7878a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,6 +91,42 @@ pnpm --filter=www dev pnpm --filter=shadcn-ui dev ``` +## Running the CLI Locally + +To run the CLI locally, you can follow the workflow: + +1. Start by running the registry (main site) to make sure the components are up to date: + + ```bash + pnpm www:dev + ``` + +2. Run the development script for the CLI: + + ```bash + pnpm shadcn:dev + ``` + +3. In another terminal tab, test the CLI by running: + + ```bash + pnpm shadcn + ``` + + To test the CLI in a specific app, use a command like: + + ```bash + pnpm shadcn -c ~/Desktop/my-app + ``` + +4. To run the tests for the CLI: + + ```bash + pnpm --filter=shadcn test + ``` + +This workflow ensures that you are running the most recent version of the registry and testing the CLI properly in your local environment. + ## Documentation The documentation for this project is located in the `www` workspace. You can run the documentation locally by running the following command: diff --git a/apps/www/__registry__/default/block/_sink/page.tsx b/apps/www/__registry__/default/block/_sink/page.tsx new file mode 100644 index 00000000000..6ed2f8841ed --- /dev/null +++ b/apps/www/__registry__/default/block/_sink/page.tsx @@ -0,0 +1,273 @@ +import { AccordionDemo } from "@/registry/default/block/_sink/components/accordion-demo" +import { AlertDemo } from "@/registry/default/block/_sink/components/alert-demo" +import { AlertDialogDemo } from "@/registry/default/block/_sink/components/alert-dialog-demo" +import { AppSidebar } from "@/registry/default/block/_sink/components/app-sidebar" +import { AspectRatioDemo } from "@/registry/default/block/_sink/components/aspect-ratio-demo" +import { AvatarDemo } from "@/registry/default/block/_sink/components/avatar-demo" +import { BadgeDemo } from "@/registry/default/block/_sink/components/badge-demo" +import { BadgeDestructive } from "@/registry/default/block/_sink/components/badge-destructive" +import { BadgeOutline } from "@/registry/default/block/_sink/components/badge-outline" +import { BadgeSecondary } from "@/registry/default/block/_sink/components/badge-secondary" +import { BreadcrumbDemo } from "@/registry/default/block/_sink/components/breadcrumb-demo" +import { ButtonDemo } from "@/registry/default/block/_sink/components/button-demo" +import { ButtonDestructive } from "@/registry/default/block/_sink/components/button-destructive" +import { ButtonGhost } from "@/registry/default/block/_sink/components/button-ghost" +import { ButtonLink } from "@/registry/default/block/_sink/components/button-link" +import { ButtonLoading } from "@/registry/default/block/_sink/components/button-loading" +import { ButtonOutline } from "@/registry/default/block/_sink/components/button-outline" +import { ButtonSecondary } from "@/registry/default/block/_sink/components/button-secondary" +import { ButtonWithIcon } from "@/registry/default/block/_sink/components/button-with-icon" +import { CalendarDemo } from "@/registry/default/block/_sink/components/calendar-demo" +import { CardDemo } from "@/registry/default/block/_sink/components/card-demo" +import { CarouselDemo } from "@/registry/default/block/_sink/components/carousel-demo" +import { CheckboxDemo } from "@/registry/default/block/_sink/components/checkbox-demo" +import { CollapsibleDemo } from "@/registry/default/block/_sink/components/collapsible-demo" +import { ComboboxDemo } from "@/registry/default/block/_sink/components/combobox-demo" +import { CommandDemo } from "@/registry/default/block/_sink/components/command-demo" +import { ComponentWrapper } from "@/registry/default/block/_sink/components/component-wrapper" +import { ContextMenuDemo } from "@/registry/default/block/_sink/components/context-menu-demo" +import { DatePickerDemo } from "@/registry/default/block/_sink/components/date-picker-demo" +import { DialogDemo } from "@/registry/default/block/_sink/components/dialog-demo" +import { DrawerDemo } from "@/registry/default/block/_sink/components/drawer-demo" +import { DropdownMenuDemo } from "@/registry/default/block/_sink/components/dropdown-menu-demo" +import { HoverCardDemo } from "@/registry/default/block/_sink/components/hover-card-demo" +import { InputDemo } from "@/registry/default/block/_sink/components/input-demo" +import { InputOTPDemo } from "@/registry/default/block/_sink/components/input-otp-demo" +import { LabelDemo } from "@/registry/default/block/_sink/components/label-demo" +import { MenubarDemo } from "@/registry/default/block/_sink/components/menubar-demo" +import { NavigationMenuDemo } from "@/registry/default/block/_sink/components/navigation-menu-demo" +import { PaginationDemo } from "@/registry/default/block/_sink/components/pagination-demo" +import { PopoverDemo } from "@/registry/default/block/_sink/components/popover-demo" +import { ProgressDemo } from "@/registry/default/block/_sink/components/progress-demo" +import { RadioGroupDemo } from "@/registry/default/block/_sink/components/radio-group-demo" +import { ResizableHandleDemo } from "@/registry/default/block/_sink/components/resizable-handle" +import { ScrollAreaDemo } from "@/registry/default/block/_sink/components/scroll-area-demo" +import { SelectDemo } from "@/registry/default/block/_sink/components/select-demo" +import { SeparatorDemo } from "@/registry/default/block/_sink/components/separator-demo" +import { SheetDemo } from "@/registry/default/block/_sink/components/sheet-demo" +import { SkeletonDemo } from "@/registry/default/block/_sink/components/skeleton-demo" +import { SliderDemo } from "@/registry/default/block/_sink/components/slider-demo" +import { SonnerDemo } from "@/registry/default/block/_sink/components/sonner-demo" +import { SwitchDemo } from "@/registry/default/block/_sink/components/switch-demo" +import { TableDemo } from "@/registry/default/block/_sink/components/table-demo" +import { TabsDemo } from "@/registry/default/block/_sink/components/tabs-demo" +import { TextareaDemo } from "@/registry/default/block/_sink/components/textarea-demo" +import { ToastDemo } from "@/registry/default/block/_sink/components/toast-demo" +import { ToggleDemo } from "@/registry/default/block/_sink/components/toggle-demo" +import { ToggleDisabled } from "@/registry/default/block/_sink/components/toggle-disabled" +import { ToggleGroupDemo } from "@/registry/default/block/_sink/components/toggle-group-demo" +import { ToggleOutline } from "@/registry/default/block/_sink/components/toggle-outline" +import { ToggleWithText } from "@/registry/default/block/_sink/components/toggle-with-text" +import { TooltipDemo } from "@/registry/default/block/_sink/components/tooltip-demo" +import { + Breadcrumb, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from "@/registry/default/ui/breadcrumb" +import { Separator } from "@/registry/default/ui/separator" +import { + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/registry/default/ui/sidebar" + +export default function SinkPage() { + return ( + + + +
+
+ + + + + + + Building Your Application + + + + + Data Fetching + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + + + +
+
+
+
+ ) +} diff --git a/apps/www/__registry__/default/block/dashboard-03.tsx b/apps/www/__registry__/default/block/dashboard-03.tsx index ea89e0e67a9..a5bbbed32b2 100644 --- a/apps/www/__registry__/default/block/dashboard-03.tsx +++ b/apps/www/__registry__/default/block/dashboard-03.tsx @@ -56,7 +56,7 @@ export default function Dashboard() {