{-# LANGUAGE
GeneralizedNewtypeDeriving
, OverloadedStrings
, NoImplicitPrelude
#-}
module Clay.Dynamic
(
UserInput
, userInput
, inputEnabled, inputDisabled
, UserModify
, userModify
, readOnly, readWrite, writeOnly
, UserSelect
, userSelect
, selectText, selectToggle, selectElement, selectElements
, UserFocus
, userFocus
, selectAll, selectBefore, selectAfter, selectSame, selectMenu
)
where
import Clay.Common
import Clay.Property
import Clay.Stylesheet
import Data.Monoid hiding (All)
userInput :: UserInput -> Css
userInput :: UserInput -> Css
userInput = Prefixed -> UserInput -> Css
forall a. Val a => Prefixed -> a -> Css
prefixed (Prefixed
browsers Prefixed -> Prefixed -> Prefixed
forall a. Semigroup a => a -> a -> a
<> Prefixed
"user-input")
newtype UserInput = UserInput Value
deriving (UserInput -> Value
(UserInput -> Value) -> Val UserInput
forall a. (a -> Value) -> Val a
value :: UserInput -> Value
$cvalue :: UserInput -> Value
Val, UserInput
UserInput -> Inherit UserInput
forall a. a -> Inherit a
inherit :: UserInput
$cinherit :: UserInput
Inherit, UserInput
UserInput -> None UserInput
forall a. a -> None a
none :: UserInput
$cnone :: UserInput
None)
inputEnabled, inputDisabled :: UserInput
inputEnabled :: UserInput
inputEnabled = Value -> UserInput
UserInput Value
"enabled"
inputDisabled :: UserInput
inputDisabled = Value -> UserInput
UserInput Value
"disabled"
userModify :: UserModify -> Css
userModify :: UserModify -> Css
userModify = Prefixed -> UserModify -> Css
forall a. Val a => Prefixed -> a -> Css
prefixed (Prefixed
browsers Prefixed -> Prefixed -> Prefixed
forall a. Semigroup a => a -> a -> a
<> Prefixed
"user-modify")
newtype UserModify = UserModify Value
deriving (UserModify -> Value
(UserModify -> Value) -> Val UserModify
forall a. (a -> Value) -> Val a
value :: UserModify -> Value
$cvalue :: UserModify -> Value
Val, UserModify
UserModify -> Inherit UserModify
forall a. a -> Inherit a
inherit :: UserModify
$cinherit :: UserModify
Inherit)
readOnly, readWrite, writeOnly :: UserModify
readOnly :: UserModify
readOnly = Value -> UserModify
UserModify Value
"readonly"
readWrite :: UserModify
readWrite = Value -> UserModify
UserModify Value
"read-write"
writeOnly :: UserModify
writeOnly = Value -> UserModify
UserModify Value
"write-only"
userSelect :: UserSelect -> Css
userSelect :: UserSelect -> Css
userSelect = Prefixed -> UserSelect -> Css
forall a. Val a => Prefixed -> a -> Css
prefixed (Prefixed
browsers Prefixed -> Prefixed -> Prefixed
forall a. Semigroup a => a -> a -> a
<> Prefixed
"user-select")
newtype UserSelect = UserSelect Value
deriving (UserSelect -> Value
(UserSelect -> Value) -> Val UserSelect
forall a. (a -> Value) -> Val a
value :: UserSelect -> Value
$cvalue :: UserSelect -> Value
Val, UserSelect
UserSelect -> Inherit UserSelect
forall a. a -> Inherit a
inherit :: UserSelect
$cinherit :: UserSelect
Inherit, UserSelect
UserSelect -> None UserSelect
forall a. a -> None a
none :: UserSelect
$cnone :: UserSelect
None, UserSelect
UserSelect -> All UserSelect
forall a. a -> All a
all :: UserSelect
$call :: UserSelect
All)
selectText, selectToggle, selectElement, selectElements :: UserSelect
selectText :: UserSelect
selectText = Value -> UserSelect
UserSelect Value
"text"
selectToggle :: UserSelect
selectToggle = Value -> UserSelect
UserSelect Value
"toggle"
selectElement :: UserSelect
selectElement = Value -> UserSelect
UserSelect Value
"element"
selectElements :: UserSelect
selectElements = Value -> UserSelect
UserSelect Value
"elements"
userFocus :: UserFocus -> Css
userFocus :: UserFocus -> Css
userFocus = Prefixed -> UserFocus -> Css
forall a. Val a => Prefixed -> a -> Css
prefixed (Prefixed
browsers Prefixed -> Prefixed -> Prefixed
forall a. Semigroup a => a -> a -> a
<> Prefixed
"user-focus")
newtype UserFocus = UserFocus Value
deriving (UserFocus -> Value
(UserFocus -> Value) -> Val UserFocus
forall a. (a -> Value) -> Val a
value :: UserFocus -> Value
$cvalue :: UserFocus -> Value
Val, UserFocus
UserFocus -> Inherit UserFocus
forall a. a -> Inherit a
inherit :: UserFocus
$cinherit :: UserFocus
Inherit, UserFocus
UserFocus -> None UserFocus
forall a. a -> None a
none :: UserFocus
$cnone :: UserFocus
None, UserFocus
UserFocus -> Normal UserFocus
forall a. a -> Normal a
normal :: UserFocus
$cnormal :: UserFocus
Normal, UserFocus
UserFocus -> Auto UserFocus
forall a. a -> Auto a
auto :: UserFocus
$cauto :: UserFocus
Auto)
selectAll, selectBefore, selectAfter, selectSame, selectMenu :: UserFocus
selectAll :: UserFocus
selectAll = Value -> UserFocus
UserFocus Value
"select-all"
selectBefore :: UserFocus
selectBefore = Value -> UserFocus
UserFocus Value
"select-before"
selectAfter :: UserFocus
selectAfter = Value -> UserFocus
UserFocus Value
"select-after"
selectSame :: UserFocus
selectSame = Value -> UserFocus
UserFocus Value
"select-same"
= Value -> UserFocus
UserFocus Value
"select-menu"