@lo-tek/interfaces 0.40.0 → 0.42.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 (82) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/agent/astro.md +9 -7
  3. package/agent/bundles.md +8 -6
  4. package/agent/datastar.md +60 -51
  5. package/agent/html.md +55 -53
  6. package/agent/kotlin.md +622 -0
  7. package/agent/react.md +8 -6
  8. package/agent/templates.md +60 -63
  9. package/core/lotek-core.wasm +0 -0
  10. package/core/lotek.wasm +0 -0
  11. package/dist/components/css/steps/steps.d.ts +23 -0
  12. package/dist/components/css/steps/steps.d.ts.map +1 -0
  13. package/dist/components/css/steps/steps.js +21 -0
  14. package/dist/components/css/steps/steps.js.map +1 -0
  15. package/dist/components/events.d.ts +3 -1
  16. package/dist/components/events.d.ts.map +1 -1
  17. package/dist/components/frame/error-summary/lt-error-summary.js +1 -1
  18. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -1
  19. package/dist/components/frame/popover/lt-popover.js +4 -19
  20. package/dist/components/frame/popover/lt-popover.js.map +1 -1
  21. package/dist/components/frame/term/lt-term.d.ts +114 -0
  22. package/dist/components/frame/term/lt-term.d.ts.map +1 -0
  23. package/dist/components/frame/term/lt-term.js +530 -0
  24. package/dist/components/frame/term/lt-term.js.map +1 -0
  25. package/dist/components/frame/term/term.d.ts +55 -0
  26. package/dist/components/frame/term/term.d.ts.map +1 -0
  27. package/dist/components/frame/term/term.js +55 -0
  28. package/dist/components/frame/term/term.js.map +1 -0
  29. package/dist/components/host-element.d.ts +19 -0
  30. package/dist/components/host-element.d.ts.map +1 -1
  31. package/dist/components/host-element.js +37 -0
  32. package/dist/components/host-element.js.map +1 -1
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +3 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/jsx/react.d.ts +3 -1
  38. package/dist/jsx/react.d.ts.map +1 -1
  39. package/dist/lotek.css +351 -1
  40. package/dist/lt.d.ts +8 -1
  41. package/dist/lt.d.ts.map +1 -1
  42. package/dist/lt.js +9 -1
  43. package/dist/lt.js.map +1 -1
  44. package/dist/react.d.ts +19 -0
  45. package/dist/react.d.ts.map +1 -1
  46. package/dist/react.js +14 -0
  47. package/dist/react.js.map +1 -1
  48. package/dist/register.d.ts.map +1 -1
  49. package/dist/register.js +2 -0
  50. package/dist/register.js.map +1 -1
  51. package/dist/vocabulary/classes.d.ts.map +1 -1
  52. package/dist/vocabulary/classes.js +60 -6
  53. package/dist/vocabulary/classes.js.map +1 -1
  54. package/dist/vocabulary/elements.d.ts.map +1 -1
  55. package/dist/vocabulary/elements.js +15 -2
  56. package/dist/vocabulary/elements.js.map +1 -1
  57. package/dist/vocabulary/types.d.ts +8 -3
  58. package/dist/vocabulary/types.d.ts.map +1 -1
  59. package/live-templates-kotlin.xml +15 -12
  60. package/live-templates.xml +12 -6
  61. package/manifest/files.json +18 -0
  62. package/manifest/manifest.json +145 -10
  63. package/package.json +15 -5
  64. package/src/components/css/steps/steps.css +240 -0
  65. package/src/components/css/steps/steps.ts +26 -0
  66. package/src/components/events.ts +3 -1
  67. package/src/components/frame/error-summary/lt-error-summary.ts +1 -1
  68. package/src/components/frame/popover/lt-popover.ts +4 -24
  69. package/src/components/frame/term/lt-term.ts +573 -0
  70. package/src/components/frame/term/term.css +177 -0
  71. package/src/components/frame/term/term.ts +87 -0
  72. package/src/components/host-element.ts +46 -0
  73. package/src/index.ts +4 -0
  74. package/src/jsx/react.ts +4 -0
  75. package/src/lt.ts +9 -1
  76. package/src/react.ts +15 -0
  77. package/src/register.ts +2 -0
  78. package/src/tokens/tokens.css +4 -0
  79. package/src/vocabulary/classes.ts +60 -6
  80. package/src/vocabulary/elements.ts +15 -2
  81. package/src/vocabulary/types.ts +8 -3
  82. package/web-types.json +31 -10
package/CHANGELOG.md CHANGED
@@ -24,6 +24,109 @@ including 0.36.0 were written in Norwegian, and list them under "Brytende".
24
24
 
25
25
  ## Unreleased
26
26
 
27
+ ## 0.42.0 (2026-11-06)
28
+
29
+ ### Changed
30
+
31
+ - **The Kotlin live templates have no script of their own.** They are the
32
+ Datastar recipe rendered by the server: the dialog is sent open and its
33
+ choices go with `@post`, Escape included through `data-on:cancel`, the
34
+ session timeout sends its events on with `data-on`, the toast's button
35
+ posts and the server answers with the call to `show()`, and the
36
+ connection status hears of a lost server through
37
+ `data-on:datastar-fetch__document`. The page needs Datastar, loaded once
38
+ in its template after the registration, and the server answers with a
39
+ 200: the signals as `application/json`, or as `text/javascript` the
40
+ toast's call and, for a session that is already gone, the way to log in.
41
+
42
+ ### Fixed
43
+
44
+ - **The rulebook for Datastar, `agent/datastar.md`, loads Datastar after
45
+ the registration.** Module scripts run in the order they stand, and with
46
+ Datastar first the answer to a request at load could reach a web component
47
+ before it was registered.
48
+ - **`agent/datastar.md` says how Escape reaches the server from a dialog.**
49
+ Escape is a close request, reported with `cancel` on the `<dialog>`, and
50
+ `dialog-toggle` cannot tell it from a close the server makes.
51
+
52
+ ## 0.41.0 (2026-11-05)
53
+
54
+ ### Added
55
+
56
+ - **A rulebook for coding agents on a Kotlin or Java server, `agent/kotlin.md`.**
57
+ It covers `Lt` with a table of every enum and its constants, kotlinx.html
58
+ and strings, the WebJar and `LotekWebJar`, ids from a key in the data,
59
+ `assertLotek` in tests, the Gradle plugin and `lotek.jar`. `llms.txt`
60
+ names Kotlin and the check without Node.
61
+ - **`<lt-term>` and `lt.term()`: a word in the text that shows its entry
62
+ from a glossary on the same page.** The word is a link to the entry, a
63
+ `<div>` with a `<dt>` and a `<dd>` in a `<dl>`, and stays one without
64
+ JavaScript. The web component shows the entry itself as a card by the
65
+ word, in the top layer: the mouse opens it after a rest, a click, a tap or
66
+ Enter pins it, and Escape, a click outside or the word scrolling out of
67
+ view closes it. Below the `sm` breakpoint the card is a sheet across the
68
+ bottom of the window, or the top when the word is down there. Nothing is
69
+ copied and no id is made in the browser, so the card survives an update
70
+ from the server. `lt.term({ id })` writes `href` and `aria-details` on the
71
+ link, the classes `lt-term` and `lt-term__entry`, and the id; `/react`
72
+ adds `aria-expanded="false"`. `Lt.term()` in Kotlin, and `ltTerm` and
73
+ `ltTermEntry` in kotlinx.html. New entry points `./term` and
74
+ `./term.css`, new component variables `--lt-term-width`,
75
+ `--lt-term-gap`, `--lt-term-padding`, `--lt-term-radius`,
76
+ `--lt-term-accent-color`, `--lt-term-underline-color`,
77
+ `--lt-term-label-text`, `--lt-term-label-font` and
78
+ `--lt-term-sheet-height`, and the default text "Glossary".
79
+ - **`lt-steps` and `lt.steps()`: a step indicator for a task over several
80
+ pages.** The class goes on an `<ol>` with one `<li>` per step, and
81
+ `aria-current="step"` on the step the user is on. The steps before it are
82
+ drawn as done, with a check the screen reader reads as "Completed", as part
83
+ of the step's link when it has one. Below `28rem` of the list's own width
84
+ the steps stand in a column. `Lt.steps()` in Kotlin. New entry points
85
+ `./steps` and `./steps.css`, new component variables
86
+ `--lt-steps-marker-size`, `--lt-steps-done-icon` and
87
+ `--lt-steps-done-text`, and the default text
88
+ "Completed ".
89
+ - **The check reports `untranslated-text` for the step indicator's
90
+ "Completed "** on a page in another language, as for the other texts in
91
+ the stylesheets. In the manifest's `texts` on a class,
92
+ `siblingsBefore: true` is a text shown on the children before the one with
93
+ the attribute, and the Kotlin `CssText` has `siblingsBefore`. The term's
94
+ "Glossary" is not checked, since the card shows it only while it is open.
95
+ - **The check reports `term-without-entry`** on a whole page, when a word
96
+ in `<lt-term>` points at an id the page does not have, or at something
97
+ that is not a glossary entry.
98
+ - **`place()` in `@lo-tek/interfaces/host-element`**, the placement
99
+ `<lt-popover>` worked out, now shared with `<lt-term>`.
100
+
101
+ ### Changed
102
+
103
+ - **`lotek agent` gives the Kotlin rulebook in a folder with
104
+ `build.gradle.kts`, `build.gradle`, `settings.gradle.kts`,
105
+ `settings.gradle` or `pom.xml`,** unless `package.json` names a framework
106
+ other than Vite. Such a folder used to get `templates`, or `bundles` when it
107
+ also had a `package.json`. `--framework=templates` and
108
+ `--framework=bundles` still give those.
109
+
110
+ ### Fixed
111
+
112
+ - **The snippets and the live templates follow the corrected recipes.** In
113
+ the HTML snippets and live templates the error summary and the field post
114
+ to the server, the popover's actions are forms that post, and the session
115
+ timeout logs out with a post. In the Kotlin live templates the error
116
+ summary has no script, and it and the field take what was typed; the
117
+ popover, the tabs and the suggestion have no script; the dialog's Cancel
118
+ and the session timeout's Log out post to the server; and the toast tells
119
+ a refused restart from one that got no answer, and a redirect from a
120
+ restart. The switch saves only an answer that is not a redirect, and
121
+ stands in a `<form autocomplete="off">`, since HTML does not allow the
122
+ attribute on a checkbox. The Kotlin live template for the error summary
123
+ inserted the browser validation from the HTML recipe, which a Kotlin
124
+ server does itself.
125
+ - **The editor descriptions of `session-logout` and `<lt-dialog>`.**
126
+ `session-logout` comes only from a Log out button that closes the dialog;
127
+ one with `formmethod="post"` submits instead. `<lt-dialog>` makes a dialog
128
+ the server sends open a real modal.
129
+
27
130
  ## 0.40.0 (2026-11-03)
28
131
 
29
132
  ### Breaking
package/agent/astro.md CHANGED
@@ -9,7 +9,7 @@ this runs at build time: out comes plain HTML, and `lt` is gone once the page
9
9
  is built. The only JavaScript the browser gets from the package is the
10
10
  registration of the web components you use, in a `<script>`.
11
11
 
12
- This is @lo-tek/interfaces 0.40.0. The file is generated by the package and
12
+ This is @lo-tek/interfaces 0.42.0. The file is generated by the package and
13
13
  follows its version, so it can never say anything other than the code next to
14
14
  it.
15
15
 
@@ -59,7 +59,7 @@ component, `tokens.css` belongs there, once for the whole page.
59
59
 
60
60
  ## 2. What exists
61
61
 
62
- 35 CSS components and 9 web components, and this is the whole list. The
62
+ 36 CSS components and 10 web components, and this is the whole list. The
63
63
  classes are `lt-` + kebab-case. Variants are always `data-*` attributes, never
64
64
  classes of their own: `data-variant="secondary"`, not `lt-button--secondary`.
65
65
  The default variant has no attribute.
@@ -97,6 +97,7 @@ The default variant has no attribute.
97
97
  | `lt-skip-link` | `@lo-tek/interfaces/skip-link.css` | none |
98
98
  | `lt-spinner` | `@lo-tek/interfaces/spinner.css` | `data-size`: small, large |
99
99
  | `lt-sr-only` | `@lo-tek/interfaces/sr-only.css` | none |
100
+ | `lt-steps` | `@lo-tek/interfaces/steps.css` | none |
100
101
  | `lt-switch`<br>`lt-switch-row` | `@lo-tek/interfaces/switch.css` | none |
101
102
  | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `@lo-tek/interfaces/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
102
103
  | `lt-tag` | `@lo-tek/interfaces/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
@@ -279,6 +280,7 @@ Three rules apply to all of them:
279
280
  | `<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` |
280
281
  | `<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` |
281
282
  | `<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` |
283
+ | `<lt-term>` | frame | `@lo-tek/interfaces/term.css` | `defineLtTerm()` from `@lo-tek/interfaces/term` | none | none | `lt-term`<br>`lt-term__entry` |
282
284
  | `<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` |
283
285
  | `<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` |
284
286
  | `<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` |
@@ -309,7 +311,7 @@ Runs at build time. Out comes plain HTML:
309
311
  <span class="lt-badge" data-color="success">Approved</span>
310
312
  ```
311
313
 
312
- `lt` is imported from the main entry, which gives `class` and `for`. The 46
314
+ `lt` is imported from the main entry, which gives `class` and `for`. The 48
313
315
  builder functions:
314
316
 
315
317
  `lt.accordion()`, `lt.alert()`, `lt.avatar()`, `lt.badge()`,
@@ -320,9 +322,9 @@ builder functions:
320
322
  `lt.legend()`, `lt.link()`, `lt.list()`, `lt.pagination()`, `lt.paragraph()`,
321
323
  `lt.popover()`, `lt.progress()`, `lt.radio()`, `lt.search()`, `lt.select()`,
322
324
  `lt.sessionTimeout()`, `lt.skeleton()`, `lt.skipLink()`, `lt.spinner()`,
323
- `lt.srOnly()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
324
- `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.textarea()`, `lt.toast()`,
325
- `lt.toggleGroup()`, `lt.tooltip()`
325
+ `lt.srOnly()`, `lt.steps()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
326
+ `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.term()`, `lt.textarea()`,
327
+ `lt.toast()`, `lt.toggleGroup()`, `lt.tooltip()`
326
328
 
327
329
  ## 6. Fields without JavaScript
328
330
 
@@ -341,7 +343,7 @@ const fixer = lt.field({ id: "fixer", required: "symbol", help: true, error: tru
341
343
  <label {...fixer.label}>Fixer's address</label>
342
344
  <input {...lt.input({ type: "email" })} {...fixer.control} name="fixer" required />
343
345
  <p {...lt.helpText()} {...fixer.help}>The board writes to the fixer, never to the crew.</p>
344
- <p {...lt.errorText()} {...fixer.error}>Enter a valid address.</p>
346
+ <p {...lt.errorText()} {...fixer.error}>Enter the fixer's address, for example fixer@relay.example.</p>
345
347
  ```
346
348
 
347
349
  No `<lt-field>`, no runtime.
package/agent/bundles.md CHANGED
@@ -10,7 +10,7 @@ names, and `defineLt*()` runs at the top of `main.ts`. If you write React, the
10
10
  attribute names differ and `react.md` applies instead. If you write Astro, the
11
11
  stylesheets are imported in the frontmatter and `astro.md` applies.
12
12
 
13
- This is @lo-tek/interfaces 0.40.0. The file is generated by the package and
13
+ This is @lo-tek/interfaces 0.42.0. The file is generated by the package and
14
14
  follows its version, so it can never say anything other than the code next to
15
15
  it.
16
16
 
@@ -63,7 +63,7 @@ page does not use.
63
63
 
64
64
  ## 2. What exists
65
65
 
66
- 35 CSS components and 9 web components, and this is the whole list. The
66
+ 36 CSS components and 10 web components, and this is the whole list. The
67
67
  classes are `lt-` + kebab-case. Variants are always `data-*` attributes, never
68
68
  classes of their own: `data-variant="secondary"`, not `lt-button--secondary`.
69
69
  The default variant has no attribute.
@@ -101,6 +101,7 @@ The default variant has no attribute.
101
101
  | `lt-skip-link` | `@lo-tek/interfaces/skip-link.css` | none |
102
102
  | `lt-spinner` | `@lo-tek/interfaces/spinner.css` | `data-size`: small, large |
103
103
  | `lt-sr-only` | `@lo-tek/interfaces/sr-only.css` | none |
104
+ | `lt-steps` | `@lo-tek/interfaces/steps.css` | none |
104
105
  | `lt-switch`<br>`lt-switch-row` | `@lo-tek/interfaces/switch.css` | none |
105
106
  | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `@lo-tek/interfaces/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
106
107
  | `lt-tag` | `@lo-tek/interfaces/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
@@ -283,6 +284,7 @@ Three rules apply to all of them:
283
284
  | `<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` |
284
285
  | `<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` |
285
286
  | `<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` |
287
+ | `<lt-term>` | frame | `@lo-tek/interfaces/term.css` | `defineLtTerm()` from `@lo-tek/interfaces/term` | none | none | `lt-term`<br>`lt-term__entry` |
286
288
  | `<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` |
287
289
  | `<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` |
288
290
  | `<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` |
@@ -339,7 +341,7 @@ lt.button({ variant: "secondary" })
339
341
 
340
342
  The builder functions return an object with HTML attribute names, which is
341
343
  spread in where the template language supports spreading, or read out field by
342
- field. The 46 builder functions:
344
+ field. The 48 builder functions:
343
345
 
344
346
  `lt.accordion()`, `lt.alert()`, `lt.avatar()`, `lt.badge()`,
345
347
  `lt.breadcrumbs()`, `lt.button()`, `lt.card()`, `lt.checkbox()`,
@@ -349,9 +351,9 @@ field. The 46 builder functions:
349
351
  `lt.legend()`, `lt.link()`, `lt.list()`, `lt.pagination()`, `lt.paragraph()`,
350
352
  `lt.popover()`, `lt.progress()`, `lt.radio()`, `lt.search()`, `lt.select()`,
351
353
  `lt.sessionTimeout()`, `lt.skeleton()`, `lt.skipLink()`, `lt.spinner()`,
352
- `lt.srOnly()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
353
- `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.textarea()`, `lt.toast()`,
354
- `lt.toggleGroup()`, `lt.tooltip()`
354
+ `lt.srOnly()`, `lt.steps()`, `lt.suggestion()`, `lt.switch()`, `lt.table()`,
355
+ `lt.tableSort()`, `lt.tabs()`, `lt.tag()`, `lt.term()`, `lt.textarea()`,
356
+ `lt.toast()`, `lt.toggleGroup()`, `lt.tooltip()`
355
357
 
356
358
  Where the template language cannot spread an object, `lt.setAttributes()` sets
357
359
  the attributes on an element in plain DOM:
package/agent/datastar.md CHANGED
@@ -8,7 +8,7 @@ That means two things for this file: the addresses are URLs, since a browser
8
8
  without a bundler does not resolve a package name, and the state is controlled
9
9
  with attributes, which is exactly what the `frame` components expect.
10
10
 
11
- This is @lo-tek/interfaces 0.40.0. The file is generated by the package and
11
+ This is @lo-tek/interfaces 0.42.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
 
@@ -39,21 +39,27 @@ it.
39
39
  ## 1. The stylesheet and Datastar
40
40
 
41
41
  ```html
42
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/dist/lotek.css">
42
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/dist/lotek.css">
43
+ <!-- The registration, defineLt*(), stands here, before Datastar. -->
43
44
  <script
44
45
  type="module"
45
46
  src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.4/bundles/datastar.js"
46
47
  ></script>
47
48
  ```
48
49
 
49
- `lotek.css` is 103 kB, 13 kB compressed, and has all the components. If you
50
+ **Datastar after the `defineLt*()` script.** Module scripts run in the order
51
+ they stand. With Datastar first, the answer to a request at load can reach a
52
+ web component before it is registered, and a `data-on` that calls one of its
53
+ methods throws. Never `async` on either.
54
+
55
+ `lotek.css` is 112 kB, 14 kB compressed, and has all the components. If you
50
56
  want only what you use, `tokens.css` defines all the variables, and all the
51
57
  other stylesheets build on it. It must be loaded, and comes first out of
52
58
  habit: the order between it and the others does not matter.
53
59
 
54
60
  ## 2. What exists
55
61
 
56
- 35 CSS components and 9 web components, and this is the whole list. The
62
+ 36 CSS components and 10 web components, and this is the whole list. The
57
63
  classes are `lt-` + kebab-case. Variants are always `data-*` attributes, never
58
64
  classes of their own: `data-variant="secondary"`, not `lt-button--secondary`.
59
65
  The default variant has no attribute.
@@ -62,41 +68,42 @@ The default variant has no attribute.
62
68
 
63
69
  | Class | Stylesheet | Attributes |
64
70
  | --- | --- | --- |
65
- | `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/accordion/accordion.css` | `data-variant`: plain |
66
- | `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/alert/alert.css` | `data-color`: info, success, warning, danger |
67
- | `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/avatar/avatar.css` | `data-variant`: square<br>`data-size`: small, large |
68
- | `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/badge/badge.css` | `data-color`: success, warning, danger, neutral |
69
- | `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/breadcrumbs/breadcrumbs.css` | none |
70
- | `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/button/button.css` | `data-variant`: secondary, ghost, danger |
71
- | `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/card/card.css` | `data-variant`: filled<br>`data-interactive` (flag) |
72
- | `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/checkbox/checkbox.css` | `data-state`: invalid, success |
73
- | `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/divider/divider.css` | `data-variant`: subtle, strong |
74
- | `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/error-text/error-text.css` | `data-variant`: warning |
75
- | `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/fieldset/fieldset.css` | `data-state`: invalid, success<br>`data-required`: symbol, text<br>`data-optional` (flag) |
76
- | `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/file-upload/file-upload.css` | `data-state`: invalid, success |
77
- | `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/heading/heading.css` | `data-size`: xs, s, m, xl, mega |
78
- | `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/help-text/help-text.css` | `data-variant`: strong, success, warning |
79
- | `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/icon/icon.css` | none |
80
- | `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/input/input.css` | `data-state`: invalid, success<br>`data-variant`: date, datetime-local, time |
81
- | `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/label/label.css` | `data-required`: symbol, text<br>`data-optional` (flag) |
82
- | `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/link/link.css` | none |
83
- | `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/list/list.css` | `data-variant`: plain, divided |
84
- | `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/pagination/pagination.css` | none |
85
- | `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/paragraph/paragraph.css` | `data-variant`: lead<br>`data-size`: small, large |
86
- | `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/progress/progress.css` | `data-color`: success, warning, danger |
87
- | `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/radio/radio.css` | `data-state`: invalid, success |
88
- | `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/search/search.css` | `data-state`: invalid, success |
89
- | `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/select/select.css` | `data-state`: invalid, success<br>`data-picker`: styled |
90
- | `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/skeleton/skeleton.css` | `data-variant`: text, circle |
91
- | `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/skip-link/skip-link.css` | none |
92
- | `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/spinner/spinner.css` | `data-size`: small, large |
93
- | `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/sr-only/sr-only.css` | none |
94
- | `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/switch/switch.css` | none |
95
- | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/table/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
96
- | `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/tag/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
97
- | `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/textarea/textarea.css` | `data-state`: invalid, success |
98
- | `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/toggle-group/toggle-group.css` | none |
99
- | `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/css/tooltip/tooltip.css` | none |
71
+ | `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/accordion/accordion.css` | `data-variant`: plain |
72
+ | `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/alert/alert.css` | `data-color`: info, success, warning, danger |
73
+ | `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/avatar/avatar.css` | `data-variant`: square<br>`data-size`: small, large |
74
+ | `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/badge/badge.css` | `data-color`: success, warning, danger, neutral |
75
+ | `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/breadcrumbs/breadcrumbs.css` | none |
76
+ | `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/button/button.css` | `data-variant`: secondary, ghost, danger |
77
+ | `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/card/card.css` | `data-variant`: filled<br>`data-interactive` (flag) |
78
+ | `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/checkbox/checkbox.css` | `data-state`: invalid, success |
79
+ | `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/divider/divider.css` | `data-variant`: subtle, strong |
80
+ | `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/error-text/error-text.css` | `data-variant`: warning |
81
+ | `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/fieldset/fieldset.css` | `data-state`: invalid, success<br>`data-required`: symbol, text<br>`data-optional` (flag) |
82
+ | `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/file-upload/file-upload.css` | `data-state`: invalid, success |
83
+ | `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/heading/heading.css` | `data-size`: xs, s, m, xl, mega |
84
+ | `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/help-text/help-text.css` | `data-variant`: strong, success, warning |
85
+ | `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/icon/icon.css` | none |
86
+ | `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/input/input.css` | `data-state`: invalid, success<br>`data-variant`: date, datetime-local, time |
87
+ | `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/label/label.css` | `data-required`: symbol, text<br>`data-optional` (flag) |
88
+ | `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/link/link.css` | none |
89
+ | `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/list/list.css` | `data-variant`: plain, divided |
90
+ | `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/pagination/pagination.css` | none |
91
+ | `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/paragraph/paragraph.css` | `data-variant`: lead<br>`data-size`: small, large |
92
+ | `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/progress/progress.css` | `data-color`: success, warning, danger |
93
+ | `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/radio/radio.css` | `data-state`: invalid, success |
94
+ | `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/search/search.css` | `data-state`: invalid, success |
95
+ | `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/select/select.css` | `data-state`: invalid, success<br>`data-picker`: styled |
96
+ | `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/skeleton/skeleton.css` | `data-variant`: text, circle |
97
+ | `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/skip-link/skip-link.css` | none |
98
+ | `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/spinner/spinner.css` | `data-size`: small, large |
99
+ | `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/sr-only/sr-only.css` | none |
100
+ | `lt-steps` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/steps/steps.css` | none |
101
+ | `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/switch/switch.css` | none |
102
+ | `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/table/table.css` | `data-variant`: striped<br>`data-hoverable` (flag) |
103
+ | `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/tag/tag.css` | `data-variant`: filled<br>`data-selectable` (flag) |
104
+ | `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/textarea/textarea.css` | `data-state`: invalid, success |
105
+ | `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/toggle-group/toggle-group.css` | none |
106
+ | `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/css/tooltip/tooltip.css` | none |
100
107
 
101
108
  There is also `lt-theme-control`, a class on a radio button that lets the user
102
109
  choose a theme. It is in `tokens.css`, and is described under Tokens.
@@ -175,7 +182,7 @@ root element:
175
182
  Below the root element the browser then ignores the host's CSS without a
176
183
  layer, unless a rule of the host's wins on specificity as described below, and
177
184
  LO-TEK's layer applies again. The rule is in `lotek.css` and in
178
- `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/tokens/boundary.css`.
185
+ `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/tokens/boundary.css`.
179
186
  Fonts and other inherited properties still come from the host, and the
180
187
  `--lt-*` variables work. Three things follow from it:
181
188
 
@@ -269,15 +276,16 @@ Three rules apply to all of them:
269
276
 
270
277
  | Element | Category | Stylesheet | Registration | Attributes | Events | Classes inside |
271
278
  | --- | --- | --- | --- | --- | --- | --- |
272
- | `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/field/field.css` | `defineLtField()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/dist/components/frame/field/lt-field.js` | `disabled` (flag)<br>`optional` (flag)<br>`described-by` (text) | none | none |
273
- | `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/tabs/tabs.css` | `defineLtTabs()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
274
- | `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/error-summary/error-summary.css` | `defineLtErrorSummary()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
275
- | `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/popover/popover.css` | `defineLtPopover()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
276
- | `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/suggestion/suggestion.css` | `defineLtSuggestion()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
277
- | `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/dialog/dialog.css` | `defineLtDialog()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
278
- | `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/standalone/toast/toast.css` | `defineLtToast()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
279
- | `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/frame/session-timeout/session-timeout.css` | `defineLtSessionTimeout()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
280
- | `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/components/standalone/connection-status/connection-status.css` | `defineLtConnectionStatus()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.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` |
279
+ | `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/field/field.css` | `defineLtField()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/dist/components/frame/field/lt-field.js` | `disabled` (flag)<br>`optional` (flag)<br>`described-by` (text) | none | none |
280
+ | `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/tabs/tabs.css` | `defineLtTabs()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
281
+ | `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/error-summary/error-summary.css` | `defineLtErrorSummary()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
282
+ | `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/popover/popover.css` | `defineLtPopover()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
283
+ | `<lt-term>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/term/term.css` | `defineLtTerm()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/dist/components/frame/term/lt-term.js` | none | none | `lt-term`<br>`lt-term__entry` |
284
+ | `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/suggestion/suggestion.css` | `defineLtSuggestion()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
285
+ | `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/dialog/dialog.css` | `defineLtDialog()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
286
+ | `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/standalone/toast/toast.css` | `defineLtToast()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
287
+ | `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/frame/session-timeout/session-timeout.css` | `defineLtSessionTimeout()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
288
+ | `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/src/components/standalone/connection-status/connection-status.css` | `defineLtConnectionStatus()` from `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.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` |
281
289
 
282
290
  None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
283
291
  `FormData` and ordinary CSS work straight into it.
@@ -307,7 +315,7 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
307
315
 
308
316
  <script type="module">
309
317
  import { defineLtField } from
310
- "https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/dist/components/frame/field/lt-field.js"
318
+ "https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.42.0/dist/components/frame/field/lt-field.js"
311
319
 
312
320
  defineLtField()
313
321
  </script>
@@ -334,7 +342,7 @@ as plain HTML:
334
342
  <label class="lt-label" for="fixer" data-required="text">Fixer's address</label>
335
343
  <input class="lt-input" id="fixer" type="email" value="fixer@" />
336
344
  <p class="lt-help-text">The board writes to the fixer, never to the crew.</p>
337
- <p class="lt-error-text">Enter a valid address.</p>
345
+ <p class="lt-error-text">Enter the fixer's address, for example fixer@relay.example.</p>
338
346
  </lt-field>
339
347
  ```
340
348
 
@@ -392,6 +400,7 @@ build step. Datastar does not need it in the browser.
392
400
  | An `<lt-toast>` or `<lt-connection-status>` shows nothing, an `<lt-session-timeout>` never warns, or another component does nothing | The `define` function has not run. `<lt-toast>` and `<lt-connection-status>` create their content themselves and are empty without it, and `<lt-session-timeout>` does not count the time. The markup in the others comes from you and is there regardless, with two exceptions until they are registered. `<lt-tabs>` shows one panel: of those the server left without `hidden`, the one the URL points to, otherwise the first, and under `server-controlled` always the first. `<lt-suggestion>` hides the list |
393
401
  | A component speaks English on a page in another language | The text in the markup comes from you, and is written with the app's own translation setup. The few default texts the package has are replaced with `label` and `close-label` on `<lt-toast>`, `offline-text` and `online-text` on `<lt-connection-status>`, `count-none`, `count-one` and `count-other` on `<lt-suggestion>`, and `--lt-label-required-text`, `--lt-label-optional-text` and `--lt-label-required-symbol` in CSS. Numbers and durations follow the nearest `lang`, usually the one on `<html>`. See https://lo-tek.sobernetics.no/translation/ |
394
402
  | The error text never shows, and the field counts as valid | `hidden="false"` is set on the error text, and it hides it all the same. The attribute must be removed, not set to `false` |
403
+ | The server still has a dialog as open after the user pressed Escape | Only the buttons post the choice. Escape is a close request, which the browser reports with `cancel` on the `<dialog>`: `data-on:cancel="@post(…)"`. Not `dialog-toggle`, which reports an empty `returnValue` both for Escape and for a close the server makes |
395
404
  | `SyntaxError` in the browser | TypeScript syntax in a `<script type="module">` without a build step |
396
405
 
397
406
  ## When CSS is not enough