Migración a shadcn-vue + Tailwind CSS v4
- Tailwind CSS v4 con @tailwindcss/vite - shadcn-vue: 19 componentes UI (button, card, dialog, table, select, tabs, sidebar, separator, breadcrumb, badge, avatar, dropdown-menu, tooltip, input, switch, sheet, skeleton) - Sidebar collapsible con íconos Lucide - Theme Teloprax en CSS variables (rojo #E63946, negro #1A1A2E) - LoginView, DashboardView, CalendarView, SchedulerView migrados - Eliminado AppShell.vue manual (reemplazado por SidebarProvider) - Layout con breadcrumb, sidebar trigger, header unificado
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import {
|
||||
LayoutDashboard,
|
||||
Calendar,
|
||||
Clock,
|
||||
type Component,
|
||||
} from 'lucide-vue-next'
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
SidebarFooter,
|
||||
SidebarHeader,
|
||||
SidebarRail,
|
||||
} from '@/components/ui/sidebar'
|
||||
import NavMain from './NavMain.vue'
|
||||
import NavProjects from './NavProjects.vue'
|
||||
import NavUser from './NavUser.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
activeTab: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:activeTab': [value: string]
|
||||
}>()
|
||||
|
||||
function setTab(tab: string) {
|
||||
emit('update:activeTab', tab)
|
||||
}
|
||||
|
||||
const mainItems = computed(() => [
|
||||
{
|
||||
title: 'Diagnóstico',
|
||||
icon: LayoutDashboard,
|
||||
isActive: props.activeTab === 'dashboard',
|
||||
onClick: () => setTab('dashboard'),
|
||||
},
|
||||
{
|
||||
title: 'Calendario',
|
||||
icon: Calendar,
|
||||
isActive: props.activeTab === 'calendar',
|
||||
onClick: () => setTab('calendar'),
|
||||
},
|
||||
{
|
||||
title: 'Recetas',
|
||||
icon: Clock,
|
||||
isActive: props.activeTab === 'scheduler',
|
||||
onClick: () => setTab('scheduler'),
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Sidebar collapsible="icon">
|
||||
<SidebarHeader>
|
||||
<div class="flex items-center gap-2 px-2 py-1 group-data-[collapsible=icon]:justify-center">
|
||||
<div class="flex items-center gap-1.5 flex-shrink-0">
|
||||
<span class="block rounded-full border-2 border-primary opacity-35 w-2 h-2" />
|
||||
<span class="block rounded-full border-2 border-primary opacity-65 w-[11px] h-[11px]" />
|
||||
<span class="block rounded-full bg-primary w-[14px] h-[14px]" />
|
||||
</div>
|
||||
<div class="group-data-[collapsible=icon]:hidden flex flex-col min-w-0">
|
||||
<span class="font-display font-bold text-base leading-tight">teloprax</span>
|
||||
<span class="text-[10px] text-muted-foreground leading-tight">Tecnología con prescripción</span>
|
||||
</div>
|
||||
</div>
|
||||
</SidebarHeader>
|
||||
|
||||
<SidebarContent>
|
||||
<NavMain :items="mainItems" label="Navegación" />
|
||||
<NavProjects />
|
||||
</SidebarContent>
|
||||
|
||||
<SidebarFooter>
|
||||
<NavUser />
|
||||
</SidebarFooter>
|
||||
<SidebarRail />
|
||||
</Sidebar>
|
||||
</template>
|
||||
Reference in New Issue
Block a user