# @beweco/aurora-ui

Bewe Aurora UI Component Library - A modern, lightweight, and customizable React component library.

## Overview

@beweco/aurora-ui is a React component library designed to provide a consistent and beautiful user interface for Bewe applications. Built with TypeScript for type safety and modern development practices, it uses Storybook as its primary development and visualization environment.

## Installation

```bash
bun install @beweco/aurora-ui
```

## Quick Start

To use the components, you need to wrap your application with the `ThemeProvider` .

```tsx
import { ThemeProvider } from '@beweco/aurora-ui';
import { Button } from '@beweco/aurora-ui';

function App() {
  return (
    <ThemeProvider>
      <Button color="primary">
        Hello Aurora UI!
      </Button>
    </ThemeProvider>
  );
}
```

## Development

### Prerequisites

- Bun (v1.0 or higher)

### Setup

1. Clone the repository:
   ```bash
   git clone <repository-url>
   ```
2. Install dependencies:
   ```bash
   bun install
   ```

### Development with Storybook

This project uses [Storybook](https://storybook.js.org/) for component development and visualization. Storybook provides an isolated environment to build, view, and test components in real-time.

To start the Storybook server, run:
```bash
bun run storybook
```
This will open the Storybook interface in your browser, where you can browse all the available components, see their different states (variants, sizes, etc.), and interact with them.

### Available Scripts

- `bun run storybook` - Starts the Storybook development server.
- `bun run build` - Builds the library for production.
- `bun run dev` - Builds the library and watches for changes.
- `bun run check` - Runs Biome to check for lint issues and apply safe fixes.
- `bun run format` - Formats the entire codebase using Biome.
- `bun run build:storybook` - Builds a static version of the Storybook site.

## Publishing

### Preparing a New Release

1. Update version in `package.json`:
   ```bash
   bun version patch  # for bug fixes (0.0.x)
   bun version minor  # for new features (0.x.0)
   bun version major  # for breaking changes (x.0.0)
   ```

2. Build the library:
   ```bash
   bun run build
   ```


### Publishing to NPM Registry

1. Login to npm (if not already logged in):
   ```bash
   npm login
   ```

2. Publish the package:
   ```bash
   npm publish --access public
   ```
   *Note: Although the project uses `bun`, publishing is typically done via `npm`.*

### Publishing a Beta Version

For testing purposes, you can publish a beta version:

1. Tag the version as beta in `package.json`:
   ```bash
   bun version prerelease --preid=beta
   ```

2. Publish with the beta tag:
   ```bash
   npm publish --tag beta --access public
   ```

Users can then install the beta version using:
```bash
bun install @beweco/aurora-ui@beta
```

## Contributing

We welcome contributions! Please read our contributing guidelines before submitting pull requests.

### Development Workflow

1. Fork the repository.
2. Create a feature branch (`git checkout -b feature/my-new-feature`).
3. Make your changes in the `src` directory. Create or update stories in the `stories` directory.
4. Use `bun run storybook` to visualize your changes.
5. Submit a pull request.

## License

MIT License.

## Support

For support, please open an issue in the repository or contact the Bewe team.