"use client"; import { Button } from "@suphark/ui/components/shared/button/button"; import { Initials } from "@suphark/ui/components/shared/initials"; import { StatusBadge } from "@suphark/ui/components/shared/status-badge"; import { Checkbox } from "@suphark/ui/components/ui/checkbox"; import { InputGroup, InputGroupAddon, InputGroupInput, } from "@suphark/ui/components/ui/input-group"; import { Label } from "@suphark/ui/components/ui/label"; import { Progress } from "@suphark/ui/components/ui/progress"; import { Switch } from "@suphark/ui/components/ui/switch"; import { cn } from "@suphark/ui/lib/utils"; import { Search } from "lucide-react"; import { type CSSProperties, useId, useState } from "react"; /** แบรนด์ตัวอย่าง — ตัวแรกไม่ตั้ง --brand = slate ของแพ็กเกจ */ const BRANDS = [ { id: "default", label: "ค่าเริ่มต้น", swatch: "oklch(0.208 0.042 265.755)" }, { id: "a", label: "Tenant A", brand: "oklch(0.55 0.2 25)", foreground: "oklch(0.98 0 0)" }, { id: "b", label: "Tenant B", brand: "oklch(0.5 0.09 200)", foreground: "oklch(0.985 0 0)" }, ] as const; /** * แถบตัวอย่างสดใต้หัวเรื่อง — component จริงของแพ็กเกจในบรรทัดเดียว + สวิตช์สีแบรนด์ * วิทยานิพนธ์ของหน้านี้คือ "UI ชุดเดียวทุกแอป" จึงให้เห็นระบบทำงานก่อนอ่านคำอธิบาย */ export function HeroSpecimen() { const [brandId, setBrandId] = useState<(typeof BRANDS)[number]["id"]>("default"); const [enabled, setEnabled] = useState(true); const switchId = useId(); const checkboxId = useId(); const brand = BRANDS.find((b) => b.id === brandId) ?? BRANDS[0]; const style = "brand" in brand ? ({ "--brand": brand.brand, "--brand-foreground": brand.foreground } as CSSProperties) : undefined; return (