Cambio de estilo
This commit is contained in:
parent
43a6b24ccb
commit
8b5678da5a
@ -21,32 +21,32 @@ export function PageHeader({
|
|||||||
className,
|
className,
|
||||||
}: PageHeaderProps) {
|
}: PageHeaderProps) {
|
||||||
return (
|
return (
|
||||||
<div className={cn("pt-6 pb-6 lg:flex lg:items-center lg:justify-between", className)}>
|
<div className={cn("pt-6 pb-4 lg:flex lg:items-center lg:justify-between", className)}>
|
||||||
{/* Lado izquierdo */}
|
{/* Lado izquierdo */}
|
||||||
<div className='min-w-0 flex-1'>
|
<div className="min-w-0 flex-1">
|
||||||
<div className='flex items-start gap-4'>
|
<div className="flex items-start gap-4">
|
||||||
{backIcon && (
|
{backIcon && (
|
||||||
<Button
|
<Button
|
||||||
variant='ghost'
|
className="cursor-pointer"
|
||||||
size='icon'
|
|
||||||
className='cursor-pointer'
|
|
||||||
onClick={() => window.history.back()}
|
onClick={() => window.history.back()}
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
>
|
>
|
||||||
<ChevronLeftIcon className='size-5' />
|
<ChevronLeftIcon className="size-5" />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 className='h-8 text-xl font-semibold text-foreground sm:truncate sm:tracking-tight'>
|
<h2 className="h-8 text-xl font-semibold text-foreground sm:truncate sm:tracking-tight">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{description && <p className='text-sm text-muted-foreground'>{description}</p>}
|
{description && <p className="text-sm text-primary">{description}</p>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Lado derecho parametrizable */}
|
{/* Lado derecho parametrizable */}
|
||||||
<div className='mt-4 flex lg:mt-0 lg:ml-4'>{rightSlot}</div>
|
<div className="mt-4 flex lg:mt-0 lg:ml-4">{rightSlot}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ export const AppContent = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn("app-content flex flex-1 flex-col gap-4 p-4 pt-6 min-h-screen", className)}
|
className={cn("app-content flex flex-1 flex-col gap-4 p-4 pt-6 min-h-screen", className)}
|
||||||
style={{ backgroundColor: "#fdfdfd" }}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { cn } from "@repo/shadcn-ui/lib/utils";
|
import { cn } from "@repo/shadcn-ui/lib/utils";
|
||||||
import { PropsWithChildren } from "react";
|
import type { PropsWithChildren } from "react";
|
||||||
|
|
||||||
export const AppHeader = ({
|
export const AppHeader = ({
|
||||||
className,
|
className,
|
||||||
@ -7,7 +7,14 @@ export const AppHeader = ({
|
|||||||
...props
|
...props
|
||||||
}: PropsWithChildren<{ className?: string }>) => {
|
}: PropsWithChildren<{ className?: string }>) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn("app-header gap-4 px-4 pt-0 border-b bg-background", className)} {...props}>
|
<div
|
||||||
|
className={cn(
|
||||||
|
"md:rounded-tl-xl md:rounded-tr-xl",
|
||||||
|
"app-header gap-4 px-4 pt-0 border-b border-sidebar/25 bg-background",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export const AppLayout = () => {
|
|||||||
>
|
>
|
||||||
<AppSidebar variant="inset" />
|
<AppSidebar variant="inset" />
|
||||||
{/* Aquí está el MAIN */}
|
{/* Aquí está el MAIN */}
|
||||||
<SidebarInset className="app-main">
|
<SidebarInset className="app-main bg-white">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</SidebarInset>
|
</SidebarInset>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
|
|||||||
@ -6,11 +6,9 @@ import {
|
|||||||
SidebarRail,
|
SidebarRail,
|
||||||
} from "@repo/shadcn-ui/components";
|
} from "@repo/shadcn-ui/components";
|
||||||
import {
|
import {
|
||||||
AudioWaveform,
|
|
||||||
BarChartIcon,
|
BarChartIcon,
|
||||||
CameraIcon,
|
CameraIcon,
|
||||||
ClipboardListIcon,
|
ClipboardListIcon,
|
||||||
Command,
|
|
||||||
DatabaseIcon,
|
DatabaseIcon,
|
||||||
FileCheckIcon,
|
FileCheckIcon,
|
||||||
FileCodeIcon,
|
FileCodeIcon,
|
||||||
@ -20,7 +18,6 @@ import {
|
|||||||
Frame,
|
Frame,
|
||||||
GalleryVerticalEnd,
|
GalleryVerticalEnd,
|
||||||
HelpCircleIcon,
|
HelpCircleIcon,
|
||||||
HomeIcon,
|
|
||||||
LayoutDashboardIcon,
|
LayoutDashboardIcon,
|
||||||
ListIcon,
|
ListIcon,
|
||||||
MapIcon,
|
MapIcon,
|
||||||
@ -161,24 +158,14 @@ const data2 = {
|
|||||||
logo: GalleryVerticalEnd,
|
logo: GalleryVerticalEnd,
|
||||||
plan: "Enterprise",
|
plan: "Enterprise",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "Acme Corp.",
|
|
||||||
logo: AudioWaveform,
|
|
||||||
plan: "Startup",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Evil Corp.",
|
|
||||||
logo: Command,
|
|
||||||
plan: "Free",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
navMain: [
|
navMain: [
|
||||||
{
|
/*{
|
||||||
title: "Inicio",
|
title: "Inicio",
|
||||||
url: "/",
|
url: "/",
|
||||||
icon: HomeIcon,
|
icon: HomeIcon,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
},
|
},*/
|
||||||
{
|
{
|
||||||
title: "Clientes",
|
title: "Clientes",
|
||||||
icon: UsersIcon,
|
icon: UsersIcon,
|
||||||
@ -188,10 +175,10 @@ const data2 = {
|
|||||||
title: "Listado de clientes",
|
title: "Listado de clientes",
|
||||||
url: "/customers",
|
url: "/customers",
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
title: "Añadir un cliente",
|
title: "Añadir un cliente",
|
||||||
url: "/customers/create",
|
url: "/customers/create",
|
||||||
},
|
},*/
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -202,10 +189,10 @@ const data2 = {
|
|||||||
title: "Listado de proformas",
|
title: "Listado de proformas",
|
||||||
url: "/proformas",
|
url: "/proformas",
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
title: "Enviar a Veri*Factu",
|
title: "Enviar a Veri*Factu",
|
||||||
url: "#",
|
url: "#",
|
||||||
},
|
},*/
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
import { ChevronRightIcon, type LucideIcon, PlusCircleIcon } from "lucide-react";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Collapsible,
|
Collapsible,
|
||||||
CollapsibleContent,
|
CollapsibleContent,
|
||||||
@ -13,6 +11,7 @@ import {
|
|||||||
SidebarMenuSubButton,
|
SidebarMenuSubButton,
|
||||||
SidebarMenuSubItem,
|
SidebarMenuSubItem,
|
||||||
} from "@repo/shadcn-ui/components";
|
} from "@repo/shadcn-ui/components";
|
||||||
|
import { ChevronRightIcon, type LucideIcon, PlusCircleIcon } from "lucide-react";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
|
|
||||||
type NavMainItem = {
|
type NavMainItem = {
|
||||||
@ -26,21 +25,17 @@ type NavMainItem = {
|
|||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export function NavMain({
|
export function NavMain({ items }: { items: NavMainItem[] }) {
|
||||||
items,
|
|
||||||
}: {
|
|
||||||
items: NavMainItem[];
|
|
||||||
}) {
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarGroup>
|
<SidebarGroup>
|
||||||
<SidebarGroupContent className='flex flex-col gap-2'>
|
<SidebarGroupContent className="flex flex-col gap-2">
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
<SidebarMenuItem className='flex items-center gap-2'>
|
<SidebarMenuItem className="flex items-center gap-2">
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
tooltip='Quick Create'
|
className="hidden min-w-8 bg-primary text-primary-foreground duration-200 ease-linear hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground"
|
||||||
className='min-w-8 bg-primary text-primary-foreground duration-200 ease-linear hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground'
|
tooltip="Quick Create"
|
||||||
>
|
>
|
||||||
<PlusCircleIcon />
|
<PlusCircleIcon />
|
||||||
<span>Quick Create</span>
|
<span>Quick Create</span>
|
||||||
@ -49,13 +44,13 @@ export function NavMain({
|
|||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
{items.map((item) => (
|
{items.map((item) => (
|
||||||
<Collapsible key={item.title} asChild defaultOpen={true} className='group/collapsible'>
|
<Collapsible asChild className="group/collapsible" defaultOpen={true} key={item.title}>
|
||||||
<SidebarMenuItem className='mb-6'>
|
<SidebarMenuItem className="mb-6">
|
||||||
<CollapsibleTrigger asChild>
|
<CollapsibleTrigger asChild>
|
||||||
<SidebarMenuButton tooltip={item.title}>
|
<SidebarMenuButton tooltip={item.title}>
|
||||||
{item.icon && <item.icon />}
|
{item.icon && <item.icon />}
|
||||||
<span className='font-semibold'>{item.title}</span>
|
<span className="font-semibold">{item.title}</span>
|
||||||
<ChevronRightIcon className='ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90' />
|
<ChevronRightIcon className="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</CollapsibleTrigger>
|
</CollapsibleTrigger>
|
||||||
<CollapsibleContent>
|
<CollapsibleContent>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { useTranslation } from "@repo/rdx-ui/locales/i18n.ts";
|
import { useTranslation } from "@repo/rdx-ui/locales/i18n.ts";
|
||||||
import { JSX } from "react";
|
import type { JSX } from "react";
|
||||||
|
|
||||||
import { LoadingIndicator } from "./loading-indicator.tsx";
|
import { LoadingIndicator } from "./loading-indicator.tsx";
|
||||||
|
|
||||||
export type LoadingOverlayProps = {
|
export type LoadingOverlayProps = {
|
||||||
@ -31,7 +32,7 @@ export const LoadingOverlay = ({ title, subtitle, ...props }: LoadingOverlayProp
|
|||||||
}
|
}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<LoadingIndicator look='dark' title={loadingTitle} subtitle={loadingSubtitle} />
|
<LoadingIndicator look="dark" subtitle={loadingSubtitle} title={loadingTitle} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user