@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/dist/dom.js ADDED
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Applying the attributes to an element in the plain DOM.
3
+ *
4
+ * In JSX you spread the object straight onto the element. Without JSX you
5
+ * would have to loop through it yourself, and take care to remove attributes
6
+ * from the previous state. When a field goes from invalid to valid, the
7
+ * builder function leaves out `data-state`, and a `setAttribute` alone would
8
+ * have left the old value in place.
9
+ */
10
+ import { managedNames } from "./components/css/shared.js";
11
+ /**
12
+ * What gets cleaned up for a set without a builder function behind it.
13
+ *
14
+ * A handwritten or spread set is not in the map of what it manages, and then
15
+ * the `data-*` names are the only ones the function can safely remove: they
16
+ * belong to the system. A set straight from a builder function does not use
17
+ * this list. It cleans up exactly what the builder function manages, so
18
+ * `lt.popover().trigger` on a secondary button leaves `data-variant` alone.
19
+ */
20
+ const SAFE_FOR_UNKNOWN = [
21
+ "data-variant",
22
+ "data-state",
23
+ "data-color",
24
+ "data-size",
25
+ "data-picker",
26
+ "data-required",
27
+ "data-optional",
28
+ "data-interactive",
29
+ "data-hoverable",
30
+ "data-selectable",
31
+ "data-autofocus",
32
+ ];
33
+ /**
34
+ * Names that are never removed, not even when the builder function manages
35
+ * them.
36
+ *
37
+ * `id` and `for` are connections other elements point to. `lt.errorSummary()`
38
+ * takes an optional `id`, and a call without it removed the id the consumer
39
+ * had written on the box: every link and every `aria-*` pointing there broke.
40
+ */
41
+ const NEVER_REMOVED = ["id", "for"];
42
+ let warnedAboutUnknownSet = false;
43
+ /** The classes that belong to the system. The consumer's classes are kept. */
44
+ const IS_SYSTEM_CLASS = /^lt-/;
45
+ /**
46
+ * Sets the attributes from an `lt` function on an element.
47
+ *
48
+ * ```ts
49
+ * import { lt } from "@lo-tek/interfaces"
50
+ *
51
+ * const field = document.querySelector("input")
52
+ * lt.setAttributes(field, lt.input({ type: "email", state: "invalid" }))
53
+ * ```
54
+ *
55
+ * Call it again to change state. What the builder function manages and is
56
+ * not in the new set is removed, and the `lt-` classes are replaced. A
57
+ * builder function manages the attributes it has an option for:
58
+ * `lt.spinner()` has `label`, and so manages `role` and `aria-label`. What it
59
+ * has no option for stays as it is: `lt.button()` has never written
60
+ * `disabled`, so a disabled button is still disabled afterwards. `id` and
61
+ * `for` are never removed.
62
+ *
63
+ * When two sets go on the same element, pass them separately, not spread
64
+ * together:
65
+ *
66
+ * ```ts
67
+ * lt.setAttributes(field, lt.input({ type: "email" }), wiring.control)
68
+ * ```
69
+ *
70
+ * A spread object is a new object, and then the function does not know which
71
+ * builder function it came from. It is set correctly, but only `data-*` is
72
+ * cleaned up. An explicit `false` in a handwritten set removes the attribute.
73
+ *
74
+ * It accepts `null`, and then does nothing. `document.querySelector()`
75
+ * returns `Element | null`, so without that every call site in a `strict` app
76
+ * would need a guard or an exclamation mark around a lookup that almost
77
+ * always succeeds. It is the same trade-off as `element?.classList`.
78
+ */
79
+ export function setAttributes(element, ...sets) {
80
+ if (!element || sets.length === 0)
81
+ return;
82
+ const merged = {};
83
+ const removable = new Set();
84
+ const classes = [];
85
+ for (const set of sets) {
86
+ const names = managedNames(set);
87
+ if (names) {
88
+ for (const name of names)
89
+ removable.add(name);
90
+ }
91
+ else {
92
+ for (const name of SAFE_FOR_UNKNOWN)
93
+ removable.add(name);
94
+ warnAboutUnknownSet(set);
95
+ }
96
+ for (const [name, value] of Object.entries(set)) {
97
+ if (name === "class") {
98
+ if (typeof value === "string")
99
+ classes.push(...value.split(/\s+/));
100
+ }
101
+ else if (value === false) {
102
+ // An explicit `false` in a handwritten set is a request.
103
+ merged[name] = false;
104
+ removable.add(name);
105
+ }
106
+ else if (value !== undefined) {
107
+ // `undefined` does not override an earlier set: the builder functions
108
+ // drop such keys themselves, and a handwritten set must not be able to
109
+ // take `aria-invalid` from `lt.input()` by naming it without a value.
110
+ merged[name] = value;
111
+ }
112
+ }
113
+ }
114
+ for (const name of NEVER_REMOVED)
115
+ removable.delete(name);
116
+ if (classes.length > 0) {
117
+ const ownClasses = [...element.classList].filter((token) => !IS_SYSTEM_CLASS.test(token));
118
+ // `setAttribute` and not `className`: on an `<svg>`, `className` is a
119
+ // read-only `SVGAnimatedString`, and `lt.icon()` belongs on an svg.
120
+ element.setAttribute("class", [...new Set([...classes, ...ownClasses])].filter(Boolean).join(" "));
121
+ }
122
+ for (const name of removable) {
123
+ if (name === "class")
124
+ continue;
125
+ setOrRemove(element, name, merged[name]);
126
+ }
127
+ for (const [name, value] of Object.entries(merged)) {
128
+ if (removable.has(name))
129
+ continue;
130
+ if (value === undefined || value === false)
131
+ continue;
132
+ element.setAttribute(name, value === true ? "" : value);
133
+ }
134
+ }
135
+ /**
136
+ * Warns, once, about a set that looks like two spread together.
137
+ *
138
+ * `{ ...lt.input(), ...field.control }` is set correctly, but is a new object
139
+ * without a builder function behind it. The next call then does not remove
140
+ * `aria-invalid` when the field becomes valid, and nothing else would have
141
+ * said so.
142
+ */
143
+ function warnAboutUnknownSet(set) {
144
+ if (warnedAboutUnknownSet)
145
+ return;
146
+ if (typeof set.class !== "string" || !/(^|\s)lt-/.test(set.class))
147
+ return;
148
+ warnedAboutUnknownSet = true;
149
+ console.warn("lt.setAttributes(): the set does not come straight from a builder " +
150
+ "function, so only the data attributes are cleaned up. Pass the sets " +
151
+ "separately instead of spreading them: " +
152
+ "lt.setAttributes(element, lt.input(), field.control).");
153
+ }
154
+ function setOrRemove(element, name, value) {
155
+ if (value === undefined || value === false) {
156
+ element.removeAttribute(name);
157
+ }
158
+ else {
159
+ element.setAttribute(name, value === true ? "" : value);
160
+ }
161
+ }
162
+ //# sourceMappingURL=dom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.js","sourceRoot":"","sources":["../src/dom.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,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,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAQ;QACjC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK;YAAE,SAAQ;QACpD,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACzD,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,GAAe;IAC1C,IAAI,qBAAqB;QAAE,OAAM;IACjC,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAM;IACzE,qBAAqB,GAAG,IAAI,CAAA;IAC5B,OAAO,CAAC,IAAI,CACV,oEAAoE;QAClE,sEAAsE;QACtE,wCAAwC;QACxC,uDAAuD,CAC1D,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAClB,OAAgB,EAChB,IAAY,EACZ,KAAmC;IAEnC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QAC3C,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,97 @@
1
+ export type { AccordionAttributes, AccordionOptions, AccordionVariant, } from "./components/css/accordion/accordion.js";
2
+ export { accordion } from "./components/css/accordion/accordion.js";
3
+ export type { AlertAttributes, AlertColor, AlertOptions, } from "./components/css/alert/alert.js";
4
+ export { alert } from "./components/css/alert/alert.js";
5
+ export type { AvatarAttributes, AvatarOptions, AvatarSize, AvatarVariant, } from "./components/css/avatar/avatar.js";
6
+ export { avatar } from "./components/css/avatar/avatar.js";
7
+ export type { BadgeAttributes, BadgeColor, BadgeOptions, } from "./components/css/badge/badge.js";
8
+ export { badge } from "./components/css/badge/badge.js";
9
+ export type { BreadcrumbsAttributes } from "./components/css/breadcrumbs/breadcrumbs.js";
10
+ export { breadcrumbs } from "./components/css/breadcrumbs/breadcrumbs.js";
11
+ export type { ButtonAttributes, ButtonOptions, ButtonVariant, } from "./components/css/button/button.js";
12
+ export { button } from "./components/css/button/button.js";
13
+ export type { CardAttributes, CardOptions, CardVariant, } from "./components/css/card/card.js";
14
+ export { card } from "./components/css/card/card.js";
15
+ export type { CheckboxAttributes, CheckboxOptions, } from "./components/css/checkbox/checkbox.js";
16
+ export { checkbox } from "./components/css/checkbox/checkbox.js";
17
+ export type { DividerAttributes, DividerOptions, DividerVariant, } from "./components/css/divider/divider.js";
18
+ export { divider } from "./components/css/divider/divider.js";
19
+ export type { ErrorTextAttributes, ErrorTextOptions, ErrorTextVariant, } from "./components/css/error-text/error-text.js";
20
+ export { errorText } from "./components/css/error-text/error-text.js";
21
+ export type { FieldsetAttributes, FieldsetOptions, LegendAttributes, LegendOptions, } from "./components/css/fieldset/fieldset.js";
22
+ export { fieldset, legend } from "./components/css/fieldset/fieldset.js";
23
+ export type { FileUploadAttributes, FileUploadOptions, } from "./components/css/file-upload/file-upload.js";
24
+ export { fileUpload } from "./components/css/file-upload/file-upload.js";
25
+ export type { HeadingAttributes, HeadingOptions, HeadingSize, } from "./components/css/heading/heading.js";
26
+ export { heading } from "./components/css/heading/heading.js";
27
+ export type { HelpTextAttributes, HelpTextOptions, HelpTextVariant, } from "./components/css/help-text/help-text.js";
28
+ export { helpText } from "./components/css/help-text/help-text.js";
29
+ export type { IconAttributes, IconOptions, } from "./components/css/icon/icon.js";
30
+ export { icon } from "./components/css/icon/icon.js";
31
+ export type { InputAttributes, InputOptions, InputType, } from "./components/css/input/input.js";
32
+ export { input } from "./components/css/input/input.js";
33
+ export type { LabelAttributes, LabelOptions, } from "./components/css/label/label.js";
34
+ export { label } from "./components/css/label/label.js";
35
+ export type { LinkAttributes, LinkOptions } from "./components/css/link/link.js";
36
+ export { link } from "./components/css/link/link.js";
37
+ export type { ListAttributes, ListOptions, ListVariant, } from "./components/css/list/list.js";
38
+ export { list } from "./components/css/list/list.js";
39
+ export type { PaginationAttributes } from "./components/css/pagination/pagination.js";
40
+ export { pagination } from "./components/css/pagination/pagination.js";
41
+ export type { ParagraphAttributes, ParagraphOptions, ParagraphSize, ParagraphVariant, } from "./components/css/paragraph/paragraph.js";
42
+ export { paragraph } from "./components/css/paragraph/paragraph.js";
43
+ export type { ProgressAttributes, ProgressColor, ProgressOptions, } from "./components/css/progress/progress.js";
44
+ export { progress } from "./components/css/progress/progress.js";
45
+ export type { RadioAttributes, RadioOptions, } from "./components/css/radio/radio.js";
46
+ export { radio } from "./components/css/radio/radio.js";
47
+ export type { SearchAttributes, SearchOptions, } from "./components/css/search/search.js";
48
+ export { search } from "./components/css/search/search.js";
49
+ export type { NonDefaultSelectPicker, SelectAttributes, SelectOptions, SelectPicker, } from "./components/css/select/select.js";
50
+ export { isSelectPicker, select, selectPickers, } from "./components/css/select/select.js";
51
+ export * from "./components/css/shared.js";
52
+ export type { SkeletonAttributes, SkeletonOptions, SkeletonVariant, } from "./components/css/skeleton/skeleton.js";
53
+ export { skeleton } from "./components/css/skeleton/skeleton.js";
54
+ export type { SkipLinkAttributes } from "./components/css/skip-link/skip-link.js";
55
+ export { skipLink } from "./components/css/skip-link/skip-link.js";
56
+ export type { SpinnerAttributes, SpinnerOptions, SpinnerSize, } from "./components/css/spinner/spinner.js";
57
+ export { spinner } from "./components/css/spinner/spinner.js";
58
+ export type { SrOnlyAttributes } from "./components/css/sr-only/sr-only.js";
59
+ export { srOnly } from "./components/css/sr-only/sr-only.js";
60
+ export type { SwitchAttributes, SwitchOptions, } from "./components/css/switch/switch.js";
61
+ export { switchControl } from "./components/css/switch/switch.js";
62
+ export type { TableAttributes, TableOptions, TableSortAttributes, TableSortDirection, TableSortOptions, TableVariant, } from "./components/css/table/table.js";
63
+ export { table, tableSort, tableSortDirections, } from "./components/css/table/table.js";
64
+ export type { TagAttributes, TagOptions, TagVariant, } from "./components/css/tag/tag.js";
65
+ export { tag } from "./components/css/tag/tag.js";
66
+ export type { TextareaAttributes, TextareaOptions, } from "./components/css/textarea/textarea.js";
67
+ export { textarea } from "./components/css/textarea/textarea.js";
68
+ export type { ToggleGroupAttributes } from "./components/css/toggle-group/toggle-group.js";
69
+ export { toggleGroup } from "./components/css/toggle-group/toggle-group.js";
70
+ export type { TooltipAttributes } from "./components/css/tooltip/tooltip.js";
71
+ export { tooltip } from "./components/css/tooltip/tooltip.js";
72
+ export type { LtEventMap } from "./components/events.js";
73
+ export type { DialogAttributes, DialogOptions, } from "./components/frame/dialog/dialog.js";
74
+ export { dialog } from "./components/frame/dialog/dialog.js";
75
+ export * from "./components/frame/dialog/lt-dialog.js";
76
+ export * from "./components/frame/error-summary/error-summary.js";
77
+ export * from "./components/frame/error-summary/lt-error-summary.js";
78
+ export * from "./components/frame/field/field-core.js";
79
+ export * from "./components/frame/field/lt-field.js";
80
+ export * from "./components/frame/popover/lt-popover.js";
81
+ export * from "./components/frame/popover/popover.js";
82
+ export * from "./components/frame/session-timeout/lt-session-timeout.js";
83
+ export * from "./components/frame/session-timeout/session-timeout.js";
84
+ export * from "./components/frame/suggestion/lt-suggestion.js";
85
+ export * from "./components/frame/suggestion/suggestion.js";
86
+ export * from "./components/frame/tabs/lt-tabs.js";
87
+ export * from "./components/frame/tabs/tabs.js";
88
+ export * from "./components/standalone/connection-status/connection-status.js";
89
+ export * from "./components/standalone/connection-status/lt-connection-status.js";
90
+ export * from "./components/standalone/toast/lt-toast.js";
91
+ export * from "./components/standalone/toast/toast.js";
92
+ export type { Attributes } from "./dom.js";
93
+ export { setAttributes } from "./dom.js";
94
+ export type { Lt } from "./lt.js";
95
+ export { lt } from "./lt.js";
96
+ export * from "./tokens/tokens.js";
97
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,YAAY,EACV,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvD,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,YAAY,EACV,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvD,YAAY,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAA;AACzE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,YAAY,EACV,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAA;AACpD,YAAY,EACV,kBAAkB,EAClB,eAAe,GAChB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAA;AAChE,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAA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CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gEAAgE,CAAA;AAC9E,cAAc,mEAAmE,CAAA;AACjF,cAAc,2CAA2C,CAAA;AACzD,cAAc,wCAAwC,CAAA;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,YAAY,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,cAAc,oBAAoB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,58 @@
1
+ export { accordion } from "./components/css/accordion/accordion.js";
2
+ export { alert } from "./components/css/alert/alert.js";
3
+ export { avatar } from "./components/css/avatar/avatar.js";
4
+ export { badge } from "./components/css/badge/badge.js";
5
+ export { breadcrumbs } from "./components/css/breadcrumbs/breadcrumbs.js";
6
+ export { button } from "./components/css/button/button.js";
7
+ export { card } from "./components/css/card/card.js";
8
+ export { checkbox } from "./components/css/checkbox/checkbox.js";
9
+ export { divider } from "./components/css/divider/divider.js";
10
+ export { errorText } from "./components/css/error-text/error-text.js";
11
+ export { fieldset, legend } from "./components/css/fieldset/fieldset.js";
12
+ export { fileUpload } from "./components/css/file-upload/file-upload.js";
13
+ export { heading } from "./components/css/heading/heading.js";
14
+ export { helpText } from "./components/css/help-text/help-text.js";
15
+ export { icon } from "./components/css/icon/icon.js";
16
+ export { input } from "./components/css/input/input.js";
17
+ export { label } from "./components/css/label/label.js";
18
+ export { link } from "./components/css/link/link.js";
19
+ export { list } from "./components/css/list/list.js";
20
+ export { pagination } from "./components/css/pagination/pagination.js";
21
+ export { paragraph } from "./components/css/paragraph/paragraph.js";
22
+ export { progress } from "./components/css/progress/progress.js";
23
+ export { radio } from "./components/css/radio/radio.js";
24
+ export { search } from "./components/css/search/search.js";
25
+ export { isSelectPicker, select, selectPickers, } from "./components/css/select/select.js";
26
+ export * from "./components/css/shared.js";
27
+ export { skeleton } from "./components/css/skeleton/skeleton.js";
28
+ export { skipLink } from "./components/css/skip-link/skip-link.js";
29
+ export { spinner } from "./components/css/spinner/spinner.js";
30
+ export { srOnly } from "./components/css/sr-only/sr-only.js";
31
+ export { switchControl } from "./components/css/switch/switch.js";
32
+ export { table, tableSort, tableSortDirections, } from "./components/css/table/table.js";
33
+ export { tag } from "./components/css/tag/tag.js";
34
+ export { textarea } from "./components/css/textarea/textarea.js";
35
+ export { toggleGroup } from "./components/css/toggle-group/toggle-group.js";
36
+ export { tooltip } from "./components/css/tooltip/tooltip.js";
37
+ export { dialog } from "./components/frame/dialog/dialog.js";
38
+ export * from "./components/frame/dialog/lt-dialog.js";
39
+ export * from "./components/frame/error-summary/error-summary.js";
40
+ export * from "./components/frame/error-summary/lt-error-summary.js";
41
+ export * from "./components/frame/field/field-core.js";
42
+ export * from "./components/frame/field/lt-field.js";
43
+ export * from "./components/frame/popover/lt-popover.js";
44
+ export * from "./components/frame/popover/popover.js";
45
+ export * from "./components/frame/session-timeout/lt-session-timeout.js";
46
+ export * from "./components/frame/session-timeout/session-timeout.js";
47
+ export * from "./components/frame/suggestion/lt-suggestion.js";
48
+ export * from "./components/frame/suggestion/suggestion.js";
49
+ export * from "./components/frame/tabs/lt-tabs.js";
50
+ export * from "./components/frame/tabs/tabs.js";
51
+ export * from "./components/standalone/connection-status/connection-status.js";
52
+ export * from "./components/standalone/connection-status/lt-connection-status.js";
53
+ export * from "./components/standalone/toast/lt-toast.js";
54
+ export * from "./components/standalone/toast/toast.js";
55
+ export { setAttributes } from "./dom.js";
56
+ export { lt } from "./lt.js";
57
+ export * from "./tokens/tokens.js";
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAMnE,OAAO,EA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"}
@@ -0,0 +1,180 @@
1
+ import type { HTMLAttributes, RefAttributes } from "react";
2
+ export type { LtEventMap } from "../components/events.js";
3
+ /**
4
+ * Types for the LO-TEK web components in JSX.
5
+ *
6
+ * Without them TypeScript does not know `<lt-field>` at all, and says
7
+ * "Property 'lt-field' does not exist on type JSX.IntrinsicElements". And the
8
+ * attributes are hyphenated strings without completion, so `described-by`
9
+ * and `server-controlled` are exactly where a typo is easy to make and hard
10
+ * to spot.
11
+ *
12
+ * Import once in the project, preferably from a `.d.ts` file so it does not
13
+ * end up in the bundle:
14
+ *
15
+ * ```ts
16
+ * // src/lotek.d.ts
17
+ * import "@lo-tek/interfaces/react-jsx"
18
+ * ```
19
+ *
20
+ * Astro does not need this: there `<lt-field>` is plain HTML, and no type
21
+ * check looks at the element name.
22
+ */
23
+ /**
24
+ * Boolean attributes on web components.
25
+ *
26
+ * The type is `true | undefined`, not `boolean` and not `""`, and that is
27
+ * deliberate. React treats web components differently between versions, and
28
+ * only one pattern is right in both:
29
+ *
30
+ * React 18 sets attributes React 19 sets properties
31
+ * open="" works never open
32
+ * open={true} works works
33
+ * open={false} ALWAYS open works
34
+ * open={undefined} works works
35
+ *
36
+ * React 18 stringifies to `open="false"`. The attribute then exists, and is
37
+ * therefore true. React 19 sets the property to `""`, which is falsy, and
38
+ * the setter in the component removes the attribute again.
39
+ *
40
+ * That is why the builder functions send `true` for a boolean attribute on a
41
+ * host, not the empty string. `data-*` is different: React passes those on
42
+ * as attributes in both versions, and there `""` is the canonical form.
43
+ *
44
+ * When you write it by hand, write `open={isOpen || undefined}`. The type
45
+ * here makes the two other variants compile errors instead of something you
46
+ * have to remember.
47
+ */
48
+ type Flag = true | undefined;
49
+ /**
50
+ * The server decides the state in this element.
51
+ *
52
+ * The components set back what the user has done when a patch tears it away:
53
+ * the selected tab, the open popover, the expanded suggestion list. With this
54
+ * they do not, and each patch decides. Use it when the server should be able
55
+ * to move the tab itself, as in "go on to step 2".
56
+ */
57
+ type ServerControlled = {
58
+ "server-controlled"?: Flag;
59
+ };
60
+ /**
61
+ * The base shape of a web component in JSX.
62
+ *
63
+ * `HTMLAttributes` alone has no `ref`. It is in `RefAttributes`, and without
64
+ * it `<lt-toast ref={queue} />` was a type error, which is exactly the
65
+ * pattern the documentation recommends for calling `.show()` and `.hide()`.
66
+ * `key` comes the same way.
67
+ */
68
+ type Host = HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>;
69
+ type LtFieldAttributes = Host & {
70
+ disabled?: Flag;
71
+ optional?: Flag;
72
+ "described-by"?: string;
73
+ };
74
+ /**
75
+ * `<lt-tabs>` has `server-controlled` and `activation`, and no `selected`.
76
+ *
77
+ * Which tab is selected is in the markup the server sent, as `aria-selected`
78
+ * on the tab and `hidden` on the panels. The component reads it from there
79
+ * instead of keeping a `selected` of its own, so the two can never disagree.
80
+ */
81
+ type LtTabsAttributes = Host & ServerControlled & {
82
+ /**
83
+ * `manual`: the arrow keys only move focus, and Enter or Space selects.
84
+ * Default: the arrow keys select straight away.
85
+ */
86
+ activation?: "manual" | "automatic";
87
+ };
88
+ type LtErrorSummaryAttributes = Host & {
89
+ /**
90
+ * The box is hidden until there are errors to show.
91
+ *
92
+ * `HTMLAttributes` already has `hidden` as `boolean`, but on a web
93
+ * component the rule for `open` applies: React 18 writes `hidden={false}`
94
+ * as the attribute `hidden="false"`, and the box is then always hidden. So
95
+ * the type is `Flag` here too, and `hidden={hasErrors ? undefined : true}`
96
+ * is what compiles. `lt.errorSummary().host` sends it that way.
97
+ */
98
+ hidden?: Flag;
99
+ /**
100
+ * Move focus here when the box appears. Default: on.
101
+ * Set `"false"` to turn it off.
102
+ */
103
+ "data-autofocus"?: "false" | "true";
104
+ };
105
+ type LtSuggestionAttributes = Host & {
106
+ /**
107
+ * Someone else has already filtered, so the component should not.
108
+ *
109
+ * The component hides an option when its text does not contain what is in
110
+ * the field. If you filter on something else, the two disagree, and then
111
+ * your filter should win. A React app that renders only the matches of a
112
+ * search that ignores diacritics is the most common case, alongside a
113
+ * Datastar app where the server sends the list again.
114
+ *
115
+ * The number of matches is announced whoever did the filtering.
116
+ */
117
+ prefiltered?: Flag;
118
+ /** The announcement for zero matches, such as "No matches". */
119
+ "count-none"?: string;
120
+ /** The announcement in the form `Intl.PluralRules` calls `zero`. `{n}` is the number. */
121
+ "count-zero"?: string;
122
+ /** The announcement for one match, such as "{n} match". `{n}` is the number. */
123
+ "count-one"?: string;
124
+ /** The announcement in the form `two`. `{n}` is the number. */
125
+ "count-two"?: string;
126
+ /** The announcement in the form `few`. `{n}` is the number. */
127
+ "count-few"?: string;
128
+ /** The announcement in the form `many`. `{n}` is the number. */
129
+ "count-many"?: string;
130
+ /** The announcement for every other count, and the fallback. `{n}` is the number. */
131
+ "count-other"?: string;
132
+ } & ServerControlled;
133
+ type LtDialogAttributes = Host & ServerControlled & {
134
+ /** The dialog is open. The component calls `showModal()`. */
135
+ open?: Flag;
136
+ };
137
+ type LtPopoverAttributes = Host & ServerControlled & {
138
+ open?: Flag;
139
+ /** Which edge the panel hangs from. */
140
+ placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
141
+ };
142
+ type LtSessionTimeoutAttributes = Host & {
143
+ /** Seconds without activity before the warning appears. */
144
+ "warn-at"?: number | string;
145
+ /** Seconds without activity before the session expires. */
146
+ "expires-at"?: number | string;
147
+ /** Seconds between each `session-activity` while the user is active. */
148
+ "activity-interval"?: number | string;
149
+ };
150
+ type LtConnectionStatusAttributes = Host & {
151
+ /** The text when the connection is lost. */
152
+ "offline-text"?: string;
153
+ /** The text when it comes back. */
154
+ "online-text"?: string;
155
+ };
156
+ type LtToastAttributes = Host & {
157
+ /** Milliseconds before the messages disappear. */
158
+ duration?: number;
159
+ /** Text that says what the region is. */
160
+ label?: string;
161
+ /** The screen reader name of the close button in each message. */
162
+ "close-label"?: string;
163
+ };
164
+ declare module "react" {
165
+ namespace JSX {
166
+ interface IntrinsicElements {
167
+ "lt-dialog": LtDialogAttributes;
168
+ "lt-error-summary": LtErrorSummaryAttributes;
169
+ "lt-field": LtFieldAttributes;
170
+ "lt-popover": LtPopoverAttributes;
171
+ "lt-suggestion": LtSuggestionAttributes;
172
+ "lt-tabs": LtTabsAttributes;
173
+ "lt-session-timeout": LtSessionTimeoutAttributes;
174
+ "lt-connection-status": LtConnectionStatusAttributes;
175
+ "lt-toast": LtToastAttributes;
176
+ }
177
+ }
178
+ }
179
+ export type { LtConnectionStatusAttributes, LtDialogAttributes, LtErrorSummaryAttributes, LtFieldAttributes, LtPopoverAttributes, LtSessionTimeoutAttributes, LtSuggestionAttributes, LtTabsAttributes, LtToastAttributes, };
180
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/jsx/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAM1D,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,KAAK,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;AAE5B;;;;;;;GAOG;AACH,KAAK,gBAAgB,GAAG;IACtB,mBAAmB,CAAC,EAAE,IAAI,CAAA;CAC3B,CAAA;AAED;;;;;;;GAOG;AACH,KAAK,IAAI,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAA;AAEpE,KAAK,iBAAiB,GAAG,IAAI,GAAG;IAC9B,QAAQ,CAAC,EAAE,IAAI,CAAA;IACf,QAAQ,CAAC,EAAE,IAAI,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;GAMG;AACH,KAAK,gBAAgB,GAAG,IAAI,GAC1B,gBAAgB,GAAG;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CACpC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IAAI,GAAG;IACzC,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,KAAK,iBAAiB,GAAG,IAAI,GAAG;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,WAAW,EAAE,kBAAkB,CAAA;YAC/B,kBAAkB,EAAE,wBAAwB,CAAA;YAC5C,UAAU,EAAE,iBAAiB,CAAA;YAC7B,YAAY,EAAE,mBAAmB,CAAA;YACjC,eAAe,EAAE,sBAAsB,CAAA;YACvC,SAAS,EAAE,gBAAgB,CAAA;YAC3B,oBAAoB,EAAE,0BAA0B,CAAA;YAChD,sBAAsB,EAAE,4BAA4B,CAAA;YACpD,UAAU,EAAE,iBAAiB,CAAA;SAC9B;KACF;CACF;AAED,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/jsx/react.ts"],"names":[],"mappings":""}