-
Notifications
You must be signed in to change notification settings - Fork 418
feat(themes): Add shadcn.css export #6415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexcarpenter
merged 18 commits into
main
from
alexcarpenter/user-2471-add-css-file-with-safelist-classes
Jul 31, 2025
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9245edb
feat(themes): Add shadcn.css export
alexcarpenter 6c0b09a
Update pnpm-lock.yaml
alexcarpenter 25f342a
Update shadcn.css
alexcarpenter e5d8487
handle error
alexcarpenter c23e1b3
Merge branch 'main' into alexcarpenter/user-2471-add-css-file-with-sa…
alexcarpenter 8a89b99
bootstrap changeset
alexcarpenter 35e8506
exclude entry points
alexcarpenter d4facae
Merge branch 'main' into alexcarpenter/user-2471-add-css-file-with-sa…
alexcarpenter c733ada
TODO changelog
alexcarpenter 498e797
Delete .changeset/silent-eagles-join.md
alexcarpenter f145e82
wrap in variant
alexcarpenter 6796909
test source
alexcarpenter 45743e3
Update package.json
alexcarpenter 90bdd98
use the source option
alexcarpenter 8db489a
Update packages/themes/src/themes/shadcn.css
alexcarpenter 6e8a2cb
Merge branch 'main' into alexcarpenter/user-2471-add-css-file-with-sa…
alexcarpenter 2cb2d15
Merge branch 'main' into alexcarpenter/user-2471-add-css-file-with-sa…
alexcarpenter 0ca547e
Update .changeset/puny-hounds-eat.md
alexcarpenter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| --- | ||
| '@clerk/themes': patch | ||
| --- | ||
|
|
||
| TODO | ||
This file contains hidden or 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
This file contains hidden or 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,46 @@ | ||
| :root { | ||
| --clerk-color-background: var(--card); | ||
| --clerk-color-danger: var(--destructive); | ||
| --clerk-color-foreground: var(--card-foreground); | ||
| --clerk-color-input: var(--input); | ||
| --clerk-color-input-foreground: var(--card-foreground); | ||
| --clerk-color-modal-backdrop: var(--color-black); | ||
| --clerk-color-muted: var(--muted); | ||
| --clerk-color-muted-foreground: var(--muted-foreground); | ||
| --clerk-color-neutral: var(--foreground); | ||
| --clerk-color-primary: var(--primary); | ||
| --clerk-color-primary-foreground: var(--primary-foreground); | ||
| --clerk-color-ring: var(--ring); | ||
| --clerk-font-weight-normal: var(--font-weight-normal); | ||
| --clerk-font-weight-medium: var(--font-weight-medium); | ||
| --clerk-font-weight-semibold: var(--font-weight-semibold); | ||
| --clerk-font-weight-bold: var(--font-weight-semibold); | ||
alexcarpenter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| .cl-input { | ||
| background-color: transparent; | ||
|
|
||
| @variant dark { | ||
| background-color: --alpha(var(--clerk-color-input) / 30%); | ||
| } | ||
| } | ||
|
|
||
| .cl-cardBox, | ||
| .cl-popoverBox { | ||
| box-shadow: var(--shadow-sm); | ||
| border-style: solid; | ||
| border-width: 1px; | ||
| border-color: var(--border); | ||
| } | ||
|
|
||
| .cl-button[data-variant='solid']::after { | ||
| display: none; | ||
| } | ||
|
|
||
| .cl-providerIcon__apple, | ||
| .cl-providerIcon__github, | ||
| .cl-providerIcon__okx_wallet { | ||
| @variant dark { | ||
| filter: invert(1); | ||
| } | ||
| } | ||
This file contains hidden or 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,39 @@ | ||
| import { cp, mkdir, readdir } from 'fs/promises'; | ||
| import { extname, join } from 'path'; | ||
| import { defineConfig } from 'tsup'; | ||
|
|
||
| export default defineConfig({ | ||
| entry: ['./src/**/*.{ts,tsx}'], | ||
| format: ['cjs', 'esm'], | ||
| bundle: false, | ||
| clean: true, | ||
| minify: false, | ||
| sourcemap: false, | ||
| dts: true, | ||
| tsconfig: './tsconfig.build.json', | ||
| target: 'es2020', | ||
| onSuccess: async () => { | ||
| // Ensure dist/themes directory exists | ||
| await mkdir('./dist/themes', { recursive: true }); | ||
|
|
||
| // Copy all CSS files from src/themes to dist/themes | ||
| try { | ||
| const files = await readdir('./src/themes'); | ||
| const cssFiles = files.filter(file => extname(file) === '.css'); | ||
|
|
||
| for (const cssFile of cssFiles) { | ||
| await cp(join('./src/themes', cssFile), join('./dist/themes', cssFile)); | ||
| console.log(`✓ Copied ${cssFile}`); | ||
| } | ||
| } catch (error) { | ||
| // Handle specific errors gracefully, log unexpected ones | ||
| if (error instanceof Error && 'code' in error && error.code === 'ENOENT') { | ||
| // Directory doesn't exist or no CSS files found, that's ok | ||
| console.log('ℹ No themes directory or CSS files found, skipping copy'); | ||
| } else { | ||
| // Log unexpected errors to avoid hiding real issues | ||
| console.warn('⚠ Warning: Failed to copy CSS files:', error); | ||
| } | ||
| } | ||
| }, | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.