[Feature] Add Empty component
Merged
DJ
5mo ago+370+370+012345678901234567890123456789-0-0-0123456789
Description
Ports the shadcn Empty component to RubyUI — a centered empty-state surface for when there is no data or content (no results, no messages, first-run states).
Reference:
- Docs: https://ui.shadcn.com/docs/components/radix/empty
- Source:
apps/v4/registry/bases/radix/ui/empty.tsx
Parts
Empty— dashed-border centered containerEmptyHeader— stacks media + title + descriptionEmptyMedia—variant:default(bare) oricon(muted rounded media box)EmptyTitle/EmptyDescription— heading + muted supporting copyEmptyContent— slot for actions (buttons, inputs)
Notes
- shadcn ships these styles as a
cn-empty-*CSS layer; this port translates every rule to Tailwind v4 utilities. No custom CSS, no JS. - No
dependencies.ymlentry (Empty has no required component/gem/JS deps). - Motivation: the Message Scroller chat-window demo (stacked PR) uses Empty for its no-messages state — this lands it as a first-class component.
Testing
cd gem && bundle exec rake→ tests + StandardRB green.- Rendered at
/docs/empty: default icon state, with-action state, and default (avatar) media verified.
Screenshots
Add /docs/empty screenshot.
Summary by cubic
Adds the Empty component suite for empty states in RubyUI. Ported from shadcn and built with Tailwind v4 utilities—no JS and no new dependencies.
- New Features
- Components: Empty, EmptyHeader, EmptyMedia (variants: default, icon), EmptyTitle, EmptyDescription, EmptyContent with data-slot attributes.
- Docs: new /docs/empty page, route/controller, and menu entry with examples (default, with action, default media).
- Registry/SEO: updated MCP registry, sitemap, and LLM docs.
- Tests: verify structure and EmptyMedia variants.