defmodule RiverConnectWeb.Components.UI.Command do @moduledoc """ Command palette components for RiverConnectWeb.Components.UI. Provides a set of components to build a command palette or searchable menu, similar to those found in modern applications. ## Example <.command id="command" class="rounded-lg border shadow-md md:min-w-[450px] w-full lg:max-w-[600px]"> <.command_input placeholder="Type a command or search..." /> <.command_empty> No results found <.command_list> <.command_group heading="Suggestions"> <.command_item phx-value-name="calendar" phx-click="select_command"> <.calendar class="w-4 h-4"/> Calendar ... <.command_group heading="Settings"> <.command_item phx-value-name="profile" phx-click="select_command"> <.user class="w-4 h-4"/> Profile <.command_shortcut>⌘P ... """ use RiverConnectWeb.Components.UI, :component import RiverConnectWeb.Components.UI.Dialog import RiverConnectWeb.Components.UI.Icon @doc """ Renders the root command palette container. ## Attributes * `:id` (required) - The unique id for the command palette. * `:class` - Additional classes to apply. ## Slots * `:inner_block` (required) - The content of the command palette. ## Example <.command id="my-command"> ... """ attr :id, :string, required: true attr :class, :any, default: "" slot :inner_block, required: true def command(assigns) do ~H"""