@adiba-banking-cloud-tt/backoffice
v0.0.32
Published
An ADIBA component library for backoffice and dashboard applications
Readme
Backoffice Console Library
A React component library for building modern backoffice applications. This library provides a set of reusable components and utilities designed specifically for backoffice interfaces.
Features
- Modern React components built with TypeScript
- Storybook documentation and component playground
- Built with Mantine UI framework
- Drag and drop functionality with @hello-pangea/dnd
- Chart components with Highcharts integration
- Customizable theme support
- Responsive design components
Components
Charts
- Area Charts: Interactive area charts with customizable colors and gradients
- Column Charts: Bar and column charts with rounded corners and customizable styling
- Donut Charts: Circular charts with customizable inner radius and labels
- Pie Charts: Circular charts with customizable segments and labels
- Heatmap: Data visualization with color gradients and interactive tooltips
- Features:
- Customizable colors and themes
- Interactive tooltips
- Legend support
- Responsive design
- Export functionality
- Mouse tracking
- Customizable grid lines and labels
Drag and Drop
- Kanban Board:
- Drag and drop columns and cards
- Customizable card content
- Column reordering
- Card status management
Menus
- Side Navigation:
- Collapsible sidebar
- Nested menu items
- Custom icons support
- Active state management
- User Menu:
- User profile information
- Quick actions
- Customizable dropdown
- Application Menu:
- Application switching
- Recent applications
- Favorites management
- Notification Menu:
- Real-time notifications
- Notification grouping
- Read/unread states
- Settings Menu:
- Quick settings access
- Theme customization
- User preferences
Installation
# Install the library
npm install backoffice-console-library
# Install required peer dependencies
npm install react@^18.3.1
# Install required dependencies
npm install @mantine/core@^7.12.2 @mantine/hooks@^7.12.2 @hello-pangea/dnd@^16.5.0 highcharts-react-official@^3.2.2 highcharts-rounded-corners@^1.0.7 iconsax-react@^0.0.8 @fontsource/poppins@^5.1.0Or install everything at once:
npm install backoffice-console-library react@^18.3.1 @mantine/core@^7.12.2 @mantine/hooks@^7.12.2 @hello-pangea/dnd@^16.5.0 highcharts-react-official@^3.2.2 highcharts-rounded-corners@^1.0.7 iconsax-react@^0.0.8 @fontsource/poppins@^5.1.0Peer Dependencies
This library requires React 18.3.1 or higher as a peer dependency.
Usage
import { ComponentName } from 'backoffice-console-library';
function App() {
return (
<ComponentName>
{/* Your content here */}
</ComponentName>
);
}Development
Prerequisites
- Node.js (Latest LTS version recommended)
- npm or yarn
Setup
- Clone the repository
- Install dependencies:
npm installAvailable Scripts
npm run rollup- Build the library using Rollupnpm run storybook- Start Storybook development servernpm run build-storybook- Build Storybook for productionnpm run tsc- Run TypeScript compilernpm run deploy- Build and publish to npm
Development Workflow
- Make your changes in the
srcdirectory - Test your components using Storybook
- Build the library using
npm run rollup - Deploy using
npm run deploy
Publishing to npm
Prerequisites
- An npm account (create one at https://www.npmjs.com/signup)
- npm CLI installed globally (
npm install -g npm) - Logged in to npm (
npm login)
Publishing Steps
Prepare Your Package
# Ensure all changes are committed git add . git commit -m "Prepare for release"Build the Package
# Build the library npm run rollupUpdate Version
# Update version (patch, minor, or major) npm version patch # for bug fixes # OR npm version minor # for new features # OR npm version major # for breaking changesPublish to npm
npm publish
Automated Publishing
The package includes a deploy script that automates the publishing process:
npm run deployThis script will:
- Stage and commit changes
- Build the library
- Increment the patch version
- Publish to npm
Version Management
- Use
npm version patchfor bug fixes (1.0.x) - Use
npm version minorfor new features (1.x.0) - Use
npm version majorfor breaking changes (x.0.0)
Publishing Checklist
Before publishing, ensure:
- All tests pass
- Documentation is up to date
- Version number is correct
- All dependencies are properly listed
- Build output is correct
- No sensitive information is included
Troubleshooting
- If you get a 403 error, ensure you're logged in (
npm login) - If you get a 404 error, check if the package name is available
- If you get a version conflict, ensure you're not trying to publish an existing version
Project Structure
backoffice-console-library/
├── src/
│ ├── components/ # React components
│ └── index.ts # Main entry point
├── .storybook/ # Storybook configuration
├── dist/ # Build output
└── package.json # Project configurationDependencies
Required Dependencies
react(^18.3.1) - Peer dependency@mantine/core(^7.12.2) - UI framework@mantine/hooks(^7.12.2) - UI hooks@hello-pangea/dnd(^16.5.0) - Drag and drop functionalityhighcharts-react-official(^3.2.2) - Chart componentshighcharts-rounded-corners(^1.0.7) - Chart stylingiconsax-react(^0.0.8) - Icon components@fontsource/poppins(^5.1.0) - Font family
Development Dependencies
typescript(^5.6.2) - TypeScript supportrollup(^3.29.5) - Module bundler@rollup/plugin-typescript(^11.1.6) - TypeScript plugin for Rollup@rollup/plugin-commonjs(^26.0.1) - CommonJS plugin for Rollup@rollup/plugin-node-resolve(^15.2.3) - Node resolution plugin for Rollup@rollup/plugin-terser(^0.4.4) - Minification plugin for Rollupstorybook(^8.3.2) - Component documentation and testingjest(^29.7.0) - Testing framework@testing-library/react(^16.0.1) - React testing utilities@babel/core(^7.25.2) - JavaScript compiler@babel/preset-react(^7.24.7) - React preset for Babel@babel/preset-typescript(^7.24.7) - TypeScript preset for Babel
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the ISC License.
Support
For support, please open an issue in the repository.
