[{"name":"AvardaUi.Input","comment":" Input field component for Avarda design system.\n\nThis module provides a styled input with support for floating labels, hints, error messages,\nand optional left/right children. It uses the **builder pattern**:\n\n1.  Start with [`new`](#new) to create a base input.\n2.  Chain configuration functions like [`withPlaceholder`](#withPlaceholder) or [`withIsRequired`](#withIsRequired).\n3.  Finish with [`view`](#view) to render it.\n\n\n# Creating an Input\n\n@docs new, view\n\n\n# Configuration\n\n@docs withPlaceholder, withIsRequired, withIsDisabled, withInputType, withMaxLength, withBorderRadius, withAutocomplete, withAttributes, withAdditionalWrapperStyles, withOnKeyDown\n\n\n# Validation and Messaging\n\n@docs withMaybeError, withHint\n\n\n# Children\n\n@docs withLeftChild, withRightChild\n\n","unions":[],"aliases":[],"values":[{"name":"new","comment":" Create a new input with required fields: `id`, `value`, `msg`, and `label`.\n\nThis gives you a base input that you can configure further with `withX` functions.\n\n    Input.new \"username\"\n        { value = model.username\n        , msg = UsernameChanged\n        , label = \"Username\"\n        }\n\n","type":"String.String -> { value : String.String, msg : String.String -> msg, label : String.String } -> AvardaUi.Input.Input msg"},{"name":"view","comment":" Render the configured input as HTML.\n\nAlways call this after you’ve built up the input with `new` and chained settings.\n\n    Input.new \"username\" {...}\n        |> Input.withPlaceholder \"Enter username\"\n        |> Input.withIsRequired True\n        |> Input.view\n\n","type":"AvardaUi.Input.Input msg -> Html.Styled.Html msg"},{"name":"withAdditionalWrapperStyles","comment":" Add custom CSS styles to the outer wrapper element.\n\n    Input.new \"username\" {...}\n        |> Input.withAdditionalWrapperStyles [ Css.marginTop (Css.px 16) ]\n\n","type":"List.List Css.Style -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withAttributes","comment":" Attach additional HTML attributes to the underlying `<input>` element.\nFor example `name` or `data-*` attributes.\n\n    Input.new \"username\" {...}\n        |> Input.withAttributes [ Attributes.name \"username\" ]\n\n","type":"List.List (Html.Styled.Attribute msg) -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withAutocomplete","comment":" Enable autocomplete with a given string like `\"username\"` or `\"off\"`.\n\n    Input.new \"username\" {...}\n        |> Input.withAutocomplete \"username\"\n\n","type":"String.String -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withBorderRadius","comment":" Adjust the border radius of the input box.\n\n    Input.new \"username\" {...}\n        |> Input.withBorderRadius 12\n\n","type":"Basics.Float -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withHint","comment":" Add a hint text below the input (shown when there is no error).\n\n    Input.new \"username\" {...}\n        |> Input.withHint \"Must be at least 8 characters\"\n\n","type":"String.String -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withInputType","comment":" Change the input type (e.g. `\"text\"`, `\"password\"`, `\"email\"`).\n\n    Input.new \"password\" {...}\n        |> Input.withInputType \"password\"\n\n","type":"String.String -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withIsDisabled","comment":" Disable the input.\nVisually dims and prevents typing.\n\n    Input.new \"username\" {...}\n        |> Input.withIsDisabled True\n\n","type":"Basics.Bool -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withIsRequired","comment":" Mark the input as required.\nThis adds a `*` to the label and sets `required=true`.\n\n    Input.new \"username\" {...}\n        |> Input.withIsRequired True\n\n","type":"Basics.Bool -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withLeftChild","comment":" Add a left-side child element, e.g. an icon.\n\n    Input.new \"username\" {...}\n        |> Input.withLeftChild (Icons.user [])\n\n","type":"Html.Styled.Html msg -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withMaxLength","comment":" Limit the maximum number of characters.\n\n    Input.new \"username\" {...}\n        |> Input.withMaxLength 20\n\n","type":"Basics.Int -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withMaybeError","comment":" Show an error message and mark the input invalid.\nReplaces any active hint text.\n\n    Input.new \"username\" {...}\n        |> Input.withMaybeError (Just \"This field is required\")\n\n","type":"Maybe.Maybe String.String -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withOnKeyDown","comment":" Listen for key presses and map them to messages.\nUseful for handling Enter/Escape in forms.\n\n    Input.new \"username\" {...}\n        |> Input.withOnKeyDown [ ( KeyPressUtil.Enter, Submit ) ]\n\n","type":"List.List ( Util.KeyPress.KeyboardKey, msg ) -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withPlaceholder","comment":" Add a placeholder to the input.\nChain after `new`.\n\n    Input.new \"username\" {...}\n        |> Input.withPlaceholder \"Enter username\"\n\n","type":"String.String -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"},{"name":"withRightChild","comment":" Add a right-side child element, e.g. a clear button.\n\n    Input.new \"username\" {...}\n        |> Input.withRightChild (Icons.clear [ onClick Clear ])\n\n","type":"Html.Styled.Html msg -> AvardaUi.Input.Input msg -> AvardaUi.Input.Input msg"}],"binops":[]}]