@typesafe-html5/typescript 0.2.61 → 0.2.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-all.mjs +54 -0
- package/dist/block/article/article.js +465 -0
- package/dist/block/article/article.js.map +7 -0
- package/dist/block/aside/aside.js +476 -0
- package/dist/block/aside/aside.js.map +7 -0
- package/dist/block/audio/audio.js +454 -0
- package/dist/block/audio/audio.js.map +7 -0
- package/dist/block/blockquote/blockquote.js +476 -0
- package/dist/block/blockquote/blockquote.js.map +7 -0
- package/dist/block/body/body.js +378 -0
- package/dist/block/body/body.js.map +7 -0
- package/dist/block/canvas/canvas.js +487 -0
- package/dist/block/canvas/canvas.js.map +7 -0
- package/dist/block/caption/caption.js +465 -0
- package/dist/block/caption/caption.js.map +7 -0
- package/dist/block/colgroup/colgroup.js +190 -0
- package/dist/block/colgroup/colgroup.js.map +7 -0
- package/dist/block/datalist/datalist.js +465 -0
- package/dist/block/datalist/datalist.js.map +7 -0
- package/dist/block/dd/dd.js +422 -0
- package/dist/block/dd/dd.js.map +7 -0
- package/dist/block/del/del.js +487 -0
- package/dist/block/del/del.js.map +7 -0
- package/dist/block/details/details.js +520 -0
- package/dist/block/details/details.js.map +7 -0
- package/dist/block/dialog/dialog.js +520 -0
- package/dist/block/dialog/dialog.js.map +7 -0
- package/dist/block/div/div.js +520 -0
- package/dist/block/div/div.js.map +7 -0
- package/dist/block/dl/dl.js +465 -0
- package/dist/block/dl/dl.js.map +7 -0
- package/dist/block/dt/dt.js +422 -0
- package/dist/block/dt/dt.js.map +7 -0
- package/dist/block/embed/embed.js +333 -0
- package/dist/block/embed/embed.js.map +7 -0
- package/dist/block/fieldset/fieldset.js +509 -0
- package/dist/block/fieldset/fieldset.js.map +7 -0
- package/dist/block/figcaption/figcaption.js +465 -0
- package/dist/block/figcaption/figcaption.js.map +7 -0
- package/dist/block/figure/figure.js +465 -0
- package/dist/block/figure/figure.js.map +7 -0
- package/dist/block/footer/footer.js +476 -0
- package/dist/block/footer/footer.js.map +7 -0
- package/dist/block/form/form.js +443 -0
- package/dist/block/form/form.js.map +7 -0
- package/dist/block/h1/h1.js +454 -0
- package/dist/block/h1/h1.js.map +7 -0
- package/dist/block/h2/h2.js +454 -0
- package/dist/block/h2/h2.js.map +7 -0
- package/dist/block/h3/h3.js +454 -0
- package/dist/block/h3/h3.js.map +7 -0
- package/dist/block/h4/h4.js +454 -0
- package/dist/block/h4/h4.js.map +7 -0
- package/dist/block/h5/h5.js +454 -0
- package/dist/block/h5/h5.js.map +7 -0
- package/dist/block/h6/h6.js +454 -0
- package/dist/block/h6/h6.js.map +7 -0
- package/dist/block/header/header.js +322 -0
- package/dist/block/header/header.js.map +7 -0
- package/dist/block/hgroup/hgroup.js +465 -0
- package/dist/block/hgroup/hgroup.js.map +7 -0
- package/dist/block/hr/hr.js +169 -0
- package/dist/block/hr/hr.js.map +7 -0
- package/dist/block/html/html.js +92 -0
- package/dist/block/html/html.js.map +7 -0
- package/dist/block/iframe/iframe.js +465 -0
- package/dist/block/iframe/iframe.js.map +7 -0
- package/dist/block/ins/ins.js +487 -0
- package/dist/block/ins/ins.js.map +7 -0
- package/dist/block/legend/legend.js +465 -0
- package/dist/block/legend/legend.js.map +7 -0
- package/dist/block/li/li.js +488 -0
- package/dist/block/li/li.js.map +7 -0
- package/dist/block/main/main.js +444 -0
- package/dist/block/main/main.js.map +7 -0
- package/dist/block/map/map.js +476 -0
- package/dist/block/map/map.js.map +7 -0
- package/dist/block/menu/menu.js +498 -0
- package/dist/block/menu/menu.js.map +7 -0
- package/dist/block/nav/nav.js +455 -0
- package/dist/block/nav/nav.js.map +7 -0
- package/dist/block/noscript/noscript.js +311 -0
- package/dist/block/noscript/noscript.js.map +7 -0
- package/dist/block/object/object.js +542 -0
- package/dist/block/object/object.js.map +7 -0
- package/dist/block/ol/ol.js +542 -0
- package/dist/block/ol/ol.js.map +7 -0
- package/dist/block/optgroup/optgroup.js +476 -0
- package/dist/block/optgroup/optgroup.js.map +7 -0
- package/dist/block/option/option.js +542 -0
- package/dist/block/option/option.js.map +7 -0
- package/dist/block/p/p.js +465 -0
- package/dist/block/p/p.js.map +7 -0
- package/dist/block/picture/picture.js +465 -0
- package/dist/block/picture/picture.js.map +7 -0
- package/dist/block/pre/pre.js +465 -0
- package/dist/block/pre/pre.js.map +7 -0
- package/dist/block/section/section.js +487 -0
- package/dist/block/section/section.js.map +7 -0
- package/dist/block/summary/summary.js +466 -0
- package/dist/block/summary/summary.js.map +7 -0
- package/dist/block/table/table.js +509 -0
- package/dist/block/table/table.js.map +7 -0
- package/dist/block/tbody/tbody.js +465 -0
- package/dist/block/tbody/tbody.js.map +7 -0
- package/dist/block/td/td.js +575 -0
- package/dist/block/td/td.js.map +7 -0
- package/dist/block/template/template.js +465 -0
- package/dist/block/template/template.js.map +7 -0
- package/dist/block/tfoot/tfoot.js +465 -0
- package/dist/block/tfoot/tfoot.js.map +7 -0
- package/dist/block/th/th.js +586 -0
- package/dist/block/th/th.js.map +7 -0
- package/dist/block/thead/thead.js +465 -0
- package/dist/block/thead/thead.js.map +7 -0
- package/dist/block/tr/tr.js +586 -0
- package/dist/block/tr/tr.js.map +7 -0
- package/dist/block/ul/ul.js +509 -0
- package/dist/block/ul/ul.js.map +7 -0
- package/dist/block/video/video.js +575 -0
- package/dist/block/video/video.js.map +7 -0
- package/dist/index.js +48830 -0
- package/dist/index.js.map +7 -0
- package/dist/inline/a/a.js +586 -0
- package/dist/inline/a/a.js.map +7 -0
- package/dist/inline/abbr/abbr.js +454 -0
- package/dist/inline/abbr/abbr.js.map +7 -0
- package/dist/inline/address/address.js +443 -0
- package/dist/inline/address/address.js.map +7 -0
- package/dist/inline/b/b.js +465 -0
- package/dist/inline/b/b.js.map +7 -0
- package/dist/inline/bdi/bdi.js +454 -0
- package/dist/inline/bdi/bdi.js.map +7 -0
- package/dist/inline/bdo/bdo.js +465 -0
- package/dist/inline/bdo/bdo.js.map +7 -0
- package/dist/inline/button/button.js +685 -0
- package/dist/inline/button/button.js.map +7 -0
- package/dist/inline/cite/cite.js +465 -0
- package/dist/inline/cite/cite.js.map +7 -0
- package/dist/inline/code/code.js +465 -0
- package/dist/inline/code/code.js.map +7 -0
- package/dist/inline/data/data.js +476 -0
- package/dist/inline/data/data.js.map +7 -0
- package/dist/inline/dfn/dfn.js +465 -0
- package/dist/inline/dfn/dfn.js.map +7 -0
- package/dist/inline/em/em.js +465 -0
- package/dist/inline/em/em.js.map +7 -0
- package/dist/inline/i/i.js +465 -0
- package/dist/inline/i/i.js.map +7 -0
- package/dist/inline/img/img.js +399 -0
- package/dist/inline/img/img.js.map +7 -0
- package/dist/inline/input/input.js +938 -0
- package/dist/inline/input/input.js.map +7 -0
- package/dist/inline/kbd/kbd.js +465 -0
- package/dist/inline/kbd/kbd.js.map +7 -0
- package/dist/inline/label/label.js +487 -0
- package/dist/inline/label/label.js.map +7 -0
- package/dist/inline/mark/mark.js +465 -0
- package/dist/inline/mark/mark.js.map +7 -0
- package/dist/inline/meter/meter.js +498 -0
- package/dist/inline/meter/meter.js.map +7 -0
- package/dist/inline/output/output.js +410 -0
- package/dist/inline/output/output.js.map +7 -0
- package/dist/inline/progress/progress.js +454 -0
- package/dist/inline/progress/progress.js.map +7 -0
- package/dist/inline/q/q.js +476 -0
- package/dist/inline/q/q.js.map +7 -0
- package/dist/inline/rp/rp.js +465 -0
- package/dist/inline/rp/rp.js.map +7 -0
- package/dist/inline/rt/rt.js +465 -0
- package/dist/inline/rt/rt.js.map +7 -0
- package/dist/inline/ruby/ruby.js +465 -0
- package/dist/inline/ruby/ruby.js.map +7 -0
- package/dist/inline/s/s.js +465 -0
- package/dist/inline/s/s.js.map +7 -0
- package/dist/inline/samp/samp.js +465 -0
- package/dist/inline/samp/samp.js.map +7 -0
- package/dist/inline/select/select.js +674 -0
- package/dist/inline/select/select.js.map +7 -0
- package/dist/inline/slot/slot.js +476 -0
- package/dist/inline/slot/slot.js.map +7 -0
- package/dist/inline/small/small.js +465 -0
- package/dist/inline/small/small.js.map +7 -0
- package/dist/inline/span/span.js +465 -0
- package/dist/inline/span/span.js.map +7 -0
- package/dist/inline/strong/strong.js +465 -0
- package/dist/inline/strong/strong.js.map +7 -0
- package/dist/inline/sub/sub.js +465 -0
- package/dist/inline/sub/sub.js.map +7 -0
- package/dist/inline/sup/sup.js +465 -0
- package/dist/inline/sup/sup.js.map +7 -0
- package/dist/inline/svg/svg.js +542 -0
- package/dist/inline/svg/svg.js.map +7 -0
- package/dist/inline/textarea/textarea.js +718 -0
- package/dist/inline/textarea/textarea.js.map +7 -0
- package/dist/inline/time/time.js +476 -0
- package/dist/inline/time/time.js.map +7 -0
- package/dist/inline/u/u.js +465 -0
- package/dist/inline/u/u.js.map +7 -0
- package/dist/inline/var/var.js +465 -0
- package/dist/inline/var/var.js.map +7 -0
- package/dist/void/area/area.js +388 -0
- package/dist/void/area/area.js.map +7 -0
- package/dist/void/base/base.js +37 -0
- package/dist/void/base/base.js.map +7 -0
- package/dist/void/br/br.js +135 -0
- package/dist/void/br/br.js.map +7 -0
- package/dist/void/col/col.js +135 -0
- package/dist/void/col/col.js.map +7 -0
- package/dist/void/head/head.js +37 -0
- package/dist/void/head/head.js.map +7 -0
- package/dist/void/link/link.js +213 -0
- package/dist/void/link/link.js.map +7 -0
- package/dist/void/meta/meta.js +147 -0
- package/dist/void/meta/meta.js.map +7 -0
- package/dist/void/param/param.js +146 -0
- package/dist/void/param/param.js.map +7 -0
- package/dist/void/script/script.js +213 -0
- package/dist/void/script/script.js.map +7 -0
- package/dist/void/source/source.js +168 -0
- package/dist/void/source/source.js.map +7 -0
- package/dist/void/style/style.js +147 -0
- package/dist/void/style/style.js.map +7 -0
- package/dist/void/title/title.js +37 -0
- package/dist/void/title/title.js.map +7 -0
- package/dist/void/track/track.js +190 -0
- package/dist/void/track/track.js.map +7 -0
- package/dist/void/wbr/wbr.js +124 -0
- package/dist/void/wbr/wbr.js.map +7 -0
- package/package.json +4 -4
- package/src/block/article/article.ts +649 -0
- package/{block → src/block}/aside/aside.ts +144 -1
- package/{block → src/block}/audio/audio.ts +128 -1
- package/src/block/blockquote/blockquote.ts +665 -0
- package/{block → src/block}/body/body.ts +91 -1
- package/{block → src/block}/canvas/canvas.ts +144 -1
- package/src/block/caption/caption.ts +649 -0
- package/{block → src/block}/colgroup/colgroup.ts +96 -1
- package/src/block/datalist/datalist.ts +649 -0
- package/{block/dialog/dialog.ts → src/block/dd/dd.ts} +114 -88
- package/{block → src/block}/del/del.ts +144 -1
- package/src/block/details/details.ts +729 -0
- package/src/block/dialog/dialog.ts +729 -0
- package/src/block/div/div.ts +729 -0
- package/src/block/dl/dl.ts +649 -0
- package/{block/details/details.ts → src/block/dt/dt.ts} +114 -88
- package/{block → src/block}/embed/embed.ts +144 -1
- package/{block → src/block}/fieldset/fieldset.ts +144 -1
- package/src/block/figcaption/figcaption.ts +649 -0
- package/src/block/figure/figure.ts +649 -0
- package/src/block/footer/footer.ts +665 -0
- package/{block → src/block}/form/form.ts +132 -5
- package/src/block/h1/h1.ts +633 -0
- package/src/block/h2/h2.ts +633 -0
- package/src/block/h3/h3.ts +633 -0
- package/src/block/h4/h4.ts +633 -0
- package/src/block/h5/h5.ts +633 -0
- package/src/block/h6/h6.ts +633 -0
- package/{block → src/block}/header/header.ts +144 -1
- package/src/block/hgroup/hgroup.ts +649 -0
- package/{block → src/block}/hr/hr.ts +59 -1
- package/{block → src/block}/html/html.ts +27 -1
- package/{block → src/block}/iframe/iframe.ts +112 -1
- package/{block → src/block}/ins/ins.ts +144 -1
- package/src/block/legend/legend.ts +649 -0
- package/{block → src/block}/li/li.ts +107 -1
- package/{block/div/div.ts → src/block/main/main.ts} +112 -54
- package/src/block/map/map.ts +665 -0
- package/{block → src/block}/menu/menu.ts +144 -1
- package/{block → src/block}/nav/nav.ts +107 -1
- package/{block → src/block}/noscript/noscript.ts +144 -1
- package/{block → src/block}/object/object.ts +144 -1
- package/{block → src/block}/ol/ol.ts +144 -1
- package/{block → src/block}/optgroup/optgroup.ts +144 -1
- package/{block → src/block}/option/option.ts +144 -1
- package/src/block/p/p.ts +649 -0
- package/src/block/picture/picture.ts +649 -0
- package/src/block/pre/pre.ts +649 -0
- package/{block → src/block}/section/section.ts +144 -1
- package/{block → src/block}/summary/summary.ts +107 -1
- package/{block → src/block}/table/table.ts +144 -1
- package/src/block/tbody/tbody.ts +649 -0
- package/{block → src/block}/td/td.ts +144 -1
- package/src/block/template/template.ts +649 -0
- package/src/block/tfoot/tfoot.ts +649 -0
- package/{block → src/block}/th/th.ts +144 -1
- package/src/block/thead/thead.ts +649 -0
- package/{block → src/block}/tr/tr.ts +144 -1
- package/{block → src/block}/ul/ul.ts +144 -1
- package/{block → src/block}/video/video.ts +144 -1
- package/{inline → src/inline}/a/a.ts +144 -1
- package/src/inline/abbr/abbr.ts +633 -0
- package/src/inline/address/address.ts +617 -0
- package/src/inline/b/b.ts +649 -0
- package/src/inline/bdi/bdi.ts +633 -0
- package/src/inline/bdo/bdo.ts +649 -0
- package/{inline → src/inline}/button/button.ts +145 -2
- package/src/inline/cite/cite.ts +649 -0
- package/src/inline/code/code.ts +649 -0
- package/src/inline/data/data.ts +665 -0
- package/src/inline/dfn/dfn.ts +649 -0
- package/src/inline/em/em.ts +649 -0
- package/src/inline/i/i.ts +649 -0
- package/{inline → src/inline}/img/img.ts +112 -1
- package/{inline → src/inline}/input/input.ts +145 -2
- package/src/inline/kbd/kbd.ts +649 -0
- package/{inline → src/inline}/label/label.ts +144 -1
- package/src/inline/mark/mark.ts +649 -0
- package/{inline → src/inline}/meter/meter.ts +144 -1
- package/{inline → src/inline}/output/output.ts +144 -1
- package/{inline → src/inline}/progress/progress.ts +144 -1
- package/src/inline/q/q.ts +665 -0
- package/src/inline/rp/rp.ts +649 -0
- package/src/inline/rt/rt.ts +649 -0
- package/src/inline/ruby/ruby.ts +649 -0
- package/src/inline/s/s.ts +649 -0
- package/src/inline/samp/samp.ts +649 -0
- package/{inline → src/inline}/select/select.ts +144 -1
- package/src/inline/slot/slot.ts +665 -0
- package/src/inline/small/small.ts +649 -0
- package/src/inline/span/span.ts +649 -0
- package/src/inline/strong/strong.ts +649 -0
- package/src/inline/sub/sub.ts +649 -0
- package/src/inline/sup/sup.ts +649 -0
- package/{inline → src/inline}/svg/svg.ts +144 -1
- package/{inline → src/inline}/textarea/textarea.ts +144 -1
- package/src/inline/time/time.ts +665 -0
- package/src/inline/u/u.ts +649 -0
- package/src/inline/var/var.ts +649 -0
- package/{void → src/void}/area/area.ts +144 -1
- package/{void → src/void}/base/base.ts +1 -1
- package/src/void/br/br.ts +172 -0
- package/src/void/col/col.ts +172 -0
- package/{void → src/void}/head/head.ts +1 -1
- package/{void → src/void}/link/link.ts +59 -1
- package/{void → src/void}/meta/meta.ts +59 -1
- package/src/void/param/param.ts +188 -0
- package/{void → src/void}/script/script.ts +59 -1
- package/src/void/source/source.ts +220 -0
- package/{void → src/void}/style/style.ts +59 -1
- package/{void → src/void}/title/title.ts +1 -1
- package/{void → src/void}/track/track.ts +96 -1
- package/src/void/wbr/wbr.ts +156 -0
- package/block/article/article.ts +0 -506
- package/block/blockquote/blockquote.ts +0 -522
- package/block/caption/caption.ts +0 -506
- package/block/datalist/datalist.ts +0 -506
- package/block/dd/dd.ts +0 -506
- package/block/dl/dl.ts +0 -506
- package/block/dt/dt.ts +0 -506
- package/block/figcaption/figcaption.ts +0 -506
- package/block/figure/figure.ts +0 -506
- package/block/footer/footer.ts +0 -522
- package/block/h1/h1.ts +0 -490
- package/block/h2/h2.ts +0 -490
- package/block/h3/h3.ts +0 -490
- package/block/h4/h4.ts +0 -490
- package/block/h5/h5.ts +0 -490
- package/block/h6/h6.ts +0 -490
- package/block/hgroup/hgroup.ts +0 -506
- package/block/legend/legend.ts +0 -506
- package/block/main/main.ts +0 -538
- package/block/map/map.ts +0 -522
- package/block/p/p.ts +0 -506
- package/block/picture/picture.ts +0 -506
- package/block/pre/pre.ts +0 -506
- package/block/tbody/tbody.ts +0 -506
- package/block/template/template.ts +0 -506
- package/block/tfoot/tfoot.ts +0 -506
- package/block/thead/thead.ts +0 -506
- package/inline/abbr/abbr.ts +0 -490
- package/inline/address/address.ts +0 -474
- package/inline/b/b.ts +0 -506
- package/inline/bdi/bdi.ts +0 -490
- package/inline/bdo/bdo.ts +0 -506
- package/inline/cite/cite.ts +0 -506
- package/inline/code/code.ts +0 -506
- package/inline/data/data.ts +0 -522
- package/inline/dfn/dfn.ts +0 -506
- package/inline/em/em.ts +0 -506
- package/inline/i/i.ts +0 -506
- package/inline/kbd/kbd.ts +0 -506
- package/inline/mark/mark.ts +0 -506
- package/inline/q/q.ts +0 -522
- package/inline/rp/rp.ts +0 -506
- package/inline/rt/rt.ts +0 -506
- package/inline/ruby/ruby.ts +0 -506
- package/inline/s/s.ts +0 -506
- package/inline/samp/samp.ts +0 -506
- package/inline/slot/slot.ts +0 -522
- package/inline/small/small.ts +0 -506
- package/inline/span/span.ts +0 -506
- package/inline/strong/strong.ts +0 -506
- package/inline/sub/sub.ts +0 -506
- package/inline/sup/sup.ts +0 -506
- package/inline/time/time.ts +0 -522
- package/inline/u/u.ts +0 -506
- package/inline/var/var.ts +0 -506
- package/void/br/br.ts +0 -77
- package/void/col/col.ts +0 -77
- package/void/param/param.ts +0 -93
- package/void/source/source.ts +0 -125
- package/void/wbr/wbr.ts +0 -61
- /package/{index.ts → src/index.ts} +0 -0
- /package/{tsconfig.json → src/tsconfig.json} +0 -0
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
|
|
3
3
|
*
|
|
4
|
-
* @generated
|
|
4
|
+
* @generated January 2, 2026 15:45:45
|
|
5
5
|
* @component Area
|
|
6
6
|
* @description
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export interface AreaProps {
|
|
10
|
+
/**
|
|
11
|
+
* Keyboard shortcut to activate or focus the element
|
|
12
|
+
*/
|
|
13
|
+
accessKey?: string;
|
|
10
14
|
/**
|
|
11
15
|
* specifies a shortcut key (or keys) to activate or focus an element
|
|
12
16
|
*/
|
|
13
17
|
accesskey?: string | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Mapping of Alpine.js directives (shorthand or full) to their values (e.g., {@click: "do()"} or {"x-on:click":"do()"})
|
|
20
|
+
*/
|
|
21
|
+
'alpine-attributes'?: Record<string, string> | null | undefined;
|
|
14
22
|
/**
|
|
15
23
|
* Specifies alternative text to be displayed when the image cannot be rendered.
|
|
16
24
|
*/
|
|
@@ -23,6 +31,14 @@ export interface AreaProps {
|
|
|
23
31
|
* Indicates whether the element is hidden
|
|
24
32
|
*/
|
|
25
33
|
autofocus?: boolean | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* CSS class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the element is editable
|
|
40
|
+
*/
|
|
41
|
+
contentEditable?: boolean | "true" | "false" | "inherit";
|
|
26
42
|
/**
|
|
27
43
|
* Indicates whether the element can be edited in place
|
|
28
44
|
*/
|
|
@@ -31,6 +47,10 @@ export interface AreaProps {
|
|
|
31
47
|
* Specifies the coordinates of the shape in a rectangular area or a polygonal area on an image map.
|
|
32
48
|
*/
|
|
33
49
|
coords?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Mapping of data-* attributes to their values (e.g., {"test":"value"} -> data-test="value")
|
|
52
|
+
*/
|
|
53
|
+
'data-attributes'?: Record<string, string> | null | undefined;
|
|
34
54
|
/**
|
|
35
55
|
* Represents the text direction of the element
|
|
36
56
|
*/
|
|
@@ -55,6 +75,10 @@ export interface AreaProps {
|
|
|
55
75
|
* Specifies the language of the linked resource.
|
|
56
76
|
*/
|
|
57
77
|
hreflang?: string | null | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Unique identifier
|
|
80
|
+
*/
|
|
81
|
+
id?: string;
|
|
58
82
|
/**
|
|
59
83
|
* used to specify the data entry mode for an input. It helps guide on-screen keyboards (especially on mobile devices) to show the appropriate layout for the expected input type
|
|
60
84
|
*/
|
|
@@ -79,6 +103,10 @@ export interface AreaProps {
|
|
|
79
103
|
* Represents the CSS inline style of the element
|
|
80
104
|
*/
|
|
81
105
|
style?: string | null | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Tab order position
|
|
108
|
+
*/
|
|
109
|
+
tabIndex?: number;
|
|
82
110
|
/**
|
|
83
111
|
* Represents a tab order of the element
|
|
84
112
|
*/
|
|
@@ -113,9 +141,26 @@ export class Area {
|
|
|
113
141
|
}
|
|
114
142
|
|
|
115
143
|
private applyProps(props: AreaProps): void {
|
|
144
|
+
if (props.accessKey !== undefined) {
|
|
145
|
+
this.element.setAttribute('accessKey', String(props.accessKey));
|
|
146
|
+
}
|
|
116
147
|
if (props.accesskey !== undefined) {
|
|
117
148
|
this.element.setAttribute('accesskey', String(props.accesskey));
|
|
118
149
|
}
|
|
150
|
+
if (props['alpine-attributes'] !== undefined) {
|
|
151
|
+
const __map = props['alpine-attributes'];
|
|
152
|
+
if (__map !== null && __map !== undefined) {
|
|
153
|
+
for (const __k in __map) {
|
|
154
|
+
const __v = (__map as any)[__k];
|
|
155
|
+
let __attr = __k;
|
|
156
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
157
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
158
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
159
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
160
|
+
this.element.setAttribute(__attr, String(__v));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
119
164
|
if (props.alt !== undefined) {
|
|
120
165
|
this.element.setAttribute('alt', String(props.alt));
|
|
121
166
|
}
|
|
@@ -125,12 +170,26 @@ export class Area {
|
|
|
125
170
|
if (props.autofocus !== undefined) {
|
|
126
171
|
this.element.setAttribute('autofocus', String(props.autofocus));
|
|
127
172
|
}
|
|
173
|
+
if (props.className !== undefined) {
|
|
174
|
+
this.element.setAttribute('className', String(props.className));
|
|
175
|
+
}
|
|
176
|
+
if (props.contentEditable !== undefined) {
|
|
177
|
+
this.element.setAttribute('contentEditable', String(props.contentEditable));
|
|
178
|
+
}
|
|
128
179
|
if (props.contenteditable !== undefined) {
|
|
129
180
|
this.setContenteditable(props.contenteditable);
|
|
130
181
|
}
|
|
131
182
|
if (props.coords !== undefined) {
|
|
132
183
|
this.element.setAttribute('coords', String(props.coords));
|
|
133
184
|
}
|
|
185
|
+
if (props['data-attributes'] !== undefined) {
|
|
186
|
+
const __map = props['data-attributes'];
|
|
187
|
+
if (__map !== null && __map !== undefined) {
|
|
188
|
+
for (const __k in __map) {
|
|
189
|
+
this.element.setAttribute(`data-${__k}`, String((__map as any)[__k]));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
134
193
|
if (props.dir !== undefined) {
|
|
135
194
|
this.setDir(props.dir);
|
|
136
195
|
}
|
|
@@ -149,6 +208,9 @@ export class Area {
|
|
|
149
208
|
if (props.hreflang !== undefined) {
|
|
150
209
|
this.element.setAttribute('hreflang', String(props.hreflang));
|
|
151
210
|
}
|
|
211
|
+
if (props.id !== undefined) {
|
|
212
|
+
this.element.setAttribute('id', String(props.id));
|
|
213
|
+
}
|
|
152
214
|
if (props.inputmode !== undefined) {
|
|
153
215
|
this.setInputmode(props.inputmode);
|
|
154
216
|
}
|
|
@@ -167,6 +229,9 @@ export class Area {
|
|
|
167
229
|
if (props.style !== undefined) {
|
|
168
230
|
this.element.setAttribute('style', String(props.style));
|
|
169
231
|
}
|
|
232
|
+
if (props.tabIndex !== undefined) {
|
|
233
|
+
this.element.setAttribute('tabIndex', String(props.tabIndex));
|
|
234
|
+
}
|
|
170
235
|
if (props.tabindex !== undefined) {
|
|
171
236
|
this.element.setAttribute('tabindex', String(props.tabindex));
|
|
172
237
|
}
|
|
@@ -184,6 +249,15 @@ export class Area {
|
|
|
184
249
|
}
|
|
185
250
|
}
|
|
186
251
|
|
|
252
|
+
setAccessKey(value: string): this {
|
|
253
|
+
if (value === null || value === undefined) {
|
|
254
|
+
this.element.removeAttribute('accessKey');
|
|
255
|
+
} else {
|
|
256
|
+
this.element.setAttribute('accessKey', String(value));
|
|
257
|
+
}
|
|
258
|
+
return this;
|
|
259
|
+
}
|
|
260
|
+
|
|
187
261
|
setAccesskey(value: string | null | undefined): this {
|
|
188
262
|
if (value === null || value === undefined) {
|
|
189
263
|
this.element.removeAttribute('accesskey');
|
|
@@ -193,6 +267,25 @@ export class Area {
|
|
|
193
267
|
return this;
|
|
194
268
|
}
|
|
195
269
|
|
|
270
|
+
setAlpineAttributes(value: string | null | undefined): this {
|
|
271
|
+
if (value === null || value === undefined) {
|
|
272
|
+
// Remove all x-* Alpine attributes (best-effort)
|
|
273
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
274
|
+
if ((__a as Attr).name.startsWith('x-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
for (const __k in value as Record<string, string>) {
|
|
278
|
+
let __attr = __k;
|
|
279
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
280
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
281
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
282
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
283
|
+
this.element.setAttribute(__attr, String((value as any)[__k]));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return this;
|
|
287
|
+
}
|
|
288
|
+
|
|
196
289
|
setAlt(value: string | null | undefined): this {
|
|
197
290
|
if (value === null || value === undefined) {
|
|
198
291
|
this.element.removeAttribute('alt');
|
|
@@ -220,6 +313,24 @@ export class Area {
|
|
|
220
313
|
return this;
|
|
221
314
|
}
|
|
222
315
|
|
|
316
|
+
setClassName(value: string): this {
|
|
317
|
+
if (value === null || value === undefined) {
|
|
318
|
+
this.element.removeAttribute('className');
|
|
319
|
+
} else {
|
|
320
|
+
this.element.setAttribute('className', String(value));
|
|
321
|
+
}
|
|
322
|
+
return this;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
setContentEditable(value: boolean | "true" | "false" | "inherit"): this {
|
|
326
|
+
if (value === true) {
|
|
327
|
+
this.element.setAttribute('contentEditable', '');
|
|
328
|
+
} else {
|
|
329
|
+
this.element.removeAttribute('contentEditable');
|
|
330
|
+
}
|
|
331
|
+
return this;
|
|
332
|
+
}
|
|
333
|
+
|
|
223
334
|
setContenteditable(value: 'true' | 'false' | 'inherit' | boolean | null | undefined): this {
|
|
224
335
|
if (value === null || value === undefined) {
|
|
225
336
|
this.element.removeAttribute('contenteditable');
|
|
@@ -238,6 +349,20 @@ export class Area {
|
|
|
238
349
|
return this;
|
|
239
350
|
}
|
|
240
351
|
|
|
352
|
+
setDataAttributes(value: Record<string, string>): this {
|
|
353
|
+
if (value === null || value === undefined) {
|
|
354
|
+
// Remove all data-* attributes (best-effort)
|
|
355
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
356
|
+
if ((__a as Attr).name.startsWith('data-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
357
|
+
}
|
|
358
|
+
} else {
|
|
359
|
+
for (const __k in value as Record<string, string>) {
|
|
360
|
+
this.element.setAttribute(`data-${__k}`, String((value as any)[__k]));
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return this;
|
|
364
|
+
}
|
|
365
|
+
|
|
241
366
|
setDir(value: 'ltr' | 'rtl' | 'auto' | null | undefined): this {
|
|
242
367
|
if (value === null || value === undefined) {
|
|
243
368
|
this.element.removeAttribute('dir');
|
|
@@ -292,6 +417,15 @@ export class Area {
|
|
|
292
417
|
return this;
|
|
293
418
|
}
|
|
294
419
|
|
|
420
|
+
setId(value: string): this {
|
|
421
|
+
if (value === null || value === undefined) {
|
|
422
|
+
this.element.removeAttribute('id');
|
|
423
|
+
} else {
|
|
424
|
+
this.element.setAttribute('id', String(value));
|
|
425
|
+
}
|
|
426
|
+
return this;
|
|
427
|
+
}
|
|
428
|
+
|
|
295
429
|
setInputmode(value: 'none' | 'text' | 'decimal' | 'numeric' | 'email' | 'tel' | 'url' | 'search' | null | undefined): this {
|
|
296
430
|
if (value === null || value === undefined) {
|
|
297
431
|
this.element.removeAttribute('inputmode');
|
|
@@ -346,6 +480,15 @@ export class Area {
|
|
|
346
480
|
return this;
|
|
347
481
|
}
|
|
348
482
|
|
|
483
|
+
setTabIndex(value: number): this {
|
|
484
|
+
if (value === null || value === undefined) {
|
|
485
|
+
this.element.removeAttribute('tabIndex');
|
|
486
|
+
} else {
|
|
487
|
+
this.element.setAttribute('tabIndex', String(value));
|
|
488
|
+
}
|
|
489
|
+
return this;
|
|
490
|
+
}
|
|
491
|
+
|
|
349
492
|
setTabindex(value: number | null | undefined): this {
|
|
350
493
|
if (value === null || value === undefined) {
|
|
351
494
|
this.element.removeAttribute('tabindex');
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
|
|
3
|
+
*
|
|
4
|
+
* @generated January 2, 2026 15:45:45
|
|
5
|
+
* @component Br
|
|
6
|
+
* @description
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface BrProps {
|
|
10
|
+
/**
|
|
11
|
+
* Mapping of Alpine.js directives (shorthand or full) to their values (e.g., {@click: "do()"} or {"x-on:click":"do()"})
|
|
12
|
+
*/
|
|
13
|
+
'alpine-attributes'?: Record<string, string> | null | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* CSS class names
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Mapping of data-* attributes to their values (e.g., {"test":"value"} -> data-test="value")
|
|
20
|
+
*/
|
|
21
|
+
'data-attributes'?: Record<string, string> | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Represents the text direction of the element
|
|
24
|
+
*/
|
|
25
|
+
dir?: 'ltr' | 'rtl' | 'auto' | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates whether the element is hidden
|
|
28
|
+
*/
|
|
29
|
+
hidden?: boolean | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier
|
|
32
|
+
*/
|
|
33
|
+
id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Represents the CSS inline style of the element
|
|
36
|
+
*/
|
|
37
|
+
style?: string | null | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Br -
|
|
42
|
+
*/
|
|
43
|
+
export class Br {
|
|
44
|
+
private element: HTMLElement;
|
|
45
|
+
|
|
46
|
+
constructor(props: BrProps = {}) {
|
|
47
|
+
this.element = document.createElement('br');
|
|
48
|
+
this.applyProps(props);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private applyProps(props: BrProps): void {
|
|
52
|
+
if (props['alpine-attributes'] !== undefined) {
|
|
53
|
+
const __map = props['alpine-attributes'];
|
|
54
|
+
if (__map !== null && __map !== undefined) {
|
|
55
|
+
for (const __k in __map) {
|
|
56
|
+
const __v = (__map as any)[__k];
|
|
57
|
+
let __attr = __k;
|
|
58
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
59
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
60
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
61
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
62
|
+
this.element.setAttribute(__attr, String(__v));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (props.className !== undefined) {
|
|
67
|
+
this.element.setAttribute('className', String(props.className));
|
|
68
|
+
}
|
|
69
|
+
if (props['data-attributes'] !== undefined) {
|
|
70
|
+
const __map = props['data-attributes'];
|
|
71
|
+
if (__map !== null && __map !== undefined) {
|
|
72
|
+
for (const __k in __map) {
|
|
73
|
+
this.element.setAttribute(`data-${__k}`, String((__map as any)[__k]));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (props.dir !== undefined) {
|
|
78
|
+
this.setDir(props.dir);
|
|
79
|
+
}
|
|
80
|
+
if (props.hidden !== undefined) {
|
|
81
|
+
this.element.setAttribute('hidden', String(props.hidden));
|
|
82
|
+
}
|
|
83
|
+
if (props.id !== undefined) {
|
|
84
|
+
this.element.setAttribute('id', String(props.id));
|
|
85
|
+
}
|
|
86
|
+
if (props.style !== undefined) {
|
|
87
|
+
this.element.setAttribute('style', String(props.style));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
setAlpineAttributes(value: string | null | undefined): this {
|
|
92
|
+
if (value === null || value === undefined) {
|
|
93
|
+
// Remove all x-* Alpine attributes (best-effort)
|
|
94
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
95
|
+
if ((__a as Attr).name.startsWith('x-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
for (const __k in value as Record<string, string>) {
|
|
99
|
+
let __attr = __k;
|
|
100
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
101
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
102
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
103
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
104
|
+
this.element.setAttribute(__attr, String((value as any)[__k]));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
setClassName(value: string): this {
|
|
111
|
+
if (value === null || value === undefined) {
|
|
112
|
+
this.element.removeAttribute('className');
|
|
113
|
+
} else {
|
|
114
|
+
this.element.setAttribute('className', String(value));
|
|
115
|
+
}
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
setDataAttributes(value: Record<string, string>): this {
|
|
120
|
+
if (value === null || value === undefined) {
|
|
121
|
+
// Remove all data-* attributes (best-effort)
|
|
122
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
123
|
+
if ((__a as Attr).name.startsWith('data-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
for (const __k in value as Record<string, string>) {
|
|
127
|
+
this.element.setAttribute(`data-${__k}`, String((value as any)[__k]));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
setDir(value: 'ltr' | 'rtl' | 'auto' | null | undefined): this {
|
|
134
|
+
if (value === null || value === undefined) {
|
|
135
|
+
this.element.removeAttribute('dir');
|
|
136
|
+
} else {
|
|
137
|
+
this.element.setAttribute('dir', String(value));
|
|
138
|
+
}
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
setHidden(value: boolean | null | undefined): this {
|
|
143
|
+
if (value === true) {
|
|
144
|
+
this.element.setAttribute('hidden', '');
|
|
145
|
+
} else {
|
|
146
|
+
this.element.removeAttribute('hidden');
|
|
147
|
+
}
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
setId(value: string): this {
|
|
152
|
+
if (value === null || value === undefined) {
|
|
153
|
+
this.element.removeAttribute('id');
|
|
154
|
+
} else {
|
|
155
|
+
this.element.setAttribute('id', String(value));
|
|
156
|
+
}
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
setStyle(value: string | null | undefined): this {
|
|
161
|
+
if (value === null || value === undefined) {
|
|
162
|
+
this.element.removeAttribute('style');
|
|
163
|
+
} else {
|
|
164
|
+
this.element.setAttribute('style', String(value));
|
|
165
|
+
}
|
|
166
|
+
return this;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
getElement(): HTMLElement {
|
|
170
|
+
return this.element;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
|
|
3
|
+
*
|
|
4
|
+
* @generated January 2, 2026 15:45:45
|
|
5
|
+
* @component Col
|
|
6
|
+
* @description
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface ColProps {
|
|
10
|
+
/**
|
|
11
|
+
* Mapping of Alpine.js directives (shorthand or full) to their values (e.g., {@click: "do()"} or {"x-on:click":"do()"})
|
|
12
|
+
*/
|
|
13
|
+
'alpine-attributes'?: Record<string, string> | null | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* CSS class names
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Mapping of data-* attributes to their values (e.g., {"test":"value"} -> data-test="value")
|
|
20
|
+
*/
|
|
21
|
+
'data-attributes'?: Record<string, string> | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier
|
|
24
|
+
*/
|
|
25
|
+
id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the number of columns the <col> element should span in a table.
|
|
28
|
+
*/
|
|
29
|
+
span?: number | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Represents the CSS inline style of the element
|
|
32
|
+
*/
|
|
33
|
+
style?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Specifies the width of the element. The meaning may vary depending on the element type. Accepts integers, pixels (px), and percentages (%).
|
|
36
|
+
*/
|
|
37
|
+
width?: string | null | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Col -
|
|
42
|
+
*/
|
|
43
|
+
export class Col {
|
|
44
|
+
private element: HTMLElement;
|
|
45
|
+
|
|
46
|
+
constructor(props: ColProps = {}) {
|
|
47
|
+
this.element = document.createElement('col');
|
|
48
|
+
this.applyProps(props);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private applyProps(props: ColProps): void {
|
|
52
|
+
if (props['alpine-attributes'] !== undefined) {
|
|
53
|
+
const __map = props['alpine-attributes'];
|
|
54
|
+
if (__map !== null && __map !== undefined) {
|
|
55
|
+
for (const __k in __map) {
|
|
56
|
+
const __v = (__map as any)[__k];
|
|
57
|
+
let __attr = __k;
|
|
58
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
59
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
60
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
61
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
62
|
+
this.element.setAttribute(__attr, String(__v));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (props.className !== undefined) {
|
|
67
|
+
this.element.setAttribute('className', String(props.className));
|
|
68
|
+
}
|
|
69
|
+
if (props['data-attributes'] !== undefined) {
|
|
70
|
+
const __map = props['data-attributes'];
|
|
71
|
+
if (__map !== null && __map !== undefined) {
|
|
72
|
+
for (const __k in __map) {
|
|
73
|
+
this.element.setAttribute(`data-${__k}`, String((__map as any)[__k]));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (props.id !== undefined) {
|
|
78
|
+
this.element.setAttribute('id', String(props.id));
|
|
79
|
+
}
|
|
80
|
+
if (props.span !== undefined) {
|
|
81
|
+
this.element.setAttribute('span', String(props.span));
|
|
82
|
+
}
|
|
83
|
+
if (props.style !== undefined) {
|
|
84
|
+
this.element.setAttribute('style', String(props.style));
|
|
85
|
+
}
|
|
86
|
+
if (props.width !== undefined) {
|
|
87
|
+
this.element.setAttribute('width', String(props.width));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
setAlpineAttributes(value: string | null | undefined): this {
|
|
92
|
+
if (value === null || value === undefined) {
|
|
93
|
+
// Remove all x-* Alpine attributes (best-effort)
|
|
94
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
95
|
+
if ((__a as Attr).name.startsWith('x-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
for (const __k in value as Record<string, string>) {
|
|
99
|
+
let __attr = __k;
|
|
100
|
+
if (__k.startsWith('@')) { __attr = 'x-on:' + __k.slice(1); }
|
|
101
|
+
else if (__k.startsWith(':')) { __attr = 'x-bind:' + __k.slice(1); }
|
|
102
|
+
else if (__k.startsWith('.')) { __attr = 'x-model' + __k; }
|
|
103
|
+
else if (!__k.startsWith('x-') && ['show','text','html','if','for','cloak','init','data','effect','ignore','ref','transition','teleport'].includes(__k)) { __attr = 'x-' + __k; }
|
|
104
|
+
this.element.setAttribute(__attr, String((value as any)[__k]));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
setClassName(value: string): this {
|
|
111
|
+
if (value === null || value === undefined) {
|
|
112
|
+
this.element.removeAttribute('className');
|
|
113
|
+
} else {
|
|
114
|
+
this.element.setAttribute('className', String(value));
|
|
115
|
+
}
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
setDataAttributes(value: Record<string, string>): this {
|
|
120
|
+
if (value === null || value === undefined) {
|
|
121
|
+
// Remove all data-* attributes (best-effort)
|
|
122
|
+
for (const __a of Array.from(this.element.attributes)) {
|
|
123
|
+
if ((__a as Attr).name.startsWith('data-')) { (this.element as HTMLElement).removeAttribute((__a as Attr).name); }
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
for (const __k in value as Record<string, string>) {
|
|
127
|
+
this.element.setAttribute(`data-${__k}`, String((value as any)[__k]));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
setId(value: string): this {
|
|
134
|
+
if (value === null || value === undefined) {
|
|
135
|
+
this.element.removeAttribute('id');
|
|
136
|
+
} else {
|
|
137
|
+
this.element.setAttribute('id', String(value));
|
|
138
|
+
}
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
setSpan(value: number | null | undefined): this {
|
|
143
|
+
if (value === null || value === undefined) {
|
|
144
|
+
this.element.removeAttribute('span');
|
|
145
|
+
} else {
|
|
146
|
+
this.element.setAttribute('span', String(value));
|
|
147
|
+
}
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
setStyle(value: string | null | undefined): this {
|
|
152
|
+
if (value === null || value === undefined) {
|
|
153
|
+
this.element.removeAttribute('style');
|
|
154
|
+
} else {
|
|
155
|
+
this.element.setAttribute('style', String(value));
|
|
156
|
+
}
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
setWidth(value: string | null | undefined): this {
|
|
161
|
+
if (value === null || value === undefined) {
|
|
162
|
+
this.element.removeAttribute('width');
|
|
163
|
+
} else {
|
|
164
|
+
this.element.setAttribute('width', String(value));
|
|
165
|
+
}
|
|
166
|
+
return this;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
getElement(): HTMLElement {
|
|
170
|
+
return this.element;
|
|
171
|
+
}
|
|
172
|
+
}
|