@lo-tek/interfaces 0.39.0 → 0.41.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 (201) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +1 -1
  3. package/agent/astro.md +16 -14
  4. package/agent/bundles.md +18 -16
  5. package/agent/datastar.md +70 -68
  6. package/agent/html.md +63 -61
  7. package/agent/kotlin.md +622 -0
  8. package/agent/react.md +18 -16
  9. package/agent/templates.md +72 -68
  10. package/core/lotek-core.wasm +0 -0
  11. package/core/lotek.wasm +0 -0
  12. package/dist/components/css/accordion/accordion.d.ts +1 -1
  13. package/dist/components/css/accordion/accordion.js +1 -1
  14. package/dist/components/css/alert/alert.d.ts +1 -1
  15. package/dist/components/css/alert/alert.js +1 -1
  16. package/dist/components/css/avatar/avatar.d.ts +1 -1
  17. package/dist/components/css/avatar/avatar.js +1 -1
  18. package/dist/components/css/badge/badge.d.ts +1 -1
  19. package/dist/components/css/badge/badge.js +1 -1
  20. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +1 -1
  21. package/dist/components/css/breadcrumbs/breadcrumbs.js +1 -1
  22. package/dist/components/css/card/card.d.ts +1 -1
  23. package/dist/components/css/card/card.js +1 -1
  24. package/dist/components/css/file-upload/file-upload.d.ts +1 -1
  25. package/dist/components/css/file-upload/file-upload.js +1 -1
  26. package/dist/components/css/icon/icon.d.ts +1 -1
  27. package/dist/components/css/icon/icon.js +1 -1
  28. package/dist/components/css/label/label.d.ts +1 -1
  29. package/dist/components/css/label/label.js +1 -1
  30. package/dist/components/css/link/link.d.ts +1 -1
  31. package/dist/components/css/link/link.js +1 -1
  32. package/dist/components/css/spinner/spinner.d.ts +7 -5
  33. package/dist/components/css/spinner/spinner.d.ts.map +1 -1
  34. package/dist/components/css/spinner/spinner.js +7 -5
  35. package/dist/components/css/spinner/spinner.js.map +1 -1
  36. package/dist/components/css/steps/steps.d.ts +23 -0
  37. package/dist/components/css/steps/steps.d.ts.map +1 -0
  38. package/dist/components/css/steps/steps.js +21 -0
  39. package/dist/components/css/steps/steps.js.map +1 -0
  40. package/dist/components/css/tag/tag.d.ts +1 -1
  41. package/dist/components/css/tag/tag.js +1 -1
  42. package/dist/components/css/toggle-group/toggle-group.d.ts +1 -1
  43. package/dist/components/css/toggle-group/toggle-group.js +1 -1
  44. package/dist/components/css/tooltip/tooltip.d.ts +2 -2
  45. package/dist/components/css/tooltip/tooltip.js +2 -2
  46. package/dist/components/events.d.ts +3 -1
  47. package/dist/components/events.d.ts.map +1 -1
  48. package/dist/components/frame/dialog/dialog.d.ts +11 -6
  49. package/dist/components/frame/dialog/dialog.d.ts.map +1 -1
  50. package/dist/components/frame/dialog/dialog.js +4 -4
  51. package/dist/components/frame/dialog/dialog.js.map +1 -1
  52. package/dist/components/frame/dialog/lt-dialog.d.ts +1 -1
  53. package/dist/components/frame/dialog/lt-dialog.js +7 -7
  54. package/dist/components/frame/error-summary/error-summary.d.ts +6 -2
  55. package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -1
  56. package/dist/components/frame/error-summary/error-summary.js +1 -1
  57. package/dist/components/frame/error-summary/error-summary.js.map +1 -1
  58. package/dist/components/frame/error-summary/lt-error-summary.d.ts +1 -1
  59. package/dist/components/frame/error-summary/lt-error-summary.js +6 -6
  60. package/dist/components/frame/field/field-core.d.ts +4 -2
  61. package/dist/components/frame/field/field-core.d.ts.map +1 -1
  62. package/dist/components/frame/field/field-core.js.map +1 -1
  63. package/dist/components/frame/field/lt-field.d.ts +5 -4
  64. package/dist/components/frame/field/lt-field.d.ts.map +1 -1
  65. package/dist/components/frame/field/lt-field.js +5 -4
  66. package/dist/components/frame/field/lt-field.js.map +1 -1
  67. package/dist/components/frame/popover/lt-popover.d.ts +3 -3
  68. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -1
  69. package/dist/components/frame/popover/lt-popover.js +7 -22
  70. package/dist/components/frame/popover/lt-popover.js.map +1 -1
  71. package/dist/components/frame/popover/popover.d.ts +7 -3
  72. package/dist/components/frame/popover/popover.d.ts.map +1 -1
  73. package/dist/components/frame/popover/popover.js +2 -2
  74. package/dist/components/frame/popover/popover.js.map +1 -1
  75. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +8 -8
  76. package/dist/components/frame/session-timeout/lt-session-timeout.js +7 -7
  77. package/dist/components/frame/session-timeout/session-timeout.d.ts +10 -5
  78. package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -1
  79. package/dist/components/frame/session-timeout/session-timeout.js +4 -4
  80. package/dist/components/frame/session-timeout/session-timeout.js.map +1 -1
  81. package/dist/components/frame/suggestion/lt-suggestion.d.ts +12 -11
  82. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -1
  83. package/dist/components/frame/suggestion/lt-suggestion.js +11 -10
  84. package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -1
  85. package/dist/components/frame/suggestion/suggestion.d.ts +3 -1
  86. package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -1
  87. package/dist/components/frame/suggestion/suggestion.js.map +1 -1
  88. package/dist/components/frame/tabs/lt-tabs.d.ts +3 -3
  89. package/dist/components/frame/tabs/lt-tabs.js +5 -5
  90. package/dist/components/frame/tabs/lt-tabs.js.map +1 -1
  91. package/dist/components/frame/tabs/tabs.d.ts +8 -6
  92. package/dist/components/frame/tabs/tabs.d.ts.map +1 -1
  93. package/dist/components/frame/tabs/tabs.js +4 -4
  94. package/dist/components/frame/tabs/tabs.js.map +1 -1
  95. package/dist/components/frame/term/lt-term.d.ts +114 -0
  96. package/dist/components/frame/term/lt-term.d.ts.map +1 -0
  97. package/dist/components/frame/term/lt-term.js +530 -0
  98. package/dist/components/frame/term/lt-term.js.map +1 -0
  99. package/dist/components/frame/term/term.d.ts +55 -0
  100. package/dist/components/frame/term/term.d.ts.map +1 -0
  101. package/dist/components/frame/term/term.js +55 -0
  102. package/dist/components/frame/term/term.js.map +1 -0
  103. package/dist/components/host-element.d.ts +19 -0
  104. package/dist/components/host-element.d.ts.map +1 -1
  105. package/dist/components/host-element.js +37 -0
  106. package/dist/components/host-element.js.map +1 -1
  107. package/dist/components/standalone/connection-status/lt-connection-status.d.ts +1 -1
  108. package/dist/components/standalone/connection-status/lt-connection-status.js +1 -1
  109. package/dist/components/standalone/toast/lt-toast.d.ts +1 -1
  110. package/dist/components/standalone/toast/lt-toast.js +1 -1
  111. package/dist/diagnostics/index.d.ts +2 -2
  112. package/dist/diagnostics/index.js +2 -2
  113. package/dist/dom.d.ts +2 -1
  114. package/dist/dom.d.ts.map +1 -1
  115. package/dist/dom.js +2 -1
  116. package/dist/dom.js.map +1 -1
  117. package/dist/index.d.ts +4 -0
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +3 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/jsx/react.d.ts +3 -1
  122. package/dist/jsx/react.d.ts.map +1 -1
  123. package/dist/lotek.css +370 -1
  124. package/dist/lt.d.ts +13 -6
  125. package/dist/lt.d.ts.map +1 -1
  126. package/dist/lt.js +14 -6
  127. package/dist/lt.js.map +1 -1
  128. package/dist/react.d.ts +19 -0
  129. package/dist/react.d.ts.map +1 -1
  130. package/dist/react.js +14 -0
  131. package/dist/react.js.map +1 -1
  132. package/dist/register.d.ts.map +1 -1
  133. package/dist/register.js +2 -0
  134. package/dist/register.js.map +1 -1
  135. package/dist/vocabulary/classes.d.ts.map +1 -1
  136. package/dist/vocabulary/classes.js +60 -6
  137. package/dist/vocabulary/classes.js.map +1 -1
  138. package/dist/vocabulary/elements.d.ts.map +1 -1
  139. package/dist/vocabulary/elements.js +16 -3
  140. package/dist/vocabulary/elements.js.map +1 -1
  141. package/dist/vocabulary/types.d.ts +28 -3
  142. package/dist/vocabulary/types.d.ts.map +1 -1
  143. package/live-templates-kotlin.xml +69 -0
  144. package/live-templates.xml +29 -23
  145. package/manifest/files.json +18 -0
  146. package/manifest/manifest.json +510 -87
  147. package/manifest/manifest.schema.json +54 -7
  148. package/package.json +16 -5
  149. package/src/components/css/accordion/accordion.ts +1 -1
  150. package/src/components/css/alert/alert.ts +1 -1
  151. package/src/components/css/avatar/avatar.ts +1 -1
  152. package/src/components/css/badge/badge.ts +1 -1
  153. package/src/components/css/breadcrumbs/breadcrumbs.ts +1 -1
  154. package/src/components/css/card/card.ts +1 -1
  155. package/src/components/css/file-upload/file-upload.ts +1 -1
  156. package/src/components/css/icon/icon.ts +1 -1
  157. package/src/components/css/input/input.css +21 -0
  158. package/src/components/css/label/label.ts +1 -1
  159. package/src/components/css/link/link.ts +1 -1
  160. package/src/components/css/spinner/spinner.ts +8 -5
  161. package/src/components/css/steps/steps.css +240 -0
  162. package/src/components/css/steps/steps.ts +26 -0
  163. package/src/components/css/tag/tag.ts +1 -1
  164. package/src/components/css/toggle-group/toggle-group.ts +1 -1
  165. package/src/components/css/tooltip/tooltip.ts +2 -2
  166. package/src/components/events.ts +3 -1
  167. package/src/components/frame/dialog/dialog.ts +11 -6
  168. package/src/components/frame/dialog/lt-dialog.ts +7 -7
  169. package/src/components/frame/error-summary/error-summary.ts +6 -2
  170. package/src/components/frame/error-summary/lt-error-summary.ts +6 -6
  171. package/src/components/frame/field/field-core.ts +4 -2
  172. package/src/components/frame/field/lt-field.ts +5 -4
  173. package/src/components/frame/popover/lt-popover.ts +7 -27
  174. package/src/components/frame/popover/popover.ts +7 -3
  175. package/src/components/frame/session-timeout/lt-session-timeout.ts +8 -8
  176. package/src/components/frame/session-timeout/session-timeout.ts +10 -5
  177. package/src/components/frame/suggestion/lt-suggestion.ts +13 -12
  178. package/src/components/frame/suggestion/suggestion.css +1 -1
  179. package/src/components/frame/suggestion/suggestion.ts +3 -1
  180. package/src/components/frame/tabs/lt-tabs.ts +5 -5
  181. package/src/components/frame/tabs/tabs.css +1 -1
  182. package/src/components/frame/tabs/tabs.ts +8 -6
  183. package/src/components/frame/term/lt-term.ts +573 -0
  184. package/src/components/frame/term/term.css +177 -0
  185. package/src/components/frame/term/term.ts +87 -0
  186. package/src/components/host-element.ts +46 -0
  187. package/src/components/standalone/connection-status/lt-connection-status.ts +1 -1
  188. package/src/components/standalone/toast/lt-toast.ts +1 -1
  189. package/src/diagnostics/index.ts +2 -2
  190. package/src/dom.ts +2 -1
  191. package/src/index.ts +4 -0
  192. package/src/jsx/react.ts +4 -0
  193. package/src/lt.ts +14 -6
  194. package/src/react.ts +15 -0
  195. package/src/register.ts +2 -0
  196. package/src/tokens/boundary.css +4 -0
  197. package/src/tokens/tokens.css +4 -0
  198. package/src/vocabulary/classes.ts +60 -6
  199. package/src/vocabulary/elements.ts +16 -3
  200. package/src/vocabulary/types.ts +25 -3
  201. package/web-types.json +32 -11
package/agent/react.md CHANGED
@@ -8,7 +8,7 @@ enough to have its own file: React rewrites the attribute names. `class` is
8
8
  the main entry, React prints "Invalid DOM property" in the console, once for
9
9
  each attribute name. That is why the package has a React entry of its own.
10
10
 
11
- This is @lo-tek/interfaces 0.39.0. The file is generated by the package and
11
+ This is @lo-tek/interfaces 0.41.0. The file is generated by the package and
12
12
  follows its version, so it can never say anything other than the code next to
13
13
  it.
14
14
 
@@ -55,7 +55,7 @@ The name of each stylesheet is in the tables below.
55
55
 
56
56
  ## 2. What exists
57
57
 
58
- 35 CSS components and 9 web components, and this is the whole list. The
58
+ 36 CSS components and 10 web components, and this is the whole list. The
59
59
  classes are `lt-` + kebab-case. Variants are always `data-*` attributes, never
60
60
  classes of their own: `data-variant="secondary"`, not `lt-button--secondary`.
61
61
  The default variant has no attribute.
@@ -93,6 +93,7 @@ The default variant has no attribute.
93
93
  | `lt-skip-link` | `@lo-tek/interfaces/skip-link.css` | none |
94
94
  | `lt-spinner` | `@lo-tek/interfaces/spinner.css` | `data-size`: small, large |
95
95
  | `lt-sr-only` | `@lo-tek/interfaces/sr-only.css` | none |
96
+ | `lt-steps` | `@lo-tek/interfaces/steps.css` | none |
96
97
  | `lt-switch`<br>`lt-switch-row` | `@lo-tek/interfaces/switch.css` | none |
97
98
  | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `@lo-tek/interfaces/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
98
99
  | `lt-tag` | `@lo-tek/interfaces/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
@@ -277,6 +278,7 @@ Three rules apply to all of them:
277
278
  | `<lt-tabs>` | frame | `@lo-tek/interfaces/tabs.css` | `defineLtTabs()` from `@lo-tek/interfaces/tabs` | `server-controlled` (flag)<br>`activation`: manual, automatic | `tab-select` (index) | `lt-tabs__list`<br>`lt-tabs__panel` |
278
279
  | `<lt-error-summary>` | frame | `@lo-tek/interfaces/error-summary.css` | `defineLtErrorSummary()` from `@lo-tek/interfaces/error-summary` | `data-autofocus`: false, true<br>`hidden` (flag) | none | `lt-error-summary`<br>`lt-error-summary__title` |
279
280
  | `<lt-popover>` | frame | `@lo-tek/interfaces/popover.css` | `defineLtPopover()` from `@lo-tek/interfaces/popover` | `open` (flag)<br>`placement`: bottom-start, bottom-end, top-start, top-end<br>`server-controlled` (flag) | `popover-toggle` (open) | `lt-popover` |
281
+ | `<lt-term>` | frame | `@lo-tek/interfaces/term.css` | `defineLtTerm()` from `@lo-tek/interfaces/term` | none | none | `lt-term`<br>`lt-term__entry` |
280
282
  | `<lt-suggestion>` | frame | `@lo-tek/interfaces/suggestion.css` | `defineLtSuggestion()` from `@lo-tek/interfaces/suggestion` | `prefiltered` (flag)<br>`count-none` (text)<br>`count-zero` (text)<br>`count-one` (text)<br>`count-two` (text)<br>`count-few` (text)<br>`count-many` (text)<br>`count-other` (text)<br>`server-controlled` (flag) | `suggestion-select` (value, label) | `lt-suggestion__list`<br>`lt-suggestion__option`<br>`lt-suggestion__value`<br>`lt-suggestion__empty` |
281
283
  | `<lt-dialog>` | frame | `@lo-tek/interfaces/dialog.css` | `defineLtDialog()` from `@lo-tek/interfaces/dialog` | `open` (flag)<br>`server-controlled` (flag) | `dialog-toggle` (open, returnValue) | `lt-dialog` (`data-color`: brand, info, success, warning, danger)<br>`lt-dialog__body`<br>`lt-dialog__title`<br>`lt-dialog__footer`<br>`lt-dialog__header`<br>`lt-dialog__subtitle` |
282
284
  | `<lt-toast>` | standalone | `@lo-tek/interfaces/toast.css` | `defineLtToast()` from `@lo-tek/interfaces/toast` | `duration` (number)<br>`label` (text)<br>`close-label` (text) | `toast-dismiss` | `lt-toast`<br>`lt-toast__message`<br>`lt-toast__close` |
@@ -319,15 +321,15 @@ reports mismatches on the label, the field and the error text. Without a
319
321
  server it works, but `lt.field()` is the way in both.
320
322
 
321
323
  ```tsx
322
- // ContactForm.tsx
324
+ // JobOrder.tsx
323
325
  import { lt } from "@lo-tek/interfaces/react"
324
326
  import { useId, useState } from "react"
325
327
 
326
- export function ContactForm() {
327
- const [name, setName] = useState("")
328
+ export function JobOrder() {
329
+ const [codename, setCodename] = useState("")
328
330
  const [touched, setTouched] = useState(false)
329
331
 
330
- const invalid = touched && name.trim() === ""
332
+ const invalid = touched && codename.trim() === ""
331
333
  const field = lt.field({
332
334
  id: useId(),
333
335
  required: "symbol",
@@ -337,19 +339,19 @@ export function ContactForm() {
337
339
 
338
340
  return (
339
341
  <form onSubmit={(e) => e.preventDefault()}>
340
- <label {...field.label}>Full name</label>
342
+ <label {...field.label}>Codename</label>
341
343
  <input
342
344
  {...lt.input({ type: "text" })}
343
345
  {...field.control}
344
- name="name"
346
+ name="codename"
345
347
  required
346
- value={name}
347
- onChange={(e) => setName(e.target.value)}
348
+ value={codename}
349
+ onChange={(e) => setCodename(e.target.value)}
348
350
  onBlur={() => setTouched(true)}
349
351
  />
350
- <p {...lt.errorText()} {...field.error}>Enter your name.</p>
352
+ <p {...lt.errorText()} {...field.error}>Enter a codename.</p>
351
353
 
352
- <button {...lt.button()} type="submit">Send</button>
354
+ <button {...lt.button()} type="submit">Order the job</button>
353
355
  </form>
354
356
  )
355
357
  }
@@ -360,7 +362,7 @@ one.
360
362
 
361
363
  `lt` is imported from `@lo-tek/interfaces/react`, never from the main entry:
362
364
  the React entry gives `className` and `htmlFor`, the main entry gives `class`
363
- and `for`. The 46 builder functions are in both:
365
+ and `for`. The 48 builder functions are in both:
364
366
 
365
367
  `lt.accordion()`, `lt.alert()`, `lt.avatar()`, `lt.badge()`,
366
368
  `lt.breadcrumbs()`, `lt.button()`, `lt.card()`, `lt.checkbox()`,
@@ -370,9 +372,9 @@ and `for`. The 46 builder functions are in both:
370
372
  `lt.legend()`, `lt.link()`, `lt.list()`, `lt.pagination()`, `lt.paragraph()`,
371
373
  `lt.popover()`, `lt.progress()`, `lt.radio()`, `lt.search()`, `lt.select()`,
372
374
  `lt.sessionTimeout()`, `lt.skeleton()`, `lt.skipLink()`, `lt.spinner()`,
373
- `lt.srOnly()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
374
- `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.textarea()`, `lt.toast()`,
375
- `lt.toggleGroup()`, `lt.tooltip()`
375
+ `lt.srOnly()`, `lt.steps()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
376
+ `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.term()`, `lt.textarea()`,
377
+ `lt.toast()`, `lt.toggleGroup()`, `lt.tooltip()`
376
378
 
377
379
  ## 6. Only `open={isOpen || undefined}` works
378
380
 
@@ -2,19 +2,25 @@
2
2
 
3
3
  The rulebook for LO-TEK where the server produces the markup: Go templates,
4
4
  Razor, PHP, Blade, Twig, Jinja, Django, ERB, Liquid, Handlebars, Nunjucks and
5
- Edge, and HTML built as strings in Kotlin, Java, C# or Python.
5
+ Edge, and HTML built as strings in C# or Python.
6
6
 
7
7
  This is the environment LO-TEK is made for. The components are CSS classes and
8
8
  web components, that is, things the browser understands directly, so a Go
9
9
  template gets the same components as a React app without taking in any
10
10
  JavaScript framework.
11
11
 
12
+ In Kotlin or Java code that writes the HTML, the builder functions are
13
+ `Lt.field()`, `Lt.button()` and the others, with enums for the values, and
14
+ `Lt.field()` makes `<lt-field>` unnecessary. The rulebook for a JVM server is
15
+ https://lo-tek.sobernetics.no/agent/kotlin.md. The rest of this file is for
16
+ templates that cannot call them.
17
+
12
18
  It is also the environment with the smallest safety net. No compiler looks at
13
- the attributes in a template, and no type stops `data-variant="outlined"`.
14
- That is why item 5 applies more strictly here than anywhere else: the check is
15
- the only thing that reads your markup.
19
+ the attributes in a template that cannot call a builder function, and no type
20
+ stops `data-variant="outlined"`. That is why item 5 applies more strictly here
21
+ than anywhere else: the check is the only thing that reads your markup.
16
22
 
17
- This is @lo-tek/interfaces 0.39.0. The file is generated by the package and
23
+ This is @lo-tek/interfaces 0.41.0. The file is generated by the package and
18
24
  follows its version, so it can never say anything other than the code next to
19
25
  it.
20
26
 
@@ -48,11 +54,11 @@ it.
48
54
  One link in the page template, with all the components:
49
55
 
50
56
  ```html
51
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/lotek.css">
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/lotek.css">
52
58
  ```
53
59
 
54
60
  Or from your own server, if you copy the file into your static assets.
55
- `lotek.css` is 103 kB, 13 kB compressed, has everything flattened without
61
+ `lotek.css` is 112 kB, 14 kB compressed, has everything flattened without
56
62
  `@import`, and is the fastest option when you link.
57
63
 
58
64
  If you want only the stylesheets the pages actually use, `tokens.css` defines
@@ -65,7 +71,7 @@ always the right choice.
65
71
 
66
72
  ## 2. What exists
67
73
 
68
- 35 CSS components and 9 web components, and this is the whole list. The
74
+ 36 CSS components and 10 web components, and this is the whole list. The
69
75
  classes are `lt-` + kebab-case. Variants are always `data-*` attributes, never
70
76
  classes of their own: `data-variant="secondary"`, not `lt-button--secondary`.
71
77
  The default variant has no attribute.
@@ -74,41 +80,42 @@ The default variant has no attribute.
74
80
 
75
81
  | Class | Stylesheet | Attributes |
76
82
  | --- | --- | --- |
77
- | `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/accordion/accordion.css` | `data-variant`: plain |
78
- | `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/alert/alert.css` | `data-color`: info, success, warning, danger |
79
- | `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/avatar/avatar.css` | `data-variant`: square<br>`data-size`: small, large |
80
- | `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/badge/badge.css` | `data-color`: success, warning, danger, neutral |
81
- | `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/breadcrumbs/breadcrumbs.css` | none |
82
- | `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/button/button.css` | `data-variant`: secondary, ghost, danger |
83
- | `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/card/card.css` | `data-variant`: filled<br>`data-interactive` (flag) |
84
- | `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/checkbox/checkbox.css` | `data-state`: invalid, success |
85
- | `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/divider/divider.css` | `data-variant`: subtle, strong |
86
- | `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/error-text/error-text.css` | `data-variant`: warning |
87
- | `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/fieldset/fieldset.css` | `data-state`: invalid, success<br>`data-required`: symbol, text<br>`data-optional` (flag) |
88
- | `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/file-upload/file-upload.css` | `data-state`: invalid, success |
89
- | `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/heading/heading.css` | `data-size`: xs, s, m, xl, mega |
90
- | `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/help-text/help-text.css` | `data-variant`: strong, success, warning |
91
- | `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/icon/icon.css` | none |
92
- | `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/input/input.css` | `data-state`: invalid, success<br>`data-variant`: date, datetime-local, time |
93
- | `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/label/label.css` | `data-required`: symbol, text<br>`data-optional` (flag) |
94
- | `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/link/link.css` | none |
95
- | `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/list/list.css` | `data-variant`: plain, divided |
96
- | `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/pagination/pagination.css` | none |
97
- | `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/paragraph/paragraph.css` | `data-variant`: lead<br>`data-size`: small, large |
98
- | `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/progress/progress.css` | `data-color`: success, warning, danger |
99
- | `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/radio/radio.css` | `data-state`: invalid, success |
100
- | `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/search/search.css` | `data-state`: invalid, success |
101
- | `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/select/select.css` | `data-state`: invalid, success<br>`data-picker`: styled |
102
- | `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/skeleton/skeleton.css` | `data-variant`: text, circle |
103
- | `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/skip-link/skip-link.css` | none |
104
- | `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/spinner/spinner.css` | `data-size`: small, large |
105
- | `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/sr-only/sr-only.css` | none |
106
- | `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/switch/switch.css` | none |
107
- | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/table/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
108
- | `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/tag/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
109
- | `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/textarea/textarea.css` | `data-state`: invalid, success |
110
- | `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/toggle-group/toggle-group.css` | none |
111
- | `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/tooltip/tooltip.css` | none |
83
+ | `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/accordion/accordion.css` | `data-variant`: plain |
84
+ | `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/alert/alert.css` | `data-color`: info, success, warning, danger |
85
+ | `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/avatar/avatar.css` | `data-variant`: square<br>`data-size`: small, large |
86
+ | `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/badge/badge.css` | `data-color`: success, warning, danger, neutral |
87
+ | `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/breadcrumbs/breadcrumbs.css` | none |
88
+ | `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/button/button.css` | `data-variant`: secondary, ghost, danger |
89
+ | `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/card/card.css` | `data-variant`: filled<br>`data-interactive` (flag) |
90
+ | `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/checkbox/checkbox.css` | `data-state`: invalid, success |
91
+ | `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/divider/divider.css` | `data-variant`: subtle, strong |
92
+ | `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/error-text/error-text.css` | `data-variant`: warning |
93
+ | `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/fieldset/fieldset.css` | `data-state`: invalid, success<br>`data-required`: symbol, text<br>`data-optional` (flag) |
94
+ | `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/file-upload/file-upload.css` | `data-state`: invalid, success |
95
+ | `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/heading/heading.css` | `data-size`: xs, s, m, xl, mega |
96
+ | `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/help-text/help-text.css` | `data-variant`: strong, success, warning |
97
+ | `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/icon/icon.css` | none |
98
+ | `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/input/input.css` | `data-state`: invalid, success<br>`data-variant`: date, datetime-local, time |
99
+ | `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/label/label.css` | `data-required`: symbol, text<br>`data-optional` (flag) |
100
+ | `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/link/link.css` | none |
101
+ | `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/list/list.css` | `data-variant`: plain, divided |
102
+ | `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/pagination/pagination.css` | none |
103
+ | `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/paragraph/paragraph.css` | `data-variant`: lead<br>`data-size`: small, large |
104
+ | `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/progress/progress.css` | `data-color`: success, warning, danger |
105
+ | `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/radio/radio.css` | `data-state`: invalid, success |
106
+ | `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/search/search.css` | `data-state`: invalid, success |
107
+ | `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/select/select.css` | `data-state`: invalid, success<br>`data-picker`: styled |
108
+ | `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/skeleton/skeleton.css` | `data-variant`: text, circle |
109
+ | `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/skip-link/skip-link.css` | none |
110
+ | `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/spinner/spinner.css` | `data-size`: small, large |
111
+ | `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/sr-only/sr-only.css` | none |
112
+ | `lt-steps` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/steps/steps.css` | none |
113
+ | `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/switch/switch.css` | none |
114
+ | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/table/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
115
+ | `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/tag/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
116
+ | `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/textarea/textarea.css` | `data-state`: invalid, success |
117
+ | `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/toggle-group/toggle-group.css` | none |
118
+ | `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/css/tooltip/tooltip.css` | none |
112
119
 
113
120
  There is also `lt-theme-control`, a class on a radio button that lets the user
114
121
  choose a theme. It is in `tokens.css`, and is described under Tokens.
@@ -187,7 +194,7 @@ root element:
187
194
  Below the root element the browser then ignores the host's CSS without a
188
195
  layer, unless a rule of the host's wins on specificity as described below, and
189
196
  LO-TEK's layer applies again. The rule is in `lotek.css` and in
190
- `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/tokens/boundary.css`.
197
+ `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/tokens/boundary.css`.
191
198
  Fonts and other inherited properties still come from the host, and the
192
199
  `--lt-*` variables work. Three things follow from it:
193
200
 
@@ -281,15 +288,16 @@ Three rules apply to all of them:
281
288
 
282
289
  | Element | Category | Stylesheet | Registration | Attributes | Events | Classes inside |
283
290
  | --- | --- | --- | --- | --- | --- | --- |
284
- | `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/field/field.css` | `defineLtField()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/field/lt-field.js` | `disabled` (flag)<br>`optional` (flag)<br>`described-by` (text) | none | none |
285
- | `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/tabs/tabs.css` | `defineLtTabs()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/tabs/lt-tabs.js` | `server-controlled` (flag)<br>`activation`: manual, automatic | `tab-select` (index) | `lt-tabs__list`<br>`lt-tabs__panel` |
286
- | `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/error-summary/error-summary.css` | `defineLtErrorSummary()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/error-summary/lt-error-summary.js` | `data-autofocus`: false, true<br>`hidden` (flag) | none | `lt-error-summary`<br>`lt-error-summary__title` |
287
- | `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/popover/popover.css` | `defineLtPopover()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/popover/lt-popover.js` | `open` (flag)<br>`placement`: bottom-start, bottom-end, top-start, top-end<br>`server-controlled` (flag) | `popover-toggle` (open) | `lt-popover` |
288
- | `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/suggestion/suggestion.css` | `defineLtSuggestion()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/suggestion/lt-suggestion.js` | `prefiltered` (flag)<br>`count-none` (text)<br>`count-zero` (text)<br>`count-one` (text)<br>`count-two` (text)<br>`count-few` (text)<br>`count-many` (text)<br>`count-other` (text)<br>`server-controlled` (flag) | `suggestion-select` (value, label) | `lt-suggestion__list`<br>`lt-suggestion__option`<br>`lt-suggestion__value`<br>`lt-suggestion__empty` |
289
- | `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/dialog/dialog.css` | `defineLtDialog()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/dialog/lt-dialog.js` | `open` (flag)<br>`server-controlled` (flag) | `dialog-toggle` (open, returnValue) | `lt-dialog` (`data-color`: brand, info, success, warning, danger)<br>`lt-dialog__body`<br>`lt-dialog__title`<br>`lt-dialog__footer`<br>`lt-dialog__header`<br>`lt-dialog__subtitle` |
290
- | `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/standalone/toast/toast.css` | `defineLtToast()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/standalone/toast/lt-toast.js` | `duration` (number)<br>`label` (text)<br>`close-label` (text) | `toast-dismiss` | `lt-toast`<br>`lt-toast__message`<br>`lt-toast__close` |
291
- | `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/frame/session-timeout/session-timeout.css` | `defineLtSessionTimeout()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/session-timeout/lt-session-timeout.js` | `warn-at` (number)<br>`expires-at` (number)<br>`activity-interval` (number) | `session-warn`<br>`session-extend`<br>`session-logout`<br>`session-expired`<br>`session-activity` | `lt-session-timeout`<br>`lt-session-timeout__dialog`<br>`lt-session-timeout__title`<br>`lt-session-timeout__text`<br>`lt-session-timeout__count`<br>`lt-session-timeout__actions` |
292
- | `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/standalone/connection-status/connection-status.css` | `defineLtConnectionStatus()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/standalone/connection-status/lt-connection-status.js` | `offline-text` (text)<br>`online-text` (text) | `connection-lost`<br>`connection-restored` | `lt-connection-status`<br>`lt-connection-status__bar` |
291
+ | `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/field/field.css` | `defineLtField()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/field/lt-field.js` | `disabled` (flag)<br>`optional` (flag)<br>`described-by` (text) | none | none |
292
+ | `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/tabs/tabs.css` | `defineLtTabs()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/tabs/lt-tabs.js` | `server-controlled` (flag)<br>`activation`: manual, automatic | `tab-select` (index) | `lt-tabs__list`<br>`lt-tabs__panel` |
293
+ | `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/error-summary/error-summary.css` | `defineLtErrorSummary()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/error-summary/lt-error-summary.js` | `data-autofocus`: false, true<br>`hidden` (flag) | none | `lt-error-summary`<br>`lt-error-summary__title` |
294
+ | `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/popover/popover.css` | `defineLtPopover()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/popover/lt-popover.js` | `open` (flag)<br>`placement`: bottom-start, bottom-end, top-start, top-end<br>`server-controlled` (flag) | `popover-toggle` (open) | `lt-popover` |
295
+ | `<lt-term>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/term/term.css` | `defineLtTerm()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/term/lt-term.js` | none | none | `lt-term`<br>`lt-term__entry` |
296
+ | `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/suggestion/suggestion.css` | `defineLtSuggestion()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/suggestion/lt-suggestion.js` | `prefiltered` (flag)<br>`count-none` (text)<br>`count-zero` (text)<br>`count-one` (text)<br>`count-two` (text)<br>`count-few` (text)<br>`count-many` (text)<br>`count-other` (text)<br>`server-controlled` (flag) | `suggestion-select` (value, label) | `lt-suggestion__list`<br>`lt-suggestion__option`<br>`lt-suggestion__value`<br>`lt-suggestion__empty` |
297
+ | `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/dialog/dialog.css` | `defineLtDialog()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/dialog/lt-dialog.js` | `open` (flag)<br>`server-controlled` (flag) | `dialog-toggle` (open, returnValue) | `lt-dialog` (`data-color`: brand, info, success, warning, danger)<br>`lt-dialog__body`<br>`lt-dialog__title`<br>`lt-dialog__footer`<br>`lt-dialog__header`<br>`lt-dialog__subtitle` |
298
+ | `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/standalone/toast/toast.css` | `defineLtToast()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/standalone/toast/lt-toast.js` | `duration` (number)<br>`label` (text)<br>`close-label` (text) | `toast-dismiss` | `lt-toast`<br>`lt-toast__message`<br>`lt-toast__close` |
299
+ | `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/frame/session-timeout/session-timeout.css` | `defineLtSessionTimeout()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/session-timeout/lt-session-timeout.js` | `warn-at` (number)<br>`expires-at` (number)<br>`activity-interval` (number) | `session-warn`<br>`session-extend`<br>`session-logout`<br>`session-expired`<br>`session-activity` | `lt-session-timeout`<br>`lt-session-timeout__dialog`<br>`lt-session-timeout__title`<br>`lt-session-timeout__text`<br>`lt-session-timeout__count`<br>`lt-session-timeout__actions` |
300
+ | `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/src/components/standalone/connection-status/connection-status.css` | `defineLtConnectionStatus()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/standalone/connection-status/lt-connection-status.js` | `offline-text` (text)<br>`online-text` (text) | `connection-lost`<br>`connection-restored` | `lt-connection-status`<br>`lt-connection-status__bar` |
293
301
 
294
302
  None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
295
303
  `FormData` and ordinary CSS work straight into it.
@@ -298,8 +306,8 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
298
306
 
299
307
  ```html
300
308
  <lt-field>
301
- <label class="lt-label" for="name" data-required="symbol">Full name</label>
302
- <input class="lt-input" id="name" type="text" name="name" value="{{.Name}}" required />
309
+ <label class="lt-label" for="codename" data-required="symbol">Codename</label>
310
+ <input class="lt-input" id="codename" type="text" name="codename" value="{{.Codename}}" required />
303
311
  {{if .Error}}<p class="lt-error-text">{{.Error}}</p>{{end}}
304
312
  </lt-field>
305
313
  ```
@@ -313,7 +321,7 @@ In a loop the id comes from a key in the data, never from the index or a
313
321
  counter:
314
322
 
315
323
  ```html
316
- {{range .Municipalities}}
324
+ {{range .Targets}}
317
325
  <lt-field>
318
326
  <label for="note-{{.Code}}">{{.Name}}</label>
319
327
  <input class="lt-input" id="note-{{.Code}}" name="note-{{.Code}}" value="{{.Note}}" />
@@ -326,7 +334,7 @@ The registration, once in the page template:
326
334
  ```html
327
335
  <script type="module">
328
336
  import { defineLtField } from
329
- "https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/field/lt-field.js"
337
+ "https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.41.0/dist/components/frame/field/lt-field.js"
330
338
 
331
339
  defineLtField()
332
340
  </script>
@@ -372,11 +380,11 @@ putting the user's choice back:
372
380
 
373
381
  ```html
374
382
  <lt-tabs server-controlled>
375
- <ul class="lt-tabs__list" aria-label="Parts of the case">
376
- <li><a href="#application">Application</a></li>
383
+ <ul class="lt-tabs__list" aria-label="Parts of the claim">
384
+ <li><a href="#claim">Claim</a></li>
377
385
  <li><a href="#attachments">Attachments</a></li>
378
386
  </ul>
379
- <section class="lt-tabs__panel" id="application">…</section>
387
+ <section class="lt-tabs__panel" id="claim">…</section>
380
388
  <section class="lt-tabs__panel" id="attachments" hidden="until-found">…</section>
381
389
  </lt-tabs>
382
390
  ```
@@ -437,14 +445,10 @@ sixteen template languages. WebStorm and IntelliJ IDEA Ultimate read
437
445
  completion in HTML in a string marked with `@Language("HTML")` or
438
446
  `// language=HTML`.
439
447
 
440
- On the JVM without Node there is LO-TEK for Kotlin
441
- (https://lo-tek.sobernetics.no/kotlin/). `lotek.jar` is the command line as
442
- `java -jar lotek.jar check`, and is attached to every release on GitHub:
443
- https://github.com/MarkusAugust/lo-tek/releases/latest. The Maven package
444
- `io.github.markusaugust:lo-tek-interfaces` with `assertLotek(html)` and the
445
- Gradle plugin `io.github.markusaugust.lo-tek` are on Maven Central, with the
446
- same version as the npm package. Not every npm version is on Maven: use the
447
- newest one there, and never write a `version` you have not seen on Central.
448
+ On the JVM without Node, JTE and Thymeleaf templates included, the check is
449
+ `assertLotek(html)` in a test, the Gradle plugin and
450
+ `java -jar lotek.jar check`. All of it is in
451
+ https://lo-tek.sobernetics.no/agent/kotlin.md.
448
452
 
449
453
  ## Known pitfalls
450
454
 
Binary file
package/core/lotek.wasm CHANGED
Binary file
@@ -23,7 +23,7 @@ export type AccordionAttributes = {
23
23
  *
24
24
  * ```ts
25
25
  * <details {...accordion()}>
26
- * <summary>Who can apply?</summary>
26
+ * <summary>Who can take out a policy?</summary>
27
27
  * <div class={accordion.content}>…</div>
28
28
  * </details>
29
29
  * ```
@@ -14,7 +14,7 @@ export const accordionVariants = ["default", "plain"];
14
14
  *
15
15
  * ```ts
16
16
  * <details {...accordion()}>
17
- * <summary>Who can apply?</summary>
17
+ * <summary>Who can take out a policy?</summary>
18
18
  * <div class={accordion.content}>…</div>
19
19
  * </details>
20
20
  * ```
@@ -22,7 +22,7 @@ export type AlertAttributes = {
22
22
  *
23
23
  * ```ts
24
24
  * <div {...alert({ color: "warning" })}>
25
- * <p class={alert.title}>The application has not been sent</p>
25
+ * <p class={alert.title}>Your routes have not been saved</p>
26
26
  * </div>
27
27
  * ```
28
28
  */
@@ -13,7 +13,7 @@ export const alertColors = ["info", "success", "warning", "danger"];
13
13
  *
14
14
  * ```ts
15
15
  * <div {...alert({ color: "warning" })}>
16
- * <p class={alert.title}>The application has not been sent</p>
16
+ * <p class={alert.title}>Your routes have not been saved</p>
17
17
  * </div>
18
18
  * ```
19
19
  */
@@ -26,7 +26,7 @@ export type AvatarAttributes = {
26
26
  * picture stands alone, it must have a text that says who it is.
27
27
  *
28
28
  * ```ts
29
- * <span {...avatar({ size: "small" })} aria-hidden="true">ON</span>
29
+ * <span {...avatar({ size: "small" })} aria-hidden="true">DP</span>
30
30
  * ```
31
31
  */
32
32
  export declare const avatar: (({ size, variant, }?: AvatarOptions) => AvatarAttributes) & {
@@ -12,7 +12,7 @@ export const avatarVariants = ["circle", "square"];
12
12
  * picture stands alone, it must have a text that says who it is.
13
13
  *
14
14
  * ```ts
15
- * <span {...avatar({ size: "small" })} aria-hidden="true">ON</span>
15
+ * <span {...avatar({ size: "small" })} aria-hidden="true">DP</span>
16
16
  * ```
17
17
  */
18
18
  export const avatar = Object.assign(({ size = "medium", variant = "circle", } = {}) => attributes({
@@ -14,7 +14,7 @@ export type BadgeAttributes = {
14
14
  * The attributes for a status badge.
15
15
  *
16
16
  * ```ts
17
- * <span {...badge({ color: "success" })}>Approved</span>
17
+ * <span {...badge({ color: "success" })}>Paid</span>
18
18
  * ```
19
19
  */
20
20
  export declare const badge: (({ color }?: BadgeOptions) => BadgeAttributes) & {
@@ -11,7 +11,7 @@ export const badgeColors = [
11
11
  * The attributes for a status badge.
12
12
  *
13
13
  * ```ts
14
- * <span {...badge({ color: "success" })}>Approved</span>
14
+ * <span {...badge({ color: "success" })}>Paid</span>
15
15
  * ```
16
16
  */
17
17
  export const badge = Object.assign(({ color = "info" } = {}) => attributes({
@@ -17,7 +17,7 @@ export type BreadcrumbsAttributes = {
17
17
  * <nav aria-label="You are here">
18
18
  * <ol {...breadcrumbs()}>
19
19
  * <li><a href="/">Home</a></li>
20
- * <li><a href="/cases" aria-current="page">My cases</a></li>
20
+ * <li><a href="/claims" aria-current="page">My claims</a></li>
21
21
  * </ol>
22
22
  * </nav>
23
23
  * ```
@@ -15,7 +15,7 @@ export const BREADCRUMBS_CLASS = "lt-breadcrumbs";
15
15
  * <nav aria-label="You are here">
16
16
  * <ol {...breadcrumbs()}>
17
17
  * <li><a href="/">Home</a></li>
18
- * <li><a href="/cases" aria-current="page">My cases</a></li>
18
+ * <li><a href="/claims" aria-current="page">My claims</a></li>
19
19
  * </ol>
20
20
  * </nav>
21
21
  * ```
@@ -24,7 +24,7 @@ export type CardAttributes = {
24
24
  * reached with the keyboard nor be announced as something to press.
25
25
  *
26
26
  * ```ts
27
- * <a {...card({ interactive: true })} href="/case/481">…</a>
27
+ * <a {...card({ interactive: true })} href="/claims/AV-2079-0481">…</a>
28
28
  * ```
29
29
  */
30
30
  export declare const card: (({ variant, interactive }?: CardOptions) => CardAttributes) & {
@@ -12,7 +12,7 @@ export const cardVariants = ["outline", "filled"];
12
12
  * reached with the keyboard nor be announced as something to press.
13
13
  *
14
14
  * ```ts
15
- * <a {...card({ interactive: true })} href="/case/481">…</a>
15
+ * <a {...card({ interactive: true })} href="/claims/AV-2079-0481">…</a>
16
16
  * ```
17
17
  */
18
18
  export const card = Object.assign(({ variant = "outline", interactive } = {}) => attributes({
@@ -29,7 +29,7 @@ export type FileUploadAttributes = {
29
29
  * "all files", so the type must be checked on the server anyway.
30
30
  *
31
31
  * ```ts
32
- * <input {...fileUpload({ multiple: true, accept: ".pdf" })} />
32
+ * <input {...fileUpload({ multiple: true, accept: ".bin" })} />
33
33
  * ```
34
34
  */
35
35
  export declare const fileUpload: (({ state, multiple, accept, }?: FileUploadOptions) => FileUploadAttributes) & {
@@ -13,7 +13,7 @@ export const FILE_UPLOAD_LIST_CLASS = "lt-file-upload-list";
13
13
  * "all files", so the type must be checked on the server anyway.
14
14
  *
15
15
  * ```ts
16
- * <input {...fileUpload({ multiple: true, accept: ".pdf" })} />
16
+ * <input {...fileUpload({ multiple: true, accept: ".bin" })} />
17
17
  * ```
18
18
  */
19
19
  export const fileUpload = Object.assign(({ state = "default", multiple, accept, } = {}) => attributes({
@@ -25,7 +25,7 @@ export type IconAttributes = {
25
25
  * reports a button that lacks one.
26
26
  *
27
27
  * ```ts
28
- * <button {...button()} aria-label="Delete the application">
28
+ * <button {...button()} aria-label="Delete ticket #0331">
29
29
  * <svg {...icon()} viewBox="0 0 24 24">…</svg>
30
30
  * </button>
31
31
  * ```
@@ -11,7 +11,7 @@ export const ICON_CLASS = "lt-icon";
11
11
  * reports a button that lacks one.
12
12
  *
13
13
  * ```ts
14
- * <button {...button()} aria-label="Delete the application">
14
+ * <button {...button()} aria-label="Delete ticket #0331">
15
15
  * <svg {...icon()} viewBox="0 0 24 24">…</svg>
16
16
  * </button>
17
17
  * ```
@@ -23,7 +23,7 @@ export type LabelAttributes = {
23
23
  * or the screen reader is not told that it must be filled in.
24
24
  *
25
25
  * ```ts
26
- * <label {...label({ required: "symbol" })} htmlFor="email">Email address</label>
26
+ * <label {...label({ required: "symbol" })} htmlFor="fixer">Fixer's address</label>
27
27
  * ```
28
28
  */
29
29
  export declare const label: (({ required, optional, disabled }?: LabelOptions) => LabelAttributes) & {
@@ -8,7 +8,7 @@ export { requiredMarkers };
8
8
  * or the screen reader is not told that it must be filled in.
9
9
  *
10
10
  * ```ts
11
- * <label {...label({ required: "symbol" })} htmlFor="email">Email address</label>
11
+ * <label {...label({ required: "symbol" })} htmlFor="fixer">Fixer's address</label>
12
12
  * ```
13
13
  */
14
14
  export const label = Object.assign(({ required, optional, disabled } = {}) => attributes({
@@ -17,7 +17,7 @@ export type LinkAttributes = {
17
17
  * The attributes for a link.
18
18
  *
19
19
  * ```ts
20
- * <a {...link()} href="/receipt">See receipt</a>
20
+ * <a {...link()} href="/small-print">Read the small print</a>
21
21
  * <a {...link({ disabled: true })}>See annual statement</a>
22
22
  * ```
23
23
  *
@@ -4,7 +4,7 @@ export const LINK_CLASS = "lt-link";
4
4
  * The attributes for a link.
5
5
  *
6
6
  * ```ts
7
- * <a {...link()} href="/receipt">See receipt</a>
7
+ * <a {...link()} href="/small-print">Read the small print</a>
8
8
  * <a {...link({ disabled: true })}>See annual statement</a>
9
9
  * ```
10
10
  *
@@ -13,17 +13,19 @@ export type SpinnerAttributes = {
13
13
  "data-size"?: NonDefaultSpinnerSize;
14
14
  role?: "status";
15
15
  "aria-label"?: string;
16
+ "aria-hidden"?: "true";
16
17
  };
17
18
  /**
18
19
  * The attributes for a loading indicator.
19
20
  *
20
- * Without `label` the ring is only a shape, and screen readers announce
21
- * nothing. With `label` it becomes a `role="status"` that says what is going
22
- * on. If you already have a visible text next to it, let that carry the
23
- * message and drop `label`, so the same thing is not announced twice.
21
+ * Without `label` the ring is only a shape, and is hidden from screen readers
22
+ * with `aria-hidden`, as an icon without a label is. With `label` it becomes a
23
+ * `role="status"` that says what is going on. If you already have a visible
24
+ * text next to it, let that carry the message and drop `label`, so the same
25
+ * thing is not announced twice.
24
26
  *
25
27
  * ```ts
26
- * <span {...spinner({ label: "Loading applications" })} />
28
+ * <span {...spinner({ label: "Loading sectors" })} />
27
29
  * ```
28
30
  */
29
31
  export declare const spinner: (({ size, label }?: SpinnerOptions) => SpinnerAttributes) & {
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/css/spinner/spinner.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAG,YAAqB,CAAA;AAElD,eAAO,MAAM,YAAY,uCAAwC,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;AAElE,MAAM,MAAM,cAAc,GAAG;IAC3B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAA;IAC3B,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,sBACW,cAAc,KAAQ,iBAAiB;;;CAWrE,CAAA"}
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/css/spinner/spinner.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAG,YAAqB,CAAA;AAElD,eAAO,MAAM,YAAY,uCAAwC,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;AAElE,MAAM,MAAM,cAAc,GAAG;IAC3B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAA;IAC3B,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,sBACW,cAAc,KAAQ,iBAAiB;;;CAYrE,CAAA"}