@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.
Files changed (405) hide show
  1. package/build-all.mjs +54 -0
  2. package/dist/block/article/article.js +465 -0
  3. package/dist/block/article/article.js.map +7 -0
  4. package/dist/block/aside/aside.js +476 -0
  5. package/dist/block/aside/aside.js.map +7 -0
  6. package/dist/block/audio/audio.js +454 -0
  7. package/dist/block/audio/audio.js.map +7 -0
  8. package/dist/block/blockquote/blockquote.js +476 -0
  9. package/dist/block/blockquote/blockquote.js.map +7 -0
  10. package/dist/block/body/body.js +378 -0
  11. package/dist/block/body/body.js.map +7 -0
  12. package/dist/block/canvas/canvas.js +487 -0
  13. package/dist/block/canvas/canvas.js.map +7 -0
  14. package/dist/block/caption/caption.js +465 -0
  15. package/dist/block/caption/caption.js.map +7 -0
  16. package/dist/block/colgroup/colgroup.js +190 -0
  17. package/dist/block/colgroup/colgroup.js.map +7 -0
  18. package/dist/block/datalist/datalist.js +465 -0
  19. package/dist/block/datalist/datalist.js.map +7 -0
  20. package/dist/block/dd/dd.js +422 -0
  21. package/dist/block/dd/dd.js.map +7 -0
  22. package/dist/block/del/del.js +487 -0
  23. package/dist/block/del/del.js.map +7 -0
  24. package/dist/block/details/details.js +520 -0
  25. package/dist/block/details/details.js.map +7 -0
  26. package/dist/block/dialog/dialog.js +520 -0
  27. package/dist/block/dialog/dialog.js.map +7 -0
  28. package/dist/block/div/div.js +520 -0
  29. package/dist/block/div/div.js.map +7 -0
  30. package/dist/block/dl/dl.js +465 -0
  31. package/dist/block/dl/dl.js.map +7 -0
  32. package/dist/block/dt/dt.js +422 -0
  33. package/dist/block/dt/dt.js.map +7 -0
  34. package/dist/block/embed/embed.js +333 -0
  35. package/dist/block/embed/embed.js.map +7 -0
  36. package/dist/block/fieldset/fieldset.js +509 -0
  37. package/dist/block/fieldset/fieldset.js.map +7 -0
  38. package/dist/block/figcaption/figcaption.js +465 -0
  39. package/dist/block/figcaption/figcaption.js.map +7 -0
  40. package/dist/block/figure/figure.js +465 -0
  41. package/dist/block/figure/figure.js.map +7 -0
  42. package/dist/block/footer/footer.js +476 -0
  43. package/dist/block/footer/footer.js.map +7 -0
  44. package/dist/block/form/form.js +443 -0
  45. package/dist/block/form/form.js.map +7 -0
  46. package/dist/block/h1/h1.js +454 -0
  47. package/dist/block/h1/h1.js.map +7 -0
  48. package/dist/block/h2/h2.js +454 -0
  49. package/dist/block/h2/h2.js.map +7 -0
  50. package/dist/block/h3/h3.js +454 -0
  51. package/dist/block/h3/h3.js.map +7 -0
  52. package/dist/block/h4/h4.js +454 -0
  53. package/dist/block/h4/h4.js.map +7 -0
  54. package/dist/block/h5/h5.js +454 -0
  55. package/dist/block/h5/h5.js.map +7 -0
  56. package/dist/block/h6/h6.js +454 -0
  57. package/dist/block/h6/h6.js.map +7 -0
  58. package/dist/block/header/header.js +322 -0
  59. package/dist/block/header/header.js.map +7 -0
  60. package/dist/block/hgroup/hgroup.js +465 -0
  61. package/dist/block/hgroup/hgroup.js.map +7 -0
  62. package/dist/block/hr/hr.js +169 -0
  63. package/dist/block/hr/hr.js.map +7 -0
  64. package/dist/block/html/html.js +92 -0
  65. package/dist/block/html/html.js.map +7 -0
  66. package/dist/block/iframe/iframe.js +465 -0
  67. package/dist/block/iframe/iframe.js.map +7 -0
  68. package/dist/block/ins/ins.js +487 -0
  69. package/dist/block/ins/ins.js.map +7 -0
  70. package/dist/block/legend/legend.js +465 -0
  71. package/dist/block/legend/legend.js.map +7 -0
  72. package/dist/block/li/li.js +488 -0
  73. package/dist/block/li/li.js.map +7 -0
  74. package/dist/block/main/main.js +444 -0
  75. package/dist/block/main/main.js.map +7 -0
  76. package/dist/block/map/map.js +476 -0
  77. package/dist/block/map/map.js.map +7 -0
  78. package/dist/block/menu/menu.js +498 -0
  79. package/dist/block/menu/menu.js.map +7 -0
  80. package/dist/block/nav/nav.js +455 -0
  81. package/dist/block/nav/nav.js.map +7 -0
  82. package/dist/block/noscript/noscript.js +311 -0
  83. package/dist/block/noscript/noscript.js.map +7 -0
  84. package/dist/block/object/object.js +542 -0
  85. package/dist/block/object/object.js.map +7 -0
  86. package/dist/block/ol/ol.js +542 -0
  87. package/dist/block/ol/ol.js.map +7 -0
  88. package/dist/block/optgroup/optgroup.js +476 -0
  89. package/dist/block/optgroup/optgroup.js.map +7 -0
  90. package/dist/block/option/option.js +542 -0
  91. package/dist/block/option/option.js.map +7 -0
  92. package/dist/block/p/p.js +465 -0
  93. package/dist/block/p/p.js.map +7 -0
  94. package/dist/block/picture/picture.js +465 -0
  95. package/dist/block/picture/picture.js.map +7 -0
  96. package/dist/block/pre/pre.js +465 -0
  97. package/dist/block/pre/pre.js.map +7 -0
  98. package/dist/block/section/section.js +487 -0
  99. package/dist/block/section/section.js.map +7 -0
  100. package/dist/block/summary/summary.js +466 -0
  101. package/dist/block/summary/summary.js.map +7 -0
  102. package/dist/block/table/table.js +509 -0
  103. package/dist/block/table/table.js.map +7 -0
  104. package/dist/block/tbody/tbody.js +465 -0
  105. package/dist/block/tbody/tbody.js.map +7 -0
  106. package/dist/block/td/td.js +575 -0
  107. package/dist/block/td/td.js.map +7 -0
  108. package/dist/block/template/template.js +465 -0
  109. package/dist/block/template/template.js.map +7 -0
  110. package/dist/block/tfoot/tfoot.js +465 -0
  111. package/dist/block/tfoot/tfoot.js.map +7 -0
  112. package/dist/block/th/th.js +586 -0
  113. package/dist/block/th/th.js.map +7 -0
  114. package/dist/block/thead/thead.js +465 -0
  115. package/dist/block/thead/thead.js.map +7 -0
  116. package/dist/block/tr/tr.js +586 -0
  117. package/dist/block/tr/tr.js.map +7 -0
  118. package/dist/block/ul/ul.js +509 -0
  119. package/dist/block/ul/ul.js.map +7 -0
  120. package/dist/block/video/video.js +575 -0
  121. package/dist/block/video/video.js.map +7 -0
  122. package/dist/index.js +48830 -0
  123. package/dist/index.js.map +7 -0
  124. package/dist/inline/a/a.js +586 -0
  125. package/dist/inline/a/a.js.map +7 -0
  126. package/dist/inline/abbr/abbr.js +454 -0
  127. package/dist/inline/abbr/abbr.js.map +7 -0
  128. package/dist/inline/address/address.js +443 -0
  129. package/dist/inline/address/address.js.map +7 -0
  130. package/dist/inline/b/b.js +465 -0
  131. package/dist/inline/b/b.js.map +7 -0
  132. package/dist/inline/bdi/bdi.js +454 -0
  133. package/dist/inline/bdi/bdi.js.map +7 -0
  134. package/dist/inline/bdo/bdo.js +465 -0
  135. package/dist/inline/bdo/bdo.js.map +7 -0
  136. package/dist/inline/button/button.js +685 -0
  137. package/dist/inline/button/button.js.map +7 -0
  138. package/dist/inline/cite/cite.js +465 -0
  139. package/dist/inline/cite/cite.js.map +7 -0
  140. package/dist/inline/code/code.js +465 -0
  141. package/dist/inline/code/code.js.map +7 -0
  142. package/dist/inline/data/data.js +476 -0
  143. package/dist/inline/data/data.js.map +7 -0
  144. package/dist/inline/dfn/dfn.js +465 -0
  145. package/dist/inline/dfn/dfn.js.map +7 -0
  146. package/dist/inline/em/em.js +465 -0
  147. package/dist/inline/em/em.js.map +7 -0
  148. package/dist/inline/i/i.js +465 -0
  149. package/dist/inline/i/i.js.map +7 -0
  150. package/dist/inline/img/img.js +399 -0
  151. package/dist/inline/img/img.js.map +7 -0
  152. package/dist/inline/input/input.js +938 -0
  153. package/dist/inline/input/input.js.map +7 -0
  154. package/dist/inline/kbd/kbd.js +465 -0
  155. package/dist/inline/kbd/kbd.js.map +7 -0
  156. package/dist/inline/label/label.js +487 -0
  157. package/dist/inline/label/label.js.map +7 -0
  158. package/dist/inline/mark/mark.js +465 -0
  159. package/dist/inline/mark/mark.js.map +7 -0
  160. package/dist/inline/meter/meter.js +498 -0
  161. package/dist/inline/meter/meter.js.map +7 -0
  162. package/dist/inline/output/output.js +410 -0
  163. package/dist/inline/output/output.js.map +7 -0
  164. package/dist/inline/progress/progress.js +454 -0
  165. package/dist/inline/progress/progress.js.map +7 -0
  166. package/dist/inline/q/q.js +476 -0
  167. package/dist/inline/q/q.js.map +7 -0
  168. package/dist/inline/rp/rp.js +465 -0
  169. package/dist/inline/rp/rp.js.map +7 -0
  170. package/dist/inline/rt/rt.js +465 -0
  171. package/dist/inline/rt/rt.js.map +7 -0
  172. package/dist/inline/ruby/ruby.js +465 -0
  173. package/dist/inline/ruby/ruby.js.map +7 -0
  174. package/dist/inline/s/s.js +465 -0
  175. package/dist/inline/s/s.js.map +7 -0
  176. package/dist/inline/samp/samp.js +465 -0
  177. package/dist/inline/samp/samp.js.map +7 -0
  178. package/dist/inline/select/select.js +674 -0
  179. package/dist/inline/select/select.js.map +7 -0
  180. package/dist/inline/slot/slot.js +476 -0
  181. package/dist/inline/slot/slot.js.map +7 -0
  182. package/dist/inline/small/small.js +465 -0
  183. package/dist/inline/small/small.js.map +7 -0
  184. package/dist/inline/span/span.js +465 -0
  185. package/dist/inline/span/span.js.map +7 -0
  186. package/dist/inline/strong/strong.js +465 -0
  187. package/dist/inline/strong/strong.js.map +7 -0
  188. package/dist/inline/sub/sub.js +465 -0
  189. package/dist/inline/sub/sub.js.map +7 -0
  190. package/dist/inline/sup/sup.js +465 -0
  191. package/dist/inline/sup/sup.js.map +7 -0
  192. package/dist/inline/svg/svg.js +542 -0
  193. package/dist/inline/svg/svg.js.map +7 -0
  194. package/dist/inline/textarea/textarea.js +718 -0
  195. package/dist/inline/textarea/textarea.js.map +7 -0
  196. package/dist/inline/time/time.js +476 -0
  197. package/dist/inline/time/time.js.map +7 -0
  198. package/dist/inline/u/u.js +465 -0
  199. package/dist/inline/u/u.js.map +7 -0
  200. package/dist/inline/var/var.js +465 -0
  201. package/dist/inline/var/var.js.map +7 -0
  202. package/dist/void/area/area.js +388 -0
  203. package/dist/void/area/area.js.map +7 -0
  204. package/dist/void/base/base.js +37 -0
  205. package/dist/void/base/base.js.map +7 -0
  206. package/dist/void/br/br.js +135 -0
  207. package/dist/void/br/br.js.map +7 -0
  208. package/dist/void/col/col.js +135 -0
  209. package/dist/void/col/col.js.map +7 -0
  210. package/dist/void/head/head.js +37 -0
  211. package/dist/void/head/head.js.map +7 -0
  212. package/dist/void/link/link.js +213 -0
  213. package/dist/void/link/link.js.map +7 -0
  214. package/dist/void/meta/meta.js +147 -0
  215. package/dist/void/meta/meta.js.map +7 -0
  216. package/dist/void/param/param.js +146 -0
  217. package/dist/void/param/param.js.map +7 -0
  218. package/dist/void/script/script.js +213 -0
  219. package/dist/void/script/script.js.map +7 -0
  220. package/dist/void/source/source.js +168 -0
  221. package/dist/void/source/source.js.map +7 -0
  222. package/dist/void/style/style.js +147 -0
  223. package/dist/void/style/style.js.map +7 -0
  224. package/dist/void/title/title.js +37 -0
  225. package/dist/void/title/title.js.map +7 -0
  226. package/dist/void/track/track.js +190 -0
  227. package/dist/void/track/track.js.map +7 -0
  228. package/dist/void/wbr/wbr.js +124 -0
  229. package/dist/void/wbr/wbr.js.map +7 -0
  230. package/package.json +4 -4
  231. package/src/block/article/article.ts +649 -0
  232. package/{block → src/block}/aside/aside.ts +144 -1
  233. package/{block → src/block}/audio/audio.ts +128 -1
  234. package/src/block/blockquote/blockquote.ts +665 -0
  235. package/{block → src/block}/body/body.ts +91 -1
  236. package/{block → src/block}/canvas/canvas.ts +144 -1
  237. package/src/block/caption/caption.ts +649 -0
  238. package/{block → src/block}/colgroup/colgroup.ts +96 -1
  239. package/src/block/datalist/datalist.ts +649 -0
  240. package/{block/dialog/dialog.ts → src/block/dd/dd.ts} +114 -88
  241. package/{block → src/block}/del/del.ts +144 -1
  242. package/src/block/details/details.ts +729 -0
  243. package/src/block/dialog/dialog.ts +729 -0
  244. package/src/block/div/div.ts +729 -0
  245. package/src/block/dl/dl.ts +649 -0
  246. package/{block/details/details.ts → src/block/dt/dt.ts} +114 -88
  247. package/{block → src/block}/embed/embed.ts +144 -1
  248. package/{block → src/block}/fieldset/fieldset.ts +144 -1
  249. package/src/block/figcaption/figcaption.ts +649 -0
  250. package/src/block/figure/figure.ts +649 -0
  251. package/src/block/footer/footer.ts +665 -0
  252. package/{block → src/block}/form/form.ts +132 -5
  253. package/src/block/h1/h1.ts +633 -0
  254. package/src/block/h2/h2.ts +633 -0
  255. package/src/block/h3/h3.ts +633 -0
  256. package/src/block/h4/h4.ts +633 -0
  257. package/src/block/h5/h5.ts +633 -0
  258. package/src/block/h6/h6.ts +633 -0
  259. package/{block → src/block}/header/header.ts +144 -1
  260. package/src/block/hgroup/hgroup.ts +649 -0
  261. package/{block → src/block}/hr/hr.ts +59 -1
  262. package/{block → src/block}/html/html.ts +27 -1
  263. package/{block → src/block}/iframe/iframe.ts +112 -1
  264. package/{block → src/block}/ins/ins.ts +144 -1
  265. package/src/block/legend/legend.ts +649 -0
  266. package/{block → src/block}/li/li.ts +107 -1
  267. package/{block/div/div.ts → src/block/main/main.ts} +112 -54
  268. package/src/block/map/map.ts +665 -0
  269. package/{block → src/block}/menu/menu.ts +144 -1
  270. package/{block → src/block}/nav/nav.ts +107 -1
  271. package/{block → src/block}/noscript/noscript.ts +144 -1
  272. package/{block → src/block}/object/object.ts +144 -1
  273. package/{block → src/block}/ol/ol.ts +144 -1
  274. package/{block → src/block}/optgroup/optgroup.ts +144 -1
  275. package/{block → src/block}/option/option.ts +144 -1
  276. package/src/block/p/p.ts +649 -0
  277. package/src/block/picture/picture.ts +649 -0
  278. package/src/block/pre/pre.ts +649 -0
  279. package/{block → src/block}/section/section.ts +144 -1
  280. package/{block → src/block}/summary/summary.ts +107 -1
  281. package/{block → src/block}/table/table.ts +144 -1
  282. package/src/block/tbody/tbody.ts +649 -0
  283. package/{block → src/block}/td/td.ts +144 -1
  284. package/src/block/template/template.ts +649 -0
  285. package/src/block/tfoot/tfoot.ts +649 -0
  286. package/{block → src/block}/th/th.ts +144 -1
  287. package/src/block/thead/thead.ts +649 -0
  288. package/{block → src/block}/tr/tr.ts +144 -1
  289. package/{block → src/block}/ul/ul.ts +144 -1
  290. package/{block → src/block}/video/video.ts +144 -1
  291. package/{inline → src/inline}/a/a.ts +144 -1
  292. package/src/inline/abbr/abbr.ts +633 -0
  293. package/src/inline/address/address.ts +617 -0
  294. package/src/inline/b/b.ts +649 -0
  295. package/src/inline/bdi/bdi.ts +633 -0
  296. package/src/inline/bdo/bdo.ts +649 -0
  297. package/{inline → src/inline}/button/button.ts +145 -2
  298. package/src/inline/cite/cite.ts +649 -0
  299. package/src/inline/code/code.ts +649 -0
  300. package/src/inline/data/data.ts +665 -0
  301. package/src/inline/dfn/dfn.ts +649 -0
  302. package/src/inline/em/em.ts +649 -0
  303. package/src/inline/i/i.ts +649 -0
  304. package/{inline → src/inline}/img/img.ts +112 -1
  305. package/{inline → src/inline}/input/input.ts +145 -2
  306. package/src/inline/kbd/kbd.ts +649 -0
  307. package/{inline → src/inline}/label/label.ts +144 -1
  308. package/src/inline/mark/mark.ts +649 -0
  309. package/{inline → src/inline}/meter/meter.ts +144 -1
  310. package/{inline → src/inline}/output/output.ts +144 -1
  311. package/{inline → src/inline}/progress/progress.ts +144 -1
  312. package/src/inline/q/q.ts +665 -0
  313. package/src/inline/rp/rp.ts +649 -0
  314. package/src/inline/rt/rt.ts +649 -0
  315. package/src/inline/ruby/ruby.ts +649 -0
  316. package/src/inline/s/s.ts +649 -0
  317. package/src/inline/samp/samp.ts +649 -0
  318. package/{inline → src/inline}/select/select.ts +144 -1
  319. package/src/inline/slot/slot.ts +665 -0
  320. package/src/inline/small/small.ts +649 -0
  321. package/src/inline/span/span.ts +649 -0
  322. package/src/inline/strong/strong.ts +649 -0
  323. package/src/inline/sub/sub.ts +649 -0
  324. package/src/inline/sup/sup.ts +649 -0
  325. package/{inline → src/inline}/svg/svg.ts +144 -1
  326. package/{inline → src/inline}/textarea/textarea.ts +144 -1
  327. package/src/inline/time/time.ts +665 -0
  328. package/src/inline/u/u.ts +649 -0
  329. package/src/inline/var/var.ts +649 -0
  330. package/{void → src/void}/area/area.ts +144 -1
  331. package/{void → src/void}/base/base.ts +1 -1
  332. package/src/void/br/br.ts +172 -0
  333. package/src/void/col/col.ts +172 -0
  334. package/{void → src/void}/head/head.ts +1 -1
  335. package/{void → src/void}/link/link.ts +59 -1
  336. package/{void → src/void}/meta/meta.ts +59 -1
  337. package/src/void/param/param.ts +188 -0
  338. package/{void → src/void}/script/script.ts +59 -1
  339. package/src/void/source/source.ts +220 -0
  340. package/{void → src/void}/style/style.ts +59 -1
  341. package/{void → src/void}/title/title.ts +1 -1
  342. package/{void → src/void}/track/track.ts +96 -1
  343. package/src/void/wbr/wbr.ts +156 -0
  344. package/block/article/article.ts +0 -506
  345. package/block/blockquote/blockquote.ts +0 -522
  346. package/block/caption/caption.ts +0 -506
  347. package/block/datalist/datalist.ts +0 -506
  348. package/block/dd/dd.ts +0 -506
  349. package/block/dl/dl.ts +0 -506
  350. package/block/dt/dt.ts +0 -506
  351. package/block/figcaption/figcaption.ts +0 -506
  352. package/block/figure/figure.ts +0 -506
  353. package/block/footer/footer.ts +0 -522
  354. package/block/h1/h1.ts +0 -490
  355. package/block/h2/h2.ts +0 -490
  356. package/block/h3/h3.ts +0 -490
  357. package/block/h4/h4.ts +0 -490
  358. package/block/h5/h5.ts +0 -490
  359. package/block/h6/h6.ts +0 -490
  360. package/block/hgroup/hgroup.ts +0 -506
  361. package/block/legend/legend.ts +0 -506
  362. package/block/main/main.ts +0 -538
  363. package/block/map/map.ts +0 -522
  364. package/block/p/p.ts +0 -506
  365. package/block/picture/picture.ts +0 -506
  366. package/block/pre/pre.ts +0 -506
  367. package/block/tbody/tbody.ts +0 -506
  368. package/block/template/template.ts +0 -506
  369. package/block/tfoot/tfoot.ts +0 -506
  370. package/block/thead/thead.ts +0 -506
  371. package/inline/abbr/abbr.ts +0 -490
  372. package/inline/address/address.ts +0 -474
  373. package/inline/b/b.ts +0 -506
  374. package/inline/bdi/bdi.ts +0 -490
  375. package/inline/bdo/bdo.ts +0 -506
  376. package/inline/cite/cite.ts +0 -506
  377. package/inline/code/code.ts +0 -506
  378. package/inline/data/data.ts +0 -522
  379. package/inline/dfn/dfn.ts +0 -506
  380. package/inline/em/em.ts +0 -506
  381. package/inline/i/i.ts +0 -506
  382. package/inline/kbd/kbd.ts +0 -506
  383. package/inline/mark/mark.ts +0 -506
  384. package/inline/q/q.ts +0 -522
  385. package/inline/rp/rp.ts +0 -506
  386. package/inline/rt/rt.ts +0 -506
  387. package/inline/ruby/ruby.ts +0 -506
  388. package/inline/s/s.ts +0 -506
  389. package/inline/samp/samp.ts +0 -506
  390. package/inline/slot/slot.ts +0 -522
  391. package/inline/small/small.ts +0 -506
  392. package/inline/span/span.ts +0 -506
  393. package/inline/strong/strong.ts +0 -506
  394. package/inline/sub/sub.ts +0 -506
  395. package/inline/sup/sup.ts +0 -506
  396. package/inline/time/time.ts +0 -522
  397. package/inline/u/u.ts +0 -506
  398. package/inline/var/var.ts +0 -506
  399. package/void/br/br.ts +0 -77
  400. package/void/col/col.ts +0 -77
  401. package/void/param/param.ts +0 -93
  402. package/void/source/source.ts +0 -125
  403. package/void/wbr/wbr.ts +0 -61
  404. /package/{index.ts → src/index.ts} +0 -0
  405. /package/{tsconfig.json → src/tsconfig.json} +0 -0
@@ -0,0 +1,718 @@
1
+ // src/inline/textarea/textarea.ts
2
+ var Textarea = class {
3
+ constructor(props = {}) {
4
+ this.element = document.createElement("textarea");
5
+ this.applyProps(props);
6
+ }
7
+ applyProps(props) {
8
+ if (props.children !== void 0) {
9
+ this.setChildren(props.children);
10
+ }
11
+ if (props.accessKey !== void 0) {
12
+ this.element.setAttribute("accessKey", String(props.accessKey));
13
+ }
14
+ if (props.accesskey !== void 0) {
15
+ this.element.setAttribute("accesskey", String(props.accesskey));
16
+ }
17
+ if (props["alpine-attributes"] !== void 0) {
18
+ const __map = props["alpine-attributes"];
19
+ if (__map !== null && __map !== void 0) {
20
+ for (const __k in __map) {
21
+ const __v = __map[__k];
22
+ let __attr = __k;
23
+ if (__k.startsWith("@")) {
24
+ __attr = "x-on:" + __k.slice(1);
25
+ } else if (__k.startsWith(":")) {
26
+ __attr = "x-bind:" + __k.slice(1);
27
+ } else if (__k.startsWith(".")) {
28
+ __attr = "x-model" + __k;
29
+ } else if (!__k.startsWith("x-") && ["show", "text", "html", "if", "for", "cloak", "init", "data", "effect", "ignore", "ref", "transition", "teleport"].includes(__k)) {
30
+ __attr = "x-" + __k;
31
+ }
32
+ this.element.setAttribute(__attr, String(__v));
33
+ }
34
+ }
35
+ }
36
+ if (props["aria-atomic"] !== void 0) {
37
+ this.setAriaAtomic(props["aria-atomic"]);
38
+ }
39
+ if (props["aria-autocomplete"] !== void 0) {
40
+ this.setAriaAutocomplete(props["aria-autocomplete"]);
41
+ }
42
+ if (props["aria-controls"] !== void 0) {
43
+ this.element.setAttribute("aria-controls", String(props["aria-controls"]));
44
+ }
45
+ if (props["aria-describedby"] !== void 0) {
46
+ this.element.setAttribute("aria-describedby", String(props["aria-describedby"]));
47
+ }
48
+ if (props["aria-details"] !== void 0) {
49
+ this.element.setAttribute("aria-details", String(props["aria-details"]));
50
+ }
51
+ if (props["aria-disabled"] !== void 0) {
52
+ this.setAriaDisabled(props["aria-disabled"]);
53
+ }
54
+ if (props["aria-expanded"] !== void 0) {
55
+ this.setAriaExpanded(props["aria-expanded"]);
56
+ }
57
+ if (props["aria-haspopup"] !== void 0) {
58
+ this.setAriaHaspopup(props["aria-haspopup"]);
59
+ }
60
+ if (props["aria-invalid"] !== void 0) {
61
+ this.setAriaInvalid(props["aria-invalid"]);
62
+ }
63
+ if (props["aria-keyshortcuts"] !== void 0) {
64
+ this.element.setAttribute("aria-keyshortcuts", String(props["aria-keyshortcuts"]));
65
+ }
66
+ if (props["aria-label"] !== void 0) {
67
+ this.element.setAttribute("aria-label", String(props["aria-label"]));
68
+ }
69
+ if (props["aria-labelledby"] !== void 0) {
70
+ this.element.setAttribute("aria-labelledby", String(props["aria-labelledby"]));
71
+ }
72
+ if (props["aria-live"] !== void 0) {
73
+ this.setAriaLive(props["aria-live"]);
74
+ }
75
+ if (props["aria-multiline"] !== void 0) {
76
+ this.setAriaMultiline(props["aria-multiline"]);
77
+ }
78
+ if (props["aria-placeholder"] !== void 0) {
79
+ this.element.setAttribute("aria-placeholder", String(props["aria-placeholder"]));
80
+ }
81
+ if (props["aria-pressed"] !== void 0) {
82
+ this.setAriaPressed(props["aria-pressed"]);
83
+ }
84
+ if (props["aria-readonly"] !== void 0) {
85
+ this.setAriaReadonly(props["aria-readonly"]);
86
+ }
87
+ if (props["aria-relevant"] !== void 0) {
88
+ this.setAriaRelevant(props["aria-relevant"]);
89
+ }
90
+ if (props["aria-required"] !== void 0) {
91
+ this.setAriaRequired(props["aria-required"]);
92
+ }
93
+ if (props["aria-roledescription"] !== void 0) {
94
+ this.element.setAttribute("aria-roledescription", String(props["aria-roledescription"]));
95
+ }
96
+ if (props.autocapitalize !== void 0) {
97
+ this.setAutocapitalize(props.autocapitalize);
98
+ }
99
+ if (props.autocomplete !== void 0) {
100
+ this.setAutocomplete(props.autocomplete);
101
+ }
102
+ if (props.autocorrect !== void 0) {
103
+ this.setAutocorrect(props.autocorrect);
104
+ }
105
+ if (props.autofocus !== void 0) {
106
+ this.element.setAttribute("autofocus", String(props.autofocus));
107
+ }
108
+ if (props.className !== void 0) {
109
+ this.element.setAttribute("className", String(props.className));
110
+ }
111
+ if (props.cols !== void 0) {
112
+ this.element.setAttribute("cols", String(props.cols));
113
+ }
114
+ if (props.contentEditable !== void 0) {
115
+ this.element.setAttribute("contentEditable", String(props.contentEditable));
116
+ }
117
+ if (props.contenteditable !== void 0) {
118
+ this.setContenteditable(props.contenteditable);
119
+ }
120
+ if (props["data-attributes"] !== void 0) {
121
+ const __map = props["data-attributes"];
122
+ if (__map !== null && __map !== void 0) {
123
+ for (const __k in __map) {
124
+ this.element.setAttribute(`data-${__k}`, String(__map[__k]));
125
+ }
126
+ }
127
+ }
128
+ if (props.dir !== void 0) {
129
+ this.setDir(props.dir);
130
+ }
131
+ if (props.dirname !== void 0) {
132
+ this.element.setAttribute("dirname", String(props.dirname));
133
+ }
134
+ if (props.disabled !== void 0) {
135
+ this.element.setAttribute("disabled", String(props.disabled));
136
+ }
137
+ if (props.draggable !== void 0) {
138
+ this.element.setAttribute("draggable", String(props.draggable));
139
+ }
140
+ if (props.form !== void 0) {
141
+ this.element.setAttribute("form", String(props.form));
142
+ }
143
+ if (props.hidden !== void 0) {
144
+ this.element.setAttribute("hidden", String(props.hidden));
145
+ }
146
+ if (props.id !== void 0) {
147
+ this.element.setAttribute("id", String(props.id));
148
+ }
149
+ if (props.inputmode !== void 0) {
150
+ this.setInputmode(props.inputmode);
151
+ }
152
+ if (props.lang !== void 0) {
153
+ this.element.setAttribute("lang", String(props.lang));
154
+ }
155
+ if (props.maxlength !== void 0) {
156
+ this.element.setAttribute("maxlength", String(props.maxlength));
157
+ }
158
+ if (props.minlength !== void 0) {
159
+ this.element.setAttribute("minlength", String(props.minlength));
160
+ }
161
+ if (props.name !== void 0) {
162
+ this.element.setAttribute("name", String(props.name));
163
+ }
164
+ if (props.placeholder !== void 0) {
165
+ this.element.setAttribute("placeholder", String(props.placeholder));
166
+ }
167
+ if (props.popover !== void 0) {
168
+ this.setPopover(props.popover);
169
+ }
170
+ if (props.readonly !== void 0) {
171
+ this.element.setAttribute("readonly", String(props.readonly));
172
+ }
173
+ if (props.required !== void 0) {
174
+ this.element.setAttribute("required", String(props.required));
175
+ }
176
+ if (props.role !== void 0) {
177
+ this.setRole(props.role);
178
+ }
179
+ if (props.rows !== void 0) {
180
+ this.element.setAttribute("rows", String(props.rows));
181
+ }
182
+ if (props.slot !== void 0) {
183
+ this.element.setAttribute("slot", String(props.slot));
184
+ }
185
+ if (props.spellcheck !== void 0) {
186
+ this.setSpellcheck(props.spellcheck);
187
+ }
188
+ if (props.style !== void 0) {
189
+ this.element.setAttribute("style", String(props.style));
190
+ }
191
+ if (props.tabIndex !== void 0) {
192
+ this.element.setAttribute("tabIndex", String(props.tabIndex));
193
+ }
194
+ if (props.tabindex !== void 0) {
195
+ this.element.setAttribute("tabindex", String(props.tabindex));
196
+ }
197
+ if (props.title !== void 0) {
198
+ this.element.setAttribute("title", String(props.title));
199
+ }
200
+ if (props.translate !== void 0) {
201
+ this.setTranslate(props.translate);
202
+ }
203
+ if (props.wrap !== void 0) {
204
+ this.setWrap(props.wrap);
205
+ }
206
+ }
207
+ setAccessKey(value) {
208
+ if (value === null || value === void 0) {
209
+ this.element.removeAttribute("accessKey");
210
+ } else {
211
+ this.element.setAttribute("accessKey", String(value));
212
+ }
213
+ return this;
214
+ }
215
+ setAccesskey(value) {
216
+ if (value === null || value === void 0) {
217
+ this.element.removeAttribute("accesskey");
218
+ } else {
219
+ this.element.setAttribute("accesskey", String(value));
220
+ }
221
+ return this;
222
+ }
223
+ setAlpineAttributes(value) {
224
+ if (value === null || value === void 0) {
225
+ for (const __a of Array.from(this.element.attributes)) {
226
+ if (__a.name.startsWith("x-")) {
227
+ this.element.removeAttribute(__a.name);
228
+ }
229
+ }
230
+ } else {
231
+ for (const __k in value) {
232
+ let __attr = __k;
233
+ if (__k.startsWith("@")) {
234
+ __attr = "x-on:" + __k.slice(1);
235
+ } else if (__k.startsWith(":")) {
236
+ __attr = "x-bind:" + __k.slice(1);
237
+ } else if (__k.startsWith(".")) {
238
+ __attr = "x-model" + __k;
239
+ } else if (!__k.startsWith("x-") && ["show", "text", "html", "if", "for", "cloak", "init", "data", "effect", "ignore", "ref", "transition", "teleport"].includes(__k)) {
240
+ __attr = "x-" + __k;
241
+ }
242
+ this.element.setAttribute(__attr, String(value[__k]));
243
+ }
244
+ }
245
+ return this;
246
+ }
247
+ setAriaAtomic(value) {
248
+ if (value === null || value === void 0) {
249
+ this.element.removeAttribute("aria-atomic");
250
+ } else {
251
+ this.element.setAttribute("aria-atomic", String(value));
252
+ }
253
+ return this;
254
+ }
255
+ setAriaAutocomplete(value) {
256
+ if (value === null || value === void 0) {
257
+ this.element.removeAttribute("aria-autocomplete");
258
+ } else {
259
+ this.element.setAttribute("aria-autocomplete", String(value));
260
+ }
261
+ return this;
262
+ }
263
+ setAriaControls(value) {
264
+ if (value === null || value === void 0) {
265
+ this.element.removeAttribute("aria-controls");
266
+ } else {
267
+ this.element.setAttribute("aria-controls", String(value));
268
+ }
269
+ return this;
270
+ }
271
+ setAriaDescribedby(value) {
272
+ if (value === null || value === void 0) {
273
+ this.element.removeAttribute("aria-describedby");
274
+ } else {
275
+ this.element.setAttribute("aria-describedby", String(value));
276
+ }
277
+ return this;
278
+ }
279
+ setAriaDetails(value) {
280
+ if (value === null || value === void 0) {
281
+ this.element.removeAttribute("aria-details");
282
+ } else {
283
+ this.element.setAttribute("aria-details", String(value));
284
+ }
285
+ return this;
286
+ }
287
+ setAriaDisabled(value) {
288
+ if (value === null || value === void 0) {
289
+ this.element.removeAttribute("aria-disabled");
290
+ } else {
291
+ this.element.setAttribute("aria-disabled", String(value));
292
+ }
293
+ return this;
294
+ }
295
+ setAriaExpanded(value) {
296
+ if (value === null || value === void 0) {
297
+ this.element.removeAttribute("aria-expanded");
298
+ } else {
299
+ this.element.setAttribute("aria-expanded", String(value));
300
+ }
301
+ return this;
302
+ }
303
+ setAriaHaspopup(value) {
304
+ if (value === null || value === void 0) {
305
+ this.element.removeAttribute("aria-haspopup");
306
+ } else {
307
+ this.element.setAttribute("aria-haspopup", String(value));
308
+ }
309
+ return this;
310
+ }
311
+ setAriaInvalid(value) {
312
+ if (value === null || value === void 0) {
313
+ this.element.removeAttribute("aria-invalid");
314
+ } else {
315
+ this.element.setAttribute("aria-invalid", String(value));
316
+ }
317
+ return this;
318
+ }
319
+ setAriaKeyshortcuts(value) {
320
+ if (value === null || value === void 0) {
321
+ this.element.removeAttribute("aria-keyshortcuts");
322
+ } else {
323
+ this.element.setAttribute("aria-keyshortcuts", String(value));
324
+ }
325
+ return this;
326
+ }
327
+ setAriaLabel(value) {
328
+ if (value === null || value === void 0) {
329
+ this.element.removeAttribute("aria-label");
330
+ } else {
331
+ this.element.setAttribute("aria-label", String(value));
332
+ }
333
+ return this;
334
+ }
335
+ setAriaLabelledby(value) {
336
+ if (value === null || value === void 0) {
337
+ this.element.removeAttribute("aria-labelledby");
338
+ } else {
339
+ this.element.setAttribute("aria-labelledby", String(value));
340
+ }
341
+ return this;
342
+ }
343
+ setAriaLive(value) {
344
+ if (value === null || value === void 0) {
345
+ this.element.removeAttribute("aria-live");
346
+ } else {
347
+ this.element.setAttribute("aria-live", String(value));
348
+ }
349
+ return this;
350
+ }
351
+ setAriaMultiline(value) {
352
+ if (value === null || value === void 0) {
353
+ this.element.removeAttribute("aria-multiline");
354
+ } else {
355
+ this.element.setAttribute("aria-multiline", String(value));
356
+ }
357
+ return this;
358
+ }
359
+ setAriaPlaceholder(value) {
360
+ if (value === null || value === void 0) {
361
+ this.element.removeAttribute("aria-placeholder");
362
+ } else {
363
+ this.element.setAttribute("aria-placeholder", String(value));
364
+ }
365
+ return this;
366
+ }
367
+ setAriaPressed(value) {
368
+ if (value === null || value === void 0) {
369
+ this.element.removeAttribute("aria-pressed");
370
+ } else {
371
+ this.element.setAttribute("aria-pressed", String(value));
372
+ }
373
+ return this;
374
+ }
375
+ setAriaReadonly(value) {
376
+ if (value === null || value === void 0) {
377
+ this.element.removeAttribute("aria-readonly");
378
+ } else {
379
+ this.element.setAttribute("aria-readonly", String(value));
380
+ }
381
+ return this;
382
+ }
383
+ setAriaRelevant(value) {
384
+ if (value === null || value === void 0) {
385
+ this.element.removeAttribute("aria-relevant");
386
+ } else {
387
+ this.element.setAttribute("aria-relevant", String(value));
388
+ }
389
+ return this;
390
+ }
391
+ setAriaRequired(value) {
392
+ if (value === null || value === void 0) {
393
+ this.element.removeAttribute("aria-required");
394
+ } else {
395
+ this.element.setAttribute("aria-required", String(value));
396
+ }
397
+ return this;
398
+ }
399
+ setAriaRoledescription(value) {
400
+ if (value === null || value === void 0) {
401
+ this.element.removeAttribute("aria-roledescription");
402
+ } else {
403
+ this.element.setAttribute("aria-roledescription", String(value));
404
+ }
405
+ return this;
406
+ }
407
+ setAutocapitalize(value) {
408
+ if (value === null || value === void 0) {
409
+ this.element.removeAttribute("autocapitalize");
410
+ } else {
411
+ this.element.setAttribute("autocapitalize", String(value));
412
+ }
413
+ return this;
414
+ }
415
+ setAutocomplete(value) {
416
+ if (value === null || value === void 0) {
417
+ this.element.removeAttribute("autocomplete");
418
+ } else {
419
+ this.element.setAttribute("autocomplete", String(value));
420
+ }
421
+ return this;
422
+ }
423
+ setAutocorrect(value) {
424
+ if (value === null || value === void 0) {
425
+ this.element.removeAttribute("autocorrect");
426
+ } else {
427
+ this.element.setAttribute("autocorrect", String(value));
428
+ }
429
+ return this;
430
+ }
431
+ setAutofocus(value) {
432
+ if (value === true) {
433
+ this.element.setAttribute("autofocus", "");
434
+ } else {
435
+ this.element.removeAttribute("autofocus");
436
+ }
437
+ return this;
438
+ }
439
+ setClassName(value) {
440
+ if (value === null || value === void 0) {
441
+ this.element.removeAttribute("className");
442
+ } else {
443
+ this.element.setAttribute("className", String(value));
444
+ }
445
+ return this;
446
+ }
447
+ setCols(value) {
448
+ if (value === null || value === void 0) {
449
+ this.element.removeAttribute("cols");
450
+ } else {
451
+ this.element.setAttribute("cols", String(value));
452
+ }
453
+ return this;
454
+ }
455
+ setContentEditable(value) {
456
+ if (value === true) {
457
+ this.element.setAttribute("contentEditable", "");
458
+ } else {
459
+ this.element.removeAttribute("contentEditable");
460
+ }
461
+ return this;
462
+ }
463
+ setContenteditable(value) {
464
+ if (value === null || value === void 0) {
465
+ this.element.removeAttribute("contenteditable");
466
+ } else {
467
+ this.element.setAttribute("contenteditable", String(value));
468
+ }
469
+ return this;
470
+ }
471
+ setDataAttributes(value) {
472
+ if (value === null || value === void 0) {
473
+ for (const __a of Array.from(this.element.attributes)) {
474
+ if (__a.name.startsWith("data-")) {
475
+ this.element.removeAttribute(__a.name);
476
+ }
477
+ }
478
+ } else {
479
+ for (const __k in value) {
480
+ this.element.setAttribute(`data-${__k}`, String(value[__k]));
481
+ }
482
+ }
483
+ return this;
484
+ }
485
+ setDir(value) {
486
+ if (value === null || value === void 0) {
487
+ this.element.removeAttribute("dir");
488
+ } else {
489
+ this.element.setAttribute("dir", String(value));
490
+ }
491
+ return this;
492
+ }
493
+ setDirname(value) {
494
+ if (value === null || value === void 0) {
495
+ this.element.removeAttribute("dirname");
496
+ } else {
497
+ this.element.setAttribute("dirname", String(value));
498
+ }
499
+ return this;
500
+ }
501
+ setDisabled(value) {
502
+ if (value === true) {
503
+ this.element.setAttribute("disabled", "");
504
+ } else {
505
+ this.element.removeAttribute("disabled");
506
+ }
507
+ return this;
508
+ }
509
+ setDraggable(value) {
510
+ if (value === true) {
511
+ this.element.setAttribute("draggable", "");
512
+ } else {
513
+ this.element.removeAttribute("draggable");
514
+ }
515
+ return this;
516
+ }
517
+ setForm(value) {
518
+ if (value === null || value === void 0) {
519
+ this.element.removeAttribute("form");
520
+ } else {
521
+ this.element.setAttribute("form", String(value));
522
+ }
523
+ return this;
524
+ }
525
+ setHidden(value) {
526
+ if (value === true) {
527
+ this.element.setAttribute("hidden", "");
528
+ } else {
529
+ this.element.removeAttribute("hidden");
530
+ }
531
+ return this;
532
+ }
533
+ setId(value) {
534
+ if (value === null || value === void 0) {
535
+ this.element.removeAttribute("id");
536
+ } else {
537
+ this.element.setAttribute("id", String(value));
538
+ }
539
+ return this;
540
+ }
541
+ setInputmode(value) {
542
+ if (value === null || value === void 0) {
543
+ this.element.removeAttribute("inputmode");
544
+ } else {
545
+ this.element.setAttribute("inputmode", String(value));
546
+ }
547
+ return this;
548
+ }
549
+ setLang(value) {
550
+ if (value === null || value === void 0) {
551
+ this.element.removeAttribute("lang");
552
+ } else {
553
+ this.element.setAttribute("lang", String(value));
554
+ }
555
+ return this;
556
+ }
557
+ setMaxlength(value) {
558
+ if (value === null || value === void 0) {
559
+ this.element.removeAttribute("maxlength");
560
+ } else {
561
+ this.element.setAttribute("maxlength", String(value));
562
+ }
563
+ return this;
564
+ }
565
+ setMinlength(value) {
566
+ if (value === null || value === void 0) {
567
+ this.element.removeAttribute("minlength");
568
+ } else {
569
+ this.element.setAttribute("minlength", String(value));
570
+ }
571
+ return this;
572
+ }
573
+ setName(value) {
574
+ if (value === null || value === void 0) {
575
+ this.element.removeAttribute("name");
576
+ } else {
577
+ this.element.setAttribute("name", String(value));
578
+ }
579
+ return this;
580
+ }
581
+ setPlaceholder(value) {
582
+ if (value === null || value === void 0) {
583
+ this.element.removeAttribute("placeholder");
584
+ } else {
585
+ this.element.setAttribute("placeholder", String(value));
586
+ }
587
+ return this;
588
+ }
589
+ setPopover(value) {
590
+ if (value === null || value === void 0) {
591
+ this.element.removeAttribute("popover");
592
+ } else {
593
+ this.element.setAttribute("popover", String(value));
594
+ }
595
+ return this;
596
+ }
597
+ setReadonly(value) {
598
+ if (value === true) {
599
+ this.element.setAttribute("readonly", "");
600
+ } else {
601
+ this.element.removeAttribute("readonly");
602
+ }
603
+ return this;
604
+ }
605
+ setRequired(value) {
606
+ if (value === true) {
607
+ this.element.setAttribute("required", "");
608
+ } else {
609
+ this.element.removeAttribute("required");
610
+ }
611
+ return this;
612
+ }
613
+ setRole(value) {
614
+ if (value === null || value === void 0) {
615
+ this.element.removeAttribute("role");
616
+ } else {
617
+ this.element.setAttribute("role", String(value));
618
+ }
619
+ return this;
620
+ }
621
+ setRows(value) {
622
+ if (value === null || value === void 0) {
623
+ this.element.removeAttribute("rows");
624
+ } else {
625
+ this.element.setAttribute("rows", String(value));
626
+ }
627
+ return this;
628
+ }
629
+ setSlot(value) {
630
+ if (value === null || value === void 0) {
631
+ this.element.removeAttribute("slot");
632
+ } else {
633
+ this.element.setAttribute("slot", String(value));
634
+ }
635
+ return this;
636
+ }
637
+ setSpellcheck(value) {
638
+ if (value === null || value === void 0) {
639
+ this.element.removeAttribute("spellcheck");
640
+ } else {
641
+ this.element.setAttribute("spellcheck", String(value));
642
+ }
643
+ return this;
644
+ }
645
+ setStyle(value) {
646
+ if (value === null || value === void 0) {
647
+ this.element.removeAttribute("style");
648
+ } else {
649
+ this.element.setAttribute("style", String(value));
650
+ }
651
+ return this;
652
+ }
653
+ setTabIndex(value) {
654
+ if (value === null || value === void 0) {
655
+ this.element.removeAttribute("tabIndex");
656
+ } else {
657
+ this.element.setAttribute("tabIndex", String(value));
658
+ }
659
+ return this;
660
+ }
661
+ setTabindex(value) {
662
+ if (value === null || value === void 0) {
663
+ this.element.removeAttribute("tabindex");
664
+ } else {
665
+ this.element.setAttribute("tabindex", String(value));
666
+ }
667
+ return this;
668
+ }
669
+ setTitle(value) {
670
+ if (value === null || value === void 0) {
671
+ this.element.removeAttribute("title");
672
+ } else {
673
+ this.element.setAttribute("title", String(value));
674
+ }
675
+ return this;
676
+ }
677
+ setTranslate(value) {
678
+ if (value === null || value === void 0) {
679
+ this.element.removeAttribute("translate");
680
+ } else {
681
+ this.element.setAttribute("translate", String(value));
682
+ }
683
+ return this;
684
+ }
685
+ setWrap(value) {
686
+ if (value === null || value === void 0) {
687
+ this.element.removeAttribute("wrap");
688
+ } else {
689
+ this.element.setAttribute("wrap", String(value));
690
+ }
691
+ return this;
692
+ }
693
+ setChildren(children) {
694
+ while (this.element.firstChild) {
695
+ this.element.removeChild(this.element.firstChild);
696
+ }
697
+ if (typeof children === "string") {
698
+ this.element.textContent = children;
699
+ } else if (Array.isArray(children)) {
700
+ children.forEach((child) => {
701
+ if (typeof child === "string") {
702
+ this.element.appendChild(document.createTextNode(child));
703
+ } else {
704
+ this.element.appendChild(child);
705
+ }
706
+ });
707
+ } else {
708
+ this.element.appendChild(children);
709
+ }
710
+ return this;
711
+ }
712
+ getElement() {
713
+ return this.element;
714
+ }
715
+ };
716
+ export {
717
+ Textarea
718
+ };