@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":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/css/pagination/pagination.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,EAAG,eAAwB,CAAA;AACxD,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,EAAG,oBAA6B,CAAA;AAEjE,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,OAAO,gBAAgB,CAAA;CAC/B,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,SACjB,oBAAoB;IAEtB,kDAAkD;;CAGrD,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { attributes } from "../shared.js";
2
+ export const PAGINATION_CLASS = "lt-pagination";
3
+ /** The gap in the row of numbers, as in "1 2 … 9 10". */
4
+ export const PAGINATION_GAP_CLASS = "lt-pagination__gap";
5
+ /**
6
+ * The attributes for pagination.
7
+ *
8
+ * The class goes on a `<ul>` inside a `<nav aria-label="Pagination">`. Each
9
+ * page is a link with its own address, not a button: the user can then open
10
+ * page three in a new tab, and come back with the back button.
11
+ *
12
+ * The current page is marked with `aria-current="page"`, which both gives
13
+ * the colour and is what the screen reader announces.
14
+ *
15
+ * ```ts
16
+ * <nav aria-label="Pagination">
17
+ * <ul {...pagination()}>…</ul>
18
+ * </nav>
19
+ * ```
20
+ */
21
+ export const pagination = Object.assign(() => attributes({ class: PAGINATION_CLASS }), {
22
+ /** The class on the gap in the row of numbers. */
23
+ gap: PAGINATION_GAP_CLASS,
24
+ });
25
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../src/components/css/pagination/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAwB,CAAA;AACxD,yDAAyD;AACzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAA6B,CAAA;AAMjE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CACrC,GAAyB,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,EACnE;IACE,kDAAkD;IAClD,GAAG,EAAE,oBAAoB;CAC1B,CACF,CAAA"}
@@ -0,0 +1,36 @@
1
+ export declare const PARAGRAPH_CLASS: "lt-paragraph";
2
+ export declare const paragraphSizes: readonly ["small", "medium", "large"];
3
+ export declare const paragraphVariants: readonly ["default", "lead"];
4
+ export type ParagraphSize = (typeof paragraphSizes)[number];
5
+ export type ParagraphVariant = (typeof paragraphVariants)[number];
6
+ export type NonDefaultParagraphSize = Exclude<ParagraphSize, "medium">;
7
+ export type NonDefaultParagraphVariant = Exclude<ParagraphVariant, "default">;
8
+ export type ParagraphOptions = {
9
+ /** Text size. Default: `medium`. */
10
+ size?: ParagraphSize;
11
+ /** `lead` is the introduction right below the heading. Default: `default`. */
12
+ variant?: ParagraphVariant;
13
+ };
14
+ export type ParagraphAttributes = {
15
+ class: typeof PARAGRAPH_CLASS;
16
+ "data-size"?: NonDefaultParagraphSize;
17
+ "data-variant"?: NonDefaultParagraphVariant;
18
+ };
19
+ /**
20
+ * The attributes for a paragraph.
21
+ *
22
+ * The width is limited to 70 characters. Longer lines make it hard to find
23
+ * the start of the next one, and that is the most common reason a text is
24
+ * hard to read even when the type is large enough.
25
+ *
26
+ * ```ts
27
+ * <p {...paragraph({ variant: "lead" })}>A short summary of what the page is about.</p>
28
+ * ```
29
+ */
30
+ export declare const paragraph: (({ size, variant, }?: ParagraphOptions) => ParagraphAttributes) & {
31
+ sizes: readonly ["small", "medium", "large"];
32
+ isSize: (value: string) => value is "small" | "medium" | "large";
33
+ variants: readonly ["default", "lead"];
34
+ isVariant: (value: string) => value is "default" | "lead";
35
+ };
36
+ //# sourceMappingURL=paragraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../src/components/css/paragraph/paragraph.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAG,cAAuB,CAAA;AAEtD,eAAO,MAAM,cAAc,uCAAwC,CAAA;AACnE,eAAO,MAAM,iBAAiB,8BAA+B,CAAA;AAE7D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AACjE,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;AACtE,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAE7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,uBAAuB,CAAA;IACrC,cAAc,CAAC,EAAE,0BAA0B,CAAA;CAC5C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,yBAIjB,gBAAgB,KAAQ,mBAAmB;;;;;CAY/C,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const PARAGRAPH_CLASS = "lt-paragraph";
3
+ export const paragraphSizes = ["small", "medium", "large"];
4
+ export const paragraphVariants = ["default", "lead"];
5
+ /**
6
+ * The attributes for a paragraph.
7
+ *
8
+ * The width is limited to 70 characters. Longer lines make it hard to find
9
+ * the start of the next one, and that is the most common reason a text is
10
+ * hard to read even when the type is large enough.
11
+ *
12
+ * ```ts
13
+ * <p {...paragraph({ variant: "lead" })}>A short summary of what the page is about.</p>
14
+ * ```
15
+ */
16
+ export const paragraph = Object.assign(({ size = "medium", variant = "default", } = {}) => attributes({
17
+ class: PARAGRAPH_CLASS,
18
+ "data-size": size === "medium" ? undefined : size,
19
+ "data-variant": variant === "default" ? undefined : variant,
20
+ }), {
21
+ sizes: paragraphSizes,
22
+ isSize: createGuard(paragraphSizes),
23
+ variants: paragraphVariants,
24
+ isVariant: createGuard(paragraphVariants),
25
+ });
26
+ //# sourceMappingURL=paragraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.js","sourceRoot":"","sources":["../../../../src/components/css/paragraph/paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAuB,CAAA;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,CAAU,CAAA;AAoB7D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CACpC,CAAC,EACC,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,SAAS,MACC,EAAE,EAAuB,EAAE,CAC/C,UAAU,CAAC;IACT,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;IACjD,cAAc,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC5D,CAAC,EACJ;IACE,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,WAAW,CAAC,cAAc,CAAC;IACnC,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,WAAW,CAAC,iBAAiB,CAAC;CAC1C,CACF,CAAA"}
@@ -0,0 +1,53 @@
1
+ export declare const PROGRESS_CLASS: "lt-progress";
2
+ export declare const progressColors: readonly ["success", "warning", "danger"];
3
+ export type ProgressColor = (typeof progressColors)[number];
4
+ export type ProgressOptions = {
5
+ /** How far it has come. Leave it out, and the bar is indeterminate. */
6
+ value?: number;
7
+ /** What counts as full. Default: `100`. */
8
+ max?: number;
9
+ /** What the number means. The default is the accent colour, meaning "this is in progress". */
10
+ color?: ProgressColor;
11
+ /** What is in progress. Becomes `aria-label`, so the bar has a name. */
12
+ label?: string;
13
+ /**
14
+ * How far it has come, in words. Becomes `aria-valuetext`, which the
15
+ * screen reader reads instead of the percentage: "Step 3 of 7" says more
16
+ * than "43 percent", and `max` is rarely announced.
17
+ */
18
+ valueText?: string;
19
+ };
20
+ export type ProgressAttributes = {
21
+ class: typeof PROGRESS_CLASS;
22
+ value?: string;
23
+ max: string;
24
+ "data-color"?: ProgressColor;
25
+ "aria-label"?: string;
26
+ "aria-valuetext"?: string;
27
+ };
28
+ /**
29
+ * The attributes for a progress bar on a `<progress>`.
30
+ *
31
+ * The element has the semantics built in: the browser exposes it as
32
+ * `role="progressbar"` and announces how far it has come. You need neither a
33
+ * role, `aria-valuenow` nor `aria-valuemax`.
34
+ *
35
+ * Leave out `value`, and the bar becomes indeterminate: "something is going
36
+ * on, we do not know for how long". That is the same as `lt.spinner()` says,
37
+ * so choose one of them.
38
+ *
39
+ * ```ts
40
+ * <progress {...progress({ value: 3, max: 7, label: "Step 3 of 7" })} />
41
+ * ```
42
+ *
43
+ * `max` defaults to 100 and is always written out, against the rule that a
44
+ * default gives no attribute. The reason is that the rule is about
45
+ * appearance, where the CSS already has the answer. `max` is semantics, and
46
+ * HTML's own default is `1`: a `<progress value="40">` without `max` shows a
47
+ * full bar, without anything saying so.
48
+ */
49
+ export declare const progress: (({ value, max, color, label, valueText, }?: ProgressOptions) => ProgressAttributes) & {
50
+ colors: readonly ["success", "warning", "danger"];
51
+ isColor: (value: string) => value is "warning" | "success" | "danger";
52
+ };
53
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../../src/components/css/progress/progress.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAG,aAAsB,CAAA;AAEpD,eAAO,MAAM,cAAc,2CAA4C,CAAA;AAEvE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,MAAM,eAAe,GAAG;IAC5B,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8FAA8F;IAC9F,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,OAAO,cAAc,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,+CAOhB,eAAe,KAAQ,kBAAkB;;;CAe7C,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const PROGRESS_CLASS = "lt-progress";
3
+ export const progressColors = ["success", "warning", "danger"];
4
+ /**
5
+ * The attributes for a progress bar on a `<progress>`.
6
+ *
7
+ * The element has the semantics built in: the browser exposes it as
8
+ * `role="progressbar"` and announces how far it has come. You need neither a
9
+ * role, `aria-valuenow` nor `aria-valuemax`.
10
+ *
11
+ * Leave out `value`, and the bar becomes indeterminate: "something is going
12
+ * on, we do not know for how long". That is the same as `lt.spinner()` says,
13
+ * so choose one of them.
14
+ *
15
+ * ```ts
16
+ * <progress {...progress({ value: 3, max: 7, label: "Step 3 of 7" })} />
17
+ * ```
18
+ *
19
+ * `max` defaults to 100 and is always written out, against the rule that a
20
+ * default gives no attribute. The reason is that the rule is about
21
+ * appearance, where the CSS already has the answer. `max` is semantics, and
22
+ * HTML's own default is `1`: a `<progress value="40">` without `max` shows a
23
+ * full bar, without anything saying so.
24
+ */
25
+ export const progress = Object.assign(({ value, max = 100, color, label, valueText, } = {}) => attributes({
26
+ class: PROGRESS_CLASS,
27
+ // The numbers are sent out as strings, like the rest of the return
28
+ // values: that is the HTML form, and it is what `setAttributes` accepts.
29
+ value: value === undefined ? undefined : String(value),
30
+ max: String(max),
31
+ "data-color": color,
32
+ "aria-label": label,
33
+ "aria-valuetext": valueText,
34
+ }), {
35
+ colors: progressColors,
36
+ isColor: createGuard(progressColors),
37
+ });
38
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../../src/components/css/progress/progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAsB,CAAA;AAEpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAA;AA8BvE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CACnC,CAAC,EACC,KAAK,EACL,GAAG,GAAG,GAAG,EACT,KAAK,EACL,KAAK,EACL,SAAS,MACU,EAAE,EAAsB,EAAE,CAC7C,UAAU,CAAC;IACT,KAAK,EAAE,cAAc;IACrB,mEAAmE;IACnE,yEAAyE;IACzE,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IACtD,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC;IAChB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,KAAK;IACnB,gBAAgB,EAAE,SAAS;CAC5B,CAAC,EACJ;IACE,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,WAAW,CAAC,cAAc,CAAC;CACrC,CACF,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { type FieldState, type NonDefaultFieldState } from "../shared.js";
2
+ export declare const RADIO_CLASS: "lt-radio";
3
+ /** The row that holds the button and the text next to each other. */
4
+ export declare const RADIO_ROW_CLASS: "lt-radio-row";
5
+ export type RadioOptions = {
6
+ /** Validation state. Default: `default`. */
7
+ state?: FieldState;
8
+ };
9
+ export type RadioAttributes = {
10
+ class: typeof RADIO_CLASS;
11
+ type: "radio";
12
+ "data-state"?: NonDefaultFieldState;
13
+ "aria-invalid"?: "true";
14
+ };
15
+ /**
16
+ * The attributes for a radio button.
17
+ *
18
+ * All the buttons in a group must have the same `name`. That connection is
19
+ * what lets only one be selected, and lets the arrow keys move between them.
20
+ * You set `name` yourself, since only you know what the group is called.
21
+ *
22
+ * ```ts
23
+ * <input {...radio()} name="delivery" value="post" />
24
+ * ```
25
+ */
26
+ export declare const radio: (({ state }?: RadioOptions) => RadioAttributes) & {
27
+ /** The class on the row around the button and the text. */
28
+ row: "lt-radio-row";
29
+ states: readonly ["default", "invalid", "success"];
30
+ isState: (value: string) => value is "default" | "invalid" | "success";
31
+ };
32
+ //# sourceMappingURL=radio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../src/components/css/radio/radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,WAAW,EAAG,UAAmB,CAAA;AAC9C,qEAAqE;AACrE,eAAO,MAAM,eAAe,EAAG,cAAuB,CAAA;AAEtD,MAAM,MAAM,YAAY,GAAG;IACzB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAA;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,gBACQ,YAAY,KAAQ,eAAe;IAQzD,2DAA2D;;;;CAK9D,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { attributes, fieldStates, isFieldState, } from "../shared.js";
2
+ export const RADIO_CLASS = "lt-radio";
3
+ /** The row that holds the button and the text next to each other. */
4
+ export const RADIO_ROW_CLASS = "lt-radio-row";
5
+ /**
6
+ * The attributes for a radio button.
7
+ *
8
+ * All the buttons in a group must have the same `name`. That connection is
9
+ * what lets only one be selected, and lets the arrow keys move between them.
10
+ * You set `name` yourself, since only you know what the group is called.
11
+ *
12
+ * ```ts
13
+ * <input {...radio()} name="delivery" value="post" />
14
+ * ```
15
+ */
16
+ export const radio = Object.assign(({ state = "default" } = {}) => attributes({
17
+ class: RADIO_CLASS,
18
+ type: "radio",
19
+ "data-state": state === "default" ? undefined : state,
20
+ "aria-invalid": state === "invalid" ? "true" : undefined,
21
+ }), {
22
+ /** The class on the row around the button and the text. */
23
+ row: RADIO_ROW_CLASS,
24
+ states: fieldStates,
25
+ isState: isFieldState,
26
+ });
27
+ //# sourceMappingURL=radio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../../src/components/css/radio/radio.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,WAAW,EACX,YAAY,GAEb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAA;AAC9C,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,cAAuB,CAAA;AActD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAChC,CAAC,EAAE,KAAK,GAAG,SAAS,KAAmB,EAAE,EAAmB,EAAE,CAC5D,UAAU,CAAC;IACT,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,OAAgB;IACtB,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,cAAc,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CACpE,CAAC,EACJ;IACE,2DAA2D;IAC3D,GAAG,EAAE,eAAe;IACpB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { INPUT_CLASS } from "../input/input.js";
2
+ import { type FieldState } from "../shared.js";
3
+ export declare const SEARCH_CLASS: "lt-search";
4
+ /** The row with the search field and the button next to it. */
5
+ export declare const SEARCH_ROW_CLASS: "lt-search-row";
6
+ export type SearchOptions = {
7
+ /** Validation state. Default: `default`. */
8
+ state?: FieldState;
9
+ };
10
+ export type SearchAttributes = {
11
+ class: `${typeof INPUT_CLASS} ${typeof SEARCH_CLASS}`;
12
+ type: "search";
13
+ "data-state"?: "invalid" | "success";
14
+ "aria-invalid"?: "true";
15
+ };
16
+ /**
17
+ * The attributes for a search field.
18
+ *
19
+ * The field is an `lt-input` with room for the magnifying glass, so both
20
+ * classes are set. `type="search"` gives the browser's own cross for
21
+ * clearing the field, and on mobile a keyboard with "Search" instead of
22
+ * "Enter".
23
+ *
24
+ * ```ts
25
+ * <input {...search()} name="q" />
26
+ * ```
27
+ */
28
+ export declare const search: (({ state }?: SearchOptions) => SearchAttributes) & {
29
+ /** The class on the row with the field and the button. */
30
+ row: "lt-search-row";
31
+ states: readonly ["default", "invalid", "success"];
32
+ isState: (value: string) => value is "default" | "invalid" | "success";
33
+ };
34
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/components/css/search/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAS,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAEL,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,YAAY,EAAG,WAAoB,CAAA;AAChD,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,EAAG,eAAwB,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,GAAG,OAAO,WAAW,IAAI,OAAO,YAAY,EAAE,CAAA;IACrD,IAAI,EAAE,QAAQ,CAAA;IACd,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACpC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,gBACO,aAAa,KAAQ,gBAAgB;IAa3D,0DAA0D;;;;CAK7D,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { INPUT_CLASS, input } from "../input/input.js";
2
+ import { attributes, fieldStates, isFieldState, } from "../shared.js";
3
+ export const SEARCH_CLASS = "lt-search";
4
+ /** The row with the search field and the button next to it. */
5
+ export const SEARCH_ROW_CLASS = "lt-search-row";
6
+ /**
7
+ * The attributes for a search field.
8
+ *
9
+ * The field is an `lt-input` with room for the magnifying glass, so both
10
+ * classes are set. `type="search"` gives the browser's own cross for
11
+ * clearing the field, and on mobile a keyboard with "Search" instead of
12
+ * "Enter".
13
+ *
14
+ * ```ts
15
+ * <input {...search()} name="q" />
16
+ * ```
17
+ */
18
+ export const search = Object.assign(({ state = "default" } = {}) => {
19
+ const base = input({ type: "search", state });
20
+ return attributes({
21
+ ...base,
22
+ class: `${INPUT_CLASS} ${SEARCH_CLASS}`,
23
+ type: "search",
24
+ "data-variant": undefined,
25
+ }, base);
26
+ }, {
27
+ /** The class on the row with the field and the button. */
28
+ row: SEARCH_ROW_CLASS,
29
+ states: fieldStates,
30
+ isState: isFieldState,
31
+ });
32
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../src/components/css/search/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EACL,UAAU,EAEV,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAA;AAChD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAwB,CAAA;AAcxD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,EAAE,KAAK,GAAG,SAAS,KAAoB,EAAE,EAAoB,EAAE;IAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7C,OAAO,UAAU,CACf;QACE,GAAG,IAAI;QACP,KAAK,EAAE,GAAG,WAAW,IAAI,YAAY,EAAW;QAChD,IAAI,EAAE,QAAiB;QACvB,cAAc,EAAE,SAAS;KAC1B,EACD,IAAI,CACe,CAAA;AACvB,CAAC,EACD;IACE,0DAA0D;IAC1D,GAAG,EAAE,gBAAgB;IACrB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { type FieldState, type NonDefaultFieldState } from "../shared.js";
2
+ export declare const SELECT_CLASS: "lt-select";
3
+ /**
4
+ * Who draws the dropdown list.
5
+ *
6
+ * `auto` is the browser's own list, a window from the operating system that
7
+ * cannot be styled. `styled` asks the browser to draw it inside the page
8
+ * instead, so it gets the design system's colours, spacing and shadow.
9
+ */
10
+ export declare const selectPickers: readonly ["auto", "styled"];
11
+ export type SelectPicker = (typeof selectPickers)[number];
12
+ export type NonDefaultSelectPicker = Exclude<SelectPicker, "auto">;
13
+ export declare const isSelectPicker: (value: string) => value is "auto" | "styled";
14
+ export type SelectOptions = {
15
+ /** Validation state. Default: `default`. */
16
+ state?: FieldState;
17
+ /** Who draws the dropdown list. Default: `auto`. */
18
+ picker?: SelectPicker;
19
+ };
20
+ export type SelectAttributes = {
21
+ class: typeof SELECT_CLASS;
22
+ "data-state"?: NonDefaultFieldState;
23
+ "data-picker"?: NonDefaultSelectPicker;
24
+ "aria-invalid"?: "true";
25
+ };
26
+ /**
27
+ * The attributes for a dropdown list.
28
+ *
29
+ * ```ts
30
+ * <select {...select({ state: "invalid" })} />
31
+ * <select {...select({ picker: "styled" })} />
32
+ * ```
33
+ */
34
+ export declare const select: (({ state, picker, }?: SelectOptions) => SelectAttributes) & {
35
+ states: readonly ["default", "invalid", "success"];
36
+ isState: (value: string) => value is "default" | "invalid" | "success";
37
+ pickers: readonly ["auto", "styled"];
38
+ isPicker: (value: string) => value is "auto" | "styled";
39
+ };
40
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/components/css/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,YAAY,EAAG,WAAoB,CAAA;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,6BAA8B,CAAA;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AACzD,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AAClE,eAAO,MAAM,cAAc,+CAA6B,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,oDAAoD;IACpD,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAA;IAC1B,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,aAAa,CAAC,EAAE,sBAAsB,CAAA;IACtC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,yBAId,aAAa,KAAQ,gBAAgB;;;;;CAazC,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { attributes, createGuard, fieldStates, isFieldState, } from "../shared.js";
2
+ export const SELECT_CLASS = "lt-select";
3
+ /**
4
+ * Who draws the dropdown list.
5
+ *
6
+ * `auto` is the browser's own list, a window from the operating system that
7
+ * cannot be styled. `styled` asks the browser to draw it inside the page
8
+ * instead, so it gets the design system's colours, spacing and shadow.
9
+ */
10
+ export const selectPickers = ["auto", "styled"];
11
+ export const isSelectPicker = createGuard(selectPickers);
12
+ /**
13
+ * The attributes for a dropdown list.
14
+ *
15
+ * ```ts
16
+ * <select {...select({ state: "invalid" })} />
17
+ * <select {...select({ picker: "styled" })} />
18
+ * ```
19
+ */
20
+ export const select = Object.assign(({ state = "default", picker = "auto", } = {}) => attributes({
21
+ class: SELECT_CLASS,
22
+ "data-state": state === "default" ? undefined : state,
23
+ "data-picker": picker === "auto" ? undefined : picker,
24
+ "aria-invalid": state === "invalid" ? "true" : undefined,
25
+ }), {
26
+ states: fieldStates,
27
+ isState: isFieldState,
28
+ pickers: selectPickers,
29
+ isPicker: isSelectPicker,
30
+ });
31
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/components/css/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EAEX,WAAW,EACX,YAAY,GAEb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAA;AAGxD,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAAC,CAAA;AAgBxD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,EACC,KAAK,GAAG,SAAS,EACjB,MAAM,GAAG,MAAM,MACE,EAAE,EAAoB,EAAE,CACzC,UAAU,CAAC;IACT,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;IACrD,cAAc,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CACpE,CAAC,EACJ;IACE,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,cAAc;CACzB,CACF,CAAA"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Shared building blocks for the component API.
3
+ *
4
+ * Each component exports one function that takes an object of options and
5
+ * returns the attributes you spread onto the element. The shape is the same
6
+ * for all of them, so you only need to learn it once.
7
+ */
8
+ /** The names the set manages, or `undefined` for a set we did not create. */
9
+ export declare function managedNames(set: object): readonly string[] | undefined;
10
+ /**
11
+ * Gives a set rewritten from another the same managed names.
12
+ *
13
+ * `/react` renames `class` to `className` in a new object, and the new object
14
+ * was not in the map. `lt.setAttributes` from there then only cleaned up
15
+ * `data-*`, and `aria-invalid` stayed after the field was corrected. The
16
+ * names are given as they are spelled in the new set.
17
+ *
18
+ * For `/react` and other entry points that rewrite the sets, not for apps: a
19
+ * set from `lt.*` is already managed.
20
+ */
21
+ export declare function rememberManaged(set: object, names: readonly string[]): void;
22
+ /**
23
+ * Removes attributes without a value, so `{...spread}` does not set empty
24
+ * fields.
25
+ *
26
+ * When the set builds on another, as `lt.search()` does on `lt.input()`, the
27
+ * other is passed in as `based`. The spread has already lost the keys that
28
+ * were off, and without this the search field only managed `data-state` when
29
+ * it happened to be set: it could be set, but not removed.
30
+ */
31
+ export declare function attributes<T extends Record<string, unknown>>(values: T, ...based: object[]): T;
32
+ /** Creates a type guard for a list of allowed strings. */
33
+ export declare function createGuard<T extends string>(allowed: readonly T[]): (value: string) => value is T;
34
+ /**
35
+ * Validation state for form controls.
36
+ *
37
+ * Input, textarea and select each had an identical type of their own. Now
38
+ * there is one, so a value can pass between them without conversion.
39
+ */
40
+ export declare const fieldStates: readonly ["default", "invalid", "success"];
41
+ export type FieldState = (typeof fieldStates)[number];
42
+ export type NonDefaultFieldState = Exclude<FieldState, "default">;
43
+ export declare const isFieldState: (value: string) => value is "default" | "invalid" | "success";
44
+ /** How a required field is marked in its label. */
45
+ export declare const requiredMarkers: readonly ["symbol", "text"];
46
+ export type RequiredMarker = (typeof requiredMarkers)[number];
47
+ export declare const isRequiredMarker: (value: string) => value is "symbol" | "text";
48
+ export declare function warnOnce(message: string): void;
49
+ /**
50
+ * Creates an id that is unique within the document.
51
+ *
52
+ * Safe only when the markup is rendered once. When the same field is rendered
53
+ * both on a server and in the browser, the two runs give two different ids,
54
+ * and the wiring is broken until the framework has corrected it.
55
+ */
56
+ export declare function createFieldId(): string;
57
+ /**
58
+ * The keys a builder function creates ids from, checked.
59
+ *
60
+ * A key is the same as `key` in React: a fixed value from the data, such as
61
+ * a record id. The id is the same on every render, and a server update
62
+ * recognises the element. An index is not a key: if the server inserts a row
63
+ * first, the same index points to something else.
64
+ *
65
+ * Throws, instead of warning and creating a fallback as `idOrFallback` does:
66
+ * an empty key, one with whitespace or two identical ones give ids that are
67
+ * empty, invalid or identical, and there is no fallback that is right.
68
+ * Whitespace is what JavaScript counts as whitespace (`\s`), which the
69
+ * Kotlin version spells out.
70
+ */
71
+ export declare function checkedKeys(builder: string, keys: unknown): string[];
72
+ /**
73
+ * The id the builder function received, or a fallback with a warning.
74
+ *
75
+ * Every builder function that takes an id requires it in the type. That is
76
+ * not enough on its own: a consumer without TypeScript sees no type, and
77
+ * plain HTML with `<script type="module">` is a first-class way to use
78
+ * LO-TEK. Without the fallback the ids became strings like `undefined-list`,
79
+ * `aria-controls` pointed there, and the wiring was broken in a way that
80
+ * looked valid.
81
+ *
82
+ * The empty string counts as no id. `lt.field({ id: "" })` gave `for=""` and
83
+ * `help.id="-help"`, the same problem without anything saying so.
84
+ *
85
+ * The name of the builder function is in the message. Without it the
86
+ * suggestion field said "lt.field()" and sent the developer to the wrong
87
+ * place.
88
+ */
89
+ export declare function idOrFallback(builder: string, id: string | undefined, option?: string): string;
90
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/components/css/shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAEvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAE3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,EAAE,CAAC,EACT,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,CAAC,CAaH;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,IACzD,OAAO,MAAM,KAAG,KAAK,IAAI,CAAC,CAEnC;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,4CAA6C,CAAA;AACrE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AACrD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;AACjE,eAAO,MAAM,YAAY,UAbR,MAAM,KAAG,KAAK,qCAaqB,CAAA;AAEpD,mDAAmD;AACnD,eAAO,MAAM,eAAe,6BAA8B,CAAA;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAC7D,eAAO,MAAM,gBAAgB,UAlBZ,MAAM,KAAG,KAAK,qBAkB6B,CAAA;AAY5D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI9C;AAID;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CA+BpE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,MAAM,SAAO,GACZ,MAAM,CAWR"}