// 미소산 약국 UI Kit — 공용 컴포넌트
// 사용 전 colors_and_type.css 를 로 로드
// React + Babel inline JSX 전제
const { useState } = React;
// ─────────────────────────────────────────────────────────────────
// Header — sticky · backdrop-blur · 로고 + 앵커 네비 + CTA + 모바일 토글
// goun_skin.html site-header 동작과 동일:
// · 브랜드 → 홈(index.html)
// · 섹션 앵커 스크롤
// · 모바일 햄버거 / is-open 패널
// · CTA 버튼 (nav 안)
// ─────────────────────────────────────────────────────────────────
function Header({
nav = [
{ label: '소개', href: '#top' },
{ label: '제품', href: '#products' },
{ label: '성분', href: '#ingredients' },
{ label: '상담', href: '#consult' },
],
ctaLabel = '상담 신청',
ctaHref = '#buy',
homeHref = 'index.html',
brandSub = '열(熱) 밸런스 솔루션',
}) {
const [open, setOpen] = useState(false);
const items = (nav || []).map((n) => (
typeof n === 'string' ? { label: n, href: '#' + n } : n
));
const close = () => setOpen(false);
return (
미소산 약국
{brandSub}
);
}
// ─────────────────────────────────────────────────────────────────
// Button — pill · 44px min-height · theme-aware
// ─────────────────────────────────────────────────────────────────
function Button({ children, variant = 'primary', size = 'md', href, onClick, style }) {
const cls = `btn btn-${variant}`;
const sizeStyle = size === 'sm'
? { minHeight: 38, padding: '8px 16px', fontSize: 13 }
: {};
const combined = { ...sizeStyle, ...(style || {}) };
if (href) return {children};
return ;
}
// ─────────────────────────────────────────────────────────────────
// Chip · Badge
// ─────────────────────────────────────────────────────────────────
function Chip({ children }) {
return {children};
}
function Badge({ children, variant = 'solid' }) {
const style = variant === 'outline'
? { background: 'transparent', border: '1px solid var(--accent-ink, var(--misosan-blue-navy))', color: 'var(--accent-ink, var(--misosan-blue-navy))' }
: {};
return {children};
}
// ─────────────────────────────────────────────────────────────────
// SectionHead — eyebrow + h2 + lead
// ─────────────────────────────────────────────────────────────────
function SectionHead({ eyebrow, title, lead, align = 'left' }) {
return (
{eyebrow && {eyebrow}
}
{title}
{lead && {lead}
}
);
}
// ─────────────────────────────────────────────────────────────────
// Hero — 좌 카피 + 우 미디어
// ─────────────────────────────────────────────────────────────────
function Hero({ eyebrow, title, subtitle, description, chips = [], cta, media, trust = [], accentColor = 'var(--accent-ink)' }) {
return (
{eyebrow &&
{eyebrow}
}
{title}
{subtitle && {subtitle}}
{description &&
}
{chips.length > 0 && (
{chips.map((c, i) => {c})}
)}
{cta && (
{cta}
)}
{trust.length > 0 && (
{trust.map((t, i) => (
{t.value}
{t.label}
))}
)}
{media}
);
}
// ─────────────────────────────────────────────────────────────────
// ProductCard — 3개 라인 소개
// ─────────────────────────────────────────────────────────────────
function ProductCard({ mark, name, category, description, features = [], accent, accentSoft, ink, href = '#' }) {
return (
e.currentTarget.style.transform = 'translateY(-4px)'}
onMouseLeave={e => e.currentTarget.style.transform = 'translateY(0)'}
>
{mark &&

}
{description}
{features.length > 0 && (
{features.map((f, i) => (
-
✓
{f}
))}
)}
자세히 보기 →
);
}
// ─────────────────────────────────────────────────────────────────
// PrincipleTriad — 술깨산 청열·이수·안위
// ─────────────────────────────────────────────────────────────────
function PrincipleTriad({ items }) {
return (
{items.map((it, i) => (
{it.emoji}
{it.title}
{it.hanja && ({it.hanja})}
{it.tagline}
{it.description}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// IngredientCard — 한약재 성분
// ─────────────────────────────────────────────────────────────────
function IngredientCard({ name, hanja, tagline, points = [], accent = 'var(--sulgaesan-navy)', accentSoft = 'var(--sulgaesan-cyan-soft)' }) {
return (
{name}
{hanja && ({hanja})}
{tagline &&
{tagline}
}
{points.map((p, i) => (
- {p}
))}
);
}
// ─────────────────────────────────────────────────────────────────
// PharmacistCard — 대표자 소개
// ─────────────────────────────────────────────────────────────────
function PharmacistCard({ name, role, quote, description, accent = 'var(--sulgaesan-navy)' }) {
return (
{quote && (
"{quote}"
)}
{description && {description}
}
);
}
// ─────────────────────────────────────────────────────────────────
// Footer — 다크 그린 · 3-col
// ─────────────────────────────────────────────────────────────────
function Footer() {
return (
);
}
// ─────────────────────────────────────────────────────────────────
// Export to window (필수 — 다른