diff --git a/storybook/src/components/registry.tsx b/storybook/src/components/registry.tsx index 6f801a9a8..8ab8894cf 100644 --- a/storybook/src/components/registry.tsx +++ b/storybook/src/components/registry.tsx @@ -284,6 +284,63 @@ export const Progress: React.FC = ({ ) } +// CircularProgress - spinning loader +interface CircularProgressProps extends LuaComponentProps { + size?: 'small' | 'medium' | 'large' | number + color?: 'primary' | 'secondary' | 'inherit' +} + +export const CircularProgress: React.FC = ({ + size = 'medium', + className = '', +}) => { + const sizeMap = { small: 16, medium: 24, large: 40 } + const actualSize = typeof size === 'number' ? size : sizeMap[size] + + return ( +
+ ) +} + +// Skeleton - loading placeholder +interface SkeletonProps extends LuaComponentProps { + variant?: 'text' | 'circular' | 'rectangular' | 'rounded' + width?: string | number + height?: string | number + animation?: 'pulse' | 'wave' | false +} + +export const Skeleton: React.FC = ({ + variant = 'text', + width, + height, + animation = 'pulse', + className = '', +}) => { + const variantClasses = { + text: 'rounded h-4', + circular: 'rounded-full', + rectangular: '', + rounded: 'rounded-md', + } + + const animationClass = animation === 'pulse' ? 'animate-pulse' : animation === 'wave' ? 'animate-pulse' : '' + + return ( +
+ ) +} + export const Badge: React.FC = ({ color: _color = 'default', className = '', @@ -570,6 +627,8 @@ export const componentRegistry: Record = { Divider, Alert, Progress, + CircularProgress, + Skeleton, // Navigation Tabs, diff --git a/storybook/src/mocks/packages/index.ts b/storybook/src/mocks/packages/index.ts index b7e2c1599..a79447506 100644 --- a/storybook/src/mocks/packages/index.ts +++ b/storybook/src/mocks/packages/index.ts @@ -23,6 +23,7 @@ const AUTO_LOAD_PACKAGES = [ 'nav_menu', 'notification_center', 'stats_grid', + 'ui_auth', 'ui_footer', 'ui_header', ]