mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
- Enable all 15 finance component docs (from .disabled → .mdx) - Create stock-market.mdx, 8 chart docs, 8 block docs, 2 framework docs - Add direction.tsx component (RTL/LTR support from upstream shadcn) - Add xs/icon-xs button sizes, data-variant/data-size attributes - Fix build-registry.mts to handle default exports in namespace re-exports - Add default props to order-entry, positions-list, orders-history, trading-panel - Fix 18 navigation stubs → re-export from root implementations - Add 44 orphaned MDX files to nav (installation, dark-mode, desktop, guides, etc) - Migrate 6 framer-motion imports → motion/react - Bump React 19.2.0→19.2.4, Next.js 16.0.1→16.1.6, motion→12.34.0 - Align lucide-react, sonner v2, tailwind-merge v3, postcss-selector-parser v7 - Remove framer-motion dep (superseded by motion) - Fix @types/react-dom, TypeScript versions across workspaces
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { motion } from "motion/react"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
interface AppleHelloEffectProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
text?: string
|
|
duration?: number
|
|
}
|
|
|
|
const AppleHelloEffect = React.forwardRef<
|
|
HTMLDivElement,
|
|
AppleHelloEffectProps
|
|
>(({ className, text = "Hello", duration = 2, ...props }, ref) => {
|
|
const letters = text.split("")
|
|
|
|
return (
|
|
<div
|
|
ref={ref}
|
|
className={cn(
|
|
"relative flex items-center justify-center text-6xl font-bold",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{letters.map((letter, index) => (
|
|
<motion.span
|
|
key={index}
|
|
initial={{ opacity: 0, y: 50 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{
|
|
duration: duration,
|
|
delay: index * 0.1,
|
|
ease: [0.215, 0.61, 0.355, 1],
|
|
}}
|
|
className="inline-block"
|
|
>
|
|
{letter}
|
|
</motion.span>
|
|
))}
|
|
</div>
|
|
)
|
|
})
|
|
|
|
AppleHelloEffect.displayName = "AppleHelloEffect"
|
|
|
|
export { AppleHelloEffect }
|