@lo-tek/interfaces 0.0.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/CHANGELOG.md +3254 -0
  2. package/LICENSE +21 -0
  3. package/README.md +128 -1
  4. package/agent/astro.md +400 -0
  5. package/agent/bundles.md +429 -0
  6. package/agent/datastar.md +409 -0
  7. package/agent/html.md +388 -0
  8. package/agent/react.md +440 -0
  9. package/agent/templates.md +472 -0
  10. package/core/lotek-core.wasm +0 -0
  11. package/core/lotek.wasm +0 -0
  12. package/dist/cli.d.ts +12 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +14 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/components/css/accordion/accordion.d.ts +37 -0
  17. package/dist/components/css/accordion/accordion.d.ts.map +1 -0
  18. package/dist/components/css/accordion/accordion.js +31 -0
  19. package/dist/components/css/accordion/accordion.js.map +1 -0
  20. package/dist/components/css/alert/alert.d.ts +35 -0
  21. package/dist/components/css/alert/alert.d.ts.map +1 -0
  22. package/dist/components/css/alert/alert.js +29 -0
  23. package/dist/components/css/alert/alert.js.map +1 -0
  24. package/dist/components/css/avatar/avatar.d.ts +40 -0
  25. package/dist/components/css/avatar/avatar.d.ts.map +1 -0
  26. package/dist/components/css/avatar/avatar.js +30 -0
  27. package/dist/components/css/avatar/avatar.js.map +1 -0
  28. package/dist/components/css/badge/badge.d.ts +24 -0
  29. package/dist/components/css/badge/badge.d.ts.map +1 -0
  30. package/dist/components/css/badge/badge.js +24 -0
  31. package/dist/components/css/badge/badge.js.map +1 -0
  32. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +26 -0
  33. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  34. package/dist/components/css/breadcrumbs/breadcrumbs.js +24 -0
  35. package/dist/components/css/breadcrumbs/breadcrumbs.js.map +1 -0
  36. package/dist/components/css/button/button.d.ts +26 -0
  37. package/dist/components/css/button/button.d.ts.map +1 -0
  38. package/dist/components/css/button/button.js +25 -0
  39. package/dist/components/css/button/button.js.map +1 -0
  40. package/dist/components/css/card/card.d.ts +36 -0
  41. package/dist/components/css/card/card.d.ts.map +1 -0
  42. package/dist/components/css/card/card.js +28 -0
  43. package/dist/components/css/card/card.js.map +1 -0
  44. package/dist/components/css/checkbox/checkbox.d.ts +32 -0
  45. package/dist/components/css/checkbox/checkbox.d.ts.map +1 -0
  46. package/dist/components/css/checkbox/checkbox.js +27 -0
  47. package/dist/components/css/checkbox/checkbox.js.map +1 -0
  48. package/dist/components/css/divider/divider.d.ts +29 -0
  49. package/dist/components/css/divider/divider.d.ts.map +1 -0
  50. package/dist/components/css/divider/divider.js +23 -0
  51. package/dist/components/css/divider/divider.js.map +1 -0
  52. package/dist/components/css/error-text/error-text.d.ts +24 -0
  53. package/dist/components/css/error-text/error-text.d.ts.map +1 -0
  54. package/dist/components/css/error-text/error-text.js +18 -0
  55. package/dist/components/css/error-text/error-text.js.map +1 -0
  56. package/dist/components/css/fieldset/fieldset.d.ts +55 -0
  57. package/dist/components/css/fieldset/fieldset.d.ts.map +1 -0
  58. package/dist/components/css/fieldset/fieldset.js +39 -0
  59. package/dist/components/css/fieldset/fieldset.js.map +1 -0
  60. package/dist/components/css/file-upload/file-upload.d.ts +41 -0
  61. package/dist/components/css/file-upload/file-upload.d.ts.map +1 -0
  62. package/dist/components/css/file-upload/file-upload.js +32 -0
  63. package/dist/components/css/file-upload/file-upload.js.map +1 -0
  64. package/dist/components/css/heading/heading.d.ts +29 -0
  65. package/dist/components/css/heading/heading.d.ts.map +1 -0
  66. package/dist/components/css/heading/heading.js +23 -0
  67. package/dist/components/css/heading/heading.js.map +1 -0
  68. package/dist/components/css/help-text/help-text.d.ts +24 -0
  69. package/dist/components/css/help-text/help-text.d.ts.map +1 -0
  70. package/dist/components/css/help-text/help-text.js +23 -0
  71. package/dist/components/css/help-text/help-text.js.map +1 -0
  72. package/dist/components/css/icon/icon.d.ts +34 -0
  73. package/dist/components/css/icon/icon.d.ts.map +1 -0
  74. package/dist/components/css/icon/icon.js +25 -0
  75. package/dist/components/css/icon/icon.js.map +1 -0
  76. package/dist/components/css/input/input.d.ts +40 -0
  77. package/dist/components/css/input/input.d.ts.map +1 -0
  78. package/dist/components/css/input/input.js +45 -0
  79. package/dist/components/css/input/input.js.map +1 -0
  80. package/dist/components/css/label/label.d.ts +33 -0
  81. package/dist/components/css/label/label.d.ts.map +1 -0
  82. package/dist/components/css/label/label.js +23 -0
  83. package/dist/components/css/label/label.js.map +1 -0
  84. package/dist/components/css/link/link.d.ts +28 -0
  85. package/dist/components/css/link/link.d.ts.map +1 -0
  86. package/dist/components/css/link/link.js +20 -0
  87. package/dist/components/css/link/link.js.map +1 -0
  88. package/dist/components/css/list/list.d.ts +31 -0
  89. package/dist/components/css/list/list.d.ts.map +1 -0
  90. package/dist/components/css/list/list.js +25 -0
  91. package/dist/components/css/list/list.js.map +1 -0
  92. package/dist/components/css/pagination/pagination.d.ts +27 -0
  93. package/dist/components/css/pagination/pagination.d.ts.map +1 -0
  94. package/dist/components/css/pagination/pagination.js +25 -0
  95. package/dist/components/css/pagination/pagination.js.map +1 -0
  96. package/dist/components/css/paragraph/paragraph.d.ts +36 -0
  97. package/dist/components/css/paragraph/paragraph.d.ts.map +1 -0
  98. package/dist/components/css/paragraph/paragraph.js +26 -0
  99. package/dist/components/css/paragraph/paragraph.js.map +1 -0
  100. package/dist/components/css/progress/progress.d.ts +53 -0
  101. package/dist/components/css/progress/progress.d.ts.map +1 -0
  102. package/dist/components/css/progress/progress.js +38 -0
  103. package/dist/components/css/progress/progress.js.map +1 -0
  104. package/dist/components/css/radio/radio.d.ts +32 -0
  105. package/dist/components/css/radio/radio.d.ts.map +1 -0
  106. package/dist/components/css/radio/radio.js +27 -0
  107. package/dist/components/css/radio/radio.js.map +1 -0
  108. package/dist/components/css/search/search.d.ts +34 -0
  109. package/dist/components/css/search/search.d.ts.map +1 -0
  110. package/dist/components/css/search/search.js +32 -0
  111. package/dist/components/css/search/search.js.map +1 -0
  112. package/dist/components/css/select/select.d.ts +40 -0
  113. package/dist/components/css/select/select.d.ts.map +1 -0
  114. package/dist/components/css/select/select.js +31 -0
  115. package/dist/components/css/select/select.js.map +1 -0
  116. package/dist/components/css/shared.d.ts +90 -0
  117. package/dist/components/css/shared.d.ts.map +1 -0
  118. package/dist/components/css/shared.js +167 -0
  119. package/dist/components/css/shared.js.map +1 -0
  120. package/dist/components/css/skeleton/skeleton.d.ts +29 -0
  121. package/dist/components/css/skeleton/skeleton.d.ts.map +1 -0
  122. package/dist/components/css/skeleton/skeleton.js +23 -0
  123. package/dist/components/css/skeleton/skeleton.js.map +1 -0
  124. package/dist/components/css/skip-link/skip-link.d.ts +18 -0
  125. package/dist/components/css/skip-link/skip-link.d.ts.map +1 -0
  126. package/dist/components/css/skip-link/skip-link.js +16 -0
  127. package/dist/components/css/skip-link/skip-link.js.map +1 -0
  128. package/dist/components/css/spinner/spinner.d.ts +33 -0
  129. package/dist/components/css/spinner/spinner.d.ts.map +1 -0
  130. package/dist/components/css/spinner/spinner.js +25 -0
  131. package/dist/components/css/spinner/spinner.js.map +1 -0
  132. package/dist/components/css/sr-only/sr-only.d.ts +17 -0
  133. package/dist/components/css/sr-only/sr-only.d.ts.map +1 -0
  134. package/dist/components/css/sr-only/sr-only.js +15 -0
  135. package/dist/components/css/sr-only/sr-only.js.map +1 -0
  136. package/dist/components/css/switch/switch.d.ts +37 -0
  137. package/dist/components/css/switch/switch.d.ts.map +1 -0
  138. package/dist/components/css/switch/switch.js +29 -0
  139. package/dist/components/css/switch/switch.js.map +1 -0
  140. package/dist/components/css/table/table.d.ts +76 -0
  141. package/dist/components/css/table/table.d.ts.map +1 -0
  142. package/dist/components/css/table/table.js +59 -0
  143. package/dist/components/css/table/table.js.map +1 -0
  144. package/dist/components/css/tag/tag.d.ts +35 -0
  145. package/dist/components/css/tag/tag.d.ts.map +1 -0
  146. package/dist/components/css/tag/tag.js +27 -0
  147. package/dist/components/css/tag/tag.js.map +1 -0
  148. package/dist/components/css/textarea/textarea.d.ts +23 -0
  149. package/dist/components/css/textarea/textarea.d.ts.map +1 -0
  150. package/dist/components/css/textarea/textarea.js +18 -0
  151. package/dist/components/css/textarea/textarea.js.map +1 -0
  152. package/dist/components/css/toggle-group/toggle-group.d.ts +31 -0
  153. package/dist/components/css/toggle-group/toggle-group.d.ts.map +1 -0
  154. package/dist/components/css/toggle-group/toggle-group.js +29 -0
  155. package/dist/components/css/toggle-group/toggle-group.js.map +1 -0
  156. package/dist/components/css/tooltip/tooltip.d.ts +31 -0
  157. package/dist/components/css/tooltip/tooltip.d.ts.map +1 -0
  158. package/dist/components/css/tooltip/tooltip.js +29 -0
  159. package/dist/components/css/tooltip/tooltip.js.map +1 -0
  160. package/dist/components/default-texts.d.ts +35 -0
  161. package/dist/components/default-texts.d.ts.map +1 -0
  162. package/dist/components/default-texts.js +35 -0
  163. package/dist/components/default-texts.js.map +1 -0
  164. package/dist/components/events.d.ts +77 -0
  165. package/dist/components/events.d.ts.map +1 -0
  166. package/dist/components/events.js +3 -0
  167. package/dist/components/events.js.map +1 -0
  168. package/dist/components/frame/dialog/dialog.d.ts +122 -0
  169. package/dist/components/frame/dialog/dialog.d.ts.map +1 -0
  170. package/dist/components/frame/dialog/dialog.js +112 -0
  171. package/dist/components/frame/dialog/dialog.js.map +1 -0
  172. package/dist/components/frame/dialog/lt-dialog.d.ts +104 -0
  173. package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -0
  174. package/dist/components/frame/dialog/lt-dialog.js +431 -0
  175. package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
  176. package/dist/components/frame/error-summary/error-summary.d.ts +40 -0
  177. package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -0
  178. package/dist/components/frame/error-summary/error-summary.js +32 -0
  179. package/dist/components/frame/error-summary/error-summary.js.map +1 -0
  180. package/dist/components/frame/error-summary/lt-error-summary.d.ts +82 -0
  181. package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -0
  182. package/dist/components/frame/error-summary/lt-error-summary.js +302 -0
  183. package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -0
  184. package/dist/components/frame/field/field-core.d.ts +92 -0
  185. package/dist/components/frame/field/field-core.d.ts.map +1 -0
  186. package/dist/components/frame/field/field-core.js +63 -0
  187. package/dist/components/frame/field/field-core.js.map +1 -0
  188. package/dist/components/frame/field/lt-field.d.ts +173 -0
  189. package/dist/components/frame/field/lt-field.d.ts.map +1 -0
  190. package/dist/components/frame/field/lt-field.js +580 -0
  191. package/dist/components/frame/field/lt-field.js.map +1 -0
  192. package/dist/components/frame/popover/lt-popover.d.ts +132 -0
  193. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
  194. package/dist/components/frame/popover/lt-popover.js +490 -0
  195. package/dist/components/frame/popover/lt-popover.js.map +1 -0
  196. package/dist/components/frame/popover/popover.d.ts +49 -0
  197. package/dist/components/frame/popover/popover.d.ts.map +1 -0
  198. package/dist/components/frame/popover/popover.js +64 -0
  199. package/dist/components/frame/popover/popover.js.map +1 -0
  200. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +198 -0
  201. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -0
  202. package/dist/components/frame/session-timeout/lt-session-timeout.js +573 -0
  203. package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -0
  204. package/dist/components/frame/session-timeout/session-timeout.d.ts +113 -0
  205. package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -0
  206. package/dist/components/frame/session-timeout/session-timeout.js +101 -0
  207. package/dist/components/frame/session-timeout/session-timeout.js.map +1 -0
  208. package/dist/components/frame/suggestion/lt-suggestion.d.ts +361 -0
  209. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
  210. package/dist/components/frame/suggestion/lt-suggestion.js +1152 -0
  211. package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -0
  212. package/dist/components/frame/suggestion/suggestion.d.ts +143 -0
  213. package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -0
  214. package/dist/components/frame/suggestion/suggestion.js +127 -0
  215. package/dist/components/frame/suggestion/suggestion.js.map +1 -0
  216. package/dist/components/frame/tabs/lt-tabs.d.ts +404 -0
  217. package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
  218. package/dist/components/frame/tabs/lt-tabs.js +1201 -0
  219. package/dist/components/frame/tabs/lt-tabs.js.map +1 -0
  220. package/dist/components/frame/tabs/tabs.d.ts +112 -0
  221. package/dist/components/frame/tabs/tabs.d.ts.map +1 -0
  222. package/dist/components/frame/tabs/tabs.js +107 -0
  223. package/dist/components/frame/tabs/tabs.js.map +1 -0
  224. package/dist/components/host-element.d.ts +135 -0
  225. package/dist/components/host-element.d.ts.map +1 -0
  226. package/dist/components/host-element.js +366 -0
  227. package/dist/components/host-element.js.map +1 -0
  228. package/dist/components/standalone/connection-status/connection-status.d.ts +28 -0
  229. package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -0
  230. package/dist/components/standalone/connection-status/connection-status.js +22 -0
  231. package/dist/components/standalone/connection-status/connection-status.js.map +1 -0
  232. package/dist/components/standalone/connection-status/lt-connection-status.d.ts +81 -0
  233. package/dist/components/standalone/connection-status/lt-connection-status.d.ts.map +1 -0
  234. package/dist/components/standalone/connection-status/lt-connection-status.js +216 -0
  235. package/dist/components/standalone/connection-status/lt-connection-status.js.map +1 -0
  236. package/dist/components/standalone/toast/lt-toast.d.ts +109 -0
  237. package/dist/components/standalone/toast/lt-toast.d.ts.map +1 -0
  238. package/dist/components/standalone/toast/lt-toast.js +256 -0
  239. package/dist/components/standalone/toast/lt-toast.js.map +1 -0
  240. package/dist/components/standalone/toast/toast.d.ts +52 -0
  241. package/dist/components/standalone/toast/toast.d.ts.map +1 -0
  242. package/dist/components/standalone/toast/toast.js +42 -0
  243. package/dist/components/standalone/toast/toast.js.map +1 -0
  244. package/dist/diagnostics/core.d.ts +137 -0
  245. package/dist/diagnostics/core.d.ts.map +1 -0
  246. package/dist/diagnostics/core.js +72 -0
  247. package/dist/diagnostics/core.js.map +1 -0
  248. package/dist/diagnostics/default-core.d.ts +10 -0
  249. package/dist/diagnostics/default-core.d.ts.map +1 -0
  250. package/dist/diagnostics/default-core.js +72 -0
  251. package/dist/diagnostics/default-core.js.map +1 -0
  252. package/dist/diagnostics/index.d.ts +84 -0
  253. package/dist/diagnostics/index.d.ts.map +1 -0
  254. package/dist/diagnostics/index.js +106 -0
  255. package/dist/diagnostics/index.js.map +1 -0
  256. package/dist/dom.d.ts +55 -0
  257. package/dist/dom.d.ts.map +1 -0
  258. package/dist/dom.js +162 -0
  259. package/dist/dom.js.map +1 -0
  260. package/dist/index.d.ts +97 -0
  261. package/dist/index.d.ts.map +1 -0
  262. package/dist/index.js +58 -0
  263. package/dist/index.js.map +1 -0
  264. package/dist/jsx/react.d.ts +180 -0
  265. package/dist/jsx/react.d.ts.map +1 -0
  266. package/dist/jsx/react.js +2 -0
  267. package/dist/jsx/react.js.map +1 -0
  268. package/dist/lotek.css +3617 -0
  269. package/dist/lt.d.ts +325 -0
  270. package/dist/lt.d.ts.map +1 -0
  271. package/dist/lt.js +183 -0
  272. package/dist/lt.js.map +1 -0
  273. package/dist/react.d.ts +492 -0
  274. package/dist/react.d.ts.map +1 -0
  275. package/dist/react.js +296 -0
  276. package/dist/react.js.map +1 -0
  277. package/dist/register.d.ts +17 -0
  278. package/dist/register.d.ts.map +1 -0
  279. package/dist/register.js +35 -0
  280. package/dist/register.js.map +1 -0
  281. package/dist/tokens/color.d.ts +43 -0
  282. package/dist/tokens/color.d.ts.map +1 -0
  283. package/dist/tokens/color.js +123 -0
  284. package/dist/tokens/color.js.map +1 -0
  285. package/dist/tokens/contract.d.ts +18 -0
  286. package/dist/tokens/contract.d.ts.map +1 -0
  287. package/dist/tokens/contract.js +18 -0
  288. package/dist/tokens/contract.js.map +1 -0
  289. package/dist/tokens/matrix-cells.d.ts +30 -0
  290. package/dist/tokens/matrix-cells.d.ts.map +1 -0
  291. package/dist/tokens/matrix-cells.js +273 -0
  292. package/dist/tokens/matrix-cells.js.map +1 -0
  293. package/dist/tokens/matrix.d.ts +18 -0
  294. package/dist/tokens/matrix.d.ts.map +1 -0
  295. package/dist/tokens/matrix.js +21 -0
  296. package/dist/tokens/matrix.js.map +1 -0
  297. package/dist/tokens/theme-check.d.ts +42 -0
  298. package/dist/tokens/theme-check.d.ts.map +1 -0
  299. package/dist/tokens/theme-check.js +10 -0
  300. package/dist/tokens/theme-check.js.map +1 -0
  301. package/dist/tokens/theme.d.ts +94 -0
  302. package/dist/tokens/theme.d.ts.map +1 -0
  303. package/dist/tokens/theme.js +14 -0
  304. package/dist/tokens/theme.js.map +1 -0
  305. package/dist/tokens/tokens.d.ts +122 -0
  306. package/dist/tokens/tokens.d.ts.map +1 -0
  307. package/dist/tokens/tokens.js +158 -0
  308. package/dist/tokens/tokens.js.map +1 -0
  309. package/dist/vocabulary/classes.d.ts +3 -0
  310. package/dist/vocabulary/classes.d.ts.map +1 -0
  311. package/dist/vocabulary/classes.js +1320 -0
  312. package/dist/vocabulary/classes.js.map +1 -0
  313. package/dist/vocabulary/elements.d.ts +3 -0
  314. package/dist/vocabulary/elements.d.ts.map +1 -0
  315. package/dist/vocabulary/elements.js +410 -0
  316. package/dist/vocabulary/elements.js.map +1 -0
  317. package/dist/vocabulary/types.d.ts +175 -0
  318. package/dist/vocabulary/types.d.ts.map +1 -0
  319. package/dist/vocabulary/types.js +11 -0
  320. package/dist/vocabulary/types.js.map +1 -0
  321. package/dist/wasi-host.d.ts +24 -0
  322. package/dist/wasi-host.d.ts.map +1 -0
  323. package/dist/wasi-host.js +140 -0
  324. package/dist/wasi-host.js.map +1 -0
  325. package/live-templates.xml +62 -0
  326. package/manifest/files.json +373 -0
  327. package/manifest/manifest.json +4965 -0
  328. package/manifest/manifest.schema.json +513 -0
  329. package/package.json +398 -5
  330. package/src/cli.ts +21 -0
  331. package/src/components/css/accordion/accordion.css +102 -0
  332. package/src/components/css/accordion/accordion.ts +50 -0
  333. package/src/components/css/alert/alert.css +53 -0
  334. package/src/components/css/alert/alert.ts +48 -0
  335. package/src/components/css/avatar/avatar.css +96 -0
  336. package/src/components/css/avatar/avatar.ts +57 -0
  337. package/src/components/css/badge/badge.css +42 -0
  338. package/src/components/css/badge/badge.ts +43 -0
  339. package/src/components/css/breadcrumbs/breadcrumbs.css +62 -0
  340. package/src/components/css/breadcrumbs/breadcrumbs.ts +30 -0
  341. package/src/components/css/button/button.css +128 -0
  342. package/src/components/css/button/button.ts +44 -0
  343. package/src/components/css/card/card.css +65 -0
  344. package/src/components/css/card/card.ts +50 -0
  345. package/src/components/css/checkbox/checkbox.css +114 -0
  346. package/src/components/css/checkbox/checkbox.ts +50 -0
  347. package/src/components/css/divider/divider.css +38 -0
  348. package/src/components/css/divider/divider.ts +42 -0
  349. package/src/components/css/error-text/error-text.css +21 -0
  350. package/src/components/css/error-text/error-text.ts +37 -0
  351. package/src/components/css/fieldset/fieldset.css +72 -0
  352. package/src/components/css/fieldset/fieldset.ts +87 -0
  353. package/src/components/css/file-upload/file-upload.css +102 -0
  354. package/src/components/css/file-upload/file-upload.ts +65 -0
  355. package/src/components/css/heading/heading.css +33 -0
  356. package/src/components/css/heading/heading.ts +42 -0
  357. package/src/components/css/help-text/help-text.css +24 -0
  358. package/src/components/css/help-text/help-text.ts +42 -0
  359. package/src/components/css/icon/icon.css +20 -0
  360. package/src/components/css/icon/icon.ts +44 -0
  361. package/src/components/css/input/input.css +145 -0
  362. package/src/components/css/input/input.ts +77 -0
  363. package/src/components/css/label/label.css +42 -0
  364. package/src/components/css/label/label.ts +51 -0
  365. package/src/components/css/link/link.css +38 -0
  366. package/src/components/css/link/link.ts +38 -0
  367. package/src/components/css/list/list.css +53 -0
  368. package/src/components/css/list/list.ts +44 -0
  369. package/src/components/css/pagination/pagination.css +95 -0
  370. package/src/components/css/pagination/pagination.ts +33 -0
  371. package/src/components/css/paragraph/paragraph.css +31 -0
  372. package/src/components/css/paragraph/paragraph.ts +53 -0
  373. package/src/components/css/progress/progress.css +161 -0
  374. package/src/components/css/progress/progress.ts +78 -0
  375. package/src/components/css/radio/radio.css +94 -0
  376. package/src/components/css/radio/radio.ts +50 -0
  377. package/src/components/css/search/search.css +50 -0
  378. package/src/components/css/search/search.ts +56 -0
  379. package/src/components/css/select/select.css +321 -0
  380. package/src/components/css/select/select.ts +63 -0
  381. package/src/components/css/shared.ts +199 -0
  382. package/src/components/css/skeleton/skeleton.css +62 -0
  383. package/src/components/css/skeleton/skeleton.ts +43 -0
  384. package/src/components/css/skip-link/skip-link.css +41 -0
  385. package/src/components/css/skip-link/skip-link.ts +22 -0
  386. package/src/components/css/spinner/spinner.css +48 -0
  387. package/src/components/css/spinner/spinner.ts +48 -0
  388. package/src/components/css/sr-only/sr-only.css +16 -0
  389. package/src/components/css/sr-only/sr-only.ts +21 -0
  390. package/src/components/css/switch/switch.css +105 -0
  391. package/src/components/css/switch/switch.ts +50 -0
  392. package/src/components/css/table/table.css +159 -0
  393. package/src/components/css/table/table.ts +107 -0
  394. package/src/components/css/tag/tag.css +58 -0
  395. package/src/components/css/tag/tag.ts +49 -0
  396. package/src/components/css/textarea/textarea.css +83 -0
  397. package/src/components/css/textarea/textarea.ts +40 -0
  398. package/src/components/css/toggle-group/toggle-group.css +92 -0
  399. package/src/components/css/toggle-group/toggle-group.ts +37 -0
  400. package/src/components/css/tooltip/tooltip.css +89 -0
  401. package/src/components/css/tooltip/tooltip.ts +37 -0
  402. package/src/components/default-texts.ts +34 -0
  403. package/src/components/events.ts +68 -0
  404. package/src/components/frame/dialog/dialog.css +306 -0
  405. package/src/components/frame/dialog/dialog.ts +166 -0
  406. package/src/components/frame/dialog/lt-dialog.ts +510 -0
  407. package/src/components/frame/error-summary/error-summary.css +47 -0
  408. package/src/components/frame/error-summary/error-summary.ts +56 -0
  409. package/src/components/frame/error-summary/lt-error-summary.ts +344 -0
  410. package/src/components/frame/field/field-core.ts +152 -0
  411. package/src/components/frame/field/field.css +17 -0
  412. package/src/components/frame/field/lt-field.ts +753 -0
  413. package/src/components/frame/popover/lt-popover.ts +555 -0
  414. package/src/components/frame/popover/popover.css +50 -0
  415. package/src/components/frame/popover/popover.ts +102 -0
  416. package/src/components/frame/session-timeout/lt-session-timeout.ts +681 -0
  417. package/src/components/frame/session-timeout/session-timeout.css +50 -0
  418. package/src/components/frame/session-timeout/session-timeout.ts +156 -0
  419. package/src/components/frame/suggestion/lt-suggestion.ts +1358 -0
  420. package/src/components/frame/suggestion/suggestion.css +132 -0
  421. package/src/components/frame/suggestion/suggestion.ts +172 -0
  422. package/src/components/frame/tabs/lt-tabs.ts +1319 -0
  423. package/src/components/frame/tabs/tabs.css +128 -0
  424. package/src/components/frame/tabs/tabs.ts +188 -0
  425. package/src/components/host-element.ts +400 -0
  426. package/src/components/standalone/connection-status/connection-status.css +41 -0
  427. package/src/components/standalone/connection-status/connection-status.ts +41 -0
  428. package/src/components/standalone/connection-status/lt-connection-status.ts +242 -0
  429. package/src/components/standalone/toast/lt-toast.ts +300 -0
  430. package/src/components/standalone/toast/toast.css +78 -0
  431. package/src/components/standalone/toast/toast.ts +70 -0
  432. package/src/diagnostics/core.ts +210 -0
  433. package/src/diagnostics/default-core.ts +81 -0
  434. package/src/diagnostics/index.ts +150 -0
  435. package/src/dom.ts +185 -0
  436. package/src/index.ts +218 -0
  437. package/src/jsx/react.ts +212 -0
  438. package/src/lt.ts +192 -0
  439. package/src/react.ts +411 -0
  440. package/src/register.ts +43 -0
  441. package/src/tailwind/tailwind.css +169 -0
  442. package/src/tokens/boundary.css +104 -0
  443. package/src/tokens/color-contract.json +231 -0
  444. package/src/tokens/color.ts +150 -0
  445. package/src/tokens/contract.ts +24 -0
  446. package/src/tokens/matrix-cells.ts +375 -0
  447. package/src/tokens/matrix.ts +32 -0
  448. package/src/tokens/theme-check.ts +51 -0
  449. package/src/tokens/theme.ts +104 -0
  450. package/src/tokens/tokens.css +569 -0
  451. package/src/tokens/tokens.ts +223 -0
  452. package/src/vocabulary/classes.ts +1322 -0
  453. package/src/vocabulary/elements.ts +412 -0
  454. package/src/vocabulary/types.ts +178 -0
  455. package/src/wasi-host.ts +155 -0
  456. package/web-types.json +800 -0
@@ -0,0 +1,29 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const ALERT_CLASS = "lt-alert";
3
+ /** The heading inside the message. */
4
+ export const ALERT_TITLE_CLASS = "lt-alert__title";
5
+ export const alertColors = ["info", "success", "warning", "danger"];
6
+ /**
7
+ * The attributes for a message about the whole page or a whole form.
8
+ *
9
+ * The role is not set here, because it depends on when the message comes.
10
+ * If it is in the markup from the start, it should have no role. If it
11
+ * appears while the page is idle, it needs `role="status"`, or
12
+ * `role="alert"` if the user must stop.
13
+ *
14
+ * ```ts
15
+ * <div {...alert({ color: "warning" })}>
16
+ * <p class={alert.title}>The application has not been sent</p>
17
+ * </div>
18
+ * ```
19
+ */
20
+ export const alert = Object.assign(({ color } = {}) => attributes({
21
+ class: ALERT_CLASS,
22
+ "data-color": color,
23
+ }), {
24
+ /** The class on the heading inside the message. */
25
+ title: ALERT_TITLE_CLASS,
26
+ colors: alertColors,
27
+ isColor: createGuard(alertColors),
28
+ });
29
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../../src/components/css/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAA;AAC9C,sCAAsC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAA0B,CAAA;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAA;AAe5E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAChC,CAAC,EAAE,KAAK,KAAmB,EAAE,EAAmB,EAAE,CAChD,UAAU,CAAC;IACT,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,KAAK;CACpB,CAAC,EACJ;IACE,mDAAmD;IACnD,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC;CAClC,CACF,CAAA"}
@@ -0,0 +1,40 @@
1
+ export declare const AVATAR_CLASS: "lt-avatar";
2
+ /** Several profile pictures that overlap. */
3
+ export declare const AVATAR_STACK_CLASS: "lt-avatar-stack";
4
+ export declare const avatarSizes: readonly ["small", "medium", "large"];
5
+ export declare const avatarVariants: readonly ["circle", "square"];
6
+ export type AvatarSize = (typeof avatarSizes)[number];
7
+ export type AvatarVariant = (typeof avatarVariants)[number];
8
+ export type NonDefaultAvatarSize = Exclude<AvatarSize, "medium">;
9
+ export type NonDefaultAvatarVariant = Exclude<AvatarVariant, "circle">;
10
+ export type AvatarOptions = {
11
+ /** Size. Default: `medium`. */
12
+ size?: AvatarSize;
13
+ /** Round or rounded square. Default: `circle`. */
14
+ variant?: AvatarVariant;
15
+ };
16
+ export type AvatarAttributes = {
17
+ class: typeof AVATAR_CLASS;
18
+ "data-size"?: NonDefaultAvatarSize;
19
+ "data-variant"?: NonDefaultAvatarVariant;
20
+ };
21
+ /**
22
+ * The attributes for a profile picture or initials.
23
+ *
24
+ * If the name is already next to it, the picture is decoration: set
25
+ * `aria-hidden="true"` on it, or the name is announced twice. If the
26
+ * picture stands alone, it must have a text that says who it is.
27
+ *
28
+ * ```ts
29
+ * <span {...avatar({ size: "small" })} aria-hidden="true">ON</span>
30
+ * ```
31
+ */
32
+ export declare const avatar: (({ size, variant, }?: AvatarOptions) => AvatarAttributes) & {
33
+ /** The class on the list of overlapping profile pictures. */
34
+ stack: "lt-avatar-stack";
35
+ sizes: readonly ["small", "medium", "large"];
36
+ isSize: (value: string) => value is "small" | "medium" | "large";
37
+ variants: readonly ["circle", "square"];
38
+ isVariant: (value: string) => value is "circle" | "square";
39
+ };
40
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/css/avatar/avatar.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAG,WAAoB,CAAA;AAChD,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,EAAG,iBAA0B,CAAA;AAE5D,eAAO,MAAM,WAAW,uCAAwC,CAAA;AAChE,eAAO,MAAM,cAAc,+BAAgC,CAAA;AAE3D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AACrD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3D,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;AAChE,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;AAEtE,MAAM,MAAM,aAAa,GAAG;IAC1B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,kDAAkD;IAClD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,cAAc,CAAC,EAAE,uBAAuB,CAAA;CACzC,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,yBAId,aAAa,KAAQ,gBAAgB;IAOtC,6DAA6D;;;;;;CAOhE,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const AVATAR_CLASS = "lt-avatar";
3
+ /** Several profile pictures that overlap. */
4
+ export const AVATAR_STACK_CLASS = "lt-avatar-stack";
5
+ export const avatarSizes = ["small", "medium", "large"];
6
+ export const avatarVariants = ["circle", "square"];
7
+ /**
8
+ * The attributes for a profile picture or initials.
9
+ *
10
+ * If the name is already next to it, the picture is decoration: set
11
+ * `aria-hidden="true"` on it, or the name is announced twice. If the
12
+ * picture stands alone, it must have a text that says who it is.
13
+ *
14
+ * ```ts
15
+ * <span {...avatar({ size: "small" })} aria-hidden="true">ON</span>
16
+ * ```
17
+ */
18
+ export const avatar = Object.assign(({ size = "medium", variant = "circle", } = {}) => attributes({
19
+ class: AVATAR_CLASS,
20
+ "data-size": size === "medium" ? undefined : size,
21
+ "data-variant": variant === "circle" ? undefined : variant,
22
+ }), {
23
+ /** The class on the list of overlapping profile pictures. */
24
+ stack: AVATAR_STACK_CLASS,
25
+ sizes: avatarSizes,
26
+ isSize: createGuard(avatarSizes),
27
+ variants: avatarVariants,
28
+ isVariant: createGuard(avatarVariants),
29
+ });
30
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../../src/components/css/avatar/avatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAA;AAChD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAA0B,CAAA;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAoB3D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,EACC,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,QAAQ,MACD,EAAE,EAAoB,EAAE,CACzC,UAAU,CAAC;IACT,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;IACjD,cAAc,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC3D,CAAC,EACJ;IACE,6DAA6D;IAC7D,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC;IAChC,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC;CACvC,CACF,CAAA"}
@@ -0,0 +1,24 @@
1
+ export declare const BADGE_CLASS: "lt-badge";
2
+ export declare const badgeColors: readonly ["info", "success", "warning", "danger", "neutral"];
3
+ export type BadgeColor = (typeof badgeColors)[number];
4
+ export type NonInfoBadgeColor = Exclude<BadgeColor, "info">;
5
+ export type BadgeOptions = {
6
+ /** What the status means. Default: `info`. */
7
+ color?: BadgeColor;
8
+ };
9
+ export type BadgeAttributes = {
10
+ class: typeof BADGE_CLASS;
11
+ "data-color"?: NonInfoBadgeColor;
12
+ };
13
+ /**
14
+ * The attributes for a status badge.
15
+ *
16
+ * ```ts
17
+ * <span {...badge({ color: "success" })}>Approved</span>
18
+ * ```
19
+ */
20
+ export declare const badge: (({ color }?: BadgeOptions) => BadgeAttributes) & {
21
+ colors: readonly ["info", "success", "warning", "danger", "neutral"];
22
+ isColor: (value: string) => value is "warning" | "info" | "success" | "danger" | "neutral";
23
+ };
24
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/css/badge/badge.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,EAAG,UAAmB,CAAA;AAE9C,eAAO,MAAM,WAAW,8DAMd,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AACrD,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAE3D,MAAM,MAAM,YAAY,GAAG;IACzB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,gBACK,YAAY,KAAQ,eAAe;;;CASzD,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const BADGE_CLASS = "lt-badge";
3
+ export const badgeColors = [
4
+ "info",
5
+ "success",
6
+ "warning",
7
+ "danger",
8
+ "neutral",
9
+ ];
10
+ /**
11
+ * The attributes for a status badge.
12
+ *
13
+ * ```ts
14
+ * <span {...badge({ color: "success" })}>Approved</span>
15
+ * ```
16
+ */
17
+ export const badge = Object.assign(({ color = "info" } = {}) => attributes({
18
+ class: BADGE_CLASS,
19
+ "data-color": color === "info" ? undefined : color,
20
+ }), {
21
+ colors: badgeColors,
22
+ isColor: createGuard(badgeColors),
23
+ });
24
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/components/css/badge/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAA;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAA;AAeV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAChC,CAAC,EAAE,KAAK,GAAG,MAAM,KAAmB,EAAE,EAAmB,EAAE,CACzD,UAAU,CAAC;IACT,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;CACnD,CAAC,EACJ;IACE,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC;CAClC,CACF,CAAA"}
@@ -0,0 +1,26 @@
1
+ export declare const BREADCRUMBS_CLASS: "lt-breadcrumbs";
2
+ export type BreadcrumbsAttributes = {
3
+ class: typeof BREADCRUMBS_CLASS;
4
+ };
5
+ /**
6
+ * The attributes for a breadcrumb trail.
7
+ *
8
+ * The class goes on an `<ol>` inside a `<nav>` with a text that says what
9
+ * the navigation is, for example `aria-label="You are here"`. The order
10
+ * matters, so the list must be numbered even though the numbers are not
11
+ * shown.
12
+ *
13
+ * The separator between the steps is added with CSS. Had it been in the
14
+ * markup, screen readers would have read "slash" between every step.
15
+ *
16
+ * ```ts
17
+ * <nav aria-label="You are here">
18
+ * <ol {...breadcrumbs()}>
19
+ * <li><a href="/">Home</a></li>
20
+ * <li><a href="/cases" aria-current="page">My cases</a></li>
21
+ * </ol>
22
+ * </nav>
23
+ * ```
24
+ */
25
+ export declare const breadcrumbs: () => BreadcrumbsAttributes;
26
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/components/css/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,EAAG,gBAAyB,CAAA;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,OAAO,iBAAiB,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,QAAO,qBACW,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { attributes } from "../shared.js";
2
+ export const BREADCRUMBS_CLASS = "lt-breadcrumbs";
3
+ /**
4
+ * The attributes for a breadcrumb trail.
5
+ *
6
+ * The class goes on an `<ol>` inside a `<nav>` with a text that says what
7
+ * the navigation is, for example `aria-label="You are here"`. The order
8
+ * matters, so the list must be numbered even though the numbers are not
9
+ * shown.
10
+ *
11
+ * The separator between the steps is added with CSS. Had it been in the
12
+ * markup, screen readers would have read "slash" between every step.
13
+ *
14
+ * ```ts
15
+ * <nav aria-label="You are here">
16
+ * <ol {...breadcrumbs()}>
17
+ * <li><a href="/">Home</a></li>
18
+ * <li><a href="/cases" aria-current="page">My cases</a></li>
19
+ * </ol>
20
+ * </nav>
21
+ * ```
22
+ */
23
+ export const breadcrumbs = () => attributes({ class: BREADCRUMBS_CLASS });
24
+ //# sourceMappingURL=breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../src/components/css/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAyB,CAAA;AAM1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAA0B,EAAE,CACrD,UAAU,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ export declare const BUTTON_CLASS: "lt-button";
2
+ export declare const buttonVariants: readonly ["primary", "secondary", "ghost", "danger"];
3
+ export type ButtonVariant = (typeof buttonVariants)[number];
4
+ export type NonPrimaryButtonVariant = Exclude<ButtonVariant, "primary">;
5
+ export type ButtonOptions = {
6
+ /** How weighty the action is. Default: `primary`. */
7
+ variant?: ButtonVariant;
8
+ };
9
+ export type ButtonAttributes = {
10
+ class: typeof BUTTON_CLASS;
11
+ "data-variant"?: NonPrimaryButtonVariant;
12
+ };
13
+ /**
14
+ * The attributes for a button.
15
+ *
16
+ * ```ts
17
+ * <button {...button({ variant: "secondary" })}>Save draft</button>
18
+ * ```
19
+ */
20
+ export declare const button: (({ variant }?: ButtonOptions) => ButtonAttributes) & {
21
+ /** The valid variants, for lookup and branching. */
22
+ variants: readonly ["primary", "secondary", "ghost", "danger"];
23
+ /** Checks whether a string from outside is a valid variant. */
24
+ isVariant: (value: string) => value is "danger" | "primary" | "secondary" | "ghost";
25
+ };
26
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/css/button/button.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAG,WAAoB,CAAA;AAEhD,eAAO,MAAM,cAAc,sDAKjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3D,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;AAEvE,MAAM,MAAM,aAAa,GAAG;IAC1B,qDAAqD;IACrD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAA;IAC1B,cAAc,CAAC,EAAE,uBAAuB,CAAA;CACzC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,kBACS,aAAa,KAAQ,gBAAgB;IAM7D,oDAAoD;;IAEpD,+DAA+D;;CAGlE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const BUTTON_CLASS = "lt-button";
3
+ export const buttonVariants = [
4
+ "primary",
5
+ "secondary",
6
+ "ghost",
7
+ "danger",
8
+ ];
9
+ /**
10
+ * The attributes for a button.
11
+ *
12
+ * ```ts
13
+ * <button {...button({ variant: "secondary" })}>Save draft</button>
14
+ * ```
15
+ */
16
+ export const button = Object.assign(({ variant = "primary" } = {}) => attributes({
17
+ class: BUTTON_CLASS,
18
+ "data-variant": variant === "primary" ? undefined : variant,
19
+ }), {
20
+ /** The valid variants, for lookup and branching. */
21
+ variants: buttonVariants,
22
+ /** Checks whether a string from outside is a valid variant. */
23
+ isVariant: createGuard(buttonVariants),
24
+ });
25
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/css/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAA;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,OAAO;IACP,QAAQ;CACA,CAAA;AAeV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,EAAE,OAAO,GAAG,SAAS,KAAoB,EAAE,EAAoB,EAAE,CAChE,UAAU,CAAC;IACT,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC5D,CAAC,EACJ;IACE,oDAAoD;IACpD,QAAQ,EAAE,cAAc;IACxB,+DAA+D;IAC/D,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC;CACvC,CACF,CAAA"}
@@ -0,0 +1,36 @@
1
+ export declare const CARD_CLASS: "lt-card";
2
+ /** The heading inside the card. */
3
+ export declare const CARD_TITLE_CLASS: "lt-card__title";
4
+ export declare const cardVariants: readonly ["outline", "filled"];
5
+ export type CardVariant = (typeof cardVariants)[number];
6
+ export type NonDefaultCardVariant = Exclude<CardVariant, "outline">;
7
+ export type CardOptions = {
8
+ /** Surface or outline. Default: `outline`. */
9
+ variant?: CardVariant;
10
+ /** The whole card is clickable. Use only on `<a>` or `<button>`. */
11
+ interactive?: boolean;
12
+ };
13
+ export type CardAttributes = {
14
+ class: typeof CARD_CLASS;
15
+ "data-variant"?: NonDefaultCardVariant;
16
+ "data-interactive"?: "";
17
+ };
18
+ /**
19
+ * The attributes for a card.
20
+ *
21
+ * `interactive` gives hover and a focus ring, but makes nothing clickable by
22
+ * itself. If the whole card should be pressable, the element must be an
23
+ * `<a>` or a `<button>`. A `<div>` with a click listener can neither be
24
+ * reached with the keyboard nor be announced as something to press.
25
+ *
26
+ * ```ts
27
+ * <a {...card({ interactive: true })} href="/case/481">…</a>
28
+ * ```
29
+ */
30
+ export declare const card: (({ variant, interactive }?: CardOptions) => CardAttributes) & {
31
+ /** The class on the heading inside the card. */
32
+ title: "lt-card__title";
33
+ variants: readonly ["outline", "filled"];
34
+ isVariant: (value: string) => value is "outline" | "filled";
35
+ };
36
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/css/card/card.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAG,SAAkB,CAAA;AAC5C,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,EAAG,gBAAyB,CAAA;AAEzD,eAAO,MAAM,YAAY,gCAAiC,CAAA;AAE1D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;AAEnE,MAAM,MAAM,WAAW,GAAG;IACxB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAA;IACxB,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC,kBAAkB,CAAC,EAAE,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,+BACwB,WAAW,KAAQ,cAAc;IAOtE,gDAAgD;;;;CAKnD,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const CARD_CLASS = "lt-card";
3
+ /** The heading inside the card. */
4
+ export const CARD_TITLE_CLASS = "lt-card__title";
5
+ export const cardVariants = ["outline", "filled"];
6
+ /**
7
+ * The attributes for a card.
8
+ *
9
+ * `interactive` gives hover and a focus ring, but makes nothing clickable by
10
+ * itself. If the whole card should be pressable, the element must be an
11
+ * `<a>` or a `<button>`. A `<div>` with a click listener can neither be
12
+ * reached with the keyboard nor be announced as something to press.
13
+ *
14
+ * ```ts
15
+ * <a {...card({ interactive: true })} href="/case/481">…</a>
16
+ * ```
17
+ */
18
+ export const card = Object.assign(({ variant = "outline", interactive } = {}) => attributes({
19
+ class: CARD_CLASS,
20
+ "data-variant": variant === "outline" ? undefined : variant,
21
+ "data-interactive": interactive ? "" : undefined,
22
+ }), {
23
+ /** The class on the heading inside the card. */
24
+ title: CARD_TITLE_CLASS,
25
+ variants: cardVariants,
26
+ isVariant: createGuard(cardVariants),
27
+ });
28
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/css/card/card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAkB,CAAA;AAC5C,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAyB,CAAA;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAA;AAkB1D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAC/B,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,WAAW,KAAkB,EAAE,EAAkB,EAAE,CACzE,UAAU,CAAC;IACT,KAAK,EAAE,UAAU;IACjB,cAAc,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;IAC3D,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAE,EAAY,CAAC,CAAC,CAAC,SAAS;CAC5D,CAAC,EACJ;IACE,gDAAgD;IAChD,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,CACF,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { type FieldState, type NonDefaultFieldState } from "../shared.js";
2
+ export declare const CHECKBOX_CLASS: "lt-checkbox";
3
+ /** The row that holds the box and the text next to each other. */
4
+ export declare const CHECKBOX_ROW_CLASS: "lt-checkbox-row";
5
+ export type CheckboxOptions = {
6
+ /** Validation state. Default: `default`. */
7
+ state?: FieldState;
8
+ };
9
+ export type CheckboxAttributes = {
10
+ class: typeof CHECKBOX_CLASS;
11
+ type: "checkbox";
12
+ "data-state"?: NonDefaultFieldState;
13
+ "aria-invalid"?: "true";
14
+ };
15
+ /**
16
+ * The attributes for a checkbox.
17
+ *
18
+ * `type` is set here, so the box cannot become a text field with a box's
19
+ * styling. The indeterminate state is set with `element.indeterminate = true`
20
+ * in JavaScript, not as an attribute, because HTML has no such attribute.
21
+ *
22
+ * ```ts
23
+ * <input {...checkbox({ state: "invalid" })} />
24
+ * ```
25
+ */
26
+ export declare const checkbox: (({ state }?: CheckboxOptions) => CheckboxAttributes) & {
27
+ /** The class on the row around the box and the text. */
28
+ row: "lt-checkbox-row";
29
+ states: readonly ["default", "invalid", "success"];
30
+ isState: (value: string) => value is "default" | "invalid" | "success";
31
+ };
32
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/css/checkbox/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAG,aAAsB,CAAA;AACpD,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,EAAG,iBAA0B,CAAA;AAE5D,MAAM,MAAM,eAAe,GAAG;IAC5B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,OAAO,cAAc,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,gBACK,eAAe,KAAQ,kBAAkB;IAQ/D,wDAAwD;;;;CAK3D,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { attributes, fieldStates, isFieldState, } from "../shared.js";
2
+ export const CHECKBOX_CLASS = "lt-checkbox";
3
+ /** The row that holds the box and the text next to each other. */
4
+ export const CHECKBOX_ROW_CLASS = "lt-checkbox-row";
5
+ /**
6
+ * The attributes for a checkbox.
7
+ *
8
+ * `type` is set here, so the box cannot become a text field with a box's
9
+ * styling. The indeterminate state is set with `element.indeterminate = true`
10
+ * in JavaScript, not as an attribute, because HTML has no such attribute.
11
+ *
12
+ * ```ts
13
+ * <input {...checkbox({ state: "invalid" })} />
14
+ * ```
15
+ */
16
+ export const checkbox = Object.assign(({ state = "default" } = {}) => attributes({
17
+ class: CHECKBOX_CLASS,
18
+ type: "checkbox",
19
+ "data-state": state === "default" ? undefined : state,
20
+ "aria-invalid": state === "invalid" ? "true" : undefined,
21
+ }), {
22
+ /** The class on the row around the box and the text. */
23
+ row: CHECKBOX_ROW_CLASS,
24
+ states: fieldStates,
25
+ isState: isFieldState,
26
+ });
27
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/css/checkbox/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,WAAW,EACX,YAAY,GAEb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,cAAc,GAAG,aAAsB,CAAA;AACpD,kEAAkE;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAA0B,CAAA;AAc5D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CACnC,CAAC,EAAE,KAAK,GAAG,SAAS,KAAsB,EAAE,EAAsB,EAAE,CAClE,UAAU,CAAC;IACT,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,UAAmB;IACzB,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,cAAc,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CACpE,CAAC,EACJ;IACE,wDAAwD;IACxD,GAAG,EAAE,kBAAkB;IACvB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA"}
@@ -0,0 +1,29 @@
1
+ export declare const DIVIDER_CLASS: "lt-divider";
2
+ export declare const dividerVariants: readonly ["default", "subtle", "strong"];
3
+ export type DividerVariant = (typeof dividerVariants)[number];
4
+ export type NonDefaultDividerVariant = Exclude<DividerVariant, "default">;
5
+ export type DividerOptions = {
6
+ /** How visible the line is. Default: `default`. */
7
+ variant?: DividerVariant;
8
+ };
9
+ export type DividerAttributes = {
10
+ class: typeof DIVIDER_CLASS;
11
+ "data-variant"?: NonDefaultDividerVariant;
12
+ };
13
+ /**
14
+ * The attributes for a divider.
15
+ *
16
+ * The class goes on an `<hr>`. If the line separates two parts of the
17
+ * content, it is information screen readers should get. If it is only
18
+ * decoration between two boxes that are already apart, set
19
+ * `aria-hidden="true"` on it.
20
+ *
21
+ * ```ts
22
+ * <hr {...divider({ variant: "subtle" })} />
23
+ * ```
24
+ */
25
+ export declare const divider: (({ variant }?: DividerOptions) => DividerAttributes) & {
26
+ variants: readonly ["default", "subtle", "strong"];
27
+ isVariant: (value: string) => value is "default" | "subtle" | "strong";
28
+ };
29
+ //# sourceMappingURL=divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../../src/components/css/divider/divider.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAG,YAAqB,CAAA;AAElD,eAAO,MAAM,eAAe,0CAA2C,CAAA;AAEvE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAC7D,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA;AAEzE,MAAM,MAAM,cAAc,GAAG;IAC3B,mDAAmD;IACnD,OAAO,CAAC,EAAE,cAAc,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAA;IAC3B,cAAc,CAAC,EAAE,wBAAwB,CAAA;CAC1C,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,kBACQ,cAAc,KAAQ,iBAAiB;;;CASlE,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const DIVIDER_CLASS = "lt-divider";
3
+ export const dividerVariants = ["default", "subtle", "strong"];
4
+ /**
5
+ * The attributes for a divider.
6
+ *
7
+ * The class goes on an `<hr>`. If the line separates two parts of the
8
+ * content, it is information screen readers should get. If it is only
9
+ * decoration between two boxes that are already apart, set
10
+ * `aria-hidden="true"` on it.
11
+ *
12
+ * ```ts
13
+ * <hr {...divider({ variant: "subtle" })} />
14
+ * ```
15
+ */
16
+ export const divider = Object.assign(({ variant = "default" } = {}) => attributes({
17
+ class: DIVIDER_CLASS,
18
+ "data-variant": variant === "default" ? undefined : variant,
19
+ }), {
20
+ variants: dividerVariants,
21
+ isVariant: createGuard(dividerVariants),
22
+ });
23
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../../src/components/css/divider/divider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,YAAqB,CAAA;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAevE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAClC,CAAC,EAAE,OAAO,GAAG,SAAS,KAAqB,EAAE,EAAqB,EAAE,CAClE,UAAU,CAAC;IACT,KAAK,EAAE,aAAa;IACpB,cAAc,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC5D,CAAC,EACJ;IACE,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC;CACxC,CACF,CAAA"}
@@ -0,0 +1,24 @@
1
+ export declare const ERROR_TEXT_CLASS: "lt-error-text";
2
+ export declare const errorTextVariants: readonly ["error", "warning"];
3
+ export type ErrorTextVariant = (typeof errorTextVariants)[number];
4
+ export type NonDefaultErrorTextVariant = Exclude<ErrorTextVariant, "error">;
5
+ export type ErrorTextOptions = {
6
+ /** Whether the error stops submission or only warns. Default: `error`. */
7
+ variant?: ErrorTextVariant;
8
+ };
9
+ export type ErrorTextAttributes = {
10
+ class: typeof ERROR_TEXT_CLASS;
11
+ "data-variant"?: NonDefaultErrorTextVariant;
12
+ };
13
+ /**
14
+ * The attributes for an error text below a field.
15
+ *
16
+ * ```ts
17
+ * <p {...errorText({ variant: "warning" })}>…</p>
18
+ * ```
19
+ */
20
+ export declare const errorText: (({ variant }?: ErrorTextOptions) => ErrorTextAttributes) & {
21
+ variants: readonly ["error", "warning"];
22
+ isVariant: (value: string) => value is "error" | "warning";
23
+ };
24
+ //# sourceMappingURL=error-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-text.d.ts","sourceRoot":"","sources":["../../../../src/components/css/error-text/error-text.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,EAAG,eAAwB,CAAA;AAExD,eAAO,MAAM,iBAAiB,+BAAgC,CAAA;AAE9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AACjE,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;AAE3E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,gBAAgB,CAAA;IAC9B,cAAc,CAAC,EAAE,0BAA0B,CAAA;CAC5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,kBACI,gBAAgB,KAAQ,mBAAmB;;;CASpE,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { attributes, createGuard } from "../shared.js";
2
+ export const ERROR_TEXT_CLASS = "lt-error-text";
3
+ export const errorTextVariants = ["error", "warning"];
4
+ /**
5
+ * The attributes for an error text below a field.
6
+ *
7
+ * ```ts
8
+ * <p {...errorText({ variant: "warning" })}>…</p>
9
+ * ```
10
+ */
11
+ export const errorText = Object.assign(({ variant = "error" } = {}) => attributes({
12
+ class: ERROR_TEXT_CLASS,
13
+ "data-variant": variant === "error" ? undefined : variant,
14
+ }), {
15
+ variants: errorTextVariants,
16
+ isVariant: createGuard(errorTextVariants),
17
+ });
18
+ //# sourceMappingURL=error-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-text.js","sourceRoot":"","sources":["../../../../src/components/css/error-text/error-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAwB,CAAA;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAA;AAe9D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CACpC,CAAC,EAAE,OAAO,GAAG,OAAO,KAAuB,EAAE,EAAuB,EAAE,CACpE,UAAU,CAAC;IACT,KAAK,EAAE,gBAAgB;IACvB,cAAc,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC1D,CAAC,EACJ;IACE,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,WAAW,CAAC,iBAAiB,CAAC;CAC1C,CACF,CAAA"}
@@ -0,0 +1,55 @@
1
+ import { type FieldState, type NonDefaultFieldState, type RequiredMarker } from "../shared.js";
2
+ export declare const FIELDSET_CLASS: "lt-fieldset";
3
+ export declare const LEGEND_CLASS: "lt-legend";
4
+ export type FieldsetOptions = {
5
+ /** Validation state for the whole group. Default: `default`. */
6
+ state?: FieldState;
7
+ /** Disables all the controls in the group. */
8
+ disabled?: boolean;
9
+ };
10
+ export type FieldsetAttributes = {
11
+ class: typeof FIELDSET_CLASS;
12
+ "data-state"?: NonDefaultFieldState;
13
+ disabled?: true;
14
+ };
15
+ export type LegendOptions = {
16
+ /** Marks the group as required, with an asterisk or with the word "(required)". */
17
+ required?: RequiredMarker;
18
+ /** Marks the group as optional. Choose one of `required` and `optional`. */
19
+ optional?: boolean;
20
+ /** Mutes the text when the group is disabled. */
21
+ disabled?: boolean;
22
+ };
23
+ export type LegendAttributes = {
24
+ class: typeof LEGEND_CLASS;
25
+ "data-required"?: RequiredMarker;
26
+ "data-optional"?: "";
27
+ "aria-disabled"?: "true";
28
+ };
29
+ /**
30
+ * The attributes for a group of controls that belong together.
31
+ *
32
+ * `<fieldset>` with `<legend>` is the one way to give a set of radio buttons
33
+ * or checkboxes a shared label that screen readers actually announce before
34
+ * each choice.
35
+ *
36
+ * ```ts
37
+ * <fieldset {...fieldset({ state: "invalid" })}>
38
+ * <legend {...legend({ required: "symbol" })}>Delivery method</legend>
39
+ * </fieldset>
40
+ * ```
41
+ */
42
+ export declare const fieldset: (({ state, disabled }?: FieldsetOptions) => FieldsetAttributes) & {
43
+ states: readonly ["default", "invalid", "success"];
44
+ isState: (value: string) => value is "default" | "invalid" | "success";
45
+ };
46
+ /**
47
+ * The attributes for the label of a group.
48
+ *
49
+ * The same marker as `label()`, but on a `<legend>`.
50
+ */
51
+ export declare const legend: (({ required, optional, disabled }?: LegendOptions) => LegendAttributes) & {
52
+ markers: readonly ["symbol", "text"];
53
+ isMarker: (value: string) => value is "symbol" | "text";
54
+ };
55
+ //# sourceMappingURL=fieldset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.d.ts","sourceRoot":"","sources":["../../../../src/components/css/fieldset/fieldset.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAG,aAAsB,CAAA;AACpD,eAAO,MAAM,YAAY,EAAG,WAAoB,CAAA;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,gEAAgE;IAChE,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,OAAO,cAAc,CAAA;IAC5B,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAA;IAC1B,eAAe,CAAC,EAAE,cAAc,CAAA;IAChC,eAAe,CAAC,EAAE,EAAE,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,0BACe,eAAe,KAAQ,kBAAkB;;;CAU5E,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,uCACkB,aAAa,KAAQ,gBAAgB;;;CAWzE,CAAA"}