Skip to content

Commit

Permalink
Sync fork
Browse files Browse the repository at this point in the history
  • Loading branch information
nahasco committed Dec 7, 2024
2 parents 238d856 + 805ed41 commit e0f8c22
Show file tree
Hide file tree
Showing 1,491 changed files with 77,725 additions and 8,412 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["www", "**-template"]
"ignore": ["www"]
}
5 changes: 5 additions & 0 deletions .changeset/empty-pants-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

Update spread/unspread helpers to handle ArrayLiteralExpression and nested values within arrays
5 changes: 5 additions & 0 deletions .changeset/fifty-rivers-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

support aliases longer than one char
5 changes: 5 additions & 0 deletions .changeset/fresh-turtles-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

fix handling of aliases
9 changes: 5 additions & 4 deletions .github/workflows/issue-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ yarn-error.log*
.turbo

.contentlayer
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo

# ide
.idea
.fleet
.vscode
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init | add | ...> -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:
Expand Down
273 changes: 273 additions & 0 deletions apps/www/__registry__/default/block/_sink/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<SidebarProvider>
<AppSidebar />
<SidebarInset>
<header className="flex h-16 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12">
<div className="flex items-center gap-2 px-4">
<SidebarTrigger className="-ml-1" />
<Separator orientation="vertical" className="mr-2 h-4" />
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem className="hidden md:block">
<BreadcrumbLink href="#">
Building Your Application
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator className="hidden md:block" />
<BreadcrumbItem>
<BreadcrumbPage>Data Fetching</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
</div>
</header>
<div className="flex flex-1 flex-col gap-4 p-4">
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
<ComponentWrapper name="Accordion">
<AccordionDemo />
</ComponentWrapper>
<ComponentWrapper name="Alert">
<AlertDemo />
</ComponentWrapper>
<ComponentWrapper name="AlertDialog">
<AlertDialogDemo />
</ComponentWrapper>
<ComponentWrapper name="AspectRatio">
<AspectRatioDemo />
</ComponentWrapper>
<ComponentWrapper name="Avatar">
<AvatarDemo />
</ComponentWrapper>
<ComponentWrapper name="Badge">
<BadgeDemo />
<BadgeDestructive />
<BadgeOutline />
<BadgeSecondary />
</ComponentWrapper>
<ComponentWrapper name="Breadcrumb">
<BreadcrumbDemo />
</ComponentWrapper>
<ComponentWrapper name="Button">
<div className="flex items-center gap-2">
<ButtonDemo />
<ButtonDestructive />
<ButtonGhost />
<ButtonLink />
</div>
<div className="flex items-center gap-2">
<ButtonLoading />
<ButtonOutline />
<ButtonSecondary />
</div>
<div className="flex items-center gap-2">
<ButtonWithIcon />
</div>
</ComponentWrapper>
<ComponentWrapper name="Calendar">
<CalendarDemo />
</ComponentWrapper>
<ComponentWrapper name="Card">
<CardDemo className="w-full" />
</ComponentWrapper>
<ComponentWrapper
name="Carousel"
className="[&_.max-w-xs]:max-w-[70%]"
>
<CarouselDemo />
</ComponentWrapper>
<ComponentWrapper name="Checkbox">
<CheckboxDemo />
</ComponentWrapper>
<ComponentWrapper name="Collapsible">
<CollapsibleDemo />
</ComponentWrapper>
<ComponentWrapper name="Combobox">
<ComboboxDemo />
</ComponentWrapper>
<ComponentWrapper
name="Command"
className="[&_[cmdk-root]]:md:min-w-max"
>
<CommandDemo />
</ComponentWrapper>
<ComponentWrapper name="ContextMenu">
<ContextMenuDemo />
</ComponentWrapper>
<ComponentWrapper name="DatePicker">
<DatePickerDemo />
</ComponentWrapper>
<ComponentWrapper name="Dialog">
<DialogDemo />
</ComponentWrapper>
<ComponentWrapper name="Drawer">
<DrawerDemo />
</ComponentWrapper>
<ComponentWrapper name="DropdownMenu">
<DropdownMenuDemo />
</ComponentWrapper>
<ComponentWrapper name="HoverCard">
<HoverCardDemo />
</ComponentWrapper>
<ComponentWrapper name="Input">
<InputDemo />
</ComponentWrapper>
<ComponentWrapper name="InputOTP">
<InputOTPDemo />
</ComponentWrapper>
<ComponentWrapper name="Label">
<LabelDemo />
</ComponentWrapper>
<ComponentWrapper name="Menubar">
<MenubarDemo />
</ComponentWrapper>
<ComponentWrapper name="NavigationMenu" className="col-span-2">
<NavigationMenuDemo />
</ComponentWrapper>
<ComponentWrapper name="Pagination">
<PaginationDemo />
</ComponentWrapper>
<ComponentWrapper name="Popover">
<PopoverDemo />
</ComponentWrapper>
<ComponentWrapper name="Progress">
<ProgressDemo />
</ComponentWrapper>
<ComponentWrapper name="RadioGroup">
<RadioGroupDemo />
</ComponentWrapper>
<ComponentWrapper name="Resizable" className="col-span-2">
<ResizableHandleDemo />
</ComponentWrapper>
<ComponentWrapper name="ScrollArea">
<ScrollAreaDemo />
</ComponentWrapper>
<ComponentWrapper name="Select">
<SelectDemo />
</ComponentWrapper>
<ComponentWrapper name="Separator">
<SeparatorDemo />
</ComponentWrapper>
<ComponentWrapper name="Sheet">
<SheetDemo />
</ComponentWrapper>
<ComponentWrapper name="Skeleton">
<SkeletonDemo />
</ComponentWrapper>
<ComponentWrapper name="Slider">
<SliderDemo />
</ComponentWrapper>
<ComponentWrapper name="Sonner">
<SonnerDemo />
</ComponentWrapper>
<ComponentWrapper name="Switch">
<SwitchDemo />
</ComponentWrapper>
<ComponentWrapper name="Table" className="col-span-2">
<TableDemo />
</ComponentWrapper>
<ComponentWrapper name="Tabs">
<TabsDemo />
</ComponentWrapper>
<ComponentWrapper name="Textarea">
<TextareaDemo />
</ComponentWrapper>
<ComponentWrapper name="Toast">
<ToastDemo />
</ComponentWrapper>
<ComponentWrapper name="Toggle">
<div className="flex items-center gap-2">
<ToggleDemo />
<ToggleDisabled />
<ToggleOutline />
<ToggleWithText />
</div>
</ComponentWrapper>
<ComponentWrapper name="ToggleGroup">
<ToggleGroupDemo />
</ComponentWrapper>
<ComponentWrapper name="Tooltip">
<TooltipDemo />
</ComponentWrapper>
</div>
</div>
</SidebarInset>
</SidebarProvider>
)
}
Loading

0 comments on commit e0f8c22

Please sign in to comment.