-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feature : add Shadcn theme #4520
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
Feature : add Shadcn theme #4520
Conversation
…ding type to `add button` and `icon button`
…-v6/shadcn # Conflicts: # package-lock.json
Update: solved conflict with package-lock.json. Also provided a playground preview with shadcn theme: |
@karimkhalaf I've merged a few PRs with updates and fixes from |
…-v6/shadcn # Conflicts: # .gitignore # package-lock.json # packages/playground/src/app.tsx # packages/playground/vite.config.ts
@heath-freenome will do. working on a cleaner PR now. |
…ding type to `add button` and `icon button`
packages/shadcn/package.json
Outdated
}, | ||
"scripts": { | ||
"build:css": "node build-css.cjs", | ||
"build:ts": "tsc -b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve ESM support you will need to change this to:
"build:ts": "tsc -b", | |
"build:ts": "tsc -b tsconfig.build.json && tsc-alias -p tsconfig.build.json", |
And add a tsconfig.build.json
that contains:
{
"extends": "../../tsconfig.build.json",
"compilerOptions": {
"outDir": "./lib"
},
"files": [],
"references": [
{
"path": "./src"
}
],
"tsc-alias": {
"resolveFullPaths": true,
"verbose": true,
}
}
import * as React from 'react'; | ||
import * as SelectPrimitive from '@radix-ui/react-select'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than use this, import each of the things you need directly from react
and @radix-ui/react-select
import * as React from 'react'; | ||
import * as SeparatorPrimitive from '@radix-ui/react-separator'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than use this, import each of the things you need directly from react
and @radix/react-separator
@heath-freenome Thanks for your reviewing. Will be making those changes now |
|
… dep to be on equal ground to project
…ncyMultiSelect, FancySelect, and FieldTemplate components
Co-authored-by: Heath C <[email protected]>
…to tuanphung2308/rjsf-v6/shadcn
@heath-freenome I have cleaned up all the problems and added missing JSdoc |
Co-authored-by: Heath C <[email protected]>
any ETA on this release? |
@K-Mistele within a week expect a |
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
* feat: migrated from v5 to v6 * chore: minor style fix for disabled state for select * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * feat: migrated from v5 to v6 * chore: rename `shad-lib` to `lib`, also updated test snapshots for adding type to `add button` and `icon button` * updated package*.json after versioning * updated package*.json after versioning * feat: grid template implementation * chore: update test snapshot * chore: update README.md for rjsf/core versioning * chore: improve ESM support (tsconfig.build.json and package.json) * chore: add missing jsdoc for all component * chore: remove console.log when finish building css files * fix: only imports what necessary from React/radix primitive * chore: rearrange import sort order * chore: remove blank line in gitignore, lint jest.config, reduce jsdom dep to be on equal ground to project * updated package*.json after versioning * Update .gitignore Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/build-css.cjs Co-authored-by: Heath C <[email protected]> * Update packages/shadcn/README.md Co-authored-by: Heath C <[email protected]> * chore: add jsdoc for icon button components * refactor: simplify conditional rendering in SelectWidget component * chore: rename build-css.cjs to build-css.js and update package.json script * chore: add JSDoc comments for Alert component * chore: add JSDoc comments for Badge component * chore: add JSDoc comments for Button component * chore: add JSDoc for Checkbox component * chore: add JSDoc for Command components * chore: add JSDoc for FancyMultiSelect, FancySelect and default select components * chore: add JSDoc return type for Alert, Badge, Button, and Command components * chore: add JSDoc for Input, Label, and Textarea components * chore: add JSDoc for Dialog, RadioGroup, Separator, and Slider components * chore: proofreading JSDoc and improve documentation for AddButton, FancyMultiSelect, FancySelect, and FieldTemplate components * Update packages/shadcn/.gitignore Co-authored-by: Heath C <[email protected]> * chore: refine JSDoc for RangeWidget component and adjust type annotations * Update packages/shadcn/src/AddButton/AddButton.tsx Co-authored-by: Heath C <[email protected]> --------- Co-authored-by: tuanminh <[email protected]> Co-authored-by: Heath C <[email protected]>
Reasons for making this change
This PR introduces Shadcn theme support for the RJSF library, developed by @SA-GeoTech and implemented by @tuanphung2308.
The work was commissioned and funded by @SA-GeoTech, and we are contributing it back to the open-source community.
Live demo: https://react-jsonschema-form-shadcn-boilerplate.vercel.app/
Checklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update
to update snapshots, if needed.