refactor: migrate atom components to shadcn/ui primitives
Introduce a dual-layer component architecture:
- `components/ui/` contains raw shadcn/ui primitives (button, badge, input,
checkbox, label, skeleton, alert, toggle, toggle-group, input-otp)
- `components/atoms/` wraps these primitives with enhanced APIs (loading
states, semantic variants, polymorphic props) for backward compatibility
Migrated atoms: badge, button, checkbox, input, label, skeleton,
view-toggle, error-message, inline-toast, error-state.
Legacy backups preserved as .legacy.tsx files for reference.
Added barrel export for ui/ and updated components/index.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:25:18 +09:00
|
|
|
/**
|
|
|
|
|
* Skeleton — now powered by shadcn/ui
|
|
|
|
|
*
|
|
|
|
|
* Uses the standard shadcn animate-pulse pattern instead of the custom
|
|
|
|
|
* cp-skeleton-shimmer animation.
|
|
|
|
|
*/
|
|
|
|
|
|
2026-01-15 11:30:29 +09:00
|
|
|
import { cn } from "@/shared/utils";
|
|
|
|
|
|
refactor: migrate atom components to shadcn/ui primitives
Introduce a dual-layer component architecture:
- `components/ui/` contains raw shadcn/ui primitives (button, badge, input,
checkbox, label, skeleton, alert, toggle, toggle-group, input-otp)
- `components/atoms/` wraps these primitives with enhanced APIs (loading
states, semantic variants, polymorphic props) for backward compatibility
Migrated atoms: badge, button, checkbox, input, label, skeleton,
view-toggle, error-message, inline-toast, error-state.
Legacy backups preserved as .legacy.tsx files for reference.
Added barrel export for ui/ and updated components/index.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:25:18 +09:00
|
|
|
interface SkeletonProps extends React.ComponentProps<"div"> {
|
2026-01-15 11:30:29 +09:00
|
|
|
animate?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
refactor: migrate atom components to shadcn/ui primitives
Introduce a dual-layer component architecture:
- `components/ui/` contains raw shadcn/ui primitives (button, badge, input,
checkbox, label, skeleton, alert, toggle, toggle-group, input-otp)
- `components/atoms/` wraps these primitives with enhanced APIs (loading
states, semantic variants, polymorphic props) for backward compatibility
Migrated atoms: badge, button, checkbox, input, label, skeleton,
view-toggle, error-message, inline-toast, error-state.
Legacy backups preserved as .legacy.tsx files for reference.
Added barrel export for ui/ and updated components/index.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:25:18 +09:00
|
|
|
export function Skeleton({ className, animate = true, ...props }: SkeletonProps) {
|
2026-01-15 11:30:29 +09:00
|
|
|
return (
|
refactor: migrate atom components to shadcn/ui primitives
Introduce a dual-layer component architecture:
- `components/ui/` contains raw shadcn/ui primitives (button, badge, input,
checkbox, label, skeleton, alert, toggle, toggle-group, input-otp)
- `components/atoms/` wraps these primitives with enhanced APIs (loading
states, semantic variants, polymorphic props) for backward compatibility
Migrated atoms: badge, button, checkbox, input, label, skeleton,
view-toggle, error-message, inline-toast, error-state.
Legacy backups preserved as .legacy.tsx files for reference.
Added barrel export for ui/ and updated components/index.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:25:18 +09:00
|
|
|
<div
|
|
|
|
|
data-slot="skeleton"
|
|
|
|
|
className={cn("rounded-md", animate ? "animate-pulse bg-accent" : "bg-muted", className)}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
2026-01-15 11:30:29 +09:00
|
|
|
);
|
|
|
|
|
}
|