@lo-tek/interfaces 0.0.0 → 0.37.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 +3254 -0
- package/LICENSE +21 -0
- package/README.md +128 -1
- package/agent/astro.md +400 -0
- package/agent/bundles.md +429 -0
- package/agent/datastar.md +409 -0
- package/agent/html.md +388 -0
- package/agent/react.md +440 -0
- package/agent/templates.md +472 -0
- package/core/lotek-core.wasm +0 -0
- package/core/lotek.wasm +0 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +14 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/css/accordion/accordion.d.ts +37 -0
- package/dist/components/css/accordion/accordion.d.ts.map +1 -0
- package/dist/components/css/accordion/accordion.js +31 -0
- package/dist/components/css/accordion/accordion.js.map +1 -0
- package/dist/components/css/alert/alert.d.ts +35 -0
- package/dist/components/css/alert/alert.d.ts.map +1 -0
- package/dist/components/css/alert/alert.js +29 -0
- package/dist/components/css/alert/alert.js.map +1 -0
- package/dist/components/css/avatar/avatar.d.ts +40 -0
- package/dist/components/css/avatar/avatar.d.ts.map +1 -0
- package/dist/components/css/avatar/avatar.js +30 -0
- package/dist/components/css/avatar/avatar.js.map +1 -0
- package/dist/components/css/badge/badge.d.ts +24 -0
- package/dist/components/css/badge/badge.d.ts.map +1 -0
- package/dist/components/css/badge/badge.js +24 -0
- package/dist/components/css/badge/badge.js.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +26 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js +24 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/css/button/button.d.ts +26 -0
- package/dist/components/css/button/button.d.ts.map +1 -0
- package/dist/components/css/button/button.js +25 -0
- package/dist/components/css/button/button.js.map +1 -0
- package/dist/components/css/card/card.d.ts +36 -0
- package/dist/components/css/card/card.d.ts.map +1 -0
- package/dist/components/css/card/card.js +28 -0
- package/dist/components/css/card/card.js.map +1 -0
- package/dist/components/css/checkbox/checkbox.d.ts +32 -0
- package/dist/components/css/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/css/checkbox/checkbox.js +27 -0
- package/dist/components/css/checkbox/checkbox.js.map +1 -0
- package/dist/components/css/divider/divider.d.ts +29 -0
- package/dist/components/css/divider/divider.d.ts.map +1 -0
- package/dist/components/css/divider/divider.js +23 -0
- package/dist/components/css/divider/divider.js.map +1 -0
- package/dist/components/css/error-text/error-text.d.ts +24 -0
- package/dist/components/css/error-text/error-text.d.ts.map +1 -0
- package/dist/components/css/error-text/error-text.js +18 -0
- package/dist/components/css/error-text/error-text.js.map +1 -0
- package/dist/components/css/fieldset/fieldset.d.ts +55 -0
- package/dist/components/css/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/css/fieldset/fieldset.js +39 -0
- package/dist/components/css/fieldset/fieldset.js.map +1 -0
- package/dist/components/css/file-upload/file-upload.d.ts +41 -0
- package/dist/components/css/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/css/file-upload/file-upload.js +32 -0
- package/dist/components/css/file-upload/file-upload.js.map +1 -0
- package/dist/components/css/heading/heading.d.ts +29 -0
- package/dist/components/css/heading/heading.d.ts.map +1 -0
- package/dist/components/css/heading/heading.js +23 -0
- package/dist/components/css/heading/heading.js.map +1 -0
- package/dist/components/css/help-text/help-text.d.ts +24 -0
- package/dist/components/css/help-text/help-text.d.ts.map +1 -0
- package/dist/components/css/help-text/help-text.js +23 -0
- package/dist/components/css/help-text/help-text.js.map +1 -0
- package/dist/components/css/icon/icon.d.ts +34 -0
- package/dist/components/css/icon/icon.d.ts.map +1 -0
- package/dist/components/css/icon/icon.js +25 -0
- package/dist/components/css/icon/icon.js.map +1 -0
- package/dist/components/css/input/input.d.ts +40 -0
- package/dist/components/css/input/input.d.ts.map +1 -0
- package/dist/components/css/input/input.js +45 -0
- package/dist/components/css/input/input.js.map +1 -0
- package/dist/components/css/label/label.d.ts +33 -0
- package/dist/components/css/label/label.d.ts.map +1 -0
- package/dist/components/css/label/label.js +23 -0
- package/dist/components/css/label/label.js.map +1 -0
- package/dist/components/css/link/link.d.ts +28 -0
- package/dist/components/css/link/link.d.ts.map +1 -0
- package/dist/components/css/link/link.js +20 -0
- package/dist/components/css/link/link.js.map +1 -0
- package/dist/components/css/list/list.d.ts +31 -0
- package/dist/components/css/list/list.d.ts.map +1 -0
- package/dist/components/css/list/list.js +25 -0
- package/dist/components/css/list/list.js.map +1 -0
- package/dist/components/css/pagination/pagination.d.ts +27 -0
- package/dist/components/css/pagination/pagination.d.ts.map +1 -0
- package/dist/components/css/pagination/pagination.js +25 -0
- package/dist/components/css/pagination/pagination.js.map +1 -0
- package/dist/components/css/paragraph/paragraph.d.ts +36 -0
- package/dist/components/css/paragraph/paragraph.d.ts.map +1 -0
- package/dist/components/css/paragraph/paragraph.js +26 -0
- package/dist/components/css/paragraph/paragraph.js.map +1 -0
- package/dist/components/css/progress/progress.d.ts +53 -0
- package/dist/components/css/progress/progress.d.ts.map +1 -0
- package/dist/components/css/progress/progress.js +38 -0
- package/dist/components/css/progress/progress.js.map +1 -0
- package/dist/components/css/radio/radio.d.ts +32 -0
- package/dist/components/css/radio/radio.d.ts.map +1 -0
- package/dist/components/css/radio/radio.js +27 -0
- package/dist/components/css/radio/radio.js.map +1 -0
- package/dist/components/css/search/search.d.ts +34 -0
- package/dist/components/css/search/search.d.ts.map +1 -0
- package/dist/components/css/search/search.js +32 -0
- package/dist/components/css/search/search.js.map +1 -0
- package/dist/components/css/select/select.d.ts +40 -0
- package/dist/components/css/select/select.d.ts.map +1 -0
- package/dist/components/css/select/select.js +31 -0
- package/dist/components/css/select/select.js.map +1 -0
- package/dist/components/css/shared.d.ts +90 -0
- package/dist/components/css/shared.d.ts.map +1 -0
- package/dist/components/css/shared.js +167 -0
- package/dist/components/css/shared.js.map +1 -0
- package/dist/components/css/skeleton/skeleton.d.ts +29 -0
- package/dist/components/css/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/css/skeleton/skeleton.js +23 -0
- package/dist/components/css/skeleton/skeleton.js.map +1 -0
- package/dist/components/css/skip-link/skip-link.d.ts +18 -0
- package/dist/components/css/skip-link/skip-link.d.ts.map +1 -0
- package/dist/components/css/skip-link/skip-link.js +16 -0
- package/dist/components/css/skip-link/skip-link.js.map +1 -0
- package/dist/components/css/spinner/spinner.d.ts +33 -0
- package/dist/components/css/spinner/spinner.d.ts.map +1 -0
- package/dist/components/css/spinner/spinner.js +25 -0
- package/dist/components/css/spinner/spinner.js.map +1 -0
- package/dist/components/css/sr-only/sr-only.d.ts +17 -0
- package/dist/components/css/sr-only/sr-only.d.ts.map +1 -0
- package/dist/components/css/sr-only/sr-only.js +15 -0
- package/dist/components/css/sr-only/sr-only.js.map +1 -0
- package/dist/components/css/switch/switch.d.ts +37 -0
- package/dist/components/css/switch/switch.d.ts.map +1 -0
- package/dist/components/css/switch/switch.js +29 -0
- package/dist/components/css/switch/switch.js.map +1 -0
- package/dist/components/css/table/table.d.ts +76 -0
- package/dist/components/css/table/table.d.ts.map +1 -0
- package/dist/components/css/table/table.js +59 -0
- package/dist/components/css/table/table.js.map +1 -0
- package/dist/components/css/tag/tag.d.ts +35 -0
- package/dist/components/css/tag/tag.d.ts.map +1 -0
- package/dist/components/css/tag/tag.js +27 -0
- package/dist/components/css/tag/tag.js.map +1 -0
- package/dist/components/css/textarea/textarea.d.ts +23 -0
- package/dist/components/css/textarea/textarea.d.ts.map +1 -0
- package/dist/components/css/textarea/textarea.js +18 -0
- package/dist/components/css/textarea/textarea.js.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts +31 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.js +29 -0
- package/dist/components/css/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/css/tooltip/tooltip.d.ts +31 -0
- package/dist/components/css/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/css/tooltip/tooltip.js +29 -0
- package/dist/components/css/tooltip/tooltip.js.map +1 -0
- package/dist/components/default-texts.d.ts +35 -0
- package/dist/components/default-texts.d.ts.map +1 -0
- package/dist/components/default-texts.js +35 -0
- package/dist/components/default-texts.js.map +1 -0
- package/dist/components/events.d.ts +77 -0
- package/dist/components/events.d.ts.map +1 -0
- package/dist/components/events.js +3 -0
- package/dist/components/events.js.map +1 -0
- package/dist/components/frame/dialog/dialog.d.ts +122 -0
- package/dist/components/frame/dialog/dialog.d.ts.map +1 -0
- package/dist/components/frame/dialog/dialog.js +112 -0
- package/dist/components/frame/dialog/dialog.js.map +1 -0
- package/dist/components/frame/dialog/lt-dialog.d.ts +104 -0
- package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -0
- package/dist/components/frame/dialog/lt-dialog.js +431 -0
- package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
- package/dist/components/frame/error-summary/error-summary.d.ts +40 -0
- package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -0
- package/dist/components/frame/error-summary/error-summary.js +32 -0
- package/dist/components/frame/error-summary/error-summary.js.map +1 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts +82 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -0
- package/dist/components/frame/error-summary/lt-error-summary.js +302 -0
- package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -0
- package/dist/components/frame/field/field-core.d.ts +92 -0
- package/dist/components/frame/field/field-core.d.ts.map +1 -0
- package/dist/components/frame/field/field-core.js +63 -0
- package/dist/components/frame/field/field-core.js.map +1 -0
- package/dist/components/frame/field/lt-field.d.ts +173 -0
- package/dist/components/frame/field/lt-field.d.ts.map +1 -0
- package/dist/components/frame/field/lt-field.js +580 -0
- package/dist/components/frame/field/lt-field.js.map +1 -0
- package/dist/components/frame/popover/lt-popover.d.ts +132 -0
- package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
- package/dist/components/frame/popover/lt-popover.js +490 -0
- package/dist/components/frame/popover/lt-popover.js.map +1 -0
- package/dist/components/frame/popover/popover.d.ts +49 -0
- package/dist/components/frame/popover/popover.d.ts.map +1 -0
- package/dist/components/frame/popover/popover.js +64 -0
- package/dist/components/frame/popover/popover.js.map +1 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +198 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.js +573 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -0
- package/dist/components/frame/session-timeout/session-timeout.d.ts +113 -0
- package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -0
- package/dist/components/frame/session-timeout/session-timeout.js +101 -0
- package/dist/components/frame/session-timeout/session-timeout.js.map +1 -0
- package/dist/components/frame/suggestion/lt-suggestion.d.ts +361 -0
- package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
- package/dist/components/frame/suggestion/lt-suggestion.js +1152 -0
- package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -0
- package/dist/components/frame/suggestion/suggestion.d.ts +143 -0
- package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -0
- package/dist/components/frame/suggestion/suggestion.js +127 -0
- package/dist/components/frame/suggestion/suggestion.js.map +1 -0
- package/dist/components/frame/tabs/lt-tabs.d.ts +404 -0
- package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
- package/dist/components/frame/tabs/lt-tabs.js +1201 -0
- package/dist/components/frame/tabs/lt-tabs.js.map +1 -0
- package/dist/components/frame/tabs/tabs.d.ts +112 -0
- package/dist/components/frame/tabs/tabs.d.ts.map +1 -0
- package/dist/components/frame/tabs/tabs.js +107 -0
- package/dist/components/frame/tabs/tabs.js.map +1 -0
- package/dist/components/host-element.d.ts +135 -0
- package/dist/components/host-element.d.ts.map +1 -0
- package/dist/components/host-element.js +366 -0
- package/dist/components/host-element.js.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts +28 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.js +22 -0
- package/dist/components/standalone/connection-status/connection-status.js.map +1 -0
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts +81 -0
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts.map +1 -0
- package/dist/components/standalone/connection-status/lt-connection-status.js +216 -0
- package/dist/components/standalone/connection-status/lt-connection-status.js.map +1 -0
- package/dist/components/standalone/toast/lt-toast.d.ts +109 -0
- package/dist/components/standalone/toast/lt-toast.d.ts.map +1 -0
- package/dist/components/standalone/toast/lt-toast.js +256 -0
- package/dist/components/standalone/toast/lt-toast.js.map +1 -0
- package/dist/components/standalone/toast/toast.d.ts +52 -0
- package/dist/components/standalone/toast/toast.d.ts.map +1 -0
- package/dist/components/standalone/toast/toast.js +42 -0
- package/dist/components/standalone/toast/toast.js.map +1 -0
- package/dist/diagnostics/core.d.ts +137 -0
- package/dist/diagnostics/core.d.ts.map +1 -0
- package/dist/diagnostics/core.js +72 -0
- package/dist/diagnostics/core.js.map +1 -0
- package/dist/diagnostics/default-core.d.ts +10 -0
- package/dist/diagnostics/default-core.d.ts.map +1 -0
- package/dist/diagnostics/default-core.js +72 -0
- package/dist/diagnostics/default-core.js.map +1 -0
- package/dist/diagnostics/index.d.ts +84 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +106 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/dom.d.ts +55 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +162 -0
- package/dist/dom.js.map +1 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx/react.d.ts +180 -0
- package/dist/jsx/react.d.ts.map +1 -0
- package/dist/jsx/react.js +2 -0
- package/dist/jsx/react.js.map +1 -0
- package/dist/lotek.css +3617 -0
- package/dist/lt.d.ts +325 -0
- package/dist/lt.d.ts.map +1 -0
- package/dist/lt.js +183 -0
- package/dist/lt.js.map +1 -0
- package/dist/react.d.ts +492 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +296 -0
- package/dist/react.js.map +1 -0
- package/dist/register.d.ts +17 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +35 -0
- package/dist/register.js.map +1 -0
- package/dist/tokens/color.d.ts +43 -0
- package/dist/tokens/color.d.ts.map +1 -0
- package/dist/tokens/color.js +123 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/contract.d.ts +18 -0
- package/dist/tokens/contract.d.ts.map +1 -0
- package/dist/tokens/contract.js +18 -0
- package/dist/tokens/contract.js.map +1 -0
- package/dist/tokens/matrix-cells.d.ts +30 -0
- package/dist/tokens/matrix-cells.d.ts.map +1 -0
- package/dist/tokens/matrix-cells.js +273 -0
- package/dist/tokens/matrix-cells.js.map +1 -0
- package/dist/tokens/matrix.d.ts +18 -0
- package/dist/tokens/matrix.d.ts.map +1 -0
- package/dist/tokens/matrix.js +21 -0
- package/dist/tokens/matrix.js.map +1 -0
- package/dist/tokens/theme-check.d.ts +42 -0
- package/dist/tokens/theme-check.d.ts.map +1 -0
- package/dist/tokens/theme-check.js +10 -0
- package/dist/tokens/theme-check.js.map +1 -0
- package/dist/tokens/theme.d.ts +94 -0
- package/dist/tokens/theme.d.ts.map +1 -0
- package/dist/tokens/theme.js +14 -0
- package/dist/tokens/theme.js.map +1 -0
- package/dist/tokens/tokens.d.ts +122 -0
- package/dist/tokens/tokens.d.ts.map +1 -0
- package/dist/tokens/tokens.js +158 -0
- package/dist/tokens/tokens.js.map +1 -0
- package/dist/vocabulary/classes.d.ts +3 -0
- package/dist/vocabulary/classes.d.ts.map +1 -0
- package/dist/vocabulary/classes.js +1320 -0
- package/dist/vocabulary/classes.js.map +1 -0
- package/dist/vocabulary/elements.d.ts +3 -0
- package/dist/vocabulary/elements.d.ts.map +1 -0
- package/dist/vocabulary/elements.js +410 -0
- package/dist/vocabulary/elements.js.map +1 -0
- package/dist/vocabulary/types.d.ts +175 -0
- package/dist/vocabulary/types.d.ts.map +1 -0
- package/dist/vocabulary/types.js +11 -0
- package/dist/vocabulary/types.js.map +1 -0
- package/dist/wasi-host.d.ts +24 -0
- package/dist/wasi-host.d.ts.map +1 -0
- package/dist/wasi-host.js +140 -0
- package/dist/wasi-host.js.map +1 -0
- package/live-templates.xml +62 -0
- package/manifest/files.json +373 -0
- package/manifest/manifest.json +4965 -0
- package/manifest/manifest.schema.json +513 -0
- package/package.json +398 -5
- package/src/cli.ts +21 -0
- package/src/components/css/accordion/accordion.css +102 -0
- package/src/components/css/accordion/accordion.ts +50 -0
- package/src/components/css/alert/alert.css +53 -0
- package/src/components/css/alert/alert.ts +48 -0
- package/src/components/css/avatar/avatar.css +96 -0
- package/src/components/css/avatar/avatar.ts +57 -0
- package/src/components/css/badge/badge.css +42 -0
- package/src/components/css/badge/badge.ts +43 -0
- package/src/components/css/breadcrumbs/breadcrumbs.css +62 -0
- package/src/components/css/breadcrumbs/breadcrumbs.ts +30 -0
- package/src/components/css/button/button.css +128 -0
- package/src/components/css/button/button.ts +44 -0
- package/src/components/css/card/card.css +65 -0
- package/src/components/css/card/card.ts +50 -0
- package/src/components/css/checkbox/checkbox.css +114 -0
- package/src/components/css/checkbox/checkbox.ts +50 -0
- package/src/components/css/divider/divider.css +38 -0
- package/src/components/css/divider/divider.ts +42 -0
- package/src/components/css/error-text/error-text.css +21 -0
- package/src/components/css/error-text/error-text.ts +37 -0
- package/src/components/css/fieldset/fieldset.css +72 -0
- package/src/components/css/fieldset/fieldset.ts +87 -0
- package/src/components/css/file-upload/file-upload.css +102 -0
- package/src/components/css/file-upload/file-upload.ts +65 -0
- package/src/components/css/heading/heading.css +33 -0
- package/src/components/css/heading/heading.ts +42 -0
- package/src/components/css/help-text/help-text.css +24 -0
- package/src/components/css/help-text/help-text.ts +42 -0
- package/src/components/css/icon/icon.css +20 -0
- package/src/components/css/icon/icon.ts +44 -0
- package/src/components/css/input/input.css +145 -0
- package/src/components/css/input/input.ts +77 -0
- package/src/components/css/label/label.css +42 -0
- package/src/components/css/label/label.ts +51 -0
- package/src/components/css/link/link.css +38 -0
- package/src/components/css/link/link.ts +38 -0
- package/src/components/css/list/list.css +53 -0
- package/src/components/css/list/list.ts +44 -0
- package/src/components/css/pagination/pagination.css +95 -0
- package/src/components/css/pagination/pagination.ts +33 -0
- package/src/components/css/paragraph/paragraph.css +31 -0
- package/src/components/css/paragraph/paragraph.ts +53 -0
- package/src/components/css/progress/progress.css +161 -0
- package/src/components/css/progress/progress.ts +78 -0
- package/src/components/css/radio/radio.css +94 -0
- package/src/components/css/radio/radio.ts +50 -0
- package/src/components/css/search/search.css +50 -0
- package/src/components/css/search/search.ts +56 -0
- package/src/components/css/select/select.css +321 -0
- package/src/components/css/select/select.ts +63 -0
- package/src/components/css/shared.ts +199 -0
- package/src/components/css/skeleton/skeleton.css +62 -0
- package/src/components/css/skeleton/skeleton.ts +43 -0
- package/src/components/css/skip-link/skip-link.css +41 -0
- package/src/components/css/skip-link/skip-link.ts +22 -0
- package/src/components/css/spinner/spinner.css +48 -0
- package/src/components/css/spinner/spinner.ts +48 -0
- package/src/components/css/sr-only/sr-only.css +16 -0
- package/src/components/css/sr-only/sr-only.ts +21 -0
- package/src/components/css/switch/switch.css +105 -0
- package/src/components/css/switch/switch.ts +50 -0
- package/src/components/css/table/table.css +159 -0
- package/src/components/css/table/table.ts +107 -0
- package/src/components/css/tag/tag.css +58 -0
- package/src/components/css/tag/tag.ts +49 -0
- package/src/components/css/textarea/textarea.css +83 -0
- package/src/components/css/textarea/textarea.ts +40 -0
- package/src/components/css/toggle-group/toggle-group.css +92 -0
- package/src/components/css/toggle-group/toggle-group.ts +37 -0
- package/src/components/css/tooltip/tooltip.css +89 -0
- package/src/components/css/tooltip/tooltip.ts +37 -0
- package/src/components/default-texts.ts +34 -0
- package/src/components/events.ts +68 -0
- package/src/components/frame/dialog/dialog.css +306 -0
- package/src/components/frame/dialog/dialog.ts +166 -0
- package/src/components/frame/dialog/lt-dialog.ts +510 -0
- package/src/components/frame/error-summary/error-summary.css +47 -0
- package/src/components/frame/error-summary/error-summary.ts +56 -0
- package/src/components/frame/error-summary/lt-error-summary.ts +344 -0
- package/src/components/frame/field/field-core.ts +152 -0
- package/src/components/frame/field/field.css +17 -0
- package/src/components/frame/field/lt-field.ts +753 -0
- package/src/components/frame/popover/lt-popover.ts +555 -0
- package/src/components/frame/popover/popover.css +50 -0
- package/src/components/frame/popover/popover.ts +102 -0
- package/src/components/frame/session-timeout/lt-session-timeout.ts +681 -0
- package/src/components/frame/session-timeout/session-timeout.css +50 -0
- package/src/components/frame/session-timeout/session-timeout.ts +156 -0
- package/src/components/frame/suggestion/lt-suggestion.ts +1358 -0
- package/src/components/frame/suggestion/suggestion.css +132 -0
- package/src/components/frame/suggestion/suggestion.ts +172 -0
- package/src/components/frame/tabs/lt-tabs.ts +1319 -0
- package/src/components/frame/tabs/tabs.css +128 -0
- package/src/components/frame/tabs/tabs.ts +188 -0
- package/src/components/host-element.ts +400 -0
- package/src/components/standalone/connection-status/connection-status.css +41 -0
- package/src/components/standalone/connection-status/connection-status.ts +41 -0
- package/src/components/standalone/connection-status/lt-connection-status.ts +242 -0
- package/src/components/standalone/toast/lt-toast.ts +300 -0
- package/src/components/standalone/toast/toast.css +78 -0
- package/src/components/standalone/toast/toast.ts +70 -0
- package/src/diagnostics/core.ts +210 -0
- package/src/diagnostics/default-core.ts +81 -0
- package/src/diagnostics/index.ts +150 -0
- package/src/dom.ts +185 -0
- package/src/index.ts +218 -0
- package/src/jsx/react.ts +212 -0
- package/src/lt.ts +192 -0
- package/src/react.ts +411 -0
- package/src/register.ts +43 -0
- package/src/tailwind/tailwind.css +169 -0
- package/src/tokens/boundary.css +104 -0
- package/src/tokens/color-contract.json +231 -0
- package/src/tokens/color.ts +150 -0
- package/src/tokens/contract.ts +24 -0
- package/src/tokens/matrix-cells.ts +375 -0
- package/src/tokens/matrix.ts +32 -0
- package/src/tokens/theme-check.ts +51 -0
- package/src/tokens/theme.ts +104 -0
- package/src/tokens/tokens.css +569 -0
- package/src/tokens/tokens.ts +223 -0
- package/src/vocabulary/classes.ts +1322 -0
- package/src/vocabulary/elements.ts +412 -0
- package/src/vocabulary/types.ts +178 -0
- package/src/wasi-host.ts +155 -0
- package/web-types.json +800 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@layer lotek {
|
|
2
|
+
lt-tabs {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* The tab list looks like tabs only when scripts run. Without JavaScript it
|
|
7
|
+
is a table of contents: a plain list of links to the panels, which follow
|
|
8
|
+
one another below it. */
|
|
9
|
+
@media (scripting: enabled) {
|
|
10
|
+
.lt-tabs__list {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
gap: var(--lt-tabs-gap, var(--lt-spacing-1));
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
list-style: none;
|
|
17
|
+
border-block-end: 1px solid var(--lt-color-neutral-border-subtle);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.lt-tabs__list a {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding: var(--lt-tabs-padding, var(--lt-spacing-2) var(--lt-spacing-4));
|
|
25
|
+
min-block-size: var(--lt-spacing-10);
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
font-size: var(--lt-font-size-m);
|
|
28
|
+
line-height: var(--lt-line-height-default);
|
|
29
|
+
color: var(--lt-color-accent-text);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
background: transparent;
|
|
32
|
+
border: 0;
|
|
33
|
+
/* The line under the selected tab is drawn on every tab, transparent on
|
|
34
|
+
those that are not selected. The text then does not jump when the user
|
|
35
|
+
switches tab. */
|
|
36
|
+
border-block-end: var(--lt-spacing-0-5) solid transparent;
|
|
37
|
+
margin-block-end: -1px;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.lt-tabs__list a:hover {
|
|
42
|
+
background: var(--lt-color-accent-surface);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.lt-tabs__list a:focus-visible {
|
|
46
|
+
outline: var(--lt-focus-ring);
|
|
47
|
+
outline-offset: -2px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lt-tabs__list a[aria-selected="true"] {
|
|
51
|
+
color: var(--lt-color-neutral-text-strong);
|
|
52
|
+
font-weight: var(--lt-font-weight-semibold);
|
|
53
|
+
border-block-end-color: var(--lt-color-accent-border);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.lt-tabs__list a[aria-disabled="true"] {
|
|
57
|
+
color: var(--lt-color-disabled-text);
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Markup written without JavaScript comes without `hidden` on the panels,
|
|
62
|
+
and the web component sets it only once it is registered. Until then
|
|
63
|
+
only one panel is shown, the one the web component is going to select,
|
|
64
|
+
so the content does not jump when the rest are hidden:
|
|
65
|
+
- If the server wrote `hidden` itself, that applies, and the first
|
|
66
|
+
visible panel is the one the server selected.
|
|
67
|
+
- Otherwise the panel the address points to, or the panel containing
|
|
68
|
+
it. That is also where a link in the tab list leads when the web
|
|
69
|
+
component is never registered.
|
|
70
|
+
- Otherwise the first.
|
|
71
|
+
Under `server-controlled` the address does not select, and the first
|
|
72
|
+
visible panel is shown. The lines of the rule are in that order: all
|
|
73
|
+
after the first except the match, all after the first under
|
|
74
|
+
`server-controlled`, and the first when the match is further down.
|
|
75
|
+
`:has()` cannot be nested in `:has()`, hence two forms of the match in
|
|
76
|
+
the last one. Only when scripts run: without JavaScript all are
|
|
77
|
+
shown. */
|
|
78
|
+
lt-tabs:not(:defined) .lt-tabs__panel:not([hidden])
|
|
79
|
+
~ .lt-tabs__panel:not([hidden]):not(:target, :has(:target)),
|
|
80
|
+
lt-tabs:not(:defined)[server-controlled]
|
|
81
|
+
.lt-tabs__panel:not([hidden])
|
|
82
|
+
~ .lt-tabs__panel:not([hidden]),
|
|
83
|
+
lt-tabs:not(:defined)
|
|
84
|
+
.lt-tabs__panel:not([hidden]):not(lt-tabs[server-controlled] *):has(
|
|
85
|
+
~ .lt-tabs__panel:not([hidden]):target,
|
|
86
|
+
~ .lt-tabs__panel:not([hidden]) :target
|
|
87
|
+
) {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Without JavaScript the links are a table of contents, one per line. With
|
|
93
|
+
the line height alone they were so close together that the target size
|
|
94
|
+
was under 24 pixels (WCAG 2.5.8). */
|
|
95
|
+
@media (scripting: none) {
|
|
96
|
+
.lt-tabs__list a {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
min-block-size: var(--lt-spacing-6);
|
|
99
|
+
line-height: var(--lt-spacing-6);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.lt-tabs__panel {
|
|
104
|
+
padding-block-start: var(--lt-tabs-panel-space, var(--lt-spacing-4));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* A panel hidden with `until-found` keeps its box but not its content, so
|
|
108
|
+
find in page can reach it. The spacing must go, or there is an empty gap
|
|
109
|
+
under the selected panel for every tab. */
|
|
110
|
+
.lt-tabs__panel[hidden="until-found" i] {
|
|
111
|
+
padding: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.lt-tabs__panel:focus-visible {
|
|
115
|
+
outline: var(--lt-focus-ring);
|
|
116
|
+
outline-offset: 2px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* High contrast: the line under the selected tab is forced to the same
|
|
120
|
+
colour as the transparent lines under the others. `Highlight` gets
|
|
121
|
+
through, and restores the difference. */
|
|
122
|
+
@media (forced-colors: active) {
|
|
123
|
+
.lt-tabs__list a[aria-selected="true"] {
|
|
124
|
+
border-block-end-color: Highlight;
|
|
125
|
+
color: Highlight;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { attributes, checkedKeys, idOrFallback } from "../../css/shared.js"
|
|
2
|
+
|
|
3
|
+
export const TABS_LIST_CLASS = "lt-tabs__list" as const
|
|
4
|
+
export const TABS_PANEL_CLASS = "lt-tabs__panel" as const
|
|
5
|
+
|
|
6
|
+
export type TabsOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* The shared id stem. The panels become `${id}-${key}`, and the headings in
|
|
9
|
+
* them `${id}-${key}-heading`.
|
|
10
|
+
*/
|
|
11
|
+
id: string
|
|
12
|
+
/**
|
|
13
|
+
* One key per tab, from the data, such as `["application", "attachments"]`.
|
|
14
|
+
* The key gives the panel its id, and the link points to it. An index is
|
|
15
|
+
* not a key: if the server inserts a tab first, the same index points to
|
|
16
|
+
* another panel. An empty key, whitespace and two identical keys throw.
|
|
17
|
+
*/
|
|
18
|
+
keys: string[]
|
|
19
|
+
/**
|
|
20
|
+
* What the tabs choose between. Becomes `aria-label` on the tab list, which
|
|
21
|
+
* must have a name. Empty, or only whitespace, throws.
|
|
22
|
+
*/
|
|
23
|
+
label: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type TabsAttributes = {
|
|
27
|
+
/** The tab list, a `<ul>`. */
|
|
28
|
+
list: { class: typeof TABS_LIST_CLASS; "aria-label": string }
|
|
29
|
+
/** Each tab, a link to its panel. */
|
|
30
|
+
tabs: Array<{ href: string }>
|
|
31
|
+
/** Each panel, with the id the link points to. */
|
|
32
|
+
panels: Array<{ id: string; class: typeof TABS_PANEL_CLASS }>
|
|
33
|
+
/** The heading in each panel. */
|
|
34
|
+
headings: Array<{ id: string }>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** What both versions share: the keys checked, and the ids made from them. */
|
|
38
|
+
function prepare(
|
|
39
|
+
builder: string,
|
|
40
|
+
options: { id: string; keys: string[]; label: string },
|
|
41
|
+
) {
|
|
42
|
+
// The fallback only matters to callers without a type check.
|
|
43
|
+
const id = idOrFallback(builder, options.id)
|
|
44
|
+
// The stem becomes part of every id, and `aria-controls` splits on
|
|
45
|
+
// whitespace: `"a b"` gave `aria-controls="a b-x"`, which is two ids. The
|
|
46
|
+
// keys throw on the same thing.
|
|
47
|
+
if (/\s/.test(id)) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`${builder}: the id "${id}" contains whitespace. It becomes part of every id, and an id cannot contain whitespace.`,
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
// Before the keys, as in Kotlin, so the two throw with the same message.
|
|
53
|
+
if (typeof options.label !== "string" || options.label.trim() === "") {
|
|
54
|
+
throw new Error(
|
|
55
|
+
`${builder}: label is missing or empty. The tab list needs a name that says what the tabs choose between, otherwise the screen reader says only "tab list".`,
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
const keys = checkedKeys(builder, options.keys)
|
|
59
|
+
return { id, keys, panelId: (key: string) => `${id}-${key}` }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The attributes for a tab list where the tabs are links to the panels.
|
|
64
|
+
*
|
|
65
|
+
* Only links, ids and classes. Without JavaScript the tab list is then a
|
|
66
|
+
* plain list of links, and the panels follow one another: a table of
|
|
67
|
+
* contents that works for everyone. The roles, which tab is selected and
|
|
68
|
+
* which panels are hidden are written by `<lt-tabs>`. Had they been here, the
|
|
69
|
+
* markup without JavaScript would have said "tab" about a link that does not
|
|
70
|
+
* behave like one, and hidden the panels.
|
|
71
|
+
*
|
|
72
|
+
* The first tab is selected when the page loads. Another one comes from the
|
|
73
|
+
* address, such as `#case-attachments`, or from `selected` and `select()` on
|
|
74
|
+
* `<lt-tabs>`.
|
|
75
|
+
*
|
|
76
|
+
* A React app uses `lt.tabs()` from `@lo-tek/interfaces/react`, which gives
|
|
77
|
+
* the whole state, so React hydrates without mismatches.
|
|
78
|
+
*
|
|
79
|
+
* ```ts
|
|
80
|
+
* const tabs = lt.tabs({ id: "case", keys: ["application", "attachments"], label: "Parts of the case" })
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export const tabs = (options: TabsOptions): TabsAttributes => {
|
|
84
|
+
const { id, keys, panelId } = prepare("lt.tabs()", options)
|
|
85
|
+
return {
|
|
86
|
+
list: attributes({ class: TABS_LIST_CLASS, "aria-label": options.label }),
|
|
87
|
+
tabs: keys.map((key) => attributes({ href: `#${panelId(key)}` })),
|
|
88
|
+
panels: keys.map((key) =>
|
|
89
|
+
attributes({ id: panelId(key), class: TABS_PANEL_CLASS }),
|
|
90
|
+
),
|
|
91
|
+
headings: keys.map((key) => attributes({ id: `${id}-${key}-heading` })),
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type TabsWithStateOptions = TabsOptions & {
|
|
96
|
+
/** The index of the selected tab. Default: 0. */
|
|
97
|
+
selected?: number
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type TabsWithStateAttributes = {
|
|
101
|
+
list: {
|
|
102
|
+
class: typeof TABS_LIST_CLASS
|
|
103
|
+
role: "tablist"
|
|
104
|
+
"aria-label": string
|
|
105
|
+
}
|
|
106
|
+
item: { role: "presentation" }
|
|
107
|
+
tabs: Array<{
|
|
108
|
+
id: string
|
|
109
|
+
href: string
|
|
110
|
+
role: "tab"
|
|
111
|
+
"aria-selected": "true" | "false"
|
|
112
|
+
"aria-controls": string
|
|
113
|
+
tabindex: "0" | "-1"
|
|
114
|
+
}>
|
|
115
|
+
panels: Array<{
|
|
116
|
+
id: string
|
|
117
|
+
class: typeof TABS_PANEL_CLASS
|
|
118
|
+
role: "tabpanel"
|
|
119
|
+
"aria-labelledby": string
|
|
120
|
+
tabindex?: "0"
|
|
121
|
+
hidden?: true
|
|
122
|
+
}>
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The whole state, as `<lt-tabs>` would have written it. For React.
|
|
127
|
+
*
|
|
128
|
+
* React compares the attributes on the elements it renders with what is in
|
|
129
|
+
* the page, and reports a mismatch for every attribute it did not render
|
|
130
|
+
* itself. When the web component wrote the roles and the selection before
|
|
131
|
+
* React hydrated, that gave one mismatch per element. Here everything is
|
|
132
|
+
* there from the start, so the web component has nothing to write.
|
|
133
|
+
*
|
|
134
|
+
* The links get their id from the server, and each panel points to its link,
|
|
135
|
+
* as the APG does. An id the server writes is stable; it is an id the web
|
|
136
|
+
* component creates itself that makes an update replace the element.
|
|
137
|
+
*
|
|
138
|
+
* `hidden` is boolean: React 19 writes `hidden="until-found"` as
|
|
139
|
+
* `hidden=""`. Find in page therefore does not open a hidden panel in a React
|
|
140
|
+
* app.
|
|
141
|
+
*/
|
|
142
|
+
export const tabsWithState = (
|
|
143
|
+
options: TabsWithStateOptions,
|
|
144
|
+
): TabsWithStateAttributes => {
|
|
145
|
+
const { id, keys, panelId } = prepare("lt.tabs()", options)
|
|
146
|
+
// If `selected` is out of range, it is corrected here. Otherwise the markup
|
|
147
|
+
// would say something other than what the user sees.
|
|
148
|
+
// A number that is not an integer, such as `NaN` or 1.5, gave no selected
|
|
149
|
+
// tab, every panel hidden and no tab stop.
|
|
150
|
+
const selected = Number.isInteger(options.selected)
|
|
151
|
+
? (options.selected as number)
|
|
152
|
+
: 0
|
|
153
|
+
const valid = Math.min(Math.max(selected, 0), Math.max(keys.length - 1, 0))
|
|
154
|
+
const tabId = (key: string) => `${id}-${key}-tab`
|
|
155
|
+
return {
|
|
156
|
+
list: attributes({
|
|
157
|
+
class: TABS_LIST_CLASS,
|
|
158
|
+
role: "tablist" as const,
|
|
159
|
+
"aria-label": options.label,
|
|
160
|
+
}),
|
|
161
|
+
item: attributes({ role: "presentation" as const }),
|
|
162
|
+
tabs: keys.map((key, index) =>
|
|
163
|
+
attributes({
|
|
164
|
+
id: tabId(key),
|
|
165
|
+
href: `#${panelId(key)}`,
|
|
166
|
+
role: "tab" as const,
|
|
167
|
+
"aria-selected": (index === valid ? "true" : "false") as
|
|
168
|
+
| "true"
|
|
169
|
+
| "false",
|
|
170
|
+
"aria-controls": panelId(key),
|
|
171
|
+
// Roving tabindex: only the selected tab is a tab stop.
|
|
172
|
+
tabindex: (index === valid ? "0" : "-1") as "0" | "-1",
|
|
173
|
+
}),
|
|
174
|
+
),
|
|
175
|
+
panels: keys.map((key, index) =>
|
|
176
|
+
attributes({
|
|
177
|
+
id: panelId(key),
|
|
178
|
+
class: TABS_PANEL_CLASS,
|
|
179
|
+
role: "tabpanel" as const,
|
|
180
|
+
"aria-labelledby": tabId(key),
|
|
181
|
+
// Only the selected panel is a tab stop. A hidden panel that can take
|
|
182
|
+
// focus is an invisible stop for the keyboard.
|
|
183
|
+
tabindex: index === valid ? ("0" as const) : undefined,
|
|
184
|
+
hidden: index === valid ? undefined : (true as const),
|
|
185
|
+
}),
|
|
186
|
+
),
|
|
187
|
+
}
|
|
188
|
+
}
|