@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,273 @@
|
|
|
1
|
+
// Generated by scripts/generate-matrix.ts from the core and color-contract.json. Do not edit.
|
|
2
|
+
/** The families LO-TEK ships itself. A consumer can have others. */
|
|
3
|
+
export const FAMILIES = ["accent", "visited", "brand1", "brand2", "brand3", "neutral", "danger", "warning", "success"];
|
|
4
|
+
/** LO-TEK's own brand colours. */
|
|
5
|
+
export const LOTEK_BRANDS = {
|
|
6
|
+
"accent": "#1362ae",
|
|
7
|
+
"visited": "#5a77a8",
|
|
8
|
+
"brand1": "#0d7a5f",
|
|
9
|
+
"brand2": "#5b3fa0",
|
|
10
|
+
"brand3": "#b04c5c",
|
|
11
|
+
"neutral": "#24272b",
|
|
12
|
+
"danger": "#a82e39",
|
|
13
|
+
"warning": "#896508",
|
|
14
|
+
"success": "#316f2a"
|
|
15
|
+
};
|
|
16
|
+
/** Lightness and chroma share per role, in each appearance. */
|
|
17
|
+
export const ROLES = {
|
|
18
|
+
"surface": {
|
|
19
|
+
"lightness": {
|
|
20
|
+
"light": 0.96,
|
|
21
|
+
"dark": 0.26
|
|
22
|
+
},
|
|
23
|
+
"chroma": 0.22
|
|
24
|
+
},
|
|
25
|
+
"borderSubtle": {
|
|
26
|
+
"lightness": {
|
|
27
|
+
"light": 0.88,
|
|
28
|
+
"dark": 0.34
|
|
29
|
+
},
|
|
30
|
+
"chroma": 0.35
|
|
31
|
+
},
|
|
32
|
+
"border": {
|
|
33
|
+
"lightness": {
|
|
34
|
+
"light": 0.575,
|
|
35
|
+
"dark": 0.625
|
|
36
|
+
},
|
|
37
|
+
"chroma": 0.55
|
|
38
|
+
},
|
|
39
|
+
"borderStrong": {
|
|
40
|
+
"lightness": {
|
|
41
|
+
"light": 0.48,
|
|
42
|
+
"dark": 0.74
|
|
43
|
+
},
|
|
44
|
+
"chroma": 0.6
|
|
45
|
+
},
|
|
46
|
+
"fill": {
|
|
47
|
+
"lightness": {
|
|
48
|
+
"light": 0.53,
|
|
49
|
+
"dark": 0.65
|
|
50
|
+
},
|
|
51
|
+
"chroma": 1
|
|
52
|
+
},
|
|
53
|
+
"text": {
|
|
54
|
+
"lightness": {
|
|
55
|
+
"light": 0.42,
|
|
56
|
+
"dark": 0.82
|
|
57
|
+
},
|
|
58
|
+
"chroma": 0.85
|
|
59
|
+
},
|
|
60
|
+
"textStrong": {
|
|
61
|
+
"lightness": {
|
|
62
|
+
"light": 0.28,
|
|
63
|
+
"dark": 0.93
|
|
64
|
+
},
|
|
65
|
+
"chroma": 0.5
|
|
66
|
+
},
|
|
67
|
+
"textSubtle": {
|
|
68
|
+
"lightness": {
|
|
69
|
+
"light": 0.485,
|
|
70
|
+
"dark": 0.73
|
|
71
|
+
},
|
|
72
|
+
"chroma": 0.7
|
|
73
|
+
},
|
|
74
|
+
"content": {
|
|
75
|
+
"lightness": {
|
|
76
|
+
"light": 0.99,
|
|
77
|
+
"dark": 0.16
|
|
78
|
+
},
|
|
79
|
+
"chroma": 0.04
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
/** The page and the raised surface, which only the neutral family has. */
|
|
83
|
+
export const NEUTRAL_LAYERS = {
|
|
84
|
+
"canvas": {
|
|
85
|
+
"lightness": {
|
|
86
|
+
"light": 1,
|
|
87
|
+
"dark": 0.18
|
|
88
|
+
},
|
|
89
|
+
"chroma": 0.08
|
|
90
|
+
},
|
|
91
|
+
"raised": {
|
|
92
|
+
"lightness": {
|
|
93
|
+
"light": 0.92,
|
|
94
|
+
"dark": 0.32
|
|
95
|
+
},
|
|
96
|
+
"chroma": 0.12
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/** The contrast requirements, with a margin above WCAG. Text is 4.5 and graphics 3. */
|
|
100
|
+
export const REQUIREMENT = { "text": 4.6, "graphic": 3.1 };
|
|
101
|
+
/** LO-TEK's own colours in the light theme. */
|
|
102
|
+
export const lightCells = {
|
|
103
|
+
"--lt-color-accent-surface": "#e9f3ff",
|
|
104
|
+
"--lt-color-accent-border-subtle": "#c1daf8",
|
|
105
|
+
"--lt-color-accent-border": "#577ca6",
|
|
106
|
+
"--lt-color-accent-border-strong": "#39608c",
|
|
107
|
+
"--lt-color-accent-fill": "#226dba",
|
|
108
|
+
"--lt-color-accent-text": "#0d4e8c",
|
|
109
|
+
"--lt-color-accent-text-strong": "#0b2a4a",
|
|
110
|
+
"--lt-color-accent-text-subtle": "#336195",
|
|
111
|
+
"--lt-color-accent-content": "#f9fcff",
|
|
112
|
+
"--lt-color-visited-surface": "#ebf2ff",
|
|
113
|
+
"--lt-color-visited-border-subtle": "#cdd8eb",
|
|
114
|
+
"--lt-color-visited-border": "#697a95",
|
|
115
|
+
"--lt-color-visited-border-strong": "#4d5e7a",
|
|
116
|
+
"--lt-color-visited-fill": "#4f6c9c",
|
|
117
|
+
"--lt-color-visited-text": "#364d74",
|
|
118
|
+
"--lt-color-visited-text-strong": "#1d293e",
|
|
119
|
+
"--lt-color-visited-text-subtle": "#4c6080",
|
|
120
|
+
"--lt-color-visited-content": "#fafcfe",
|
|
121
|
+
"--lt-color-brand1-surface": "#e4f7ef",
|
|
122
|
+
"--lt-color-brand1-border-subtle": "#c2dfd4",
|
|
123
|
+
"--lt-color-brand1-border": "#578474",
|
|
124
|
+
"--lt-color-brand1-border-strong": "#386958",
|
|
125
|
+
"--lt-color-brand1-fill": "#157e63",
|
|
126
|
+
"--lt-color-brand1-text": "#005b46",
|
|
127
|
+
"--lt-color-brand1-text-strong": "#073125",
|
|
128
|
+
"--lt-color-brand1-text-subtle": "#316c59",
|
|
129
|
+
"--lt-color-brand1-content": "#f9fdfb",
|
|
130
|
+
"--lt-color-brand2-surface": "#f2efff",
|
|
131
|
+
"--lt-color-brand2-border-subtle": "#d8d2f8",
|
|
132
|
+
"--lt-color-brand2-border": "#7a70a6",
|
|
133
|
+
"--lt-color-brand2-border-strong": "#5f538c",
|
|
134
|
+
"--lt-color-brand2-fill": "#7156ba",
|
|
135
|
+
"--lt-color-brand2-text": "#513b8b",
|
|
136
|
+
"--lt-color-brand2-text-strong": "#2b204a",
|
|
137
|
+
"--lt-color-brand2-text-subtle": "#625295",
|
|
138
|
+
"--lt-color-brand2-content": "#fcfbff",
|
|
139
|
+
"--lt-color-brand3-surface": "#ffecee",
|
|
140
|
+
"--lt-color-brand3-border-subtle": "#f4cccf",
|
|
141
|
+
"--lt-color-brand3-border": "#9f676d",
|
|
142
|
+
"--lt-color-brand3-border-strong": "#844a51",
|
|
143
|
+
"--lt-color-brand3-fill": "#a94656",
|
|
144
|
+
"--lt-color-brand3-text": "#7e2e3c",
|
|
145
|
+
"--lt-color-brand3-text-strong": "#431920",
|
|
146
|
+
"--lt-color-brand3-text-subtle": "#8b4750",
|
|
147
|
+
"--lt-color-brand3-content": "#fffafb",
|
|
148
|
+
"--lt-color-neutral-surface": "#f1f2f3",
|
|
149
|
+
"--lt-color-neutral-border-subtle": "#d6d7d9",
|
|
150
|
+
"--lt-color-neutral-border": "#77797c",
|
|
151
|
+
"--lt-color-neutral-border-strong": "#5c5e60",
|
|
152
|
+
"--lt-color-neutral-fill": "#696c71",
|
|
153
|
+
"--lt-color-neutral-text": "#4a4d51",
|
|
154
|
+
"--lt-color-neutral-text-strong": "#27292b",
|
|
155
|
+
"--lt-color-neutral-text-subtle": "#5d5f62",
|
|
156
|
+
"--lt-color-neutral-content": "#fbfcfc",
|
|
157
|
+
"--lt-color-danger-surface": "#ffedec",
|
|
158
|
+
"--lt-color-danger-border-subtle": "#facac8",
|
|
159
|
+
"--lt-color-danger-border": "#a66363",
|
|
160
|
+
"--lt-color-danger-border-strong": "#8b4647",
|
|
161
|
+
"--lt-color-danger-fill": "#b53b43",
|
|
162
|
+
"--lt-color-danger-text": "#87232c",
|
|
163
|
+
"--lt-color-danger-text-strong": "#481518",
|
|
164
|
+
"--lt-color-danger-text-subtle": "#934244",
|
|
165
|
+
"--lt-color-danger-content": "#fffafa",
|
|
166
|
+
"--lt-color-warning-surface": "#f9f1e1",
|
|
167
|
+
"--lt-color-warning-border-subtle": "#e3d6bc",
|
|
168
|
+
"--lt-color-warning-border": "#8a7650",
|
|
169
|
+
"--lt-color-warning-border-strong": "#6f5a31",
|
|
170
|
+
"--lt-color-warning-fill": "#896508",
|
|
171
|
+
"--lt-color-warning-text": "#644800",
|
|
172
|
+
"--lt-color-warning-text-strong": "#352604",
|
|
173
|
+
"--lt-color-warning-text-subtle": "#735b29",
|
|
174
|
+
"--lt-color-warning-content": "#fdfcf9",
|
|
175
|
+
"--lt-color-success-surface": "#e8f7e6",
|
|
176
|
+
"--lt-color-success-border-subtle": "#c9dfc5",
|
|
177
|
+
"--lt-color-success-border": "#63835e",
|
|
178
|
+
"--lt-color-success-border-strong": "#466841",
|
|
179
|
+
"--lt-color-success-fill": "#3f7d37",
|
|
180
|
+
"--lt-color-success-text": "#285a22",
|
|
181
|
+
"--lt-color-success-text-strong": "#163013",
|
|
182
|
+
"--lt-color-success-text-subtle": "#426b3d",
|
|
183
|
+
"--lt-color-success-content": "#fafdfa",
|
|
184
|
+
"--lt-color-neutral-canvas": "#ffffff",
|
|
185
|
+
"--lt-color-neutral-raised": "#e4e4e5"
|
|
186
|
+
};
|
|
187
|
+
/** LO-TEK's own colours in the dark theme. */
|
|
188
|
+
export const darkCells = {
|
|
189
|
+
"--lt-color-accent-surface": "#192533",
|
|
190
|
+
"--lt-color-accent-border-subtle": "#253951",
|
|
191
|
+
"--lt-color-accent-border": "#668bb6",
|
|
192
|
+
"--lt-color-accent-border-strong": "#85aedf",
|
|
193
|
+
"--lt-color-accent-fill": "#4992e2",
|
|
194
|
+
"--lt-color-accent-text": "#99c8ff",
|
|
195
|
+
"--lt-color-accent-text-strong": "#d8eaff",
|
|
196
|
+
"--lt-color-accent-text-subtle": "#7aabe4",
|
|
197
|
+
"--lt-color-accent-content": "#0c0d10",
|
|
198
|
+
"--lt-color-visited-surface": "#1f242d",
|
|
199
|
+
"--lt-color-visited-border-subtle": "#2f3847",
|
|
200
|
+
"--lt-color-visited-border": "#7888a4",
|
|
201
|
+
"--lt-color-visited-border-strong": "#99accb",
|
|
202
|
+
"--lt-color-visited-fill": "#7290c2",
|
|
203
|
+
"--lt-color-visited-text": "#aac5f3",
|
|
204
|
+
"--lt-color-visited-text-strong": "#dbe9ff",
|
|
205
|
+
"--lt-color-visited-text-subtle": "#93a9cd",
|
|
206
|
+
"--lt-color-visited-content": "#0c0d0f",
|
|
207
|
+
"--lt-color-brand1-surface": "#192822",
|
|
208
|
+
"--lt-color-brand1-border-subtle": "#253e35",
|
|
209
|
+
"--lt-color-brand1-border": "#669382",
|
|
210
|
+
"--lt-color-brand1-border-strong": "#85b7a5",
|
|
211
|
+
"--lt-color-brand1-fill": "#45a386",
|
|
212
|
+
"--lt-color-brand1-text": "#8bd6bc",
|
|
213
|
+
"--lt-color-brand1-text-strong": "#c8f3e3",
|
|
214
|
+
"--lt-color-brand1-text-subtle": "#7bb6a1",
|
|
215
|
+
"--lt-color-brand1-content": "#0c0e0d",
|
|
216
|
+
"--lt-color-brand2-surface": "#242133",
|
|
217
|
+
"--lt-color-brand2-border-subtle": "#393351",
|
|
218
|
+
"--lt-color-brand2-border": "#897eb6",
|
|
219
|
+
"--lt-color-brand2-border-strong": "#aca0df",
|
|
220
|
+
"--lt-color-brand2-fill": "#937be2",
|
|
221
|
+
"--lt-color-brand2-text": "#c6b8ff",
|
|
222
|
+
"--lt-color-brand2-text-strong": "#e8e4ff",
|
|
223
|
+
"--lt-color-brand2-text-subtle": "#aa9be4",
|
|
224
|
+
"--lt-color-brand2-content": "#0d0d10",
|
|
225
|
+
"--lt-color-brand3-surface": "#311e20",
|
|
226
|
+
"--lt-color-brand3-border-subtle": "#4d2e31",
|
|
227
|
+
"--lt-color-brand3-border": "#af767c",
|
|
228
|
+
"--lt-color-brand3-border-strong": "#d7979d",
|
|
229
|
+
"--lt-color-brand3-fill": "#d26a79",
|
|
230
|
+
"--lt-color-brand3-text": "#ffa8b1",
|
|
231
|
+
"--lt-color-brand3-text-strong": "#ffdee1",
|
|
232
|
+
"--lt-color-brand3-text-subtle": "#db9098",
|
|
233
|
+
"--lt-color-brand3-content": "#0f0c0d",
|
|
234
|
+
"--lt-color-neutral-surface": "#232425",
|
|
235
|
+
"--lt-color-neutral-border-subtle": "#373839",
|
|
236
|
+
"--lt-color-neutral-border": "#86888a",
|
|
237
|
+
"--lt-color-neutral-border-strong": "#a9abae",
|
|
238
|
+
"--lt-color-neutral-fill": "#8c8f94",
|
|
239
|
+
"--lt-color-neutral-text": "#c1c4c9",
|
|
240
|
+
"--lt-color-neutral-text-strong": "#e6e8eb",
|
|
241
|
+
"--lt-color-neutral-text-subtle": "#a5a8ab",
|
|
242
|
+
"--lt-color-neutral-content": "#0d0d0d",
|
|
243
|
+
"--lt-color-danger-surface": "#331d1d",
|
|
244
|
+
"--lt-color-danger-border-subtle": "#512c2c",
|
|
245
|
+
"--lt-color-danger-border": "#b67271",
|
|
246
|
+
"--lt-color-danger-border-strong": "#e09392",
|
|
247
|
+
"--lt-color-danger-fill": "#df6165",
|
|
248
|
+
"--lt-color-danger-text": "#ffa9a8",
|
|
249
|
+
"--lt-color-danger-text-strong": "#ffdfde",
|
|
250
|
+
"--lt-color-danger-text-subtle": "#e58b8a",
|
|
251
|
+
"--lt-color-danger-content": "#100c0c",
|
|
252
|
+
"--lt-color-warning-surface": "#292317",
|
|
253
|
+
"--lt-color-warning-border-subtle": "#413621",
|
|
254
|
+
"--lt-color-warning-border": "#99855f",
|
|
255
|
+
"--lt-color-warning-border-strong": "#bea87d",
|
|
256
|
+
"--lt-color-warning-fill": "#ae893a",
|
|
257
|
+
"--lt-color-warning-text": "#e0bf7f",
|
|
258
|
+
"--lt-color-warning-text-strong": "#f9e6c0",
|
|
259
|
+
"--lt-color-warning-text-subtle": "#bea471",
|
|
260
|
+
"--lt-color-warning-content": "#0e0d0b",
|
|
261
|
+
"--lt-color-success-surface": "#1d271b",
|
|
262
|
+
"--lt-color-success-border-subtle": "#2b3e29",
|
|
263
|
+
"--lt-color-success-border": "#71926d",
|
|
264
|
+
"--lt-color-success-border-strong": "#91b78c",
|
|
265
|
+
"--lt-color-success-fill": "#62a15b",
|
|
266
|
+
"--lt-color-success-text": "#9ed597",
|
|
267
|
+
"--lt-color-success-text-strong": "#d2f3cd",
|
|
268
|
+
"--lt-color-success-text-subtle": "#8ab684",
|
|
269
|
+
"--lt-color-success-content": "#0c0e0c",
|
|
270
|
+
"--lt-color-neutral-canvas": "#111212",
|
|
271
|
+
"--lt-color-neutral-raised": "#323333"
|
|
272
|
+
};
|
|
273
|
+
//# sourceMappingURL=matrix-cells.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix-cells.js","sourceRoot":"","sources":["../../src/tokens/matrix-cells.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,oEAAoE;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,CAAU,CAAA;AAIvH,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;CACrB,CAAA;AAUD,+DAA+D;AAC/D,MAAM,CAAC,MAAM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|
|
3
|
+
* tokens.
|
|
4
|
+
*
|
|
5
|
+
* No palette, no steps, no pins: the role *is* the colour. The names follow
|
|
6
|
+
* the namespaces of Tailwind and daisyUI: system prefix, kind and path.
|
|
7
|
+
*
|
|
8
|
+
* The colours are computed by the core. Here are LO-TEK's colours, and the
|
|
9
|
+
* names. A matrix for other brand colours is `light` and `dark` in the theme
|
|
10
|
+
* `buildTheme` returns.
|
|
11
|
+
*/
|
|
12
|
+
import type { Role } from "./matrix-cells.js";
|
|
13
|
+
export { darkCells, FAMILIES, type Family, LOTEK_BRANDS, lightCells, type MatrixToken, } from "./matrix-cells.js";
|
|
14
|
+
/** The role name as it is written in CSS. `textSubtle` becomes `text-subtle`. */
|
|
15
|
+
export declare function roleToCss(role: Role): string;
|
|
16
|
+
/** The token name for one cell in the matrix. */
|
|
17
|
+
export declare function tokenName(family: string, role: string): string;
|
|
18
|
+
//# sourceMappingURL=matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/tokens/matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,MAAM,EACX,YAAY,EACZ,UAAU,EACV,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAA;AAE1B,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE5C;AAED,iDAAiD;AACjD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The matrix, as `@lo-tek/interfaces/matrix`: family times role, as finished
|
|
3
|
+
* tokens.
|
|
4
|
+
*
|
|
5
|
+
* No palette, no steps, no pins: the role *is* the colour. The names follow
|
|
6
|
+
* the namespaces of Tailwind and daisyUI: system prefix, kind and path.
|
|
7
|
+
*
|
|
8
|
+
* The colours are computed by the core. Here are LO-TEK's colours, and the
|
|
9
|
+
* names. A matrix for other brand colours is `light` and `dark` in the theme
|
|
10
|
+
* `buildTheme` returns.
|
|
11
|
+
*/
|
|
12
|
+
export { darkCells, FAMILIES, LOTEK_BRANDS, lightCells, } from "./matrix-cells.js";
|
|
13
|
+
/** The role name as it is written in CSS. `textSubtle` becomes `text-subtle`. */
|
|
14
|
+
export function roleToCss(role) {
|
|
15
|
+
return role.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
16
|
+
}
|
|
17
|
+
/** The token name for one cell in the matrix. */
|
|
18
|
+
export function tokenName(family, role) {
|
|
19
|
+
return `--lt-color-${family}-${role}`;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=matrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.js","sourceRoot":"","sources":["../../src/tokens/matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EACL,SAAS,EACT,QAAQ,EAER,YAAY,EACZ,UAAU,GAEX,MAAM,mBAAmB,CAAA;AAE1B,iFAAiF;AACjF,MAAM,UAAU,SAAS,CAAC,IAAU;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AACvE,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,SAAS,CAAC,MAAc,EAAE,IAAY;IACpD,OAAO,cAAc,MAAM,IAAI,IAAI,EAAE,CAAA;AACvC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks a theme a consumer has written by hand.
|
|
3
|
+
*
|
|
4
|
+
* The generator keeps the promises by construction. When someone writes in
|
|
5
|
+
* values of their choosing, keeping the promises is up to them, and then we
|
|
6
|
+
* owe them an answer about which cell breaks. Without this, "you can override
|
|
7
|
+
* anything" is a trap.
|
|
8
|
+
*
|
|
9
|
+
* All that matters is which `--lt-color-*` is in which block, and whether the
|
|
10
|
+
* block is light or dark, read from `color-scheme` or the selector. A value
|
|
11
|
+
* that cannot be computed is reported as exactly that instead of being
|
|
12
|
+
* skipped, and missing values are filled from LO-TEK's default theme, so
|
|
13
|
+
* someone who has overridden a single cell gets it checked against the rest
|
|
14
|
+
* of the system.
|
|
15
|
+
*
|
|
16
|
+
* The check is the core, written in Rust, the same one `lotek check-theme`
|
|
17
|
+
* uses.
|
|
18
|
+
*/
|
|
19
|
+
export type ThemeReport = {
|
|
20
|
+
problems: ThemeProblem[];
|
|
21
|
+
/** Blocks that were actually read. */
|
|
22
|
+
blocks: number;
|
|
23
|
+
/**
|
|
24
|
+
* Values the consumer wrote, and that were understood.
|
|
25
|
+
*
|
|
26
|
+
* The promise count alone is no proof of work: the defaults fill the gaps,
|
|
27
|
+
* so one line gives as many promises as a whole theme. This number counts
|
|
28
|
+
* what the file actually contained.
|
|
29
|
+
*/
|
|
30
|
+
declarations: number;
|
|
31
|
+
/** Promises that were actually checked. */
|
|
32
|
+
promises: number;
|
|
33
|
+
};
|
|
34
|
+
export type ThemeProblem = {
|
|
35
|
+
selector: string;
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
/** Reads a theme and checks every promise in every block. */
|
|
39
|
+
export declare function inspectTheme(css: string): ThemeReport;
|
|
40
|
+
/** Only the problems, for anyone who does not need the counts. */
|
|
41
|
+
export declare function checkTheme(css: string): ThemeProblem[];
|
|
42
|
+
//# sourceMappingURL=theme-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-check.d.ts","sourceRoot":"","sources":["../../src/tokens/theme-check.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAErD;AAED,kEAAkE;AAClE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAEtD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultCore } from "../diagnostics/default-core.js";
|
|
2
|
+
/** Reads a theme and checks every promise in every block. */
|
|
3
|
+
export function inspectTheme(css) {
|
|
4
|
+
return defaultCore().inspectTheme(css);
|
|
5
|
+
}
|
|
6
|
+
/** Only the problems, for anyone who does not need the counts. */
|
|
7
|
+
export function checkTheme(css) {
|
|
8
|
+
return inspectTheme(css).problems;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=theme-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-check.js","sourceRoot":"","sources":["../../src/tokens/theme-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AA0C5D,6DAA6D;AAC7D,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,WAAW,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Violation } from "../diagnostics/core.js";
|
|
2
|
+
import type { Family } from "./matrix.js";
|
|
3
|
+
export type { Violation };
|
|
4
|
+
/**
|
|
5
|
+
* Builds a complete colour theme from a few brand colours.
|
|
6
|
+
*
|
|
7
|
+
* The theme is the contract applied to the consumer's hues. The hue comes
|
|
8
|
+
* from the consumer, the lightness from the role, and the promises hold by
|
|
9
|
+
* construction. That is why there is no adjustment pass here: there is
|
|
10
|
+
* nothing to move.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* const theme = buildTheme({ accent: "#7c3aed", danger: "#b3261e" })
|
|
14
|
+
* console.log(theme.css)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export type ThemeTypography = {
|
|
18
|
+
/** The font stack the whole theme uses, written as in CSS. */
|
|
19
|
+
fontFamily?: string;
|
|
20
|
+
/** The weights, as numbers or keywords. */
|
|
21
|
+
weights?: {
|
|
22
|
+
regular?: string | number;
|
|
23
|
+
medium?: string | number;
|
|
24
|
+
semibold?: string | number;
|
|
25
|
+
bold?: string | number;
|
|
26
|
+
};
|
|
27
|
+
/** Line heights for controls, headings, body text and small surfaces. */
|
|
28
|
+
lineHeights?: {
|
|
29
|
+
default?: string | number;
|
|
30
|
+
heading?: string | number;
|
|
31
|
+
article?: string | number;
|
|
32
|
+
compact?: string | number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The shape of the theme: corners and borders.
|
|
37
|
+
*
|
|
38
|
+
* The button, the field and the surfaces are set separately. The distinction
|
|
39
|
+
* is worth keeping: another Norwegian design system has fully round buttons
|
|
40
|
+
* and fields with almost square corners, and one shared number would have
|
|
41
|
+
* turned the fields into capsules.
|
|
42
|
+
*
|
|
43
|
+
* The checkbox, the badge, the tag, the toggle group, the avatar and the
|
|
44
|
+
* skeleton are left out on purpose. There the corner is not a style choice
|
|
45
|
+
* but the shape itself: a checkbox that turns round looks like a radio
|
|
46
|
+
* button, and a badge that turns square looks like a button.
|
|
47
|
+
*/
|
|
48
|
+
export type ThemeShape = {
|
|
49
|
+
/** Corners on the button, the pagination and the skip link. */
|
|
50
|
+
buttonRadius?: string;
|
|
51
|
+
/** Corners on the field, the text area and the select. */
|
|
52
|
+
fieldRadius?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Corners on the card, dialog, popover, alert, accordion, error summary,
|
|
55
|
+
* file upload, session timeout, suggestion list, toast and tooltip.
|
|
56
|
+
*/
|
|
57
|
+
surfaceRadius?: string;
|
|
58
|
+
/** The border width of the button. */
|
|
59
|
+
buttonBorderWidth?: string;
|
|
60
|
+
/** The font weight of the button text. */
|
|
61
|
+
buttonFontWeight?: string | number;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The brand colours.
|
|
65
|
+
*
|
|
66
|
+
* Each family is optional on its own, and one you leave out inherits
|
|
67
|
+
* LO-TEK's default hue. Leave them all out, and the theme only sets type and
|
|
68
|
+
* shape.
|
|
69
|
+
*/
|
|
70
|
+
export type ThemeColors = Partial<Record<Family, string>>;
|
|
71
|
+
export type ThemeInput = ThemeColors & {
|
|
72
|
+
/** Type and line height. Left out, LO-TEK's default typography stays. */
|
|
73
|
+
typography?: ThemeTypography;
|
|
74
|
+
/** Corners and borders. Left out, LO-TEK's default shape stays. */
|
|
75
|
+
shape?: ThemeShape;
|
|
76
|
+
};
|
|
77
|
+
export type Theme = {
|
|
78
|
+
light: Record<string, string>;
|
|
79
|
+
dark: Record<string, string>;
|
|
80
|
+
/** Promises that do not hold. Empty when the theme is sound. */
|
|
81
|
+
violations: Violation[];
|
|
82
|
+
css: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Builds the theme, and checks every promise while it is built.
|
|
86
|
+
*
|
|
87
|
+
* The arithmetic happens in the core, written in Rust, which `lotek theme` and
|
|
88
|
+
* LO-TEK for Kotlin use. The typography and shape values are written straight
|
|
89
|
+
* into a CSS rule, so a value that could break out of it, such as
|
|
90
|
+
* `4px; } html {`, an unclosed parenthesis or `</style>`, is rejected with an
|
|
91
|
+
* explanation that names the field in the recipe.
|
|
92
|
+
*/
|
|
93
|
+
export declare function buildTheme(input: ThemeInput): Theme;
|
|
94
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/tokens/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KACvB,CAAA;IACD,yEAAyE;IACzE,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAC1B,CAAA;CACF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACnC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAEzD,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,yEAAyE;IACzE,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,mEAAmE;IACnE,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,gEAAgE;IAChE,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAEnD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defaultCore } from "../diagnostics/default-core.js";
|
|
2
|
+
/**
|
|
3
|
+
* Builds the theme, and checks every promise while it is built.
|
|
4
|
+
*
|
|
5
|
+
* The arithmetic happens in the core, written in Rust, which `lotek theme` and
|
|
6
|
+
* LO-TEK for Kotlin use. The typography and shape values are written straight
|
|
7
|
+
* into a CSS rule, so a value that could break out of it, such as
|
|
8
|
+
* `4px; } html {`, an unclosed parenthesis or `</style>`, is rejected with an
|
|
9
|
+
* explanation that names the field in the recipe.
|
|
10
|
+
*/
|
|
11
|
+
export function buildTheme(input) {
|
|
12
|
+
return defaultCore().buildTheme(input);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/tokens/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AA2F5D;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,OAAO,WAAW,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { type Family, type MatrixToken, type Role } from "./matrix-cells.js";
|
|
2
|
+
export declare const Breakpoints: {
|
|
3
|
+
readonly sm: "640px";
|
|
4
|
+
readonly md: "768px";
|
|
5
|
+
readonly lg: "1024px";
|
|
6
|
+
readonly xl: "1280px";
|
|
7
|
+
readonly "2xl": "1536px";
|
|
8
|
+
};
|
|
9
|
+
export declare const Containers: {
|
|
10
|
+
readonly xs: "100%";
|
|
11
|
+
readonly sm: "576px";
|
|
12
|
+
readonly md: "960px";
|
|
13
|
+
readonly lg: "1152px";
|
|
14
|
+
readonly xl: "1536px";
|
|
15
|
+
readonly aside: "384px";
|
|
16
|
+
readonly asideNarrow: "288px";
|
|
17
|
+
readonly wideContent: "768px";
|
|
18
|
+
};
|
|
19
|
+
export type Breakpoint = keyof typeof Breakpoints;
|
|
20
|
+
export type Container = keyof typeof Containers;
|
|
21
|
+
export declare const FAMILY_DESCRIPTIONS: Record<Family, string>;
|
|
22
|
+
export declare const ROLE_DESCRIPTIONS: Record<Role, string>;
|
|
23
|
+
/** The layers only the neutral family has, because it carries the page itself. */
|
|
24
|
+
export declare const LAYER_DESCRIPTIONS: Record<"canvas" | "raised", string>;
|
|
25
|
+
/**
|
|
26
|
+
* Everything that is not colour.
|
|
27
|
+
*
|
|
28
|
+
* The colours are not here. The core computes them from the colour contract
|
|
29
|
+
* (`color-contract.json`) and writes them to `matrix-cells.ts`, so the
|
|
30
|
+
* system's colours are the same contract applied to the system's hues. See
|
|
31
|
+
* `colorTokens` below.
|
|
32
|
+
*/
|
|
33
|
+
export declare const cssTokens: {
|
|
34
|
+
readonly "--lt-font-size-reference": "16px";
|
|
35
|
+
readonly "--lt-font-size-xxs": "0.625rem";
|
|
36
|
+
readonly "--lt-font-size-xs": "0.75rem";
|
|
37
|
+
readonly "--lt-font-size-s": "0.875rem";
|
|
38
|
+
readonly "--lt-font-size-m": "1rem";
|
|
39
|
+
readonly "--lt-font-size-l": "1.125rem";
|
|
40
|
+
readonly "--lt-font-size-xl": "1.375rem";
|
|
41
|
+
readonly "--lt-font-size-xxl": "1.875rem";
|
|
42
|
+
readonly "--lt-font-size-mega": "2.625rem";
|
|
43
|
+
readonly "--lt-font-weight-regular": "400";
|
|
44
|
+
readonly "--lt-font-weight-medium": "500";
|
|
45
|
+
readonly "--lt-font-weight-semibold": "600";
|
|
46
|
+
readonly "--lt-font-weight-bold": "700";
|
|
47
|
+
/** Controls and buttons. */
|
|
48
|
+
readonly "--lt-line-height-default": "1.5";
|
|
49
|
+
/** Headings. */
|
|
50
|
+
readonly "--lt-line-height-heading": "1.2";
|
|
51
|
+
/** Body text in an article. */
|
|
52
|
+
readonly "--lt-line-height-article": "1.6";
|
|
53
|
+
/** Tighter text on small surfaces: tags, tooltips. */
|
|
54
|
+
readonly "--lt-line-height-compact": "1.4";
|
|
55
|
+
readonly "--lt-spacing-px": "1px";
|
|
56
|
+
readonly "--lt-spacing-0-5": "0.125rem";
|
|
57
|
+
readonly "--lt-spacing-1": "0.25rem";
|
|
58
|
+
readonly "--lt-spacing-2": "0.5rem";
|
|
59
|
+
readonly "--lt-spacing-3": "0.75rem";
|
|
60
|
+
readonly "--lt-spacing-4": "1rem";
|
|
61
|
+
readonly "--lt-spacing-5": "1.25rem";
|
|
62
|
+
readonly "--lt-spacing-6": "1.5rem";
|
|
63
|
+
readonly "--lt-spacing-7": "1.75rem";
|
|
64
|
+
readonly "--lt-spacing-8": "2rem";
|
|
65
|
+
readonly "--lt-spacing-10": "2.5rem";
|
|
66
|
+
readonly "--lt-spacing-12": "3rem";
|
|
67
|
+
readonly "--lt-spacing-16": "4rem";
|
|
68
|
+
readonly "--lt-icon-search": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E\")";
|
|
69
|
+
readonly "--lt-icon-check": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E\")";
|
|
70
|
+
readonly "--lt-icon-dash": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E\")";
|
|
71
|
+
readonly "--lt-icon-calendar": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E\")";
|
|
72
|
+
readonly "--lt-icon-clock": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E\")";
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Every variable name the system ships.
|
|
76
|
+
*
|
|
77
|
+
* The colours are included even though they are not in `cssTokens`: they are
|
|
78
|
+
* computed by the contract and so have no literal in the source. `ColorToken`
|
|
79
|
+
* derives them from the axes instead. Without the colours here, the lookup
|
|
80
|
+
* table was typed for everything *except* what the consumer writes most
|
|
81
|
+
* often, and a typo in a colour name gave no error in the editor.
|
|
82
|
+
*/
|
|
83
|
+
export type CssToken = keyof typeof cssTokens | ColorToken;
|
|
84
|
+
/** The icons in dark theme, with a lighter stroke. */
|
|
85
|
+
export declare const darkTokens: {
|
|
86
|
+
readonly "--lt-icon-search": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E\")";
|
|
87
|
+
readonly "--lt-icon-check": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E\")";
|
|
88
|
+
readonly "--lt-icon-dash": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E\")";
|
|
89
|
+
readonly "--lt-icon-calendar": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E\")";
|
|
90
|
+
readonly "--lt-icon-clock": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E\")";
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* System colours that are not a cell in the matrix.
|
|
94
|
+
*
|
|
95
|
+
* The disabled state is exempt from the contrast requirement in WCAG 1.4.3,
|
|
96
|
+
* and the value is low on purpose: a disabled control should look disabled.
|
|
97
|
+
* 3.44:1 against the surface is still readable, while a lighter grey gave
|
|
98
|
+
* 1.83 and was not.
|
|
99
|
+
*
|
|
100
|
+
* The backdrop behind a modal and the shadow under a panel are translucent
|
|
101
|
+
* black in both themes, not a colour from a scale.
|
|
102
|
+
*/
|
|
103
|
+
declare const SYSTEM_COLORS: {
|
|
104
|
+
readonly "--lt-color-disabled-surface": "var(--lt-color-neutral-raised)";
|
|
105
|
+
readonly "--lt-color-disabled-text": "var(--lt-color-neutral-border)";
|
|
106
|
+
readonly "--lt-focus-ring": "2px solid var(--lt-color-accent-border-strong)";
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The colours, computed by the contract.
|
|
110
|
+
*
|
|
111
|
+
* The system's colours are the same contract applied to the system's hues.
|
|
112
|
+
* There is no hand-picked palette beside it, so there is no version that can
|
|
113
|
+
* drift out of step with the promises.
|
|
114
|
+
*/
|
|
115
|
+
/** The colour names that are not a cell: disabled state, ring, backdrop, shadow. */
|
|
116
|
+
type SystemColorToken = keyof typeof SYSTEM_COLORS | "--lt-color-overlay" | "--lt-shadow-overlay";
|
|
117
|
+
/** Every colour name the system ships. */
|
|
118
|
+
export type ColorToken = MatrixToken | SystemColorToken;
|
|
119
|
+
export declare const colorTokens: Record<ColorToken, string>;
|
|
120
|
+
export declare const darkColorTokens: Record<MatrixToken | "--lt-color-overlay" | "--lt-shadow-overlay", string>;
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/tokens/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,MAAM,EAEX,KAAK,WAAW,EAChB,KAAK,IAAI,EACV,MAAM,mBAAmB,CAAA;AAE1B,eAAO,MAAM,WAAW;;;;;;CAMd,CAAA;AAEV,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAA;AACjD,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAA;AAQ/C,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAatD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAUlD,CAAA;AAED,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,EAAE,MAAM,CAGlE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;IAwBpB,4BAA4B;;IAE5B,gBAAgB;;IAEhB,+BAA+B;;IAE/B,sDAAsD;;;;;;;;;;;;;;;;;;;;CAyC9C,CAAA;AAEV;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,GAAG,UAAU,CAAA;AAE1D,sDAAsD;AACtD,eAAO,MAAM,UAAU;;;;;;CAW+B,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,aAAa;;;;CAIT,CAAA;AAEV;;;;;;GAMG;AACH,oFAAoF;AACpF,KAAK,gBAAgB,GACjB,MAAM,OAAO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