@lo-tek/interfaces 0.39.0 → 0.40.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.
- package/CHANGELOG.md +100 -0
- package/README.md +1 -1
- package/agent/astro.md +9 -9
- package/agent/bundles.md +11 -11
- package/agent/datastar.md +65 -65
- package/agent/html.md +59 -59
- package/agent/react.md +11 -11
- package/agent/templates.md +65 -58
- package/core/lotek-core.wasm +0 -0
- package/core/lotek.wasm +0 -0
- package/dist/components/css/accordion/accordion.d.ts +1 -1
- package/dist/components/css/accordion/accordion.js +1 -1
- package/dist/components/css/alert/alert.d.ts +1 -1
- package/dist/components/css/alert/alert.js +1 -1
- package/dist/components/css/avatar/avatar.d.ts +1 -1
- package/dist/components/css/avatar/avatar.js +1 -1
- package/dist/components/css/badge/badge.d.ts +1 -1
- package/dist/components/css/badge/badge.js +1 -1
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/dist/components/css/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/components/css/card/card.d.ts +1 -1
- package/dist/components/css/card/card.js +1 -1
- package/dist/components/css/file-upload/file-upload.d.ts +1 -1
- package/dist/components/css/file-upload/file-upload.js +1 -1
- package/dist/components/css/icon/icon.d.ts +1 -1
- package/dist/components/css/icon/icon.js +1 -1
- package/dist/components/css/label/label.d.ts +1 -1
- package/dist/components/css/label/label.js +1 -1
- package/dist/components/css/link/link.d.ts +1 -1
- package/dist/components/css/link/link.js +1 -1
- package/dist/components/css/spinner/spinner.d.ts +7 -5
- package/dist/components/css/spinner/spinner.d.ts.map +1 -1
- package/dist/components/css/spinner/spinner.js +7 -5
- package/dist/components/css/spinner/spinner.js.map +1 -1
- package/dist/components/css/tag/tag.d.ts +1 -1
- package/dist/components/css/tag/tag.js +1 -1
- package/dist/components/css/toggle-group/toggle-group.d.ts +1 -1
- package/dist/components/css/toggle-group/toggle-group.js +1 -1
- package/dist/components/css/tooltip/tooltip.d.ts +2 -2
- package/dist/components/css/tooltip/tooltip.js +2 -2
- package/dist/components/frame/dialog/dialog.d.ts +11 -6
- package/dist/components/frame/dialog/dialog.d.ts.map +1 -1
- package/dist/components/frame/dialog/dialog.js +4 -4
- package/dist/components/frame/dialog/dialog.js.map +1 -1
- package/dist/components/frame/dialog/lt-dialog.d.ts +1 -1
- package/dist/components/frame/dialog/lt-dialog.js +7 -7
- package/dist/components/frame/error-summary/error-summary.d.ts +6 -2
- package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -1
- package/dist/components/frame/error-summary/error-summary.js +1 -1
- package/dist/components/frame/error-summary/error-summary.js.map +1 -1
- package/dist/components/frame/error-summary/lt-error-summary.d.ts +1 -1
- package/dist/components/frame/error-summary/lt-error-summary.js +6 -6
- package/dist/components/frame/field/field-core.d.ts +4 -2
- package/dist/components/frame/field/field-core.d.ts.map +1 -1
- package/dist/components/frame/field/field-core.js.map +1 -1
- package/dist/components/frame/field/lt-field.d.ts +5 -4
- package/dist/components/frame/field/lt-field.d.ts.map +1 -1
- package/dist/components/frame/field/lt-field.js +5 -4
- package/dist/components/frame/field/lt-field.js.map +1 -1
- package/dist/components/frame/popover/lt-popover.d.ts +3 -3
- package/dist/components/frame/popover/lt-popover.js +3 -3
- package/dist/components/frame/popover/popover.d.ts +7 -3
- package/dist/components/frame/popover/popover.d.ts.map +1 -1
- package/dist/components/frame/popover/popover.js +2 -2
- package/dist/components/frame/popover/popover.js.map +1 -1
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +8 -8
- package/dist/components/frame/session-timeout/lt-session-timeout.js +7 -7
- package/dist/components/frame/session-timeout/session-timeout.d.ts +10 -5
- package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -1
- package/dist/components/frame/session-timeout/session-timeout.js +4 -4
- package/dist/components/frame/session-timeout/session-timeout.js.map +1 -1
- package/dist/components/frame/suggestion/lt-suggestion.d.ts +12 -11
- package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -1
- package/dist/components/frame/suggestion/lt-suggestion.js +11 -10
- package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -1
- package/dist/components/frame/suggestion/suggestion.d.ts +3 -1
- package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -1
- package/dist/components/frame/suggestion/suggestion.js.map +1 -1
- package/dist/components/frame/tabs/lt-tabs.d.ts +3 -3
- package/dist/components/frame/tabs/lt-tabs.js +5 -5
- package/dist/components/frame/tabs/lt-tabs.js.map +1 -1
- package/dist/components/frame/tabs/tabs.d.ts +8 -6
- package/dist/components/frame/tabs/tabs.d.ts.map +1 -1
- package/dist/components/frame/tabs/tabs.js +4 -4
- package/dist/components/frame/tabs/tabs.js.map +1 -1
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts +1 -1
- package/dist/components/standalone/connection-status/lt-connection-status.js +1 -1
- package/dist/components/standalone/toast/lt-toast.d.ts +1 -1
- package/dist/components/standalone/toast/lt-toast.js +1 -1
- package/dist/diagnostics/index.d.ts +2 -2
- package/dist/diagnostics/index.js +2 -2
- package/dist/dom.d.ts +2 -1
- package/dist/dom.d.ts.map +1 -1
- package/dist/dom.js +2 -1
- package/dist/dom.js.map +1 -1
- package/dist/lotek.css +20 -1
- package/dist/lt.d.ts +5 -5
- package/dist/lt.js +5 -5
- package/dist/react.d.ts.map +1 -1
- package/dist/vocabulary/elements.js +1 -1
- package/dist/vocabulary/elements.js.map +1 -1
- package/dist/vocabulary/types.d.ts +20 -0
- package/dist/vocabulary/types.d.ts.map +1 -1
- package/live-templates-kotlin.xml +64 -0
- package/live-templates.xml +23 -23
- package/manifest/manifest.json +368 -80
- package/manifest/manifest.schema.json +54 -7
- package/package.json +2 -1
- package/src/components/css/accordion/accordion.ts +1 -1
- package/src/components/css/alert/alert.ts +1 -1
- package/src/components/css/avatar/avatar.ts +1 -1
- package/src/components/css/badge/badge.ts +1 -1
- package/src/components/css/breadcrumbs/breadcrumbs.ts +1 -1
- package/src/components/css/card/card.ts +1 -1
- package/src/components/css/file-upload/file-upload.ts +1 -1
- package/src/components/css/icon/icon.ts +1 -1
- package/src/components/css/input/input.css +21 -0
- package/src/components/css/label/label.ts +1 -1
- package/src/components/css/link/link.ts +1 -1
- package/src/components/css/spinner/spinner.ts +8 -5
- package/src/components/css/tag/tag.ts +1 -1
- package/src/components/css/toggle-group/toggle-group.ts +1 -1
- package/src/components/css/tooltip/tooltip.ts +2 -2
- package/src/components/frame/dialog/dialog.ts +11 -6
- package/src/components/frame/dialog/lt-dialog.ts +7 -7
- package/src/components/frame/error-summary/error-summary.ts +6 -2
- package/src/components/frame/error-summary/lt-error-summary.ts +6 -6
- package/src/components/frame/field/field-core.ts +4 -2
- package/src/components/frame/field/lt-field.ts +5 -4
- package/src/components/frame/popover/lt-popover.ts +3 -3
- package/src/components/frame/popover/popover.ts +7 -3
- package/src/components/frame/session-timeout/lt-session-timeout.ts +8 -8
- package/src/components/frame/session-timeout/session-timeout.ts +10 -5
- package/src/components/frame/suggestion/lt-suggestion.ts +13 -12
- package/src/components/frame/suggestion/suggestion.css +1 -1
- package/src/components/frame/suggestion/suggestion.ts +3 -1
- package/src/components/frame/tabs/lt-tabs.ts +5 -5
- package/src/components/frame/tabs/tabs.css +1 -1
- package/src/components/frame/tabs/tabs.ts +8 -6
- package/src/components/standalone/connection-status/lt-connection-status.ts +1 -1
- package/src/components/standalone/toast/lt-toast.ts +1 -1
- package/src/diagnostics/index.ts +2 -2
- package/src/dom.ts +2 -1
- package/src/lt.ts +5 -5
- package/src/tokens/boundary.css +4 -0
- package/src/vocabulary/elements.ts +1 -1
- package/src/vocabulary/types.ts +17 -0
- package/web-types.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,106 @@ including 0.36.0 were written in Norwegian, and list them under "Brytende".
|
|
|
24
24
|
|
|
25
25
|
## Unreleased
|
|
26
26
|
|
|
27
|
+
## 0.40.0 (2026-11-03)
|
|
28
|
+
|
|
29
|
+
### Breaking
|
|
30
|
+
|
|
31
|
+
- **`lt.spinner()` without `label` writes `aria-hidden="true"`,** as
|
|
32
|
+
`lt.icon()` without a label does. The page told you to write it yourself,
|
|
33
|
+
so the HTML tab had it and the TypeScript tab had it by hand. A spinner
|
|
34
|
+
named by hand, `lt.spinner()` with `role="status"` and `aria-label` written
|
|
35
|
+
next to it, is now hidden from screen readers: pass the name as `label`,
|
|
36
|
+
which gives the role and the name and no `aria-hidden`.
|
|
37
|
+
- **In Kotlin every builder function is a member of `Lt`.** `field`,
|
|
38
|
+
`suggestion`, `tabs`, `errorSummary`, `label` and `legend` were extension
|
|
39
|
+
functions on `Lt` in `Handwritten.kt`. A call such as `Lt.field(…)` reads
|
|
40
|
+
the same, but `import no.lotek.field` no longer compiles and has to go,
|
|
41
|
+
and code compiled against the old version calls a method that is gone, so
|
|
42
|
+
it must be compiled again.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- **Each builder function in the manifest has `description`, `example` and
|
|
47
|
+
`docs`, and an option with a closed list has `default`.** The description
|
|
48
|
+
is the comment on the function in TypeScript without the code examples,
|
|
49
|
+
the example is those examples, and `docs` is the component page. The
|
|
50
|
+
default is read from the answers: the value that gives the same answer as
|
|
51
|
+
leaving the option out, and the build stops when the comment on the
|
|
52
|
+
option names another one. A builder function with several sets has
|
|
53
|
+
`parts`, which says which part of a web component each set fills:
|
|
54
|
+
`field.control` fills `control` in `lt-field`, with its selector there.
|
|
55
|
+
All are optional, so `schemaVersion` is still 1, and a manifest from
|
|
56
|
+
before reads as before.
|
|
57
|
+
- **The Kotlin API has the documentation from the manifest.** Every member
|
|
58
|
+
of `Lt` has the description, an example call, a link to the component
|
|
59
|
+
page and an `@param` per option with the default as the Kotlin constant,
|
|
60
|
+
in the sources jar, so IntelliJ shows it in Quick Documentation.
|
|
61
|
+
- **The builder functions can be called from Java.** They are `@JvmStatic`
|
|
62
|
+
and `@JvmOverloads`, with the required options first, `ButtonVariant.of(…)`
|
|
63
|
+
and the other lookups are static, and `Lt.card.title` is a field:
|
|
64
|
+
`Lt.field("fixer")` rather than `HandwrittenKt.field(Lt.INSTANCE, "fixer",
|
|
65
|
+
null, …)`. In Kotlin the options are passed by name as before, but
|
|
66
|
+
`Lt.suggestion` called with its options in order now has `id` first.
|
|
67
|
+
`JavaCallTest` compiles the calls in Java.
|
|
68
|
+
- **`lo-tek-kotlinx-html` has one function per web component**, such as
|
|
69
|
+
`ltField { … }` and `ltTabs { … }`, since kotlinx.html knows only the
|
|
70
|
+
elements in HTML.
|
|
71
|
+
- **`live-templates-kotlin.xml`, live templates for Kotlin in IntelliJ,**
|
|
72
|
+
one per web component, generated from the kotlinx.html tab on its page.
|
|
73
|
+
The ids are empty variables, as in `live-templates.xml`.
|
|
74
|
+
- **Every component page has a kotlinx.html tab,** for a Kotlin or Java
|
|
75
|
+
server with `lo-tek-kotlinx-html`. `RecipesTest` compiles each, renders it,
|
|
76
|
+
and requires the elements, the texts, the classes and the attributes of
|
|
77
|
+
the page's HTML recipe, with `lotek check` on the result.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- **The snippets and the live templates leave the ids empty.** They filled
|
|
82
|
+
in the id from the recipe, such as `codename`, and a snippet pasted twice
|
|
83
|
+
on a page, or in a loop, then gave two fields with the same id, which a
|
|
84
|
+
morph matches wrongly. The id is still one tab stop, mirrored in `for`
|
|
85
|
+
and `href`.
|
|
86
|
+
- **The documentation says "with a builder function" where it said "with
|
|
87
|
+
JavaScript".** A Kotlin or Java server renders without JavaScript and calls
|
|
88
|
+
`Lt.field()` all the same, so the line between `lt.field()` and
|
|
89
|
+
`<lt-field>` is whether the code that renders can call a builder function.
|
|
90
|
+
The description of `<lt-field>` in the vocabulary, which the editors show,
|
|
91
|
+
says the same.
|
|
92
|
+
- **The documentation of every id option says to make it from a key in the
|
|
93
|
+
data**, never from the loop index or a counter, so it is unique on the
|
|
94
|
+
page and the same on every render. The message when `Lt.field` and the
|
|
95
|
+
others get an empty id in Kotlin says the same; it used to suggest "the
|
|
96
|
+
field's name or another fixed id", which in a loop is the duplicate.
|
|
97
|
+
- **The examples come from the world LO-TEK belongs to, not from a housing
|
|
98
|
+
benefit application.** Every recipe, demo, snippet, live template and
|
|
99
|
+
rulebook now shows a system LO-TEK delivered to a client: the job
|
|
100
|
+
console on floor 222, the operations console of Meridian Lattice, a claim
|
|
101
|
+
at Aster & Vale, and others. Each component page shows one client, and the
|
|
102
|
+
pages on accessibility stay neutral. The markup, the classes and the
|
|
103
|
+
attributes are the same as before; only the text, the ids and the values
|
|
104
|
+
in the examples have changed. The warning `<lt-tabs>` gives for a tab list
|
|
105
|
+
without a name suggests `aria-label="Parts of the claim"`.
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- **The recipe for the connection status reports a server that stopped
|
|
110
|
+
answering.** Its script declared `saveRoute` inside a module, where no
|
|
111
|
+
other code on the page could call it, and called the methods without
|
|
112
|
+
waiting for the registration. It now puts `saveRoute` on `window`, where
|
|
113
|
+
the app's other scripts call it, as a comment there shows. It sends the
|
|
114
|
+
request first, counts a request without an answer and a gateway's 502, 503
|
|
115
|
+
or 504 as a lost connection and any other answer as the server being
|
|
116
|
+
there. It reports with `reportSuccess` and `reportFailure`, which wait for
|
|
117
|
+
the registration, and returns the answer without awaiting them. The React
|
|
118
|
+
tab and the example under "`navigator.onLine` is not enough" follow the
|
|
119
|
+
same rule.
|
|
120
|
+
|
|
121
|
+
- **A date or time field fits its container in iOS Safari.** With the
|
|
122
|
+
native appearance, `.lt-input` with `data-variant` `date`, `time` or
|
|
123
|
+
`datetime-local` stood wider than the form around it. In iOS Safari
|
|
124
|
+
these fields now have `appearance: none`, and the value starts at the
|
|
125
|
+
start of the field.
|
|
126
|
+
|
|
27
127
|
## 0.39.0 (2026-11-01)
|
|
28
128
|
|
|
29
129
|
### Added
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Without a build step you link the combined file, which has everything in it:
|
|
|
36
36
|
The markup is the same whichever of the two you chose:
|
|
37
37
|
|
|
38
38
|
```html
|
|
39
|
-
<button class="lt-button">
|
|
39
|
+
<button class="lt-button">Order the job</button>
|
|
40
40
|
<button class="lt-button" data-variant="secondary">Save draft</button>
|
|
41
41
|
```
|
|
42
42
|
|
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.
|
|
12
|
+
This is @lo-tek/interfaces 0.40.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
|
|
|
@@ -335,13 +335,13 @@ import { lt } from "@lo-tek/interfaces"
|
|
|
335
335
|
import "@lo-tek/interfaces/tokens.css"
|
|
336
336
|
import "@lo-tek/interfaces/field.css"
|
|
337
337
|
|
|
338
|
-
const
|
|
338
|
+
const fixer = lt.field({ id: "fixer", required: "symbol", help: true, error: true })
|
|
339
339
|
---
|
|
340
340
|
|
|
341
|
-
<label {...
|
|
342
|
-
<input {...lt.input({ type: "email" })} {...
|
|
343
|
-
<p {...lt.helpText()} {...
|
|
344
|
-
<p {...lt.errorText()} {...
|
|
341
|
+
<label {...fixer.label}>Fixer's address</label>
|
|
342
|
+
<input {...lt.input({ type: "email" })} {...fixer.control} name="fixer" required />
|
|
343
|
+
<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>
|
|
345
345
|
```
|
|
346
346
|
|
|
347
347
|
No `<lt-field>`, no runtime.
|
|
@@ -359,9 +359,9 @@ import "@lo-tek/interfaces/field.css"
|
|
|
359
359
|
---
|
|
360
360
|
|
|
361
361
|
<lt-field>
|
|
362
|
-
<label class="lt-label" for="
|
|
363
|
-
<input class="lt-input" id="
|
|
364
|
-
<p class="lt-error-text" hidden>Enter
|
|
362
|
+
<label class="lt-label" for="codename" data-required="symbol">Codename</label>
|
|
363
|
+
<input class="lt-input" id="codename" type="text" name="codename" required />
|
|
364
|
+
<p class="lt-error-text" hidden>Enter a codename.</p>
|
|
365
365
|
</lt-field>
|
|
366
366
|
|
|
367
367
|
<script>
|
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.
|
|
13
|
+
This is @lo-tek/interfaces 0.40.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
|
|
|
@@ -314,12 +314,12 @@ The markup is ordinary HTML, in whatever template your framework uses:
|
|
|
314
314
|
|
|
315
315
|
```html
|
|
316
316
|
<lt-field>
|
|
317
|
-
<label class="lt-label" for="
|
|
318
|
-
<input class="lt-input" id="
|
|
319
|
-
<p class="lt-error-text" hidden>Enter
|
|
317
|
+
<label class="lt-label" for="codename" data-required="symbol">Codename</label>
|
|
318
|
+
<input class="lt-input" id="codename" type="text" name="codename" required />
|
|
319
|
+
<p class="lt-error-text" hidden>Enter a codename.</p>
|
|
320
320
|
</lt-field>
|
|
321
321
|
|
|
322
|
-
<button class="lt-button" type="submit">
|
|
322
|
+
<button class="lt-button" type="submit">Order the job</button>
|
|
323
323
|
```
|
|
324
324
|
|
|
325
325
|
`class` and `for`, not `className` and `htmlFor`. It is React that rewrites
|
|
@@ -327,9 +327,8 @@ the attribute names, and that does not apply here.
|
|
|
327
327
|
|
|
328
328
|
## 6. Typed builder functions
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
error:
|
|
330
|
+
The classes can come from `lt` instead of being written as strings. With
|
|
331
|
+
TypeScript, a variant that does not exist then becomes a compile error:
|
|
333
332
|
|
|
334
333
|
```ts
|
|
335
334
|
import { lt } from "@lo-tek/interfaces"
|
|
@@ -358,8 +357,8 @@ Where the template language cannot spread an object, `lt.setAttributes()` sets
|
|
|
358
357
|
the attributes on an element in plain DOM:
|
|
359
358
|
|
|
360
359
|
```ts
|
|
361
|
-
const field = document.querySelector<HTMLInputElement>("#
|
|
362
|
-
const wiring = lt.field({ id: "
|
|
360
|
+
const field = document.querySelector<HTMLInputElement>("#fixer")
|
|
361
|
+
const wiring = lt.field({ id: "fixer", error: true, invalid: true })
|
|
363
362
|
|
|
364
363
|
lt.setAttributes(field, lt.input({ type: "email" }), wiring.control)
|
|
365
364
|
```
|
|
@@ -368,7 +367,8 @@ Call it again to change state. Three rules:
|
|
|
368
367
|
|
|
369
368
|
- **When the builder function has an option for an attribute, a call without
|
|
370
369
|
the option removes the attribute.** So pass the options again every time.
|
|
371
|
-
`lt.spinner()` without `label` removes `role` and `aria-label
|
|
370
|
+
`lt.spinner()` without `label` removes `role` and `aria-label`, and writes
|
|
371
|
+
`aria-hidden`.
|
|
372
372
|
- **What the builder function has no option for stays.** `lt.button()` does
|
|
373
373
|
not touch `disabled` or `type`. `id` and `for` are never removed.
|
|
374
374
|
- **Two sets on the same element are passed separately**, as above. If they
|
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.
|
|
11
|
+
This is @lo-tek/interfaces 0.40.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,7 +39,7 @@ 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.
|
|
42
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/dist/lotek.css">
|
|
43
43
|
<script
|
|
44
44
|
type="module"
|
|
45
45
|
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.4/bundles/datastar.js"
|
|
@@ -62,41 +62,41 @@ The default variant has no attribute.
|
|
|
62
62
|
|
|
63
63
|
| Class | Stylesheet | Attributes |
|
|
64
64
|
| --- | --- | --- |
|
|
65
|
-
| `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
66
|
-
| `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
67
|
-
| `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
68
|
-
| `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
69
|
-
| `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
70
|
-
| `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
71
|
-
| `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
72
|
-
| `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
73
|
-
| `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
74
|
-
| `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
75
|
-
| `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
76
|
-
| `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
77
|
-
| `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
78
|
-
| `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
79
|
-
| `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
80
|
-
| `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
81
|
-
| `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
82
|
-
| `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
83
|
-
| `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
84
|
-
| `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
85
|
-
| `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
86
|
-
| `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
87
|
-
| `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
88
|
-
| `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
89
|
-
| `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
90
|
-
| `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
91
|
-
| `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
92
|
-
| `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
93
|
-
| `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
94
|
-
| `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
95
|
-
| `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
96
|
-
| `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
97
|
-
| `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
98
|
-
| `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
99
|
-
| `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
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 |
|
|
100
100
|
|
|
101
101
|
There is also `lt-theme-control`, a class on a radio button that lets the user
|
|
102
102
|
choose a theme. It is in `tokens.css`, and is described under Tokens.
|
|
@@ -175,7 +175,7 @@ root element:
|
|
|
175
175
|
Below the root element the browser then ignores the host's CSS without a
|
|
176
176
|
layer, unless a rule of the host's wins on specificity as described below, and
|
|
177
177
|
LO-TEK's layer applies again. The rule is in `lotek.css` and in
|
|
178
|
-
`https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
178
|
+
`https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/src/tokens/boundary.css`.
|
|
179
179
|
Fonts and other inherited properties still come from the host, and the
|
|
180
180
|
`--lt-*` variables work. Three things follow from it:
|
|
181
181
|
|
|
@@ -269,15 +269,15 @@ Three rules apply to all of them:
|
|
|
269
269
|
|
|
270
270
|
| Element | Category | Stylesheet | Registration | Attributes | Events | Classes inside |
|
|
271
271
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
272
|
-
| `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
273
|
-
| `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
274
|
-
| `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
275
|
-
| `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
276
|
-
| `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
277
|
-
| `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
278
|
-
| `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
279
|
-
| `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
280
|
-
| `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
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` |
|
|
281
281
|
|
|
282
282
|
None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
283
283
|
`FormData` and ordinary CSS work straight into it.
|
|
@@ -286,35 +286,35 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
|
286
286
|
|
|
287
287
|
```html
|
|
288
288
|
<form
|
|
289
|
-
data-signals="{
|
|
290
|
-
data-computed:invalid="$touched && $
|
|
289
|
+
data-signals="{codename: '', touched: false}"
|
|
290
|
+
data-computed:invalid="$touched && $codename.trim() === ''"
|
|
291
291
|
>
|
|
292
292
|
<lt-field>
|
|
293
|
-
<label class="lt-label" for="
|
|
293
|
+
<label class="lt-label" for="codename" data-required="symbol">Codename</label>
|
|
294
294
|
<input
|
|
295
295
|
class="lt-input"
|
|
296
|
-
id="
|
|
296
|
+
id="codename"
|
|
297
297
|
type="text"
|
|
298
|
-
name="
|
|
299
|
-
data-bind:
|
|
298
|
+
name="codename"
|
|
299
|
+
data-bind:codename
|
|
300
300
|
data-on:blur="$touched = true"
|
|
301
301
|
/>
|
|
302
|
-
<p class="lt-error-text" hidden data-attr:hidden="!$invalid">Enter
|
|
302
|
+
<p class="lt-error-text" hidden data-attr:hidden="!$invalid">Enter a codename.</p>
|
|
303
303
|
</lt-field>
|
|
304
304
|
|
|
305
|
-
<button class="lt-button" type="submit">
|
|
305
|
+
<button class="lt-button" type="submit">Order the job</button>
|
|
306
306
|
</form>
|
|
307
307
|
|
|
308
308
|
<script type="module">
|
|
309
309
|
import { defineLtField } from
|
|
310
|
-
"https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
310
|
+
"https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.40.0/dist/components/frame/field/lt-field.js"
|
|
311
311
|
|
|
312
312
|
defineLtField()
|
|
313
313
|
</script>
|
|
314
314
|
```
|
|
315
315
|
|
|
316
316
|
`data-signals` creates the state, `data-computed:invalid` derives the
|
|
317
|
-
validation from it, `data-bind:
|
|
317
|
+
validation from it, `data-bind:codename` binds the field both ways, and
|
|
318
318
|
`data-on:blur` records that the user has left it.
|
|
319
319
|
|
|
320
320
|
`data-attr:hidden` on the error text is the link to the component: it sets
|
|
@@ -331,9 +331,9 @@ as plain HTML:
|
|
|
331
331
|
|
|
332
332
|
```html
|
|
333
333
|
<lt-field>
|
|
334
|
-
<label class="lt-label" for="
|
|
335
|
-
<input class="lt-input" id="
|
|
336
|
-
<p class="lt-help-text">
|
|
334
|
+
<label class="lt-label" for="fixer" data-required="text">Fixer's address</label>
|
|
335
|
+
<input class="lt-input" id="fixer" type="email" value="fixer@" />
|
|
336
|
+
<p class="lt-help-text">The board writes to the fixer, never to the crew.</p>
|
|
337
337
|
<p class="lt-error-text">Enter a valid address.</p>
|
|
338
338
|
</lt-field>
|
|
339
339
|
```
|
|
@@ -368,11 +368,11 @@ word. If the server should be able to move the tab, say so with
|
|
|
368
368
|
|
|
369
369
|
```html
|
|
370
370
|
<lt-tabs server-controlled data-on:tab-select="$tab = evt.detail.index">
|
|
371
|
-
<ul class="lt-tabs__list" aria-label="Parts of the
|
|
372
|
-
<li><a href="#
|
|
371
|
+
<ul class="lt-tabs__list" aria-label="Parts of the claim">
|
|
372
|
+
<li><a href="#claim">Claim</a></li>
|
|
373
373
|
<li><a href="#attachments">Attachments</a></li>
|
|
374
374
|
</ul>
|
|
375
|
-
<section class="lt-tabs__panel" id="
|
|
375
|
+
<section class="lt-tabs__panel" id="claim">…</section>
|
|
376
376
|
<section class="lt-tabs__panel" id="attachments" hidden="until-found">…</section>
|
|
377
377
|
</lt-tabs>
|
|
378
378
|
```
|
|
@@ -381,8 +381,8 @@ The attribute exists on `<lt-tabs>`, `<lt-popover>`, `<lt-dialog>` and
|
|
|
381
381
|
`<lt-suggestion>`. Without it the server and the component would fight over
|
|
382
382
|
the same state.
|
|
383
383
|
|
|
384
|
-
`lt` can be used on the server or in a
|
|
385
|
-
in the browser.
|
|
384
|
+
`lt`, or `Lt` on a Kotlin or Java server, can be used on the server or in a
|
|
385
|
+
build step. Datastar does not need it in the browser.
|
|
386
386
|
|
|
387
387
|
## Known pitfalls
|
|
388
388
|
|