{-# LANGUAGE OverloadedStrings #-}
module Miso.Native.X.Element.Input.Property
(
androidFullscreenMode_
, confirmType_
, disabled_
, inputFilter_
, iosAutoCorrect_
, iosSpellCheck_
, maxlength_
, placeholder_
, readonly_
, showSoftInputOnFocus_
, type_
, InputType (..)
, ConfirmType (..)
) where
import Miso.JSON (ToJSON(..))
import Miso.String (MisoString)
import Miso.Types (Attribute)
import Miso.Property
data InputType
= InputNumber
| InputText
| InputDigit
| InputPassword
| InputTel
| InputEmail
deriving (Int -> InputType -> ShowS
[InputType] -> ShowS
InputType -> String
(Int -> InputType -> ShowS)
-> (InputType -> String)
-> ([InputType] -> ShowS)
-> Show InputType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputType -> ShowS
showsPrec :: Int -> InputType -> ShowS
$cshow :: InputType -> String
show :: InputType -> String
$cshowList :: [InputType] -> ShowS
showList :: [InputType] -> ShowS
Show, InputType -> InputType -> Bool
(InputType -> InputType -> Bool)
-> (InputType -> InputType -> Bool) -> Eq InputType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputType -> InputType -> Bool
== :: InputType -> InputType -> Bool
$c/= :: InputType -> InputType -> Bool
/= :: InputType -> InputType -> Bool
Eq)
instance ToJSON InputType where
toJSON :: InputType -> Value
toJSON InputType
InputNumber = Value
"number"
toJSON InputType
InputText = Value
"text"
toJSON InputType
InputDigit = Value
"digit"
toJSON InputType
InputPassword = Value
"password"
toJSON InputType
InputTel = Value
"tel"
toJSON InputType
InputEmail = Value
"email"
data ConfirmType
= ConfirmSearch
| ConfirmSend
| ConfirmGo
| ConfirmDone
| ConfirmNext
deriving (Int -> ConfirmType -> ShowS
[ConfirmType] -> ShowS
ConfirmType -> String
(Int -> ConfirmType -> ShowS)
-> (ConfirmType -> String)
-> ([ConfirmType] -> ShowS)
-> Show ConfirmType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfirmType -> ShowS
showsPrec :: Int -> ConfirmType -> ShowS
$cshow :: ConfirmType -> String
show :: ConfirmType -> String
$cshowList :: [ConfirmType] -> ShowS
showList :: [ConfirmType] -> ShowS
Show, ConfirmType -> ConfirmType -> Bool
(ConfirmType -> ConfirmType -> Bool)
-> (ConfirmType -> ConfirmType -> Bool) -> Eq ConfirmType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfirmType -> ConfirmType -> Bool
== :: ConfirmType -> ConfirmType -> Bool
$c/= :: ConfirmType -> ConfirmType -> Bool
/= :: ConfirmType -> ConfirmType -> Bool
Eq)
instance ToJSON ConfirmType where
toJSON :: ConfirmType -> Value
toJSON ConfirmType
ConfirmSearch = Value
"search"
toJSON ConfirmType
ConfirmSend = Value
"send"
toJSON ConfirmType
ConfirmGo = Value
"go"
toJSON ConfirmType
ConfirmDone = Value
"done"
toJSON ConfirmType
ConfirmNext = Value
"next"
androidFullscreenMode_ :: Bool -> Attribute model action
androidFullscreenMode_ :: forall model action. Bool -> Attribute model action
androidFullscreenMode_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"android-fullscreen-mode"
confirmType_ :: ConfirmType -> Attribute model action
confirmType_ :: forall model action. ConfirmType -> Attribute model action
confirmType_ = MisoString -> ConfirmType -> Attribute model action
forall a model action.
ToJSON a =>
MisoString -> a -> Attribute model action
prop MisoString
"confirm-type"
disabled_ :: Bool -> Attribute model action
disabled_ :: forall model action. Bool -> Attribute model action
disabled_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"disabled"
inputFilter_ :: MisoString -> Attribute model action
inputFilter_ :: forall model action. MisoString -> Attribute model action
inputFilter_ = MisoString -> MisoString -> Attribute model action
forall model action.
MisoString -> MisoString -> Attribute model action
textProp MisoString
"input-filter"
iosAutoCorrect_ :: Bool -> Attribute model action
iosAutoCorrect_ :: forall model action. Bool -> Attribute model action
iosAutoCorrect_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"ios-auto-correct"
iosSpellCheck_ :: Bool -> Attribute model action
iosSpellCheck_ :: forall model action. Bool -> Attribute model action
iosSpellCheck_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"ios-spell-check"
maxlength_ :: Int -> Attribute model action
maxlength_ :: forall model action. Int -> Attribute model action
maxlength_ = MisoString -> Int -> Attribute model action
forall model action. MisoString -> Int -> Attribute model action
intProp MisoString
"maxlength"
placeholder_ :: MisoString -> Attribute model action
placeholder_ :: forall model action. MisoString -> Attribute model action
placeholder_ = MisoString -> MisoString -> Attribute model action
forall model action.
MisoString -> MisoString -> Attribute model action
textProp MisoString
"placeholder"
readonly_ :: Bool -> Attribute model action
readonly_ :: forall model action. Bool -> Attribute model action
readonly_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"readonly"
showSoftInputOnFocus_ :: Bool -> Attribute model action
showSoftInputOnFocus_ :: forall model action. Bool -> Attribute model action
showSoftInputOnFocus_ = MisoString -> Bool -> Attribute model action
forall model action. MisoString -> Bool -> Attribute model action
boolProp MisoString
"show-soft-input-on-focus"
type_ :: InputType -> Attribute model action
type_ :: forall model action. InputType -> Attribute model action
type_ = MisoString -> InputType -> Attribute model action
forall a model action.
ToJSON a =>
MisoString -> a -> Attribute model action
prop MisoString
"type"