@lo-tek/interfaces 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +178 -0
- package/README.md +1 -1
- package/agent/astro.md +16 -14
- package/agent/bundles.md +18 -16
- package/agent/datastar.md +70 -68
- package/agent/html.md +63 -61
- package/agent/kotlin.md +622 -0
- package/agent/react.md +18 -16
- package/agent/templates.md +72 -68
- 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/steps/steps.d.ts +23 -0
- package/dist/components/css/steps/steps.d.ts.map +1 -0
- package/dist/components/css/steps/steps.js +21 -0
- package/dist/components/css/steps/steps.js.map +1 -0
- 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/events.d.ts +3 -1
- package/dist/components/events.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/frame/popover/lt-popover.js +7 -22
- package/dist/components/frame/popover/lt-popover.js.map +1 -1
- 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/frame/term/lt-term.d.ts +114 -0
- package/dist/components/frame/term/lt-term.d.ts.map +1 -0
- package/dist/components/frame/term/lt-term.js +530 -0
- package/dist/components/frame/term/lt-term.js.map +1 -0
- package/dist/components/frame/term/term.d.ts +55 -0
- package/dist/components/frame/term/term.d.ts.map +1 -0
- package/dist/components/frame/term/term.js +55 -0
- package/dist/components/frame/term/term.js.map +1 -0
- package/dist/components/host-element.d.ts +19 -0
- package/dist/components/host-element.d.ts.map +1 -1
- package/dist/components/host-element.js +37 -0
- package/dist/components/host-element.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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx/react.d.ts +3 -1
- package/dist/jsx/react.d.ts.map +1 -1
- package/dist/lotek.css +370 -1
- package/dist/lt.d.ts +13 -6
- package/dist/lt.d.ts.map +1 -1
- package/dist/lt.js +14 -6
- package/dist/lt.js.map +1 -1
- package/dist/react.d.ts +19 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +14 -0
- package/dist/react.js.map +1 -1
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +2 -0
- package/dist/register.js.map +1 -1
- package/dist/vocabulary/classes.d.ts.map +1 -1
- package/dist/vocabulary/classes.js +60 -6
- package/dist/vocabulary/classes.js.map +1 -1
- package/dist/vocabulary/elements.d.ts.map +1 -1
- package/dist/vocabulary/elements.js +16 -3
- package/dist/vocabulary/elements.js.map +1 -1
- package/dist/vocabulary/types.d.ts +28 -3
- package/dist/vocabulary/types.d.ts.map +1 -1
- package/live-templates-kotlin.xml +69 -0
- package/live-templates.xml +29 -23
- package/manifest/files.json +18 -0
- package/manifest/manifest.json +510 -87
- package/manifest/manifest.schema.json +54 -7
- package/package.json +16 -5
- 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/steps/steps.css +240 -0
- package/src/components/css/steps/steps.ts +26 -0
- 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/events.ts +3 -1
- 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 +7 -27
- 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/frame/term/lt-term.ts +573 -0
- package/src/components/frame/term/term.css +177 -0
- package/src/components/frame/term/term.ts +87 -0
- package/src/components/host-element.ts +46 -0
- 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/index.ts +4 -0
- package/src/jsx/react.ts +4 -0
- package/src/lt.ts +14 -6
- package/src/react.ts +15 -0
- package/src/register.ts +2 -0
- package/src/tokens/boundary.css +4 -0
- package/src/tokens/tokens.css +4 -0
- package/src/vocabulary/classes.ts +60 -6
- package/src/vocabulary/elements.ts +16 -3
- package/src/vocabulary/types.ts +25 -3
- package/web-types.json +32 -11
package/manifest/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"textLanguage": "en",
|
|
6
6
|
"elements": {
|
|
7
7
|
"lt-field": {
|
|
8
8
|
"link": "https://lo-tek.sobernetics.no/components/field/",
|
|
9
|
-
"description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup
|
|
9
|
+
"description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup from code that cannot call a builder function. When it can, in TypeScript, Kotlin or Java, use `lt.field()` or `Lt.field()` instead.",
|
|
10
10
|
"attributes": {
|
|
11
11
|
"disabled": {
|
|
12
12
|
"type": "flag",
|
|
@@ -186,6 +186,19 @@
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
|
+
"lt-term": {
|
|
190
|
+
"link": "https://lo-tek.sobernetics.no/components/term/",
|
|
191
|
+
"description": "A word in the text that shows its glossary entry in a card by the word. A link to the entry's id is enough; the component sets the class, `aria-details` and `aria-expanded` on the link, and shows the entry itself in the top layer while the card is open. Without JavaScript the word is a link to the glossary.",
|
|
192
|
+
"attributes": {},
|
|
193
|
+
"parts": {
|
|
194
|
+
"word": {
|
|
195
|
+
"selector": "a[href^='#']",
|
|
196
|
+
"description": "The word: a link to the glossary entry, such as `<a href=\"#term-signal\">`. The entry is a `<div>` with that id in a `<dl>`, with a `<dt>` and a `<dd>`, anywhere on the page.",
|
|
197
|
+
"content": "text",
|
|
198
|
+
"unique": true
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
189
202
|
"lt-suggestion": {
|
|
190
203
|
"link": "https://lo-tek.sobernetics.no/components/suggestion/",
|
|
191
204
|
"description": "Field with a suggestion list. A `<label for>`, an `<input id>`, an `.lt-suggestion__list` with `<li>` items and a `[role=status]` are enough; the component sets the roles and the wiring where the markup came without them, and gives the list and the options ids. The field never gets an id from the component. Filters as the user types, moves the highlight with the arrow keys and announces the number of matches.",
|
|
@@ -312,7 +325,7 @@
|
|
|
312
325
|
},
|
|
313
326
|
"lt-dialog": {
|
|
314
327
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
315
|
-
"description": "Makes a `<dialog class=\"lt-dialog\">` modal with `showModal()
|
|
328
|
+
"description": "Makes a `<dialog class=\"lt-dialog\">` the server sends open a real modal, with `showModal()`. The host around the dialog. Gives the dialog its name from the first heading outside `lt-dialog__body` when neither `aria-labelledby` nor `aria-label` is there.",
|
|
316
329
|
"attributes": {
|
|
317
330
|
"open": {
|
|
318
331
|
"type": "flag",
|
|
@@ -395,7 +408,7 @@
|
|
|
395
408
|
},
|
|
396
409
|
"lt-session-timeout": {
|
|
397
410
|
"link": "https://lo-tek.sobernetics.no/components/session-timeout/",
|
|
398
|
-
"description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
|
|
411
|
+
"description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out with a button that closes the dialog, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
|
|
399
412
|
"attributes": {
|
|
400
413
|
"warn-at": {
|
|
401
414
|
"type": "number",
|
|
@@ -1275,6 +1288,31 @@
|
|
|
1275
1288
|
"content": "text",
|
|
1276
1289
|
"attributes": {}
|
|
1277
1290
|
},
|
|
1291
|
+
"lt-steps": {
|
|
1292
|
+
"component": "steps",
|
|
1293
|
+
"title": "Steps",
|
|
1294
|
+
"description": "A step indicator that shows where the user is in a task over several pages. A CSS component with one class and no JavaScript.",
|
|
1295
|
+
"link": "https://lo-tek.sobernetics.no/components/steps/",
|
|
1296
|
+
"content": "parts",
|
|
1297
|
+
"parts": {
|
|
1298
|
+
"step": {
|
|
1299
|
+
"selector": "li",
|
|
1300
|
+
"description": "One step, with its name as text, or a link back to it. The step the user is on has `aria-current=\"step\"`, and the steps before it are drawn as done.",
|
|
1301
|
+
"content": "free",
|
|
1302
|
+
"multiple": true
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"texts": [
|
|
1306
|
+
{
|
|
1307
|
+
"variable": "--lt-steps-done-text",
|
|
1308
|
+
"text": "Completed ",
|
|
1309
|
+
"attribute": "aria-current",
|
|
1310
|
+
"value": "step",
|
|
1311
|
+
"siblingsBefore": true
|
|
1312
|
+
}
|
|
1313
|
+
],
|
|
1314
|
+
"attributes": {}
|
|
1315
|
+
},
|
|
1278
1316
|
"lt-switch": {
|
|
1279
1317
|
"component": "switch",
|
|
1280
1318
|
"title": "Switch",
|
|
@@ -1483,7 +1521,7 @@
|
|
|
1483
1521
|
"lt-dialog": {
|
|
1484
1522
|
"component": "dialog",
|
|
1485
1523
|
"title": "Dialog",
|
|
1486
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1524
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1487
1525
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1488
1526
|
"content": "free",
|
|
1489
1527
|
"parts": {
|
|
@@ -1528,14 +1566,14 @@
|
|
|
1528
1566
|
"danger"
|
|
1529
1567
|
],
|
|
1530
1568
|
"default": "neutral",
|
|
1531
|
-
"description": "Colour of the header. Default: none."
|
|
1569
|
+
"description": "Colour of the header. Default: `neutral`, which gives none."
|
|
1532
1570
|
}
|
|
1533
1571
|
}
|
|
1534
1572
|
},
|
|
1535
1573
|
"lt-dialog__body": {
|
|
1536
1574
|
"component": "dialog",
|
|
1537
1575
|
"title": "Dialog",
|
|
1538
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1576
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1539
1577
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1540
1578
|
"content": "free",
|
|
1541
1579
|
"partOf": "lt-dialog",
|
|
@@ -1544,7 +1582,7 @@
|
|
|
1544
1582
|
"lt-dialog__title": {
|
|
1545
1583
|
"component": "dialog",
|
|
1546
1584
|
"title": "Dialog",
|
|
1547
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1585
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1548
1586
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1549
1587
|
"content": "text",
|
|
1550
1588
|
"partOf": "lt-dialog",
|
|
@@ -1553,7 +1591,7 @@
|
|
|
1553
1591
|
"lt-dialog__footer": {
|
|
1554
1592
|
"component": "dialog",
|
|
1555
1593
|
"title": "Dialog",
|
|
1556
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1594
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1557
1595
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1558
1596
|
"content": "free",
|
|
1559
1597
|
"partOf": "lt-dialog",
|
|
@@ -1562,7 +1600,7 @@
|
|
|
1562
1600
|
"lt-dialog__header": {
|
|
1563
1601
|
"component": "dialog",
|
|
1564
1602
|
"title": "Dialog",
|
|
1565
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1603
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1566
1604
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1567
1605
|
"content": "parts",
|
|
1568
1606
|
"partOf": "lt-dialog",
|
|
@@ -1584,7 +1622,7 @@
|
|
|
1584
1622
|
"lt-dialog__subtitle": {
|
|
1585
1623
|
"component": "dialog",
|
|
1586
1624
|
"title": "Dialog",
|
|
1587
|
-
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for
|
|
1625
|
+
"description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
|
|
1588
1626
|
"link": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
1589
1627
|
"content": "text",
|
|
1590
1628
|
"partOf": "lt-dialog",
|
|
@@ -1827,6 +1865,35 @@
|
|
|
1827
1865
|
"content": "free",
|
|
1828
1866
|
"attributes": {}
|
|
1829
1867
|
},
|
|
1868
|
+
"lt-term": {
|
|
1869
|
+
"component": "term",
|
|
1870
|
+
"title": "Term",
|
|
1871
|
+
"description": "A word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
|
|
1872
|
+
"link": "https://lo-tek.sobernetics.no/components/term/",
|
|
1873
|
+
"content": "text",
|
|
1874
|
+
"attributes": {}
|
|
1875
|
+
},
|
|
1876
|
+
"lt-term__entry": {
|
|
1877
|
+
"component": "term",
|
|
1878
|
+
"title": "Term",
|
|
1879
|
+
"description": "A word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
|
|
1880
|
+
"link": "https://lo-tek.sobernetics.no/components/term/",
|
|
1881
|
+
"content": "parts",
|
|
1882
|
+
"parts": {
|
|
1883
|
+
"term": {
|
|
1884
|
+
"selector": "dt",
|
|
1885
|
+
"description": "The term, as it stands in the glossary.",
|
|
1886
|
+
"content": "text",
|
|
1887
|
+
"unique": true
|
|
1888
|
+
},
|
|
1889
|
+
"description": {
|
|
1890
|
+
"selector": "dd",
|
|
1891
|
+
"description": "The explanation. It can hold links and code.",
|
|
1892
|
+
"content": "free"
|
|
1893
|
+
}
|
|
1894
|
+
},
|
|
1895
|
+
"attributes": {}
|
|
1896
|
+
},
|
|
1830
1897
|
"lt-connection-status": {
|
|
1831
1898
|
"component": "connection-status",
|
|
1832
1899
|
"title": "Connection Status",
|
|
@@ -1879,6 +1946,8 @@
|
|
|
1879
1946
|
"builders": [
|
|
1880
1947
|
{
|
|
1881
1948
|
"name": "accordion",
|
|
1949
|
+
"description": "The attributes for a panel that can be expanded.\n\nThe class goes on a `<details>` with a `<summary>` first. The browser handles opening, closing, the keyboard and screen readers announcing \"expanded\" or \"collapsed\". Build the same thing from buttons and `aria-expanded`, and all of that must be written again, and the browser's find in page no longer finds text inside a closed panel.",
|
|
1950
|
+
"example": "<details {...accordion()}>\n <summary>Who can take out a policy?</summary>\n <div class={accordion.content}>…</div>\n</details>",
|
|
1882
1951
|
"options": [
|
|
1883
1952
|
{
|
|
1884
1953
|
"name": "variant",
|
|
@@ -1890,7 +1959,8 @@
|
|
|
1890
1959
|
"plain"
|
|
1891
1960
|
]
|
|
1892
1961
|
},
|
|
1893
|
-
"description": "Its own frame, or just a line between the panels. Default: `default`."
|
|
1962
|
+
"description": "Its own frame, or just a line between the panels. Default: `default`.",
|
|
1963
|
+
"default": "default"
|
|
1894
1964
|
}
|
|
1895
1965
|
],
|
|
1896
1966
|
"returns": {
|
|
@@ -1916,10 +1986,13 @@
|
|
|
1916
1986
|
},
|
|
1917
1987
|
"classes": {
|
|
1918
1988
|
"content": "lt-accordion__content"
|
|
1919
|
-
}
|
|
1989
|
+
},
|
|
1990
|
+
"docs": "https://lo-tek.sobernetics.no/components/accordion/"
|
|
1920
1991
|
},
|
|
1921
1992
|
{
|
|
1922
1993
|
"name": "alert",
|
|
1994
|
+
"description": "The attributes for a message about the whole page or a whole form.\n\nThe role is not set here, because it depends on when the message comes. If it is in the markup from the start, it should have no role. If it appears while the page is idle, it needs `role=\"status\"`, or `role=\"alert\"` if the user must stop.",
|
|
1995
|
+
"example": "<div {...alert({ color: \"warning\" })}>\n <p class={alert.title}>Your routes have not been saved</p>\n</div>",
|
|
1923
1996
|
"options": [
|
|
1924
1997
|
{
|
|
1925
1998
|
"name": "color",
|
|
@@ -1967,10 +2040,13 @@
|
|
|
1967
2040
|
},
|
|
1968
2041
|
"classes": {
|
|
1969
2042
|
"title": "lt-alert__title"
|
|
1970
|
-
}
|
|
2043
|
+
},
|
|
2044
|
+
"docs": "https://lo-tek.sobernetics.no/components/alert/"
|
|
1971
2045
|
},
|
|
1972
2046
|
{
|
|
1973
2047
|
"name": "avatar",
|
|
2048
|
+
"description": "The attributes for a profile picture or initials.\n\nIf the name is already next to it, the picture is decoration: set `aria-hidden=\"true\"` on it, or the name is announced twice. If the picture stands alone, it must have a text that says who it is.",
|
|
2049
|
+
"example": "<span {...avatar({ size: \"small\" })} aria-hidden=\"true\">DP</span>",
|
|
1974
2050
|
"options": [
|
|
1975
2051
|
{
|
|
1976
2052
|
"name": "size",
|
|
@@ -1983,7 +2059,8 @@
|
|
|
1983
2059
|
"large"
|
|
1984
2060
|
]
|
|
1985
2061
|
},
|
|
1986
|
-
"description": "Size. Default: `medium`."
|
|
2062
|
+
"description": "Size. Default: `medium`.",
|
|
2063
|
+
"default": "medium"
|
|
1987
2064
|
},
|
|
1988
2065
|
{
|
|
1989
2066
|
"name": "variant",
|
|
@@ -1995,7 +2072,8 @@
|
|
|
1995
2072
|
"square"
|
|
1996
2073
|
]
|
|
1997
2074
|
},
|
|
1998
|
-
"description": "Round or rounded square. Default: `circle`."
|
|
2075
|
+
"description": "Round or rounded square. Default: `circle`.",
|
|
2076
|
+
"default": "circle"
|
|
1999
2077
|
}
|
|
2000
2078
|
],
|
|
2001
2079
|
"returns": {
|
|
@@ -2032,10 +2110,13 @@
|
|
|
2032
2110
|
},
|
|
2033
2111
|
"classes": {
|
|
2034
2112
|
"stack": "lt-avatar-stack"
|
|
2035
|
-
}
|
|
2113
|
+
},
|
|
2114
|
+
"docs": "https://lo-tek.sobernetics.no/components/avatar/"
|
|
2036
2115
|
},
|
|
2037
2116
|
{
|
|
2038
2117
|
"name": "badge",
|
|
2118
|
+
"description": "The attributes for a status badge.",
|
|
2119
|
+
"example": "<span {...badge({ color: \"success\" })}>Paid</span>",
|
|
2039
2120
|
"options": [
|
|
2040
2121
|
{
|
|
2041
2122
|
"name": "color",
|
|
@@ -2050,7 +2131,8 @@
|
|
|
2050
2131
|
"neutral"
|
|
2051
2132
|
]
|
|
2052
2133
|
},
|
|
2053
|
-
"description": "What the status means. Default: `info`."
|
|
2134
|
+
"description": "What the status means. Default: `info`.",
|
|
2135
|
+
"default": "info"
|
|
2054
2136
|
}
|
|
2055
2137
|
],
|
|
2056
2138
|
"returns": {
|
|
@@ -2082,10 +2164,13 @@
|
|
|
2082
2164
|
}
|
|
2083
2165
|
}
|
|
2084
2166
|
}
|
|
2085
|
-
}
|
|
2167
|
+
},
|
|
2168
|
+
"docs": "https://lo-tek.sobernetics.no/components/badge/"
|
|
2086
2169
|
},
|
|
2087
2170
|
{
|
|
2088
2171
|
"name": "breadcrumbs",
|
|
2172
|
+
"description": "The attributes for a breadcrumb trail.\n\nThe class goes on an `<ol>` inside a `<nav>` with a text that says what the navigation is, for example `aria-label=\"You are here\"`. The order matters, so the list must be numbered even though the numbers are not shown.\n\nThe separator between the steps is added with CSS. Had it been in the markup, screen readers would have read \"slash\" between every step.",
|
|
2173
|
+
"example": "<nav aria-label=\"You are here\">\n <ol {...breadcrumbs()}>\n <li><a href=\"/\">Home</a></li>\n <li><a href=\"/claims\" aria-current=\"page\">My claims</a></li>\n </ol>\n</nav>",
|
|
2089
2174
|
"options": [],
|
|
2090
2175
|
"returns": {
|
|
2091
2176
|
"kind": "attributes"
|
|
@@ -2098,10 +2183,13 @@
|
|
|
2098
2183
|
},
|
|
2099
2184
|
"options": {}
|
|
2100
2185
|
}
|
|
2101
|
-
}
|
|
2186
|
+
},
|
|
2187
|
+
"docs": "https://lo-tek.sobernetics.no/components/breadcrumbs/"
|
|
2102
2188
|
},
|
|
2103
2189
|
{
|
|
2104
2190
|
"name": "button",
|
|
2191
|
+
"description": "The attributes for a button.",
|
|
2192
|
+
"example": "<button {...button({ variant: \"secondary\" })}>Save draft</button>",
|
|
2105
2193
|
"options": [
|
|
2106
2194
|
{
|
|
2107
2195
|
"name": "variant",
|
|
@@ -2115,7 +2203,8 @@
|
|
|
2115
2203
|
"danger"
|
|
2116
2204
|
]
|
|
2117
2205
|
},
|
|
2118
|
-
"description": "How weighty the action is. Default: `primary`."
|
|
2206
|
+
"description": "How weighty the action is. Default: `primary`.",
|
|
2207
|
+
"default": "primary"
|
|
2119
2208
|
}
|
|
2120
2209
|
],
|
|
2121
2210
|
"returns": {
|
|
@@ -2144,10 +2233,13 @@
|
|
|
2144
2233
|
}
|
|
2145
2234
|
}
|
|
2146
2235
|
}
|
|
2147
|
-
}
|
|
2236
|
+
},
|
|
2237
|
+
"docs": "https://lo-tek.sobernetics.no/components/button/"
|
|
2148
2238
|
},
|
|
2149
2239
|
{
|
|
2150
2240
|
"name": "card",
|
|
2241
|
+
"description": "The attributes for a card.\n\n`interactive` gives hover and a focus ring, but makes nothing clickable by itself. If the whole card should be pressable, the element must be an `<a>` or a `<button>`. A `<div>` with a click listener can neither be reached with the keyboard nor be announced as something to press.",
|
|
2242
|
+
"example": "<a {...card({ interactive: true })} href=\"/claims/AV-2079-0481\">…</a>",
|
|
2151
2243
|
"options": [
|
|
2152
2244
|
{
|
|
2153
2245
|
"name": "variant",
|
|
@@ -2159,7 +2251,8 @@
|
|
|
2159
2251
|
"filled"
|
|
2160
2252
|
]
|
|
2161
2253
|
},
|
|
2162
|
-
"description": "Surface or outline. Default: `outline`."
|
|
2254
|
+
"description": "Surface or outline. Default: `outline`.",
|
|
2255
|
+
"default": "outline"
|
|
2163
2256
|
},
|
|
2164
2257
|
{
|
|
2165
2258
|
"name": "interactive",
|
|
@@ -2201,10 +2294,13 @@
|
|
|
2201
2294
|
},
|
|
2202
2295
|
"classes": {
|
|
2203
2296
|
"title": "lt-card__title"
|
|
2204
|
-
}
|
|
2297
|
+
},
|
|
2298
|
+
"docs": "https://lo-tek.sobernetics.no/components/card/"
|
|
2205
2299
|
},
|
|
2206
2300
|
{
|
|
2207
2301
|
"name": "checkbox",
|
|
2302
|
+
"description": "The attributes for a checkbox.\n\n`type` is set here, so the box cannot become a text field with a box's styling. The indeterminate state is set with `element.indeterminate = true` in JavaScript, not as an attribute, because HTML has no such attribute.",
|
|
2303
|
+
"example": "<input {...checkbox({ state: \"invalid\" })} />",
|
|
2208
2304
|
"options": [
|
|
2209
2305
|
{
|
|
2210
2306
|
"name": "state",
|
|
@@ -2217,7 +2313,8 @@
|
|
|
2217
2313
|
"success"
|
|
2218
2314
|
]
|
|
2219
2315
|
},
|
|
2220
|
-
"description": "Validation state. Default: `default`."
|
|
2316
|
+
"description": "Validation state. Default: `default`.",
|
|
2317
|
+
"default": "default"
|
|
2221
2318
|
}
|
|
2222
2319
|
],
|
|
2223
2320
|
"returns": {
|
|
@@ -2248,10 +2345,13 @@
|
|
|
2248
2345
|
},
|
|
2249
2346
|
"classes": {
|
|
2250
2347
|
"row": "lt-checkbox-row"
|
|
2251
|
-
}
|
|
2348
|
+
},
|
|
2349
|
+
"docs": "https://lo-tek.sobernetics.no/components/checkbox/"
|
|
2252
2350
|
},
|
|
2253
2351
|
{
|
|
2254
2352
|
"name": "connectionStatus",
|
|
2353
|
+
"description": "The attributes for the bar that says the connection is lost.\n\nBy definition the server cannot tell you it is unreachable. When it is down, nothing comes from it to render. So the component creates all the content itself, and `data-ignore-morph` stops a later patch from tearing it away the moment the connection is back. The host is the live region, `role=\"status\"` with `aria-live=\"polite\"`, so the region exists before the bar and its text arrive.",
|
|
2354
|
+
"example": "<lt-connection-status {...lt.connectionStatus()} />",
|
|
2255
2355
|
"options": [
|
|
2256
2356
|
{
|
|
2257
2357
|
"name": "offlineText",
|
|
@@ -2303,10 +2403,13 @@
|
|
|
2303
2403
|
}
|
|
2304
2404
|
}
|
|
2305
2405
|
}
|
|
2306
|
-
}
|
|
2406
|
+
},
|
|
2407
|
+
"docs": "https://lo-tek.sobernetics.no/components/connection-status/"
|
|
2307
2408
|
},
|
|
2308
2409
|
{
|
|
2309
2410
|
"name": "dialog",
|
|
2411
|
+
"description": "The attributes for a dialog.\n\nOpening a dialog is a call, not an attribute: only `showModal()` moves focus in, keeps focus inside the dialog, closes on Escape and makes the rest of the page inert. A `<dialog open>` in the markup is a box on the page.\n\nThat is a problem for a server that only sends HTML, since it cannot call anything in the browser. So the server says the dialog is open, and `<lt-dialog>` makes the call.\n\nThe two `open`s are not the same, and it is worth keeping them apart:\n\n- `open` on the **host** is the server saying the dialog should be shown. It is not preserved. If it were, the server could never open the dialog again after the user had closed it once. If the server sends the region again with `open` still set, the dialog opens again. For a dismissal to last, the app must tell the server.\n- `open` on the **`<dialog>`** is set by the browser itself when `showModal()` is called. It is not in the server's HTML, so a morph removes it, and the component puts it back. The server also writes it when it knows the dialog should be shown: without JavaScript a `<dialog>` without `open` is hidden, and its content does not exist for the reader. With the attribute it stands as a box on the page until the component turns it into a modal.",
|
|
2412
|
+
"example": "const box = lt.dialog({ titleId: \"cancel-title\", open: true })\n\n<lt-dialog {...box.host}>\n <dialog {...box.dialog}>\n <h2 {...box.title}>Cancel job 222-0481?</h2>\n <div {...box.body}>The crew keeps the advance. This cannot be undone.</div>\n <form method=\"dialog\" {...box.footer}>\n <button class=\"lt-button\" value=\"keep\">Keep the job</button>\n </form>\n </dialog>\n</lt-dialog>",
|
|
2310
2413
|
"options": [
|
|
2311
2414
|
{
|
|
2312
2415
|
"name": "titleId",
|
|
@@ -2314,7 +2417,7 @@
|
|
|
2314
2417
|
"type": {
|
|
2315
2418
|
"kind": "text"
|
|
2316
2419
|
},
|
|
2317
|
-
"description": "Id of the heading. The dialog takes its name from it with `aria-labelledby`."
|
|
2420
|
+
"description": "Id of the heading. The dialog takes its name from it with `aria-labelledby`. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
2318
2421
|
},
|
|
2319
2422
|
{
|
|
2320
2423
|
"name": "open",
|
|
@@ -2338,7 +2441,8 @@
|
|
|
2338
2441
|
"danger"
|
|
2339
2442
|
]
|
|
2340
2443
|
},
|
|
2341
|
-
"description": "Colour of the header. Default: none."
|
|
2444
|
+
"description": "Colour of the header. Default: `neutral`, which gives none.",
|
|
2445
|
+
"default": "neutral"
|
|
2342
2446
|
}
|
|
2343
2447
|
],
|
|
2344
2448
|
"returns": {
|
|
@@ -2546,10 +2650,27 @@
|
|
|
2546
2650
|
}
|
|
2547
2651
|
}
|
|
2548
2652
|
}
|
|
2653
|
+
},
|
|
2654
|
+
"docs": "https://lo-tek.sobernetics.no/components/dialog/",
|
|
2655
|
+
"parts": {
|
|
2656
|
+
"dialog": {
|
|
2657
|
+
"element": "lt-dialog",
|
|
2658
|
+
"part": "dialog"
|
|
2659
|
+
},
|
|
2660
|
+
"title": {
|
|
2661
|
+
"element": "lt-dialog",
|
|
2662
|
+
"part": "title"
|
|
2663
|
+
},
|
|
2664
|
+
"body": {
|
|
2665
|
+
"element": "lt-dialog",
|
|
2666
|
+
"part": "body"
|
|
2667
|
+
}
|
|
2549
2668
|
}
|
|
2550
2669
|
},
|
|
2551
2670
|
{
|
|
2552
2671
|
"name": "divider",
|
|
2672
|
+
"description": "The attributes for a divider.\n\nThe class goes on an `<hr>`. If the line separates two parts of the content, it is information screen readers should get. If it is only decoration between two boxes that are already apart, set `aria-hidden=\"true\"` on it.",
|
|
2673
|
+
"example": "<hr {...divider({ variant: \"subtle\" })} />",
|
|
2553
2674
|
"options": [
|
|
2554
2675
|
{
|
|
2555
2676
|
"name": "variant",
|
|
@@ -2562,7 +2683,8 @@
|
|
|
2562
2683
|
"strong"
|
|
2563
2684
|
]
|
|
2564
2685
|
},
|
|
2565
|
-
"description": "How visible the line is. Default: `default`."
|
|
2686
|
+
"description": "How visible the line is. Default: `default`.",
|
|
2687
|
+
"default": "default"
|
|
2566
2688
|
}
|
|
2567
2689
|
],
|
|
2568
2690
|
"returns": {
|
|
@@ -2588,10 +2710,13 @@
|
|
|
2588
2710
|
}
|
|
2589
2711
|
}
|
|
2590
2712
|
}
|
|
2591
|
-
}
|
|
2713
|
+
},
|
|
2714
|
+
"docs": "https://lo-tek.sobernetics.no/components/divider/"
|
|
2592
2715
|
},
|
|
2593
2716
|
{
|
|
2594
2717
|
"name": "errorSummary",
|
|
2718
|
+
"description": "The attributes for an error summary.\n\nThe server writes the whole box, including the heading and the list. `<lt-error-summary>` only moves focus and handles clicks on the links. The component used to create the heading itself, and then it disappeared on every morph in Datastar.",
|
|
2719
|
+
"example": "const summary = lt.errorSummary({\n count: errors.length,\n id: \"errors\",\n titleId: \"errors-title\",\n})\n\n<lt-error-summary {...summary.host}>\n <h2 {...summary.title}>You need to fix 2 errors</h2>\n <ul><li><a href=\"#fixer\">The fixer's address is missing an @</a></li></ul>\n</lt-error-summary>",
|
|
2595
2720
|
"options": [
|
|
2596
2721
|
{
|
|
2597
2722
|
"name": "count",
|
|
@@ -2607,7 +2732,7 @@
|
|
|
2607
2732
|
"type": {
|
|
2608
2733
|
"kind": "text"
|
|
2609
2734
|
},
|
|
2610
|
-
"description": "The id of the box, so the form can move focus here after submission."
|
|
2735
|
+
"description": "The id of the box, so the form can move focus here after submission. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
2611
2736
|
},
|
|
2612
2737
|
{
|
|
2613
2738
|
"name": "titleId",
|
|
@@ -2628,10 +2753,19 @@
|
|
|
2628
2753
|
"kind": "attributes"
|
|
2629
2754
|
}
|
|
2630
2755
|
}
|
|
2756
|
+
},
|
|
2757
|
+
"docs": "https://lo-tek.sobernetics.no/components/error-summary/",
|
|
2758
|
+
"parts": {
|
|
2759
|
+
"title": {
|
|
2760
|
+
"element": "lt-error-summary",
|
|
2761
|
+
"part": "title"
|
|
2762
|
+
}
|
|
2631
2763
|
}
|
|
2632
2764
|
},
|
|
2633
2765
|
{
|
|
2634
2766
|
"name": "errorText",
|
|
2767
|
+
"description": "The attributes for an error text below a field.",
|
|
2768
|
+
"example": "<p {...errorText({ variant: \"warning\" })}>…</p>",
|
|
2635
2769
|
"options": [
|
|
2636
2770
|
{
|
|
2637
2771
|
"name": "variant",
|
|
@@ -2643,7 +2777,8 @@
|
|
|
2643
2777
|
"warning"
|
|
2644
2778
|
]
|
|
2645
2779
|
},
|
|
2646
|
-
"description": "Whether the error stops submission or only warns. Default: `error`."
|
|
2780
|
+
"description": "Whether the error stops submission or only warns. Default: `error`.",
|
|
2781
|
+
"default": "error"
|
|
2647
2782
|
}
|
|
2648
2783
|
],
|
|
2649
2784
|
"returns": {
|
|
@@ -2666,10 +2801,13 @@
|
|
|
2666
2801
|
}
|
|
2667
2802
|
}
|
|
2668
2803
|
}
|
|
2669
|
-
}
|
|
2804
|
+
},
|
|
2805
|
+
"docs": "https://lo-tek.sobernetics.no/components/error-text/"
|
|
2670
2806
|
},
|
|
2671
2807
|
{
|
|
2672
2808
|
"name": "field",
|
|
2809
|
+
"description": "Connects the label, field, help text and error text.\n\nThe same calculation `<lt-field>` does in the browser, but as data, for the code that renders the markup. Then no web component is needed.",
|
|
2810
|
+
"example": "const field = lt.field({ id: \"fixer\", required: \"text\", help: true, error: true, invalid })\n\n<label {...field.label}>Fixer's address</label>\n<input {...lt.input({ type: \"email\", state: field.state })} {...field.control} />\n<p {...lt.helpText()} {...field.help}>The board writes to the fixer, never to the crew.</p>\n<p {...lt.errorText()} {...field.error}>Enter the fixer's address, for example fixer@relay.example.</p>",
|
|
2673
2811
|
"options": [
|
|
2674
2812
|
{
|
|
2675
2813
|
"name": "id",
|
|
@@ -2677,7 +2815,7 @@
|
|
|
2677
2815
|
"type": {
|
|
2678
2816
|
"kind": "text"
|
|
2679
2817
|
},
|
|
2680
|
-
"description": "The id of the control. Required."
|
|
2818
|
+
"description": "The id of the control. Required. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
2681
2819
|
},
|
|
2682
2820
|
{
|
|
2683
2821
|
"name": "help",
|
|
@@ -2780,10 +2918,31 @@
|
|
|
2780
2918
|
]
|
|
2781
2919
|
}
|
|
2782
2920
|
}
|
|
2921
|
+
},
|
|
2922
|
+
"docs": "https://lo-tek.sobernetics.no/components/field/",
|
|
2923
|
+
"parts": {
|
|
2924
|
+
"label": {
|
|
2925
|
+
"element": "lt-field",
|
|
2926
|
+
"part": "label"
|
|
2927
|
+
},
|
|
2928
|
+
"control": {
|
|
2929
|
+
"element": "lt-field",
|
|
2930
|
+
"part": "control"
|
|
2931
|
+
},
|
|
2932
|
+
"help": {
|
|
2933
|
+
"element": "lt-field",
|
|
2934
|
+
"part": "help"
|
|
2935
|
+
},
|
|
2936
|
+
"error": {
|
|
2937
|
+
"element": "lt-field",
|
|
2938
|
+
"part": "error"
|
|
2939
|
+
}
|
|
2783
2940
|
}
|
|
2784
2941
|
},
|
|
2785
2942
|
{
|
|
2786
2943
|
"name": "fieldset",
|
|
2944
|
+
"description": "The attributes for a group of controls that belong together.\n\n`<fieldset>` with `<legend>` is the one way to give a set of radio buttons or checkboxes a shared label that screen readers actually announce before each choice.",
|
|
2945
|
+
"example": "<fieldset {...fieldset({ state: \"invalid\" })}>\n <legend {...legend({ required: \"symbol\" })}>Delivery method</legend>\n</fieldset>",
|
|
2787
2946
|
"options": [
|
|
2788
2947
|
{
|
|
2789
2948
|
"name": "state",
|
|
@@ -2796,7 +2955,8 @@
|
|
|
2796
2955
|
"success"
|
|
2797
2956
|
]
|
|
2798
2957
|
},
|
|
2799
|
-
"description": "Validation state for the whole group. Default: `default`."
|
|
2958
|
+
"description": "Validation state for the whole group. Default: `default`.",
|
|
2959
|
+
"default": "default"
|
|
2800
2960
|
},
|
|
2801
2961
|
{
|
|
2802
2962
|
"name": "disabled",
|
|
@@ -2838,10 +2998,13 @@
|
|
|
2838
2998
|
}
|
|
2839
2999
|
}
|
|
2840
3000
|
}
|
|
2841
|
-
}
|
|
3001
|
+
},
|
|
3002
|
+
"docs": "https://lo-tek.sobernetics.no/components/fieldset/"
|
|
2842
3003
|
},
|
|
2843
3004
|
{
|
|
2844
3005
|
"name": "fileUpload",
|
|
3006
|
+
"description": "The attributes for a file upload field.\n\nThe field is a plain `<input type=\"file\">`. The button inside is the browser's own, and its text comes from the operating system's language. It cannot be translated, so the label above the field must say what to upload.\n\n`accept` is a help in the file picker, not a barrier. The user can choose \"all files\", so the type must be checked on the server anyway.",
|
|
3007
|
+
"example": "<input {...fileUpload({ multiple: true, accept: \".bin\" })} />",
|
|
2845
3008
|
"options": [
|
|
2846
3009
|
{
|
|
2847
3010
|
"name": "state",
|
|
@@ -2854,7 +3017,8 @@
|
|
|
2854
3017
|
"success"
|
|
2855
3018
|
]
|
|
2856
3019
|
},
|
|
2857
|
-
"description": "Validation state. Default: `default`."
|
|
3020
|
+
"description": "Validation state. Default: `default`.",
|
|
3021
|
+
"default": "default"
|
|
2858
3022
|
},
|
|
2859
3023
|
{
|
|
2860
3024
|
"name": "multiple",
|
|
@@ -2918,10 +3082,13 @@
|
|
|
2918
3082
|
},
|
|
2919
3083
|
"classes": {
|
|
2920
3084
|
"list": "lt-file-upload-list"
|
|
2921
|
-
}
|
|
3085
|
+
},
|
|
3086
|
+
"docs": "https://lo-tek.sobernetics.no/components/file-upload/"
|
|
2922
3087
|
},
|
|
2923
3088
|
{
|
|
2924
3089
|
"name": "heading",
|
|
3090
|
+
"description": "The attributes for a heading.\n\nSize and level are two different things. The level is `<h1>` to `<h6>` and sets the structure screen readers navigate by; `size` only sets how large the text looks. An `<h2>` that should look small is correct; an `<h4>` chosen because it was small enough skips a level in the structure.",
|
|
3091
|
+
"example": "<h2 {...heading({ size: \"m\" })}>Attachments</h2>",
|
|
2925
3092
|
"options": [
|
|
2926
3093
|
{
|
|
2927
3094
|
"name": "size",
|
|
@@ -2937,7 +3104,8 @@
|
|
|
2937
3104
|
"mega"
|
|
2938
3105
|
]
|
|
2939
3106
|
},
|
|
2940
|
-
"description": "Visual size. Default: `l`."
|
|
3107
|
+
"description": "Visual size. Default: `l`.",
|
|
3108
|
+
"default": "l"
|
|
2941
3109
|
}
|
|
2942
3110
|
],
|
|
2943
3111
|
"returns": {
|
|
@@ -2972,10 +3140,13 @@
|
|
|
2972
3140
|
}
|
|
2973
3141
|
}
|
|
2974
3142
|
}
|
|
2975
|
-
}
|
|
3143
|
+
},
|
|
3144
|
+
"docs": "https://lo-tek.sobernetics.no/components/heading/"
|
|
2976
3145
|
},
|
|
2977
3146
|
{
|
|
2978
3147
|
"name": "helpText",
|
|
3148
|
+
"description": "The attributes for help text below a field.",
|
|
3149
|
+
"example": "<p {...helpText({ variant: \"warning\" })}>…</p>",
|
|
2979
3150
|
"options": [
|
|
2980
3151
|
{
|
|
2981
3152
|
"name": "variant",
|
|
@@ -2989,7 +3160,8 @@
|
|
|
2989
3160
|
"warning"
|
|
2990
3161
|
]
|
|
2991
3162
|
},
|
|
2992
|
-
"description": "How loudly the text should speak. Default: `muted`."
|
|
3163
|
+
"description": "How loudly the text should speak. Default: `muted`.",
|
|
3164
|
+
"default": "muted"
|
|
2993
3165
|
}
|
|
2994
3166
|
],
|
|
2995
3167
|
"returns": {
|
|
@@ -3018,10 +3190,13 @@
|
|
|
3018
3190
|
}
|
|
3019
3191
|
}
|
|
3020
3192
|
}
|
|
3021
|
-
}
|
|
3193
|
+
},
|
|
3194
|
+
"docs": "https://lo-tek.sobernetics.no/components/help-text/"
|
|
3022
3195
|
},
|
|
3023
3196
|
{
|
|
3024
3197
|
"name": "icon",
|
|
3198
|
+
"description": "The attributes for an icon. The class goes on an `<svg>`, and the svg comes from the app's icon set: LO-TEK ships no icons.\n\nThe icon is as large as the text around it, and is drawn in the colour the svg says, which should be `currentColor`. Without `label` it is decoration, and if it stands alone in a button, the button must get its name somewhere else: `aria-label` on the button, or a text with `lt-sr-only`. The core reports a button that lacks one.",
|
|
3199
|
+
"example": "<button {...button()} aria-label=\"Delete ticket #0331\">\n <svg {...icon()} viewBox=\"0 0 24 24\">…</svg>\n</button>",
|
|
3025
3200
|
"options": [
|
|
3026
3201
|
{
|
|
3027
3202
|
"name": "label",
|
|
@@ -3054,10 +3229,13 @@
|
|
|
3054
3229
|
}
|
|
3055
3230
|
}
|
|
3056
3231
|
}
|
|
3057
|
-
}
|
|
3232
|
+
},
|
|
3233
|
+
"docs": "https://lo-tek.sobernetics.no/components/icon/"
|
|
3058
3234
|
},
|
|
3059
3235
|
{
|
|
3060
3236
|
"name": "input",
|
|
3237
|
+
"description": "The attributes for a text field.\n\n`type` sets both the HTML type and the icon variant, so the two cannot get out of step. Write them by hand, and it is easy to get a date field that looks like a date field, but where nothing happens when the user presses the icon.",
|
|
3238
|
+
"example": "<input {...input({ type: \"date\", state: \"invalid\" })} />",
|
|
3061
3239
|
"options": [
|
|
3062
3240
|
{
|
|
3063
3241
|
"name": "type",
|
|
@@ -3079,7 +3257,8 @@
|
|
|
3079
3257
|
"time"
|
|
3080
3258
|
]
|
|
3081
3259
|
},
|
|
3082
|
-
"description": "The HTML type. Set as `type`, and decides the icon. Default: `text`."
|
|
3260
|
+
"description": "The HTML type. Set as `type`, and decides the icon. Default: `text`.",
|
|
3261
|
+
"default": "text"
|
|
3083
3262
|
},
|
|
3084
3263
|
{
|
|
3085
3264
|
"name": "state",
|
|
@@ -3092,7 +3271,8 @@
|
|
|
3092
3271
|
"success"
|
|
3093
3272
|
]
|
|
3094
3273
|
},
|
|
3095
|
-
"description": "Validation state. Default: `default`."
|
|
3274
|
+
"description": "Validation state. Default: `default`.",
|
|
3275
|
+
"default": "default"
|
|
3096
3276
|
}
|
|
3097
3277
|
],
|
|
3098
3278
|
"returns": {
|
|
@@ -3161,10 +3341,13 @@
|
|
|
3161
3341
|
}
|
|
3162
3342
|
}
|
|
3163
3343
|
}
|
|
3164
|
-
}
|
|
3344
|
+
},
|
|
3345
|
+
"docs": "https://lo-tek.sobernetics.no/components/input/"
|
|
3165
3346
|
},
|
|
3166
3347
|
{
|
|
3167
3348
|
"name": "label",
|
|
3349
|
+
"description": "The attributes for a label.\n\nThe marker is only visual, so set `required` on the field itself as well, or the screen reader is not told that it must be filled in.",
|
|
3350
|
+
"example": "<label {...label({ required: \"symbol\" })} htmlFor=\"fixer\">Fixer's address</label>",
|
|
3168
3351
|
"options": [
|
|
3169
3352
|
{
|
|
3170
3353
|
"name": "required",
|
|
@@ -3197,10 +3380,12 @@
|
|
|
3197
3380
|
],
|
|
3198
3381
|
"returns": {
|
|
3199
3382
|
"kind": "attributes"
|
|
3200
|
-
}
|
|
3383
|
+
},
|
|
3384
|
+
"docs": "https://lo-tek.sobernetics.no/components/label/"
|
|
3201
3385
|
},
|
|
3202
3386
|
{
|
|
3203
3387
|
"name": "legend",
|
|
3388
|
+
"description": "The attributes for the label of a group.\n\nThe same marker as `label()`, but on a `<legend>`.",
|
|
3204
3389
|
"options": [
|
|
3205
3390
|
{
|
|
3206
3391
|
"name": "required",
|
|
@@ -3233,10 +3418,13 @@
|
|
|
3233
3418
|
],
|
|
3234
3419
|
"returns": {
|
|
3235
3420
|
"kind": "attributes"
|
|
3236
|
-
}
|
|
3421
|
+
},
|
|
3422
|
+
"docs": "https://lo-tek.sobernetics.no/components/fieldset/"
|
|
3237
3423
|
},
|
|
3238
3424
|
{
|
|
3239
3425
|
"name": "link",
|
|
3426
|
+
"description": "The attributes for a link.\n\nAn `<a>` without `href` is no link to a screen reader and is not in the tab order. `role` and `tabindex` give it both back while it is disabled.",
|
|
3427
|
+
"example": "<a {...link()} href=\"/small-print\">Read the small print</a>\n<a {...link({ disabled: true })}>See annual statement</a>",
|
|
3240
3428
|
"options": [
|
|
3241
3429
|
{
|
|
3242
3430
|
"name": "disabled",
|
|
@@ -3269,10 +3457,13 @@
|
|
|
3269
3457
|
}
|
|
3270
3458
|
}
|
|
3271
3459
|
}
|
|
3272
|
-
}
|
|
3460
|
+
},
|
|
3461
|
+
"docs": "https://lo-tek.sobernetics.no/components/link/"
|
|
3273
3462
|
},
|
|
3274
3463
|
{
|
|
3275
3464
|
"name": "list",
|
|
3465
|
+
"description": "The attributes for a list.\n\nThe class goes on `<ul>` or `<ol>`. `plain` and `divided` remove the bullets visually, but the list stays a list, so the screen reader still says how many items it has. That is why the variant exists: without it people would use `<div>` to get rid of the bullets. The exception is Safari, where a `<ul>` without visible bullets can need `role=\"list\"`. See the component page.",
|
|
3466
|
+
"example": "<ul {...list({ variant: \"divided\" })}>…</ul>",
|
|
3276
3467
|
"options": [
|
|
3277
3468
|
{
|
|
3278
3469
|
"name": "variant",
|
|
@@ -3285,7 +3476,8 @@
|
|
|
3285
3476
|
"divided"
|
|
3286
3477
|
]
|
|
3287
3478
|
},
|
|
3288
|
-
"description": "Bullets, plain rows, or rows with a line between them. Default: `default`."
|
|
3479
|
+
"description": "Bullets, plain rows, or rows with a line between them. Default: `default`.",
|
|
3480
|
+
"default": "default"
|
|
3289
3481
|
}
|
|
3290
3482
|
],
|
|
3291
3483
|
"returns": {
|
|
@@ -3311,10 +3503,13 @@
|
|
|
3311
3503
|
}
|
|
3312
3504
|
}
|
|
3313
3505
|
}
|
|
3314
|
-
}
|
|
3506
|
+
},
|
|
3507
|
+
"docs": "https://lo-tek.sobernetics.no/components/list/"
|
|
3315
3508
|
},
|
|
3316
3509
|
{
|
|
3317
3510
|
"name": "pagination",
|
|
3511
|
+
"description": "The attributes for pagination.\n\nThe class goes on a `<ul>` inside a `<nav aria-label=\"Pagination\">`. Each page is a link with its own address, not a button: the user can then open page three in a new tab, and come back with the back button.\n\nThe current page is marked with `aria-current=\"page\"`, which both gives the colour and is what the screen reader announces.",
|
|
3512
|
+
"example": "<nav aria-label=\"Pagination\">\n <ul {...pagination()}>…</ul>\n</nav>",
|
|
3318
3513
|
"options": [],
|
|
3319
3514
|
"returns": {
|
|
3320
3515
|
"kind": "attributes"
|
|
@@ -3330,10 +3525,13 @@
|
|
|
3330
3525
|
},
|
|
3331
3526
|
"classes": {
|
|
3332
3527
|
"gap": "lt-pagination__gap"
|
|
3333
|
-
}
|
|
3528
|
+
},
|
|
3529
|
+
"docs": "https://lo-tek.sobernetics.no/components/pagination/"
|
|
3334
3530
|
},
|
|
3335
3531
|
{
|
|
3336
3532
|
"name": "paragraph",
|
|
3533
|
+
"description": "The attributes for a paragraph.\n\nThe width is limited to 70 characters. Longer lines make it hard to find the start of the next one, and that is the most common reason a text is hard to read even when the type is large enough.",
|
|
3534
|
+
"example": "<p {...paragraph({ variant: \"lead\" })}>A short summary of what the page is about.</p>",
|
|
3337
3535
|
"options": [
|
|
3338
3536
|
{
|
|
3339
3537
|
"name": "size",
|
|
@@ -3346,7 +3544,8 @@
|
|
|
3346
3544
|
"large"
|
|
3347
3545
|
]
|
|
3348
3546
|
},
|
|
3349
|
-
"description": "Text size. Default: `medium`."
|
|
3547
|
+
"description": "Text size. Default: `medium`.",
|
|
3548
|
+
"default": "medium"
|
|
3350
3549
|
},
|
|
3351
3550
|
{
|
|
3352
3551
|
"name": "variant",
|
|
@@ -3358,7 +3557,8 @@
|
|
|
3358
3557
|
"lead"
|
|
3359
3558
|
]
|
|
3360
3559
|
},
|
|
3361
|
-
"description": "`lead` is the introduction right below the heading. Default: `default`."
|
|
3560
|
+
"description": "`lead` is the introduction right below the heading. Default: `default`.",
|
|
3561
|
+
"default": "default"
|
|
3362
3562
|
}
|
|
3363
3563
|
],
|
|
3364
3564
|
"returns": {
|
|
@@ -3392,10 +3592,13 @@
|
|
|
3392
3592
|
}
|
|
3393
3593
|
}
|
|
3394
3594
|
}
|
|
3395
|
-
}
|
|
3595
|
+
},
|
|
3596
|
+
"docs": "https://lo-tek.sobernetics.no/components/paragraph/"
|
|
3396
3597
|
},
|
|
3397
3598
|
{
|
|
3398
3599
|
"name": "popover",
|
|
3600
|
+
"description": "The attributes for a popover.\n\nThe server writes both the button and the panel, with the wiring between them. `<lt-popover>` works out the position and closes on a click outside.",
|
|
3601
|
+
"example": "const box = lt.popover({ id: \"help\" })\n\n<lt-popover>\n <button {...box.trigger}>What is the late fee?</button>\n <div {...box.panel}>EB 100 a night past the return date. No exceptions.</div>\n</lt-popover>",
|
|
3399
3602
|
"options": [
|
|
3400
3603
|
{
|
|
3401
3604
|
"name": "id",
|
|
@@ -3403,7 +3606,7 @@
|
|
|
3403
3606
|
"type": {
|
|
3404
3607
|
"kind": "text"
|
|
3405
3608
|
},
|
|
3406
|
-
"description": "Id of the panel. Connects the button to the panel with `aria-controls`."
|
|
3609
|
+
"description": "Id of the panel. Connects the button to the panel with `aria-controls`. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
3407
3610
|
},
|
|
3408
3611
|
{
|
|
3409
3612
|
"name": "open",
|
|
@@ -3425,7 +3628,8 @@
|
|
|
3425
3628
|
"top-end"
|
|
3426
3629
|
]
|
|
3427
3630
|
},
|
|
3428
|
-
"description": "Which edge the panel hangs from. Default: `bottom-start`."
|
|
3631
|
+
"description": "Which edge the panel hangs from. Default: `bottom-start`.",
|
|
3632
|
+
"default": "bottom-start"
|
|
3429
3633
|
}
|
|
3430
3634
|
],
|
|
3431
3635
|
"returns": {
|
|
@@ -3521,10 +3725,23 @@
|
|
|
3521
3725
|
}
|
|
3522
3726
|
}
|
|
3523
3727
|
}
|
|
3728
|
+
},
|
|
3729
|
+
"docs": "https://lo-tek.sobernetics.no/components/popover/",
|
|
3730
|
+
"parts": {
|
|
3731
|
+
"trigger": {
|
|
3732
|
+
"element": "lt-popover",
|
|
3733
|
+
"part": "trigger"
|
|
3734
|
+
},
|
|
3735
|
+
"panel": {
|
|
3736
|
+
"element": "lt-popover",
|
|
3737
|
+
"part": "panel"
|
|
3738
|
+
}
|
|
3524
3739
|
}
|
|
3525
3740
|
},
|
|
3526
3741
|
{
|
|
3527
3742
|
"name": "progress",
|
|
3743
|
+
"description": "The attributes for a progress bar on a `<progress>`.\n\nThe element has the semantics built in: the browser exposes it as `role=\"progressbar\"` and announces how far it has come. You need neither a role, `aria-valuenow` nor `aria-valuemax`.\n\nLeave out `value`, and the bar becomes indeterminate: \"something is going on, we do not know for how long\". That is the same as `lt.spinner()` says, so choose one of them.\n\n`max` defaults to 100 and is always written out, against the rule that a default gives no attribute. The reason is that the rule is about appearance, where the CSS already has the answer. `max` is semantics, and HTML's own default is `1`: a `<progress value=\"40\">` without `max` shows a full bar, without anything saying so.",
|
|
3744
|
+
"example": "<progress {...progress({ value: 3, max: 7, label: \"Step 3 of 7\" })} />",
|
|
3528
3745
|
"options": [
|
|
3529
3746
|
{
|
|
3530
3747
|
"name": "value",
|
|
@@ -3628,10 +3845,13 @@
|
|
|
3628
3845
|
}
|
|
3629
3846
|
}
|
|
3630
3847
|
}
|
|
3631
|
-
}
|
|
3848
|
+
},
|
|
3849
|
+
"docs": "https://lo-tek.sobernetics.no/components/progress/"
|
|
3632
3850
|
},
|
|
3633
3851
|
{
|
|
3634
3852
|
"name": "radio",
|
|
3853
|
+
"description": "The attributes for a radio button.\n\nAll the buttons in a group must have the same `name`. That connection is what lets only one be selected, and lets the arrow keys move between them. You set `name` yourself, since only you know what the group is called.",
|
|
3854
|
+
"example": "<input {...radio()} name=\"delivery\" value=\"post\" />",
|
|
3635
3855
|
"options": [
|
|
3636
3856
|
{
|
|
3637
3857
|
"name": "state",
|
|
@@ -3644,7 +3864,8 @@
|
|
|
3644
3864
|
"success"
|
|
3645
3865
|
]
|
|
3646
3866
|
},
|
|
3647
|
-
"description": "Validation state. Default: `default`."
|
|
3867
|
+
"description": "Validation state. Default: `default`.",
|
|
3868
|
+
"default": "default"
|
|
3648
3869
|
}
|
|
3649
3870
|
],
|
|
3650
3871
|
"returns": {
|
|
@@ -3675,10 +3896,13 @@
|
|
|
3675
3896
|
},
|
|
3676
3897
|
"classes": {
|
|
3677
3898
|
"row": "lt-radio-row"
|
|
3678
|
-
}
|
|
3899
|
+
},
|
|
3900
|
+
"docs": "https://lo-tek.sobernetics.no/components/radio/"
|
|
3679
3901
|
},
|
|
3680
3902
|
{
|
|
3681
3903
|
"name": "search",
|
|
3904
|
+
"description": "The attributes for a search field.\n\nThe field is an `lt-input` with room for the magnifying glass, so both classes are set. `type=\"search\"` gives the browser's own cross for clearing the field, and on mobile a keyboard with \"Search\" instead of \"Enter\".",
|
|
3905
|
+
"example": "<input {...search()} name=\"q\" />",
|
|
3682
3906
|
"options": [
|
|
3683
3907
|
{
|
|
3684
3908
|
"name": "state",
|
|
@@ -3691,7 +3915,8 @@
|
|
|
3691
3915
|
"success"
|
|
3692
3916
|
]
|
|
3693
3917
|
},
|
|
3694
|
-
"description": "Validation state. Default: `default`."
|
|
3918
|
+
"description": "Validation state. Default: `default`.",
|
|
3919
|
+
"default": "default"
|
|
3695
3920
|
}
|
|
3696
3921
|
],
|
|
3697
3922
|
"returns": {
|
|
@@ -3722,10 +3947,13 @@
|
|
|
3722
3947
|
},
|
|
3723
3948
|
"classes": {
|
|
3724
3949
|
"row": "lt-search-row"
|
|
3725
|
-
}
|
|
3950
|
+
},
|
|
3951
|
+
"docs": "https://lo-tek.sobernetics.no/components/search/"
|
|
3726
3952
|
},
|
|
3727
3953
|
{
|
|
3728
3954
|
"name": "select",
|
|
3955
|
+
"description": "The attributes for a dropdown list.",
|
|
3956
|
+
"example": "<select {...select({ state: \"invalid\" })} />\n<select {...select({ picker: \"styled\" })} />",
|
|
3729
3957
|
"options": [
|
|
3730
3958
|
{
|
|
3731
3959
|
"name": "state",
|
|
@@ -3738,7 +3966,8 @@
|
|
|
3738
3966
|
"success"
|
|
3739
3967
|
]
|
|
3740
3968
|
},
|
|
3741
|
-
"description": "Validation state. Default: `default`."
|
|
3969
|
+
"description": "Validation state. Default: `default`.",
|
|
3970
|
+
"default": "default"
|
|
3742
3971
|
},
|
|
3743
3972
|
{
|
|
3744
3973
|
"name": "picker",
|
|
@@ -3750,7 +3979,8 @@
|
|
|
3750
3979
|
"styled"
|
|
3751
3980
|
]
|
|
3752
3981
|
},
|
|
3753
|
-
"description": "Who draws the dropdown list. Default: `auto`."
|
|
3982
|
+
"description": "Who draws the dropdown list. Default: `auto`.",
|
|
3983
|
+
"default": "auto"
|
|
3754
3984
|
}
|
|
3755
3985
|
],
|
|
3756
3986
|
"returns": {
|
|
@@ -3785,10 +4015,13 @@
|
|
|
3785
4015
|
}
|
|
3786
4016
|
}
|
|
3787
4017
|
}
|
|
3788
|
-
}
|
|
4018
|
+
},
|
|
4019
|
+
"docs": "https://lo-tek.sobernetics.no/components/select/"
|
|
3789
4020
|
},
|
|
3790
4021
|
{
|
|
3791
4022
|
"name": "sessionTimeout",
|
|
4023
|
+
"description": "The attributes for the warning that a signed-in session is about to expire.\n\nThe renderer writes the dialog and all of the text, in its own language and with its own translation tool. The component only keeps time: it opens and closes the dialog, fills in the number and announces the countdown.\n\nThe buttons are plain buttons in a `<form method=\"dialog\">`. The browser closes the dialog and sets `returnValue` to the button's `value`, and the component reads it. `data-ignore-morph` asks Datastar's morph to leave the warning alone. Without it the morph takes `open` and the number while the dialog is in the top layer. The component puts `open` back, and the number comes back on the next tick. With the attribute the number stays the whole time.",
|
|
4024
|
+
"example": "const session = lt.sessionTimeout({ titleId: \"session-title\" })\n\n<lt-session-timeout {...session.host}>\n <dialog {...session.dialog}>\n <h2 {...session.title}>Your session is ending</h2>\n <p {...session.text}>\n Your session on the Lattice ends in <span {...session.count}></span>. Unsaved routes will be lost.\n </p>\n <span {...session.live}></span>\n <form {...session.actions}>\n <button {...session.extend}>Stay connected</button>\n <button {...session.logout}>Log out</button>\n </form>\n </dialog>\n</lt-session-timeout>",
|
|
3792
4025
|
"options": [
|
|
3793
4026
|
{
|
|
3794
4027
|
"name": "titleId",
|
|
@@ -3796,7 +4029,7 @@
|
|
|
3796
4029
|
"type": {
|
|
3797
4030
|
"kind": "text"
|
|
3798
4031
|
},
|
|
3799
|
-
"description": "Id of the heading. The dialog takes its name from it with `aria-labelledby`."
|
|
4032
|
+
"description": "Id of the heading. The dialog takes its name from it with `aria-labelledby`. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
3800
4033
|
},
|
|
3801
4034
|
{
|
|
3802
4035
|
"name": "warnAt",
|
|
@@ -4046,10 +4279,43 @@
|
|
|
4046
4279
|
}
|
|
4047
4280
|
}
|
|
4048
4281
|
}
|
|
4282
|
+
},
|
|
4283
|
+
"docs": "https://lo-tek.sobernetics.no/components/session-timeout/",
|
|
4284
|
+
"parts": {
|
|
4285
|
+
"dialog": {
|
|
4286
|
+
"element": "lt-session-timeout",
|
|
4287
|
+
"part": "dialog"
|
|
4288
|
+
},
|
|
4289
|
+
"title": {
|
|
4290
|
+
"element": "lt-session-timeout",
|
|
4291
|
+
"part": "title"
|
|
4292
|
+
},
|
|
4293
|
+
"text": {
|
|
4294
|
+
"element": "lt-session-timeout",
|
|
4295
|
+
"part": "text"
|
|
4296
|
+
},
|
|
4297
|
+
"count": {
|
|
4298
|
+
"element": "lt-session-timeout",
|
|
4299
|
+
"part": "count"
|
|
4300
|
+
},
|
|
4301
|
+
"live": {
|
|
4302
|
+
"element": "lt-session-timeout",
|
|
4303
|
+
"part": "status"
|
|
4304
|
+
},
|
|
4305
|
+
"extend": {
|
|
4306
|
+
"element": "lt-session-timeout",
|
|
4307
|
+
"part": "button"
|
|
4308
|
+
},
|
|
4309
|
+
"logout": {
|
|
4310
|
+
"element": "lt-session-timeout",
|
|
4311
|
+
"part": "button"
|
|
4312
|
+
}
|
|
4049
4313
|
}
|
|
4050
4314
|
},
|
|
4051
4315
|
{
|
|
4052
4316
|
"name": "skeleton",
|
|
4317
|
+
"description": "The attributes for a placeholder while the content loads.\n\nThe shapes are always hidden from screen readers. They say nothing about what is coming, and a row of empty boxes being announced is worse than silence. Announce the wait in one place instead, with `role=\"status\"`.",
|
|
4318
|
+
"example": "<div {...skeleton({ variant: \"text\" })} />",
|
|
4053
4319
|
"options": [
|
|
4054
4320
|
{
|
|
4055
4321
|
"name": "variant",
|
|
@@ -4062,7 +4328,8 @@
|
|
|
4062
4328
|
"circle"
|
|
4063
4329
|
]
|
|
4064
4330
|
},
|
|
4065
|
-
"description": "Shape. Default: `block`."
|
|
4331
|
+
"description": "Shape. Default: `block`.",
|
|
4332
|
+
"default": "block"
|
|
4066
4333
|
}
|
|
4067
4334
|
],
|
|
4068
4335
|
"returns": {
|
|
@@ -4089,10 +4356,13 @@
|
|
|
4089
4356
|
}
|
|
4090
4357
|
}
|
|
4091
4358
|
}
|
|
4092
|
-
}
|
|
4359
|
+
},
|
|
4360
|
+
"docs": "https://lo-tek.sobernetics.no/components/skeleton/"
|
|
4093
4361
|
},
|
|
4094
4362
|
{
|
|
4095
4363
|
"name": "skipLink",
|
|
4364
|
+
"description": "The attributes for a skip-to-content link.\n\nThe link must be the first element in `<body>`, and point to the id of the main content. It sits off screen until it gets focus, and therefore cannot be hidden with `display: none`: the keyboard could not reach it either, and the whole point is lost.",
|
|
4365
|
+
"example": "<a {...skipLink()} href=\"#main-content\">Skip to main content</a>",
|
|
4096
4366
|
"options": [],
|
|
4097
4367
|
"returns": {
|
|
4098
4368
|
"kind": "attributes"
|
|
@@ -4105,10 +4375,13 @@
|
|
|
4105
4375
|
},
|
|
4106
4376
|
"options": {}
|
|
4107
4377
|
}
|
|
4108
|
-
}
|
|
4378
|
+
},
|
|
4379
|
+
"docs": "https://lo-tek.sobernetics.no/components/skip-link/"
|
|
4109
4380
|
},
|
|
4110
4381
|
{
|
|
4111
4382
|
"name": "spinner",
|
|
4383
|
+
"description": "The attributes for a loading indicator.\n\nWithout `label` the ring is only a shape, and is hidden from screen readers with `aria-hidden`, as an icon without a label is. With `label` it becomes a `role=\"status\"` that says what is going on. If you already have a visible text next to it, let that carry the message and drop `label`, so the same thing is not announced twice.",
|
|
4384
|
+
"example": "<span {...spinner({ label: \"Loading sectors\" })} />",
|
|
4112
4385
|
"options": [
|
|
4113
4386
|
{
|
|
4114
4387
|
"name": "size",
|
|
@@ -4121,7 +4394,8 @@
|
|
|
4121
4394
|
"large"
|
|
4122
4395
|
]
|
|
4123
4396
|
},
|
|
4124
|
-
"description": "Size. Default: `medium`."
|
|
4397
|
+
"description": "Size. Default: `medium`.",
|
|
4398
|
+
"default": "medium"
|
|
4125
4399
|
},
|
|
4126
4400
|
{
|
|
4127
4401
|
"name": "label",
|
|
@@ -4139,7 +4413,8 @@
|
|
|
4139
4413
|
"kind": "attributes",
|
|
4140
4414
|
"table": {
|
|
4141
4415
|
"base": {
|
|
4142
|
-
"class": "lt-spinner"
|
|
4416
|
+
"class": "lt-spinner",
|
|
4417
|
+
"aria-hidden": "true"
|
|
4143
4418
|
},
|
|
4144
4419
|
"options": {
|
|
4145
4420
|
"size": {
|
|
@@ -4156,6 +4431,7 @@
|
|
|
4156
4431
|
"label": {
|
|
4157
4432
|
"cases": {},
|
|
4158
4433
|
"template": {
|
|
4434
|
+
"aria-hidden": null,
|
|
4159
4435
|
"role": "status",
|
|
4160
4436
|
"aria-label": "{label}"
|
|
4161
4437
|
},
|
|
@@ -4165,10 +4441,13 @@
|
|
|
4165
4441
|
}
|
|
4166
4442
|
}
|
|
4167
4443
|
}
|
|
4168
|
-
}
|
|
4444
|
+
},
|
|
4445
|
+
"docs": "https://lo-tek.sobernetics.no/components/spinner/"
|
|
4169
4446
|
},
|
|
4170
4447
|
{
|
|
4171
4448
|
"name": "srOnly",
|
|
4449
|
+
"description": "The attributes for text that only screen readers should get.\n\nUse it when a label or explanation is needed by someone listening to the page, but would be noise to someone looking at it. If the content should be gone for everyone, use `hidden` instead.",
|
|
4450
|
+
"example": "<span {...srOnly()}>Opens in a new tab</span>",
|
|
4172
4451
|
"options": [],
|
|
4173
4452
|
"returns": {
|
|
4174
4453
|
"kind": "attributes"
|
|
@@ -4181,10 +4460,31 @@
|
|
|
4181
4460
|
},
|
|
4182
4461
|
"options": {}
|
|
4183
4462
|
}
|
|
4184
|
-
}
|
|
4463
|
+
},
|
|
4464
|
+
"docs": "https://lo-tek.sobernetics.no/components/sr-only/"
|
|
4465
|
+
},
|
|
4466
|
+
{
|
|
4467
|
+
"name": "steps",
|
|
4468
|
+
"description": "The attributes for a step indicator, which shows where the user is in a task over several pages, like an order.\n\nThe class goes on an `<ol>` with one `<li>` per step, and the step the user is on has `aria-current=\"step\"`. The steps before it are drawn as done, with a check the screen reader reads as \"Completed\", so the markup only says where the user is. A done step can be a link back to it.",
|
|
4469
|
+
"example": "<ol {...steps()} aria-label=\"Order\">\n <li><a href=\"/order/site\">Site</a></li>\n <li aria-current=\"step\">Walls</li>\n <li>Payment</li>\n</ol>",
|
|
4470
|
+
"options": [],
|
|
4471
|
+
"returns": {
|
|
4472
|
+
"kind": "attributes"
|
|
4473
|
+
},
|
|
4474
|
+
"table": {
|
|
4475
|
+
"kind": "attributes",
|
|
4476
|
+
"table": {
|
|
4477
|
+
"base": {
|
|
4478
|
+
"class": "lt-steps"
|
|
4479
|
+
},
|
|
4480
|
+
"options": {}
|
|
4481
|
+
}
|
|
4482
|
+
},
|
|
4483
|
+
"docs": "https://lo-tek.sobernetics.no/components/steps/"
|
|
4185
4484
|
},
|
|
4186
4485
|
{
|
|
4187
4486
|
"name": "suggestion",
|
|
4487
|
+
"description": "The attributes for a field with a suggestion list.\n\nThe server writes both the field and the list. The web component filters, handles the arrow keys and keeps `aria-activedescendant` in sync. It renders nothing: it used to create the whole field itself, and then there was nothing to fill in before the script had run.\n\nNo preserve list. The attributes that change while the user types are set by the web component, and it sets them back when a patch strips them. If something else has already filtered, set `prefiltered` on `<lt-suggestion>`, and the web component leaves both the options and the empty message alone. If the server should also decide whether the list is expanded and which option is highlighted, set `server-controlled` as well.",
|
|
4188
4488
|
"options": [
|
|
4189
4489
|
{
|
|
4190
4490
|
"name": "invalid",
|
|
@@ -4268,7 +4568,7 @@
|
|
|
4268
4568
|
"type": {
|
|
4269
4569
|
"kind": "text"
|
|
4270
4570
|
},
|
|
4271
|
-
"description": "Shared id stem. The control becomes `${id}`, the list `${id}-list`, and the options `${id}-option-${key}`."
|
|
4571
|
+
"description": "Shared id stem. The control becomes `${id}`, the list `${id}-list`, and the options `${id}-option-${key}`. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
4272
4572
|
},
|
|
4273
4573
|
{
|
|
4274
4574
|
"name": "keys",
|
|
@@ -4345,10 +4645,43 @@
|
|
|
4345
4645
|
]
|
|
4346
4646
|
}
|
|
4347
4647
|
}
|
|
4648
|
+
},
|
|
4649
|
+
"docs": "https://lo-tek.sobernetics.no/components/suggestion/",
|
|
4650
|
+
"parts": {
|
|
4651
|
+
"label": {
|
|
4652
|
+
"element": "lt-suggestion",
|
|
4653
|
+
"part": "label"
|
|
4654
|
+
},
|
|
4655
|
+
"control": {
|
|
4656
|
+
"element": "lt-suggestion",
|
|
4657
|
+
"part": "control"
|
|
4658
|
+
},
|
|
4659
|
+
"list": {
|
|
4660
|
+
"element": "lt-suggestion",
|
|
4661
|
+
"part": "list"
|
|
4662
|
+
},
|
|
4663
|
+
"options": {
|
|
4664
|
+
"element": "lt-suggestion",
|
|
4665
|
+
"part": "option"
|
|
4666
|
+
},
|
|
4667
|
+
"empty": {
|
|
4668
|
+
"element": "lt-suggestion",
|
|
4669
|
+
"part": "empty"
|
|
4670
|
+
},
|
|
4671
|
+
"status": {
|
|
4672
|
+
"element": "lt-suggestion",
|
|
4673
|
+
"part": "status"
|
|
4674
|
+
},
|
|
4675
|
+
"value": {
|
|
4676
|
+
"element": "lt-suggestion",
|
|
4677
|
+
"part": "value"
|
|
4678
|
+
}
|
|
4348
4679
|
}
|
|
4349
4680
|
},
|
|
4350
4681
|
{
|
|
4351
4682
|
"name": "switch",
|
|
4683
|
+
"description": "The attributes for an on/off switch.\n\nThe switch is a checkbox with `role=\"switch\"`. Screen readers then announce it as \"on\" and \"off\" rather than \"checked\", while the keyboard and `FormData` work as for a plain checkbox.\n\nThe switch has no validation state. A choice that is on or off cannot be invalid in itself; if turning it on is required, the requirement belongs in a checkbox with `required`.",
|
|
4684
|
+
"example": "<input {...switchControl()} />",
|
|
4352
4685
|
"options": [
|
|
4353
4686
|
{
|
|
4354
4687
|
"name": "disabled",
|
|
@@ -4384,10 +4717,13 @@
|
|
|
4384
4717
|
},
|
|
4385
4718
|
"classes": {
|
|
4386
4719
|
"row": "lt-switch-row"
|
|
4387
|
-
}
|
|
4720
|
+
},
|
|
4721
|
+
"docs": "https://lo-tek.sobernetics.no/components/switch/"
|
|
4388
4722
|
},
|
|
4389
4723
|
{
|
|
4390
4724
|
"name": "table",
|
|
4725
|
+
"description": "The attributes for a table.\n\nThe class goes on a real `<table>` with `<thead>` and `<th>`. The header cells are what let screen readers say \"Amount, 1,240 kroner\" when the user is in a cell. Build the table from `<div>` elements, and that connection does not exist.",
|
|
4726
|
+
"example": "<table {...table({ variant: \"striped\" })}>…</table>",
|
|
4391
4727
|
"options": [
|
|
4392
4728
|
{
|
|
4393
4729
|
"name": "variant",
|
|
@@ -4399,7 +4735,8 @@
|
|
|
4399
4735
|
"striped"
|
|
4400
4736
|
]
|
|
4401
4737
|
},
|
|
4402
|
-
"description": "Every other row on a muted surface. Default: `default`."
|
|
4738
|
+
"description": "Every other row on a muted surface. Default: `default`.",
|
|
4739
|
+
"default": "default"
|
|
4403
4740
|
},
|
|
4404
4741
|
{
|
|
4405
4742
|
"name": "hoverable",
|
|
@@ -4441,10 +4778,13 @@
|
|
|
4441
4778
|
},
|
|
4442
4779
|
"classes": {
|
|
4443
4780
|
"scroll": "lt-table-scroll"
|
|
4444
|
-
}
|
|
4781
|
+
},
|
|
4782
|
+
"docs": "https://lo-tek.sobernetics.no/components/table/"
|
|
4445
4783
|
},
|
|
4446
4784
|
{
|
|
4447
4785
|
"name": "tableSort",
|
|
4786
|
+
"description": "The attributes for a sortable column header.\n\n`aria-sort` is on the `<th>`, not on the button, because the cell is what describes the column. Only the sorted column has the attribute. The arrow is drawn from the same attribute, so what the screen reader says and what is shown cannot drift apart. The sorting itself is the app's job.",
|
|
4787
|
+
"example": "const date = lt.tableSort({ direction: \"descending\" })\n\n<th scope=\"col\" {...date.header}>\n <button {...date.button}>Date</button>\n</th>",
|
|
4448
4788
|
"options": [
|
|
4449
4789
|
{
|
|
4450
4790
|
"name": "direction",
|
|
@@ -4503,10 +4843,13 @@
|
|
|
4503
4843
|
}
|
|
4504
4844
|
}
|
|
4505
4845
|
}
|
|
4506
|
-
}
|
|
4846
|
+
},
|
|
4847
|
+
"docs": "https://lo-tek.sobernetics.no/components/table/"
|
|
4507
4848
|
},
|
|
4508
4849
|
{
|
|
4509
4850
|
"name": "tabs",
|
|
4851
|
+
"description": "The attributes for a tab list where the tabs are links to the panels.\n\nOnly links, ids and classes. Without JavaScript the tab list is then a plain list of links, and the panels follow one another: a table of contents that works for everyone. The roles, which tab is selected and which panels are hidden are written by `<lt-tabs>`. Had they been here, the markup without JavaScript would have said \"tab\" about a link that does not behave like one, and hidden the panels.\n\nThe first tab is selected when the page loads. Another one comes from the address, such as `#file-attachments`, or from `selected` and `select()` on `<lt-tabs>`.",
|
|
4852
|
+
"example": "const tabs = lt.tabs({ id: \"file\", keys: [\"claim\", \"attachments\"], label: \"Parts of the claim\" })",
|
|
4510
4853
|
"options": [
|
|
4511
4854
|
{
|
|
4512
4855
|
"name": "id",
|
|
@@ -4514,7 +4857,7 @@
|
|
|
4514
4857
|
"type": {
|
|
4515
4858
|
"kind": "text"
|
|
4516
4859
|
},
|
|
4517
|
-
"description": "The shared id stem. The panels become `${id}-${key}`, and the headings in them `${id}-${key}-heading`."
|
|
4860
|
+
"description": "The shared id stem. The panels become `${id}-${key}`, and the headings in them `${id}-${key}-heading`. Make it from a key in the data, never from the loop index or a counter, so it is unique on the page and the same on every render."
|
|
4518
4861
|
},
|
|
4519
4862
|
{
|
|
4520
4863
|
"name": "keys",
|
|
@@ -4522,7 +4865,7 @@
|
|
|
4522
4865
|
"type": {
|
|
4523
4866
|
"kind": "textList"
|
|
4524
4867
|
},
|
|
4525
|
-
"description": "One key per tab, from the data, such as `[\"
|
|
4868
|
+
"description": "One key per tab, from the data, such as `[\"claim\", \"attachments\"]`. The key gives the panel its id, and the link points to it. An index is not a key: if the server inserts a tab first, the same index points to another panel. An empty key, whitespace and two identical keys throw."
|
|
4526
4869
|
},
|
|
4527
4870
|
{
|
|
4528
4871
|
"name": "label",
|
|
@@ -4558,10 +4901,27 @@
|
|
|
4558
4901
|
}
|
|
4559
4902
|
}
|
|
4560
4903
|
}
|
|
4904
|
+
},
|
|
4905
|
+
"docs": "https://lo-tek.sobernetics.no/components/tabs/",
|
|
4906
|
+
"parts": {
|
|
4907
|
+
"list": {
|
|
4908
|
+
"element": "lt-tabs",
|
|
4909
|
+
"part": "list"
|
|
4910
|
+
},
|
|
4911
|
+
"tabs": {
|
|
4912
|
+
"element": "lt-tabs",
|
|
4913
|
+
"part": "tab"
|
|
4914
|
+
},
|
|
4915
|
+
"panels": {
|
|
4916
|
+
"element": "lt-tabs",
|
|
4917
|
+
"part": "panel"
|
|
4918
|
+
}
|
|
4561
4919
|
}
|
|
4562
4920
|
},
|
|
4563
4921
|
{
|
|
4564
4922
|
"name": "tag",
|
|
4923
|
+
"description": "The attributes for a tag.\n\nA tag labels content: keywords on an article, selected filters above a list. If it says what state something is in, Badge is right instead.\n\n`selectable` gives hover and a focus ring, but makes nothing pressable. The element must be a `<button>`, and you set `aria-pressed` yourself, since only you know whether the tag is selected.",
|
|
4924
|
+
"example": "<button {...tag({ selectable: true })} aria-pressed=\"true\">Cutter</button>",
|
|
4565
4925
|
"options": [
|
|
4566
4926
|
{
|
|
4567
4927
|
"name": "variant",
|
|
@@ -4573,7 +4933,8 @@
|
|
|
4573
4933
|
"filled"
|
|
4574
4934
|
]
|
|
4575
4935
|
},
|
|
4576
|
-
"description": "Outline or muted surface. Default: `outline`."
|
|
4936
|
+
"description": "Outline or muted surface. Default: `outline`.",
|
|
4937
|
+
"default": "outline"
|
|
4577
4938
|
},
|
|
4578
4939
|
{
|
|
4579
4940
|
"name": "selectable",
|
|
@@ -4612,10 +4973,46 @@
|
|
|
4612
4973
|
}
|
|
4613
4974
|
}
|
|
4614
4975
|
}
|
|
4976
|
+
},
|
|
4977
|
+
"docs": "https://lo-tek.sobernetics.no/components/tag/"
|
|
4978
|
+
},
|
|
4979
|
+
{
|
|
4980
|
+
"name": "term",
|
|
4981
|
+
"description": "The attributes for a word in the text that is explained in a glossary on the same page.\n\nOnly what holds without JavaScript: the word is a link to the entry, and `aria-details` says the entry explains it. `<lt-term>` around the link opens the entry as a card by the word, and writes `aria-expanded`.",
|
|
4982
|
+
"example": "const signal = lt.term({ id: \"term-signal\" })\n\n<p>Datastar keeps <lt-term><a {...signal.word}>signals</a></lt-term> in the browser.</p>\n<dl>\n <div {...signal.entry}><dt>Signal</dt><dd>A value Datastar keeps in the browser.</dd></div>\n</dl>",
|
|
4983
|
+
"options": [
|
|
4984
|
+
{
|
|
4985
|
+
"name": "id",
|
|
4986
|
+
"required": true,
|
|
4987
|
+
"type": {
|
|
4988
|
+
"kind": "text"
|
|
4989
|
+
},
|
|
4990
|
+
"description": "Id of the entry in the glossary: the `<div>` around the `<dt>` and `<dd>`. The word links to it, and the web component shows the entry itself as the card. Make it from the term, such as `term-signal`, so it is the same on every render."
|
|
4991
|
+
}
|
|
4992
|
+
],
|
|
4993
|
+
"returns": {
|
|
4994
|
+
"kind": "group",
|
|
4995
|
+
"fields": {
|
|
4996
|
+
"word": {
|
|
4997
|
+
"kind": "attributes"
|
|
4998
|
+
},
|
|
4999
|
+
"entry": {
|
|
5000
|
+
"kind": "attributes"
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
},
|
|
5004
|
+
"docs": "https://lo-tek.sobernetics.no/components/term/",
|
|
5005
|
+
"parts": {
|
|
5006
|
+
"word": {
|
|
5007
|
+
"element": "lt-term",
|
|
5008
|
+
"part": "word"
|
|
5009
|
+
}
|
|
4615
5010
|
}
|
|
4616
5011
|
},
|
|
4617
5012
|
{
|
|
4618
5013
|
"name": "textarea",
|
|
5014
|
+
"description": "The attributes for a multi-line text field.",
|
|
5015
|
+
"example": "<textarea {...textarea({ state: \"invalid\" })} />",
|
|
4619
5016
|
"options": [
|
|
4620
5017
|
{
|
|
4621
5018
|
"name": "state",
|
|
@@ -4628,7 +5025,8 @@
|
|
|
4628
5025
|
"success"
|
|
4629
5026
|
]
|
|
4630
5027
|
},
|
|
4631
|
-
"description": "Validation state. Default: `default`."
|
|
5028
|
+
"description": "Validation state. Default: `default`.",
|
|
5029
|
+
"default": "default"
|
|
4632
5030
|
}
|
|
4633
5031
|
],
|
|
4634
5032
|
"returns": {
|
|
@@ -4655,10 +5053,12 @@
|
|
|
4655
5053
|
}
|
|
4656
5054
|
}
|
|
4657
5055
|
}
|
|
4658
|
-
}
|
|
5056
|
+
},
|
|
5057
|
+
"docs": "https://lo-tek.sobernetics.no/components/textarea/"
|
|
4659
5058
|
},
|
|
4660
5059
|
{
|
|
4661
5060
|
"name": "toast",
|
|
5061
|
+
"description": "The attributes for the toast region.\n\nThe region is `role=\"status\"` and not `role=\"alert\"`. A message that comes because something went well should not interrupt what the screen reader is doing.\n\n`data-ignore-morph` is not optional. `<lt-toast>` creates and removes its message elements inside the region, and without the attribute the Datastar morph tears them away at the next patch, because the server's version of the region is empty. The attribute must be in the HTML the server sends: the component cannot set it on itself, since the morph reads it from the server's node.",
|
|
4662
5062
|
"options": [
|
|
4663
5063
|
{
|
|
4664
5064
|
"name": "label",
|
|
@@ -4759,10 +5159,13 @@
|
|
|
4759
5159
|
}
|
|
4760
5160
|
}
|
|
4761
5161
|
}
|
|
4762
|
-
}
|
|
5162
|
+
},
|
|
5163
|
+
"docs": "https://lo-tek.sobernetics.no/components/toast/"
|
|
4763
5164
|
},
|
|
4764
5165
|
{
|
|
4765
5166
|
"name": "toggleGroup",
|
|
5167
|
+
"description": "The attributes for a group where one option is selected at a time.\n\nThe group is radio buttons in disguise. Each option is a `<label>` with an `<input type=\"radio\">` inside, visually shrunk away. You then keep the arrow keys, `FormData` and the screen reader saying \"2 of 3\" without writing any of it again.\n\nIf the choices are actions rather than a setting, such as \"bold, italic, underline\", buttons with `aria-pressed` belong there instead.",
|
|
5168
|
+
"example": "<fieldset {...toggleGroup()}>\n <legend class=\"lt-sr-only\">View</legend>\n <label class={toggleGroup.option}>\n <input type=\"radio\" name=\"view\" value=\"dry\" checked /> Dry\n </label>\n</fieldset>",
|
|
4766
5169
|
"options": [],
|
|
4767
5170
|
"returns": {
|
|
4768
5171
|
"kind": "attributes"
|
|
@@ -4778,10 +5181,13 @@
|
|
|
4778
5181
|
},
|
|
4779
5182
|
"classes": {
|
|
4780
5183
|
"option": "lt-toggle-group__option"
|
|
4781
|
-
}
|
|
5184
|
+
},
|
|
5185
|
+
"docs": "https://lo-tek.sobernetics.no/components/toggle-group/"
|
|
4782
5186
|
},
|
|
4783
5187
|
{
|
|
4784
5188
|
"name": "tooltip",
|
|
5189
|
+
"description": "The attributes for the wrapper around a trigger and a tooltip bubble.\n\nThe bubble shows on hover and on focus. The focus part is not optional: a bubble that only comes with the mouse does not exist for keyboard users.\n\nThe text in the bubble must be connected to the trigger with `aria-describedby`. Without it the bubble is just something that appears on screen, and is never announced.\n\nUse it for something extra, never for something the user must have. On a touch screen there is neither hover nor focus before something is tapped.",
|
|
5190
|
+
"example": "<span {...tooltip()}>\n <button aria-describedby=\"hint\">Appraise</button>\n <span class={tooltip.bubble} role=\"tooltip\" id=\"hint\">At street value</span>\n</span>",
|
|
4785
5191
|
"options": [],
|
|
4786
5192
|
"returns": {
|
|
4787
5193
|
"kind": "attributes"
|
|
@@ -4797,7 +5203,8 @@
|
|
|
4797
5203
|
},
|
|
4798
5204
|
"classes": {
|
|
4799
5205
|
"bubble": "lt-tooltip__bubble"
|
|
4800
|
-
}
|
|
5206
|
+
},
|
|
5207
|
+
"docs": "https://lo-tek.sobernetics.no/components/tooltip/"
|
|
4801
5208
|
}
|
|
4802
5209
|
],
|
|
4803
5210
|
"tokens": {
|
|
@@ -5081,6 +5488,11 @@
|
|
|
5081
5488
|
"--lt-spinner-size": "var(--lt-spacing-6)",
|
|
5082
5489
|
"--lt-spinner-thickness": "2px"
|
|
5083
5490
|
},
|
|
5491
|
+
"steps": {
|
|
5492
|
+
"--lt-steps-marker-size": "var(--lt-spacing-7)",
|
|
5493
|
+
"--lt-steps-done-icon": "var(--lt-icon-check)",
|
|
5494
|
+
"--lt-steps-done-text": "\"Completed \""
|
|
5495
|
+
},
|
|
5084
5496
|
"suggestion": {
|
|
5085
5497
|
"--lt-suggestion-max-height": "calc(var(--lt-spacing-10) * 4)",
|
|
5086
5498
|
"--lt-suggestion-radius": "var(--lt-spacing-1)",
|
|
@@ -5102,6 +5514,17 @@
|
|
|
5102
5514
|
"--lt-tag-padding": "var(--lt-spacing-0-5) var(--lt-spacing-2)",
|
|
5103
5515
|
"--lt-tag-radius": "var(--lt-spacing-1)"
|
|
5104
5516
|
},
|
|
5517
|
+
"term": {
|
|
5518
|
+
"--lt-term-underline-color": "var(--lt-color-accent-fill)",
|
|
5519
|
+
"--lt-term-gap": "var(--lt-spacing-2)",
|
|
5520
|
+
"--lt-term-width": "min(22rem, calc(100vw - var(--lt-spacing-8)))",
|
|
5521
|
+
"--lt-term-padding": "var(--lt-spacing-3) var(--lt-spacing-4)",
|
|
5522
|
+
"--lt-term-accent-color": "var(--lt-color-accent-fill)",
|
|
5523
|
+
"--lt-term-radius": "var(--lt-spacing-1)",
|
|
5524
|
+
"--lt-term-sheet-height": "60dvh",
|
|
5525
|
+
"--lt-term-label-text": "\"Glossary\"",
|
|
5526
|
+
"--lt-term-label-font": "inherit"
|
|
5527
|
+
},
|
|
5105
5528
|
"textarea": {
|
|
5106
5529
|
"--lt-textarea-min-height": "calc(var(--lt-spacing-4) * 5)",
|
|
5107
5530
|
"--lt-textarea-padding": "var(--lt-spacing-2) var(--lt-spacing-3)",
|