@ncmh/heart-ui
v1.0.0
Published
Shared Vue 3 UI Components
Readme
@ncmh/heart-ui
National Center for Mental Health - Digitalization Project (NDP)
Overview
This is the shared Vue 3 UI Components Library for the HEART and HEAL applications developed by the National Center for Mental Health (NCMH) Information Systems team. This package contains reusable components, hooks, styles, and utilities.
📜 License & Author
MIT © 2025 National Center for Mental Health
👤 Francis San Pablo Crisostomo
🚀 DevOps Engineer
📧 Email: [email protected]
📦 Package Structure
heart-ui/
│
├── dist/
│ ├── assets/
│ │ └── logo.png
│ ├── components/
│ │ └── PrimaryButton.vue
│ │ └── SecondaryButton.vue
│ ├── hooks/
│ │ └── useGeneralHooks.js
│ ├── styles/
│ │ └── index.css
│ ├── utils/
│ │ └── actionUtils.js
│ └── index.js
│
├── .npmrc
├── package.json
└── README.md🧩 Installation
To use heart-ui in any Laravel app (e.g., heart-app or heal-app), follow these steps:
npm i @ncmh/heart-ui🔁 Use
npm i @ncmh/[email protected]if you want to use specific version.
🛠 Usage
Ensure you’ve structured your components inside components/ folder using PascalCase filenames.
Manual import
<script setup>
import { PrimaryButton, SecondaryButton } from '@ncmh/heart-ui';
</script>
<template>
<PrimaryButton label="Click Me" />
<ScondaryButton label="Click Me" />
</template>🎨 Styles
If your components depend on shared styles, import the base stylesheet once in your main entry file (app.js or main.js):
import '@ncmh/heart-ui/dist/styles/index.css';🛠 Development
To develop or test components in this repo:
npm install
npm run dev📤 Publishing to Nexus (Maintainer Only)
- Update version in
package.json - Ensure
.npmrcis configured - Publish:
npm publish --access publicEnsure this is in your heart-ui/.npmrc:
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=npm_xxxxxxxxMake sure your heart-ui/package.json includes:
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}📈 Changelog
0.1.0
- Initial release
- Includes all Vue components in
components/ - Added reusable hooks, styles, and utilities.
- CSS included via
styles/index.css
🤝 Contributing
- Fork or clone the repo
- Add your component in
components/ - Import styles in
styles/index.cssif needed - Run
npm run devto preview locally - Create a merge request
© 2025 National Center for Mental Health
Maintainer: Francis S. Crisostomo
