# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})
# CE Component Building Block

This project is a React component library built with TypeScript and Vite, designed for Cleanearth UI development. It provides a collection of reusable, customizable UI components and utilities, along with Storybook documentation and modern tooling.

## What's Included

- **Component Library**  
  A wide range of reusable React components, including:
  - Buttons, Inputs, Checkboxes, Radio Buttons, Drawers, Snackbars, Steppers, Dialogs, Data Grids, Date/Time Pickers, Pagination, Tabs, Menus, Avatars, Notification Buttons, Search Bars, and more.
  - All components are exported from [`src/index.ts`](src/index.ts) for easy consumption.

- **Styling**  
  - Centralized CSS variables and typography in [`src/ceuistyles.css`](src/ceuistyles.css)
  - Component-specific styles in [`src/App.css`](src/App.css) and other CSS files.

- **Assets**  
  - SVG logos and images in [`public/`](public/) and [`src/stories/assets/`](src/stories/assets/).

- **Storybook Integration**  
  - Interactive documentation and playground for all components.
  - Custom Storybook configuration in [`.storybook/`](.storybook/).

- **Testing & Linting**  
  - ESLint configuration for code quality ([`eslint.config.js`](eslint.config.js))
  - Prettier for code formatting ([`prettierrc.json`](prettierrc.json))

- **Build & Tooling**  
  - Vite for fast development and builds ([`vite.config.ts`](vite.config.ts))
  - TypeScript configuration ([`tsconfig.json`](tsconfig.json), [`tsconfig.app.json`](tsconfig.app.json), [`tsconfig.node.json`](tsconfig.node.json))
  - Scripts for development, build, linting, and Storybook in [`package.json`](package.json)

- **Documentation**  
  - Project usage and configuration guides in [`README.md`](README.md)


For more details, see the individual files and Storybook documentation.
```

## Component Docs

- Generate docs:
  - npm run docs:generate
- View docs:
  - Open docs/index.html directly in your browser
  - On Windows: file:///C:/CEBuildingBlocks/CE%20Building%20Blocks/docs/index.html
- Structure:
  - docs/index.html – component index
  - docs/components/*.html – individual component pages

