@lo-tek/interfaces 0.37.0 → 0.39.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 +160 -2
- package/README.md +4 -3
- package/agent/astro.md +1 -1
- package/agent/bundles.md +4 -2
- package/agent/datastar.md +48 -48
- package/agent/html.md +51 -51
- package/agent/react.md +6 -5
- package/agent/templates.md +49 -49
- package/core/lotek-core.wasm +0 -0
- package/core/lotek.wasm +0 -0
- package/dist/components/default-texts.d.ts +6 -0
- package/dist/components/default-texts.d.ts.map +1 -1
- package/dist/components/default-texts.js +6 -0
- package/dist/components/default-texts.js.map +1 -1
- package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -1
- package/dist/components/frame/dialog/lt-dialog.js +5 -2
- package/dist/components/frame/dialog/lt-dialog.js.map +1 -1
- package/dist/components/frame/error-summary/error-summary.d.ts +15 -2
- package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -1
- package/dist/components/frame/error-summary/error-summary.js +33 -11
- package/dist/components/frame/error-summary/error-summary.js.map +1 -1
- package/dist/components/frame/error-summary/lt-error-summary.d.ts +11 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -1
- package/dist/components/frame/error-summary/lt-error-summary.js +114 -8
- package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -1
- package/dist/components/frame/field/lt-field.d.ts.map +1 -1
- package/dist/components/frame/field/lt-field.js +34 -14
- package/dist/components/frame/field/lt-field.js.map +1 -1
- package/dist/components/frame/popover/lt-popover.d.ts +6 -2
- package/dist/components/frame/popover/lt-popover.d.ts.map +1 -1
- package/dist/components/frame/popover/lt-popover.js +44 -14
- package/dist/components/frame/popover/lt-popover.js.map +1 -1
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -1
- package/dist/components/frame/session-timeout/lt-session-timeout.js +43 -6
- package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -1
- package/dist/components/frame/suggestion/lt-suggestion.d.ts +8 -2
- package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -1
- package/dist/components/frame/suggestion/lt-suggestion.js +56 -37
- package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -1
- package/dist/components/frame/tabs/lt-tabs.d.ts +32 -10
- package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -1
- package/dist/components/frame/tabs/lt-tabs.js +85 -21
- package/dist/components/frame/tabs/lt-tabs.js.map +1 -1
- package/dist/components/host-element.d.ts +52 -0
- package/dist/components/host-element.d.ts.map +1 -1
- package/dist/components/host-element.js +164 -1
- package/dist/components/host-element.js.map +1 -1
- package/dist/components/standalone/connection-status/connection-status.d.ts +5 -1
- package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -1
- package/dist/components/standalone/connection-status/connection-status.js +5 -1
- package/dist/components/standalone/connection-status/connection-status.js.map +1 -1
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts +11 -6
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts.map +1 -1
- package/dist/components/standalone/connection-status/lt-connection-status.js +34 -10
- package/dist/components/standalone/connection-status/lt-connection-status.js.map +1 -1
- package/dist/diagnostics/core.d.ts +34 -0
- package/dist/diagnostics/core.d.ts.map +1 -1
- package/dist/diagnostics/core.js +14 -2
- package/dist/diagnostics/core.js.map +1 -1
- package/dist/lotek.css +1 -1
- package/dist/lt.d.ts +1 -1
- package/dist/react.d.ts +2 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/vocabulary/classes.d.ts.map +1 -1
- package/dist/vocabulary/classes.js +34 -0
- package/dist/vocabulary/classes.js.map +1 -1
- package/dist/vocabulary/elements.d.ts.map +1 -1
- package/dist/vocabulary/elements.js +87 -7
- package/dist/vocabulary/elements.js.map +1 -1
- package/dist/vocabulary/types.d.ts +60 -0
- package/dist/vocabulary/types.d.ts.map +1 -1
- package/live-templates.xml +3 -2
- package/manifest/manifest.json +172 -8
- package/manifest/manifest.schema.json +80 -0
- package/package.json +2 -1
- package/src/components/default-texts.ts +7 -0
- package/src/components/frame/dialog/lt-dialog.ts +5 -2
- package/src/components/frame/error-summary/error-summary.ts +45 -11
- package/src/components/frame/error-summary/lt-error-summary.ts +121 -7
- package/src/components/frame/field/lt-field.ts +65 -28
- package/src/components/frame/popover/lt-popover.ts +43 -12
- package/src/components/frame/session-timeout/lt-session-timeout.ts +40 -6
- package/src/components/frame/suggestion/lt-suggestion.ts +57 -36
- package/src/components/frame/tabs/lt-tabs.ts +114 -38
- package/src/components/host-element.ts +190 -1
- package/src/components/standalone/connection-status/connection-status.ts +7 -1
- package/src/components/standalone/connection-status/lt-connection-status.ts +36 -10
- package/src/diagnostics/core.ts +19 -2
- package/src/vocabulary/classes.ts +34 -0
- package/src/vocabulary/elements.ts +87 -7
- package/src/vocabulary/types.ts +56 -0
- package/web-types.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,164 @@ including 0.36.0 were written in Norwegian, and list them under "Brytende".
|
|
|
24
24
|
|
|
25
25
|
## Unreleased
|
|
26
26
|
|
|
27
|
+
## 0.39.0 (2026-11-01)
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **The classes for the parts a template writes itself are in the manifest,
|
|
32
|
+
and in Kotlin.** `lt.card.title` and `lt.toggleGroup.option` were string
|
|
33
|
+
constants on the TypeScript functions alone, so a Kotlin template had to
|
|
34
|
+
write `lt-card__title` as text. Every such constant is now `classes` on the
|
|
35
|
+
builder function in `manifest.json`, and `Lt` has the same names:
|
|
36
|
+
`Lt.card.title`, `Lt.toggleGroup.option` and the rest, each a set with the
|
|
37
|
+
class, so it goes where every other answer goes.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **A property set on a web component before its registration now reaches
|
|
42
|
+
the attribute.** `dialog.open = true` from a script that ran before
|
|
43
|
+
`defineLt()` became a plain property on the element. Once the element was
|
|
44
|
+
upgraded, that property shadowed the setter: the attribute was never set,
|
|
45
|
+
and no later write reached the setter either, `dialog.open = false`
|
|
46
|
+
included. The components now write such a property through the setter in
|
|
47
|
+
the microtask after the upgrade, and a write made in between wins. This is
|
|
48
|
+
the same gap `whenUpgraded()` closes for the methods.
|
|
49
|
+
|
|
50
|
+
## 0.38.0 (2026-10-31)
|
|
51
|
+
|
|
52
|
+
### Breaking
|
|
53
|
+
|
|
54
|
+
- **One rule, `without-name`, replaces `icon-without-name`,
|
|
55
|
+
`control-without-label`, `tab-list-without-name` and
|
|
56
|
+
`field-without-label`.** A `<!-- lotek-ignore-next -->` naming one of the
|
|
57
|
+
four names now has to name `without-name`. The rule is an error, also for
|
|
58
|
+
a field, which was a warning.
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- **`lotek check` reports every element a screen reader gets no name for**
|
|
63
|
+
(`without-name`): the roles WAI-ARIA 1.2 says must have one, on LO-TEK's
|
|
64
|
+
classes and elements and on every button and link, and what LO-TEK demands
|
|
65
|
+
beyond that, from `name` on an element, a part or a class in the manifest:
|
|
66
|
+
a tab list, a fieldset, a toggle group, a dialog in `<lt-dialog>` without a
|
|
67
|
+
heading, an error summary without a heading with an id. The name is
|
|
68
|
+
computed as the browsers compute it (AccName 1.2), by the same model the
|
|
69
|
+
accessibility check compares with Chromium and Firefox, and a `<title>` in
|
|
70
|
+
an svg counts (SVG-AAM). Where a binding, a template or another part of
|
|
71
|
+
the page could give the name, the rule says nothing.
|
|
72
|
+
- **`lotek check` warns about LO-TEK's own English texts on a page in
|
|
73
|
+
another language** (`untranslated-text`): `<lt-toast>`,
|
|
74
|
+
`<lt-connection-status>` and the counts in `<lt-suggestion>` without the
|
|
75
|
+
attribute that replaces the text, and, when the style sheets are given,
|
|
76
|
+
" (required)" and " (optional)" on a label or legend without the CSS
|
|
77
|
+
variable. The language is the nearest `lang`. The manifest has
|
|
78
|
+
`textLanguage`, `texts` on the elements and classes, and `name`, which
|
|
79
|
+
`Manifest` in LO-TEK for Kotlin reads as `textLanguage`, `texts` and
|
|
80
|
+
`named`.
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
|
|
84
|
+
- **`lt.errorSummary()` writes the heading's id and the box's
|
|
85
|
+
`aria-labelledby`.** `titleId` is new, and defaults to the box's `id` with
|
|
86
|
+
`-title`, so `lt.errorSummary({ id: "errors" })` names the box after
|
|
87
|
+
`<h2 id="errors-title">`. As with every option of a builder function,
|
|
88
|
+
`lt.setAttributes()` with a set that has no `aria-labelledby` removes one
|
|
89
|
+
the element had. An empty `titleId` counts as none, and one with whitespace
|
|
90
|
+
throws, in TypeScript and in Kotlin; so does an `id` with whitespace,
|
|
91
|
+
which `lt.errorSummary({ id })` accepted before, since the default
|
|
92
|
+
`titleId` is made from it.
|
|
93
|
+
- **`lt.connectionStatus()` writes `role="status"` and `aria-live="polite"`**
|
|
94
|
+
on the host, the live region; `lt.setAttributes()` sets them over a role
|
|
95
|
+
the element had.
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- **`<lt-field>` keeps an `aria-invalid` the server writes, and `<lt-tabs>`
|
|
100
|
+
an `aria-selected`, when the value is the one the component had
|
|
101
|
+
written.** The components told the server's word from their own by the
|
|
102
|
+
value, and a morph leaves an attribute whose value is already right, so
|
|
103
|
+
the server's `aria-invalid="true"` was taken for the component's own and
|
|
104
|
+
removed. They now mark what they write that differs from the server, in
|
|
105
|
+
`data-lt-written`, which a morph from the server removes; markup that is
|
|
106
|
+
already right, as React renders it, gets no mark. Found by the new model
|
|
107
|
+
tests, which try every order of server updates and user actions.
|
|
108
|
+
- **`<lt-tabs>` keeps the user's tab when the server inserts a tab before
|
|
109
|
+
it.** Datastar and idiomorph match links without ids by position, and the
|
|
110
|
+
link the user pressed became the inserted tab. The component now finds
|
|
111
|
+
the user's tab by the panel it points to when a morph has moved or
|
|
112
|
+
dropped the link, and still forgets the selection when the links are
|
|
113
|
+
replaced.
|
|
114
|
+
- **`<lt-popover>` puts focus back on the button whatever closes the panel
|
|
115
|
+
with focus in it**: `hide()`, `toggle()`, a click on the button in Safari,
|
|
116
|
+
which gives a clicked button no focus, and the server taking `open`.
|
|
117
|
+
Escape alone did it before, and otherwise the focus was lost to the page.
|
|
118
|
+
A patch that only takes `open` for a moment, while the component puts it
|
|
119
|
+
back, no longer closes and reopens the panel, which took the focus from a
|
|
120
|
+
button in it.
|
|
121
|
+
- **`show()` on a `<lt-popover>` the server opened is remembered**, as
|
|
122
|
+
`open = true` is: the next patch without `open` closed the panel, since
|
|
123
|
+
`show()` returned before the setter that remembers it. `hide()` the same.
|
|
124
|
+
- **`<lt-suggestion>` filters an open list an update changed under
|
|
125
|
+
`server-controlled` too.** The attribute is about whether the list is open
|
|
126
|
+
and what is highlighted, but the repair returned before the filter, so the
|
|
127
|
+
list showed every option the server sent whatever the user had typed, and
|
|
128
|
+
an emptied list kept its empty message hidden.
|
|
129
|
+
- **`<lt-suggestion>` announces a count only for a list that opens.**
|
|
130
|
+
Focusing an empty field over a list with nothing to show announced "No
|
|
131
|
+
matches" for a list that stayed closed. An update that removed
|
|
132
|
+
`prefiltered` counted the options before the morph had replaced them, and
|
|
133
|
+
an update that also locked the field announced the count for a list it
|
|
134
|
+
closed.
|
|
135
|
+
- **`<lt-dialog>` names the dialog after its heading again when an update
|
|
136
|
+
removes `aria-label`.** The component did not watch `aria-label`, and the
|
|
137
|
+
dialog was left without a name until something else changed.
|
|
138
|
+
- **`<lt-dialog>` no longer reports a close for a dialog that never
|
|
139
|
+
opened.** `dialog-toggle` with `open: false` came when the component
|
|
140
|
+
closed a `<dialog open>` it had never shown.
|
|
141
|
+
- **`<lt-session-timeout>` keeps the warning's role and name through an
|
|
142
|
+
update.** A morph of the open warning removed `role="alertdialog"` and
|
|
143
|
+
`aria-labelledby`, which the component had written, and a screen reader
|
|
144
|
+
had a modal dialog without a name until the warning closed.
|
|
145
|
+
- **`<lt-session-timeout>` goes on with a warning the renderer replaced
|
|
146
|
+
while it showed**, as `innerHTML` does: focus goes back to where the user
|
|
147
|
+
was, not to the page, and `session-warn` is not sent a second time.
|
|
148
|
+
- **`<lt-error-summary>` has a name when it takes focus.** The box moves
|
|
149
|
+
focus to itself when a submission fails, and had no name, so a screen
|
|
150
|
+
reader said only "alert". The template writes the heading's `id` and the
|
|
151
|
+
box's `aria-labelledby`, as it writes `for` and `id` on a field, and the
|
|
152
|
+
recipes on the page do. When the heading has an id and the box no name,
|
|
153
|
+
the component points `aria-labelledby` at it, and follows a heading a
|
|
154
|
+
patch has replaced; when the heading has no id, it says so in the console.
|
|
155
|
+
It never writes an id itself: Datastar and idiomorph replace an element
|
|
156
|
+
whose id the server did not send, so the heading would have got a new one
|
|
157
|
+
on every patch. A blank `aria-label` or `aria-labelledby` counts as
|
|
158
|
+
missing.
|
|
159
|
+
- **`<lt-error-summary>` takes focus after an update, not in the middle of
|
|
160
|
+
it.** It moved focus as a morph removed `hidden`, before the morph had
|
|
161
|
+
updated the content, and idiomorph with `ignoreActiveValue` then left the
|
|
162
|
+
content of the focused box as it was: the box showed the previous errors.
|
|
163
|
+
A script that moves focus elsewhere in the same turn keeps it there.
|
|
164
|
+
- **`<lt-error-summary>` lets go of focus when it is hidden**, also from a
|
|
165
|
+
link inside it. In Firefox and WebKit the hidden box kept focus, so the
|
|
166
|
+
next errors never reached it.
|
|
167
|
+
- **`<lt-connection-status>` is announced in Firefox.** The component made
|
|
168
|
+
the bar a live region as it inserted it, and Firefox then sent no
|
|
169
|
+
live-region text through the accessibility API, so "No connection" was
|
|
170
|
+
never read out. The host is now the live region from the moment it is
|
|
171
|
+
connected, with `role="status"` and `aria-live="polite"` when it has
|
|
172
|
+
neither, and the bar is content inside it. A role the server wrote keeps
|
|
173
|
+
its own politeness. A morph that takes both off gets them back.
|
|
174
|
+
|
|
175
|
+
The name, and the announcement in Firefox, were found by
|
|
176
|
+
`check-accessibility-tree.ts`, which reads what a screen reader is given
|
|
177
|
+
through AT-SPI in Chromium and Firefox, against an accessibility contract per
|
|
178
|
+
component; the contracts are shown on the component pages, under
|
|
179
|
+
"Accessibility". The focus fixes were found by
|
|
180
|
+
`lt-error-summary.model.browser.test.ts`, which sends every version of the box
|
|
181
|
+
by Datastar, idiomorph and `outerHTML` in every order and checks the
|
|
182
|
+
accessibility tree the core computes after each step, and by the code review
|
|
183
|
+
of the pull request.
|
|
184
|
+
|
|
27
185
|
## 0.37.0 (2026-10-26)
|
|
28
186
|
|
|
29
187
|
### Breaking
|
|
@@ -64,8 +222,8 @@ including 0.36.0 were written in Norwegian, and list them under "Brytende".
|
|
|
64
222
|
| Maven `io.github.markusaugust:fristil`, `fristil-kotlinx-html`, `fristil-kommandolinje`, `fristil-gradle-plugin` | `lo-tek-interfaces`, `lo-tek-kotlinx-html`, `lo-tek-cli`, `lo-tek-gradle-plugin` |
|
|
65
223
|
| Gradle plugin `io.github.markusaugust.fristil`, tasks `fristilSjekk`, `fristilTema`, `fristilManifest` | `io.github.markusaugust.lo-tek`, `lotekCheck`, `lotekTheme`, `lotekManifest` |
|
|
66
224
|
| WebJar `webjars/fristil/` | `webjars/lo-tek/` |
|
|
67
|
-
| VS Code `Fristil.fristil-vscode` | `lo-tek.
|
|
68
|
-
| IntelliJ `no.fristil` | `no.lotek` ("LO-TEK
|
|
225
|
+
| VS Code `Fristil.fristil-vscode` | `lo-tek.interfaces` ("LO-TEK for VS Code") |
|
|
226
|
+
| IntelliJ `no.fristil` | `no.lotek` ("LO-TEK Interfaces") |
|
|
69
227
|
| rulebook `agent/maler.md` | `agent/templates.md` |
|
|
70
228
|
|
|
71
229
|
- **The command line has English verbs, flags and recipe keys.** There are
|
package/README.md
CHANGED
|
@@ -88,11 +88,12 @@ The builder functions in `lt` give the markup, the components give the behaviour
|
|
|
88
88
|
import { lt } from "@lo-tek/interfaces"
|
|
89
89
|
|
|
90
90
|
lt.errorSummary({ count: 2, id: "errors" })
|
|
91
|
-
// { host:
|
|
92
|
-
//
|
|
91
|
+
// { host: { class: "lt-error-summary", role: "alert", tabindex: "-1", id: "errors",
|
|
92
|
+
// "aria-labelledby": "errors-title" },
|
|
93
|
+
// title: { class: "lt-error-summary__title", id: "errors-title" } }
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
`id` is required in `lt.field()`, `lt.suggestion()`, `lt.tabs()` and `lt.popover()`, and `titleId` in `lt.dialog()`. `lt.tabs()` and `lt.suggestion()` also take `keys`, one key from the data per tab or option, and `lt.tabs()` requires `label`, the name of the tab list. The reason is hydration: if the function creates the id itself, the server and the browser each create their own, and the wiring between the parts is broken until React has corrected it. In React it comes from `useId()`. In `lt.errorSummary()`
|
|
96
|
+
`id` is required in `lt.field()`, `lt.suggestion()`, `lt.tabs()` and `lt.popover()`, and `titleId` in `lt.dialog()`. `lt.tabs()` and `lt.suggestion()` also take `keys`, one key from the data per tab or option, and `lt.tabs()` requires `label`, the name of the tab list. The reason is hydration: if the function creates the id itself, the server and the browser each create their own, and the wiring between the parts is broken until React has corrected it. In React it comes from `useId()`. In `lt.errorSummary()` both are optional: `id` names the box so that something else can point to it, and `titleId`, the heading's id that names the box, defaults to the `id` with `-title`. Without either, the heading has no id and the box no name, and the web component says so in the console.
|
|
96
97
|
|
|
97
98
|
The full reasoning, with the tests behind it, is on [Markup and behaviour](https://lo-tek.sobernetics.no/markup-and-behaviour/).
|
|
98
99
|
|
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.39.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
|
|
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.39.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
|
|
|
@@ -306,7 +306,9 @@ defineLtField()
|
|
|
306
306
|
The call is in the module, not in `mounted`, `onMount` or an effect. A hook
|
|
307
307
|
runs after the first paint, so the elements in the markup are plain
|
|
308
308
|
`HTMLElement`s when the framework renders them, and a call to `show()` or
|
|
309
|
-
`reportFailure()` before the hook fails with "is not a function".
|
|
309
|
+
`reportFailure()` before the hook fails with "is not a function". A property
|
|
310
|
+
set before the registration, such as `open`, is written through the setter
|
|
311
|
+
once the element is upgraded.
|
|
310
312
|
|
|
311
313
|
The markup is ordinary HTML, in whatever template your framework uses:
|
|
312
314
|
|
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.39.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.39.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.39.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.39.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.39.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.39.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.39.0/src/components/css/breadcrumbs/breadcrumbs.css` | none |
|
|
70
|
+
| `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.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.39.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.39.0/src/components/css/checkbox/checkbox.css` | `data-state`: invalid, success |
|
|
73
|
+
| `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/divider/divider.css` | `data-variant`: subtle, strong |
|
|
74
|
+
| `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 |
|
|
75
|
+
| `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) |
|
|
76
|
+
| `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 |
|
|
77
|
+
| `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 |
|
|
78
|
+
| `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 |
|
|
79
|
+
| `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/icon/icon.css` | none |
|
|
80
|
+
| `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 |
|
|
81
|
+
| `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) |
|
|
82
|
+
| `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/link/link.css` | none |
|
|
83
|
+
| `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.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.39.0/src/components/css/pagination/pagination.css` | none |
|
|
85
|
+
| `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 |
|
|
86
|
+
| `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.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.39.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.39.0/src/components/css/search/search.css` | `data-state`: invalid, success |
|
|
89
|
+
| `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 |
|
|
90
|
+
| `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/skeleton/skeleton.css` | `data-variant`: text, circle |
|
|
91
|
+
| `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/skip-link/skip-link.css` | none |
|
|
92
|
+
| `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/spinner/spinner.css` | `data-size`: small, large |
|
|
93
|
+
| `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.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.39.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.39.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.39.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.39.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.39.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.39.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.39.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.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 |
|
|
273
|
+
| `<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` |
|
|
274
|
+
| `<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` |
|
|
275
|
+
| `<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` |
|
|
276
|
+
| `<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` |
|
|
277
|
+
| `<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` |
|
|
278
|
+
| `<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` |
|
|
279
|
+
| `<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` |
|
|
280
|
+
| `<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` |
|
|
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.
|
|
@@ -307,7 +307,7 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
|
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.39.0/dist/components/frame/field/lt-field.js"
|
|
311
311
|
|
|
312
312
|
defineLtField()
|
|
313
313
|
</script>
|
package/agent/html.md
CHANGED
|
@@ -5,7 +5,7 @@ where the browser loads the files directly. If you use a bundler, React, Astro
|
|
|
5
5
|
or Datastar, or the server produces the markup, another file in this folder
|
|
6
6
|
applies.
|
|
7
7
|
|
|
8
|
-
This is @lo-tek/interfaces 0.
|
|
8
|
+
This is @lo-tek/interfaces 0.39.0. The file is generated by the package and
|
|
9
9
|
follows its version, so it can never say anything other than the code next to
|
|
10
10
|
it.
|
|
11
11
|
|
|
@@ -38,7 +38,7 @@ it.
|
|
|
38
38
|
One file with everything, the simplest and fastest option without a bundler:
|
|
39
39
|
|
|
40
40
|
```html
|
|
41
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
41
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/lotek.css">
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Or from `node_modules`, if you serve the folder:
|
|
@@ -54,8 +54,8 @@ be loaded, and comes first out of habit: the order between it and the others
|
|
|
54
54
|
does not matter.
|
|
55
55
|
|
|
56
56
|
```html
|
|
57
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
58
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
57
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/tokens/tokens.css">
|
|
58
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/components/css/button/button.css">
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Some of them, such as `field.css` and `suggestion.css`, fetch the stylesheets
|
|
@@ -74,41 +74,41 @@ The default variant has no attribute.
|
|
|
74
74
|
|
|
75
75
|
| Class | Stylesheet | Attributes |
|
|
76
76
|
| --- | --- | --- |
|
|
77
|
-
| `lt-accordion`<br>`lt-accordion__content` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
78
|
-
| `lt-alert`<br>`lt-alert__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
79
|
-
| `lt-avatar`<br>`lt-avatar-stack` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
80
|
-
| `lt-badge` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
81
|
-
| `lt-breadcrumbs` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
82
|
-
| `lt-button` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
83
|
-
| `lt-card`<br>`lt-card__title` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
84
|
-
| `lt-checkbox`<br>`lt-checkbox-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
85
|
-
| `lt-divider` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
86
|
-
| `lt-error-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
87
|
-
| `lt-fieldset`<br>`lt-legend` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
88
|
-
| `lt-file-upload`<br>`lt-file-upload-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
89
|
-
| `lt-heading` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
90
|
-
| `lt-help-text` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
91
|
-
| `lt-icon` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
92
|
-
| `lt-input` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
93
|
-
| `lt-label` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
94
|
-
| `lt-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
95
|
-
| `lt-list` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
96
|
-
| `lt-pagination`<br>`lt-pagination__gap` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
97
|
-
| `lt-paragraph` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
98
|
-
| `lt-progress` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
99
|
-
| `lt-radio`<br>`lt-radio-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
100
|
-
| `lt-search`<br>`lt-search-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
101
|
-
| `lt-select` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
102
|
-
| `lt-skeleton` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
103
|
-
| `lt-skip-link` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
104
|
-
| `lt-spinner` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
105
|
-
| `lt-sr-only` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
106
|
-
| `lt-switch`<br>`lt-switch-row` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
107
|
-
| `lt-table`<br>`lt-table__sort`<br>`lt-table-scroll` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
108
|
-
| `lt-tag` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
109
|
-
| `lt-textarea` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
110
|
-
| `lt-toggle-group`<br>`lt-toggle-group__option` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
111
|
-
| `lt-tooltip`<br>`lt-tooltip__bubble` | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
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 |
|
|
112
112
|
|
|
113
113
|
There is also `lt-theme-control`, a class on a radio button that lets the user
|
|
114
114
|
choose a theme. It is in `tokens.css`, and is described under Tokens.
|
|
@@ -187,7 +187,7 @@ root element:
|
|
|
187
187
|
Below the root element the browser then ignores the host's CSS without a
|
|
188
188
|
layer, unless a rule of the host's wins on specificity as described below, and
|
|
189
189
|
LO-TEK's layer applies again. The rule is in `lotek.css` and in
|
|
190
|
-
`https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
190
|
+
`https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/src/tokens/boundary.css`.
|
|
191
191
|
Fonts and other inherited properties still come from the host, and the
|
|
192
192
|
`--lt-*` variables work. Three things follow from it:
|
|
193
193
|
|
|
@@ -283,15 +283,15 @@ Three rules apply to all of them:
|
|
|
283
283
|
|
|
284
284
|
| Element | Category | Stylesheet | Registration | Attributes | Events | Classes inside |
|
|
285
285
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
286
|
-
| `<lt-field>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
287
|
-
| `<lt-tabs>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
288
|
-
| `<lt-error-summary>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
289
|
-
| `<lt-popover>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
290
|
-
| `<lt-suggestion>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
291
|
-
| `<lt-dialog>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
292
|
-
| `<lt-toast>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
293
|
-
| `<lt-session-timeout>` | frame | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
294
|
-
| `<lt-connection-status>` | standalone | `https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
286
|
+
| `<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 |
|
|
287
|
+
| `<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` |
|
|
288
|
+
| `<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` |
|
|
289
|
+
| `<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` |
|
|
290
|
+
| `<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` |
|
|
291
|
+
| `<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` |
|
|
292
|
+
| `<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` |
|
|
293
|
+
| `<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` |
|
|
294
|
+
| `<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` |
|
|
295
295
|
|
|
296
296
|
None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
297
297
|
`FormData` and ordinary CSS work straight into it.
|
|
@@ -299,7 +299,7 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
|
299
299
|
## 5. A whole form
|
|
300
300
|
|
|
301
301
|
```html
|
|
302
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
302
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/lotek.css">
|
|
303
303
|
|
|
304
304
|
<form id="contact-form" novalidate>
|
|
305
305
|
<lt-field>
|
|
@@ -313,7 +313,7 @@ None of them uses shadow DOM. The content is in plain DOM, so `querySelector`,
|
|
|
313
313
|
|
|
314
314
|
<script type="module">
|
|
315
315
|
import { defineLtField } from
|
|
316
|
-
"https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.
|
|
316
|
+
"https://cdn.jsdelivr.net/npm/@lo-tek/interfaces@0.39.0/dist/components/frame/field/lt-field.js"
|
|
317
317
|
|
|
318
318
|
defineLtField()
|
|
319
319
|
</script>
|