@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
package/dist/lt.d.ts
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { computeFieldAttributes } from "./components/frame/field/field-core.js";
|
|
2
|
+
import { setAttributes } from "./dom.js";
|
|
3
|
+
/**
|
|
4
|
+
* The whole component API in one place.
|
|
5
|
+
*
|
|
6
|
+
* Each component is a function that takes an object of options and returns
|
|
7
|
+
* the attributes you spread onto the element:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { lt } from "@lo-tek/interfaces"
|
|
11
|
+
*
|
|
12
|
+
* <button {...lt.button({ variant: "secondary" })}>Save draft</button>
|
|
13
|
+
* <input {...lt.input({ type: "email", state: "invalid" })} />
|
|
14
|
+
* <span {...lt.badge({ color: "success" })}>Approved</span>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The shape is the same for all of them, so you learn it once. Type `lt.` in
|
|
18
|
+
* the editor to see what exists; type `lt.button.` to see the allowed
|
|
19
|
+
* variants and the guard that validates values from outside.
|
|
20
|
+
*
|
|
21
|
+
* The return values are plain objects. That is why the same API works in
|
|
22
|
+
* React, Astro, Datastar and plain HTML.
|
|
23
|
+
*/
|
|
24
|
+
export declare const lt: {
|
|
25
|
+
readonly accordion: (({ variant }?: import("./index.js").AccordionOptions) => import("./index.js").AccordionAttributes) & {
|
|
26
|
+
content: "lt-accordion__content";
|
|
27
|
+
variants: readonly ["default", "plain"];
|
|
28
|
+
isVariant: (value: string) => value is "default" | "plain";
|
|
29
|
+
};
|
|
30
|
+
readonly alert: (({ color }?: import("./index.js").AlertOptions) => import("./index.js").AlertAttributes) & {
|
|
31
|
+
title: "lt-alert__title";
|
|
32
|
+
colors: readonly ["info", "success", "warning", "danger"];
|
|
33
|
+
isColor: (value: string) => value is "warning" | "info" | "success" | "danger";
|
|
34
|
+
};
|
|
35
|
+
readonly avatar: (({ size, variant, }?: import("./index.js").AvatarOptions) => import("./index.js").AvatarAttributes) & {
|
|
36
|
+
stack: "lt-avatar-stack";
|
|
37
|
+
sizes: readonly ["small", "medium", "large"];
|
|
38
|
+
isSize: (value: string) => value is "small" | "medium" | "large";
|
|
39
|
+
variants: readonly ["circle", "square"];
|
|
40
|
+
isVariant: (value: string) => value is "circle" | "square";
|
|
41
|
+
};
|
|
42
|
+
readonly badge: (({ color }?: import("./index.js").BadgeOptions) => import("./index.js").BadgeAttributes) & {
|
|
43
|
+
colors: readonly ["info", "success", "warning", "danger", "neutral"];
|
|
44
|
+
isColor: (value: string) => value is "warning" | "info" | "success" | "danger" | "neutral";
|
|
45
|
+
};
|
|
46
|
+
readonly breadcrumbs: () => import("./index.js").BreadcrumbsAttributes;
|
|
47
|
+
readonly button: (({ variant }?: import("./index.js").ButtonOptions) => import("./index.js").ButtonAttributes) & {
|
|
48
|
+
variants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
49
|
+
isVariant: (value: string) => value is "danger" | "primary" | "secondary" | "ghost";
|
|
50
|
+
};
|
|
51
|
+
readonly card: (({ variant, interactive }?: import("./index.js").CardOptions) => import("./index.js").CardAttributes) & {
|
|
52
|
+
title: "lt-card__title";
|
|
53
|
+
variants: readonly ["outline", "filled"];
|
|
54
|
+
isVariant: (value: string) => value is "outline" | "filled";
|
|
55
|
+
};
|
|
56
|
+
readonly checkbox: (({ state }?: import("./index.js").CheckboxOptions) => import("./index.js").CheckboxAttributes) & {
|
|
57
|
+
row: "lt-checkbox-row";
|
|
58
|
+
states: readonly ["default", "invalid", "success"];
|
|
59
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The bar that says the connection to the server is lost. The server
|
|
63
|
+
* cannot report that itself, so `<lt-connection-status>` creates the
|
|
64
|
+
* content.
|
|
65
|
+
*/
|
|
66
|
+
readonly connectionStatus: ({ offlineText, onlineText, }?: import("./index.js").ConnectionStatusOptions) => import("./index.js").ConnectionStatusAttributes;
|
|
67
|
+
readonly dialog: (({ titleId: givenId, open, color, }: import("./index.js").DialogOptions) => import("./index.js").DialogAttributes) & {
|
|
68
|
+
dialog: "lt-dialog";
|
|
69
|
+
header: "lt-dialog__header";
|
|
70
|
+
title: "lt-dialog__title";
|
|
71
|
+
subtitle: "lt-dialog__subtitle";
|
|
72
|
+
body: "lt-dialog__body";
|
|
73
|
+
footer: "lt-dialog__footer";
|
|
74
|
+
colors: readonly ["neutral", "brand", "info", "success", "warning", "danger"];
|
|
75
|
+
isColor: (value: string) => value is "warning" | "info" | "success" | "danger" | "neutral" | "brand";
|
|
76
|
+
};
|
|
77
|
+
readonly divider: (({ variant }?: import("./index.js").DividerOptions) => import("./index.js").DividerAttributes) & {
|
|
78
|
+
variants: readonly ["default", "subtle", "strong"];
|
|
79
|
+
isVariant: (value: string) => value is "default" | "subtle" | "strong";
|
|
80
|
+
};
|
|
81
|
+
readonly errorText: (({ variant }?: import("./index.js").ErrorTextOptions) => import("./index.js").ErrorTextAttributes) & {
|
|
82
|
+
variants: readonly ["error", "warning"];
|
|
83
|
+
isVariant: (value: string) => value is "error" | "warning";
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* The error summary above a form. The server writes the whole box, heading
|
|
87
|
+
* included, and `<lt-error-summary>` only moves focus.
|
|
88
|
+
*/
|
|
89
|
+
readonly errorSummary: ({ count, id, }?: import("./index.js").ErrorSummaryOptions) => import("./index.js").ErrorSummaryAttributes;
|
|
90
|
+
/**
|
|
91
|
+
* Connects the label, field, help text and error text.
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* const field = lt.field({ id: "email", required: "text", help: true, error: true, invalid })
|
|
95
|
+
*
|
|
96
|
+
* <label {...field.label}>Email address</label>
|
|
97
|
+
* <input {...lt.input({ type: "email", state: field.state })} {...field.control} />
|
|
98
|
+
* <p {...lt.helpText()} {...field.help}>We send the receipt here.</p>
|
|
99
|
+
* <p {...lt.errorText()} {...field.error}>Enter a valid address.</p>
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* The same calculation `<lt-field>` does, but as data, for markup created
|
|
103
|
+
* with JavaScript. Then no web component is needed.
|
|
104
|
+
*/
|
|
105
|
+
readonly field: typeof computeFieldAttributes;
|
|
106
|
+
/** A group of controls that belong together. Its label is `lt.legend`. */
|
|
107
|
+
readonly fieldset: (({ state, disabled }?: import("./index.js").FieldsetOptions) => import("./index.js").FieldsetAttributes) & {
|
|
108
|
+
states: readonly ["default", "invalid", "success"];
|
|
109
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
110
|
+
};
|
|
111
|
+
readonly heading: (({ size }?: import("./index.js").HeadingOptions) => import("./index.js").HeadingAttributes) & {
|
|
112
|
+
sizes: readonly ["xs", "s", "m", "l", "xl", "mega"];
|
|
113
|
+
isSize: (value: string) => value is "xs" | "s" | "m" | "l" | "xl" | "mega";
|
|
114
|
+
};
|
|
115
|
+
readonly fileUpload: (({ state, multiple, accept, }?: import("./index.js").FileUploadOptions) => import("./index.js").FileUploadAttributes) & {
|
|
116
|
+
list: "lt-file-upload-list";
|
|
117
|
+
states: readonly ["default", "invalid", "success"];
|
|
118
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
119
|
+
};
|
|
120
|
+
readonly helpText: (({ variant }?: import("./index.js").HelpTextOptions) => import("./index.js").HelpTextAttributes) & {
|
|
121
|
+
variants: readonly ["muted", "strong", "success", "warning"];
|
|
122
|
+
isVariant: (value: string) => value is "warning" | "success" | "strong" | "muted";
|
|
123
|
+
};
|
|
124
|
+
readonly icon: ({ label }?: import("./index.js").IconOptions) => import("./index.js").IconAttributes;
|
|
125
|
+
readonly input: (({ type, state }?: import("./index.js").InputOptions) => import("./index.js").InputAttributes) & {
|
|
126
|
+
types: readonly ["text", "password", "email", "number", "date", "datetime-local", "week", "month", "tel", "url", "search", "time"];
|
|
127
|
+
isType: (value: string) => value is "number" | "date" | "search" | "url" | "text" | "password" | "email" | "datetime-local" | "week" | "month" | "tel" | "time";
|
|
128
|
+
states: readonly ["default", "invalid", "success"];
|
|
129
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
130
|
+
};
|
|
131
|
+
readonly label: (({ required, optional, disabled }?: import("./index.js").LabelOptions) => import("./index.js").LabelAttributes) & {
|
|
132
|
+
markers: readonly ["symbol", "text"];
|
|
133
|
+
isMarker: (value: string) => value is "symbol" | "text";
|
|
134
|
+
};
|
|
135
|
+
readonly legend: (({ required, optional, disabled }?: import("./index.js").LegendOptions) => import("./index.js").LegendAttributes) & {
|
|
136
|
+
markers: readonly ["symbol", "text"];
|
|
137
|
+
isMarker: (value: string) => value is "symbol" | "text";
|
|
138
|
+
};
|
|
139
|
+
readonly link: ({ disabled }?: import("./index.js").LinkOptions) => import("./index.js").LinkAttributes;
|
|
140
|
+
readonly list: (({ variant }?: import("./index.js").ListOptions) => import("./index.js").ListAttributes) & {
|
|
141
|
+
variants: readonly ["default", "plain", "divided"];
|
|
142
|
+
isVariant: (value: string) => value is "default" | "plain" | "divided";
|
|
143
|
+
};
|
|
144
|
+
readonly pagination: (() => import("./index.js").PaginationAttributes) & {
|
|
145
|
+
gap: "lt-pagination__gap";
|
|
146
|
+
};
|
|
147
|
+
readonly paragraph: (({ size, variant, }?: import("./index.js").ParagraphOptions) => import("./index.js").ParagraphAttributes) & {
|
|
148
|
+
sizes: readonly ["small", "medium", "large"];
|
|
149
|
+
isSize: (value: string) => value is "small" | "medium" | "large";
|
|
150
|
+
variants: readonly ["default", "lead"];
|
|
151
|
+
isVariant: (value: string) => value is "default" | "lead";
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* The button and panel of a popover. `<lt-popover>` calculates the
|
|
155
|
+
* position, the server writes the wiring.
|
|
156
|
+
*/
|
|
157
|
+
readonly popover: (({ id: givenId, open, placement, }: import("./index.js").PopoverOptions) => import("./index.js").PopoverAttributes) & {
|
|
158
|
+
isPlacement: typeof import("./index.js").isPopoverPlacement;
|
|
159
|
+
};
|
|
160
|
+
readonly radio: (({ state }?: import("./index.js").RadioOptions) => import("./index.js").RadioAttributes) & {
|
|
161
|
+
row: "lt-radio-row";
|
|
162
|
+
states: readonly ["default", "invalid", "success"];
|
|
163
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
164
|
+
};
|
|
165
|
+
readonly search: (({ state }?: import("./index.js").SearchOptions) => import("./index.js").SearchAttributes) & {
|
|
166
|
+
row: "lt-search-row";
|
|
167
|
+
states: readonly ["default", "invalid", "success"];
|
|
168
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
169
|
+
};
|
|
170
|
+
readonly select: (({ state, picker, }?: import("./index.js").SelectOptions) => import("./index.js").SelectAttributes) & {
|
|
171
|
+
states: readonly ["default", "invalid", "success"];
|
|
172
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
173
|
+
pickers: readonly ["auto", "styled"];
|
|
174
|
+
isPicker: (value: string) => value is "auto" | "styled";
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* The warning that a signed-in session is about to expire. The countdown
|
|
178
|
+
* runs on the client's clock, so `<lt-session-timeout>` is responsible for
|
|
179
|
+
* the content.
|
|
180
|
+
*/
|
|
181
|
+
readonly sessionTimeout: (({ titleId: givenId, warnAt, expiresAt, activityInterval, }: import("./index.js").SessionTimeoutOptions) => import("./index.js").SessionTimeoutAttributes) & {
|
|
182
|
+
dialog: "lt-session-timeout__dialog";
|
|
183
|
+
title: "lt-session-timeout__title";
|
|
184
|
+
text: "lt-session-timeout__text";
|
|
185
|
+
count: "lt-session-timeout__count";
|
|
186
|
+
actions: "lt-session-timeout__actions";
|
|
187
|
+
};
|
|
188
|
+
readonly skeleton: (({ variant }?: import("./index.js").SkeletonOptions) => import("./index.js").SkeletonAttributes) & {
|
|
189
|
+
variants: readonly ["block", "text", "circle"];
|
|
190
|
+
isVariant: (value: string) => value is "text" | "circle" | "block";
|
|
191
|
+
};
|
|
192
|
+
readonly skipLink: () => import("./index.js").SkipLinkAttributes;
|
|
193
|
+
readonly progress: (({ value, max, color, label, valueText, }?: import("./index.js").ProgressOptions) => import("./index.js").ProgressAttributes) & {
|
|
194
|
+
colors: readonly ["success", "warning", "danger"];
|
|
195
|
+
isColor: (value: string) => value is "warning" | "success" | "danger";
|
|
196
|
+
};
|
|
197
|
+
readonly spinner: (({ size, label }?: import("./index.js").SpinnerOptions) => import("./index.js").SpinnerAttributes) & {
|
|
198
|
+
sizes: readonly ["small", "medium", "large"];
|
|
199
|
+
isSize: (value: string) => value is "small" | "medium" | "large";
|
|
200
|
+
};
|
|
201
|
+
/** Text only screen readers get. Requires `sr-only.css`. */
|
|
202
|
+
readonly srOnly: () => import("./index.js").SrOnlyAttributes;
|
|
203
|
+
/**
|
|
204
|
+
* The field and the suggestion list. `<lt-suggestion>` handles the
|
|
205
|
+
* keyboard and the filtering, the server writes the markup.
|
|
206
|
+
*/
|
|
207
|
+
readonly suggestion: ({ id: givenId, keys: givenKeys, activeIndex, open, pending, ...field }: import("./index.js").SuggestionOptions) => {
|
|
208
|
+
label: {
|
|
209
|
+
id: string;
|
|
210
|
+
class: "lt-label";
|
|
211
|
+
for: string;
|
|
212
|
+
"data-required"?: import("./index.js").RequiredMarker;
|
|
213
|
+
"data-optional"?: "";
|
|
214
|
+
"aria-disabled"?: "true";
|
|
215
|
+
};
|
|
216
|
+
control: {
|
|
217
|
+
class: "lt-input";
|
|
218
|
+
type: "text";
|
|
219
|
+
role: "combobox";
|
|
220
|
+
autocomplete: "off";
|
|
221
|
+
"aria-expanded": "true" | "false";
|
|
222
|
+
"aria-controls": string;
|
|
223
|
+
"aria-describedby": string;
|
|
224
|
+
"aria-autocomplete": "list";
|
|
225
|
+
"aria-activedescendant": string | undefined;
|
|
226
|
+
id: string;
|
|
227
|
+
"aria-invalid"?: "true";
|
|
228
|
+
"data-state"?: "invalid";
|
|
229
|
+
disabled?: true;
|
|
230
|
+
};
|
|
231
|
+
list: {
|
|
232
|
+
class: "lt-suggestion__list";
|
|
233
|
+
id: string;
|
|
234
|
+
role: "listbox";
|
|
235
|
+
"aria-labelledby": string;
|
|
236
|
+
popover: "manual";
|
|
237
|
+
hidden: true | undefined;
|
|
238
|
+
"aria-busy": "true" | undefined;
|
|
239
|
+
};
|
|
240
|
+
options: {
|
|
241
|
+
class: "lt-suggestion__option";
|
|
242
|
+
id: string;
|
|
243
|
+
role: "option";
|
|
244
|
+
"aria-selected": "true" | "false";
|
|
245
|
+
}[];
|
|
246
|
+
empty: {
|
|
247
|
+
class: "lt-suggestion__empty";
|
|
248
|
+
hidden: true | undefined;
|
|
249
|
+
};
|
|
250
|
+
status: {
|
|
251
|
+
class: "lt-sr-only";
|
|
252
|
+
id: string;
|
|
253
|
+
role: "status";
|
|
254
|
+
};
|
|
255
|
+
value: {
|
|
256
|
+
class: "lt-suggestion__value";
|
|
257
|
+
type: "hidden";
|
|
258
|
+
};
|
|
259
|
+
help: {
|
|
260
|
+
id: string;
|
|
261
|
+
};
|
|
262
|
+
error: {
|
|
263
|
+
id: string;
|
|
264
|
+
hidden?: true;
|
|
265
|
+
};
|
|
266
|
+
state: "default" | "invalid" | "success";
|
|
267
|
+
};
|
|
268
|
+
/** On and off. Named `switchControl` when you import it directly. */
|
|
269
|
+
readonly switch: (({ disabled }?: import("./index.js").SwitchOptions) => import("./index.js").SwitchAttributes) & {
|
|
270
|
+
row: "lt-switch-row";
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* A tab list with panels. The server writes the links, ids and classes;
|
|
274
|
+
* `<lt-tabs>` adds the roles, the selection and the arrow keys.
|
|
275
|
+
*/
|
|
276
|
+
readonly tabs: (options: import("./index.js").TabsOptions) => import("./index.js").TabsAttributes;
|
|
277
|
+
/**
|
|
278
|
+
* The toast region. Sets `data-ignore-morph`, because `<lt-toast>` creates
|
|
279
|
+
* and removes its messages inside it.
|
|
280
|
+
*/
|
|
281
|
+
readonly toast: ({ label, closeLabel, }?: import("./index.js").ToastOptions) => import("./index.js").ToastAttributes;
|
|
282
|
+
readonly toggleGroup: (() => import("./index.js").ToggleGroupAttributes) & {
|
|
283
|
+
option: "lt-toggle-group__option";
|
|
284
|
+
};
|
|
285
|
+
readonly tooltip: (() => import("./index.js").TooltipAttributes) & {
|
|
286
|
+
bubble: "lt-tooltip__bubble";
|
|
287
|
+
};
|
|
288
|
+
readonly table: (({ variant, hoverable }?: import("./index.js").TableOptions) => import("./index.js").TableAttributes) & {
|
|
289
|
+
scroll: "lt-table-scroll";
|
|
290
|
+
variants: readonly ["default", "striped"];
|
|
291
|
+
isVariant: (value: string) => value is "default" | "striped";
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* The header and button in a sortable column. `aria-sort` on the `<th>` is
|
|
295
|
+
* the state, and the arrow is drawn from it. The sorting is up to the app.
|
|
296
|
+
*/
|
|
297
|
+
readonly tableSort: (({ direction }?: import("./index.js").TableSortOptions) => import("./index.js").TableSortAttributes) & {
|
|
298
|
+
isDirection: (value: string) => value is "ascending" | "descending";
|
|
299
|
+
};
|
|
300
|
+
readonly tag: (({ variant, selectable }?: import("./index.js").TagOptions) => import("./index.js").TagAttributes) & {
|
|
301
|
+
variants: readonly ["outline", "filled"];
|
|
302
|
+
isVariant: (value: string) => value is "outline" | "filled";
|
|
303
|
+
};
|
|
304
|
+
readonly textarea: (({ state }?: import("./index.js").TextareaOptions) => import("./index.js").TextareaAttributes) & {
|
|
305
|
+
states: readonly ["default", "invalid", "success"];
|
|
306
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Applies an attribute set to an element in the plain DOM.
|
|
310
|
+
*
|
|
311
|
+
* In JSX you spread the object. Without JSX this function does the job,
|
|
312
|
+
* and cleans up what the builder function manages from the previous state.
|
|
313
|
+
* Several sets are passed separately:
|
|
314
|
+
* `lt.setAttributes(field, lt.input(), wiring.control)`.
|
|
315
|
+
*/
|
|
316
|
+
readonly setAttributes: typeof setAttributes;
|
|
317
|
+
/** The validation states shared by input, textarea and select. */
|
|
318
|
+
readonly states: readonly ["default", "invalid", "success"];
|
|
319
|
+
readonly isState: (value: string) => value is "default" | "invalid" | "success";
|
|
320
|
+
/** The ways a required field can be marked. */
|
|
321
|
+
readonly markers: readonly ["symbol", "text"];
|
|
322
|
+
readonly isMarker: (value: string) => value is "symbol" | "text";
|
|
323
|
+
};
|
|
324
|
+
export type Lt = typeof lt;
|
|
325
|
+
//# sourceMappingURL=lt.d.ts.map
|
package/dist/lt.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt.d.ts","sourceRoot":"","sources":["../src/lt.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAO/E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASb;;;;OAIG;;;;;;;;;;;;;;;;;;;;IAKH;;;OAGG;;IAEH;;;;;;;;;;;;;;OAcG;;IAEH,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAa1E;;;OAGG;;;;;;;;;;;;;;;;;;;;IAKH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;IAMH,4DAA4D;;IAE5D;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH,qEAAqE;;;;IAErE;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;IAKH;;;OAGG;;;;;;;;;;;;IAKH;;;;;;;OAOG;;IAGH,kEAAkE;;;IAGlE,+CAA+C;;;CAGvC,CAAA;AAEV,MAAM,MAAM,EAAE,GAAG,OAAO,EAAE,CAAA"}
|
package/dist/lt.js
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { accordion } from "./components/css/accordion/accordion.js";
|
|
2
|
+
import { alert } from "./components/css/alert/alert.js";
|
|
3
|
+
import { avatar } from "./components/css/avatar/avatar.js";
|
|
4
|
+
import { badge } from "./components/css/badge/badge.js";
|
|
5
|
+
import { breadcrumbs } from "./components/css/breadcrumbs/breadcrumbs.js";
|
|
6
|
+
import { button } from "./components/css/button/button.js";
|
|
7
|
+
import { card } from "./components/css/card/card.js";
|
|
8
|
+
import { checkbox } from "./components/css/checkbox/checkbox.js";
|
|
9
|
+
import { divider } from "./components/css/divider/divider.js";
|
|
10
|
+
import { errorText } from "./components/css/error-text/error-text.js";
|
|
11
|
+
import { fieldset, legend } from "./components/css/fieldset/fieldset.js";
|
|
12
|
+
import { fileUpload } from "./components/css/file-upload/file-upload.js";
|
|
13
|
+
import { heading } from "./components/css/heading/heading.js";
|
|
14
|
+
import { helpText } from "./components/css/help-text/help-text.js";
|
|
15
|
+
import { icon } from "./components/css/icon/icon.js";
|
|
16
|
+
import { input } from "./components/css/input/input.js";
|
|
17
|
+
import { label } from "./components/css/label/label.js";
|
|
18
|
+
import { link } from "./components/css/link/link.js";
|
|
19
|
+
import { list } from "./components/css/list/list.js";
|
|
20
|
+
import { pagination } from "./components/css/pagination/pagination.js";
|
|
21
|
+
import { paragraph } from "./components/css/paragraph/paragraph.js";
|
|
22
|
+
import { progress } from "./components/css/progress/progress.js";
|
|
23
|
+
import { radio } from "./components/css/radio/radio.js";
|
|
24
|
+
import { search } from "./components/css/search/search.js";
|
|
25
|
+
import { select } from "./components/css/select/select.js";
|
|
26
|
+
import { fieldStates, isFieldState, isRequiredMarker, requiredMarkers, } from "./components/css/shared.js";
|
|
27
|
+
import { skeleton } from "./components/css/skeleton/skeleton.js";
|
|
28
|
+
import { skipLink } from "./components/css/skip-link/skip-link.js";
|
|
29
|
+
import { spinner } from "./components/css/spinner/spinner.js";
|
|
30
|
+
import { srOnly } from "./components/css/sr-only/sr-only.js";
|
|
31
|
+
import { switchControl } from "./components/css/switch/switch.js";
|
|
32
|
+
import { table, tableSort } from "./components/css/table/table.js";
|
|
33
|
+
import { tag } from "./components/css/tag/tag.js";
|
|
34
|
+
import { textarea } from "./components/css/textarea/textarea.js";
|
|
35
|
+
import { toggleGroup } from "./components/css/toggle-group/toggle-group.js";
|
|
36
|
+
import { tooltip } from "./components/css/tooltip/tooltip.js";
|
|
37
|
+
import { dialog } from "./components/frame/dialog/dialog.js";
|
|
38
|
+
import { errorSummary } from "./components/frame/error-summary/error-summary.js";
|
|
39
|
+
import { computeFieldAttributes } from "./components/frame/field/field-core.js";
|
|
40
|
+
import { popover } from "./components/frame/popover/popover.js";
|
|
41
|
+
import { sessionTimeout } from "./components/frame/session-timeout/session-timeout.js";
|
|
42
|
+
import { suggestion } from "./components/frame/suggestion/suggestion.js";
|
|
43
|
+
import { tabs } from "./components/frame/tabs/tabs.js";
|
|
44
|
+
import { connectionStatus } from "./components/standalone/connection-status/connection-status.js";
|
|
45
|
+
import { toast } from "./components/standalone/toast/toast.js";
|
|
46
|
+
import { setAttributes } from "./dom.js";
|
|
47
|
+
/**
|
|
48
|
+
* The whole component API in one place.
|
|
49
|
+
*
|
|
50
|
+
* Each component is a function that takes an object of options and returns
|
|
51
|
+
* the attributes you spread onto the element:
|
|
52
|
+
*
|
|
53
|
+
* ```ts
|
|
54
|
+
* import { lt } from "@lo-tek/interfaces"
|
|
55
|
+
*
|
|
56
|
+
* <button {...lt.button({ variant: "secondary" })}>Save draft</button>
|
|
57
|
+
* <input {...lt.input({ type: "email", state: "invalid" })} />
|
|
58
|
+
* <span {...lt.badge({ color: "success" })}>Approved</span>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* The shape is the same for all of them, so you learn it once. Type `lt.` in
|
|
62
|
+
* the editor to see what exists; type `lt.button.` to see the allowed
|
|
63
|
+
* variants and the guard that validates values from outside.
|
|
64
|
+
*
|
|
65
|
+
* The return values are plain objects. That is why the same API works in
|
|
66
|
+
* React, Astro, Datastar and plain HTML.
|
|
67
|
+
*/
|
|
68
|
+
export const lt = {
|
|
69
|
+
accordion,
|
|
70
|
+
alert,
|
|
71
|
+
avatar,
|
|
72
|
+
badge,
|
|
73
|
+
breadcrumbs,
|
|
74
|
+
button,
|
|
75
|
+
card,
|
|
76
|
+
checkbox,
|
|
77
|
+
/**
|
|
78
|
+
* The bar that says the connection to the server is lost. The server
|
|
79
|
+
* cannot report that itself, so `<lt-connection-status>` creates the
|
|
80
|
+
* content.
|
|
81
|
+
*/
|
|
82
|
+
connectionStatus,
|
|
83
|
+
dialog,
|
|
84
|
+
divider,
|
|
85
|
+
errorText,
|
|
86
|
+
/**
|
|
87
|
+
* The error summary above a form. The server writes the whole box, heading
|
|
88
|
+
* included, and `<lt-error-summary>` only moves focus.
|
|
89
|
+
*/
|
|
90
|
+
errorSummary,
|
|
91
|
+
/**
|
|
92
|
+
* Connects the label, field, help text and error text.
|
|
93
|
+
*
|
|
94
|
+
* ```ts
|
|
95
|
+
* const field = lt.field({ id: "email", required: "text", help: true, error: true, invalid })
|
|
96
|
+
*
|
|
97
|
+
* <label {...field.label}>Email address</label>
|
|
98
|
+
* <input {...lt.input({ type: "email", state: field.state })} {...field.control} />
|
|
99
|
+
* <p {...lt.helpText()} {...field.help}>We send the receipt here.</p>
|
|
100
|
+
* <p {...lt.errorText()} {...field.error}>Enter a valid address.</p>
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* The same calculation `<lt-field>` does, but as data, for markup created
|
|
104
|
+
* with JavaScript. Then no web component is needed.
|
|
105
|
+
*/
|
|
106
|
+
field: computeFieldAttributes,
|
|
107
|
+
/** A group of controls that belong together. Its label is `lt.legend`. */
|
|
108
|
+
fieldset,
|
|
109
|
+
heading,
|
|
110
|
+
fileUpload,
|
|
111
|
+
helpText,
|
|
112
|
+
icon,
|
|
113
|
+
input,
|
|
114
|
+
label,
|
|
115
|
+
legend,
|
|
116
|
+
link,
|
|
117
|
+
list,
|
|
118
|
+
pagination,
|
|
119
|
+
paragraph,
|
|
120
|
+
/**
|
|
121
|
+
* The button and panel of a popover. `<lt-popover>` calculates the
|
|
122
|
+
* position, the server writes the wiring.
|
|
123
|
+
*/
|
|
124
|
+
popover,
|
|
125
|
+
radio,
|
|
126
|
+
search,
|
|
127
|
+
select,
|
|
128
|
+
/**
|
|
129
|
+
* The warning that a signed-in session is about to expire. The countdown
|
|
130
|
+
* runs on the client's clock, so `<lt-session-timeout>` is responsible for
|
|
131
|
+
* the content.
|
|
132
|
+
*/
|
|
133
|
+
sessionTimeout,
|
|
134
|
+
skeleton,
|
|
135
|
+
skipLink,
|
|
136
|
+
progress,
|
|
137
|
+
spinner,
|
|
138
|
+
/** Text only screen readers get. Requires `sr-only.css`. */
|
|
139
|
+
srOnly,
|
|
140
|
+
/**
|
|
141
|
+
* The field and the suggestion list. `<lt-suggestion>` handles the
|
|
142
|
+
* keyboard and the filtering, the server writes the markup.
|
|
143
|
+
*/
|
|
144
|
+
suggestion,
|
|
145
|
+
/** On and off. Named `switchControl` when you import it directly. */
|
|
146
|
+
switch: switchControl,
|
|
147
|
+
/**
|
|
148
|
+
* A tab list with panels. The server writes the links, ids and classes;
|
|
149
|
+
* `<lt-tabs>` adds the roles, the selection and the arrow keys.
|
|
150
|
+
*/
|
|
151
|
+
tabs,
|
|
152
|
+
/**
|
|
153
|
+
* The toast region. Sets `data-ignore-morph`, because `<lt-toast>` creates
|
|
154
|
+
* and removes its messages inside it.
|
|
155
|
+
*/
|
|
156
|
+
toast,
|
|
157
|
+
toggleGroup,
|
|
158
|
+
tooltip,
|
|
159
|
+
table,
|
|
160
|
+
/**
|
|
161
|
+
* The header and button in a sortable column. `aria-sort` on the `<th>` is
|
|
162
|
+
* the state, and the arrow is drawn from it. The sorting is up to the app.
|
|
163
|
+
*/
|
|
164
|
+
tableSort,
|
|
165
|
+
tag,
|
|
166
|
+
textarea,
|
|
167
|
+
/**
|
|
168
|
+
* Applies an attribute set to an element in the plain DOM.
|
|
169
|
+
*
|
|
170
|
+
* In JSX you spread the object. Without JSX this function does the job,
|
|
171
|
+
* and cleans up what the builder function manages from the previous state.
|
|
172
|
+
* Several sets are passed separately:
|
|
173
|
+
* `lt.setAttributes(field, lt.input(), wiring.control)`.
|
|
174
|
+
*/
|
|
175
|
+
setAttributes,
|
|
176
|
+
/** The validation states shared by input, textarea and select. */
|
|
177
|
+
states: fieldStates,
|
|
178
|
+
isState: isFieldState,
|
|
179
|
+
/** The ways a required field can be marked. */
|
|
180
|
+
markers: requiredMarkers,
|
|
181
|
+
isMarker: isRequiredMarker,
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=lt.js.map
|
package/dist/lt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt.js","sourceRoot":"","sources":["../src/lt.ts"],"names":[],"mappings":"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"}
|