├── .changeset ├── README.md ├── bright-penguins-flow.md ├── config.json ├── fair-rabbits-report.md ├── five-otters-build.md ├── friendly-glasses-wait.md ├── gentle-lizards-remember.md ├── green-rings-destroy.md ├── healthy-stingrays-return.md ├── heavy-files-rush.md ├── itchy-socks-count.md ├── khaki-beers-pump.md ├── light-toys-compare.md ├── many-bugs-battle.md ├── moody-phones-retire.md ├── nasty-wolves-know.md ├── nervous-tools-build.md ├── plenty-jobs-heal.md ├── polite-cougars-happen.md ├── pre.json ├── silly-rats-attack.md └── thirty-bees-cross.md ├── .eslintrc.js ├── .github └── workflows │ ├── main.yml │ └── publish.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── docs ├── .eslintrc.js ├── .gitignore ├── CHANGELOG.md ├── README.md ├── components │ ├── authors.tsx │ ├── blog-index.tsx │ ├── component-link.tsx │ └── demo-card.tsx ├── next.config.js ├── package.json ├── pages │ ├── _app.tsx │ ├── _document.tsx │ ├── _meta.json │ ├── about.mdx │ ├── api │ │ └── hello.ts │ ├── blog.mdx │ ├── blog │ │ ├── _meta.json │ │ └── announcing-catalystui.mdx │ ├── docs │ │ ├── _meta.json │ │ ├── accordion.mdx │ │ ├── alert.mdx │ │ ├── aspect-ratio.mdx │ │ ├── avatar.mdx │ │ ├── buttons.mdx │ │ ├── checkbox.mdx │ │ ├── collapsible.mdx │ │ ├── copy-to-clipboard.mdx │ │ ├── dialog.mdx │ │ ├── dropdown.mdx │ │ ├── getting-started.mdx │ │ ├── hover-card.mdx │ │ ├── index.mdx │ │ ├── label.mdx │ │ ├── nav.mdx │ │ ├── popover.mdx │ │ ├── progress.mdx │ │ ├── radio-group.mdx │ │ ├── scroll-area.mdx │ │ ├── select.mdx │ │ ├── separator.mdx │ │ ├── slider.mdx │ │ ├── switch.mdx │ │ ├── tabs.mdx │ │ ├── toast.mdx │ │ ├── toggle-group.mdx │ │ ├── toggle.mdx │ │ ├── toolbar.mdx │ │ └── tooltip.mdx │ └── index.mdx ├── postcss.config.js ├── public │ ├── assets │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── logo.png │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ ├── favicon.ico │ ├── next.svg │ ├── thirteen.svg │ └── vercel.svg ├── styles │ └── globals.css ├── tailwind.config.js ├── theme.config.js └── tsconfig.json ├── package.json ├── packages ├── eslint-config │ ├── index.js │ └── package.json ├── tsconfig │ ├── README.md │ ├── base.json │ ├── nextjs.json │ ├── package.json │ └── ui.json └── ui │ ├── CHANGELOG.md │ ├── README.md │ ├── index.tsx │ ├── package.json │ ├── postcss.config.js │ ├── src │ ├── components │ │ ├── accordion.tsx │ │ ├── alert.tsx │ │ ├── aspect-ratio.tsx │ │ ├── avatar.tsx │ │ ├── buttons │ │ │ ├── button.tsx │ │ │ ├── danger.tsx │ │ │ ├── icon-button.tsx │ │ │ ├── index.ts │ │ │ ├── primary.tsx │ │ │ ├── shared │ │ │ │ └── button.tsx │ │ │ └── types.ts │ │ ├── checkbox.tsx │ │ ├── collapsible.tsx │ │ ├── copy-to-clipboard.tsx │ │ ├── date-picker.tsx │ │ ├── dialog.tsx │ │ ├── dropdown.tsx │ │ ├── hover-card.tsx │ │ ├── label.tsx │ │ ├── nav.tsx │ │ ├── popover.tsx │ │ ├── progress.tsx │ │ ├── radio-group.tsx │ │ ├── scroll-area.tsx │ │ ├── select.tsx │ │ ├── separator.tsx │ │ ├── slider.tsx │ │ ├── switch.tsx │ │ ├── tabs.tsx │ │ ├── toast.tsx │ │ ├── toggle-group.tsx │ │ ├── toggle.tsx │ │ ├── toolbar.tsx │ │ └── tooltip.tsx │ └── internal │ │ └── calendar.tsx │ ├── styles │ └── main.css │ ├── tailwind.config.js │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/bright-penguins-flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': major 3 | --- 4 | 5 | Prerelease 6 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.changeset/fair-rabbits-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Add 4 new components - label, separator, slider, and toggle 6 | -------------------------------------------------------------------------------- /.changeset/five-otters-build.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Improve colors, update styles, replace classnames with clsx, refactor some components 6 | -------------------------------------------------------------------------------- /.changeset/friendly-glasses-wait.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Use theme variables everywhere and add a few radix primitives 6 | -------------------------------------------------------------------------------- /.changeset/gentle-lizards-remember.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Add calendar and date picker components 6 | -------------------------------------------------------------------------------- /.changeset/green-rings-destroy.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update readme and package details 6 | -------------------------------------------------------------------------------- /.changeset/healthy-stingrays-return.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Fix default value not working in select 6 | -------------------------------------------------------------------------------- /.changeset/heavy-files-rush.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update package homepage 6 | -------------------------------------------------------------------------------- /.changeset/itchy-socks-count.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Fix select not opening in uncontrolled operation 6 | -------------------------------------------------------------------------------- /.changeset/khaki-beers-pump.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update z-index of close button in dialog component 6 | -------------------------------------------------------------------------------- /.changeset/light-toys-compare.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Push again 6 | -------------------------------------------------------------------------------- /.changeset/many-bugs-battle.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update shortcut styles in dropdown component 6 | -------------------------------------------------------------------------------- /.changeset/moody-phones-retire.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update date picker component 6 | -------------------------------------------------------------------------------- /.changeset/nasty-wolves-know.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update select component styles and add size prop for avatar component 6 | -------------------------------------------------------------------------------- /.changeset/nervous-tools-build.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Update scroll area 6 | -------------------------------------------------------------------------------- /.changeset/plenty-jobs-heal.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Use theme variables everywhere and add a few radix primitives 6 | -------------------------------------------------------------------------------- /.changeset/polite-cougars-happen.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Add value prop to select component for controlled operations 6 | -------------------------------------------------------------------------------- /.changeset/pre.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "pre", 3 | "tag": "alpha", 4 | "initialVersions": { 5 | "@catalystui/docs": "0.1.42", 6 | "@catalystui/eslint-config": "0.0.0", 7 | "@catalystui/tsconfig": "0.0.0", 8 | "@i4o/catalystui": "0.9.3" 9 | }, 10 | "changesets": [ 11 | "bright-penguins-flow", 12 | "fair-rabbits-report", 13 | "five-otters-build", 14 | "friendly-glasses-wait", 15 | "gentle-lizards-remember", 16 | "green-rings-destroy", 17 | "healthy-stingrays-return", 18 | "heavy-files-rush", 19 | "itchy-socks-count", 20 | "khaki-beers-pump", 21 | "light-toys-compare", 22 | "many-bugs-battle", 23 | "moody-phones-retire", 24 | "nasty-wolves-know", 25 | "nervous-tools-build", 26 | "plenty-jobs-heal", 27 | "polite-cougars-happen", 28 | "silly-rats-attack", 29 | "thirty-bees-cross" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /.changeset/silly-rats-attack.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Add change event handler prop to checkbox component 6 | -------------------------------------------------------------------------------- /.changeset/thirty-bees-cross.md: -------------------------------------------------------------------------------- 1 | --- 2 | '@i4o/catalystui': patch 3 | --- 4 | 5 | Add few more components and update docs 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ['@catalystui/eslint-config'], 5 | settings: { 6 | next: { 7 | rootDir: ['apps/*/'], 8 | }, 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - '**' 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: pnpm/action-setup@v2 13 | with: 14 | version: 7 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: 16.x 18 | cache: 'pnpm' 19 | 20 | - run: pnpm install --frozen-lockfile 21 | - run: pnpm run lint && pnpm run build 22 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | on: 3 | push: 4 | branches: 5 | - 'main' 6 | 7 | concurrency: ${{ github.workflow }}-${{ github.ref }} 8 | 9 | jobs: 10 | build: 11 | name: Release 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: pnpm/action-setup@v2 16 | with: 17 | version: 7 18 | - uses: actions/setup-node@v3 19 | with: 20 | node-version: 16.x 21 | cache: 'pnpm' 22 | 23 | - run: pnpm install --frozen-lockfile 24 | - name: Create Release Pull Request or Publish 25 | id: changesets 26 | uses: changesets/action@v1 27 | with: 28 | publish: pnpm run release 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # next.js 12 | .next/ 13 | out/ 14 | build 15 | 16 | # build 17 | packages/ui/dist 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | .idea 23 | 24 | # debug 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | .pnpm-debug.log* 29 | 30 | # local env files 31 | .env.local 32 | .env.development.local 33 | .env.test.local 34 | .env.production.local 35 | 36 | # turbo 37 | .turbo 38 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=false 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | .changeset 4 | .github/ 5 | .next/ 6 | docs/.next 7 | packages/ui/dist 8 | pnpm-lock.yaml 9 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: true, 3 | endOfLine: 'lf', 4 | jsxBracketSameLine: false, 5 | jsxSingleQuote: true, 6 | semi: false, 7 | singleQuote: true, 8 | tabWidth: 4, 9 | trailingComma: 'es5', 10 | useTabs: true, 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Ilango Rajagopal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Catalyst UI 2 | 3 | Catalyst UI is a component library built on top of Radix UI Primitives styled with Tailwind CSS made to make prototyping faster. 4 | 5 | > **Note:** This project is NOT the Catalyst that Adam Wathan talked about in his keynote at Tailwind Connect 2023. This project is not affiliated with Tailwind Labs and Radix UI (and by extension WorkOS) in any way. 6 | 7 | ## Documentation 8 | 9 | For full documentation and a complete list of components, visit [catalyst-ui.com](https://catalyst-ui.com/) 10 | 11 | ## Installation 12 | 13 | ```bash 14 | pnpm add @i4o/catalystui 15 | ``` 16 | 17 | ## Features 18 | 19 | - Built on top of Radix UI Primitives styled with Tailwind CSS 20 | - Goes beyond Radix UI Primitives to provide more components 21 | - Utility components and hooks 22 | - Built-in dark mode support 23 | - Customizable styles with Tailwind or CSS Variables 24 | 25 | ## Roadmap 26 | 27 | - [x] Have a base list of usable components 28 | - [x] Fix library styles being overridden by Nextra styles 29 | - [x] Make the API and styles more consistent 30 | - [x] Make docs light/dark mode work for the components 31 | - [ ] Implement all Radix UI Primitives 32 | - [ ] Fix accessibility issues 33 | - [ ] Better types and runtime type-checking with Zod 34 | - [ ] Add explanation for props in the docs 35 | 36 | ## Acknowledgements 37 | 38 | CatalystUI and its docs are powered by these incredible open-source projects: 39 | 40 | - [React](https://reactjs.org/) 41 | - [TypeScript](https://www.typescriptlang.org/) 42 | - [Next.js](https://nextjs.org/) 43 | - [Nextra](https://nextra.site/) 44 | - [Radix UI](https://www.radix-ui.com/) 45 | - [Tailwind CSS](https://tailwindcss.com/) 46 | - [tailwindcss-radix](https://github.com/ecklf/tailwindcss-radix) 47 | - [classnames](https://github.com/JedWatson/classnames) 48 | - [copy-to-clipboard](https://github.com/sudodoki/copy-to-clipboard) 49 | 50 | ## Star History 51 | 52 | [![Star History Chart](https://api.star-history.com/svg?repos=i4o-oss/catalystui&type=Date)](https://star-history.com/#i4o-oss/catalystui&Date) 53 | 54 | ## License 55 | 56 | [MIT](https://choosealicense.com/licenses/mit/) 57 | -------------------------------------------------------------------------------- /docs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: '@catalystui/eslint-config', 3 | } 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | ``` 12 | 13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 14 | 15 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 16 | 17 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 18 | 19 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /docs/components/authors.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react' 2 | 3 | export default function Authors({ 4 | date, 5 | children, 6 | by = 'by', 7 | }: { 8 | date: Date 9 | children: ReactNode | ReactNode[] 10 | by: string 11 | }) { 12 | return ( 13 |
14 | <> 15 | {date} {by} {children} 16 | 17 |
18 | ) 19 | } 20 | 21 | export function Author({ name, link }: { name: string; link: string }) { 22 | return ( 23 | 24 | 31 | {name} 32 | 33 | 34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /docs/components/blog-index.tsx: -------------------------------------------------------------------------------- 1 | import { getPagesUnderRoute } from 'nextra/context' 2 | import type { Page } from 'nextra' 3 | import Link from 'next/link' 4 | 5 | export default function BlogIndex({ more = 'Read more' }) { 6 | const pages: Page[] = getPagesUnderRoute('/blog') 7 | return pages.map((page, index) => { 8 | // @ts-ignore 9 | const frontMatter = page?.frontMatter 10 | return ( 11 |
15 |

16 | 20 | {page.meta?.title || frontMatter?.title || page?.name} 21 | 22 |

23 |

24 | {frontMatter?.description}{' '} 25 | {more + ' →'} 26 |

27 | {frontMatter?.date ? ( 28 |

29 | {frontMatter.date} 30 |

31 | ) : null} 32 |
33 | ) 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /docs/components/component-link.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react' 2 | import Link from 'next/link' 3 | 4 | type ComponentLinkProps = { 5 | children: ReactNode 6 | className?: string 7 | href: string 8 | } 9 | 10 | export default function ComponentLink(props: ComponentLinkProps) { 11 | return ( 12 | 13 |
16 | {props.children} 17 |
18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /docs/components/demo-card.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react' 2 | 3 | type DemoCardProps = { 4 | children: ReactNode 5 | className?: string 6 | } 7 | 8 | export default function DemoCard(props: DemoCardProps) { 9 | return ( 10 |
13 | {props.children} 14 |
15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /docs/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | theme: 'nextra-theme-docs', 5 | themeConfig: './theme.config.js', 6 | } 7 | 8 | const withNextra = require('nextra')(nextConfig) 9 | 10 | module.exports = withNextra() 11 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@catalystui/docs", 3 | "version": "0.1.43-alpha.17", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@i4o/catalystui": "workspace:*", 13 | "@next/font": "13.3.0", 14 | "@radix-ui/react-icons": "^1.3.0", 15 | "next": "13.3.0", 16 | "nextra": "^2.4.0", 17 | "nextra-theme-docs": "^2.4.0", 18 | "react": "^18.2.0", 19 | "react-dom": "18.2.0", 20 | "typescript": "5.0.4" 21 | }, 22 | "devDependencies": { 23 | "@types/node": "18.15.12", 24 | "@types/react": "^18.0.37", 25 | "@types/react-dom": "^18.0.11", 26 | "autoprefixer": "^10.4.14", 27 | "postcss": "^8.4.23", 28 | "tailwindcss": "^3.3.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import '@i4o/catalystui/main.css' 2 | import '../styles/globals.css' 3 | import type { AppProps } from 'next/app' 4 | 5 | export default function App({ Component, pageProps }: AppProps) { 6 | return 7 | } 8 | -------------------------------------------------------------------------------- /docs/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Head, Html, Main, NextScript } from 'next/document' 2 | import Script from 'next/script' 3 | 4 | export default function Document() { 5 | return ( 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 |
17 | 18 |