defmodule PhiaUi do @moduledoc """ PhiaUI — a shadcn/ui-inspired component library for Phoenix LiveView. PhiaUI brings the composable, anatomy-driven design system of [shadcn/ui](https://ui.shadcn.com) to the Phoenix ecosystem. Every component is a stateless HEEx function component that integrates with `Phoenix.HTML.Form`, Ecto changesets, and LiveView's JS command system. There are no npm dependencies and no Alpine.js. JS hooks (where required) are plain vanilla JavaScript files that you own after ejection. ## Architecture PhiaUI is organised into five layers: ### 1. PrimitiveComponents Stateless, zero-JS layout and display components: - `PhiaUi.Components.Button` — 6 variants × 4 sizes, composable with icons - `PhiaUi.Components.Card` — `card/1`, `card_header/1`, `card_title/1`, `card_description/1`, `card_content/1`, `card_footer/1` - `PhiaUi.Components.Badge` — 4 semantic variants (default, secondary, destructive, outline) - `PhiaUi.Components.Table` — streams-compatible; `table/1` through `table_caption/1` - `PhiaUi.Components.Icon` — Lucide SVG sprite, 4 sizes ### 2. FormIntegration Fully integrated with `Phoenix.HTML.FormField` and Ecto changeset errors: - `PhiaUi.Components.Input` — `phia_input/1` — label + input + description + errors - `PhiaUi.Components.Textarea` — `phia_textarea/1` — multi-line with auto error display - `PhiaUi.Components.Select` — `phia_select/1` — native `