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:
2026-05-22 22:15:19 -05:00
parent 66fd4e175a
commit c0b983e016
146 changed files with 4769 additions and 842 deletions
+59
View File
@@ -0,0 +1,59 @@
<script setup lang="ts">
import { useAuthStore } from '@/stores/auth'
import { ChevronsUpDown, LogOut } from 'lucide-vue-next'
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
import {
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
useSidebar,
} from '@/components/ui/sidebar'
const auth = useAuthStore()
const { isMobile } = useSidebar()
const initials = (auth.user?.name || 'U').split(' ').map(n => n[0]).join('').slice(0, 2).toUpperCase()
</script>
<template>
<SidebarMenu>
<SidebarMenuItem>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<SidebarMenuButton
size="lg"
class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
>
<Avatar class="h-8 w-8 rounded-lg">
<AvatarFallback class="rounded-lg bg-primary text-primary-foreground text-xs">
{{ initials }}
</AvatarFallback>
</Avatar>
<div class="grid flex-1 text-left text-sm leading-tight">
<span class="truncate font-semibold">{{ auth.user?.name || 'Usuario' }}</span>
<span class="truncate text-xs text-muted-foreground">{{ auth.user?.email }}</span>
</div>
<ChevronsUpDown class="ml-auto size-4" />
</SidebarMenuButton>
</DropdownMenuTrigger>
<DropdownMenuContent
class="w-[--reka-dropdown-menu-trigger-width] min-w-56 rounded-lg"
:side="isMobile ? 'bottom' : 'right'"
:align="'end'"
:side-offset="4"
>
<DropdownMenuItem class="gap-2 text-muted-foreground" @click="auth.logout()">
<LogOut class="size-4" />
Cerrar sesión
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>
</SidebarMenu>
</template>