211 lines
3.7 KiB
TypeScript
211 lines
3.7 KiB
TypeScript
import {
|
|
Armchair,
|
|
ArrowDown,
|
|
ArrowLeft,
|
|
ArrowRight,
|
|
ArrowUp,
|
|
Award,
|
|
BookOpen,
|
|
Box,
|
|
BriefcaseBusiness,
|
|
Building2,
|
|
CalendarDays,
|
|
Check,
|
|
ChevronDown,
|
|
ChevronLeft,
|
|
ChevronRight,
|
|
ChevronUp,
|
|
CircleCheck,
|
|
ContactRound,
|
|
ClipboardCheck,
|
|
Clock3,
|
|
Compass,
|
|
Cuboid,
|
|
Download,
|
|
DraftingCompass,
|
|
ExternalLink,
|
|
Eye,
|
|
FileDown,
|
|
FileText,
|
|
FolderKanban,
|
|
Globe2,
|
|
GraduationCap,
|
|
Hammer,
|
|
HardHat,
|
|
Home,
|
|
Image,
|
|
Images,
|
|
Camera,
|
|
LampFloor,
|
|
LandPlot,
|
|
Languages,
|
|
Layers3,
|
|
Lightbulb,
|
|
Mail,
|
|
MapPin,
|
|
Maximize2,
|
|
Medal,
|
|
Menu,
|
|
Moon,
|
|
MousePointer2,
|
|
MoveUpRight,
|
|
PencilRuler,
|
|
Phone,
|
|
Quote,
|
|
Ruler,
|
|
ScanSearch,
|
|
Search,
|
|
Send,
|
|
Share2,
|
|
Sparkles,
|
|
Sun,
|
|
Trees,
|
|
Trophy,
|
|
UserRound,
|
|
Wrench,
|
|
X,
|
|
type LucideIcon,
|
|
type LucideProps,
|
|
} from "lucide-react";
|
|
|
|
export const ICONS = {
|
|
navigation: {
|
|
home: Home,
|
|
about: UserRound,
|
|
projects: FolderKanban,
|
|
services: BriefcaseBusiness,
|
|
awards: Trophy,
|
|
experience: BriefcaseBusiness,
|
|
contact: Mail,
|
|
},
|
|
services: {
|
|
architecture: Building2,
|
|
architecturalDesign: DraftingCompass,
|
|
planning: PencilRuler,
|
|
drafting: Ruler,
|
|
compass: Compass,
|
|
concept: Lightbulb,
|
|
sitePlanning: LandPlot,
|
|
threeD: Box,
|
|
modeling: Cuboid,
|
|
visualization: ScanSearch,
|
|
interior: Armchair,
|
|
interiorLighting: LampFloor,
|
|
landscape: Trees,
|
|
layers: Layers3,
|
|
supervision: HardHat,
|
|
execution: Hammer,
|
|
inspection: ClipboardCheck,
|
|
technical: Wrench,
|
|
},
|
|
achievements: {
|
|
award: Award,
|
|
trophy: Trophy,
|
|
medal: Medal,
|
|
education: GraduationCap,
|
|
research: BookOpen,
|
|
calendar: CalendarDays,
|
|
time: Clock3,
|
|
},
|
|
contact: {
|
|
location: MapPin,
|
|
phone: Phone,
|
|
email: Mail,
|
|
website: Globe2,
|
|
send: Send,
|
|
},
|
|
social: {
|
|
instagram: Camera,
|
|
linkedin: ContactRound,
|
|
facebook: Share2,
|
|
},
|
|
interface: {
|
|
language: Languages,
|
|
globe: Globe2,
|
|
dark: Moon,
|
|
light: Sun,
|
|
menu: Menu,
|
|
close: X,
|
|
search: Search,
|
|
view: Eye,
|
|
image: Image,
|
|
gallery: Images,
|
|
expand: Maximize2,
|
|
cursor: MousePointer2,
|
|
},
|
|
arrows: {
|
|
left: ArrowLeft,
|
|
right: ArrowRight,
|
|
up: ArrowUp,
|
|
down: ArrowDown,
|
|
chevronLeft: ChevronLeft,
|
|
chevronRight: ChevronRight,
|
|
chevronUp: ChevronUp,
|
|
chevronDown: ChevronDown,
|
|
external: ExternalLink,
|
|
diagonal: MoveUpRight,
|
|
},
|
|
actions: {
|
|
download: Download,
|
|
fileDownload: FileDown,
|
|
file: FileText,
|
|
check: Check,
|
|
checked: CircleCheck,
|
|
},
|
|
decorative: {
|
|
sparkles: Sparkles,
|
|
quote: Quote,
|
|
},
|
|
} as const satisfies Record<string, Record<string, LucideIcon>>;
|
|
|
|
export type SiteIconProps = Omit<LucideProps, "ref"> & {
|
|
icon?: LucideIcon | null;
|
|
};
|
|
|
|
export function SiteIcon({
|
|
icon: Icon,
|
|
size = 20,
|
|
strokeWidth = 1.7,
|
|
className = "",
|
|
...props
|
|
}: SiteIconProps) {
|
|
if (!Icon) return null;
|
|
|
|
const classes = ["site-icon", className].filter(Boolean).join(" ");
|
|
|
|
return (
|
|
<Icon
|
|
{...props}
|
|
size={size}
|
|
strokeWidth={strokeWidth}
|
|
className={classes}
|
|
aria-hidden="true"
|
|
focusable="false"
|
|
/>
|
|
);
|
|
}
|
|
|
|
export type DirectionalArrowProps = Omit<SiteIconProps, "dir" | "icon"> & {
|
|
direction?: "forward" | "backward";
|
|
dir?: "ltr" | "rtl";
|
|
};
|
|
|
|
export function DirectionalArrow({
|
|
direction = "forward",
|
|
dir = "ltr",
|
|
...props
|
|
}: DirectionalArrowProps) {
|
|
const pointsRight =
|
|
(direction === "forward" && dir === "ltr") ||
|
|
(direction === "backward" && dir === "rtl");
|
|
|
|
return (
|
|
<SiteIcon
|
|
{...props}
|
|
icon={pointsRight ? ArrowRight : ArrowLeft}
|
|
data-direction={direction}
|
|
data-layout-direction={dir}
|
|
/>
|
|
);
|
|
}
|