open-index/open-npm huggingface dataset:
npm package: @saumyaswain/dev-platform-ui
Description: A premium React component library for the Dev Platform.
Latest version: 1.0.3

# @saumyaswain/dev-platform-ui

A premium React component library for the Dev Platform.

## Installation

```bash
npm install @saumyaswain/dev-platform-ui
```

## Usage

```tsx
import { Navbar, Button, TextField } from '@saumyaswain/dev-platform-ui';
import '@saumyaswain/dev-platform-ui/dist/dev-platform-ui.css';

function App() {
  return (
    <Navbar
      brand="My App"
      variant="dark"
      user={{ name: 'John' }}
      onLogout={() => console.log('logout')}
    />
  );
}
```

## Development

```bash
# Install dependencies
npm install

# Run Storybook
npm run storybook

# Build library
npm run build:lib

# Generate types
npm run build:types
```

## Component Structure

```
src/components/
├── atoms/           # Smallest pieces (Button, TextField)
├── molecules/       # Small groups (SearchBar, InputGroup)
├── organisms/       # Big sections (Navbar, Header)
└── pages/           # Full screens (Dashboard)
```

---

## Publishing to npm

### Prerequisites

1. Have an npm account at [npmjs.com](https://www.npmjs.com)
2. Be logged in: `npm login`

### Step-by-Step Publishing

```bash
# 1. Make sure all changes are committed
git add .
git commit -m "your commit message"

# 2. Bump version (choose one)
npm version patch   # 1.0.0 → 1.0.1 (bug fixes)
npm version minor   # 1.0.0 → 1.1.0 (new features)
npm version major   # 1.0.0 → 2.0.0 (breaking changes)

# 3. Build the library
npm run build:lib
npm run build:types

# 4. Publish to npm
npm publish --access public

# 5. Push changes and tags to GitHub
git push origin main --tags
```

### Quick One-Liner

```bash
git add . && git commit -m "feat: add new component" && npm version patch && npm run build:lib && npm run build:types && npm publish --access public && git push origin main --tags
```

### Testing Locally Before Publishing

```bash
# Create a tarball
npm pack

# Install in another project to test
cd /path/to/other-project
npm install /path/to/saumyaswain-dev-platform-ui-1.0.1.tgz
```

### CI/CD Publishing (Recommended)

1. Create npm automation token at [npm tokens](https://www.npmjs.com/settings/saumyaswain/tokens)
2. Add to GitHub repo as secret `NPM_TOKEN`
3. Tag and push to auto-publish:

```bash
git tag v1.0.1
git push --tags
```

---

## Available Components

| Component | Import | Description |
|-----------|--------|-------------|
| `Navbar` | `import { Navbar }` | Premium navigation bar |
| `Button` | `import { Button }` | Styled button component |
| `TextField` | `import { TextField }` | Input field component |