12 | module Text.Html.Attributes
18 | import Text.Html.Attributes.Types
19 | import Text.Html.Attributes.Validation
20 | import Text.Html.Types
21 | import Text.Html.Values
31 | accesskey : Key -> Attribute
32 | accesskey key = MkAttribute "accesskey" (Just $
escape $
show $
key.char)
36 | action : Url -> Attribute
37 | action = MkAttribute "action" . Just . escape . show
46 | aria_star : (name : NonWhitespace) -> (value : String) -> Attribute
49 | let escapedName := show $
escape $
show name in
50 | MkAttribute "aria-\{escapedName}" . Just . escape
54 | autocorrect : AutocorrectValue -> Attribute
55 | autocorrect = MkAttribute "autocorrect" . Just . escape . show
59 | autofocus : Attribute
60 | autofocus = MkAttribute "autofocus" Nothing
66 | class : Identifiers -> Attribute
67 | class = MkAttribute "class" . Just . escape . show
71 | contenteditable : ContenteditableValue -> Attribute
72 | contenteditable = MkAttribute "contenteditable" . Just . escape . show
76 | data_star : (name : NonWhitespace) -> (value : String) -> Attribute
78 | let escapedName := show $
escape $
show name in
79 | MkAttribute "data-\{escapedName}" . Just . escape
83 | dir : DirValue -> Attribute
84 | dir = MkAttribute "dir" . Just . escape . show
88 | draggable : Bool -> Attribute
89 | draggable True = MkAttribute "draggable" $
Just $
escape "true"
90 | draggable False = MkAttribute "draggable" $
Just $
escape "false"
94 | enterkeyhint : EnterkeyhintValue -> Attribute
95 | enterkeyhint = MkAttribute "enterkeyhint" . Just . escape . show
99 | exportparts : ExportpartsValue -> Attribute
100 | exportparts = MkAttribute "exportparts" . Just . escape . show
119 | id : Identifier -> Attribute
120 | id = MkAttribute "id" . Just . escape . show
125 | inert = MkAttribute "inert" Nothing
129 | inputmode : InputmodeValue -> Attribute
130 | inputmode = MkAttribute "inputmode" . Just . escape . show
134 | itemid : ItemidValue -> Attribute
135 | itemid = MkAttribute "itemid" . Just . escape . show
139 | itemprop : String -> Attribute
140 | itemprop = MkAttribute "itemprop" . Just . escape
144 | itemref : Identifiers -> Attribute
145 | itemref = MkAttribute "itemref" . Just . escape . show
149 | itemscope : Attribute
150 | itemscope = MkAttribute "itemscope" Nothing
154 | itemtype : Urls -> Attribute
155 | itemtype = MkAttribute "itemtype" . Just . escape . show
159 | hidden : HiddenValue -> Attribute
160 | hidden = MkAttribute "hidden" . Just . escape . show
162 | namespace HiddenEmpty
167 | hidden = MkAttribute "hidden" Nothing
171 | lang : LanguageTag -> Attribute
172 | lang = MkAttribute "lang" . Just . escape . show
176 | nonce : String -> Attribute
177 | nonce = MkAttribute "nonce" . Just . escape
181 | part : Identifier -> Attribute
182 | part = MkAttribute "part" . Just . escape . show
186 | popover : PopoverValue -> Attribute
187 | popover = MkAttribute "popover" . Just . escape . show
191 | role : RoleValue -> Attribute
192 | role = MkAttribute "role" . Just . escape . show
196 | slot : NonWhitespace -> Attribute
197 | slot = MkAttribute "slot" . Just . escape . show
201 | spellcheck : Bool -> Attribute
202 | spellcheck True = MkAttribute "spellcheck" $
Just $
escape "true"
203 | spellcheck False = MkAttribute "spellcheck" $
Just $
escape "false"
207 | style : CssValue -> Attribute
208 | style = MkAttribute "style" . Just . escape . show
212 | tabindex : TabindexValue -> Attribute
213 | tabindex = MkAttribute "tabindex" . Just . escape . show
217 | title : String -> Attribute
218 | title = MkAttribute "title" . Just . escape
222 | translate : Bool -> Attribute
223 | translate True = MkAttribute "translate" $
Just $
escape "true"
224 | translate False = MkAttribute "translate" $
Just $
escape "false"
232 | accept : FileTypes -> Attribute
234 | MkAttribute "accept" (Just $
escape $
joinBy "," $
toList fileTypes.values)
238 | accept_charset : Charset -> Attribute
239 | accept_charset = MkAttribute "accept-charset" . Just . escape . show
243 | alt : String -> Attribute
244 | alt = MkAttribute "alt" . Just . escape
248 | as : AsValue -> Attribute
249 | as = MkAttribute "as" . Just . escape . show
254 | async = MkAttribute "async" Nothing
258 | autocomplete : AutocompleteValue -> Attribute
259 | autocomplete = MkAttribute "autocomplete" . Just . escape . show
263 | autoplay : Attribute
264 | autoplay = MkAttribute "autoplay" Nothing
273 | charset : Charset -> Attribute
274 | charset = MkAttribute "charset" . Just . escape . show
279 | check = MkAttribute "check" Nothing
283 | cite : Uri -> Attribute
284 | cite = MkAttribute "cite" . Just . escape . show
288 | cols : Nat -> Attribute
289 | cols = MkAttribute "cols" . Just . escape . show
293 | colspan : Int -> Attribute
294 | colspan = MkAttribute "colspan" . Just . escape . show
307 | content : (content : NonWhitespace) -> Attribute
308 | content = MkAttribute "content" . Just . escape . show
312 | controls : Attribute
313 | controls = MkAttribute "controls" Nothing
315 | namespace CoordsCircle
319 | coords : (x : Double) -> (y : Double) -> (r : Double) -> Attribute
320 | coords x y r = MkAttribute "coords" $
Just $
escape $
show $
Circle x y r
322 | namespace CoordsPoly
326 | coords : (x1 : Double)
330 | -> List (Double, Double)
332 | coords x1 y1 x2 y2 xs =
333 | MkAttribute "coords" $
Just $
escape $
show $
Poly x1 y1 x2 y2 xs
335 | namespace CoordsRectangle
339 | coords : (x1 : Double)
344 | coords x1 y1 x2 y2 =
345 | MkAttribute "coords" $
Just $
escape $
show $
Rect x1 y1 x2 y2
349 | crossorigin : CrossoriginValue -> Attribute
350 | crossorigin = MkAttribute "crossorigin" . Just . escape . show
357 | data_ : Url -> Attribute
358 | data_ = MkAttribute "data" . Just . escape . show
362 | datetime : Datetime -> Attribute
363 | datetime = MkAttribute "datetime" . Just . escape . show
367 | decoding : DecodingValue -> Attribute
368 | decoding = MkAttribute "decoding" . Just . escape . show
375 | default_ : Attribute
376 | default_ = MkAttribute "default" Nothing
381 | defer = MkAttribute "defer" Nothing
385 | dirname : DirnameValue -> Attribute
386 | dirname = MkAttribute "dirname" . Just . escape . show
390 | disabled : Attribute
391 | disabled = MkAttribute "disabled" Nothing
397 | download : Attribute
398 | download = MkAttribute "download" Nothing
400 | namespace DownloadFilename
404 | download : Filename -> Attribute
405 | download = MkAttribute "download" . Just . escape . show
409 | enctype : EnctypeValue -> Attribute
410 | enctype = MkAttribute "enctype" . Just . escape . show
414 | elementtiming : NonWhitespace -> Attribute
415 | elementtiming = MkAttribute "elementtiming" . Just . escape . show
419 | fetchpriority : FetchpriorityValue -> Attribute
420 | fetchpriority = MkAttribute "fetchpriority" . Just . escape . show
424 | for : Identifiers -> Attribute
425 | for = MkAttribute "for" . Just . escape . show
429 | form : Identifier -> Attribute
430 | form = MkAttribute "form" . Just . escape . show
434 | formaction : Url -> Attribute
435 | formaction = MkAttribute "formaction" . Just . escape . show
439 | formenctype : EnctypeValue -> Attribute
440 | formenctype = MkAttribute "formenctype" . Just . escape . show
444 | formmethod : FormmethodValue -> Attribute
445 | formmethod = MkAttribute "formmethod" . Just . escape . show
449 | formnovalidate : Attribute
450 | formnovalidate = MkAttribute "formnovalidate" Nothing
454 | formtarget : FormtargetValue -> Attribute
455 | formtarget = MkAttribute "formtarget" . Just . escape . show
459 | headers : Identifier -> Attribute
460 | headers = MkAttribute "headers" . Just . escape . show
464 | height : Nat -> Attribute
465 | height = MkAttribute "height" . Just . escape . show
469 | high : Integer -> Attribute
470 | high = MkAttribute "high" . Just . escape . show
479 | href : Href -> Attribute
480 | href = MkAttribute "href" . Just . escape . show
484 | hreflang : LanguageTag -> Attribute
485 | hreflang = MkAttribute "hreflang" . Just . escape . show
489 | http_equiv : HttpEquivValue -> Attribute
490 | http_equiv = MkAttribute "http-equiv" . Just . escape . show
494 | integrity : IntegrityValue -> Attribute
495 | integrity = MkAttribute "integrity" . Just . escape . show
500 | ismap = MkAttribute "ismap" Nothing
504 | kind : KindValue -> Attribute
505 | kind = MkAttribute "kind" . Just . escape . show
509 | label : (name : NonWhitespace) -> Attribute
510 | label = MkAttribute "label" . Just . escape . show
514 | loading : LoadingValue -> Attribute
515 | loading = MkAttribute "loading" . Just . escape . show
519 | list : Identifier -> Attribute
520 | list = MkAttribute "list" . Just . escape . show
525 | loop = MkAttribute "loop" Nothing
529 | low : Integer -> Attribute
530 | low = MkAttribute "low" . Just . escape . show
536 | max : Date -> Attribute
537 | max = MkAttribute "max" . Just . escape . show
539 | namespace MaxYearMonth
543 | max : YearMonth -> Attribute
544 | max = MkAttribute "max" . Just . escape . show
546 | namespace MaxYearWeek
550 | max : YearWeek -> Attribute
551 | max = MkAttribute "max" . Just . escape . show
557 | max : Time -> Attribute
558 | max = MkAttribute "max" . Just . escape . show
560 | namespace MaxDatetime
564 | max : Datetime -> Attribute
565 | max = MkAttribute "max" . Just . escape . show
567 | namespace MaxNumber
571 | max : Integer -> Attribute
572 | max = MkAttribute "max" . Just . escape . show
576 | maxlength : Nat -> Attribute
577 | maxlength = MkAttribute "maxlength" . Just . escape . show
581 | media : MediaQuery -> Attribute
582 | media = MkAttribute "media" . Just . escape . show
586 | method : MethodValue -> Attribute
587 | method = MkAttribute "method" . Just . escape . show
593 | min : Date -> Attribute
594 | min = MkAttribute "min" . Just . escape . show
596 | namespace MinYearMonth
600 | min : YearMonth -> Attribute
601 | min = MkAttribute "min" . Just . escape . show
603 | namespace MinYearWeek
607 | min : YearWeek -> Attribute
608 | min = MkAttribute "min" . Just . escape . show
614 | min : Time -> Attribute
615 | min = MkAttribute "min" . Just . escape . show
617 | namespace MinDatetime
621 | min : Datetime -> Attribute
622 | min = MkAttribute "min" . Just . escape . show
624 | namespace MinNumber
628 | min : Integer -> Attribute
629 | min = MkAttribute "min" . Just . escape . show
633 | minlength : Nat -> Attribute
634 | minlength = MkAttribute "minlength" . Just . escape . show
638 | multiple : Attribute
639 | multiple = MkAttribute "multiple" Nothing
644 | muted = MkAttribute "muted" Nothing
648 | novalidate : Attribute
649 | novalidate = MkAttribute "novalidate" Nothing
657 | open_ = MkAttribute "open" Nothing
670 | name : (name : NonWhitespace) -> Attribute
671 | name = MkAttribute "name" . Just . escape . show
675 | optimum : Integer -> Attribute
676 | optimum = MkAttribute "optimum" . Just . escape . show
680 | pattern : RegExp -> Attribute
681 | pattern = MkAttribute "pattern" . Just . escape . show
685 | ping : Urls -> Attribute
686 | ping = MkAttribute "ping" . Just . escape . show
690 | placeholder : String -> Attribute
691 | placeholder = MkAttribute "placeholder" . Just . escape
695 | playsinline : Attribute
696 | playsinline = MkAttribute "playsinline" Nothing
700 | poster : Url -> Attribute
701 | poster = MkAttribute "poster" . Just . escape . show
705 | preload : PreloadValue -> Attribute
706 | preload = MkAttribute "preload" . Just . escape . show
710 | readonly : Attribute
711 | readonly = MkAttribute "readonly" Nothing
715 | referrerpolicy : ReferrerpolicyValue -> Attribute
716 | referrerpolicy = MkAttribute "referrerpolicy" . Just . escape . show
722 | rel : RelValue -> Attribute
723 | rel = MkAttribute "rel" . Just . escape . show
727 | required : Attribute
728 | required = MkAttribute "required" Nothing
732 | reversed : Attribute
733 | reversed = MkAttribute "reversed" Nothing
737 | rows : Positive -> Attribute
738 | rows = MkAttribute "rows" . Just . escape . show
742 | rowspan : Nat -> Attribute
743 | rowspan = MkAttribute "rowspan" . Just . escape . show
747 | sandbox : SandboxValue -> Attribute
748 | sandbox = MkAttribute "sandbox" . Just . escape . show
752 | scope : ScopeValue -> Attribute
753 | scope = MkAttribute "scope" . Just . escape . show
757 | selected : Attribute
758 | selected = MkAttribute "selected" Nothing
762 | shape : ShapeValue -> Attribute
763 | shape = MkAttribute "shape" . Just . escape . show
767 | size : Positive -> Attribute
768 | size = MkAttribute "size" . Just . escape . show
772 | sizes : SizesValue -> Attribute
773 | sizes = MkAttribute "sizes" . Just . escape . show
777 | span : Positive -> Attribute
778 | span = MkAttribute "span" . Just . escape . show
784 | src : Url -> Attribute
785 | src = MkAttribute "src" . Just . escape . show
789 | srcdoc : SrcdocValue -> Attribute
790 | srcdoc = MkAttribute "srcdoc" . Just . escape . show
794 | srclang : LanguageTag -> Attribute
795 | srclang = MkAttribute "srclang" . Just . escape . show
801 | srcset : List1 SrcsetValue -> Attribute
802 | srcset = MkAttribute "srcset" . Just . escape . toString
806 | start : Positive -> Attribute
807 | start = MkAttribute "start" . Just . escape . show
811 | step : PositiveFloat -> Attribute
812 | step = MkAttribute "step" . Just . escape . show
824 | target : TargetValue -> Attribute
825 | target = MkAttribute "target" . Just . escape . show
829 | type : TypeValue -> Attribute
830 | type = MkAttribute "type" . Just . escape . show
836 | type : MimeTypeValue -> Attribute
837 | type = MkAttribute "type" . Just . escape . show
839 | namespace NumberingType
843 | type : NumberingTypeValue -> Attribute
844 | type = MkAttribute "type" . Just . escape . show
846 | namespace ScriptType
850 | type : ScriptTypeValue -> Attribute
851 | type = MkAttribute "type" . Just . escape . show
855 | usemap : PartialUrl -> Attribute
856 | usemap = MkAttribute "usemap" . Just . escape . show
860 | value : String -> Attribute
861 | value = MkAttribute "value" . Just . escape
863 | namespace NumberValue
873 | value : Integer -> Attribute
874 | value = MkAttribute "value" . Just . escape . show
878 | width : Nat -> Attribute
879 | width = MkAttribute "width" . Just . escape . show
883 | wrap : WrapValue -> Attribute
884 | wrap = MkAttribute "wrap" . Just . escape . show