-
Notifications
You must be signed in to change notification settings - Fork 15
chores: repo cleanup + docs + prepublish script for v1.0.0 #172
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
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3c31a84
remove agents files
lawreka 6d6da8e
update readme, changelog, contributing, and development and add v1.0.0
lawreka 36ddde3
add prepublish script
lawreka ac77034
add templates and update docs
lawreka d9b3d2d
clean up common and constants dirs
lawreka 46c8809
move shiki themes and selectors to constants
lawreka 29fe927
clean up code styling and shiki utils
lawreka 32e7245
clean up models dir
lawreka 42058ce
remove noBarrelFile TODOs and ignore rule in config
lawreka 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,28 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| title: '' | ||
| labels: bug | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Describe the bug** | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| **To Reproduce** | ||
| Steps to reproduce the behavior. | ||
|
|
||
| **Expected behavior** | ||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| **Screenshots** | ||
| If applicable, add screenshots to help explain your problem. | ||
|
|
||
| **Device:** | ||
| - OS: [e.g. iOS] | ||
| - Browser [e.g. chrome, safari] | ||
| - Version [e.g. 22] | ||
|
|
||
| **Additional context** | ||
| Add any other context about the problem here. |
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,17 @@ | ||
| --- | ||
| name: Feature request | ||
| about: Suggest an idea for this project | ||
| title: '' | ||
| labels: 'feature request' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Is your feature request related to a problem? Please describe.** | ||
| A description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
|
||
| **Describe the solution you'd like** | ||
| A clear and concise description of what you want to happen. | ||
|
|
||
| **Additional context** | ||
| Add any other context or screenshots about the feature request here. |
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,3 @@ | ||
| ## Summary | ||
|
|
||
| ## Test Plan |
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,30 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| ## [1.0.0] - 2025-01-23 | ||
|
|
||
| ### Initialized components library | ||
|
|
||
| | Component | Description | | ||
| |-----------|-------------| | ||
| | `Accordion` | Expandable content sections | | ||
| | `Badge` | Status and label badges | | ||
| | `Callout` | Highlighted information boxes | | ||
| | `Card` | Content cards | | ||
| | `CodeBlock` | Syntax-highlighted code with copy button | | ||
| | `CodeGroup` | Code blocks container with tabs or dropdown selection | | ||
| | `Columns` | Multi-column layouts | | ||
| | `Expandable` | Collapsible sections | | ||
| | `Frame` | Image and content frames | | ||
| | `Icon` | Icon rendering | | ||
| | `Mermaid` | Diagram rendering | | ||
| | `Panel` | Panel layouts | | ||
| | `Property` | API property display | | ||
| | `Steps` | Step-by-step instructions | | ||
| | `Tabs` | Tabbed interfaces | | ||
| | `Tile` | Tile grids | | ||
| | `Tooltip` | Hover tooltips | | ||
| | `Tree` | Hierarchical tree views | | ||
| | `Update` | Changelog entries | | ||
|
|
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,79 @@ | ||
| # Contributing to Mintlify Components | ||
|
|
||
| Thank you for your interest in contributing to Mintlify Components! This document provides guidelines and information for contributors. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. Fork the repository | ||
| 2. Clone your fork locally | ||
| 3. Follow the setup instructions in [DEVELOPMENT.md](./DEVELOPMENT.md) | ||
|
|
||
| ## Issue Labels | ||
|
|
||
| We use three labels to categorize issues: | ||
|
|
||
| - **bug** - Something isn't working as expected | ||
| - **improvement** - Enhancement to an existing component | ||
| - **feature request** - Request for a new component or capability | ||
|
|
||
| ## How to Contribute | ||
|
|
||
| ### Reporting Bugs | ||
|
|
||
| - Check the [existing issues](https://github.com/mintlify/components/issues) to avoid duplicates | ||
| - [Open a bug report](https://github.com/mintlify/components/issues/new?template=bug_report.md) using the template | ||
| - Include reproduction steps, expected behavior, and actual behavior | ||
| - Add screenshots or code snippets if helpful | ||
|
|
||
| ### Requesting Features or Improvements | ||
|
|
||
| - Check existing issues first to avoid duplicates | ||
| - [Open a feature request](https://github.com/mintlify/components/issues/new?template=feature_request.md) using the template | ||
| - For improvements to existing components, add the `improvement` label | ||
| - Describe the use case and why it would be valuable | ||
|
|
||
| ### Submitting Changes | ||
|
|
||
| 1. Create a new branch from `main` | ||
| 2. Make your changes following our code style guidelines | ||
| 3. Add or update tests and Storybook stories as needed | ||
| 4. Run `pnpm lint:check` to ensure code quality | ||
| 5. Run `pnpm build` to verify the build succeeds | ||
| 6. Submit a pull request | ||
|
|
||
| ### Pull Request Guidelines | ||
|
|
||
| When you open a PR, you'll see a template with sections for Summary and Test Plan. Please fill these out. | ||
|
|
||
| - Keep PRs focused on a single change | ||
| - Write clear commit messages | ||
| - Update documentation if needed | ||
| - Ensure all CI checks pass | ||
|
|
||
| ## Code Style | ||
|
|
||
| - Use TypeScript for all code | ||
| - Follow existing patterns in the codebase | ||
| - Use Tailwind CSS for styling | ||
| - Run `pnpm lint:fix` to auto-format code | ||
|
|
||
| ## Component Guidelines | ||
|
|
||
| When adding or modifying components: | ||
|
|
||
| - Ensure compatibility with React 18 and 19 | ||
| - Support both light and dark themes | ||
| - Make components accessible (ARIA attributes, keyboard navigation) | ||
| - Add Storybook stories documenting usage | ||
| - Export types for TypeScript users | ||
|
|
||
| ## Questions? | ||
|
|
||
| If you have questions, feel free to: | ||
|
|
||
| - Open a [GitHub Discussion](https://github.com/mintlify/components/discussions) | ||
| - Check our [documentation](https://www.mintlify.com/docs/components) | ||
|
|
||
| ## License | ||
|
|
||
| By contributing, you agree that your contributions will be licensed under the MIT License. |
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,106 @@ | ||
| # Development Guide | ||
|
|
||
| This guide covers how to set up and work on Mintlify Components locally. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Node.js](https://nodejs.org/) >= 20.0.0 | ||
| - [pnpm](https://pnpm.io/) >= 10.0.0 | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. Clone the repository: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/mintlify/components.git | ||
| cd components | ||
| ``` | ||
|
|
||
| 2. Install dependencies: | ||
|
|
||
| ```bash | ||
| pnpm install | ||
| ``` | ||
|
|
||
| 3. Set up pre-commit hooks: | ||
|
|
||
| ```bash | ||
| pnpm exec husky install | ||
| ``` | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| ### Building | ||
|
|
||
| Build the component library: | ||
|
|
||
| ```bash | ||
| pnpm build | ||
| ``` | ||
|
|
||
| For development with watch mode: | ||
|
|
||
| ```bash | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| ### Storybook | ||
|
|
||
| Run Storybook to develop and preview components: | ||
|
|
||
| ```bash | ||
| pnpm storybook | ||
| ``` | ||
|
|
||
| This starts a local server at `http://localhost:6006` where you can view and interact with all components. | ||
|
|
||
| Build Storybook for production: | ||
|
|
||
| ```bash | ||
| pnpm build-storybook | ||
| ``` | ||
|
|
||
| ### Linting | ||
|
|
||
| Check code style: | ||
|
|
||
| ```bash | ||
| pnpm lint:check | ||
| ``` | ||
|
|
||
| Fix linting issues automatically: | ||
|
|
||
| ```bash | ||
| pnpm lint:fix | ||
| ``` | ||
|
|
||
| We use [Biome](https://biomejs.dev/) for linting and formatting. The pre-commit hooks will run linting automatically before each commit. | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| packages/ | ||
| └── components/ # Main component package | ||
| ├── src/ | ||
| │ ├── components/ # React components | ||
| │ ├── hooks/ # Custom React hooks | ||
| │ ├── utils/ # Utility functions | ||
| │ └── index.ts # Package entry point | ||
| ├── .storybook/ # Storybook configuration | ||
| └── dist/ # Build output | ||
| ``` | ||
|
|
||
| ## Adding a New Component | ||
|
|
||
| 1. Create a new directory under `packages/components/src/components/` | ||
| 2. Implement the component with TypeScript | ||
| 3. Export it from `packages/components/src/components/index.ts` | ||
| 4. Add a Storybook story for documentation | ||
| 5. Run `pnpm build` to verify the build succeeds | ||
|
|
||
| ## Code Style | ||
|
|
||
| - Use TypeScript for all new code | ||
| - Follow existing patterns in the codebase | ||
| - Components should be compatible with React 18 and 19 | ||
| - Use Tailwind CSS for styling |
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 |
|---|---|---|
| @@ -1,27 +1,63 @@ | ||
| # Mintlify Components | ||
|
|
||
| Mintlify's Open Source UI components | ||
| Open source React UI components for documentation sites, built with Tailwind CSS. | ||
|
|
||
| [](https://www.npmjs.com/package/@mintlify/components) | ||
| [](https://opensource.org/licenses/MIT) | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pnpm install | ||
| npm install @mintlify/components | ||
| # or | ||
| pnpm add @mintlify/components | ||
| # or | ||
| yarn add @mintlify/components | ||
| ``` | ||
|
|
||
| ## Development | ||
| ## Requirements | ||
|
|
||
| ```bash | ||
| pnpm build | ||
| - Node.js >= 20.0.0 | ||
| - React ^18.0.0 or ^19.0.0 | ||
|
|
||
| ## Usage | ||
|
|
||
| Import components and styles in your project: | ||
|
|
||
| ```tsx | ||
| import { Accordion, Callout, CodeBlock, Tabs } from '@mintlify/components'; | ||
| import '@mintlify/components/styles.css'; | ||
| ``` | ||
|
|
||
| Set up the husky pre-commit hooks or run `pnpm lint` before committing | ||
| ### Example | ||
|
|
||
| ## Storybook | ||
| ```tsx | ||
| import { Callout } from '@mintlify/components'; | ||
| import '@mintlify/components/styles.css'; | ||
|
|
||
| ```bash | ||
| pnpm storybook | ||
| function App() { | ||
| return ( | ||
| <Callout type="info" title="Note"> | ||
| This is an informational callout. | ||
| </Callout> | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| ## Components | ||
|
|
||
|
|
||
| ## Documentation | ||
|
|
||
| - [Component Documentation](https://www.mintlify.com/docs/components) | ||
| - [Storybook Examples](https://storybook.mintlify.com) | ||
|
|
||
| ## Contributing | ||
|
|
||
| We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details. | ||
|
|
||
| For local development setup, see [Development](./DEVELOPMENT.md). | ||
|
|
||
| ## License | ||
|
|
||
| MIT | ||
| MIT License - see [LICENSE](./LICENSE) for details. | ||
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.