|
|
@ -43,7 +43,6 @@ import org.w3c.dom.HTMLTextAreaElement |
|
|
|
import org.w3c.dom.HTMLUListElement |
|
|
|
import org.w3c.dom.HTMLUListElement |
|
|
|
import org.w3c.dom.Text |
|
|
|
import org.w3c.dom.Text |
|
|
|
|
|
|
|
|
|
|
|
typealias StyleBuilderContext = StyleBuilder.() -> Unit |
|
|
|
|
|
|
|
typealias AttrBuilderContext<T> = AttrsBuilder<T>.() -> Unit |
|
|
|
typealias AttrBuilderContext<T> = AttrsBuilder<T>.() -> Unit |
|
|
|
typealias ContentBuilder<T> = @Composable ElementScope<T>.() -> Unit |
|
|
|
typealias ContentBuilder<T> = @Composable ElementScope<T>.() -> Unit |
|
|
|
|
|
|
|
|
|
|
@ -60,13 +59,11 @@ fun Text(value: String) { |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Div( |
|
|
|
inline fun Div( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLDivElement> |
|
|
|
content: ContentBuilder<HTMLDivElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "div", |
|
|
|
tagName = "div", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -75,7 +72,6 @@ inline fun Div( |
|
|
|
inline fun A( |
|
|
|
inline fun A( |
|
|
|
href: String? = null, |
|
|
|
href: String? = null, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.A> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.A> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLAnchorElement> |
|
|
|
content: ContentBuilder<HTMLAnchorElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement<Tag.A, HTMLAnchorElement>( |
|
|
|
TagElement<Tag.A, HTMLAnchorElement>( |
|
|
@ -84,7 +80,6 @@ inline fun A( |
|
|
|
href(href) |
|
|
|
href(href) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -94,7 +89,6 @@ inline fun Input( |
|
|
|
type: InputType = InputType.Text, |
|
|
|
type: InputType = InputType.Text, |
|
|
|
value: String = "", |
|
|
|
value: String = "", |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Input> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Input> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLInputElement> = {} |
|
|
|
content: ContentBuilder<HTMLInputElement> = {} |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement<Tag.Input, HTMLInputElement>( |
|
|
|
TagElement<Tag.Input, HTMLInputElement>( |
|
|
@ -104,7 +98,6 @@ inline fun Input( |
|
|
|
value(value) |
|
|
|
value(value) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -112,135 +105,116 @@ inline fun Input( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Button( |
|
|
|
inline fun Button( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Button> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Button> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("button", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("button", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H1( |
|
|
|
inline fun H1( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h1", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h1", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H2( |
|
|
|
inline fun H2( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h2", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h2", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H3( |
|
|
|
inline fun H3( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h3", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h3", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H4( |
|
|
|
inline fun H4( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h4", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h4", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H5( |
|
|
|
inline fun H5( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h5", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h5", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun H6( |
|
|
|
inline fun H6( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.H> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
content: ContentBuilder<HTMLHeadingElement> |
|
|
|
) = TagElement("h6", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("h6", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun P( |
|
|
|
inline fun P( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.P> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.P> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLParagraphElement> |
|
|
|
content: ContentBuilder<HTMLParagraphElement> |
|
|
|
) = TagElement("p", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("p", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Em( |
|
|
|
inline fun Em( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement("em", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("em", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun I( |
|
|
|
inline fun I( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement("i", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("i", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun B( |
|
|
|
inline fun B( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement("b", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("b", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Small( |
|
|
|
inline fun Small( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement("small", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("small", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Span( |
|
|
|
inline fun Span( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Span> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Span> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLSpanElement> |
|
|
|
content: ContentBuilder<HTMLSpanElement> |
|
|
|
) = TagElement("span", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("span", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Br( |
|
|
|
inline fun Br( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Br> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Br> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLBRElement> |
|
|
|
content: ContentBuilder<HTMLBRElement> |
|
|
|
) = TagElement("br", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("br", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Ul( |
|
|
|
inline fun Ul( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Ul> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Ul> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLUListElement>, |
|
|
|
content: ContentBuilder<HTMLUListElement>, |
|
|
|
) = TagElement("ul", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("ul", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Ol( |
|
|
|
inline fun Ol( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Ol> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Ol> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLOListElement> |
|
|
|
content: ContentBuilder<HTMLOListElement> |
|
|
|
) = TagElement("ol", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("ol", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun DOMScope<HTMLOListElement>.Li( |
|
|
|
inline fun DOMScope<HTMLOListElement>.Li( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Li> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Li> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLLIElement> |
|
|
|
content: ContentBuilder<HTMLLIElement> |
|
|
|
) = TagElement("li", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("li", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun DOMScope<HTMLUListElement>.Li( |
|
|
|
inline fun DOMScope<HTMLUListElement>.Li( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Li> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Li> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLLIElement> |
|
|
|
content: ContentBuilder<HTMLLIElement> |
|
|
|
) = TagElement("li", applyAttrs = attrs, applyStyle = style, content = content) |
|
|
|
) = TagElement("li", applyAttrs = attrs, content = content) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Img( |
|
|
|
inline fun Img( |
|
|
|
src: String, |
|
|
|
src: String, |
|
|
|
alt: String = "", |
|
|
|
alt: String = "", |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Img> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Img> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLImageElement> = {} |
|
|
|
content: ContentBuilder<HTMLImageElement> = {} |
|
|
|
) = TagElement<Tag.Img, HTMLImageElement>( |
|
|
|
) = TagElement<Tag.Img, HTMLImageElement>( |
|
|
|
tagName = "img", |
|
|
|
tagName = "img", |
|
|
@ -248,14 +222,13 @@ inline fun Img( |
|
|
|
src(src).alt(alt) |
|
|
|
src(src).alt(alt) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Form( |
|
|
|
inline fun Form( |
|
|
|
action: String? = null, |
|
|
|
action: String? = null, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Form> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Form> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLFormElement> |
|
|
|
content: ContentBuilder<HTMLFormElement> |
|
|
|
) = TagElement<Tag.Form, HTMLFormElement>( |
|
|
|
) = TagElement<Tag.Form, HTMLFormElement>( |
|
|
|
tagName = "form", |
|
|
|
tagName = "form", |
|
|
@ -263,18 +236,16 @@ inline fun Form( |
|
|
|
if (!action.isNullOrEmpty()) action(action) |
|
|
|
if (!action.isNullOrEmpty()) action(action) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Select( |
|
|
|
inline fun Select( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Select> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Select> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLSelectElement> |
|
|
|
content: ContentBuilder<HTMLSelectElement> |
|
|
|
) = TagElement( |
|
|
|
) = TagElement( |
|
|
|
tagName = "select", |
|
|
|
tagName = "select", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -282,7 +253,6 @@ inline fun Select( |
|
|
|
inline fun DOMScope<HTMLUListElement>.Option( |
|
|
|
inline fun DOMScope<HTMLUListElement>.Option( |
|
|
|
value: String, |
|
|
|
value: String, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Option> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Option> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLOptionElement> |
|
|
|
content: ContentBuilder<HTMLOptionElement> |
|
|
|
) = TagElement<Tag.Option, HTMLOptionElement>( |
|
|
|
) = TagElement<Tag.Option, HTMLOptionElement>( |
|
|
|
tagName = "option", |
|
|
|
tagName = "option", |
|
|
@ -290,7 +260,6 @@ inline fun DOMScope<HTMLUListElement>.Option( |
|
|
|
value(value) |
|
|
|
value(value) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -298,7 +267,6 @@ inline fun DOMScope<HTMLUListElement>.Option( |
|
|
|
inline fun OptGroup( |
|
|
|
inline fun OptGroup( |
|
|
|
label: String, |
|
|
|
label: String, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.OptGroup> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.OptGroup> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLOptGroupElement> |
|
|
|
content: ContentBuilder<HTMLOptGroupElement> |
|
|
|
) = TagElement<Tag.OptGroup, HTMLOptGroupElement>( |
|
|
|
) = TagElement<Tag.OptGroup, HTMLOptGroupElement>( |
|
|
|
tagName = "optgroup", |
|
|
|
tagName = "optgroup", |
|
|
@ -306,34 +274,29 @@ inline fun OptGroup( |
|
|
|
label(label) |
|
|
|
label(label) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Section( |
|
|
|
inline fun Section( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement( |
|
|
|
) = TagElement( |
|
|
|
tagName = "section", |
|
|
|
tagName = "section", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun TextArea( |
|
|
|
inline fun TextArea( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.TextArea> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.TextArea> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
value: String |
|
|
|
value: String |
|
|
|
) = TagElement<Tag.TextArea, HTMLTextAreaElement>( |
|
|
|
) = TagElement<Tag.TextArea, HTMLTextAreaElement>( |
|
|
|
tagName = "textarea", |
|
|
|
tagName = "textarea", |
|
|
|
applyAttrs = { |
|
|
|
applyAttrs = { |
|
|
|
value(value) |
|
|
|
value(value) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
} |
|
|
|
applyStyle = style |
|
|
|
|
|
|
|
) { |
|
|
|
) { |
|
|
|
Text(value) |
|
|
|
Text(value) |
|
|
|
} |
|
|
|
} |
|
|
@ -341,25 +304,21 @@ inline fun TextArea( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Nav( |
|
|
|
inline fun Nav( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Nav> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Nav> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) = TagElement( |
|
|
|
) = TagElement( |
|
|
|
tagName = "nav", |
|
|
|
tagName = "nav", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Pre( |
|
|
|
inline fun Pre( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Pre> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Pre> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLPreElement> |
|
|
|
content: ContentBuilder<HTMLPreElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "pre", |
|
|
|
tagName = "pre", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -367,13 +326,11 @@ inline fun Pre( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Code( |
|
|
|
inline fun Code( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Code> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Code> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
content: ContentBuilder<HTMLElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "code", |
|
|
|
tagName = "code", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -381,13 +338,11 @@ inline fun Code( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Main( |
|
|
|
inline fun Main( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement<Tag.Div, HTMLAnchorElement>( |
|
|
|
TagElement<Tag.Div, HTMLAnchorElement>( |
|
|
|
tagName = "main", |
|
|
|
tagName = "main", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -395,13 +350,11 @@ inline fun Main( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Footer( |
|
|
|
inline fun Footer( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Div> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement<Tag.Div, HTMLAnchorElement>( |
|
|
|
TagElement<Tag.Div, HTMLAnchorElement>( |
|
|
|
tagName = "footer", |
|
|
|
tagName = "footer", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -410,7 +363,6 @@ inline fun Footer( |
|
|
|
inline fun Label( |
|
|
|
inline fun Label( |
|
|
|
forId: String? = null, |
|
|
|
forId: String? = null, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Label> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Label> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
content: ContentBuilder<HTMLElement> = {} |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement<Tag.Label, HTMLAnchorElement>( |
|
|
|
TagElement<Tag.Label, HTMLAnchorElement>( |
|
|
@ -419,7 +371,6 @@ inline fun Label( |
|
|
|
forId(forId) |
|
|
|
forId(forId) |
|
|
|
attrs() |
|
|
|
attrs() |
|
|
|
}, |
|
|
|
}, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -427,13 +378,11 @@ inline fun Label( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Table( |
|
|
|
inline fun Table( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Table> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Table> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableElement> |
|
|
|
content: ContentBuilder<HTMLTableElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "table", |
|
|
|
tagName = "table", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -441,13 +390,11 @@ inline fun Table( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Caption( |
|
|
|
inline fun Caption( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Caption> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Caption> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableCaptionElement> |
|
|
|
content: ContentBuilder<HTMLTableCaptionElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "caption", |
|
|
|
tagName = "caption", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -455,13 +402,11 @@ inline fun Caption( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Col( |
|
|
|
inline fun Col( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Col> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Col> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableColElement> |
|
|
|
content: ContentBuilder<HTMLTableColElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "col", |
|
|
|
tagName = "col", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -469,13 +414,11 @@ inline fun Col( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Colgroup( |
|
|
|
inline fun Colgroup( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Colgroup> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Colgroup> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableColElement> |
|
|
|
content: ContentBuilder<HTMLTableColElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "colgroup", |
|
|
|
tagName = "colgroup", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -483,13 +426,11 @@ inline fun Colgroup( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Tr( |
|
|
|
inline fun Tr( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tr> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tr> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableRowElement> |
|
|
|
content: ContentBuilder<HTMLTableRowElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "tr", |
|
|
|
tagName = "tr", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -497,13 +438,11 @@ inline fun Tr( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Thead( |
|
|
|
inline fun Thead( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Thead> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Thead> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "thead", |
|
|
|
tagName = "thead", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -511,13 +450,11 @@ inline fun Thead( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Th( |
|
|
|
inline fun Th( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Th> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Th> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableCellElement> |
|
|
|
content: ContentBuilder<HTMLTableCellElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "th", |
|
|
|
tagName = "th", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -525,13 +462,11 @@ inline fun Th( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Td( |
|
|
|
inline fun Td( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Td> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Td> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableCellElement> |
|
|
|
content: ContentBuilder<HTMLTableCellElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "td", |
|
|
|
tagName = "td", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -539,13 +474,11 @@ inline fun Td( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Tbody( |
|
|
|
inline fun Tbody( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tbody> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tbody> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "tbody", |
|
|
|
tagName = "tbody", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -553,13 +486,11 @@ inline fun Tbody( |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
inline fun Tfoot( |
|
|
|
inline fun Tfoot( |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tfoot> = {}, |
|
|
|
crossinline attrs: AttrBuilderContext<Tag.Tfoot> = {}, |
|
|
|
crossinline style: StyleBuilderContext = {}, |
|
|
|
|
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
content: ContentBuilder<HTMLTableSectionElement> |
|
|
|
) { |
|
|
|
) { |
|
|
|
TagElement( |
|
|
|
TagElement( |
|
|
|
tagName = "tfoot", |
|
|
|
tagName = "tfoot", |
|
|
|
applyAttrs = attrs, |
|
|
|
applyAttrs = attrs, |
|
|
|
applyStyle = style, |
|
|
|
|
|
|
|
content = content |
|
|
|
content = content |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|