-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7dbbe62
Showing
238 changed files
with
34,545 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ "repo": "adrian-ub/shadcn-ng" } | ||
], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": ["www"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/adrian-ub/shadcn-ng/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-ng 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/adrian-ub/shadcn-ng/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Get Help | ||
url: https://github.com/adrian-ub/shadcn-ng/discussions/new?category=general | ||
about: If you can't get something to work the way you expect, open a question in our discussion forums. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "Feature request" | ||
description: Create a feature request for shadcn-ng | ||
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/adrian-ub/shadcn-ng/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/adrian-ub/shadcn-ng/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ORIGINALLY FROM CLOUDFLARE WRANGLER: | ||
// https://github.com/cloudflare/wrangler2/blob/main/.github/changeset-version.js | ||
|
||
import { exec } from "child_process" | ||
|
||
// This script is used by the `release.yml` workflow to update the version of the packages being released. | ||
// The standard step is only to run `changeset version` but this does not update the package-lock.json file. | ||
// So we also run `npm install`, which does this update. | ||
// This is a workaround until this is handled automatically by `changeset version`. | ||
// See https://github.com/changesets/changesets/issues/421. | ||
exec("npx changeset version") | ||
exec("npm install") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ORIGINALLY FROM CLOUDFLARE WRANGLER: | ||
// https://github.com/cloudflare/wrangler2/blob/main/.github/version-script.js | ||
|
||
import { exec } from "child_process" | ||
import fs from "fs" | ||
|
||
const pkgJsonPath = "packages/cli/package.json" | ||
try { | ||
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath)) | ||
exec("git rev-parse --short HEAD", (err, stdout) => { | ||
if (err) { | ||
console.log(err) | ||
process.exit(1) | ||
} | ||
pkg.version = "0.0.0-beta." + stdout.trim() | ||
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n") | ||
}) | ||
} catch (error) { | ||
console.error(error) | ||
process.exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ORIGINALLY FROM CLOUDFLARE WRANGLER: | ||
// https://github.com/cloudflare/wrangler2/blob/main/.github/version-script.js | ||
|
||
import { exec } from "child_process" | ||
import fs from "fs" | ||
|
||
const pkgJsonPath = "packages/cli/package.json" | ||
try { | ||
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath)) | ||
exec("git rev-parse --short HEAD", (err, stdout) => { | ||
if (err) { | ||
console.log(err) | ||
process.exit(1) | ||
} | ||
pkg.version = "0.0.0-next." + stdout.trim() | ||
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n") | ||
}) | ||
} catch (error) { | ||
console.error(error) | ||
process.exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
|
||
|
||
# This enables task distribution via Nx Cloud | ||
# Run this command as early as possible, before dependencies are installed | ||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun | ||
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" | ||
|
||
|
||
# Cache node_modules | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
- uses: nrwl/nx-set-shas@v4 | ||
|
||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud | ||
# - run: pnpm exec nx-cloud record -- echo Hello World | ||
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected | ||
- run: pnpm exec nx affected -t lint test build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Adapted from vercel/next.js | ||
name: Issue Stale | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# This runs every day 20 minutes before midnight: https://crontab.guru/#40_23_*_*_* | ||
- cron: "40 23 * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'adrian-ub' | ||
steps: | ||
- uses: actions/stale@v4 | ||
id: stale-no-repro | ||
name: "Close stale issues with no reproduction" | ||
with: | ||
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: 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" | ||
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Adapted from create-t3-app. | ||
name: Write Beta Release comment | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Release - Beta"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment: | ||
if: | | ||
github.repository_owner == 'adrian-ub' && | ||
${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
name: Write comment to the PR | ||
steps: | ||
- name: "Comment on PR" | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: context.payload.workflow_run.id, | ||
}); | ||
for (const artifact of allArtifacts.data.artifacts) { | ||
// Extract the PR number and package version from the artifact name | ||
const match = /^npm-package-shadcn-ng@(.*?)-pr-(\d+)/.exec(artifact.name); | ||
if (match) { | ||
require("fs").appendFileSync( | ||
process.env.GITHUB_ENV, | ||
`\nBETA_PACKAGE_VERSION=${match[1]}` + | ||
`\nWORKFLOW_RUN_PR=${match[2]}` + | ||
`\nWORKFLOW_RUN_ID=${context.payload.workflow_run.id}` | ||
); | ||
break; | ||
} | ||
} | ||
- name: "Comment on PR with Link" | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
number: ${{ env.WORKFLOW_RUN_PR }} | ||
message: | | ||
A new prerelease is available for testing: | ||
```sh | ||
npx shadcn-ng@${{ env.BETA_PACKAGE_VERSION }} | ||
``` | ||
- name: "Remove the autorelease label once published" | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.rest.issues.removeLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: '${{ env.WORKFLOW_RUN_PR }}', | ||
name: '🚀 autorelease', | ||
}); |
Oops, something went wrong.