[{"name":"Select","comment":" Select input with auto-complete\n\nSee a full example of the select input [here](https://github.com/sporto/elm-select/blob/master/demo/src/Example1Basic.elm)\n\nSee a full example of the select input in multi mode [here](https://github.com/sporto/elm-select/blob/master/demo/src/Example3Multi.elm)\n\nSee live demo [here](https://sporto.github.io/elm-select)\n\n\n# Types\n\n@docs RequiredConfig, Config, State, Msg\n\n\n# Configuration\n\n@docs newConfig, withCustomInput, withCutoff, withOnQuery, withEmptySearch, withPreserveQueryOnFocus, withTransformQuery, withTransformInput\n\n\n# Configure Multi Select mode\n\n@docs withMultiSelection, withOnRemoveItem, withMultiInputItemContainerAttrs, withMultiInputItemContainerMoreAttrs, withMultiInputItemAttrs, withMultiInputItemMoreAttrs, withMultiInputItemRemovable\n\n\n# Configure the input wapper\n\nThis is the element that wraps the selected item(s) and the input\n\n@docs withInputWrapperAttrs, withInputWrapperMoreAttrs\n\n\n# Configure the input\n\n@docs withInputAttrs, withInputMoreAttrs, withOnFocus, withOnBlur, withOnEsc, withOnArrowUp, withOnArrowDown, withValueSeparators\n\n\n# Configure the clear button\n\n@docs withClear, withClearAttrs, withClearMoreAttrs, withClearSvgClass, withClearHtml\n\n\n# Configure the items\n\n@docs withItemAttrs, withItemMoreAttrs, withItemHtml, withHighlightedItemAttrs, withHighlightedItemMoreAttrs, withItemSelectedAttrs, withItemSelectedMoreAttrs\n\n\n# Configure the menu\n\n@docs withMenuAttrs, withMenuMoreAttrs\n\n\n# Configure the root container\n\n@docs withRootAttrs, withRootMoreAttrs\n\n\n# Configure the not found message\n\n@docs withNotFound, withNotFoundAttrs, withNotFoundMoreAttrs, withNotFoundShown\n\n\n# Configure the prompt\n\n@docs withPrompt, withPromptAttrs, withPromptMoreAttrs\n\n\n# State\n\n@docs init, queryFromState, withQuery\n\n\n# View\n\n@docs view\n\n\n# Update\n\n@docs update\n\n","unions":[{"name":"Config","comment":" Opaque type that holds all the configuration\n","args":["msg","item"],"cases":[]},{"name":"Msg","comment":" Opaque type for internal library messages\n","args":["item"],"cases":[]},{"name":"State","comment":" Opaque type that holds the current state\n","args":[],"cases":[]}],"aliases":[{"name":"RequiredConfig","comment":" Required initial configuration\n\n  - onSelect: A message to trigger when an item is selected\n  - toLabel: A function to get a label to display from an item\n  - filter: A function that takes the typed query and the list of all items, and return the filtered items.\n\n","args":["msg","item"],"type":"{ filter : String.String -> List.List item -> Maybe.Maybe (List.List item), toLabel : item -> String.String, onSelect : Maybe.Maybe item -> msg, toMsg : Select.Msg item -> msg }"}],"values":[{"name":"init","comment":" Create a new state. You must pass a unique identifier for each select component.\n\n    {\n        ...\n        selectState = Select.init \"select1\"\n    }\n\n","type":"String.String -> Select.State"},{"name":"newConfig","comment":" Create a new configuration. This takes as `RequiredConfig` record.\n","type":"Select.RequiredConfig msg item -> Select.Config msg item"},{"name":"queryFromState","comment":" Return the query string from the current state model\n\n    Select.queryFromState model.selectState\n\n","type":"Select.State -> Maybe.Maybe String.String"},{"name":"update","comment":" Update the component state\n\n    SelectMsg subMsg ->\n        let\n            ( updated, cmd ) =\n                Select.update selectConfig subMsg model.selectState\n        in\n            ( { model | selectState = updated }, cmd )\n\n","type":"Select.Config msg item -> Select.Msg item -> Select.State -> ( Select.State, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" Render the view\n\n    Select.view\n        selectConfig\n        model.selectState\n        availableItems\n        selectedItems\n\n","type":"Select.Config msg item -> Select.State -> List.List item -> List.List item -> Html.Html msg"},{"name":"withClear","comment":" Remove the clear button entirely\n\n    config\n        |> Select.withClear False\n\n","type":"Basics.Bool -> Select.Config msg item -> Select.Config msg item"},{"name":"withClearAttrs","comment":" Set attributes for the clear button.\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withClearAttrs [ class \"clear\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withClearHtml","comment":" Use your own html for the clear icon\n\n    config\n        |> Select.withClearHtml (Just (text \"X\"))\n\n","type":"Maybe.Maybe (Html.Html msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withClearMoreAttrs","comment":" Add attributes to the clear button.\nThis adds to existing attributes.\n\n    config\n        |> Select.withClearMoreAttrs [ class \"clear\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withClearSvgClass","comment":" Set classes for the clear SVG icon\n\n    config\n        |> Select.withClearSvgClass \"clear\"\n\n","type":"String.String -> Select.Config msg item -> Select.Config msg item"},{"name":"withCustomInput","comment":" Allow users to write a custom values (free text entry)\nYou must provide a function that converst a String into an item\n\n    config\n        |> Select.withCustomInput (\\string -> item)\n\n","type":"(String.String -> item) -> Select.Config msg item -> Select.Config msg item"},{"name":"withCutoff","comment":" Set the maxium number of items to show\n\n    config\n        |> Select.withCutoff 6\n\n","type":"Basics.Int -> Select.Config msg item -> Select.Config msg item"},{"name":"withEmptySearch","comment":" Show results if the input is focused, but the query is empty.\nSimilar to a dropdown, focusing on the input will show the menu.\n\nDefault is False.\n\n    Select.withEmptySearch True config\n\n","type":"Basics.Bool -> Select.Config msg item -> Select.Config msg item"},{"name":"withHighlightedItemAttrs","comment":" Set attributes for the hightlighted item.\n\n    config\n        |> Select.withHighlightedItemAttrs [ class \"red\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withHighlightedItemMoreAttrs","comment":" Add attributes to the hightlighted item.\n\n    config\n        |> Select.withHighlightedItemMoreAttrs [ class \"red\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withInputAttrs","comment":" Set attributes for the input.\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withInputAttrs [ class \"col-12\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withInputMoreAttrs","comment":" Add attributes to the input.\nThis adds to existing attributes.\n\n    config\n        |> Select.withInputMoreAttrs [ class \"col-12\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withInputWrapperAttrs","comment":" Set attributes for the input wrapper (element that wraps the input and the clear button).\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withInputWrapperAttrs [ class \"col-12\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withInputWrapperMoreAttrs","comment":" Add attributes to the input wrapper (element that wraps the input and the clear button).\nThis adds to existing attributes.\n\n    config\n        |> Select.withInputWrapperMoreAttrs [ class \"col-12\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withItemAttrs","comment":" Set attributes for the items.\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withItemAttrs [ class \"border-bottom\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withItemHtml","comment":" Custom item element HTML\n\n    config\n        |> Select.withItemHtml (\\query item -> Html.li [] [ text item ])\n\nWhen this is used the original `toLabel` function in the config is ignored.\n\n","type":"(Maybe.Maybe String.String -> item -> Html.Html msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withItemMoreAttrs","comment":" Add attributes to the items.\nThis adds to existing attributes.\n\n    config\n        |> Select.withItemMoreAttrs [ class \"border-bottom\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withItemSelectedAttrs","comment":" Set attributes for the selected item in the menu.\n\n    config\n        |> Select.withItemSelectedAttrs [ class \"selected\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withItemSelectedMoreAttrs","comment":" Add attributes to the selected item in the menu.\n\n    config\n        |> Select.withItemSelectedMoreAttrs [ class \"selected\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMenuAttrs","comment":" Set attributes for the menu.\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withMenuAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMenuMoreAttrs","comment":" Add attributes to the menu.\nThis adds to existing attributes.\n\n    config\n        |> Select.withMenuMoreAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiInputItemAttrs","comment":" Set attributes for an individual selected item.\n\n    config\n        |> Select.withMultiInputItemAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiInputItemContainerAttrs","comment":" Set attributes for the container of selected items.\n\n    config\n        |> Select.withMultiInputItemContainerAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiInputItemContainerMoreAttrs","comment":" Add attributes for the container of selected items.\nThis adds to existing attributes.\n\n    config\n        |> Select.withMultiInputItemContainerAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiInputItemMoreAttrs","comment":" Add attributes to an individual selected item.\nThis adds to existing attributes.\n\n    config\n        |> Select.withMultiInputItemMoreAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiInputItemRemovable","comment":" Which items are removeable from the list\n\n    config\n        |> Select.withMultiInputItemRemovable (\\x -> x.removeable)\n\n","type":"(item -> Basics.Bool) -> Select.Config msg item -> Select.Config msg item"},{"name":"withMultiSelection","comment":" Use a multi select instead of a single select.\n","type":"Basics.Bool -> Select.Config msg item -> Select.Config msg item"},{"name":"withNotFound","comment":" Text that will appear when no matches are found.\n\n    config\n        |> Select.withNotFound \"No matches\"\n\n","type":"String.String -> Select.Config msg item -> Select.Config msg item"},{"name":"withNotFoundAttrs","comment":" Set attributes for the not found message.\n\n    config\n        |> Select.withNotFoundAttrs [ class \"red\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withNotFoundMoreAttrs","comment":" Add attributes to the not found message.\nThis adds to existing attributes.\n\n    config\n        |> Select.withNotFoundMoreAttrs [ class \"red\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withNotFoundShown","comment":" Hide menu when no matches found.\n\n    config\n        |> Select.withNotFoundShown False\n\n","type":"Basics.Bool -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnArrowDown","comment":" Add a callback for when the Down Arrow key is pressed.\n\n    config\n        |> Select.withOnArrowDown OnArrowDown\n\n","type":"msg -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnArrowUp","comment":" Add a callback for when the Up Arrow key is pressed.\n\n    config\n        |> Select.withOnArrowUp OnArrowUp\n\n","type":"msg -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnBlur","comment":" Add a callback for when the input field loses focus.\n\n    config\n        |> Select.withOnBlur OnBlur\n\n","type":"msg -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnEsc","comment":" Add a callback for when the Escape key is pressed.\n\n    config\n        |> Select.withOnEsc OnEsc\n\n","type":"msg -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnFocus","comment":" Add a callback for when the input field receives focus.\n\n    config\n        |> Select.withOnFocus OnFocus\n\n","type":"msg -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnQuery","comment":" Add a callback for when the query changes.\n\n    config\n        |> Select.withOnQuery OnQuery\n\n","type":"(String.String -> msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withOnRemoveItem","comment":" Message to call when removing an individual item. Please note that without this option\nspecified, you will not be able to remove an individual item from MultiSelect mode.\n\n    config\n        |> Select.withOnRemoveItem OnRemoveItem\n\n","type":"(item -> msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withPreserveQueryOnFocus","comment":" Preserve the current query when the input receives focus.\nWhen True, clicking on the input will not clear the existing query.\nWhen False, clicking on the input will clear the query if emptySearch is enabled.\n\nDefault is False.\n\n    Select.withPreserveQueryOnFocus True config\n\n","type":"Basics.Bool -> Select.Config msg item -> Select.Config msg item"},{"name":"withPrompt","comment":" Add a prompt text to be displayed when no element is selected.\n\n    config\n        |> Select.withPrompt \"Select a movie\"\n\n","type":"String.String -> Select.Config msg item -> Select.Config msg item"},{"name":"withPromptAttrs","comment":" Set attributes for the prompt text (When no item is selected)\n\n    config\n        |> Select.withPromptAttrs [ class \"prompt\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withPromptMoreAttrs","comment":" Add attributes to the prompt text (When no item is selected)\nThis adds to existing attributes.\n\n    config\n        |> Select.withPromptMoreAttrs [ class \"prompt\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withQuery","comment":" Change the current query\n\n    Select.withQuery (Just \"hello\") selectModel\n\n","type":"Maybe.Maybe String.String -> Select.State -> Select.State"},{"name":"withRootAttrs","comment":" Set attributes for the root container.\nThis overrides any attributes already set in a previous call.\n\n    config\n        |> Select.withRootAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withRootMoreAttrs","comment":" Add attributes to the root container.\nThis adds to existing attributes.\n\n    config\n        |> Select.withRootMoreAttrs [ class \"bg-white\" ]\n\n","type":"List.List (Html.Attribute msg) -> Select.Config msg item -> Select.Config msg item"},{"name":"withTransformInput","comment":" Transform the input\nThis can be used to restrict input to certain characters.\nReturning \"\" effectively disables input\n\n    transform : String -> String\n    transform input =\n        \"\"\n\n    config\n    |> Select.withTransformInput transform\n\n","type":"(String.String -> String.String) -> Select.Config msg item -> Select.Config msg item"},{"name":"withTransformQuery","comment":" Transform the input query before performing the search\nReturn Nothing to prevent searching\n\n    transform : String -> Maybe String\n    transform query =\n        if String.length query < 4 then\n            Nothing\n        else\n            Just query\n\n    config\n    |> Select.withTransformQuery transform\n\n","type":"(String.String -> String.String) -> Select.Config msg item -> Select.Config msg item"},{"name":"withValueSeparators","comment":" Specify a custom list of separators for the query\nThe default is `[ \"\\n\", \"\\t\", \",\" ]`\n\n    config\n        |> Select.withValueSeparators []\n\n","type":"List.List String.String -> Select.Config msg item -> Select.Config msg item"}],"binops":[]}]