feat: 添加连锁门店系统首页及核心UI组件

新增首页布局、导航栏、页脚及多个核心UI组件(按钮、卡片、表格等)
添加图片资源、工具函数和样式配置
实现响应式设计和主题支持
包含行业解决方案展示区块
This commit is contained in:
JanYork
2026-03-18 10:50:42 +08:00
commit 6a68a96287
110 changed files with 12842 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
"use client"
import { type HTMLAttributes, useEffect, useRef, useState } from "react"
import { cn } from "@/lib/utils"
type SectionRevealProps = HTMLAttributes<HTMLDivElement> & {
delay?: number
}
export function SectionReveal({
children,
className,
delay = 0,
style,
...props
}: SectionRevealProps) {
const ref = useRef<HTMLDivElement | null>(null)
const [visible, setVisible] = useState(false)
useEffect(() => {
const node = ref.current
if (!node) {
return
}
const observer = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
setVisible(true)
observer.disconnect()
}
},
{
threshold: 0.18,
rootMargin: "0px 0px -10% 0px",
}
)
observer.observe(node)
return () => observer.disconnect()
}, [])
return (
<div
ref={ref}
{...props}
className={cn(
"motion-safe:transition-[opacity,transform,filter] motion-safe:duration-[1200ms] motion-safe:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] motion-safe:will-change-transform",
visible
? "opacity-100 translate-y-0 scale-100 blur-0"
: "opacity-0 translate-y-10 scale-[0.985] blur-[10px]",
className
)}
style={{ ...style, transitionDelay: `${delay}ms` }}
>
{children}
</div>
)
}