@lo-tek/interfaces 0.0.0 → 0.38.0

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 (456) hide show
  1. package/CHANGELOG.md +3389 -0
  2. package/LICENSE +21 -0
  3. package/README.md +129 -1
  4. package/agent/astro.md +400 -0
  5. package/agent/bundles.md +429 -0
  6. package/agent/datastar.md +409 -0
  7. package/agent/html.md +388 -0
  8. package/agent/react.md +440 -0
  9. package/agent/templates.md +472 -0
  10. package/core/lotek-core.wasm +0 -0
  11. package/core/lotek.wasm +0 -0
  12. package/dist/cli.d.ts +12 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +14 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/components/css/accordion/accordion.d.ts +37 -0
  17. package/dist/components/css/accordion/accordion.d.ts.map +1 -0
  18. package/dist/components/css/accordion/accordion.js +31 -0
  19. package/dist/components/css/accordion/accordion.js.map +1 -0
  20. package/dist/components/css/alert/alert.d.ts +35 -0
  21. package/dist/components/css/alert/alert.d.ts.map +1 -0
  22. package/dist/components/css/alert/alert.js +29 -0
  23. package/dist/components/css/alert/alert.js.map +1 -0
  24. package/dist/components/css/avatar/avatar.d.ts +40 -0
  25. package/dist/components/css/avatar/avatar.d.ts.map +1 -0
  26. package/dist/components/css/avatar/avatar.js +30 -0
  27. package/dist/components/css/avatar/avatar.js.map +1 -0
  28. package/dist/components/css/badge/badge.d.ts +24 -0
  29. package/dist/components/css/badge/badge.d.ts.map +1 -0
  30. package/dist/components/css/badge/badge.js +24 -0
  31. package/dist/components/css/badge/badge.js.map +1 -0
  32. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +26 -0
  33. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  34. package/dist/components/css/breadcrumbs/breadcrumbs.js +24 -0
  35. package/dist/components/css/breadcrumbs/breadcrumbs.js.map +1 -0
  36. package/dist/components/css/button/button.d.ts +26 -0
  37. package/dist/components/css/button/button.d.ts.map +1 -0
  38. package/dist/components/css/button/button.js +25 -0
  39. package/dist/components/css/button/button.js.map +1 -0
  40. package/dist/components/css/card/card.d.ts +36 -0
  41. package/dist/components/css/card/card.d.ts.map +1 -0
  42. package/dist/components/css/card/card.js +28 -0
  43. package/dist/components/css/card/card.js.map +1 -0
  44. package/dist/components/css/checkbox/checkbox.d.ts +32 -0
  45. package/dist/components/css/checkbox/checkbox.d.ts.map +1 -0
  46. package/dist/components/css/checkbox/checkbox.js +27 -0
  47. package/dist/components/css/checkbox/checkbox.js.map +1 -0
  48. package/dist/components/css/divider/divider.d.ts +29 -0
  49. package/dist/components/css/divider/divider.d.ts.map +1 -0
  50. package/dist/components/css/divider/divider.js +23 -0
  51. package/dist/components/css/divider/divider.js.map +1 -0
  52. package/dist/components/css/error-text/error-text.d.ts +24 -0
  53. package/dist/components/css/error-text/error-text.d.ts.map +1 -0
  54. package/dist/components/css/error-text/error-text.js +18 -0
  55. package/dist/components/css/error-text/error-text.js.map +1 -0
  56. package/dist/components/css/fieldset/fieldset.d.ts +55 -0
  57. package/dist/components/css/fieldset/fieldset.d.ts.map +1 -0
  58. package/dist/components/css/fieldset/fieldset.js +39 -0
  59. package/dist/components/css/fieldset/fieldset.js.map +1 -0
  60. package/dist/components/css/file-upload/file-upload.d.ts +41 -0
  61. package/dist/components/css/file-upload/file-upload.d.ts.map +1 -0
  62. package/dist/components/css/file-upload/file-upload.js +32 -0
  63. package/dist/components/css/file-upload/file-upload.js.map +1 -0
  64. package/dist/components/css/heading/heading.d.ts +29 -0
  65. package/dist/components/css/heading/heading.d.ts.map +1 -0
  66. package/dist/components/css/heading/heading.js +23 -0
  67. package/dist/components/css/heading/heading.js.map +1 -0
  68. package/dist/components/css/help-text/help-text.d.ts +24 -0
  69. package/dist/components/css/help-text/help-text.d.ts.map +1 -0
  70. package/dist/components/css/help-text/help-text.js +23 -0
  71. package/dist/components/css/help-text/help-text.js.map +1 -0
  72. package/dist/components/css/icon/icon.d.ts +34 -0
  73. package/dist/components/css/icon/icon.d.ts.map +1 -0
  74. package/dist/components/css/icon/icon.js +25 -0
  75. package/dist/components/css/icon/icon.js.map +1 -0
  76. package/dist/components/css/input/input.d.ts +40 -0
  77. package/dist/components/css/input/input.d.ts.map +1 -0
  78. package/dist/components/css/input/input.js +45 -0
  79. package/dist/components/css/input/input.js.map +1 -0
  80. package/dist/components/css/label/label.d.ts +33 -0
  81. package/dist/components/css/label/label.d.ts.map +1 -0
  82. package/dist/components/css/label/label.js +23 -0
  83. package/dist/components/css/label/label.js.map +1 -0
  84. package/dist/components/css/link/link.d.ts +28 -0
  85. package/dist/components/css/link/link.d.ts.map +1 -0
  86. package/dist/components/css/link/link.js +20 -0
  87. package/dist/components/css/link/link.js.map +1 -0
  88. package/dist/components/css/list/list.d.ts +31 -0
  89. package/dist/components/css/list/list.d.ts.map +1 -0
  90. package/dist/components/css/list/list.js +25 -0
  91. package/dist/components/css/list/list.js.map +1 -0
  92. package/dist/components/css/pagination/pagination.d.ts +27 -0
  93. package/dist/components/css/pagination/pagination.d.ts.map +1 -0
  94. package/dist/components/css/pagination/pagination.js +25 -0
  95. package/dist/components/css/pagination/pagination.js.map +1 -0
  96. package/dist/components/css/paragraph/paragraph.d.ts +36 -0
  97. package/dist/components/css/paragraph/paragraph.d.ts.map +1 -0
  98. package/dist/components/css/paragraph/paragraph.js +26 -0
  99. package/dist/components/css/paragraph/paragraph.js.map +1 -0
  100. package/dist/components/css/progress/progress.d.ts +53 -0
  101. package/dist/components/css/progress/progress.d.ts.map +1 -0
  102. package/dist/components/css/progress/progress.js +38 -0
  103. package/dist/components/css/progress/progress.js.map +1 -0
  104. package/dist/components/css/radio/radio.d.ts +32 -0
  105. package/dist/components/css/radio/radio.d.ts.map +1 -0
  106. package/dist/components/css/radio/radio.js +27 -0
  107. package/dist/components/css/radio/radio.js.map +1 -0
  108. package/dist/components/css/search/search.d.ts +34 -0
  109. package/dist/components/css/search/search.d.ts.map +1 -0
  110. package/dist/components/css/search/search.js +32 -0
  111. package/dist/components/css/search/search.js.map +1 -0
  112. package/dist/components/css/select/select.d.ts +40 -0
  113. package/dist/components/css/select/select.d.ts.map +1 -0
  114. package/dist/components/css/select/select.js +31 -0
  115. package/dist/components/css/select/select.js.map +1 -0
  116. package/dist/components/css/shared.d.ts +90 -0
  117. package/dist/components/css/shared.d.ts.map +1 -0
  118. package/dist/components/css/shared.js +167 -0
  119. package/dist/components/css/shared.js.map +1 -0
  120. package/dist/components/css/skeleton/skeleton.d.ts +29 -0
  121. package/dist/components/css/skeleton/skeleton.d.ts.map +1 -0
  122. package/dist/components/css/skeleton/skeleton.js +23 -0
  123. package/dist/components/css/skeleton/skeleton.js.map +1 -0
  124. package/dist/components/css/skip-link/skip-link.d.ts +18 -0
  125. package/dist/components/css/skip-link/skip-link.d.ts.map +1 -0
  126. package/dist/components/css/skip-link/skip-link.js +16 -0
  127. package/dist/components/css/skip-link/skip-link.js.map +1 -0
  128. package/dist/components/css/spinner/spinner.d.ts +33 -0
  129. package/dist/components/css/spinner/spinner.d.ts.map +1 -0
  130. package/dist/components/css/spinner/spinner.js +25 -0
  131. package/dist/components/css/spinner/spinner.js.map +1 -0
  132. package/dist/components/css/sr-only/sr-only.d.ts +17 -0
  133. package/dist/components/css/sr-only/sr-only.d.ts.map +1 -0
  134. package/dist/components/css/sr-only/sr-only.js +15 -0
  135. package/dist/components/css/sr-only/sr-only.js.map +1 -0
  136. package/dist/components/css/switch/switch.d.ts +37 -0
  137. package/dist/components/css/switch/switch.d.ts.map +1 -0
  138. package/dist/components/css/switch/switch.js +29 -0
  139. package/dist/components/css/switch/switch.js.map +1 -0
  140. package/dist/components/css/table/table.d.ts +76 -0
  141. package/dist/components/css/table/table.d.ts.map +1 -0
  142. package/dist/components/css/table/table.js +59 -0
  143. package/dist/components/css/table/table.js.map +1 -0
  144. package/dist/components/css/tag/tag.d.ts +35 -0
  145. package/dist/components/css/tag/tag.d.ts.map +1 -0
  146. package/dist/components/css/tag/tag.js +27 -0
  147. package/dist/components/css/tag/tag.js.map +1 -0
  148. package/dist/components/css/textarea/textarea.d.ts +23 -0
  149. package/dist/components/css/textarea/textarea.d.ts.map +1 -0
  150. package/dist/components/css/textarea/textarea.js +18 -0
  151. package/dist/components/css/textarea/textarea.js.map +1 -0
  152. package/dist/components/css/toggle-group/toggle-group.d.ts +31 -0
  153. package/dist/components/css/toggle-group/toggle-group.d.ts.map +1 -0
  154. package/dist/components/css/toggle-group/toggle-group.js +29 -0
  155. package/dist/components/css/toggle-group/toggle-group.js.map +1 -0
  156. package/dist/components/css/tooltip/tooltip.d.ts +31 -0
  157. package/dist/components/css/tooltip/tooltip.d.ts.map +1 -0
  158. package/dist/components/css/tooltip/tooltip.js +29 -0
  159. package/dist/components/css/tooltip/tooltip.js.map +1 -0
  160. package/dist/components/default-texts.d.ts +41 -0
  161. package/dist/components/default-texts.d.ts.map +1 -0
  162. package/dist/components/default-texts.js +41 -0
  163. package/dist/components/default-texts.js.map +1 -0
  164. package/dist/components/events.d.ts +77 -0
  165. package/dist/components/events.d.ts.map +1 -0
  166. package/dist/components/events.js +3 -0
  167. package/dist/components/events.js.map +1 -0
  168. package/dist/components/frame/dialog/dialog.d.ts +122 -0
  169. package/dist/components/frame/dialog/dialog.d.ts.map +1 -0
  170. package/dist/components/frame/dialog/dialog.js +112 -0
  171. package/dist/components/frame/dialog/dialog.js.map +1 -0
  172. package/dist/components/frame/dialog/lt-dialog.d.ts +104 -0
  173. package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -0
  174. package/dist/components/frame/dialog/lt-dialog.js +434 -0
  175. package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
  176. package/dist/components/frame/error-summary/error-summary.d.ts +53 -0
  177. package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -0
  178. package/dist/components/frame/error-summary/error-summary.js +54 -0
  179. package/dist/components/frame/error-summary/error-summary.js.map +1 -0
  180. package/dist/components/frame/error-summary/lt-error-summary.d.ts +93 -0
  181. package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -0
  182. package/dist/components/frame/error-summary/lt-error-summary.js +408 -0
  183. package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -0
  184. package/dist/components/frame/field/field-core.d.ts +92 -0
  185. package/dist/components/frame/field/field-core.d.ts.map +1 -0
  186. package/dist/components/frame/field/field-core.js +63 -0
  187. package/dist/components/frame/field/field-core.js.map +1 -0
  188. package/dist/components/frame/field/lt-field.d.ts +173 -0
  189. package/dist/components/frame/field/lt-field.d.ts.map +1 -0
  190. package/dist/components/frame/field/lt-field.js +600 -0
  191. package/dist/components/frame/field/lt-field.js.map +1 -0
  192. package/dist/components/frame/popover/lt-popover.d.ts +136 -0
  193. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
  194. package/dist/components/frame/popover/lt-popover.js +520 -0
  195. package/dist/components/frame/popover/lt-popover.js.map +1 -0
  196. package/dist/components/frame/popover/popover.d.ts +49 -0
  197. package/dist/components/frame/popover/popover.d.ts.map +1 -0
  198. package/dist/components/frame/popover/popover.js +64 -0
  199. package/dist/components/frame/popover/popover.js.map +1 -0
  200. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +198 -0
  201. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -0
  202. package/dist/components/frame/session-timeout/lt-session-timeout.js +610 -0
  203. package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -0
  204. package/dist/components/frame/session-timeout/session-timeout.d.ts +113 -0
  205. package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -0
  206. package/dist/components/frame/session-timeout/session-timeout.js +101 -0
  207. package/dist/components/frame/session-timeout/session-timeout.js.map +1 -0
  208. package/dist/components/frame/suggestion/lt-suggestion.d.ts +367 -0
  209. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
  210. package/dist/components/frame/suggestion/lt-suggestion.js +1171 -0
  211. package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -0
  212. package/dist/components/frame/suggestion/suggestion.d.ts +143 -0
  213. package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -0
  214. package/dist/components/frame/suggestion/suggestion.js +127 -0
  215. package/dist/components/frame/suggestion/suggestion.js.map +1 -0
  216. package/dist/components/frame/tabs/lt-tabs.d.ts +426 -0
  217. package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
  218. package/dist/components/frame/tabs/lt-tabs.js +1265 -0
  219. package/dist/components/frame/tabs/lt-tabs.js.map +1 -0
  220. package/dist/components/frame/tabs/tabs.d.ts +112 -0
  221. package/dist/components/frame/tabs/tabs.d.ts.map +1 -0
  222. package/dist/components/frame/tabs/tabs.js +107 -0
  223. package/dist/components/frame/tabs/tabs.js.map +1 -0
  224. package/dist/components/host-element.d.ts +184 -0
  225. package/dist/components/host-element.d.ts.map +1 -0
  226. package/dist/components/host-element.js +440 -0
  227. package/dist/components/host-element.js.map +1 -0
  228. package/dist/components/standalone/connection-status/connection-status.d.ts +32 -0
  229. package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -0
  230. package/dist/components/standalone/connection-status/connection-status.js +26 -0
  231. package/dist/components/standalone/connection-status/connection-status.js.map +1 -0
  232. package/dist/components/standalone/connection-status/lt-connection-status.d.ts +86 -0
  233. package/dist/components/standalone/connection-status/lt-connection-status.d.ts.map +1 -0
  234. package/dist/components/standalone/connection-status/lt-connection-status.js +240 -0
  235. package/dist/components/standalone/connection-status/lt-connection-status.js.map +1 -0
  236. package/dist/components/standalone/toast/lt-toast.d.ts +109 -0
  237. package/dist/components/standalone/toast/lt-toast.d.ts.map +1 -0
  238. package/dist/components/standalone/toast/lt-toast.js +256 -0
  239. package/dist/components/standalone/toast/lt-toast.js.map +1 -0
  240. package/dist/components/standalone/toast/toast.d.ts +52 -0
  241. package/dist/components/standalone/toast/toast.d.ts.map +1 -0
  242. package/dist/components/standalone/toast/toast.js +42 -0
  243. package/dist/components/standalone/toast/toast.js.map +1 -0
  244. package/dist/diagnostics/core.d.ts +171 -0
  245. package/dist/diagnostics/core.d.ts.map +1 -0
  246. package/dist/diagnostics/core.js +84 -0
  247. package/dist/diagnostics/core.js.map +1 -0
  248. package/dist/diagnostics/default-core.d.ts +10 -0
  249. package/dist/diagnostics/default-core.d.ts.map +1 -0
  250. package/dist/diagnostics/default-core.js +72 -0
  251. package/dist/diagnostics/default-core.js.map +1 -0
  252. package/dist/diagnostics/index.d.ts +84 -0
  253. package/dist/diagnostics/index.d.ts.map +1 -0
  254. package/dist/diagnostics/index.js +106 -0
  255. package/dist/diagnostics/index.js.map +1 -0
  256. package/dist/dom.d.ts +55 -0
  257. package/dist/dom.d.ts.map +1 -0
  258. package/dist/dom.js +162 -0
  259. package/dist/dom.js.map +1 -0
  260. package/dist/index.d.ts +97 -0
  261. package/dist/index.d.ts.map +1 -0
  262. package/dist/index.js +58 -0
  263. package/dist/index.js.map +1 -0
  264. package/dist/jsx/react.d.ts +180 -0
  265. package/dist/jsx/react.d.ts.map +1 -0
  266. package/dist/jsx/react.js +2 -0
  267. package/dist/jsx/react.js.map +1 -0
  268. package/dist/lotek.css +3617 -0
  269. package/dist/lt.d.ts +325 -0
  270. package/dist/lt.d.ts.map +1 -0
  271. package/dist/lt.js +183 -0
  272. package/dist/lt.js.map +1 -0
  273. package/dist/react.d.ts +494 -0
  274. package/dist/react.d.ts.map +1 -0
  275. package/dist/react.js +296 -0
  276. package/dist/react.js.map +1 -0
  277. package/dist/register.d.ts +17 -0
  278. package/dist/register.d.ts.map +1 -0
  279. package/dist/register.js +35 -0
  280. package/dist/register.js.map +1 -0
  281. package/dist/tokens/color.d.ts +43 -0
  282. package/dist/tokens/color.d.ts.map +1 -0
  283. package/dist/tokens/color.js +123 -0
  284. package/dist/tokens/color.js.map +1 -0
  285. package/dist/tokens/contract.d.ts +18 -0
  286. package/dist/tokens/contract.d.ts.map +1 -0
  287. package/dist/tokens/contract.js +18 -0
  288. package/dist/tokens/contract.js.map +1 -0
  289. package/dist/tokens/matrix-cells.d.ts +30 -0
  290. package/dist/tokens/matrix-cells.d.ts.map +1 -0
  291. package/dist/tokens/matrix-cells.js +273 -0
  292. package/dist/tokens/matrix-cells.js.map +1 -0
  293. package/dist/tokens/matrix.d.ts +18 -0
  294. package/dist/tokens/matrix.d.ts.map +1 -0
  295. package/dist/tokens/matrix.js +21 -0
  296. package/dist/tokens/matrix.js.map +1 -0
  297. package/dist/tokens/theme-check.d.ts +42 -0
  298. package/dist/tokens/theme-check.d.ts.map +1 -0
  299. package/dist/tokens/theme-check.js +10 -0
  300. package/dist/tokens/theme-check.js.map +1 -0
  301. package/dist/tokens/theme.d.ts +94 -0
  302. package/dist/tokens/theme.d.ts.map +1 -0
  303. package/dist/tokens/theme.js +14 -0
  304. package/dist/tokens/theme.js.map +1 -0
  305. package/dist/tokens/tokens.d.ts +122 -0
  306. package/dist/tokens/tokens.d.ts.map +1 -0
  307. package/dist/tokens/tokens.js +158 -0
  308. package/dist/tokens/tokens.js.map +1 -0
  309. package/dist/vocabulary/classes.d.ts +3 -0
  310. package/dist/vocabulary/classes.d.ts.map +1 -0
  311. package/dist/vocabulary/classes.js +1354 -0
  312. package/dist/vocabulary/classes.js.map +1 -0
  313. package/dist/vocabulary/elements.d.ts +3 -0
  314. package/dist/vocabulary/elements.d.ts.map +1 -0
  315. package/dist/vocabulary/elements.js +490 -0
  316. package/dist/vocabulary/elements.js.map +1 -0
  317. package/dist/vocabulary/types.d.ts +229 -0
  318. package/dist/vocabulary/types.d.ts.map +1 -0
  319. package/dist/vocabulary/types.js +11 -0
  320. package/dist/vocabulary/types.js.map +1 -0
  321. package/dist/wasi-host.d.ts +24 -0
  322. package/dist/wasi-host.d.ts.map +1 -0
  323. package/dist/wasi-host.js +140 -0
  324. package/dist/wasi-host.js.map +1 -0
  325. package/live-templates.xml +63 -0
  326. package/manifest/files.json +373 -0
  327. package/manifest/manifest.json +5090 -0
  328. package/manifest/manifest.schema.json +586 -0
  329. package/package.json +399 -5
  330. package/src/cli.ts +21 -0
  331. package/src/components/css/accordion/accordion.css +102 -0
  332. package/src/components/css/accordion/accordion.ts +50 -0
  333. package/src/components/css/alert/alert.css +53 -0
  334. package/src/components/css/alert/alert.ts +48 -0
  335. package/src/components/css/avatar/avatar.css +96 -0
  336. package/src/components/css/avatar/avatar.ts +57 -0
  337. package/src/components/css/badge/badge.css +42 -0
  338. package/src/components/css/badge/badge.ts +43 -0
  339. package/src/components/css/breadcrumbs/breadcrumbs.css +62 -0
  340. package/src/components/css/breadcrumbs/breadcrumbs.ts +30 -0
  341. package/src/components/css/button/button.css +128 -0
  342. package/src/components/css/button/button.ts +44 -0
  343. package/src/components/css/card/card.css +65 -0
  344. package/src/components/css/card/card.ts +50 -0
  345. package/src/components/css/checkbox/checkbox.css +114 -0
  346. package/src/components/css/checkbox/checkbox.ts +50 -0
  347. package/src/components/css/divider/divider.css +38 -0
  348. package/src/components/css/divider/divider.ts +42 -0
  349. package/src/components/css/error-text/error-text.css +21 -0
  350. package/src/components/css/error-text/error-text.ts +37 -0
  351. package/src/components/css/fieldset/fieldset.css +72 -0
  352. package/src/components/css/fieldset/fieldset.ts +87 -0
  353. package/src/components/css/file-upload/file-upload.css +102 -0
  354. package/src/components/css/file-upload/file-upload.ts +65 -0
  355. package/src/components/css/heading/heading.css +33 -0
  356. package/src/components/css/heading/heading.ts +42 -0
  357. package/src/components/css/help-text/help-text.css +24 -0
  358. package/src/components/css/help-text/help-text.ts +42 -0
  359. package/src/components/css/icon/icon.css +20 -0
  360. package/src/components/css/icon/icon.ts +44 -0
  361. package/src/components/css/input/input.css +145 -0
  362. package/src/components/css/input/input.ts +77 -0
  363. package/src/components/css/label/label.css +42 -0
  364. package/src/components/css/label/label.ts +51 -0
  365. package/src/components/css/link/link.css +38 -0
  366. package/src/components/css/link/link.ts +38 -0
  367. package/src/components/css/list/list.css +53 -0
  368. package/src/components/css/list/list.ts +44 -0
  369. package/src/components/css/pagination/pagination.css +95 -0
  370. package/src/components/css/pagination/pagination.ts +33 -0
  371. package/src/components/css/paragraph/paragraph.css +31 -0
  372. package/src/components/css/paragraph/paragraph.ts +53 -0
  373. package/src/components/css/progress/progress.css +161 -0
  374. package/src/components/css/progress/progress.ts +78 -0
  375. package/src/components/css/radio/radio.css +94 -0
  376. package/src/components/css/radio/radio.ts +50 -0
  377. package/src/components/css/search/search.css +50 -0
  378. package/src/components/css/search/search.ts +56 -0
  379. package/src/components/css/select/select.css +321 -0
  380. package/src/components/css/select/select.ts +63 -0
  381. package/src/components/css/shared.ts +199 -0
  382. package/src/components/css/skeleton/skeleton.css +62 -0
  383. package/src/components/css/skeleton/skeleton.ts +43 -0
  384. package/src/components/css/skip-link/skip-link.css +41 -0
  385. package/src/components/css/skip-link/skip-link.ts +22 -0
  386. package/src/components/css/spinner/spinner.css +48 -0
  387. package/src/components/css/spinner/spinner.ts +48 -0
  388. package/src/components/css/sr-only/sr-only.css +16 -0
  389. package/src/components/css/sr-only/sr-only.ts +21 -0
  390. package/src/components/css/switch/switch.css +105 -0
  391. package/src/components/css/switch/switch.ts +50 -0
  392. package/src/components/css/table/table.css +159 -0
  393. package/src/components/css/table/table.ts +107 -0
  394. package/src/components/css/tag/tag.css +58 -0
  395. package/src/components/css/tag/tag.ts +49 -0
  396. package/src/components/css/textarea/textarea.css +83 -0
  397. package/src/components/css/textarea/textarea.ts +40 -0
  398. package/src/components/css/toggle-group/toggle-group.css +92 -0
  399. package/src/components/css/toggle-group/toggle-group.ts +37 -0
  400. package/src/components/css/tooltip/tooltip.css +89 -0
  401. package/src/components/css/tooltip/tooltip.ts +37 -0
  402. package/src/components/default-texts.ts +41 -0
  403. package/src/components/events.ts +68 -0
  404. package/src/components/frame/dialog/dialog.css +306 -0
  405. package/src/components/frame/dialog/dialog.ts +166 -0
  406. package/src/components/frame/dialog/lt-dialog.ts +513 -0
  407. package/src/components/frame/error-summary/error-summary.css +47 -0
  408. package/src/components/frame/error-summary/error-summary.ts +90 -0
  409. package/src/components/frame/error-summary/lt-error-summary.ts +458 -0
  410. package/src/components/frame/field/field-core.ts +152 -0
  411. package/src/components/frame/field/field.css +17 -0
  412. package/src/components/frame/field/lt-field.ts +790 -0
  413. package/src/components/frame/popover/lt-popover.ts +586 -0
  414. package/src/components/frame/popover/popover.css +50 -0
  415. package/src/components/frame/popover/popover.ts +102 -0
  416. package/src/components/frame/session-timeout/lt-session-timeout.ts +715 -0
  417. package/src/components/frame/session-timeout/session-timeout.css +50 -0
  418. package/src/components/frame/session-timeout/session-timeout.ts +156 -0
  419. package/src/components/frame/suggestion/lt-suggestion.ts +1379 -0
  420. package/src/components/frame/suggestion/suggestion.css +132 -0
  421. package/src/components/frame/suggestion/suggestion.ts +172 -0
  422. package/src/components/frame/tabs/lt-tabs.ts +1395 -0
  423. package/src/components/frame/tabs/tabs.css +128 -0
  424. package/src/components/frame/tabs/tabs.ts +188 -0
  425. package/src/components/host-element.ts +493 -0
  426. package/src/components/standalone/connection-status/connection-status.css +41 -0
  427. package/src/components/standalone/connection-status/connection-status.ts +47 -0
  428. package/src/components/standalone/connection-status/lt-connection-status.ts +268 -0
  429. package/src/components/standalone/toast/lt-toast.ts +300 -0
  430. package/src/components/standalone/toast/toast.css +78 -0
  431. package/src/components/standalone/toast/toast.ts +70 -0
  432. package/src/diagnostics/core.ts +227 -0
  433. package/src/diagnostics/default-core.ts +81 -0
  434. package/src/diagnostics/index.ts +150 -0
  435. package/src/dom.ts +185 -0
  436. package/src/index.ts +218 -0
  437. package/src/jsx/react.ts +212 -0
  438. package/src/lt.ts +192 -0
  439. package/src/react.ts +411 -0
  440. package/src/register.ts +43 -0
  441. package/src/tailwind/tailwind.css +169 -0
  442. package/src/tokens/boundary.css +104 -0
  443. package/src/tokens/color-contract.json +231 -0
  444. package/src/tokens/color.ts +150 -0
  445. package/src/tokens/contract.ts +24 -0
  446. package/src/tokens/matrix-cells.ts +375 -0
  447. package/src/tokens/matrix.ts +32 -0
  448. package/src/tokens/theme-check.ts +51 -0
  449. package/src/tokens/theme.ts +104 -0
  450. package/src/tokens/tokens.css +569 -0
  451. package/src/tokens/tokens.ts +223 -0
  452. package/src/vocabulary/classes.ts +1356 -0
  453. package/src/vocabulary/elements.ts +492 -0
  454. package/src/vocabulary/types.ts +228 -0
  455. package/src/wasi-host.ts +155 -0
  456. package/web-types.json +800 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lt-dialog.js","sourceRoot":"","sources":["../../../../src/components/frame/dialog/lt-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,QAAQ,EACR,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,aAAa,CAAA;AAEpB,MAAM,CAAC,MAAM,aAAa,GAAG,WAAoB,CAAA;AAEjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,iBAAiB;IACzB,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,IAAI,iBAAiB,EAAE;CACrB,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;;;;;;;;;GASG;AACH,MAAM,cAAc,GAAG,IAAI,OAAO,EAAqB,CAAA;AAEvD,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QAgQU,gBAAW,GAAG,GAAS,EAAE;YAC/B,yEAAyE;YACzE,yEAAyE;YACzE,gEAAgE;YAChE,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;gBAAE,OAAM;YAE1C,yEAAyE;YACzE,eAAe;YACf,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAM;YAEtB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;YAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,C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AAA;YAC3B,MAAM,CAAC,KAAK,EAAE,CAAA;YACd,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;;AAlaM,2BAAkB,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAU,AAAvC,CAAuC;AAqalE,MAAM,UAAU,cAAc,CAAC,UAAkB,aAAa;IAC5D,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC"}
@@ -0,0 +1,53 @@
1
+ export declare const ERROR_SUMMARY_CLASS: "lt-error-summary";
2
+ export declare const ERROR_SUMMARY_TITLE_CLASS: "lt-error-summary__title";
3
+ export type ErrorSummaryOptions = {
4
+ /** The number of errors the server found. When it is zero, the box is hidden. */
5
+ count?: number;
6
+ /** The id of the box, so the form can move focus here after submission. */
7
+ id?: string;
8
+ /**
9
+ * The id of the heading. The box takes its name from it with
10
+ * `aria-labelledby`. Default: the box's `id` with `-title`, so the markup
11
+ * carries the wiring whenever the box has an id. An empty one counts as
12
+ * none; one with whitespace throws.
13
+ */
14
+ titleId?: string;
15
+ };
16
+ export type ErrorSummaryAttributes = {
17
+ host: {
18
+ class: typeof ERROR_SUMMARY_CLASS;
19
+ role: "alert";
20
+ tabindex: "-1";
21
+ id?: string;
22
+ hidden?: true;
23
+ "aria-labelledby"?: string;
24
+ };
25
+ title: {
26
+ class: typeof ERROR_SUMMARY_TITLE_CLASS;
27
+ id?: string;
28
+ };
29
+ };
30
+ /**
31
+ * The attributes for an error summary.
32
+ *
33
+ * The server writes the whole box, including the heading and the list.
34
+ * `<lt-error-summary>` only moves focus and handles clicks on the links. The
35
+ * component used to create the heading itself, and then it disappeared on
36
+ * every morph in Datastar.
37
+ *
38
+ * ```ts
39
+ * const summary = lt.errorSummary({
40
+ * count: errors.length,
41
+ * id: "errors",
42
+ * titleId: "errors-title",
43
+ * })
44
+ * ```
45
+ * ```html
46
+ * <lt-error-summary {...summary.host}>
47
+ * <h2 {...summary.title}>You need to fix 2 errors</h2>
48
+ * <ul><li><a href="#email">The email address is missing an @</a></li></ul>
49
+ * </lt-error-summary>
50
+ * ```
51
+ */
52
+ export declare const errorSummary: ({ count, id, titleId: givenTitleId, }?: ErrorSummaryOptions) => ErrorSummaryAttributes;
53
+ //# sourceMappingURL=error-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-summary.d.ts","sourceRoot":"","sources":["../../../../src/components/frame/error-summary/error-summary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,EAAG,kBAA2B,CAAA;AAC9D,eAAO,MAAM,yBAAyB,EAAG,yBAAkC,CAAA;AAE3E,MAAM,MAAM,mBAAmB,GAAG;IAChC,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO,mBAAmB,CAAA;QACjC,IAAI,EAAE,OAAO,CAAA;QACb,QAAQ,EAAE,IAAI,CAAA;QACd,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,MAAM,CAAC,EAAE,IAAI,CAAA;QACb,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAC3B,CAAA;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO,yBAAyB,CAAA;QACvC,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ,CAAA;CACF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GAAI,wCAI1B,mBAAwB,KAAG,sBA6B7B,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { attributes } from "../../css/shared.js";
2
+ export const ERROR_SUMMARY_CLASS = "lt-error-summary";
3
+ export const ERROR_SUMMARY_TITLE_CLASS = "lt-error-summary__title";
4
+ /**
5
+ * The attributes for an error summary.
6
+ *
7
+ * The server writes the whole box, including the heading and the list.
8
+ * `<lt-error-summary>` only moves focus and handles clicks on the links. The
9
+ * component used to create the heading itself, and then it disappeared on
10
+ * every morph in Datastar.
11
+ *
12
+ * ```ts
13
+ * const summary = lt.errorSummary({
14
+ * count: errors.length,
15
+ * id: "errors",
16
+ * titleId: "errors-title",
17
+ * })
18
+ * ```
19
+ * ```html
20
+ * <lt-error-summary {...summary.host}>
21
+ * <h2 {...summary.title}>You need to fix 2 errors</h2>
22
+ * <ul><li><a href="#email">The email address is missing an @</a></li></ul>
23
+ * </lt-error-summary>
24
+ * ```
25
+ */
26
+ export const errorSummary = ({ count = 0, id, titleId: givenTitleId, } = {}) => {
27
+ /*
28
+ * The heading's id is written here, by whoever renders, never by the web
29
+ * component: Datastar and idiomorph replace an element whose id the server
30
+ * did not send, so an id from the component gave the heading a new one on
31
+ * every patch. An empty one names nothing.
32
+ */
33
+ const titleId = givenTitleId?.trim()
34
+ ? givenTitleId
35
+ : id?.trim()
36
+ ? `${id}-title`
37
+ : undefined;
38
+ // `aria-labelledby` splits on whitespace, so the box would point at two
39
+ // ids, neither of them the heading's.
40
+ if (titleId !== undefined && /\s/.test(titleId))
41
+ throw new Error(`lt.errorSummary(): the titleId "${titleId}" contains whitespace. aria-labelledby splits on whitespace, so the box would point at ids that are not the heading's.`);
42
+ return {
43
+ host: attributes({
44
+ class: ERROR_SUMMARY_CLASS,
45
+ role: "alert",
46
+ tabindex: "-1",
47
+ id,
48
+ hidden: count === 0 ? true : undefined,
49
+ "aria-labelledby": titleId,
50
+ }),
51
+ title: attributes({ class: ERROR_SUMMARY_TITLE_CLASS, id: titleId }),
52
+ };
53
+ };
54
+ //# sourceMappingURL=error-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-summary.js","sourceRoot":"","sources":["../../../../src/components/frame/error-summary/error-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAA2B,CAAA;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAkC,CAAA;AA+B3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,GAAG,CAAC,EACT,EAAE,EACF,OAAO,EAAE,YAAY,MACE,EAAE,EAA0B,EAAE;IACrD;;;;;OAKG;IACH,MAAM,OAAO,GAAG,YAAY,EAAE,IAAI,EAAE;QAClC,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE;YACV,CAAC,CAAC,GAAG,EAAE,QAAQ;YACf,CAAC,CAAC,SAAS,CAAA;IACf,wEAAwE;IACxE,sCAAsC;IACtC,IAAI,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,wHAAwH,CACnK,CAAA;IACH,OAAO;QACL,IAAI,EAAE,UAAU,CAAC;YACf,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,OAAgB;YACtB,QAAQ,EAAE,IAAa;YACvB,EAAE;YACF,MAAM,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAE,IAAc,CAAC,CAAC,CAAC,SAAS;YACjD,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QACF,KAAK,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;KACrE,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,93 @@
1
+ import { HostElement } from "../../host-element.js";
2
+ export declare const LT_ERROR_SUMMARY_TAG: "lt-error-summary";
3
+ /**
4
+ * The parts the error summary looks for, as selectors relative to the
5
+ * element. The component finds its parts with these, and the manifest
6
+ * describes them for whoever assembles the markup by hand, so the two cannot
7
+ * say different things.
8
+ */
9
+ export declare const LT_ERROR_SUMMARY_PARTS: {
10
+ readonly title: "h1, h2, h3, h4, h5, h6";
11
+ readonly link: "li a[href^='#']";
12
+ };
13
+ export declare class LtErrorSummary extends HostElement {
14
+ static observedAttributes: readonly ["data-autofocus", "hidden"];
15
+ private hasFocused;
16
+ /**
17
+ * Whether the component has tried to move focus since the box last became
18
+ * visible.
19
+ *
20
+ * The first attempt happens wherever focus is: a new submission has
21
+ * failed, and that is the message. If it did not land, because the box was
22
+ * in a hidden panel, the component tries again on the next change to the
23
+ * list, but only when nobody is in a field. Without that distinction the
24
+ * retry pulled focus out of the field the user was correcting, as soon as
25
+ * live validation patched the list.
26
+ */
27
+ private focusAttempted;
28
+ /** Where focus was when `hidden` last changed, until the deferred round has run. */
29
+ private focusBefore;
30
+ private observer?;
31
+ /**
32
+ * The `aria-labelledby` the component wrote on the box, or null. Another
33
+ * value there is the server's, and stays; the component's own follows the
34
+ * heading, so a patch that replaces the heading does not leave the name
35
+ * pointing at an id that is gone.
36
+ */
37
+ private labelledByWritten;
38
+ connectedCallback(): void;
39
+ attributeChangedCallback(): void;
40
+ /** Takes focus off the box, or off a link in it. */
41
+ private blurInside;
42
+ disconnectedCallback(): void;
43
+ /**
44
+ * Whether the box takes focus when it becomes visible. Default: yes.
45
+ *
46
+ * The attribute is called `data-autofocus` and not `autofocus`, even
47
+ * though the latter reads better. `autofocus` is a boolean property on
48
+ * `HTMLElement`, and React 19 sets properties rather than attributes on web
49
+ * components. `autofocus="false"` then became `el.autofocus = "false"`,
50
+ * which is true, while the attribute never reached the markup, and the
51
+ * opt-out did not work. `data-*` is passed on as an attribute in every
52
+ * React version.
53
+ */
54
+ private get shouldFocus();
55
+ /**
56
+ * Fills in what a template without JavaScript did not write. Only what is
57
+ * missing: a role the server chose stays, and so does a `tabindex`.
58
+ */
59
+ private wire;
60
+ private sync;
61
+ /**
62
+ * Takes focus back once, if it went back to where it was.
63
+ *
64
+ * React gives focus back to the element that had it before a commit, right
65
+ * after the DOM has changed. The box moves focus as `hidden` is removed or
66
+ * as it is connected, that is inside the same commit, so focus ended up on
67
+ * the submit button again in Chromium and Firefox, and on the field in all
68
+ * three engines when the form was submitted with Enter. A microtask runs
69
+ * after the commit. If focus is then on the same element as before, the
70
+ * framework took it, and the box takes it again. If a script has moved
71
+ * focus somewhere else, it stays.
72
+ *
73
+ * Only when the box is directly in the document. React does not enter a
74
+ * shadow root when it restores focus, and there `document.activeElement`
75
+ * is the shadow host both before and after, so the comparison would take
76
+ * focus from a field in the same root. The condition is deliberately
77
+ * coarse: a box portalled into a shadow root from a React app in plain DOM
78
+ * does not take focus back.
79
+ */
80
+ private reclaimFocusFrom;
81
+ /**
82
+ * The element a link points to.
83
+ *
84
+ * The lookup goes to the root the component is in, not to `document`. If
85
+ * the form is in a shadow root, as in a preview or inside another
86
+ * component, `document.getElementById` finds nothing, and the link becomes
87
+ * a plain anchor link without moving focus.
88
+ */
89
+ private resolveTarget;
90
+ private handleLinkClick;
91
+ }
92
+ export declare function defineLtErrorSummary(tagName?: string): void;
93
+ //# sourceMappingURL=lt-error-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lt-error-summary.d.ts","sourceRoot":"","sources":["../../../../src/components/frame/error-summary/lt-error-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAGZ,MAAM,uBAAuB,CAAA;AAK9B,eAAO,MAAM,oBAAoB,EAAG,kBAA2B,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAA;AA4CV,qBAAa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,kBAAkB,wCAAwC;IAEjE,OAAO,CAAC,UAAU,CAAQ;IAC1B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,cAAc,CAAQ;IAC9B,oFAAoF;IACpF,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,QAAQ,CAAC,CAAkB;IACnC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB,CAAsB;IAE/C,iBAAiB,IAAI,IAAI;IAyCzB,wBAAwB,IAAI,IAAI;IAyBhC,oDAAoD;IACpD,OAAO,CAAC,UAAU;IAKlB,oBAAoB,IAAI,IAAI;IAM5B;;;;;;;;;;OAUG;IACH,OAAO,KAAK,WAAW,GAEtB;IAED;;;OAGG;IACH,OAAO,CAAC,IAAI;IAsDZ,OAAO,CAAC,IAAI;IAyGZ;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,eAAe,CAwCtB;CACF;AAYD,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,MAA6B,GACrC,IAAI,CAEN"}
@@ -0,0 +1,408 @@
1
+ import { addClass, defineElement, HostElement, setAttr, warnAboutMarkup, } from "../../host-element.js";
2
+ import { ERROR_SUMMARY_CLASS, ERROR_SUMMARY_TITLE_CLASS, } from "./error-summary.js";
3
+ export const LT_ERROR_SUMMARY_TAG = "lt-error-summary";
4
+ /**
5
+ * The parts the error summary looks for, as selectors relative to the
6
+ * element. The component finds its parts with these, and the manifest
7
+ * describes them for whoever assembles the markup by hand, so the two cannot
8
+ * say different things.
9
+ */
10
+ export const LT_ERROR_SUMMARY_PARTS = {
11
+ title: "h1, h2, h3, h4, h5, h6",
12
+ link: "li a[href^='#']",
13
+ };
14
+ /**
15
+ * Takes the user from an error in the summary to the field that failed.
16
+ *
17
+ * The server writes the content: the heading and the list of links. When the
18
+ * markup is written with JavaScript, `lt.errorSummary()` also writes the
19
+ * class, `role="alert"` and `tabindex="-1"` on the box, and the component
20
+ * leaves them alone. When the markup comes from a template without
21
+ * JavaScript, the component fills in those three and the class on the
22
+ * heading, and sets them back when a patch removes them. Either way, a box
23
+ * without a name gets `aria-labelledby` pointing at its heading. The component
24
+ * creates no nodes: it used to, and then the heading disappeared on the
25
+ * first morph in Datastar and never came back.
26
+ *
27
+ * What is left are two things the browser does not do by itself:
28
+ *
29
+ * 1. Focus moves to the box when it becomes visible, so someone listening to
30
+ * the page learns that the submission stopped.
31
+ * 2. Focus goes to the control itself when a link is followed. A plain anchor
32
+ * link only gives focus to a target that can take it; if it points to a
33
+ * label or a heading, `document.activeElement` becomes `<body>`, and the
34
+ * screen reader is not told where the user is. Tab continues from the
35
+ * target either way.
36
+ *
37
+ * ```html
38
+ * <lt-error-summary>
39
+ * <h2>The form has two errors</h2>
40
+ * <ul class="lt-list">
41
+ * <li><a href="#email">Enter a valid email address</a></li>
42
+ * </ul>
43
+ * </lt-error-summary>
44
+ * ```
45
+ */
46
+ /** Decodes a fragment, and returns it untouched if it is not valid. */
47
+ function decodeFragment(fragment) {
48
+ try {
49
+ return decodeURIComponent(fragment);
50
+ }
51
+ catch {
52
+ return fragment;
53
+ }
54
+ }
55
+ export class LtErrorSummary extends HostElement {
56
+ constructor() {
57
+ super(...arguments);
58
+ this.hasFocused = false;
59
+ /**
60
+ * Whether the component has tried to move focus since the box last became
61
+ * visible.
62
+ *
63
+ * The first attempt happens wherever focus is: a new submission has
64
+ * failed, and that is the message. If it did not land, because the box was
65
+ * in a hidden panel, the component tries again on the next change to the
66
+ * list, but only when nobody is in a field. Without that distinction the
67
+ * retry pulled focus out of the field the user was correcting, as soon as
68
+ * live validation patched the list.
69
+ */
70
+ this.focusAttempted = false;
71
+ /**
72
+ * The `aria-labelledby` the component wrote on the box, or null. Another
73
+ * value there is the server's, and stays; the component's own follows the
74
+ * heading, so a patch that replaces the heading does not leave the name
75
+ * pointing at an id that is gone.
76
+ */
77
+ this.labelledByWritten = null;
78
+ this.handleLinkClick = (event) => {
79
+ const link = event.target?.closest?.(LT_ERROR_SUMMARY_PARTS.link);
80
+ if (!link || !this.contains(link))
81
+ return;
82
+ const id = link.getAttribute("href")?.slice(1);
83
+ if (!id)
84
+ return;
85
+ // The guard stays for the race: the target may have disappeared in a
86
+ // patch between the sync and the click. `sync()` has already reported a
87
+ // link that never had a target.
88
+ const target = this.resolveTarget(id);
89
+ if (!target)
90
+ return;
91
+ event.preventDefault();
92
+ // If the link is to a label, focus goes to what the label belongs to,
93
+ // whether it points with `for` or wraps the control. `control` covers
94
+ // both for real controls; if `for` points to something else, such as a
95
+ // group, the id is followed there.
96
+ const focusable = target instanceof HTMLLabelElement
97
+ ? (target.control ??
98
+ (target.htmlFor ? this.resolveTarget(target.htmlFor) : null) ??
99
+ target)
100
+ : target;
101
+ // A target that cannot take focus, such as a heading, gets a `tabindex`
102
+ // for this one jump. It is a write on markup that comes from the server,
103
+ // and a patch may remove it again; by then the jump has happened.
104
+ if (!focusable.hasAttribute("tabindex") && !isFocusable(focusable)) {
105
+ setAttr(focusable, "tabindex", "-1");
106
+ }
107
+ focusable.focus();
108
+ // Without `behavior`: the page's own `scroll-behavior` decides. The
109
+ // browser does not turn off `smooth` by itself under
110
+ // `prefers-reduced-motion`, so that is up to the page, and "Accessibility"
111
+ // in the documentation says so.
112
+ focusable.scrollIntoView({ block: "center" });
113
+ };
114
+ }
115
+ connectedCallback() {
116
+ // One listener on the host, not one per link. The set of links was only
117
+ // emptied on disconnect, so every link a patch replaced stayed in
118
+ // memory.
119
+ this.addEventListener("click", this.handleLinkClick);
120
+ // The errors come and go while the user corrects them, and `slotchange`
121
+ // does not fire in plain DOM. The attributes are the ones the component
122
+ // fills in itself, so a patch that removes them gets them back. Every
123
+ // write compares first, or the observer would trigger itself.
124
+ // An id only matters on the heading, which the name points at, and a
125
+ // name only on the box. The same attributes on a link or a field inside
126
+ // the box are not ours to follow.
127
+ this.observer = new MutationObserver((records) => {
128
+ const relevant = records.some((r) => {
129
+ if (r.attributeName === "id")
130
+ return r.target.matches(LT_ERROR_SUMMARY_PARTS.title);
131
+ if (r.attributeName === "aria-label" ||
132
+ r.attributeName === "aria-labelledby")
133
+ return r.target === this;
134
+ return true;
135
+ });
136
+ if (relevant)
137
+ this.sync();
138
+ });
139
+ this.observer.observe(this, {
140
+ childList: true,
141
+ subtree: true,
142
+ attributes: true,
143
+ attributeFilter: [
144
+ "class",
145
+ "role",
146
+ "tabindex",
147
+ "aria-labelledby",
148
+ "aria-label",
149
+ "id",
150
+ ],
151
+ });
152
+ this.sync();
153
+ }
154
+ attributeChangedCallback() {
155
+ /*
156
+ * The server can send the box hidden and later only remove `hidden` on
157
+ * the same node. Without this, a summary that just became visible never
158
+ * gets focus, and that is the whole reason the component exists.
159
+ *
160
+ * A microtask later, not now. A morph sets `hidden` in its attribute
161
+ * pass, before it updates the children; focus moved then made the box
162
+ * the focused element, and idiomorph with `ignoreActiveValue` leaves the
163
+ * children of the focused element as they were, so the new errors never
164
+ * arrived. Found by the code review of PR 240.
165
+ */
166
+ // Where focus was when the box was shown. React gives it back there
167
+ // after the commit, and the box takes it anyway; a script that moves it
168
+ // somewhere else in the same turn has decided, and the box leaves it.
169
+ this.focusBefore ??= document.activeElement;
170
+ // Hidden: let go of focus now, in the morph's attribute pass, so the
171
+ // morph still updates the content (see `sync()`).
172
+ if (this.hidden)
173
+ this.blurInside();
174
+ queueMicrotask(() => {
175
+ if (this.isConnected)
176
+ this.sync();
177
+ this.focusBefore = undefined;
178
+ });
179
+ }
180
+ /** Takes focus off the box, or off a link in it. */
181
+ blurInside() {
182
+ const focused = this.getRootNode().activeElement;
183
+ if (focused instanceof HTMLElement && this.contains(focused))
184
+ focused.blur();
185
+ }
186
+ disconnectedCallback() {
187
+ this.observer?.disconnect();
188
+ this.observer = undefined;
189
+ this.removeEventListener("click", this.handleLinkClick);
190
+ }
191
+ /**
192
+ * Whether the box takes focus when it becomes visible. Default: yes.
193
+ *
194
+ * The attribute is called `data-autofocus` and not `autofocus`, even
195
+ * though the latter reads better. `autofocus` is a boolean property on
196
+ * `HTMLElement`, and React 19 sets properties rather than attributes on web
197
+ * components. `autofocus="false"` then became `el.autofocus = "false"`,
198
+ * which is true, while the attribute never reached the markup, and the
199
+ * opt-out did not work. `data-*` is passed on as an attribute in every
200
+ * React version.
201
+ */
202
+ get shouldFocus() {
203
+ return this.dataset.autofocus !== "false";
204
+ }
205
+ /**
206
+ * Fills in what a template without JavaScript did not write. Only what is
207
+ * missing: a role the server chose stays, and so does a `tabindex`.
208
+ */
209
+ wire() {
210
+ addClass(this, ERROR_SUMMARY_CLASS);
211
+ if (!this.hasAttribute("role"))
212
+ setAttr(this, "role", "alert");
213
+ // Without `tabindex`, `focus()` does nothing, and the whole reason for
214
+ // the component silently disappears.
215
+ if (!this.hasAttribute("tabindex"))
216
+ setAttr(this, "tabindex", "-1");
217
+ const title = this.querySelector(LT_ERROR_SUMMARY_PARTS.title);
218
+ if (title)
219
+ addClass(title, ERROR_SUMMARY_TITLE_CLASS);
220
+ /*
221
+ * The box takes focus, so it needs a name: without one a screen reader
222
+ * says only "alert" when the focus lands, and the heading is what says
223
+ * how many errors there are. The template writes the heading's id and
224
+ * the box's `aria-labelledby`, as it writes `for` and `id` on a field;
225
+ * `lt.errorSummary({ id })` writes both. The component never writes an
226
+ * id: Datastar and idiomorph replace an element whose id the server did
227
+ * not send, so an id from the component gave the heading a new one on
228
+ * every patch. When the heading has an id and the box no name, the
229
+ * component points `aria-labelledby` at it, and follows a heading a
230
+ * patch has replaced. A blank `aria-label` or `aria-labelledby` names
231
+ * nothing, so it counts as missing.
232
+ * `check-accessibility-tree.ts` checks the name a screen reader gets.
233
+ */
234
+ const labelledBy = this.getAttribute("aria-labelledby")?.trim() || null;
235
+ const label = this.getAttribute("aria-label")?.trim() || null;
236
+ const ours = labelledBy !== null && labelledBy === this.labelledByWritten;
237
+ if (labelledBy !== null && !ours)
238
+ this.labelledByWritten = null;
239
+ if (title?.id && label === null && (labelledBy === null || ours)) {
240
+ setAttr(this, "aria-labelledby", title.id);
241
+ this.labelledByWritten = title.id;
242
+ }
243
+ else if (ours) {
244
+ // The heading is gone or lost its id, or the server named the box
245
+ // with `aria-label`, which `aria-labelledby` would otherwise win over.
246
+ this.removeAttribute("aria-labelledby");
247
+ this.labelledByWritten = null;
248
+ }
249
+ if (title && !title.id && label === null && labelledBy === null)
250
+ warnAboutMarkup(this, "has a heading without an id and no name, so it takes focus as an alert a screen reader cannot name. Give the heading an id and the box aria-labelledby pointing at it, as lt.errorSummary({ id }) does.", () => {
251
+ const now = this.querySelector(LT_ERROR_SUMMARY_PARTS.title);
252
+ return (this.isConnected &&
253
+ now !== null &&
254
+ !now.id &&
255
+ !this.getAttribute("aria-label")?.trim() &&
256
+ !this.getAttribute("aria-labelledby")?.trim());
257
+ });
258
+ }
259
+ sync() {
260
+ this.wire();
261
+ const links = [
262
+ ...this.querySelectorAll(LT_ERROR_SUMMARY_PARTS.link),
263
+ ];
264
+ // If the server hides the box again, that submission is over. Without
265
+ // this reset the box only took focus the first time: the pattern in a
266
+ // Datastar app is that the list keeps the same links throughout and only
267
+ // `hidden` is toggled, so "have I moved focus here before" does not
268
+ // answer whether this is a new submission. It comes before the return
269
+ // for an empty list: React removes the items before it sets `hidden` on
270
+ // the host, so the list is already empty in the round where the box is
271
+ // hidden.
272
+ if (this.hidden) {
273
+ this.hasFocused = false;
274
+ this.focusAttempted = false;
275
+ /*
276
+ * A hidden box gives up focus. HTML's focus fixup rule moves focus
277
+ * off an element that is no longer rendered; Chromium does it at
278
+ * once, Firefox and WebKit left it on the hidden box. idiomorph leaves
279
+ * the content of the focused element as it was, so the next errors
280
+ * the server sent never reached the box, which then showed an empty
281
+ * heading and list. Found by the model test.
282
+ */
283
+ this.blurInside();
284
+ }
285
+ if (links.length === 0) {
286
+ // The flags are not reset by an empty list, only by `hidden` above. A
287
+ // visible list that is emptied and filled while the user corrects
288
+ // would otherwise pull focus out of the field they were in.
289
+ warnAboutMarkup(this, "found no links to the fields. Each item needs an <a " +
290
+ 'href="#id"> pointing to the control or its label, or the user ' +
291
+ "cannot get from the error to the field.",
292
+ // An empty box is not an error: the pattern is that the server leaves
293
+ // it with `hidden` and fills it when the submission fails. A box with
294
+ // items but no links to the fields is something else.
295
+ () => this.querySelector("li") !== null &&
296
+ this.querySelector(LT_ERROR_SUMMARY_PARTS.link) === null);
297
+ return;
298
+ }
299
+ for (const link of links) {
300
+ /*
301
+ * A link that leads nowhere, reported here and not only on a click.
302
+ *
303
+ * The check used to be only in the click handler, and then a box with a
304
+ * link to a field that does not exist was completely silent until
305
+ * someone actually followed it. An error summary is read by someone who
306
+ * just failed with a form, and a link that does not work is exactly
307
+ * what makes the box worthless. The id is in the message, and each link
308
+ * has its own, so a box with two broken links reports both.
309
+ */
310
+ const id = link.getAttribute("href")?.slice(1);
311
+ if (id) {
312
+ warnAboutMarkup(this, `the link points to #${id}, but no element has that id. The link scrolls nowhere, and focus stays where it is.`, () => this.resolveTarget(id) === null);
313
+ }
314
+ }
315
+ if (this.hidden)
316
+ return;
317
+ // If the box is visible now and we have not moved focus here yet, it is
318
+ // this submission that failed. The flag is only set when focus actually
319
+ // landed: if the box is in a hidden panel or a closed dialog, `focus()`
320
+ // does nothing, and the next attempt is then allowed, as long as nobody
321
+ // is in a field.
322
+ if (this.shouldFocus && !this.hasFocused) {
323
+ // `document.activeElement` and not the root's: if the box is in a
324
+ // shadow root and the field in plain DOM, the root's `activeElement` is
325
+ // null, and the user would have counted as "nobody". The document's
326
+ // points to the shadow host when focus is in a shadow tree, and is
327
+ // never null for a field on the page.
328
+ const active = document.activeElement;
329
+ const nobodyTyping = !active || active === document.body;
330
+ if (this.focusAttempted && !nobodyTyping)
331
+ return;
332
+ const movedByScript = this.focusBefore !== undefined &&
333
+ active !== this.focusBefore &&
334
+ !nobodyTyping;
335
+ if (movedByScript)
336
+ return;
337
+ const root = this.getRootNode();
338
+ this.focusAttempted = true;
339
+ this.focus();
340
+ this.hasFocused = root.activeElement === this;
341
+ if (this.hasFocused &&
342
+ root === document &&
343
+ active &&
344
+ active !== document.body)
345
+ this.reclaimFocusFrom(active);
346
+ }
347
+ }
348
+ /**
349
+ * Takes focus back once, if it went back to where it was.
350
+ *
351
+ * React gives focus back to the element that had it before a commit, right
352
+ * after the DOM has changed. The box moves focus as `hidden` is removed or
353
+ * as it is connected, that is inside the same commit, so focus ended up on
354
+ * the submit button again in Chromium and Firefox, and on the field in all
355
+ * three engines when the form was submitted with Enter. A microtask runs
356
+ * after the commit. If focus is then on the same element as before, the
357
+ * framework took it, and the box takes it again. If a script has moved
358
+ * focus somewhere else, it stays.
359
+ *
360
+ * Only when the box is directly in the document. React does not enter a
361
+ * shadow root when it restores focus, and there `document.activeElement`
362
+ * is the shadow host both before and after, so the comparison would take
363
+ * focus from a field in the same root. The condition is deliberately
364
+ * coarse: a box portalled into a shadow root from a React app in plain DOM
365
+ * does not take focus back.
366
+ */
367
+ reclaimFocusFrom(previous) {
368
+ queueMicrotask(() => {
369
+ if (this.isConnected &&
370
+ !this.hidden &&
371
+ document.activeElement === previous)
372
+ this.focus();
373
+ });
374
+ }
375
+ /**
376
+ * The element a link points to.
377
+ *
378
+ * The lookup goes to the root the component is in, not to `document`. If
379
+ * the form is in a shadow root, as in a preview or inside another
380
+ * component, `document.getElementById` finds nothing, and the link becomes
381
+ * a plain anchor link without moving focus.
382
+ */
383
+ resolveTarget(raw) {
384
+ const root = this.getRootNode();
385
+ // A link to a field with non-ASCII characters in its id is often
386
+ // percent-encoded, `#f%C3%B8dselsdato`. The browser decodes it when the
387
+ // link is followed, so the lookup must do the same, or a working link is
388
+ // reported.
389
+ for (const id of new Set([raw, decodeFragment(raw)])) {
390
+ const target = root.getElementById?.(id) ?? document.getElementById(id);
391
+ if (target)
392
+ return target;
393
+ }
394
+ return null;
395
+ }
396
+ }
397
+ LtErrorSummary.observedAttributes = ["data-autofocus", "hidden"];
398
+ function isFocusable(element) {
399
+ return (element instanceof HTMLInputElement ||
400
+ element instanceof HTMLSelectElement ||
401
+ element instanceof HTMLTextAreaElement ||
402
+ element instanceof HTMLButtonElement ||
403
+ element instanceof HTMLAnchorElement);
404
+ }
405
+ export function defineLtErrorSummary(tagName = LT_ERROR_SUMMARY_TAG) {
406
+ defineElement(tagName, LtErrorSummary);
407
+ }
408
+ //# sourceMappingURL=lt-error-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lt-error-summary.js","sourceRoot":"","sources":["../../../../src/components/frame/error-summary/lt-error-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,OAAO,EACP,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAA;AAC3B,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAA2B,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,iBAAiB;CACf,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,uEAAuE;AACvE,SAAS,cAAc,CAAC,QAAgB;IACtC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAA;IACjB,CAAC;AACH,CAAC;AAED,MAAM,OAAO,cAAe,SAAQ,WAAW;IAA/C;;QAGU,eAAU,GAAG,KAAK,CAAA;QAC1B;;;;;;;;;;WAUG;QACK,mBAAc,GAAG,KAAK,CAAA;QAI9B;;;;;WAKG;QACK,sBAAiB,GAAkB,IAAI,CAAA;QAqTvC,oBAAe,GAAG,CAAC,KAAY,EAAQ,EAAE;YAC/C,MAAM,IAAI,GAAI,KAAK,CAAC,MAAyB,EAAE,OAAO,EAAE,CACtD,sBAAsB,CAAC,IAAI,CAC5B,CAAA;YACD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,OAAM;YACzC,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;YAC9C,IAAI,CAAC,EAAE;gBAAE,OAAM;YAEf,qEAAqE;YACrE,wEA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