@lo-tek/interfaces 0.0.0 → 0.37.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 +3254 -0
  2. package/LICENSE +21 -0
  3. package/README.md +128 -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 +35 -0
  161. package/dist/components/default-texts.d.ts.map +1 -0
  162. package/dist/components/default-texts.js +35 -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 +431 -0
  175. package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
  176. package/dist/components/frame/error-summary/error-summary.d.ts +40 -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 +32 -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 +82 -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 +302 -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 +580 -0
  191. package/dist/components/frame/field/lt-field.js.map +1 -0
  192. package/dist/components/frame/popover/lt-popover.d.ts +132 -0
  193. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
  194. package/dist/components/frame/popover/lt-popover.js +490 -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 +573 -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 +361 -0
  209. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
  210. package/dist/components/frame/suggestion/lt-suggestion.js +1152 -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 +404 -0
  217. package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
  218. package/dist/components/frame/tabs/lt-tabs.js +1201 -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 +135 -0
  225. package/dist/components/host-element.d.ts.map +1 -0
  226. package/dist/components/host-element.js +366 -0
  227. package/dist/components/host-element.js.map +1 -0
  228. package/dist/components/standalone/connection-status/connection-status.d.ts +28 -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 +22 -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 +81 -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 +216 -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 +137 -0
  245. package/dist/diagnostics/core.d.ts.map +1 -0
  246. package/dist/diagnostics/core.js +72 -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 +492 -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 +1320 -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 +410 -0
  316. package/dist/vocabulary/elements.js.map +1 -0
  317. package/dist/vocabulary/types.d.ts +175 -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 +62 -0
  326. package/manifest/files.json +373 -0
  327. package/manifest/manifest.json +4965 -0
  328. package/manifest/manifest.schema.json +513 -0
  329. package/package.json +398 -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 +34 -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 +510 -0
  407. package/src/components/frame/error-summary/error-summary.css +47 -0
  408. package/src/components/frame/error-summary/error-summary.ts +56 -0
  409. package/src/components/frame/error-summary/lt-error-summary.ts +344 -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 +753 -0
  413. package/src/components/frame/popover/lt-popover.ts +555 -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 +681 -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 +1358 -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 +1319 -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 +400 -0
  426. package/src/components/standalone/connection-status/connection-status.css +41 -0
  427. package/src/components/standalone/connection-status/connection-status.ts +41 -0
  428. package/src/components/standalone/connection-status/lt-connection-status.ts +242 -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 +210 -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 +1322 -0
  453. package/src/vocabulary/elements.ts +412 -0
  454. package/src/vocabulary/types.ts +178 -0
  455. package/src/wasi-host.ts +155 -0
  456. package/web-types.json +800 -0
@@ -0,0 +1,58 @@
1
+ @layer lotek {
2
+ .lt-tag {
3
+ box-sizing: border-box;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: var(--lt-spacing-1);
7
+ padding: var(--lt-tag-padding, var(--lt-spacing-0-5) var(--lt-spacing-2));
8
+ font-family: inherit;
9
+ font-size: var(--lt-font-size-s);
10
+ line-height: var(--lt-line-height-compact);
11
+ color: var(--lt-color-neutral-text-strong);
12
+ background: transparent;
13
+ border: 1px solid var(--lt-color-neutral-border-subtle);
14
+ border-radius: var(--lt-tag-radius, var(--lt-spacing-1));
15
+ }
16
+
17
+ .lt-tag[data-variant="filled"] {
18
+ background: var(--lt-color-neutral-surface);
19
+ border-color: transparent;
20
+ }
21
+
22
+ /* The tag can be toggled on and off, and is then a real button. */
23
+ .lt-tag[data-selectable] {
24
+ cursor: pointer;
25
+ }
26
+
27
+ .lt-tag[data-selectable]:hover {
28
+ border-color: var(--lt-color-accent-border);
29
+ }
30
+
31
+ .lt-tag[data-selectable]:focus-visible {
32
+ outline: var(--lt-focus-ring);
33
+ outline-offset: 2px;
34
+ }
35
+
36
+ .lt-tag[aria-pressed="true"] {
37
+ background: var(--lt-color-accent-fill);
38
+ border-color: var(--lt-color-accent-fill);
39
+ color: var(--lt-color-accent-content);
40
+ }
41
+
42
+ .lt-tag:disabled,
43
+ .lt-tag[aria-disabled="true"] {
44
+ background: var(--lt-color-disabled-surface);
45
+ border-color: var(--lt-color-disabled-surface);
46
+ color: var(--lt-color-disabled-text);
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ /* High contrast: the selected tag differs only by colour. System colours
51
+ get through where ours do not. */
52
+ @media (forced-colors: active) {
53
+ .lt-tag[aria-pressed="true"] {
54
+ background-color: Highlight;
55
+ color: HighlightText;
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,49 @@
1
+ import { attributes, createGuard } from "../shared.js"
2
+
3
+ export const TAG_CLASS = "lt-tag" as const
4
+
5
+ export const tagVariants = ["outline", "filled"] as const
6
+
7
+ export type TagVariant = (typeof tagVariants)[number]
8
+ export type NonDefaultTagVariant = Exclude<TagVariant, "outline">
9
+
10
+ export type TagOptions = {
11
+ /** Outline or muted surface. Default: `outline`. */
12
+ variant?: TagVariant
13
+ /** The tag can be toggled on and off. Use only on a `<button>`. */
14
+ selectable?: boolean
15
+ }
16
+
17
+ export type TagAttributes = {
18
+ class: typeof TAG_CLASS
19
+ "data-variant"?: NonDefaultTagVariant
20
+ "data-selectable"?: ""
21
+ }
22
+
23
+ /**
24
+ * The attributes for a tag.
25
+ *
26
+ * A tag labels content: keywords on an article, selected filters above a
27
+ * list. If it says what state something is in, [Badge](../badge/badge.js)
28
+ * is right instead.
29
+ *
30
+ * `selectable` gives hover and a focus ring, but makes nothing pressable.
31
+ * The element must be a `<button>`, and you set `aria-pressed` yourself,
32
+ * since only you know whether the tag is selected.
33
+ *
34
+ * ```ts
35
+ * <button {...tag({ selectable: true })} aria-pressed="true">Housing benefit</button>
36
+ * ```
37
+ */
38
+ export const tag = Object.assign(
39
+ ({ variant = "outline", selectable }: TagOptions = {}): TagAttributes =>
40
+ attributes({
41
+ class: TAG_CLASS,
42
+ "data-variant": variant === "outline" ? undefined : variant,
43
+ "data-selectable": selectable ? ("" as const) : undefined,
44
+ }),
45
+ {
46
+ variants: tagVariants,
47
+ isVariant: createGuard(tagVariants),
48
+ },
49
+ )
@@ -0,0 +1,83 @@
1
+ @layer lotek {
2
+ .lt-textarea {
3
+ /* The design system cannot assume the consumer has a CSS reset. Without
4
+ border-box, padding and border are added outside the width, and the
5
+ field becomes wider than the box it sits in. */
6
+ box-sizing: border-box;
7
+
8
+ display: block;
9
+ width: 100%;
10
+ min-height: var(--lt-textarea-min-height, calc(var(--lt-spacing-4) * 5));
11
+ padding: var(
12
+ --lt-textarea-padding,
13
+ var(--lt-spacing-2) var(--lt-spacing-3)
14
+ );
15
+ font-family: inherit;
16
+ font-size: var(--lt-font-size-m);
17
+ line-height: var(--lt-line-height-default);
18
+ color: var(--lt-color-neutral-text-strong);
19
+ background: var(--lt-color-neutral-canvas);
20
+ border: 1px solid var(--lt-color-neutral-border);
21
+ border-radius: var(--lt-textarea-radius, var(--lt-spacing-1));
22
+ resize: vertical;
23
+ }
24
+
25
+ .lt-textarea::placeholder {
26
+ color: var(--lt-color-neutral-text-subtle);
27
+ }
28
+
29
+ .lt-textarea:hover {
30
+ border-color: var(--lt-color-neutral-border-strong);
31
+ }
32
+
33
+ .lt-textarea:focus-visible {
34
+ outline: var(--lt-focus-ring);
35
+ outline-offset: 2px;
36
+ border-color: var(--lt-color-accent-border);
37
+ }
38
+
39
+ .lt-textarea:disabled,
40
+ .lt-textarea[aria-disabled="true"] {
41
+ background: var(--lt-color-disabled-surface);
42
+ color: var(--lt-color-disabled-text);
43
+ border-color: var(--lt-color-disabled-surface);
44
+ /* No pointer-events: none here. The browser already blocks a disabled
45
+ field, and pointer-events would only stop the cursor from showing. The
46
+ element is then not hit by the mouse at all. */
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ /* aria-disabled is only information for screen readers; the element still
51
+ works. Here pointer-events stops the mouse, at the cost of the cursor.
52
+ If the field should really be off, use `disabled` or `readonly`. */
53
+ .lt-textarea[aria-disabled="true"] {
54
+ pointer-events: none;
55
+ }
56
+
57
+ .lt-textarea[data-state="invalid"] {
58
+ border-color: var(--lt-color-danger-text);
59
+ background: var(--lt-color-danger-surface);
60
+ }
61
+
62
+ .lt-textarea[data-state="invalid"]:focus-visible {
63
+ outline-color: var(--lt-color-danger-text);
64
+ }
65
+
66
+ .lt-textarea[data-state="success"] {
67
+ border-color: var(--lt-color-success-text);
68
+ background: var(--lt-color-success-surface);
69
+ }
70
+
71
+ .lt-textarea[data-state="success"]:focus-visible {
72
+ outline-color: var(--lt-color-success-text);
73
+ }
74
+
75
+ /* Disabled wins over a state. `[data-state]` used to come after
76
+ `:disabled` with the same specificity, and an invalid field in a form
77
+ that was disabled during submission looked red, not disabled. */
78
+ .lt-textarea:is(:disabled, [aria-disabled="true"])[data-state] {
79
+ background: var(--lt-color-disabled-surface);
80
+ color: var(--lt-color-disabled-text);
81
+ border-color: var(--lt-color-disabled-surface);
82
+ }
83
+ }
@@ -0,0 +1,40 @@
1
+ import {
2
+ attributes,
3
+ type FieldState,
4
+ fieldStates,
5
+ isFieldState,
6
+ type NonDefaultFieldState,
7
+ } from "../shared.js"
8
+
9
+ export const TEXTAREA_CLASS = "lt-textarea" as const
10
+
11
+ export type TextareaOptions = {
12
+ /** Validation state. Default: `default`. */
13
+ state?: FieldState
14
+ }
15
+
16
+ export type TextareaAttributes = {
17
+ class: typeof TEXTAREA_CLASS
18
+ "data-state"?: NonDefaultFieldState
19
+ "aria-invalid"?: "true"
20
+ }
21
+
22
+ /**
23
+ * The attributes for a multi-line text field.
24
+ *
25
+ * ```ts
26
+ * <textarea {...textarea({ state: "invalid" })} />
27
+ * ```
28
+ */
29
+ export const textarea = Object.assign(
30
+ ({ state = "default" }: TextareaOptions = {}): TextareaAttributes =>
31
+ attributes({
32
+ class: TEXTAREA_CLASS,
33
+ "data-state": state === "default" ? undefined : state,
34
+ "aria-invalid": state === "invalid" ? ("true" as const) : undefined,
35
+ }),
36
+ {
37
+ states: fieldStates,
38
+ isState: isFieldState,
39
+ },
40
+ )
@@ -0,0 +1,92 @@
1
+ @layer lotek {
2
+ .lt-toggle-group {
3
+ box-sizing: border-box;
4
+ display: inline-flex;
5
+ flex-wrap: wrap;
6
+ gap: 0;
7
+ margin: 0;
8
+ padding: 0;
9
+ border: 1px solid var(--lt-color-neutral-border);
10
+ border-radius: var(--lt-toggle-group-radius, var(--lt-spacing-1));
11
+ overflow: hidden;
12
+ min-inline-size: 0;
13
+ }
14
+
15
+ .lt-toggle-group__option {
16
+ display: inline-flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ /* 40 pixels high, like the buttons, so a row of them lines up. */
20
+ min-block-size: var(--lt-toggle-group-height, var(--lt-spacing-10));
21
+ padding: var(--lt-toggle-group-padding, 0 var(--lt-spacing-4));
22
+ font-family: inherit;
23
+ font-size: var(--lt-font-size-m);
24
+ line-height: var(--lt-line-height-default);
25
+ color: var(--lt-color-accent-text);
26
+ background: var(--lt-color-neutral-canvas);
27
+ cursor: pointer;
28
+ }
29
+
30
+ .lt-toggle-group__option + .lt-toggle-group__option {
31
+ border-inline-start: 1px solid var(--lt-color-neutral-border);
32
+ }
33
+
34
+ /* The radio button sits inside the label and is shrunk away visually. It
35
+ stays in the keyboard order, so the arrow keys and the screen reader
36
+ work as in a plain radio group. */
37
+ .lt-toggle-group__option input {
38
+ position: absolute;
39
+ inline-size: 1px;
40
+ block-size: 1px;
41
+ margin: -1px;
42
+ padding: 0;
43
+ overflow: hidden;
44
+ clip-path: inset(50%);
45
+ white-space: nowrap;
46
+ border-width: 0;
47
+ }
48
+
49
+ .lt-toggle-group__option:hover {
50
+ background: var(--lt-color-accent-surface);
51
+ }
52
+
53
+ .lt-toggle-group__option:has(input:focus-visible) {
54
+ outline: var(--lt-focus-ring);
55
+ outline-offset: -2px;
56
+ }
57
+
58
+ .lt-toggle-group__option:has(input:checked) {
59
+ color: var(--lt-color-accent-content);
60
+ background: var(--lt-color-accent-fill);
61
+ font-weight: var(--lt-font-weight-semibold);
62
+ }
63
+
64
+ /* The ring is inside, on top of the selected surface, and
65
+ `accent-border-strong` against `accent-fill` was 1.23:1. The selected
66
+ option is always the one that gets focus in a radio group, so nobody
67
+ could see where focus was. `content` against `fill` is a promise in the
68
+ colour contract. The ring cannot be moved outside: the group has
69
+ `overflow: hidden`, and it was clipped away. */
70
+ .lt-toggle-group__option:has(input:checked:focus-visible) {
71
+ outline-color: var(--lt-color-accent-content);
72
+ }
73
+
74
+ .lt-toggle-group__option:has(input:disabled) {
75
+ color: var(--lt-color-disabled-text);
76
+ background: var(--lt-color-disabled-surface);
77
+ cursor: not-allowed;
78
+ }
79
+
80
+ /*
81
+ * High contrast: the selected option differs only by background colour,
82
+ * and custom colours are overridden in the mode. System colours get
83
+ * through, and `Highlight` with `HighlightText` is exactly the pair the
84
+ * operating system uses to show that something is selected.
85
+ */
86
+ @media (forced-colors: active) {
87
+ .lt-toggle-group__option:has(input:checked) {
88
+ background-color: Highlight;
89
+ color: HighlightText;
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,37 @@
1
+ import { attributes } from "../shared.js"
2
+
3
+ export const TOGGLE_GROUP_CLASS = "lt-toggle-group" as const
4
+ /** The label around each option. */
5
+ export const TOGGLE_GROUP_OPTION_CLASS = "lt-toggle-group__option" as const
6
+
7
+ export type ToggleGroupAttributes = {
8
+ class: typeof TOGGLE_GROUP_CLASS
9
+ }
10
+
11
+ /**
12
+ * The attributes for a group where one option is selected at a time.
13
+ *
14
+ * The group is radio buttons in disguise. Each option is a `<label>` with an
15
+ * `<input type="radio">` inside, visually shrunk away. You then keep the
16
+ * arrow keys, `FormData` and the screen reader saying "2 of 3" without
17
+ * writing any of it again.
18
+ *
19
+ * If the choices are actions rather than a setting, such as "bold, italic,
20
+ * underline", buttons with `aria-pressed` belong there instead.
21
+ *
22
+ * ```ts
23
+ * <fieldset {...toggleGroup()}>
24
+ * <legend class="lt-sr-only">View</legend>
25
+ * <label class={toggleGroup.option}>
26
+ * <input type="radio" name="view" value="list" checked /> List
27
+ * </label>
28
+ * </fieldset>
29
+ * ```
30
+ */
31
+ export const toggleGroup = Object.assign(
32
+ (): ToggleGroupAttributes => attributes({ class: TOGGLE_GROUP_CLASS }),
33
+ {
34
+ /** The class on the label around each option. */
35
+ option: TOGGLE_GROUP_OPTION_CLASS,
36
+ },
37
+ )
@@ -0,0 +1,89 @@
1
+ @layer lotek {
2
+ .lt-tooltip {
3
+ position: relative;
4
+ display: inline-flex;
5
+ }
6
+
7
+ .lt-tooltip__bubble {
8
+ /* The width in `--lt-tooltip-width` is the whole bubble, also on a page
9
+ without a CSS reset that sets border-box. */
10
+ box-sizing: border-box;
11
+ position: absolute;
12
+ inset-block-end: calc(100% + var(--lt-spacing-2));
13
+ inset-inline-start: 50%;
14
+ transform: translateX(-50%);
15
+ z-index: 40;
16
+ inline-size: max-content;
17
+ max-inline-size: var(--lt-tooltip-width, 16rem);
18
+ padding: var(--lt-tooltip-padding, var(--lt-spacing-1) var(--lt-spacing-2));
19
+ font-size: var(--lt-font-size-s);
20
+ line-height: var(--lt-line-height-compact);
21
+ color: var(--lt-color-neutral-canvas);
22
+ background: var(--lt-color-neutral-text-strong);
23
+ border-radius: var(--lt-tooltip-radius, var(--lt-spacing-1));
24
+ /* The bubble is hidden until the trigger gets focus or the mouse.
25
+ `display: none` and not just `visibility`: a hidden bubble still took
26
+ up room, and at the right edge it caused sideways scrolling on a
27
+ narrow screen. `aria-describedby` reads the text it points to also
28
+ while the bubble is hidden. */
29
+ display: none;
30
+ opacity: 0;
31
+ /* While it fades out, the bubble briefly has `display` on. Without this
32
+ it and the bridge took clicks meant for what was underneath. */
33
+ pointer-events: none;
34
+ }
35
+
36
+ /* `inset-inline-start` flips with the direction, `translateX` does not.
37
+ Without this the bubble sat a whole bubble width to the left of the
38
+ button. */
39
+ .lt-tooltip__bubble:dir(rtl) {
40
+ transform: translateX(50%);
41
+ }
42
+
43
+ .lt-tooltip:hover .lt-tooltip__bubble,
44
+ .lt-tooltip:focus-within .lt-tooltip__bubble {
45
+ display: block;
46
+ opacity: 1;
47
+ pointer-events: auto;
48
+ }
49
+
50
+ /* An invisible bridge over the gap between the button and the bubble, as
51
+ wide as the button. Without it `:hover` let go on the way up, and the
52
+ bubble disappeared before the mouse reached it. It is only there while
53
+ the bubble shows, and no wider than the button, so it does not take
54
+ clicks from the content next to it. */
55
+ .lt-tooltip:is(:hover, :focus-within)::before {
56
+ content: "";
57
+ position: absolute;
58
+ inset-inline: 0;
59
+ inset-block-end: 100%;
60
+ block-size: var(--lt-spacing-2);
61
+ }
62
+
63
+ /* The fade-in starts from invisible also when the bubble comes from
64
+ `display: none`. Without support for this it just appears without
65
+ fading. */
66
+ @starting-style {
67
+ .lt-tooltip:hover .lt-tooltip__bubble,
68
+ .lt-tooltip:focus-within .lt-tooltip__bubble {
69
+ opacity: 0;
70
+ }
71
+ }
72
+
73
+ @media (prefers-reduced-motion: no-preference) {
74
+ .lt-tooltip__bubble {
75
+ transition:
76
+ opacity 120ms ease,
77
+ display 120ms allow-discrete;
78
+ }
79
+ }
80
+
81
+ /* High contrast: the bubble has no border, and the surfaces are forced to
82
+ the same colour as the page. Without an edge the text floats right on
83
+ top of the content below. */
84
+ @media (forced-colors: active) {
85
+ .lt-tooltip__bubble {
86
+ border: 1px solid CanvasText;
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,37 @@
1
+ import { attributes } from "../shared.js"
2
+
3
+ export const TOOLTIP_CLASS = "lt-tooltip" as const
4
+ /** The bubble with the text. */
5
+ export const TOOLTIP_BUBBLE_CLASS = "lt-tooltip__bubble" as const
6
+
7
+ export type TooltipAttributes = {
8
+ class: typeof TOOLTIP_CLASS
9
+ }
10
+
11
+ /**
12
+ * The attributes for the wrapper around a trigger and a tooltip bubble.
13
+ *
14
+ * The bubble shows on hover and on focus. The focus part is not optional: a
15
+ * bubble that only comes with the mouse does not exist for keyboard users.
16
+ *
17
+ * The text in the bubble must be connected to the trigger with
18
+ * `aria-describedby`. Without it the bubble is just something that appears
19
+ * on screen, and is never announced.
20
+ *
21
+ * Use it for something extra, never for something the user must have. On a
22
+ * touch screen there is neither hover nor focus before something is tapped.
23
+ *
24
+ * ```ts
25
+ * <span {...tooltip()}>
26
+ * <button aria-describedby="hint">Archive</button>
27
+ * <span class={tooltip.bubble} role="tooltip" id="hint">Moves it to the archive</span>
28
+ * </span>
29
+ * ```
30
+ */
31
+ export const tooltip = Object.assign(
32
+ (): TooltipAttributes => attributes({ class: TOOLTIP_CLASS }),
33
+ {
34
+ /** The class on the bubble with the text. */
35
+ bubble: TOOLTIP_BUBBLE_CLASS,
36
+ },
37
+ )
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Every text the package itself writes into the page when nobody has given
3
+ * it another one.
4
+ *
5
+ * LO-TEK has almost no text: the renderer writes the text, in its own
6
+ * language. What is left here are the defaults for text a component creates
7
+ * itself, and each of them can be replaced. How is noted next to each one,
8
+ * and the same is in the table on the documentation page about translation.
9
+ *
10
+ * The texts live here and not in the components, so there is one place to
11
+ * read them. `scripts/check-texts.ts` fails the build on a user-facing text
12
+ * that is in a component and not here, and requires each of them to be in
13
+ * the table on the translation page.
14
+ *
15
+ * The texts in CSS, such as " (required)", cannot import anything. They are
16
+ * read from an `--lt-` variable with the text as the fallback, and
17
+ * `check-texts.ts` requires that.
18
+ */
19
+ export const DEFAULT_TEXTS = {
20
+ /** `aria-label` on the `<lt-toast>` region. Replaced with `label`. */
21
+ toastRegion: "Notifications",
22
+ /** The close button in each message. Replaced with `close-label`. */
23
+ toastClose: "Close message",
24
+ /** `<lt-connection-status>` when the connection is lost. Replaced with `offline-text`. */
25
+ connectionOffline: "No connection. What you type is not being saved.",
26
+ /** `<lt-connection-status>` when it comes back. Replaced with `online-text`. */
27
+ connectionOnline: "Connection restored.",
28
+ /** The match count in `<lt-suggestion>` with no matches. Replaced with `count-none`. */
29
+ suggestionNone: "No matches",
30
+ /** The match count with one match. Replaced with `count-one`. */
31
+ suggestionOne: "One match",
32
+ /** The match count otherwise. `{n}` is the number. Replaced with `count-other`. */
33
+ suggestionOther: "{n} matches",
34
+ } as const
@@ -0,0 +1,68 @@
1
+ // Generated by interfaces/scripts/generate-vocabulary.ts from metadata.ts. Do not edit.
2
+
3
+ import type { LtDialog } from "./frame/dialog/lt-dialog.js"
4
+ import type { LtErrorSummary } from "./frame/error-summary/lt-error-summary.js"
5
+ import type { LtField } from "./frame/field/lt-field.js"
6
+ import type { LtPopover } from "./frame/popover/lt-popover.js"
7
+ import type { LtSessionTimeout } from "./frame/session-timeout/lt-session-timeout.js"
8
+ import type { LtSuggestion } from "./frame/suggestion/lt-suggestion.js"
9
+ import type { LtTabs } from "./frame/tabs/lt-tabs.js"
10
+ import type { LtConnectionStatus } from "./standalone/connection-status/lt-connection-status.js"
11
+ import type { LtToast } from "./standalone/toast/lt-toast.js"
12
+
13
+ /**
14
+ * The events the web components dispatch, with `detail` as the component
15
+ * sends it. All of them bubble, and come out of a shadow root.
16
+ * `HTMLElementEventMap` and `DocumentEventMap` are extended with them, so
17
+ * `addEventListener("dialog-toggle", …)` gives `event.detail.open` as
18
+ * `boolean` on any element and on `document`.
19
+ *
20
+ * `HTMLElementTagNameMap` is extended with the elements, so
21
+ * `querySelector("lt-dialog")` gives `LtDialog | null`. The map is here,
22
+ * and not in each component, because every entry to the web components
23
+ * brings this file along: from `/register` alone,
24
+ * `querySelector("lt-dialog")` was otherwise an `Element`, and the listener
25
+ * on it got `Event` without `detail`.
26
+ */
27
+ export interface LtEventMap {
28
+ /** `<lt-tabs>`: The user selected a tab. `index` counts from 0. */
29
+ "tab-select": CustomEvent<{ index: number }>
30
+ /** `<lt-popover>`: The user opened or closed the panel, or `show()`, `hide()` or `toggle()` was called. Setting `open` as a property or attribute dispatches no event. */
31
+ "popover-toggle": CustomEvent<{ open: boolean }>
32
+ /** `<lt-suggestion>`: The user chose a suggestion. `label` is the text, `value` the code from `data-value`, or the text when the option has none. The field also gets `input` and `change`, as if the user had typed it. */
33
+ "suggestion-select": CustomEvent<{ value: string; label: string }>
34
+ /** `<lt-dialog>`: The dialog opened or closed. `returnValue` is the value of the button that closed it, or an empty string. */
35
+ "dialog-toggle": CustomEvent<{ open: boolean; returnValue: string }>
36
+ /** `<lt-toast>`: A message was closed, by the user, because its time ran out, or with `dismiss()`. `clear()` dispatches none. */
37
+ "toast-dismiss": CustomEvent<null>
38
+ /** `<lt-session-timeout>`: The warning opened. */
39
+ "session-warn": CustomEvent<null>
40
+ /** `<lt-session-timeout>`: The session continues: the user closed the warning with a button other than log out or with Escape, or the app called `extend()`. */
41
+ "session-extend": CustomEvent<null>
42
+ /** `<lt-session-timeout>`: The user chose to log out. */
43
+ "session-logout": CustomEvent<null>
44
+ /** `<lt-session-timeout>`: Time is up. */
45
+ "session-expired": CustomEvent<null>
46
+ /** `<lt-session-timeout>`: The user is active. Dispatched at most once per `activity-interval`, so the app can keep the server session alive. */
47
+ "session-activity": CustomEvent<null>
48
+ /** `<lt-connection-status>`: The connection is lost. */
49
+ "connection-lost": CustomEvent<null>
50
+ /** `<lt-connection-status>`: The connection is back. */
51
+ "connection-restored": CustomEvent<null>
52
+ }
53
+
54
+ declare global {
55
+ interface HTMLElementEventMap extends LtEventMap {}
56
+ interface DocumentEventMap extends LtEventMap {}
57
+ interface HTMLElementTagNameMap {
58
+ "lt-connection-status": LtConnectionStatus
59
+ "lt-dialog": LtDialog
60
+ "lt-error-summary": LtErrorSummary
61
+ "lt-field": LtField
62
+ "lt-popover": LtPopover
63
+ "lt-session-timeout": LtSessionTimeout
64
+ "lt-suggestion": LtSuggestion
65
+ "lt-tabs": LtTabs
66
+ "lt-toast": LtToast
67
+ }
68
+ }