This commit introduces a growing animation to the NucleoDataCard component.
- The animation is implemented using CSS keyframes and is triggered on hover.
- A smooth transition effect has also been added.
The README.md file has been updated to include information about this new feature under the UI section.
This commit fixes the hover effect in the centralized `NucleoTable.vue` component.
The hover effect was reported as not using the module-specific accent colors.
My investigation confirmed that the dynamic class binding in `NucleoTable.vue` using props for CSS variables and Tailwind's opacity modifiers (e.g., `hover:bg-[var(--accent-color-asistencias)]/10`) was correctly implemented.
The parent components were also passing the `accent-color` prop correctly, and the CSS variables themselves were properly defined in `style.css`.
The issue was likely related to caching or a previous state of the code before the last set of checks and confirmations.
You have re-tested and confirmed that the hover effects now correctly use the appropriate accent color for each module's table.
No code changes were made in this specific step as the existing code was verified to be correct. This ensures the validated state is committed.
This commit introduces a new `NucleoDataCard.vue` component to centralize the common structure and styling of various card elements used throughout the UI. It also includes documentation for this new component.
The following existing card components have been refactored to use `NucleoDataCard.vue`:
- `ui/src/components/asistencias/cardAsistencia.vue`
- `ui/src/components/empleados/cardEmpleado.vue`
- `ui/src/components/planillas/cardPlanilla.vue`
- `ui/src/components/tareas/cardTarea.vue`
Key changes:
- Created `NucleoDataCard.vue` in `ui/src/components/ui/` with flexible props (title, status, fields, accentColor, backgroundColor, avatarUrl, observation, showEditButton, showDeleteButton) and slots (header, body, footer, actions) to accommodate different card designs.
- Updated `NucleoDataCard.vue` to directly use hex color values for `accentColor` and `backgroundColor` props for easier integration with your UI store.
- Refactored the listed existing card components to utilize `NucleoDataCard.vue`, passing data through props and customizing specific sections (like avatars or field icons) via slots.
- Ensured that all functionalities, including edit/delete actions and dynamic styling based on your UI store, are preserved in the refactored components.
- Added `ui/src/components/ui/README.md` with detailed documentation for `NucleoDataCard.vue`, covering its purpose, props, slots, events, and a usage example.
This centralization reduces code duplication, improves maintainability, and provides a consistent foundation for future card-based UI elements. The added documentation will help developers understand and use the new component effectively.
I've created a new reusable table component `NucleoTable.vue` to standardize table implementations across the UI.
Key changes:
- `NucleoTable.vue` (`ui/src/components/ui/NucleoTable.vue`) created with props for columns, items, accent color, and background color name. It supports custom cell rendering and action slots.
- I've implemented basic styling using Tailwind CSS, respecting dynamic accent and background colors from the UI store.
- It declares `editItem` and `deleteItem` events for parent components to handle.
- I've refactored existing table components to use `NucleoTable.vue`:
- `tablaAsistencias.vue`
- `tablaEmpleados.vue`
- `tablaPlanillas.vue`
- `tablaTareas.vue`
- Each refactored table now passes its specific data, column definitions, and styling props to `NucleoTable`. Custom cell rendering and action button logic are maintained using slots, preserving original functionality and styling.
This change reduces code duplication and makes future updates to table structures and styles more manageable. You've confirmed that all tables function and appear as expected after refactoring.
This commit introduces a new `NucleoDataCard.vue` component to centralize the common structure and styling of various card elements used throughout the UI.
The following existing card components have been refactored to use `NucleoDataCard.vue`:
- `ui/src/components/asistencias/cardAsistencia.vue`
- `ui/src/components/empleados/cardEmpleado.vue`
- `ui/src/components/planillas/cardPlanilla.vue`
- `ui/src/components/tareas/cardTarea.vue`
Key changes:
- Created `NucleoDataCard.vue` in `ui/src/components/ui/` with flexible props (title, status, fields, accentColor, backgroundColor, avatarUrl, observation, showEditButton, showDeleteButton) and slots (header, body, footer, actions) to accommodate different card designs.
- Updated `NucleoDataCard.vue` to directly use hex color values for `accentColor` and `backgroundColor` props for easier integration with the UI store.
- Refactored the listed existing card components to utilize `NucleoDataCard.vue`, passing data through props and customizing specific sections (like avatars or field icons) via slots.
- Ensured that all functionalities, including edit/delete actions and dynamic styling based on the UI store, are preserved in the refactored components.
This centralization reduces code duplication, improves maintainability, and provides a consistent foundation for future card-based UI elements.