Current section
Files
Jump to
Current section
Files
src/react_gleam@element.erl
-module(react_gleam@element).
-compile(no_auto_import).
-export([node/3, text/1, html/3, base/1, head/2, meta/1, style/2, title/2, body/2, address/2, article/2, aside/2, footer/2, header/2, h1/2, h2/2, h3/2, h4/2, h5/2, h6/2, main/2, nav/2, section/2, blockquote/2, dd/2, 'div'/2, dl/2, dt/2, figcaption/2, figure/2, hr/1, li/2, menu/2, ol/2, p/2, pre/2, ul/2, a/2, abbr/2, b/2, bdi/2, bdo/2, br/1, cite/2, code/2, dfn/2, em/2, i/2, kbd/2, mark/2, rp/2, rt/2, ruby/2, s/2, samp/2, small/2, span/2, strong/2, sub/2, sup/2, time/2, u/2, var_/2, wbr/1, area/1, audio/2, img/1, map_/2, track/2, video/2, embed/1, iframe/1, object/2, param/2, picture/2, portal/1, source/1, svg/2, mathml/2, canvas/2, noscript/2, del/2, ins/2, caption/2, col/2, colgroup/2, table/2, tbody/2, td/2, tfoot/2, th/2, thead/2, tr/2, button/2, datalist/2, fieldset/2, form/2, input/1, label/2, legend/2, meter/2, optgroup/2, option/2, output/2, progress/2, select/2, textarea/1, details/2, dialog/2, summary/2, slot/2, template/2, component/1]).
-export_type([element/0]).
-type element() :: any().
-spec node(
binary(),
list(react_gleam@attribute:attribute(any())),
list(element())
) -> element().
node(Field@0, Field@1, Field@2) ->
'../ffi.mjs':node(Field@0, Field@1, Field@2).
-spec text(binary()) -> element().
text(Field@0) ->
'../ffi.mjs':text(Field@0).
-spec html(list(react_gleam@attribute:attribute(any())), element(), element()) -> element().
html(Attributes, Head, Body) ->
'../ffi.mjs':node(<<"html"/utf8>>, Attributes, [Head, Body]).
-spec base(list(react_gleam@attribute:attribute(any()))) -> element().
base(Attributes) ->
'../ffi.mjs':node(<<"base"/utf8>>, Attributes, []).
-spec head(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
head(Attributes, Children) ->
'../ffi.mjs':node(<<"head"/utf8>>, Attributes, Children).
-spec meta(list(react_gleam@attribute:attribute(any()))) -> element().
meta(Attributes) ->
'../ffi.mjs':node(<<"meta"/utf8>>, Attributes, []).
-spec style(list(react_gleam@attribute:attribute(any())), binary()) -> element().
style(Attributes, Css) ->
'../ffi.mjs':node(<<"style"/utf8>>, Attributes, ['../ffi.mjs':text(Css)]).
-spec title(list(react_gleam@attribute:attribute(any())), binary()) -> element().
title(Attributes, Name) ->
'../ffi.mjs':node(<<"title"/utf8>>, Attributes, ['../ffi.mjs':text(Name)]).
-spec body(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
body(Attributes, Children) ->
'../ffi.mjs':node(<<"body"/utf8>>, Attributes, Children).
-spec address(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
address(Attributes, Children) ->
'../ffi.mjs':node(<<"address"/utf8>>, Attributes, Children).
-spec article(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
article(Attributes, Children) ->
'../ffi.mjs':node(<<"article"/utf8>>, Attributes, Children).
-spec aside(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
aside(Attributes, Children) ->
'../ffi.mjs':node(<<"aside"/utf8>>, Attributes, Children).
-spec footer(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
footer(Attributes, Children) ->
'../ffi.mjs':node(<<"footer"/utf8>>, Attributes, Children).
-spec header(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
header(Attributes, Children) ->
'../ffi.mjs':node(<<"header"/utf8>>, Attributes, Children).
-spec h1(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h1(Attributes, Children) ->
'../ffi.mjs':node(<<"h1"/utf8>>, Attributes, Children).
-spec h2(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h2(Attributes, Children) ->
'../ffi.mjs':node(<<"h2"/utf8>>, Attributes, Children).
-spec h3(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h3(Attributes, Children) ->
'../ffi.mjs':node(<<"h3"/utf8>>, Attributes, Children).
-spec h4(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h4(Attributes, Children) ->
'../ffi.mjs':node(<<"h4"/utf8>>, Attributes, Children).
-spec h5(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h5(Attributes, Children) ->
'../ffi.mjs':node(<<"h5"/utf8>>, Attributes, Children).
-spec h6(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
h6(Attributes, Children) ->
'../ffi.mjs':node(<<"h6"/utf8>>, Attributes, Children).
-spec main(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
main(Attributes, Children) ->
'../ffi.mjs':node(<<"main"/utf8>>, Attributes, Children).
-spec nav(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
nav(Attributes, Children) ->
'../ffi.mjs':node(<<"nav"/utf8>>, Attributes, Children).
-spec section(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
section(Attributes, Children) ->
'../ffi.mjs':node(<<"section"/utf8>>, Attributes, Children).
-spec blockquote(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
blockquote(Attributes, Children) ->
'../ffi.mjs':node(<<"blockquote"/utf8>>, Attributes, Children).
-spec dd(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
dd(Attributes, Children) ->
'../ffi.mjs':node(<<"dd"/utf8>>, Attributes, Children).
-spec 'div'(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
'div'(Attributes, Children) ->
'../ffi.mjs':node(<<"div"/utf8>>, Attributes, Children).
-spec dl(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
dl(Attributes, Children) ->
'../ffi.mjs':node(<<"dl"/utf8>>, Attributes, Children).
-spec dt(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
dt(Attributes, Children) ->
'../ffi.mjs':node(<<"dt"/utf8>>, Attributes, Children).
-spec figcaption(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
figcaption(Attributes, Children) ->
'../ffi.mjs':node(<<"figcaption"/utf8>>, Attributes, Children).
-spec figure(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
figure(Attributes, Children) ->
'../ffi.mjs':node(<<"figure"/utf8>>, Attributes, Children).
-spec hr(list(react_gleam@attribute:attribute(any()))) -> element().
hr(Attributes) ->
'../ffi.mjs':node(<<"hr"/utf8>>, Attributes, []).
-spec li(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
li(Attributes, Children) ->
'../ffi.mjs':node(<<"li"/utf8>>, Attributes, Children).
-spec menu(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
menu(Attributes, Children) ->
'../ffi.mjs':node(<<"menu"/utf8>>, Attributes, Children).
-spec ol(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
ol(Attributes, Children) ->
'../ffi.mjs':node(<<"ol"/utf8>>, Attributes, Children).
-spec p(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
p(Attributes, Children) ->
'../ffi.mjs':node(<<"p"/utf8>>, Attributes, Children).
-spec pre(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
pre(Attributes, Children) ->
'../ffi.mjs':node(<<"pre"/utf8>>, Attributes, Children).
-spec ul(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
ul(Attributes, Children) ->
'../ffi.mjs':node(<<"ul"/utf8>>, Attributes, Children).
-spec a(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
a(Attributes, Children) ->
'../ffi.mjs':node(<<"a"/utf8>>, Attributes, Children).
-spec abbr(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
abbr(Attributes, Children) ->
'../ffi.mjs':node(<<"abbr"/utf8>>, Attributes, Children).
-spec b(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
b(Attributes, Children) ->
'../ffi.mjs':node(<<"b"/utf8>>, Attributes, Children).
-spec bdi(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
bdi(Attributes, Children) ->
'../ffi.mjs':node(<<"bdi"/utf8>>, Attributes, Children).
-spec bdo(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
bdo(Attributes, Children) ->
'../ffi.mjs':node(<<"bdo"/utf8>>, Attributes, Children).
-spec br(list(react_gleam@attribute:attribute(any()))) -> element().
br(Attributes) ->
'../ffi.mjs':node(<<"br"/utf8>>, Attributes, []).
-spec cite(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
cite(Attributes, Children) ->
'../ffi.mjs':node(<<"cite"/utf8>>, Attributes, Children).
-spec code(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
code(Attributes, Children) ->
'../ffi.mjs':node(<<"code"/utf8>>, Attributes, Children).
-spec dfn(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
dfn(Attributes, Children) ->
'../ffi.mjs':node(<<"dfn"/utf8>>, Attributes, Children).
-spec em(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
em(Attributes, Children) ->
'../ffi.mjs':node(<<"em"/utf8>>, Attributes, Children).
-spec i(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
i(Attributes, Children) ->
'../ffi.mjs':node(<<"i"/utf8>>, Attributes, Children).
-spec kbd(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
kbd(Attributes, Children) ->
'../ffi.mjs':node(<<"kbd"/utf8>>, Attributes, Children).
-spec mark(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
mark(Attributes, Children) ->
'../ffi.mjs':node(<<"mark"/utf8>>, Attributes, Children).
-spec rp(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
rp(Attributes, Children) ->
'../ffi.mjs':node(<<"rp"/utf8>>, Attributes, Children).
-spec rt(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
rt(Attributes, Children) ->
'../ffi.mjs':node(<<"rt"/utf8>>, Attributes, Children).
-spec ruby(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
ruby(Attributes, Children) ->
'../ffi.mjs':node(<<"ruby"/utf8>>, Attributes, Children).
-spec s(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
s(Attributes, Children) ->
'../ffi.mjs':node(<<"s"/utf8>>, Attributes, Children).
-spec samp(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
samp(Attributes, Children) ->
'../ffi.mjs':node(<<"samp"/utf8>>, Attributes, Children).
-spec small(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
small(Attributes, Children) ->
'../ffi.mjs':node(<<"small"/utf8>>, Attributes, Children).
-spec span(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
span(Attributes, Children) ->
'../ffi.mjs':node(<<"span"/utf8>>, Attributes, Children).
-spec strong(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
strong(Attributes, Children) ->
'../ffi.mjs':node(<<"strong"/utf8>>, Attributes, Children).
-spec sub(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
sub(Attributes, Children) ->
'../ffi.mjs':node(<<"sub"/utf8>>, Attributes, Children).
-spec sup(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
sup(Attributes, Children) ->
'../ffi.mjs':node(<<"sup"/utf8>>, Attributes, Children).
-spec time(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
time(Attributes, Children) ->
'../ffi.mjs':node(<<"time"/utf8>>, Attributes, Children).
-spec u(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
u(Attributes, Children) ->
'../ffi.mjs':node(<<"u"/utf8>>, Attributes, Children).
-spec var_(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
var_(Attributes, Children) ->
'../ffi.mjs':node(<<"var"/utf8>>, Attributes, Children).
-spec wbr(list(react_gleam@attribute:attribute(any()))) -> element().
wbr(Attributes) ->
'../ffi.mjs':node(<<"wbr"/utf8>>, Attributes, []).
-spec area(list(react_gleam@attribute:attribute(any()))) -> element().
area(Attributes) ->
'../ffi.mjs':node(<<"area"/utf8>>, Attributes, []).
-spec audio(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
audio(Attributes, Children) ->
'../ffi.mjs':node(<<"audio"/utf8>>, Attributes, Children).
-spec img(list(react_gleam@attribute:attribute(any()))) -> element().
img(Attributes) ->
'../ffi.mjs':node(<<"img"/utf8>>, Attributes, []).
-spec map_(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
map_(Attributes, Children) ->
'../ffi.mjs':node(<<"map"/utf8>>, Attributes, Children).
-spec track(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
track(Attributes, Children) ->
'../ffi.mjs':node(<<"track"/utf8>>, Attributes, Children).
-spec video(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
video(Attributes, Children) ->
'../ffi.mjs':node(<<"video"/utf8>>, Attributes, Children).
-spec embed(list(react_gleam@attribute:attribute(any()))) -> element().
embed(Attributes) ->
'../ffi.mjs':node(<<"embed"/utf8>>, Attributes, []).
-spec iframe(list(react_gleam@attribute:attribute(any()))) -> element().
iframe(Attributes) ->
'../ffi.mjs':node(<<"iframe"/utf8>>, Attributes, []).
-spec object(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
object(Attributes, Children) ->
'../ffi.mjs':node(<<"object"/utf8>>, Attributes, Children).
-spec param(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
param(Attributes, Children) ->
'../ffi.mjs':node(<<"param"/utf8>>, Attributes, Children).
-spec picture(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
picture(Attributes, Children) ->
'../ffi.mjs':node(<<"picture"/utf8>>, Attributes, Children).
-spec portal(list(react_gleam@attribute:attribute(any()))) -> element().
portal(Attributes) ->
'../ffi.mjs':node(<<"portal"/utf8>>, Attributes, []).
-spec source(list(react_gleam@attribute:attribute(any()))) -> element().
source(Attributes) ->
'../ffi.mjs':node(<<"source"/utf8>>, Attributes, []).
-spec svg(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
svg(Attributes, Children) ->
'../ffi.mjs':node(
<<"svg"/utf8>>,
[react_gleam@attribute:attribute(
<<"xmlns"/utf8>>,
<<"http://www.w3.org/2000/svg"/utf8>>
) |
Attributes],
Children
).
-spec mathml(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
mathml(Attributes, Children) ->
'../ffi.mjs':node(
<<"mathml"/utf8>>,
[react_gleam@attribute:attribute(
<<"xmlns"/utf8>>,
<<"http://www.w3.org/1998/Math/MathML"/utf8>>
) |
Attributes],
Children
).
-spec canvas(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
canvas(Attributes, Children) ->
'../ffi.mjs':node(<<"canvas"/utf8>>, Attributes, Children).
-spec noscript(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
noscript(Attributes, Children) ->
'../ffi.mjs':node(<<"noscript"/utf8>>, Attributes, Children).
-spec del(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
del(Attributes, Children) ->
'../ffi.mjs':node(<<"del"/utf8>>, Attributes, Children).
-spec ins(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
ins(Attributes, Children) ->
'../ffi.mjs':node(<<"ins"/utf8>>, Attributes, Children).
-spec caption(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
caption(Attributes, Children) ->
'../ffi.mjs':node(<<"caption"/utf8>>, Attributes, Children).
-spec col(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
col(Attributes, Children) ->
'../ffi.mjs':node(<<"col"/utf8>>, Attributes, Children).
-spec colgroup(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
colgroup(Attributes, Children) ->
'../ffi.mjs':node(<<"colgroup"/utf8>>, Attributes, Children).
-spec table(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
table(Attributes, Children) ->
'../ffi.mjs':node(<<"table"/utf8>>, Attributes, Children).
-spec tbody(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
tbody(Attributes, Children) ->
'../ffi.mjs':node(<<"tbody"/utf8>>, Attributes, Children).
-spec td(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
td(Attributes, Children) ->
'../ffi.mjs':node(<<"td"/utf8>>, Attributes, Children).
-spec tfoot(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
tfoot(Attributes, Children) ->
'../ffi.mjs':node(<<"tfoot"/utf8>>, Attributes, Children).
-spec th(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
th(Attributes, Children) ->
'../ffi.mjs':node(<<"th"/utf8>>, Attributes, Children).
-spec thead(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
thead(Attributes, Children) ->
'../ffi.mjs':node(<<"thead"/utf8>>, Attributes, Children).
-spec tr(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
tr(Attributes, Children) ->
'../ffi.mjs':node(<<"tr"/utf8>>, Attributes, Children).
-spec button(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
button(Attributes, Children) ->
'../ffi.mjs':node(<<"button"/utf8>>, Attributes, Children).
-spec datalist(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
datalist(Attributes, Children) ->
'../ffi.mjs':node(<<"datalist"/utf8>>, Attributes, Children).
-spec fieldset(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
fieldset(Attributes, Children) ->
'../ffi.mjs':node(<<"fieldset"/utf8>>, Attributes, Children).
-spec form(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
form(Attributes, Children) ->
'../ffi.mjs':node(<<"form"/utf8>>, Attributes, Children).
-spec input(list(react_gleam@attribute:attribute(any()))) -> element().
input(Attributes) ->
'../ffi.mjs':node(<<"input"/utf8>>, Attributes, []).
-spec label(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
label(Attributes, Children) ->
'../ffi.mjs':node(<<"label"/utf8>>, Attributes, Children).
-spec legend(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
legend(Attributes, Children) ->
'../ffi.mjs':node(<<"legend"/utf8>>, Attributes, Children).
-spec meter(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
meter(Attributes, Children) ->
'../ffi.mjs':node(<<"meter"/utf8>>, Attributes, Children).
-spec optgroup(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
optgroup(Attributes, Children) ->
'../ffi.mjs':node(<<"optgroup"/utf8>>, Attributes, Children).
-spec option(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
option(Attributes, Children) ->
'../ffi.mjs':node(<<"option"/utf8>>, Attributes, Children).
-spec output(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
output(Attributes, Children) ->
'../ffi.mjs':node(<<"output"/utf8>>, Attributes, Children).
-spec progress(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
progress(Attributes, Children) ->
'../ffi.mjs':node(<<"progress"/utf8>>, Attributes, Children).
-spec select(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
select(Attributes, Children) ->
'../ffi.mjs':node(<<"select"/utf8>>, Attributes, Children).
-spec textarea(list(react_gleam@attribute:attribute(any()))) -> element().
textarea(Attributes) ->
'../ffi.mjs':node(<<"textarea"/utf8>>, Attributes, []).
-spec details(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
details(Attributes, Children) ->
'../ffi.mjs':node(<<"details"/utf8>>, Attributes, Children).
-spec dialog(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
dialog(Attributes, Children) ->
'../ffi.mjs':node(<<"dialog"/utf8>>, Attributes, Children).
-spec summary(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
summary(Attributes, Children) ->
'../ffi.mjs':node(<<"summary"/utf8>>, Attributes, Children).
-spec slot(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
slot(Attributes, Children) ->
'../ffi.mjs':node(<<"slot"/utf8>>, Attributes, Children).
-spec template(list(react_gleam@attribute:attribute(any())), list(element())) -> element().
template(Attributes, Children) ->
'../ffi.mjs':node(<<"template"/utf8>>, Attributes, Children).
-spec component(fun(() -> element())) -> element().
component(Field@0) ->
'../ffi.mjs':component(Field@0).