{"_id":"@bizfirstfi/go-common-components","_rev":"2-47523ab6338fd7af6b1c938f9874e298","name":"@bizfirstfi/go-common-components","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@bizfirstfi/go-common-components","version":"1.0.0","keywords":["react","components","layout","bizfirstfi","bizfirstfi-go","header","footer","menu"],"author":{"name":"BizFirstFi"},"license":"MIT","_id":"@bizfirstfi/go-common-components@1.0.0","maintainers":[{"name":"aswathyraj28official","email":"aswathyraj28official@gmail.com"}],"homepage":"https://github.com/bizfirstfi/go-common-components#readme","bugs":{"url":"https://github.com/bizfirstfi/go-common-components/issues"},"dist":{"shasum":"f0952eed7a1f4d81d9b077c38f72f6d8b20b166b","tarball":"https://registry.npmjs.org/@bizfirstfi/go-common-components/-/go-common-components-1.0.0.tgz","fileCount":24,"integrity":"sha512-WCxRwbsmoSujAN/zBIYNTct1nIjdZZL6AaqN14pIglzd2H70dKuM3kAubSp03BMu2x9kraNOLejUQtOPeGqoiQ==","signatures":[{"sig":"MEYCIQDSZI+EW7l+zxqtn6uX2y3L8IIijbLGbalF4R+QC24ZpwIhALJp1T75xUeN1PbesuUBXeE8L/Vs8+m8IIfbuVhjGtNt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37417},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"791a4b7ef7642228f8d58830a352cdd9919b8b78","scripts":{"test":"echo \"No tests yet\"","build":"rollup -c","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"aswathyraj28official","email":"aswathyraj28official@gmail.com"},"repository":{"url":"git+https://github.com/bizfirstfi/go-common-components.git","type":"git"},"_npmVersion":"11.6.2","description":"Reusable common layout components for BizFirstFi Go applications","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.53.3","typescript":"^5.9.3","@types/react":"^19.2.6","@types/react-dom":"^19.2.3","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-router-dom":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/go-common-components_1.0.0_1763676470856_0.8654472343049004","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bizfirstfi/go-common-components","version":"1.0.1","description":"Reusable common layout components for BizFirstFi Go applications","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","prepare":"npm run build","test":"echo \"No tests yet\"","prepublishOnly":"npm run build"},"keywords":["react","components","layout","bizfirstfi","bizfirstfi-go","header","footer","menu"],"author":{"name":"BizFirstFi"},"license":"MIT","peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-router-dom":"^6.0.0"},"repository":{"type":"git","url":"git+https://github.com/bizfirstfi/go-common-components.git"},"publishConfig":{"access":"public"},"devDependencies":{"@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.3","@rollup/plugin-typescript":"^12.3.0","@types/react":"^19.2.6","@types/react-dom":"^19.2.3","rollup":"^4.53.3","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","tslib":"^2.8.1","typescript":"^5.9.3"},"gitHead":"b80b4c0ac18c2a7c4c8d16bf39425d5916f84799","_id":"@bizfirstfi/go-common-components@1.0.1","bugs":{"url":"https://github.com/bizfirstfi/go-common-components/issues"},"homepage":"https://github.com/bizfirstfi/go-common-components#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-UTK1tP3GxdjrcRPr9xQx+E8vxTj0PUY7FJtvxxwZMkhlCRUpjIg7uCeuIv4mtNoULNILgis7TYyM/9De5V7Kfg==","shasum":"b8c52e24ca18d1b21bb6907c0778347d700a4c93","tarball":"https://registry.npmjs.org/@bizfirstfi/go-common-components/-/go-common-components-1.0.1.tgz","fileCount":24,"unpackedSize":37417,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHpiwWYkd7qQe6c1ifLR8o9ULERc1bgZ3iFWZE2HjO7cAiB58Z+5HD8gmqOgo7LzytCvzj8xY/kvxfrr6ViTGIcmcA=="}]},"_npmUser":{"name":"aswathyraj28official","email":"aswathyraj28official@gmail.com"},"directories":{},"maintainers":[{"name":"aswathyraj28official","email":"aswathyraj28official@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/go-common-components_1.0.1_1763678166714_0.3015437736575908"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-20T22:07:50.805Z","modified":"2025-11-20T22:36:07.127Z","1.0.0":"2025-11-20T22:07:51.065Z","1.0.1":"2025-11-20T22:36:06.904Z"},"bugs":{"url":"https://github.com/bizfirstfi/go-common-components/issues"},"author":{"name":"BizFirstFi"},"license":"MIT","homepage":"https://github.com/bizfirstfi/go-common-components#readme","keywords":["react","components","layout","bizfirstfi","bizfirstfi-go","header","footer","menu"],"repository":{"type":"git","url":"git+https://github.com/bizfirstfi/go-common-components.git"},"description":"Reusable common layout components for BizFirstFi Go applications","maintainers":[{"name":"aswathyraj28official","email":"aswathyraj28official@gmail.com"}],"readme":"# @bizfirstfi/go-common-components\r\n\r\nReusable common layout components for BizFirstFi Go applications.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @bizfirstfi/go-common-components react react-router-dom\r\n```\r\n\r\n## Components\r\n\r\n### Header\r\nNavigation header with user authentication and sidebar toggle functionality.\r\n\r\n**Props:**\r\n- `onToggleSidebar: () => void` - Callback function to toggle sidebar\r\n- `user?: { name?: string } | null` - User object with name property (optional)\r\n- `onLogout?: () => Promise<void>` - Callback function to handle logout (optional)\r\n\r\n### Footer\r\nApplication footer with copyright information and version display.\r\n\r\n**Props:** None\r\n\r\n### LeftMenu\r\nSidebar navigation menu with route-based active states.\r\n\r\n**Props:**\r\n- `menuItems?: MenuItem[]` - Array of menu items (optional, uses default menu if not provided)\r\n\r\n**MenuItem Interface:**\r\n```typescript\r\ninterface MenuItem {\r\n  path: string;\r\n  label: string;\r\n  icon: string; // Font Awesome class name\r\n}\r\n```\r\n\r\n## Usage\r\n\r\n### Basic Example\r\n\r\n```tsx\r\nimport { Header, Footer, LeftMenu } from '@bizfirstfi/go-common-components';\r\nimport '@bizfirstfi/go-common-components/dist/index.css';\r\n\r\nfunction App() {\r\n  const [user, setUser] = React.useState({ name: 'John Doe' });\r\n\r\n  const handleToggleSidebar = () => {\r\n    // Your sidebar toggle logic\r\n  };\r\n\r\n  const handleLogout = async () => {\r\n    // Your logout logic\r\n    await logout();\r\n  };\r\n\r\n  return (\r\n    <>\r\n      <Header\r\n        onToggleSidebar={handleToggleSidebar}\r\n        user={user}\r\n        onLogout={handleLogout}\r\n      />\r\n      <LeftMenu />\r\n      <Footer />\r\n    </>\r\n  );\r\n}\r\n```\r\n\r\n### Custom Menu Items\r\n\r\n```tsx\r\nimport { LeftMenu } from '@bizfirstfi/go-common-components';\r\n\r\nconst customMenuItems = [\r\n  { path: '/', label: 'Home', icon: 'fas fa-home' },\r\n  { path: '/dashboard', label: 'Dashboard', icon: 'fas fa-chart-line' },\r\n  { path: '/settings', label: 'Settings', icon: 'fas fa-cog' },\r\n];\r\n\r\n<LeftMenu menuItems={customMenuItems} />\r\n```\r\n\r\n## TypeScript Support\r\n\r\nThis package includes TypeScript definitions out of the box.\r\n\r\n```typescript\r\nimport type {\r\n  AuthContextType,\r\n  HeaderProps,\r\n  MenuItem,\r\n  LeftMenuProps\r\n} from '@bizfirstfi/go-common-components';\r\n```\r\n\r\n## Styling\r\n\r\nThe package includes CSS that needs to be imported in your application:\r\n\r\n```tsx\r\nimport '@bizfirstfi/go-common-components/dist/index.css';\r\n```\r\n\r\n### Requirements\r\n\r\nThe components are designed to work with:\r\n- **AdminLTE** - For base styling (optional but recommended)\r\n- **Font Awesome** - For icons\r\n- **Bootstrap** - For utility classes\r\n\r\nIf you're not using AdminLTE, you may need to provide your own styles for classes like:\r\n- `.main-header`, `.navbar`, `.navbar-primary`\r\n- `.main-footer`\r\n- `.nav`, `.nav-sidebar`, `.nav-link`\r\n\r\n## Requirements\r\n\r\n### Peer Dependencies\r\n\r\n- `react` ^18.0.0\r\n- `react-dom` ^18.0.0\r\n- `react-router-dom` ^6.0.0\r\n\r\n## Default Menu Items\r\n\r\nThe LeftMenu component comes with the following default menu items:\r\n\r\n- Dashboard\r\n- Countries\r\n- Currencies\r\n- Languages\r\n- Time Zones\r\n- Locations\r\n- Location Types\r\n- Business Entity Types\r\n- Date Formats\r\n- Note Types\r\n- Priority Levels\r\n- Severities\r\n\r\nYou can override these by passing your own `menuItems` prop.\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Contributing\r\n\r\nIssues and pull requests are welcome!\r\n\r\n## Support\r\n\r\nFor support, please contact the BizFirstFi development team.\r\n","readmeFilename":"README.md"}