Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2099933
init tailwind 4 branch
huntabyte Mar 18, 2025
a9a137b
feat(v4): Update CLI for tailwindcss@v4 (#1771)
ieedan Mar 18, 2025
e1a4403
export portal prop (#1780)
ieedan Mar 20, 2025
80ea4a2
feat(v4): Strip types through the CLI (#1778)
ieedan Mar 20, 2025
e5dc113
next(tailwind 4): component adjustments (#1784)
huntabyte Mar 21, 2025
5cc7477
feat(v4): Add remote components (#1781)
ieedan Mar 21, 2025
bc2d63a
chore(v4): Bundle mending (#1783)
ieedan Mar 21, 2025
5864392
chore: tailwind v4 styles and deps (#1786)
huntabyte Mar 22, 2025
d6c0603
chore(v4): Update to `@svecosystem/strip-types` (#1790)
ieedan Mar 25, 2025
7e034c4
chore(v4): Component updates (#1789)
ieedan Mar 25, 2025
a75bef6
fix(v4): layout (#1796)
ieedan Mar 26, 2025
821013f
fix(v4): Generate correct code on `/theme` (#1797)
ieedan Mar 27, 2025
6f4ed98
fix: remove `cursor-pointer` (#1806)
ieedan Mar 31, 2025
9f12391
fix: removes semicolon in generated theme (#1805)
ieedan Mar 31, 2025
a615c82
chore: tailwind v4 styles (#1791)
shyakadavis Apr 1, 2025
86f9f5d
chore: more tv4 styles (#1808)
shyakadavis Apr 3, 2025
8132b07
fix(v4): Re-enable remote dependencies (#1807)
ieedan Apr 3, 2025
74117fc
chore(tw4): tidy up CLI dependencies (#1811)
AdrianGonz97 Apr 4, 2025
c6edbe4
chore(v4): Docs fixes (#1827)
ieedan Apr 17, 2025
7c6f564
chore(v4): upgrade `mode-watcher` to use the new runes version (#1830)
ieedan Apr 17, 2025
d04134e
fix(cli-tw4): oklch function (#1835)
AdrianGonz97 Apr 17, 2025
20d6e47
chore(cli-tw4): remove exports and main fields (#1844)
AdrianGonz97 Apr 22, 2025
296659f
chore: update bits-ui api docs links (#1846)
ieedan Apr 22, 2025
56a3f09
fix: Allow buttons with href to be disabled (#1840)
ieedan Apr 29, 2025
9a66de3
Merge branch 'next' into next-tailwind-4
huntabyte Apr 30, 2025
d8e2400
cli: custom registry & tailwind 4 stuff (#1856)
huntabyte May 3, 2025
9b521b7
next: Tailwind 4 demo site (#1860)
huntabyte May 5, 2025
7157f5e
Merge branch 'next' into next-tailwind-4
huntabyte May 5, 2025
ac1ea4e
chore: add v4 build script (#1865)
huntabyte May 5, 2025
2295e94
chore: update build script
huntabyte May 5, 2025
5996254
Merge branch 'next-tailwind-4' of github.com:huntabyte/shadcn-svelte …
huntabyte May 5, 2025
1f753dc
fix demo styles (#1869)
huntabyte May 9, 2025
c977e6c
Merge branch 'next' into next-tailwind-4
huntabyte May 9, 2025
2bb36f4
merge next into next-tailwind-4
huntabyte May 11, 2025
205fbc1
tw4: tweaks (#1876)
huntabyte May 12, 2025
f6a902e
docs(tw4): update doc styles (#1878)
huntabyte May 12, 2025
7d6b065
feat(cli-tw4): registry `build` command (#1867)
AdrianGonz97 May 12, 2025
f57e2be
tw4: use correct (plural) dir names (#1881)
huntabyte May 13, 2025
0a9e9cc
tw4: init migration docs (#1884)
huntabyte May 13, 2025
5505708
fix: tw4 docs style (#1887)
Lechros May 14, 2025
7c3c3d2
tw4: charts to docs (#1890)
huntabyte May 14, 2025
af63959
tw4: more doc stuff (#1891)
huntabyte May 15, 2025
fb77ac7
tw4: backward compat/tests (#1885)
huntabyte May 15, 2025
3b8b250
chore(tw4-next): minor cleanups (#1892)
AdrianGonz97 May 15, 2025
0bd32a7
feat(tw4-next): transform registry aliases into alias placeholders (#…
AdrianGonz97 May 15, 2025
f446845
tw-4: fix cards preview for better responsiveness (#1898)
puRe1337 May 15, 2025
ffd84d8
tw4: block viewer scaffolding (#1893)
huntabyte May 16, 2025
b2f6701
tw4: css per item (#1899)
huntabyte May 16, 2025
c82ef53
chore(tw4-next): replace `valibot` for `zod` (#1901)
AdrianGonz97 May 16, 2025
7c52f19
tw4: registry colors (#1902)
huntabyte May 16, 2025
cdb5cf1
fix: use relative component imports in blocks (#1904)
AdrianGonz97 May 16, 2025
4557a2c
tw4: update installation docs and related CLI sections (#1894)
firatciftci May 16, 2025
95283c9
tw4: examples (#1905)
huntabyte May 16, 2025
7817a3f
fix(tw4): Update calendar & range calendar styles (#1906)
ieedan May 16, 2025
c4ff937
doc(tw4): Bunch O' docs fixes (#1903)
ieedan May 16, 2025
2d69fe6
fix(tw4-next): improved file path resolution (#1907)
AdrianGonz97 May 16, 2025
2130e43
tw4: registry cli docs (#1908)
huntabyte May 16, 2025
6053f0e
tw4: style and sonner update (#1909)
huntabyte May 16, 2025
4d7ddf7
fix(tw4-next): add workaround for `zod` ssr error: `missing './v4' sp…
AdrianGonz97 May 16, 2025
2ca9086
tw4: registry template (#1911)
huntabyte May 17, 2025
9988235
fix: remove lockfile
AdrianGonz97 May 17, 2025
0b252e5
docs(tw4): migration docs (#1912)
huntabyte May 17, 2025
38ad17c
feat(cli): `local:` registryDeps (#1913)
huntabyte May 17, 2025
069d616
chore(tw4): tests (#1916)
huntabyte May 17, 2025
2dcf4f4
docs(twv4): Review registry docs (#1917)
ieedan May 17, 2025
250aeb7
chore(tw4): `registry build` testing tweaks (#1918)
AdrianGonz97 May 17, 2025
80e29f6
tw4: cleanup/improve error messaging (#1919)
huntabyte May 17, 2025
4d1081a
tw4: better state and fix sidebar docs (#1921)
huntabyte May 17, 2025
3c272e6
chore(tw4): cli fixes and tweaks (#1922)
AdrianGonz97 May 17, 2025
9e73b86
Merge branch 'next' into next-tailwind-4
AdrianGonz97 May 17, 2025
ff402ec
docs(tw4): styles and things (#1924)
huntabyte May 18, 2025
20542e3
fix(calendar-day): enhance dark mode styles for selected state (#1926)
firatciftci May 18, 2025
7e5c8d0
docs: touchup theme styles (#1928)
huntabyte May 18, 2025
2d8c9c2
chore(tw4): add `components.json` schema descriptions (#1929)
AdrianGonz97 May 18, 2025
ee71030
docs(tw4): improve update guide (#1930)
huntabyte May 18, 2025
ad4cd6b
changeset
AdrianGonz97 May 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/sixty-lizards-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn-svelte": patch
---

breaking: svelte 5 + tailwindcss v4
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm build:cli

- name: Run tests
run: pnpm -F shadcn-svelte test
50 changes: 50 additions & 0 deletions .github/workflows/deploy-tailwind-3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tailwind 3 Deployment
on:
push:
branches:
- next-tailwind-3
paths:
- sites/docs/**
workflow_dispatch:


jobs:
deploy-production:
runs-on: macos-latest
permissions:
contents: read
deployments: write
name: Deploy Production Site to Cloudflare Pages
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

# Image cache setup
- name: Setup Image cache
uses: actions/cache@v4
with:
path: "**/node_modules/.cache/imagetools"
key: ${{ runner.os }}-image-cache-${{ hashFiles('**/src/lib/img') }}

- name: Install dependencies
run: pnpm install

- name: Build site
env:
NODE_OPTIONS: --max-old-space-size=8192
run: pnpm build

- name: Deploy to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: shadcn-svelte-tw-3
directory: ./.svelte-kit/cloudflare
workingDirectory: sites/docs
deploymentName: Production Tailwind 3
20 changes: 14 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules
dist
/build
/.svelte-kit
/package
Expand Down Expand Up @@ -103,16 +104,23 @@ web_modules/
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
packages/cli/dist
dist/
dist
generated-assets

# JetBrains IDEs
.idea/

.velite
sites/docs/static/registry
sites/docs/src/lib/registry-json/**/*.json
sites/docs/src/lib/registry-json/**/*.css
sites/docs/static/themes.css
sites/docs/static/themes.css
sites/docs/static/schema/registry.json
sites/docs/static/schema/registry-item.json
sites/docs/src/__registry__/json

v4/static/registry
v4/static/themes.css
v4/src/__registry__
v4/static/schema/registry.json
v4/static/schema/registry-item.json


registry-template/static/r
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.15.1
v22.15.0
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ sites/docs/other/themes/light.json
sites/docs/static
sites/docs/.velite
sites/docs/src/__registry__
v4/src/__registry__
packages/cli/test/fixtures
playgrounds
.svelte-kit
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { includeIgnoreFile } from "@eslint/compat";
import prettier from "eslint-config-prettier";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import ts from "typescript-eslint";

const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs["flat/recommended"],
Expand Down
23 changes: 17 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "shadcn-svelte",
"name": "@shadcn-svelte/monorepo",
"version": "0.0.1",
"description": "monorepo for shadcn-svelte",
"author": {
Expand All @@ -9,17 +9,20 @@
"private": true,
"scripts": {
"build": "pnpm build:docs",
"build:cli": "pnpm -F shadcn-svelte build",
"build:cli": "pnpm -r -F \"./packages/**\" build",
"build:docs": "pnpm -F docs build",
"build:v4": "pnpm -F v4 build",
"dev": "pnpm -F docs dev",
"dev:cli": "pnpm -F shadcn-svelte start:dev",
"dev:cli": "pnpm -F \"./packages/**\" svelte-kit sync && pnpm --parallel --reporter append-only --color dev",
"dev:v4": "pnpm -F v4 dev",
"preview": "pnpm -F docs preview",
"test": "pnpm -F shadcn-svelte test",
"check": "pnpm -F docs check",
"build:registry-template": "pnpm build:cli && pnpm -F registry-template build:registry",
"check": "pnpm -F docs check && pnpm -F \"./packages/**\" check",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm -r sync",
"postinstall": "pnpm -r sync && pnpm build:cli",
"ci:publish": "changeset publish",
"ci:build": "pnpm build:cli",
"ci:release": "pnpm ci:build && pnpm ci:publish"
Expand All @@ -37,20 +40,28 @@
"type": "module",
"devDependencies": {
"@changesets/cli": "^2.28.1",
"@eslint/compat": "^1.2.7",
"@eslint/js": "^9.22.0",
"@types/node": "^22.15.15",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/scope-manager": "^8.26.1",
"@typescript-eslint/utils": "^8.26.1",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-svelte": "^3.2.1",
"globals": "^16.0.0",
"minimatch": "^10.0.1",
"prettier": "^3.5.3",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"pretty-quick": "^4.1.1",
"svelte": "^5.23.1",
"typescript": "^5.8.2",
"typescript": "^5.8.3",
"typescript-eslint": "^8.26.1"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
}
}
2 changes: 1 addition & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A CLI for adding shadcn components to your project.

Use the `init` command to initialize dependencies for a new project.

The `init` command installs dependencies, adds the `cn` util, configures `tailwind.config.cjs`, and sets up CSS variables for the project.
The `init` command installs dependencies, adds the `cn` util, configures, and sets up CSS variables for the project.

```bash
npx shadcn-svelte init
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/__mocks__/fs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// we can also use `import`, but then
// every export should be explicitly defined
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { fs } = require("memfs");
module.exports = fs;
5 changes: 5 additions & 0 deletions packages/cli/__mocks__/fs/promises.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// we can also use `import`, but then
// every export should be explicitly defined
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { fs } = require("memfs");
module.exports = fs.promises;
36 changes: 21 additions & 15 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,36 @@
"start": "node dist/index.js",
"start:dev": "cross-env COMPONENTS_REGISTRY_URL=http://localhost:5173/registry node dist/index.js",
"start:proxy": "pnpm dlx straightforward@latest --port 9000",
"release": "changeset version",
"test": "vitest"
"test": "pnpm -w build:registry-template && vitest"
},
"dependencies": {
"@clack/core": "^0.3.4",
"chalk": "5.2.0",
"commander": "^10.0.1",
"execa": "^7.2.0",
"is-unicode-supported": "^2.0.0",
"commander": "^13.1.0",
"node-fetch-native": "^1.6.4",
"semver": "^7.7.1"
"postcss": "^8.4.39"
},
"devDependencies": {
"@clack/prompts": "^1.0.0-alpha.0",
"@shadcn-svelte/registry": "workspace:*",
"@svecosystem/strip-types": "^0.0.2",
"@sveltejs/acorn-typescript": "^1.0.5",
"@types/node": "^18.19.22",
"@types/semver": "^7.5.8",
"acorn": "^8.13.0",
"chalk": "^5.4.0",
"cross-env": "^7.0.3",
"deepmerge": "^4.3.1",
"estree-walker": "^3.0.3",
"get-tsconfig": "^4.7.3",
"ignore": "^5.3.1",
"package-manager-detector": "^0.2.2",
"sisteransi": "^1.0.5",
"tsup": "^8.0.0",
"ignore": "^7.0.4",
"memfs": "^4.17.2",
"package-manager-detector": "^1.2.0",
"semver": "^7.7.1",
"sucrase": "^3.35.0",
"tinyexec": "^1.0.1",
"tsup": "^8.4.0",
"type-fest": "^3.13.1",
"typescript": "^5.0.0",
"valibot": "^0.36.0",
"vitest": "^0.34.6"
"typescript": "^5.8.3",
"vitest": "^3.1.3",
"zod": "3.25.0-beta.20250516T005923"
}
}
16 changes: 0 additions & 16 deletions packages/cli/src/commands/add.ts

This file was deleted.

Loading