@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
package/src/react.ts ADDED
@@ -0,0 +1,411 @@
1
+ import { accordion } from "./components/css/accordion/accordion.js"
2
+ import { alert } from "./components/css/alert/alert.js"
3
+ import { avatar } from "./components/css/avatar/avatar.js"
4
+ import { badge } from "./components/css/badge/badge.js"
5
+ import { breadcrumbs } from "./components/css/breadcrumbs/breadcrumbs.js"
6
+ import { button } from "./components/css/button/button.js"
7
+ import { card } from "./components/css/card/card.js"
8
+ import { checkbox } from "./components/css/checkbox/checkbox.js"
9
+ import { divider } from "./components/css/divider/divider.js"
10
+ import { errorText } from "./components/css/error-text/error-text.js"
11
+ import { fieldset, legend } from "./components/css/fieldset/fieldset.js"
12
+ import { fileUpload } from "./components/css/file-upload/file-upload.js"
13
+ import { heading } from "./components/css/heading/heading.js"
14
+ import { helpText } from "./components/css/help-text/help-text.js"
15
+ import { icon } from "./components/css/icon/icon.js"
16
+ import { input } from "./components/css/input/input.js"
17
+ import { label } from "./components/css/label/label.js"
18
+ import { link } from "./components/css/link/link.js"
19
+ import { list } from "./components/css/list/list.js"
20
+ import { pagination } from "./components/css/pagination/pagination.js"
21
+ import { paragraph } from "./components/css/paragraph/paragraph.js"
22
+ import { progress } from "./components/css/progress/progress.js"
23
+ import { radio } from "./components/css/radio/radio.js"
24
+ import { search } from "./components/css/search/search.js"
25
+ import { select } from "./components/css/select/select.js"
26
+ import {
27
+ fieldStates,
28
+ isFieldState,
29
+ isRequiredMarker,
30
+ managedNames,
31
+ rememberManaged,
32
+ requiredMarkers,
33
+ } from "./components/css/shared.js"
34
+ import { skeleton } from "./components/css/skeleton/skeleton.js"
35
+ import { skipLink } from "./components/css/skip-link/skip-link.js"
36
+ import { spinner } from "./components/css/spinner/spinner.js"
37
+ import { srOnly } from "./components/css/sr-only/sr-only.js"
38
+ import { switchControl } from "./components/css/switch/switch.js"
39
+ import { table, tableSort } from "./components/css/table/table.js"
40
+ import { tag } from "./components/css/tag/tag.js"
41
+ import { textarea } from "./components/css/textarea/textarea.js"
42
+ import { toggleGroup } from "./components/css/toggle-group/toggle-group.js"
43
+ import { tooltip } from "./components/css/tooltip/tooltip.js"
44
+ import { dialog } from "./components/frame/dialog/dialog.js"
45
+ import { errorSummary } from "./components/frame/error-summary/error-summary.js"
46
+ import {
47
+ computeFieldAttributes,
48
+ createFieldId,
49
+ type FieldOptions,
50
+ } from "./components/frame/field/field-core.js"
51
+ import { popover } from "./components/frame/popover/popover.js"
52
+ import { sessionTimeout } from "./components/frame/session-timeout/session-timeout.js"
53
+ import { suggestion } from "./components/frame/suggestion/suggestion.js"
54
+ import {
55
+ type TabsWithStateOptions,
56
+ tabsWithState,
57
+ } from "./components/frame/tabs/tabs.js"
58
+ import { connectionStatus } from "./components/standalone/connection-status/connection-status.js"
59
+ import { toast } from "./components/standalone/toast/toast.js"
60
+ import { type Attributes, setAttributes as setHtmlAttributes } from "./dom.js"
61
+
62
+ // The types of the events, so `addEventListener` is typed also for someone
63
+ // who only imports this entry point. Without the line the import disappeared
64
+ // from the `.d.ts` file, and `HTMLElementEventMap` was never extended.
65
+ export type { LtEventMap } from "./components/events.js"
66
+
67
+ /**
68
+ * The same API as `lt`, but with `className` and `htmlFor`.
69
+ *
70
+ * The rest of the system returns `class` and `for`, as the attributes are
71
+ * actually named in HTML. React accepts them, and they end up correctly in
72
+ * the DOM, but the development build writes "Invalid DOM property `class`.
73
+ * Did you mean `className`?" to the console, once for each attribute name. It
74
+ * is noise in every app that uses the components, and it teaches the reader
75
+ * to ignore the console.
76
+ *
77
+ * ```ts
78
+ * import { lt } from "@lo-tek/interfaces/react"
79
+ *
80
+ * <button {...lt.button({ variant: "secondary" })}>Save draft</button>
81
+ * ```
82
+ *
83
+ * The call sites are identical to the rest of the system; only the import
84
+ * path differs. This is a plain renaming of keys, so the package gets no
85
+ * dependency on React from it.
86
+ *
87
+ * Astro and plain HTML take `class` and `for` as they are. There you use
88
+ * `@lo-tek/interfaces` directly.
89
+ */
90
+
91
+ /**
92
+ * Gives the keys the names React expects, and the values the types React
93
+ * expects.
94
+ *
95
+ * `tabindex` is not only a different name: in HTML the value is a string, and
96
+ * in React `tabIndex` is a number. When we left the string, `lt.tabs()` came
97
+ * out with `tabIndex: "0"`, and TypeScript rejected it in every React app. It
98
+ * worked in the browser, since React converts the value itself, so the bug
99
+ * only showed up as a type error for the consumer.
100
+ */
101
+ export type ReactAttributes<T> = {
102
+ [K in keyof T as K extends "class"
103
+ ? "className"
104
+ : K extends "for"
105
+ ? "htmlFor"
106
+ : K extends "tabindex"
107
+ ? "tabIndex"
108
+ : K extends "autocomplete"
109
+ ? "autoComplete"
110
+ : K]: K extends "tabindex" ? number : T[K]
111
+ }
112
+
113
+ /**
114
+ * The attributes that have another name in React.
115
+ *
116
+ * `tabindex` came with the compound builder functions, and `autocomplete`
117
+ * with the suggestion field. Without the renaming React warns about every
118
+ * one of them.
119
+ *
120
+ * `aria-*` and `data-*`, on the other hand, stay as they are. React passes
121
+ * them on unchanged, and renaming them would give invalid attributes.
122
+ *
123
+ * `react.browser.test.ts` calls every builder function here with every
124
+ * allowed value it declares, collects all attribute names in the result,
125
+ * including those in lists and nested levels, and rejects every name React
126
+ * spells differently. The list there is React's and is longer than the four
127
+ * we rename, so a builder function that one day outputs `readonly` or
128
+ * `maxlength` stops there and not in a consumer's console.
129
+ */
130
+ const REACT_NAMES: Record<string, string> = {
131
+ class: "className",
132
+ for: "htmlFor",
133
+ tabindex: "tabIndex",
134
+ autocomplete: "autoComplete",
135
+ }
136
+
137
+ export function toReactAttributes<T extends Record<string, unknown>>(
138
+ attributes: T,
139
+ ): ReactAttributes<T> {
140
+ const result: Record<string, unknown> = {}
141
+ for (const [name, value] of Object.entries(attributes)) {
142
+ // `tabindex` is a string in HTML and a number in React. Everything else
143
+ // passes straight through: it is the names that differ, not the values.
144
+ result[REACT_NAMES[name] ?? name] =
145
+ name === "tabindex" ? Number(value) : value
146
+ }
147
+ // The new object manages the same as the old one, under the new names, so
148
+ // `setAttributes` below can clean up as much as the main entry point.
149
+ const names = managedNames(attributes)
150
+ if (names)
151
+ rememberManaged(
152
+ result,
153
+ names.map((name) => REACT_NAMES[name] ?? name),
154
+ )
155
+ return result as ReactAttributes<T>
156
+ }
157
+
158
+ /** The names back to HTML, for `setAttributes`. */
159
+ const HTML_NAMES: Record<string, string> = Object.fromEntries(
160
+ Object.entries(REACT_NAMES).map(([html, react]) => [react, html]),
161
+ )
162
+
163
+ /**
164
+ * A set as the builder functions here return it, with `className`,
165
+ * `htmlFor` and `tabIndex` as a number.
166
+ */
167
+ export type ReactSet = Record<string, string | number | boolean | undefined>
168
+
169
+ /**
170
+ * Writes a set from this entry point back to the HTML names.
171
+ *
172
+ * `setAttribute` writes the name as given, and in an HTML document it becomes
173
+ * lower case: `className` became the attribute `classname`, and `htmlFor`
174
+ * became `htmlfor`. The new object manages the same as the set it came from,
175
+ * so what is gone in the next call is cleaned up.
176
+ */
177
+ function toHtmlAttributes(set: ReactSet): Attributes {
178
+ const result: Attributes = {}
179
+ for (const [name, value] of Object.entries(set)) {
180
+ result[HTML_NAMES[name] ?? name] =
181
+ typeof value === "number" ? String(value) : value
182
+ }
183
+ const names = managedNames(set)
184
+ if (names)
185
+ rememberManaged(
186
+ result,
187
+ names.map((name) => HTML_NAMES[name] ?? name),
188
+ )
189
+ return result
190
+ }
191
+
192
+ /**
193
+ * Like `lt.setAttributes` in the main entry point, for the sets from here.
194
+ *
195
+ * A React app reaches the DOM through a `ref`, and then naturally uses `lt`
196
+ * from this entry point. Passed straight to the main entry point's
197
+ * `setAttributes`, `className` became the attribute `classname`, and the
198
+ * cleanup did not find the builder function behind the set. Here the names
199
+ * are translated back first.
200
+ */
201
+ export function setAttributes(
202
+ element: Element | null | undefined,
203
+ ...sets: ReactSet[]
204
+ ): void {
205
+ setHtmlAttributes(element, ...sets.map((set) => toHtmlAttributes(set)))
206
+ }
207
+
208
+ /**
209
+ * Wraps a builder function so the return value gets the React names.
210
+ *
211
+ * The signature is written as an intersection type so TypeScript can infer
212
+ * both the options type and the extra fields attached to the function, that
213
+ * is `variants`, `isVariant` and the others, in one go.
214
+ */
215
+ function forReact<Options, Result extends Record<string, unknown>, Extra>(
216
+ fn: ((options?: Options) => Result) & Extra,
217
+ ): ((options?: Options) => ReactAttributes<Result>) & Extra {
218
+ const wrapped = (options?: Options) => toReactAttributes(fn(options))
219
+ return Object.assign(wrapped, fn)
220
+ }
221
+
222
+ /**
223
+ * Re-exported from the main entry point.
224
+ *
225
+ * `field.mdx` points to it in a section that tells the reader to import from
226
+ * `@lo-tek/interfaces/react`, and without this a React consumer who follows
227
+ * the advice gets "createFieldId is not exported". It is safe only when the
228
+ * markup is rendered once; in a React component `useId()` is the answer,
229
+ * also in an app without a server.
230
+ */
231
+ export { createFieldId }
232
+
233
+ export const lt = {
234
+ accordion: forReact(accordion),
235
+ alert: forReact(alert),
236
+ avatar: forReact(avatar),
237
+ badge: forReact(badge),
238
+ breadcrumbs: forReact(breadcrumbs),
239
+ button: forReact(button),
240
+ card: forReact(card),
241
+ checkbox: forReact(checkbox),
242
+ divider: forReact(divider),
243
+ errorText: forReact(errorText),
244
+ fieldset: forReact(fieldset),
245
+ heading: forReact(heading),
246
+ fileUpload: forReact(fileUpload),
247
+ helpText: forReact(helpText),
248
+ icon: forReact(icon),
249
+ input: forReact(input),
250
+ label: forReact(label),
251
+ legend: forReact(legend),
252
+ link: forReact(link),
253
+ list: forReact(list),
254
+ pagination: forReact(pagination),
255
+ paragraph: forReact(paragraph),
256
+ radio: forReact(radio),
257
+ search: forReact(search),
258
+ select: forReact(select),
259
+ skeleton: forReact(skeleton),
260
+ skipLink: forReact(skipLink),
261
+ progress: forReact(progress),
262
+ spinner: forReact(spinner),
263
+ srOnly: forReact(srOnly),
264
+ switch: forReact(switchControl),
265
+ toggleGroup: forReact(toggleGroup),
266
+ tooltip: forReact(tooltip),
267
+ table: forReact(table),
268
+ tableSort: Object.assign(
269
+ (options?: Parameters<typeof tableSort>[0]) => {
270
+ const built = tableSort(options)
271
+ return {
272
+ header: built.header,
273
+ button: toReactAttributes(built.button),
274
+ }
275
+ },
276
+ { isDirection: tableSort.isDirection },
277
+ ),
278
+ tag: forReact(tag),
279
+ textarea: forReact(textarea),
280
+
281
+ /**
282
+ * Wires a whole field, with `className` and `htmlFor` on the label.
283
+ *
284
+ * `control`, `help` and `error` have no keys that need renaming, and are
285
+ * therefore the same in both entry points.
286
+ */
287
+ field: (options: FieldOptions) => {
288
+ const field = computeFieldAttributes(options)
289
+ return { ...field, label: toReactAttributes(field.label) }
290
+ },
291
+
292
+ /**
293
+ * The compound builder functions return one attribute set per element,
294
+ * and each set must be renamed on its own. `host` has `tabindex`, and the
295
+ * panels in `lt.tabs()` have both `tabindex` and `class`.
296
+ */
297
+ errorSummary: (options: Parameters<typeof errorSummary>[0] = {}) => {
298
+ const built = errorSummary(options)
299
+ return {
300
+ host: toReactAttributes(built.host),
301
+ title: toReactAttributes(built.title),
302
+ }
303
+ },
304
+
305
+ dialog: Object.assign(
306
+ (options: Parameters<typeof dialog>[0]) => {
307
+ const built = dialog(options)
308
+ return {
309
+ host: built.host,
310
+ dialog: toReactAttributes(built.dialog),
311
+ header: toReactAttributes(built.header),
312
+ title: toReactAttributes(built.title),
313
+ subtitle: toReactAttributes(built.subtitle),
314
+ body: toReactAttributes(built.body),
315
+ footer: toReactAttributes(built.footer),
316
+ }
317
+ },
318
+ {
319
+ dialog: dialog.dialog,
320
+ header: dialog.header,
321
+ title: dialog.title,
322
+ subtitle: dialog.subtitle,
323
+ body: dialog.body,
324
+ footer: dialog.footer,
325
+ colors: dialog.colors,
326
+ isColor: dialog.isColor,
327
+ },
328
+ ),
329
+
330
+ popover: Object.assign(
331
+ (options: Parameters<typeof popover>[0]) => {
332
+ const built = popover(options)
333
+ return {
334
+ host: built.host,
335
+ trigger: toReactAttributes(built.trigger),
336
+ panel: toReactAttributes(built.panel),
337
+ }
338
+ },
339
+ { isPlacement: popover.isPlacement },
340
+ ),
341
+
342
+ /**
343
+ * The whole state, not just the links: React reports a mismatch for every
344
+ * attribute the component writes on an element React has rendered. See
345
+ * `tabsWithState`.
346
+ */
347
+ tabs: (options: TabsWithStateOptions) => {
348
+ const built = tabsWithState(options)
349
+ return {
350
+ list: toReactAttributes(built.list),
351
+ item: toReactAttributes(built.item),
352
+ tabs: built.tabs.map(toReactAttributes),
353
+ panels: built.panels.map(toReactAttributes),
354
+ }
355
+ },
356
+
357
+ suggestion: (options: Parameters<typeof suggestion>[0]) => {
358
+ const built = suggestion(options)
359
+ return {
360
+ ...built,
361
+ label: toReactAttributes(built.label),
362
+ control: toReactAttributes(built.control),
363
+ list: toReactAttributes(built.list),
364
+ options: built.options.map(toReactAttributes),
365
+ empty: toReactAttributes(built.empty),
366
+ status: toReactAttributes(built.status),
367
+ value: toReactAttributes(built.value),
368
+ }
369
+ },
370
+
371
+ toast: (options: Parameters<typeof toast>[0] = {}) => {
372
+ const built = toast(options)
373
+ return {
374
+ host: toReactAttributes(built.host),
375
+ message: toReactAttributes(built.message),
376
+ close: toReactAttributes(built.close),
377
+ }
378
+ },
379
+
380
+ sessionTimeout: Object.assign(
381
+ (options: Parameters<typeof sessionTimeout>[0]) => {
382
+ const built = sessionTimeout(options)
383
+ return {
384
+ host: toReactAttributes(built.host),
385
+ dialog: toReactAttributes(built.dialog),
386
+ title: toReactAttributes(built.title),
387
+ text: toReactAttributes(built.text),
388
+ count: toReactAttributes(built.count),
389
+ live: toReactAttributes(built.live),
390
+ actions: toReactAttributes(built.actions),
391
+ extend: toReactAttributes(built.extend),
392
+ logout: toReactAttributes(built.logout),
393
+ }
394
+ },
395
+ {
396
+ dialog: sessionTimeout.dialog,
397
+ title: sessionTimeout.title,
398
+ text: sessionTimeout.text,
399
+ count: sessionTimeout.count,
400
+ actions: sessionTimeout.actions,
401
+ },
402
+ ),
403
+ connectionStatus: forReact(connectionStatus),
404
+
405
+ setAttributes,
406
+
407
+ states: fieldStates,
408
+ isState: isFieldState,
409
+ markers: requiredMarkers,
410
+ isMarker: isRequiredMarker,
411
+ } as const
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Registers all the web components in one call.
3
+ *
4
+ * Each component has its own `defineLt*`, and an app that only uses the field
5
+ * can settle for `defineLtField()` and keep the rest out of its bundle. But
6
+ * most apps use several, and a demo app had seven calls in a `useEffect`,
7
+ * that is, after the first paint. Then the elements in the markup are plain
8
+ * `HTMLElement`s when React paints them, and the first call to
9
+ * `reportSuccess()` came before the effect. One call, at import, closes the
10
+ * gap.
11
+ *
12
+ * Like the individual functions, it does nothing on a server, so it can sit
13
+ * at the top of a module that runs in both places.
14
+ */
15
+
16
+ import { defineLtDialog } from "./components/frame/dialog/lt-dialog.js"
17
+ import { defineLtErrorSummary } from "./components/frame/error-summary/lt-error-summary.js"
18
+ import { defineLtField } from "./components/frame/field/lt-field.js"
19
+ import { defineLtPopover } from "./components/frame/popover/lt-popover.js"
20
+ import { defineLtSessionTimeout } from "./components/frame/session-timeout/lt-session-timeout.js"
21
+ import { defineLtSuggestion } from "./components/frame/suggestion/lt-suggestion.js"
22
+ import { defineLtTabs } from "./components/frame/tabs/lt-tabs.js"
23
+ import { defineLtConnectionStatus } from "./components/standalone/connection-status/lt-connection-status.js"
24
+ import { defineLtToast } from "./components/standalone/toast/lt-toast.js"
25
+
26
+ // The types of the events and tag names, so `querySelector("lt-dialog")` and
27
+ // `addEventListener` are typed also for someone who only imports this entry
28
+ // point. Without the line the imports above disappeared from the `.d.ts`
29
+ // file, and neither `HTMLElementEventMap` nor `HTMLElementTagNameMap` was
30
+ // extended.
31
+ export type { LtEventMap } from "./components/events.js"
32
+
33
+ export function defineLt(): void {
34
+ defineLtField()
35
+ defineLtTabs()
36
+ defineLtErrorSummary()
37
+ defineLtPopover()
38
+ defineLtSuggestion()
39
+ defineLtDialog()
40
+ defineLtToast()
41
+ defineLtSessionTimeout()
42
+ defineLtConnectionStatus()
43
+ }
@@ -0,0 +1,169 @@
1
+ /* Generated. Edit tokens.ts or generate-tailwind.ts, not this file. */
2
+
3
+ /*
4
+ * LO-TEK's values as a Tailwind theme.
5
+ *
6
+ * The file is plain CSS, and the package has no dependency on Tailwind. It
7
+ * is the Tailwind version in your app that reads it, so two versions cannot
8
+ * conflict: there is no other one here.
9
+ *
10
+ * Requires Tailwind 4 and `tokens.css` to be loaded, since the values point there.
11
+ *
12
+ * ```css
13
+ * @layer theme, base, lotek, lotek-theme, components, utilities;
14
+ *
15
+ * @import "tailwindcss";
16
+ * @import "@lo-tek/interfaces/tokens.css";
17
+ * @import "@lo-tek/interfaces/tailwind.css";
18
+ * ```
19
+ *
20
+ * The order of the first line matters. Layers count in the order they are
21
+ * first mentioned, and the winner is the last layer, whatever the
22
+ * specificity. With `lotek` before `base`, Tailwind's Preflight beats our
23
+ * components and resets, for example, the background of a button. With it
24
+ * after `utilities`, our components beat `p-6` and the rest of your
25
+ * classes. Between `base` and `components` is the only place both work.
26
+ *
27
+ * `lotek-theme` is the layer a theme from `lotek theme` goes in. It must be
28
+ * in the line even if you have no theme yet: the theme declares only
29
+ * `lotek, lotek-theme`, and an `@layer` statement does not move layers that
30
+ * are already declared, so without the place here the theme ends up last,
31
+ * after `utilities`, and beats your classes.
32
+ *
33
+ * Everything we add is called `lt-`, like the other classes in the system.
34
+ * That way we leave Tailwind's own values alone: `bg-neutral-100` still
35
+ * means the same.
36
+ */
37
+
38
+ @theme inline {
39
+ /*
40
+ * The spacing unit. Tailwind computes `p-4` as `calc(var(--spacing) * 4)`,
41
+ * so with `--lt-spacing-1` as the unit, `p-4` is four times the unit, that
42
+ * is, `--lt-spacing-4` as long as the scale stays as it is. The steps are
43
+ * values of their own, not computed from the unit: if you rewrite the
44
+ * scale, rewrite every step, not only `--lt-spacing-1`, or the components
45
+ * and the classes drift apart.
46
+ */
47
+ --spacing: var(--lt-spacing-1);
48
+
49
+ /* The colours, one class per cell in the matrix */
50
+ --color-lt-accent-border: var(--lt-color-accent-border);
51
+ --color-lt-accent-border-strong: var(--lt-color-accent-border-strong);
52
+ --color-lt-accent-border-subtle: var(--lt-color-accent-border-subtle);
53
+ --color-lt-accent-content: var(--lt-color-accent-content);
54
+ --color-lt-accent-fill: var(--lt-color-accent-fill);
55
+ --color-lt-accent-surface: var(--lt-color-accent-surface);
56
+ --color-lt-accent-text: var(--lt-color-accent-text);
57
+ --color-lt-accent-text-strong: var(--lt-color-accent-text-strong);
58
+ --color-lt-accent-text-subtle: var(--lt-color-accent-text-subtle);
59
+
60
+ --color-lt-brand1-border: var(--lt-color-brand1-border);
61
+ --color-lt-brand1-border-strong: var(--lt-color-brand1-border-strong);
62
+ --color-lt-brand1-border-subtle: var(--lt-color-brand1-border-subtle);
63
+ --color-lt-brand1-content: var(--lt-color-brand1-content);
64
+ --color-lt-brand1-fill: var(--lt-color-brand1-fill);
65
+ --color-lt-brand1-surface: var(--lt-color-brand1-surface);
66
+ --color-lt-brand1-text: var(--lt-color-brand1-text);
67
+ --color-lt-brand1-text-strong: var(--lt-color-brand1-text-strong);
68
+ --color-lt-brand1-text-subtle: var(--lt-color-brand1-text-subtle);
69
+
70
+ --color-lt-brand2-border: var(--lt-color-brand2-border);
71
+ --color-lt-brand2-border-strong: var(--lt-color-brand2-border-strong);
72
+ --color-lt-brand2-border-subtle: var(--lt-color-brand2-border-subtle);
73
+ --color-lt-brand2-content: var(--lt-color-brand2-content);
74
+ --color-lt-brand2-fill: var(--lt-color-brand2-fill);
75
+ --color-lt-brand2-surface: var(--lt-color-brand2-surface);
76
+ --color-lt-brand2-text: var(--lt-color-brand2-text);
77
+ --color-lt-brand2-text-strong: var(--lt-color-brand2-text-strong);
78
+ --color-lt-brand2-text-subtle: var(--lt-color-brand2-text-subtle);
79
+
80
+ --color-lt-brand3-border: var(--lt-color-brand3-border);
81
+ --color-lt-brand3-border-strong: var(--lt-color-brand3-border-strong);
82
+ --color-lt-brand3-border-subtle: var(--lt-color-brand3-border-subtle);
83
+ --color-lt-brand3-content: var(--lt-color-brand3-content);
84
+ --color-lt-brand3-fill: var(--lt-color-brand3-fill);
85
+ --color-lt-brand3-surface: var(--lt-color-brand3-surface);
86
+ --color-lt-brand3-text: var(--lt-color-brand3-text);
87
+ --color-lt-brand3-text-strong: var(--lt-color-brand3-text-strong);
88
+ --color-lt-brand3-text-subtle: var(--lt-color-brand3-text-subtle);
89
+
90
+ --color-lt-danger-border: var(--lt-color-danger-border);
91
+ --color-lt-danger-border-strong: var(--lt-color-danger-border-strong);
92
+ --color-lt-danger-border-subtle: var(--lt-color-danger-border-subtle);
93
+ --color-lt-danger-content: var(--lt-color-danger-content);
94
+ --color-lt-danger-fill: var(--lt-color-danger-fill);
95
+ --color-lt-danger-surface: var(--lt-color-danger-surface);
96
+ --color-lt-danger-text: var(--lt-color-danger-text);
97
+ --color-lt-danger-text-strong: var(--lt-color-danger-text-strong);
98
+ --color-lt-danger-text-subtle: var(--lt-color-danger-text-subtle);
99
+
100
+ --color-lt-disabled-surface: var(--lt-color-disabled-surface);
101
+ --color-lt-disabled-text: var(--lt-color-disabled-text);
102
+
103
+ --color-lt-neutral-border: var(--lt-color-neutral-border);
104
+ --color-lt-neutral-border-strong: var(--lt-color-neutral-border-strong);
105
+ --color-lt-neutral-border-subtle: var(--lt-color-neutral-border-subtle);
106
+ --color-lt-neutral-canvas: var(--lt-color-neutral-canvas);
107
+ --color-lt-neutral-content: var(--lt-color-neutral-content);
108
+ --color-lt-neutral-fill: var(--lt-color-neutral-fill);
109
+ --color-lt-neutral-raised: var(--lt-color-neutral-raised);
110
+ --color-lt-neutral-surface: var(--lt-color-neutral-surface);
111
+ --color-lt-neutral-text: var(--lt-color-neutral-text);
112
+ --color-lt-neutral-text-strong: var(--lt-color-neutral-text-strong);
113
+ --color-lt-neutral-text-subtle: var(--lt-color-neutral-text-subtle);
114
+
115
+ --color-lt-overlay: var(--lt-color-overlay);
116
+
117
+ --color-lt-success-border: var(--lt-color-success-border);
118
+ --color-lt-success-border-strong: var(--lt-color-success-border-strong);
119
+ --color-lt-success-border-subtle: var(--lt-color-success-border-subtle);
120
+ --color-lt-success-content: var(--lt-color-success-content);
121
+ --color-lt-success-fill: var(--lt-color-success-fill);
122
+ --color-lt-success-surface: var(--lt-color-success-surface);
123
+ --color-lt-success-text: var(--lt-color-success-text);
124
+ --color-lt-success-text-strong: var(--lt-color-success-text-strong);
125
+ --color-lt-success-text-subtle: var(--lt-color-success-text-subtle);
126
+
127
+ --color-lt-visited-border: var(--lt-color-visited-border);
128
+ --color-lt-visited-border-strong: var(--lt-color-visited-border-strong);
129
+ --color-lt-visited-border-subtle: var(--lt-color-visited-border-subtle);
130
+ --color-lt-visited-content: var(--lt-color-visited-content);
131
+ --color-lt-visited-fill: var(--lt-color-visited-fill);
132
+ --color-lt-visited-surface: var(--lt-color-visited-surface);
133
+ --color-lt-visited-text: var(--lt-color-visited-text);
134
+ --color-lt-visited-text-strong: var(--lt-color-visited-text-strong);
135
+ --color-lt-visited-text-subtle: var(--lt-color-visited-text-subtle);
136
+
137
+ --color-lt-warning-border: var(--lt-color-warning-border);
138
+ --color-lt-warning-border-strong: var(--lt-color-warning-border-strong);
139
+ --color-lt-warning-border-subtle: var(--lt-color-warning-border-subtle);
140
+ --color-lt-warning-content: var(--lt-color-warning-content);
141
+ --color-lt-warning-fill: var(--lt-color-warning-fill);
142
+ --color-lt-warning-surface: var(--lt-color-warning-surface);
143
+ --color-lt-warning-text: var(--lt-color-warning-text);
144
+ --color-lt-warning-text-strong: var(--lt-color-warning-text-strong);
145
+ --color-lt-warning-text-subtle: var(--lt-color-warning-text-subtle);
146
+
147
+ /* Text sizes */
148
+ --text-lt-xxs: var(--lt-font-size-xxs);
149
+ --text-lt-xs: var(--lt-font-size-xs);
150
+ --text-lt-s: var(--lt-font-size-s);
151
+ --text-lt-m: var(--lt-font-size-m);
152
+ --text-lt-l: var(--lt-font-size-l);
153
+ --text-lt-xl: var(--lt-font-size-xl);
154
+ --text-lt-xxl: var(--lt-font-size-xxl);
155
+ --text-lt-mega: var(--lt-font-size-mega);
156
+
157
+ /* Widths for page layout */
158
+ --container-lt-xs: 100%;
159
+ --container-lt-sm: 576px;
160
+ --container-lt-md: 960px;
161
+ --container-lt-lg: 1152px;
162
+ --container-lt-xl: 1536px;
163
+ --container-lt-aside: 384px;
164
+ --container-lt-aside-narrow: 288px;
165
+ --container-lt-wide-content: 768px;
166
+
167
+ /* The shadow under surfaces that sit above the page */
168
+ --shadow-lt-overlay: var(--lt-shadow-overlay);
169
+ }