Skip to content

Commit

Permalink
Merge branch 'main' into aakash19here/tooltip-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aakash19here authored Oct 3, 2024
2 parents ec94f60 + 36ebbf2 commit 74d48b1
Show file tree
Hide file tree
Showing 987 changed files with 38,099 additions and 12,737 deletions.
5 changes: 0 additions & 5 deletions .changeset/wet-eagles-leave.md

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"plugin:tailwindcss/recommended"
],
"plugins": ["tailwindcss"],
"ignorePatterns": ["**/fixtures/**"],
"rules": {
"@next/next/no-html-link-for-pages": "off",
"tailwindcss/no-custom-classname": "off",
Expand Down
2 changes: 1 addition & 1 deletion .github/version-script-beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { exec } from "child_process"
import fs from "fs"

const pkgJsonPath = "packages/cli/package.json"
const pkgJsonPath = "packages/shadcn/package.json"
try {
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath))
exec("git rev-parse --short HEAD", (err, stdout) => {
Expand Down
2 changes: 1 addition & 1 deletion .github/version-script-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { exec } from "child_process"
import fs from "fs"

const pkgJsonPath = "packages/cli/package.json"
const pkgJsonPath = "packages/shadcn/package.json"
try {
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath))
exec("git rev-parse --short HEAD", (err, stdout) => {
Expand Down
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
6 changes: 3 additions & 3 deletions .github/workflows/prerelease-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
for (const artifact of allArtifacts.data.artifacts) {
// Extract the PR number and package version from the artifact name
const match = /^npm-package-shadcn-ui@(.*?)-pr-(\d+)/.exec(artifact.name);
const match = /^npm-package-shadcn@(.*?)-pr-(\d+)/.exec(artifact.name);
if (match) {
require("fs").appendFileSync(
process.env.GITHUB_ENV,
Expand All @@ -49,7 +49,7 @@ jobs:
A new prerelease is available for testing:
```sh
npx shadcn-ui@${{ env.BETA_PACKAGE_VERSION }}
npx shadcn@${{ env.BETA_PACKAGE_VERSION }}
```
- name: "Remove the autorelease label once published"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: node .github/version-script-beta.js

- name: Authenticate to NPM
run: echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" >> packages/cli/.npmrc
run: echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" >> packages/shadcn/.npmrc
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

Expand All @@ -51,10 +51,10 @@ jobs:
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: packages/cli
path: packages/shadcn

- name: Upload packaged artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: npm-package-shadcn-ui@${{ steps.package-version.outputs.current-version }}-pr-${{ github.event.number }} # encode the PR number into the artifact name
path: packages/cli/dist/index.js
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# run: pnpm check

- name: Build the package
run: pnpm build:cli
run: pnpm shadcn:build

- name: Create Version PR or Publish to NPM
id: changesets
Expand Down
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
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.next
build
.contentlayer
apps/www/pages/api/registry.json
apps/www/pages/api/registry.json
**/fixtures
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"vitest.debugExclude": [
"<node_internals>/**",
"**/node_modules/**",
"**/fixtures/**"
]
}
13 changes: 13 additions & 0 deletions apps/www/__registry__/default/block/login-01.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LoginForm } from "@/registry/default/block/login-01/components/login-form"

export const iframeHeight = "870px"

export const containerClassName = "w-full h-full"

export default function Page() {
return (
<div className="flex h-screen w-full items-center justify-center px-4">
<LoginForm />
</div>
)
}
13 changes: 13 additions & 0 deletions apps/www/__registry__/default/block/login-01/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LoginForm } from "@/registry/default/block/login-01/components/login-form"

export const iframeHeight = "870px"

export const containerClassName = "w-full h-full"

export default function Page() {
return (
<div className="flex h-screen w-full items-center justify-center px-4">
<LoginForm />
</div>
)
}
25 changes: 25 additions & 0 deletions apps/www/__registry__/default/block/sidebar-01.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { AppSidebar } from "@/registry/default/block/sidebar-01/components/app-sidebar"
import {
SidebarLayout,
SidebarTrigger,
} from "@/registry/default/block/sidebar-01/ui/sidebar"

export const iframeHeight = "870px"

export const containerClassName = "w-full h-full"

export default async function Page() {
const { cookies } = await import("next/headers")
return (
<SidebarLayout
defaultOpen={cookies().get("sidebar:state")?.value === "true"}
>
<AppSidebar />
<main className="flex flex-1 flex-col p-2 transition-all duration-300 ease-in-out">
<div className="h-full rounded-md border-2 border-dashed p-2">
<SidebarTrigger />
</div>
</main>
</SidebarLayout>
)
}
25 changes: 25 additions & 0 deletions apps/www/__registry__/default/block/sidebar-01/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { AppSidebar } from "@/registry/default/block/sidebar-01/components/app-sidebar"
import {
SidebarLayout,
SidebarTrigger,
} from "@/registry/default/block/sidebar-01/ui/sidebar"

export const iframeHeight = "870px"

export const containerClassName = "w-full h-full"

export default async function Page() {
const { cookies } = await import("next/headers")
return (
<SidebarLayout
defaultOpen={cookies().get("sidebar:state")?.value === "true"}
>
<AppSidebar />
<main className="flex flex-1 flex-col p-2 transition-all duration-300 ease-in-out">
<div className="h-full rounded-md border-2 border-dashed p-2">
<SidebarTrigger />
</div>
</main>
</SidebarLayout>
)
}
33 changes: 0 additions & 33 deletions apps/www/__registry__/default/example/accordion-demo.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions apps/www/__registry__/default/example/alert-demo.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions apps/www/__registry__/default/example/alert-destructive.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions apps/www/__registry__/default/example/alert-dialog-demo.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions apps/www/__registry__/default/example/aspect-ratio-demo.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/www/__registry__/default/example/avatar-demo.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/www/__registry__/default/example/badge-demo.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/www/__registry__/default/example/badge-destructive.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/www/__registry__/default/example/badge-outline.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/www/__registry__/default/example/badge-secondary.tsx

This file was deleted.

Loading

0 comments on commit 74d48b1

Please sign in to comment.