주요 기능: - 품목 CRUD 기능 (생성, 조회, 수정) - 품목 마스터 데이터 관리 시스템 - BOM(Bill of Materials) 관리 기능 - 도면 캔버스 기능 - 품목 속성 및 카테고리 관리 - 스크린 인쇄 생산 관리 페이지 기술 개선: - localStorage SSR 호환성 수정 (9개 useState 초기화) - Shadcn UI 컴포넌트 추가 (table, tabs, alert, drawer 등) - DataContext 및 DeveloperModeContext 추가 - API 라우트 구현 (items, master-data) - 타입 정의 및 유틸리티 함수 추가 빌드 테스트: ✅ 성공 (3.1초) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
59 lines
1.6 KiB
TypeScript
59 lines
1.6 KiB
TypeScript
import * as React from "react";
|
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
|
|
import { cn } from "./utils";
|
|
|
|
const alertVariants = cva(
|
|
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: "bg-background text-foreground",
|
|
destructive:
|
|
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: "default",
|
|
},
|
|
}
|
|
);
|
|
|
|
const Alert = React.forwardRef<
|
|
React.ElementRef<"div">,
|
|
React.ComponentPropsWithoutRef<"div"> & VariantProps<typeof alertVariants>
|
|
>(({ className, variant, ...props }, ref) => (
|
|
<div
|
|
ref={ref}
|
|
role="alert"
|
|
className={cn(alertVariants({ variant }), className)}
|
|
{...props}
|
|
/>
|
|
));
|
|
Alert.displayName = "Alert";
|
|
|
|
const AlertTitle = React.forwardRef<
|
|
React.ElementRef<"h5">,
|
|
React.ComponentPropsWithoutRef<"h5">
|
|
>(({ className, ...props }, ref) => (
|
|
<h5
|
|
ref={ref}
|
|
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
{...props}
|
|
/>
|
|
));
|
|
AlertTitle.displayName = "AlertTitle";
|
|
|
|
const AlertDescription = React.forwardRef<
|
|
React.ElementRef<"div">,
|
|
React.ComponentPropsWithoutRef<"div">
|
|
>(({ className, ...props }, ref) => (
|
|
<div
|
|
ref={ref}
|
|
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
{...props}
|
|
/>
|
|
));
|
|
AlertDescription.displayName = "AlertDescription";
|
|
|
|
export { Alert, AlertTitle, AlertDescription }; |