@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,39 @@
|
|
|
1
|
+
import { attributes, createGuard, fieldStates, isFieldState, requiredMarkers, } from "../shared.js";
|
|
2
|
+
export const FIELDSET_CLASS = "lt-fieldset";
|
|
3
|
+
export const LEGEND_CLASS = "lt-legend";
|
|
4
|
+
/**
|
|
5
|
+
* The attributes for a group of controls that belong together.
|
|
6
|
+
*
|
|
7
|
+
* `<fieldset>` with `<legend>` is the one way to give a set of radio buttons
|
|
8
|
+
* or checkboxes a shared label that screen readers actually announce before
|
|
9
|
+
* each choice.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* <fieldset {...fieldset({ state: "invalid" })}>
|
|
13
|
+
* <legend {...legend({ required: "symbol" })}>Delivery method</legend>
|
|
14
|
+
* </fieldset>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export const fieldset = Object.assign(({ state = "default", disabled } = {}) => attributes({
|
|
18
|
+
class: FIELDSET_CLASS,
|
|
19
|
+
"data-state": state === "default" ? undefined : state,
|
|
20
|
+
disabled: disabled ? true : undefined,
|
|
21
|
+
}), {
|
|
22
|
+
states: fieldStates,
|
|
23
|
+
isState: isFieldState,
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* The attributes for the label of a group.
|
|
27
|
+
*
|
|
28
|
+
* The same marker as `label()`, but on a `<legend>`.
|
|
29
|
+
*/
|
|
30
|
+
export const legend = Object.assign(({ required, optional, disabled } = {}) => attributes({
|
|
31
|
+
class: LEGEND_CLASS,
|
|
32
|
+
"data-required": required,
|
|
33
|
+
"data-optional": optional && !required ? "" : undefined,
|
|
34
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
35
|
+
}), {
|
|
36
|
+
markers: requiredMarkers,
|
|
37
|
+
isMarker: createGuard(requiredMarkers),
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=fieldset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldset.js","sourceRoot":"","sources":["../../../../src/components/css/fieldset/fieldset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EAEX,WAAW,EACX,YAAY,EAGZ,eAAe,GAChB,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,cAAc,GAAG,aAAsB,CAAA;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAA;AA+BhD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CACnC,CAAC,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,KAAsB,EAAE,EAAsB,EAAE,CAC5E,UAAU,CAAC;IACT,KAAK,EAAE,cAAc;IACrB,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAE,IAAc,CAAC,CAAC,CAAC,SAAS;CACjD,CAAC,EACJ;IACE,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,KAAoB,EAAE,EAAoB,EAAE,CACzE,UAAU,CAAC;IACT,KAAK,EAAE,YAAY;IACnB,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,EAAY,CAAC,CAAC,CAAC,SAAS;IAClE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CAC1D,CAAC,EACJ;IACE,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC;CACvC,CACF,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type FieldState, type NonDefaultFieldState } from "../shared.js";
|
|
2
|
+
export declare const FILE_UPLOAD_CLASS: "lt-file-upload";
|
|
3
|
+
/** The list of the selected files. */
|
|
4
|
+
export declare const FILE_UPLOAD_LIST_CLASS: "lt-file-upload-list";
|
|
5
|
+
export type FileUploadOptions = {
|
|
6
|
+
/** Validation state. Default: `default`. */
|
|
7
|
+
state?: FieldState;
|
|
8
|
+
/** Allow several files. */
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
/** The file types the field accepts, such as `.pdf,image/*`. */
|
|
11
|
+
accept?: string;
|
|
12
|
+
};
|
|
13
|
+
export type FileUploadAttributes = {
|
|
14
|
+
class: typeof FILE_UPLOAD_CLASS;
|
|
15
|
+
type: "file";
|
|
16
|
+
multiple?: true;
|
|
17
|
+
accept?: string;
|
|
18
|
+
"data-state"?: NonDefaultFieldState;
|
|
19
|
+
"aria-invalid"?: "true";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The attributes for a file upload field.
|
|
23
|
+
*
|
|
24
|
+
* The field is a plain `<input type="file">`. The button inside is the
|
|
25
|
+
* browser's own, and its text comes from the operating system's language. It
|
|
26
|
+
* cannot be translated, so the label above the field must say what to upload.
|
|
27
|
+
*
|
|
28
|
+
* `accept` is a help in the file picker, not a barrier. The user can choose
|
|
29
|
+
* "all files", so the type must be checked on the server anyway.
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* <input {...fileUpload({ multiple: true, accept: ".pdf" })} />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare const fileUpload: (({ state, multiple, accept, }?: FileUploadOptions) => FileUploadAttributes) & {
|
|
36
|
+
/** The class on the list of selected files. */
|
|
37
|
+
list: "lt-file-upload-list";
|
|
38
|
+
states: readonly ["default", "invalid", "success"];
|
|
39
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=file-upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../../src/components/css/file-upload/file-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,iBAAiB,EAAG,gBAAyB,CAAA;AAC1D,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,EAAG,qBAA8B,CAAA;AAEpE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,OAAO,iBAAiB,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,IAAI,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,mCAKlB,iBAAiB,KAAQ,oBAAoB;IAU9C,+CAA+C;;;;CAKlD,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { attributes, fieldStates, isFieldState, } from "../shared.js";
|
|
2
|
+
export const FILE_UPLOAD_CLASS = "lt-file-upload";
|
|
3
|
+
/** The list of the selected files. */
|
|
4
|
+
export const FILE_UPLOAD_LIST_CLASS = "lt-file-upload-list";
|
|
5
|
+
/**
|
|
6
|
+
* The attributes for a file upload field.
|
|
7
|
+
*
|
|
8
|
+
* The field is a plain `<input type="file">`. The button inside is the
|
|
9
|
+
* browser's own, and its text comes from the operating system's language. It
|
|
10
|
+
* cannot be translated, so the label above the field must say what to upload.
|
|
11
|
+
*
|
|
12
|
+
* `accept` is a help in the file picker, not a barrier. The user can choose
|
|
13
|
+
* "all files", so the type must be checked on the server anyway.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* <input {...fileUpload({ multiple: true, accept: ".pdf" })} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const fileUpload = Object.assign(({ state = "default", multiple, accept, } = {}) => attributes({
|
|
20
|
+
class: FILE_UPLOAD_CLASS,
|
|
21
|
+
type: "file",
|
|
22
|
+
multiple: multiple ? true : undefined,
|
|
23
|
+
accept,
|
|
24
|
+
"data-state": state === "default" ? undefined : state,
|
|
25
|
+
"aria-invalid": state === "invalid" ? "true" : undefined,
|
|
26
|
+
}), {
|
|
27
|
+
/** The class on the list of selected files. */
|
|
28
|
+
list: FILE_UPLOAD_LIST_CLASS,
|
|
29
|
+
states: fieldStates,
|
|
30
|
+
isState: isFieldState,
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=file-upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload.js","sourceRoot":"","sources":["../../../../src/components/css/file-upload/file-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,WAAW,EACX,YAAY,GAEb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAyB,CAAA;AAC1D,sCAAsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAA8B,CAAA;AAoBpE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CACrC,CAAC,EACC,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,MAAM,MACe,EAAE,EAAwB,EAAE,CACjD,UAAU,CAAC;IACT,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,MAAe;IACrB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAE,IAAc,CAAC,CAAC,CAAC,SAAS;IAChD,MAAM;IACN,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,cAAc,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CACpE,CAAC,EACJ;IACE,+CAA+C;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const HEADING_CLASS: "lt-heading";
|
|
2
|
+
export declare const headingSizes: readonly ["xs", "s", "m", "l", "xl", "mega"];
|
|
3
|
+
export type HeadingSize = (typeof headingSizes)[number];
|
|
4
|
+
export type NonDefaultHeadingSize = Exclude<HeadingSize, "l">;
|
|
5
|
+
export type HeadingOptions = {
|
|
6
|
+
/** Visual size. Default: `l`. */
|
|
7
|
+
size?: HeadingSize;
|
|
8
|
+
};
|
|
9
|
+
export type HeadingAttributes = {
|
|
10
|
+
class: typeof HEADING_CLASS;
|
|
11
|
+
"data-size"?: NonDefaultHeadingSize;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The attributes for a heading.
|
|
15
|
+
*
|
|
16
|
+
* Size and level are two different things. The level is `<h1>` to `<h6>`
|
|
17
|
+
* and sets the structure screen readers navigate by; `size` only sets how
|
|
18
|
+
* large the text looks. An `<h2>` that should look small is correct; an
|
|
19
|
+
* `<h4>` chosen because it was small enough skips a level in the structure.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* <h2 {...heading({ size: "m" })}>Attachments</h2>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const heading: (({ size }?: HeadingOptions) => HeadingAttributes) & {
|
|
26
|
+
sizes: readonly ["xs", "s", "m", "l", "xl", "mega"];
|
|
27
|
+
isSize: (value: string) => value is "xs" | "s" | "m" | "l" | "xl" | "mega";
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/components/css/heading/heading.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAG,YAAqB,CAAA;AAElD,eAAO,MAAM,YAAY,8CAA+C,CAAA;AAExE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B,iCAAiC;IACjC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAA;IAC3B,WAAW,CAAC,EAAE,qBAAqB,CAAA;CACpC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,eACD,cAAc,KAAQ,iBAAiB;;;CASzD,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { attributes, createGuard } from "../shared.js";
|
|
2
|
+
export const HEADING_CLASS = "lt-heading";
|
|
3
|
+
export const headingSizes = ["xs", "s", "m", "l", "xl", "mega"];
|
|
4
|
+
/**
|
|
5
|
+
* The attributes for a heading.
|
|
6
|
+
*
|
|
7
|
+
* Size and level are two different things. The level is `<h1>` to `<h6>`
|
|
8
|
+
* and sets the structure screen readers navigate by; `size` only sets how
|
|
9
|
+
* large the text looks. An `<h2>` that should look small is correct; an
|
|
10
|
+
* `<h4>` chosen because it was small enough skips a level in the structure.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* <h2 {...heading({ size: "m" })}>Attachments</h2>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const heading = Object.assign(({ size = "l" } = {}) => attributes({
|
|
17
|
+
class: HEADING_CLASS,
|
|
18
|
+
"data-size": size === "l" ? undefined : size,
|
|
19
|
+
}), {
|
|
20
|
+
sizes: headingSizes,
|
|
21
|
+
isSize: createGuard(headingSizes),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../../src/components/css/heading/heading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,YAAqB,CAAA;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAU,CAAA;AAexE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAClC,CAAC,EAAE,IAAI,GAAG,GAAG,KAAqB,EAAE,EAAqB,EAAE,CACzD,UAAU,CAAC;IACT,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;CAC7C,CAAC,EACJ;IACE,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC;CAClC,CACF,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const HELP_TEXT_CLASS: "lt-help-text";
|
|
2
|
+
export declare const helpTextVariants: readonly ["muted", "strong", "success", "warning"];
|
|
3
|
+
export type HelpTextVariant = (typeof helpTextVariants)[number];
|
|
4
|
+
export type NonDefaultHelpTextVariant = Exclude<HelpTextVariant, "muted">;
|
|
5
|
+
export type HelpTextOptions = {
|
|
6
|
+
/** How loudly the text should speak. Default: `muted`. */
|
|
7
|
+
variant?: HelpTextVariant;
|
|
8
|
+
};
|
|
9
|
+
export type HelpTextAttributes = {
|
|
10
|
+
class: typeof HELP_TEXT_CLASS;
|
|
11
|
+
"data-variant"?: NonDefaultHelpTextVariant;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The attributes for help text below a field.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* <p {...helpText({ variant: "warning" })}>…</p>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const helpText: (({ variant }?: HelpTextOptions) => HelpTextAttributes) & {
|
|
21
|
+
variants: readonly ["muted", "strong", "success", "warning"];
|
|
22
|
+
isVariant: (value: string) => value is "warning" | "success" | "strong" | "muted";
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=help-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-text.d.ts","sourceRoot":"","sources":["../../../../src/components/css/help-text/help-text.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAG,cAAuB,CAAA;AAEtD,eAAO,MAAM,gBAAgB,oDAKnB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/D,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;AAEzE,MAAM,MAAM,eAAe,GAAG;IAC5B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,cAAc,CAAC,EAAE,yBAAyB,CAAA;CAC3C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,kBACK,eAAe,KAAQ,kBAAkB;;;CASlE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { attributes, createGuard } from "../shared.js";
|
|
2
|
+
export const HELP_TEXT_CLASS = "lt-help-text";
|
|
3
|
+
export const helpTextVariants = [
|
|
4
|
+
"muted",
|
|
5
|
+
"strong",
|
|
6
|
+
"success",
|
|
7
|
+
"warning",
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* The attributes for help text below a field.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* <p {...helpText({ variant: "warning" })}>…</p>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const helpText = Object.assign(({ variant = "muted" } = {}) => attributes({
|
|
17
|
+
class: HELP_TEXT_CLASS,
|
|
18
|
+
"data-variant": variant === "muted" ? undefined : variant,
|
|
19
|
+
}), {
|
|
20
|
+
variants: helpTextVariants,
|
|
21
|
+
isVariant: createGuard(helpTextVariants),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=help-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-text.js","sourceRoot":"","sources":["../../../../src/components/css/help-text/help-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAuB,CAAA;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO;IACP,QAAQ;IACR,SAAS;IACT,SAAS;CACD,CAAA;AAeV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CACnC,CAAC,EAAE,OAAO,GAAG,OAAO,KAAsB,EAAE,EAAsB,EAAE,CAClE,UAAU,CAAC;IACT,KAAK,EAAE,eAAe;IACtB,cAAc,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC1D,CAAC,EACJ;IACE,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,WAAW,CAAC,gBAAgB,CAAC;CACzC,CACF,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const ICON_CLASS: "lt-icon";
|
|
2
|
+
export type IconOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* What the icon means, when it stands alone and means something, such as a
|
|
5
|
+
* warning sign with no text next to it. Becomes `aria-label` with
|
|
6
|
+
* `role="img"`. Without it the icon is decoration, and is hidden from
|
|
7
|
+
* screen readers.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
};
|
|
11
|
+
export type IconAttributes = {
|
|
12
|
+
class: typeof ICON_CLASS;
|
|
13
|
+
role?: "img";
|
|
14
|
+
"aria-label"?: string;
|
|
15
|
+
"aria-hidden"?: "true";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The attributes for an icon. The class goes on an `<svg>`, and the svg comes
|
|
19
|
+
* from the app's icon set: LO-TEK ships no icons.
|
|
20
|
+
*
|
|
21
|
+
* The icon is as large as the text around it, and is drawn in the colour the
|
|
22
|
+
* svg says, which should be `currentColor`. Without `label` it is decoration,
|
|
23
|
+
* and if it stands alone in a button, the button must get its name somewhere
|
|
24
|
+
* else: `aria-label` on the button, or a text with `lt-sr-only`. The core
|
|
25
|
+
* reports a button that lacks one.
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* <button {...button()} aria-label="Delete the application">
|
|
29
|
+
* <svg {...icon()} viewBox="0 0 24 24">…</svg>
|
|
30
|
+
* </button>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const icon: ({ label }?: IconOptions) => IconAttributes;
|
|
34
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/components/css/icon/icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAG,SAAkB,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAA;IACxB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,GAAI,YAAW,WAAgB,KAAG,cAM/C,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { attributes } from "../shared.js";
|
|
2
|
+
export const ICON_CLASS = "lt-icon";
|
|
3
|
+
/**
|
|
4
|
+
* The attributes for an icon. The class goes on an `<svg>`, and the svg comes
|
|
5
|
+
* from the app's icon set: LO-TEK ships no icons.
|
|
6
|
+
*
|
|
7
|
+
* The icon is as large as the text around it, and is drawn in the colour the
|
|
8
|
+
* svg says, which should be `currentColor`. Without `label` it is decoration,
|
|
9
|
+
* and if it stands alone in a button, the button must get its name somewhere
|
|
10
|
+
* else: `aria-label` on the button, or a text with `lt-sr-only`. The core
|
|
11
|
+
* reports a button that lacks one.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* <button {...button()} aria-label="Delete the application">
|
|
15
|
+
* <svg {...icon()} viewBox="0 0 24 24">…</svg>
|
|
16
|
+
* </button>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const icon = ({ label } = {}) => attributes({
|
|
20
|
+
class: ICON_CLASS,
|
|
21
|
+
role: label ? "img" : undefined,
|
|
22
|
+
"aria-label": label || undefined,
|
|
23
|
+
"aria-hidden": label ? undefined : "true",
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../src/components/css/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAkB,CAAA;AAmB5C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,KAAkB,EAAE,EAAkB,EAAE,CAClE,UAAU,CAAC;IACT,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAE,KAAe,CAAC,CAAC,CAAC,SAAS;IAC1C,YAAY,EAAE,KAAK,IAAI,SAAS;IAChC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,MAAgB;CACrD,CAAC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type FieldState, type NonDefaultFieldState } from "../shared.js";
|
|
2
|
+
export declare const INPUT_CLASS: "lt-input";
|
|
3
|
+
export declare const inputTypes: readonly ["text", "password", "email", "number", "date", "datetime-local", "week", "month", "tel", "url", "search", "time"];
|
|
4
|
+
export type InputType = (typeof inputTypes)[number];
|
|
5
|
+
/** The types that get an icon in the field, and that open the browser's own picker. */
|
|
6
|
+
declare const TYPES_WITH_ICON: readonly ["date", "time", "datetime-local"];
|
|
7
|
+
type TypeWithIcon = (typeof TYPES_WITH_ICON)[number];
|
|
8
|
+
export type InputOptions = {
|
|
9
|
+
/** The HTML type. Set as `type`, and decides the icon. Default: `text`. */
|
|
10
|
+
type?: InputType;
|
|
11
|
+
/** Validation state. Default: `default`. */
|
|
12
|
+
state?: FieldState;
|
|
13
|
+
};
|
|
14
|
+
export type InputAttributes = {
|
|
15
|
+
class: typeof INPUT_CLASS;
|
|
16
|
+
type: InputType;
|
|
17
|
+
"data-variant"?: TypeWithIcon;
|
|
18
|
+
"data-state"?: NonDefaultFieldState;
|
|
19
|
+
"aria-invalid"?: "true";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The attributes for a text field.
|
|
23
|
+
*
|
|
24
|
+
* `type` sets both the HTML type and the icon variant, so the two cannot get
|
|
25
|
+
* out of step. Write them by hand, and it is easy to get a date field that
|
|
26
|
+
* looks like a date field, but where nothing happens when the user presses
|
|
27
|
+
* the icon.
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* <input {...input({ type: "date", state: "invalid" })} />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const input: (({ type, state }?: InputOptions) => InputAttributes) & {
|
|
34
|
+
types: readonly ["text", "password", "email", "number", "date", "datetime-local", "week", "month", "tel", "url", "search", "time"];
|
|
35
|
+
isType: (value: string) => value is "number" | "date" | "search" | "url" | "text" | "password" | "email" | "datetime-local" | "week" | "month" | "tel" | "time";
|
|
36
|
+
states: readonly ["default", "invalid", "success"];
|
|
37
|
+
isState: (value: string) => value is "default" | "invalid" | "success";
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/components/css/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGf,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,WAAW,EAAG,UAAmB,CAAA;AAE9C,eAAO,MAAM,UAAU,6HAab,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnD,uFAAuF;AACvF,QAAA,MAAM,eAAe,6CAA8C,CAAA;AACnE,KAAK,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAA;IACzB,IAAI,EAAE,SAAS,CAAA;IACf,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,sBACuB,YAAY,KAAQ,eAAe;;;;;CAgB3E,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { attributes, createGuard, fieldStates, isFieldState, } from "../shared.js";
|
|
2
|
+
export const INPUT_CLASS = "lt-input";
|
|
3
|
+
export const inputTypes = [
|
|
4
|
+
"text",
|
|
5
|
+
"password",
|
|
6
|
+
"email",
|
|
7
|
+
"number",
|
|
8
|
+
"date",
|
|
9
|
+
"datetime-local",
|
|
10
|
+
"week",
|
|
11
|
+
"month",
|
|
12
|
+
"tel",
|
|
13
|
+
"url",
|
|
14
|
+
"search",
|
|
15
|
+
"time",
|
|
16
|
+
];
|
|
17
|
+
/** The types that get an icon in the field, and that open the browser's own picker. */
|
|
18
|
+
const TYPES_WITH_ICON = ["date", "time", "datetime-local"];
|
|
19
|
+
/**
|
|
20
|
+
* The attributes for a text field.
|
|
21
|
+
*
|
|
22
|
+
* `type` sets both the HTML type and the icon variant, so the two cannot get
|
|
23
|
+
* out of step. Write them by hand, and it is easy to get a date field that
|
|
24
|
+
* looks like a date field, but where nothing happens when the user presses
|
|
25
|
+
* the icon.
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* <input {...input({ type: "date", state: "invalid" })} />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export const input = Object.assign(({ type = "text", state = "default" } = {}) => attributes({
|
|
32
|
+
class: INPUT_CLASS,
|
|
33
|
+
type,
|
|
34
|
+
"data-variant": TYPES_WITH_ICON.includes(type)
|
|
35
|
+
? type
|
|
36
|
+
: undefined,
|
|
37
|
+
"data-state": state === "default" ? undefined : state,
|
|
38
|
+
"aria-invalid": state === "invalid" ? "true" : undefined,
|
|
39
|
+
}), {
|
|
40
|
+
types: inputTypes,
|
|
41
|
+
isType: createGuard(inputTypes),
|
|
42
|
+
states: fieldStates,
|
|
43
|
+
isState: isFieldState,
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../src/components/css/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EAEX,WAAW,EACX,YAAY,GAEb,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAA;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;IACN,UAAU;IACV,OAAO;IACP,QAAQ;IACR,MAAM;IACN,gBAAgB;IAChB,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;IACL,QAAQ;IACR,MAAM;CACE,CAAA;AAIV,uFAAuF;AACvF,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAU,CAAA;AAkBnE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAChC,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,SAAS,KAAmB,EAAE,EAAmB,EAAE,CAC3E,UAAU,CAAC;IACT,KAAK,EAAE,WAAW;IAClB,IAAI;IACJ,cAAc,EAAG,eAAqC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACnE,CAAC,CAAE,IAAqB;QACxB,CAAC,CAAC,SAAS;IACb,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;IACrD,cAAc,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CACpE,CAAC,EACJ;IACE,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC;IAC/B,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;CACtB,CACF,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type RequiredMarker, requiredMarkers } from "../shared.js";
|
|
2
|
+
export declare const LABEL_CLASS: "lt-label";
|
|
3
|
+
export type { RequiredMarker };
|
|
4
|
+
export { requiredMarkers };
|
|
5
|
+
export type LabelOptions = {
|
|
6
|
+
/** Marks the field as required, with an asterisk or with the word "(required)". */
|
|
7
|
+
required?: RequiredMarker;
|
|
8
|
+
/** Marks the field as optional. Choose one of `required` and `optional`. */
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
/** Mutes the text when the control is disabled. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type LabelAttributes = {
|
|
14
|
+
class: typeof LABEL_CLASS;
|
|
15
|
+
"data-required"?: RequiredMarker;
|
|
16
|
+
"data-optional"?: "";
|
|
17
|
+
"aria-disabled"?: "true";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The attributes for a label.
|
|
21
|
+
*
|
|
22
|
+
* The marker is only visual, so set `required` on the field itself as well,
|
|
23
|
+
* or the screen reader is not told that it must be filled in.
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* <label {...label({ required: "symbol" })} htmlFor="email">Email address</label>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const label: (({ required, optional, disabled }?: LabelOptions) => LabelAttributes) & {
|
|
30
|
+
markers: readonly ["symbol", "text"];
|
|
31
|
+
isMarker: (value: string) => value is "symbol" | "text";
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/css/label/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,WAAW,EAAG,UAAmB,CAAA;AAE9C,YAAY,EAAE,cAAc,EAAE,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA;AAE1B,MAAM,MAAM,YAAY,GAAG;IACzB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAA;IACzB,eAAe,CAAC,EAAE,cAAc,CAAA;IAChC,eAAe,CAAC,EAAE,EAAE,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,uCACmB,YAAY,KAAQ,eAAe;;;CAWvE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { attributes, createGuard, requiredMarkers, } from "../shared.js";
|
|
2
|
+
export const LABEL_CLASS = "lt-label";
|
|
3
|
+
export { requiredMarkers };
|
|
4
|
+
/**
|
|
5
|
+
* The attributes for a label.
|
|
6
|
+
*
|
|
7
|
+
* The marker is only visual, so set `required` on the field itself as well,
|
|
8
|
+
* or the screen reader is not told that it must be filled in.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* <label {...label({ required: "symbol" })} htmlFor="email">Email address</label>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export const label = Object.assign(({ required, optional, disabled } = {}) => attributes({
|
|
15
|
+
class: LABEL_CLASS,
|
|
16
|
+
"data-required": required,
|
|
17
|
+
"data-optional": optional && !required ? "" : undefined,
|
|
18
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
19
|
+
}), {
|
|
20
|
+
markers: requiredMarkers,
|
|
21
|
+
isMarker: createGuard(requiredMarkers),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/css/label/label.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EAEX,eAAe,GAChB,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,CAAA;AAkB1B;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAChC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,KAAmB,EAAE,EAAmB,EAAE,CACvE,UAAU,CAAC;IACT,KAAK,EAAE,WAAW;IAClB,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,EAAY,CAAC,CAAC,CAAC,SAAS;IAClE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CAC1D,CAAC,EACJ;IACE,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC;CACvC,CACF,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const LINK_CLASS: "lt-link";
|
|
2
|
+
export type LinkOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* The link cannot be clicked yet. Gives `aria-disabled`, `role="link"` and
|
|
5
|
+
* `tabindex="0"`, so screen readers still find it as a link and can say
|
|
6
|
+
* so. Remove `href` as well: otherwise Enter follows it.
|
|
7
|
+
*/
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type LinkAttributes = {
|
|
11
|
+
class: typeof LINK_CLASS;
|
|
12
|
+
role?: "link";
|
|
13
|
+
tabindex?: "0";
|
|
14
|
+
"aria-disabled"?: "true";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The attributes for a link.
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* <a {...link()} href="/receipt">See receipt</a>
|
|
21
|
+
* <a {...link({ disabled: true })}>See annual statement</a>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* An `<a>` without `href` is no link to a screen reader and is not in the
|
|
25
|
+
* tab order. `role` and `tabindex` give it both back while it is disabled.
|
|
26
|
+
*/
|
|
27
|
+
export declare const link: ({ disabled }?: LinkOptions) => LinkAttributes;
|
|
28
|
+
//# sourceMappingURL=link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/css/link/link.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAG,SAAkB,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,GAAI,eAAsB,WAAgB,KAAG,cAM1D,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { attributes } from "../shared.js";
|
|
2
|
+
export const LINK_CLASS = "lt-link";
|
|
3
|
+
/**
|
|
4
|
+
* The attributes for a link.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* <a {...link()} href="/receipt">See receipt</a>
|
|
8
|
+
* <a {...link({ disabled: true })}>See annual statement</a>
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* An `<a>` without `href` is no link to a screen reader and is not in the
|
|
12
|
+
* tab order. `role` and `tabindex` give it both back while it is disabled.
|
|
13
|
+
*/
|
|
14
|
+
export const link = ({ disabled = false } = {}) => attributes({
|
|
15
|
+
class: LINK_CLASS,
|
|
16
|
+
role: disabled ? "link" : undefined,
|
|
17
|
+
tabindex: disabled ? "0" : undefined,
|
|
18
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../src/components/css/link/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAkB,CAAA;AAkB5C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,KAAkB,EAAE,EAAkB,EAAE,CAC7E,UAAU,CAAC;IACT,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;IAC9C,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAE,GAAa,CAAC,CAAC,CAAC,SAAS;IAC/C,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAC,SAAS;CAC1D,CAAC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const LIST_CLASS: "lt-list";
|
|
2
|
+
export declare const listVariants: readonly ["default", "plain", "divided"];
|
|
3
|
+
export type ListVariant = (typeof listVariants)[number];
|
|
4
|
+
export type NonDefaultListVariant = Exclude<ListVariant, "default">;
|
|
5
|
+
export type ListOptions = {
|
|
6
|
+
/** Bullets, plain rows, or rows with a line between them. Default: `default`. */
|
|
7
|
+
variant?: ListVariant;
|
|
8
|
+
};
|
|
9
|
+
export type ListAttributes = {
|
|
10
|
+
class: typeof LIST_CLASS;
|
|
11
|
+
"data-variant"?: NonDefaultListVariant;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The attributes for a list.
|
|
15
|
+
*
|
|
16
|
+
* The class goes on `<ul>` or `<ol>`. `plain` and `divided` remove the
|
|
17
|
+
* bullets visually, but the list stays a list, so the screen reader still
|
|
18
|
+
* says how many items it has. That is why the variant exists: without it
|
|
19
|
+
* people would use `<div>` to get rid of the bullets. The exception is
|
|
20
|
+
* Safari, where a `<ul>` without visible bullets can need `role="list"`. See
|
|
21
|
+
* the component page.
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* <ul {...list({ variant: "divided" })}>…</ul>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const list: (({ variant }?: ListOptions) => ListAttributes) & {
|
|
28
|
+
variants: readonly ["default", "plain", "divided"];
|
|
29
|
+
isVariant: (value: string) => value is "default" | "plain" | "divided";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/components/css/list/list.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAG,SAAkB,CAAA;AAE5C,eAAO,MAAM,YAAY,0CAA2C,CAAA;AAEpE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;AAEnE,MAAM,MAAM,WAAW,GAAG;IACxB,iFAAiF;IACjF,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAA;IACxB,cAAc,CAAC,EAAE,qBAAqB,CAAA;CACvC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,IAAI,kBACW,WAAW,KAAQ,cAAc;;;CAS5D,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { attributes, createGuard } from "../shared.js";
|
|
2
|
+
export const LIST_CLASS = "lt-list";
|
|
3
|
+
export const listVariants = ["default", "plain", "divided"];
|
|
4
|
+
/**
|
|
5
|
+
* The attributes for a list.
|
|
6
|
+
*
|
|
7
|
+
* The class goes on `<ul>` or `<ol>`. `plain` and `divided` remove the
|
|
8
|
+
* bullets visually, but the list stays a list, so the screen reader still
|
|
9
|
+
* says how many items it has. That is why the variant exists: without it
|
|
10
|
+
* people would use `<div>` to get rid of the bullets. The exception is
|
|
11
|
+
* Safari, where a `<ul>` without visible bullets can need `role="list"`. See
|
|
12
|
+
* the component page.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* <ul {...list({ variant: "divided" })}>…</ul>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export const list = Object.assign(({ variant = "default" } = {}) => attributes({
|
|
19
|
+
class: LIST_CLASS,
|
|
20
|
+
"data-variant": variant === "default" ? undefined : variant,
|
|
21
|
+
}), {
|
|
22
|
+
variants: listVariants,
|
|
23
|
+
isVariant: createGuard(listVariants),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/components/css/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAkB,CAAA;AAE5C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU,CAAA;AAepE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAC/B,CAAC,EAAE,OAAO,GAAG,SAAS,KAAkB,EAAE,EAAkB,EAAE,CAC5D,UAAU,CAAC;IACT,KAAK,EAAE,UAAU;IACjB,cAAc,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;CAC5D,CAAC,EACJ;IACE,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,WAAW,CAAC,YAAY,CAAC;CACrC,CACF,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const PAGINATION_CLASS: "lt-pagination";
|
|
2
|
+
/** The gap in the row of numbers, as in "1 2 … 9 10". */
|
|
3
|
+
export declare const PAGINATION_GAP_CLASS: "lt-pagination__gap";
|
|
4
|
+
export type PaginationAttributes = {
|
|
5
|
+
class: typeof PAGINATION_CLASS;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The attributes for pagination.
|
|
9
|
+
*
|
|
10
|
+
* The class goes on a `<ul>` inside a `<nav aria-label="Pagination">`. Each
|
|
11
|
+
* page is a link with its own address, not a button: the user can then open
|
|
12
|
+
* page three in a new tab, and come back with the back button.
|
|
13
|
+
*
|
|
14
|
+
* The current page is marked with `aria-current="page"`, which both gives
|
|
15
|
+
* the colour and is what the screen reader announces.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* <nav aria-label="Pagination">
|
|
19
|
+
* <ul {...pagination()}>…</ul>
|
|
20
|
+
* </nav>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const pagination: (() => PaginationAttributes) & {
|
|
24
|
+
/** The class on the gap in the row of numbers. */
|
|
25
|
+
gap: "lt-pagination__gap";
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=pagination.d.ts.map
|