@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,132 @@
|
|
|
1
|
+
import { HostElement } from "../../host-element.js";
|
|
2
|
+
import { type PopoverPlacement } from "./popover.js";
|
|
3
|
+
export declare const LT_POPOVER_TAG: "lt-popover";
|
|
4
|
+
/**
|
|
5
|
+
* The parts the popover finds, as selectors relative to the element. The
|
|
6
|
+
* component finds the parts with these, and the manifest describes them for
|
|
7
|
+
* whoever assembles the markup by hand, so the two cannot say different things.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LT_POPOVER_PARTS: {
|
|
10
|
+
readonly trigger: "button, [role='button']";
|
|
11
|
+
readonly panel: "[popover], .lt-popover";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A panel that hangs below a button, and closes itself.
|
|
15
|
+
*
|
|
16
|
+
* The panel uses the browser's own `popover`, so it goes into the top layer
|
|
17
|
+
* and lies above everything else without `z-index`. `lt.popover()` writes
|
|
18
|
+
* `popover="manual"`, so Escape and clicks outside are handled by the
|
|
19
|
+
* component: with `auto` the browser closed the panel before the button got
|
|
20
|
+
* its click, and the button could not be used to close it again. Handwritten
|
|
21
|
+
* markup with a bare `popover` is `auto`, and then the component follows along
|
|
22
|
+
* when the browser closes it.
|
|
23
|
+
*
|
|
24
|
+
* What the top layer does not do is place the panel. `position-anchor` is not
|
|
25
|
+
* yet in every browser, so the position is worked out here.
|
|
26
|
+
*
|
|
27
|
+
* When the markup is made with JavaScript, `lt.popover()` writes the wiring:
|
|
28
|
+
* `aria-controls` on the button, and the class, the id and `popover` on the
|
|
29
|
+
* panel. When the markup comes from a template without JavaScript, the
|
|
30
|
+
* template writes a button and a panel with the class `lt-popover` and an id:
|
|
31
|
+
* the component sets `popover="manual"` and writes `aria-controls` on the
|
|
32
|
+
* button from the id. Only what is missing, so what the server wrote stays.
|
|
33
|
+
* The component sets `open` on the host, `aria-expanded` on the button and the
|
|
34
|
+
* position on the panel, and puts back everything it has written when a patch
|
|
35
|
+
* removes it. The template needs no `data-preserve-attr`.
|
|
36
|
+
*
|
|
37
|
+
* The component never writes an id on the panel. Datastar and idiomorph
|
|
38
|
+
* recognise an element by its id, and a panel with an id the server did not
|
|
39
|
+
* send was replaced on the next patch, along with focus and what the user had
|
|
40
|
+
* done in it. Without an id the panel is kept, but the button cannot be
|
|
41
|
+
* connected to it with `aria-controls`, and the component says so in the
|
|
42
|
+
* console.
|
|
43
|
+
*
|
|
44
|
+
* The repair works one way: if someone has asked for the popover to be open,
|
|
45
|
+
* it stays open through a patch. If the server sends `open`, it opens, since
|
|
46
|
+
* that is something the server actually said.
|
|
47
|
+
*
|
|
48
|
+
* For the server to decide the state, set `server-controlled` on the host.
|
|
49
|
+
* That is also the answer when the page controls `open` with an attribute from
|
|
50
|
+
* outside, as with Datastar's `data-attr:open`: a removed attribute cannot be
|
|
51
|
+
* told apart from a morph, while `menu.open = false` is a message the
|
|
52
|
+
* component can see.
|
|
53
|
+
*
|
|
54
|
+
* ```html
|
|
55
|
+
* <lt-popover placement="bottom-end">
|
|
56
|
+
* <button class="lt-button" aria-controls="menu" aria-expanded="false">Actions</button>
|
|
57
|
+
* <ul id="menu" class="lt-popover" popover="manual">…</ul>
|
|
58
|
+
* </lt-popover>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare class LtPopover extends HostElement {
|
|
62
|
+
static observedAttributes: readonly ["open", "placement", "server-controlled"];
|
|
63
|
+
private panel?;
|
|
64
|
+
private triggerElement?;
|
|
65
|
+
private observer?;
|
|
66
|
+
/**
|
|
67
|
+
* What the component was last asked for, through the `open` property.
|
|
68
|
+
*
|
|
69
|
+
* `open` lives on the host, and a morph removes everything that is not in
|
|
70
|
+
* the server's HTML. Without anything more, every single patch closed a
|
|
71
|
+
* popover the user had just opened.
|
|
72
|
+
*
|
|
73
|
+
* A removed attribute looks the same whoever removed it, so the component
|
|
74
|
+
* cannot tell a morph from an app. The distinction is instead **how** the app
|
|
75
|
+
* says it: if it goes through the property, as in `menu.open = false`,
|
|
76
|
+
* `hide()` or `toggle()`, that is a message, and it is followed. If something
|
|
77
|
+
* sets the attribute directly, as Datastar's `data-attr:open` does, it cannot
|
|
78
|
+
* be told apart from a morph, and then the page should say
|
|
79
|
+
* `server-controlled` and let the server decide the state.
|
|
80
|
+
*/
|
|
81
|
+
private wantsOpen;
|
|
82
|
+
/** Whether the panel is open. Mirrored, so CSS can match the state. */
|
|
83
|
+
get open(): boolean;
|
|
84
|
+
set open(value: boolean);
|
|
85
|
+
/** Which edge the panel hangs from. Default: `bottom-start`. */
|
|
86
|
+
get placement(): PopoverPlacement;
|
|
87
|
+
set placement(value: PopoverPlacement);
|
|
88
|
+
connectedCallback(): void;
|
|
89
|
+
disconnectedCallback(): void;
|
|
90
|
+
attributeChangedCallback(name: string): void;
|
|
91
|
+
private sync;
|
|
92
|
+
/**
|
|
93
|
+
* Says so when a patch replaced the open panel because the id from the
|
|
94
|
+
* server changed.
|
|
95
|
+
*
|
|
96
|
+
* Datastar and idiomorph recognise an element by its id, and a new id is a
|
|
97
|
+
* new element to them. The component opens the new panel again, but focus,
|
|
98
|
+
* and what the user typed in a field in it, are gone. It happens when the
|
|
99
|
+
* template builds the id from something that changes between renders, such
|
|
100
|
+
* as a random number or a counter.
|
|
101
|
+
*
|
|
102
|
+
* The message comes only when the popover was open and both panels had an id
|
|
103
|
+
* from the server, with different values. A panel without an id is kept by
|
|
104
|
+
* the morph, and a server that deliberately sends another panel while the
|
|
105
|
+
* popover is closed has nothing to fix.
|
|
106
|
+
*/
|
|
107
|
+
private warnAboutReplacedPanel;
|
|
108
|
+
/** The panel: the one with `popover`, otherwise the one with the class. */
|
|
109
|
+
private findPanel;
|
|
110
|
+
/**
|
|
111
|
+
* The button: the one pointing to the panel with `aria-controls`, otherwise
|
|
112
|
+
* the first button outside the panel that does not point to anything else. A
|
|
113
|
+
* button with an `aria-controls` pointing elsewhere is not a fallback: then
|
|
114
|
+
* the server has said something else, and that is not to be guessed around.
|
|
115
|
+
*/
|
|
116
|
+
private findTrigger;
|
|
117
|
+
private handleTriggerClick;
|
|
118
|
+
private handlePanelToggle;
|
|
119
|
+
private handleOutsideClick;
|
|
120
|
+
private handleKeydown;
|
|
121
|
+
/** Works out where the panel goes, against the button's place on screen. */
|
|
122
|
+
private reposition;
|
|
123
|
+
private emit;
|
|
124
|
+
/** Opens the panel. */
|
|
125
|
+
show(): void;
|
|
126
|
+
/** Closes the panel. */
|
|
127
|
+
hide(): void;
|
|
128
|
+
/** Opens or closes. */
|
|
129
|
+
toggle(): void;
|
|
130
|
+
}
|
|
131
|
+
export declare function defineLtPopover(tagName?: string): void;
|
|
132
|
+
//# sourceMappingURL=lt-popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt-popover.d.ts","sourceRoot":"","sources":["../../../../src/components/frame/popover/lt-popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAMZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAG,YAAqB,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC,MAAM,CAAC,kBAAkB,sDAAoD;IAE7E,OAAO,CAAC,KAAK,CAAC,CAAa;IAC3B,OAAO,CAAC,cAAc,CAAC,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,CAAkB;IACnC;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,SAAS,CAAQ;IAEzB,uEAAuE;IACvE,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,EAStB;IAED,gEAAgE;IAChE,IAAI,SAAS,IAAI,gBAAgB,CAGhC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAEpC;IAED,iBAAiB,IAAI,IAAI;IAuCzB,oBAAoB,IAAI,IAAI;IAgB5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAU5C,OAAO,CAAC,IAAI;IAqJZ;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,sBAAsB;IAkB9B,2EAA2E;IAC3E,OAAO,CAAC,SAAS;IAIjB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,kBAAkB,CAEzB;IAED,OAAO,CAAC,iBAAiB,CAkBxB;IAED,OAAO,CAAC,kBAAkB,CAOzB;IAED,OAAO,CAAC,aAAa,CA2CpB;IAED,4EAA4E;IAC5E,OAAO,CAAC,UAAU,CA0CjB;IAED,OAAO,CAAC,IAAI;IAUZ,uBAAuB;IACvB,IAAI,IAAI,IAAI;IAMZ,wBAAwB;IACxB,IAAI,IAAI,IAAI;IAMZ,uBAAuB;IACvB,MAAM,IAAI,IAAI;CAIf;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,MAAuB,GAAG,IAAI,CAEtE"}
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { addClass, defineElement, HostElement, isServerControlled, SERVER_CONTROLLED, setAttr, setFlag, warnAboutMarkup, } from "../../host-element.js";
|
|
2
|
+
import { isPopoverPlacement, POPOVER_CLASS, } from "./popover.js";
|
|
3
|
+
export const LT_POPOVER_TAG = "lt-popover";
|
|
4
|
+
/**
|
|
5
|
+
* The parts the popover finds, as selectors relative to the element. The
|
|
6
|
+
* component finds the parts with these, and the manifest describes them for
|
|
7
|
+
* whoever assembles the markup by hand, so the two cannot say different things.
|
|
8
|
+
*/
|
|
9
|
+
export const LT_POPOVER_PARTS = {
|
|
10
|
+
trigger: "button, [role='button']",
|
|
11
|
+
panel: `[popover], .${POPOVER_CLASS}`,
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A panel that hangs below a button, and closes itself.
|
|
15
|
+
*
|
|
16
|
+
* The panel uses the browser's own `popover`, so it goes into the top layer
|
|
17
|
+
* and lies above everything else without `z-index`. `lt.popover()` writes
|
|
18
|
+
* `popover="manual"`, so Escape and clicks outside are handled by the
|
|
19
|
+
* component: with `auto` the browser closed the panel before the button got
|
|
20
|
+
* its click, and the button could not be used to close it again. Handwritten
|
|
21
|
+
* markup with a bare `popover` is `auto`, and then the component follows along
|
|
22
|
+
* when the browser closes it.
|
|
23
|
+
*
|
|
24
|
+
* What the top layer does not do is place the panel. `position-anchor` is not
|
|
25
|
+
* yet in every browser, so the position is worked out here.
|
|
26
|
+
*
|
|
27
|
+
* When the markup is made with JavaScript, `lt.popover()` writes the wiring:
|
|
28
|
+
* `aria-controls` on the button, and the class, the id and `popover` on the
|
|
29
|
+
* panel. When the markup comes from a template without JavaScript, the
|
|
30
|
+
* template writes a button and a panel with the class `lt-popover` and an id:
|
|
31
|
+
* the component sets `popover="manual"` and writes `aria-controls` on the
|
|
32
|
+
* button from the id. Only what is missing, so what the server wrote stays.
|
|
33
|
+
* The component sets `open` on the host, `aria-expanded` on the button and the
|
|
34
|
+
* position on the panel, and puts back everything it has written when a patch
|
|
35
|
+
* removes it. The template needs no `data-preserve-attr`.
|
|
36
|
+
*
|
|
37
|
+
* The component never writes an id on the panel. Datastar and idiomorph
|
|
38
|
+
* recognise an element by its id, and a panel with an id the server did not
|
|
39
|
+
* send was replaced on the next patch, along with focus and what the user had
|
|
40
|
+
* done in it. Without an id the panel is kept, but the button cannot be
|
|
41
|
+
* connected to it with `aria-controls`, and the component says so in the
|
|
42
|
+
* console.
|
|
43
|
+
*
|
|
44
|
+
* The repair works one way: if someone has asked for the popover to be open,
|
|
45
|
+
* it stays open through a patch. If the server sends `open`, it opens, since
|
|
46
|
+
* that is something the server actually said.
|
|
47
|
+
*
|
|
48
|
+
* For the server to decide the state, set `server-controlled` on the host.
|
|
49
|
+
* That is also the answer when the page controls `open` with an attribute from
|
|
50
|
+
* outside, as with Datastar's `data-attr:open`: a removed attribute cannot be
|
|
51
|
+
* told apart from a morph, while `menu.open = false` is a message the
|
|
52
|
+
* component can see.
|
|
53
|
+
*
|
|
54
|
+
* ```html
|
|
55
|
+
* <lt-popover placement="bottom-end">
|
|
56
|
+
* <button class="lt-button" aria-controls="menu" aria-expanded="false">Actions</button>
|
|
57
|
+
* <ul id="menu" class="lt-popover" popover="manual">…</ul>
|
|
58
|
+
* </lt-popover>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export class LtPopover extends HostElement {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments);
|
|
64
|
+
/**
|
|
65
|
+
* What the component was last asked for, through the `open` property.
|
|
66
|
+
*
|
|
67
|
+
* `open` lives on the host, and a morph removes everything that is not in
|
|
68
|
+
* the server's HTML. Without anything more, every single patch closed a
|
|
69
|
+
* popover the user had just opened.
|
|
70
|
+
*
|
|
71
|
+
* A removed attribute looks the same whoever removed it, so the component
|
|
72
|
+
* cannot tell a morph from an app. The distinction is instead **how** the app
|
|
73
|
+
* says it: if it goes through the property, as in `menu.open = false`,
|
|
74
|
+
* `hide()` or `toggle()`, that is a message, and it is followed. If something
|
|
75
|
+
* sets the attribute directly, as Datastar's `data-attr:open` does, it cannot
|
|
76
|
+
* be told apart from a morph, and then the page should say
|
|
77
|
+
* `server-controlled` and let the server decide the state.
|
|
78
|
+
*/
|
|
79
|
+
this.wantsOpen = false;
|
|
80
|
+
this.handleTriggerClick = () => {
|
|
81
|
+
this.toggle();
|
|
82
|
+
};
|
|
83
|
+
this.handlePanelToggle = (event) => {
|
|
84
|
+
const state = event.newState;
|
|
85
|
+
/*
|
|
86
|
+
* The event applies only when it matches the panel. `toggle` is delivered as
|
|
87
|
+
* a separate task, after everything that happened in the same round, and can
|
|
88
|
+
* describe a state that has already changed. A patch that takes `open` on
|
|
89
|
+
* the host and `popover` on the panel in the same morph closes the panel
|
|
90
|
+
* here in `sync()`, reopens it in the microtask afterwards, and only then
|
|
91
|
+
* does "closed" arrive from the close. Before, it was taken as the user's,
|
|
92
|
+
* and the popover the user had open stayed closed after a patch that said
|
|
93
|
+
* nothing about it.
|
|
94
|
+
*
|
|
95
|
+
* The component's own `showPopover()` and `hidePopover()` also fire the
|
|
96
|
+
* event, but then `open` already matches, and nothing happens.
|
|
97
|
+
*/
|
|
98
|
+
const showing = event.currentTarget.matches(":popover-open");
|
|
99
|
+
if (state === "closed" && this.open && !showing)
|
|
100
|
+
this.hide();
|
|
101
|
+
else if (state === "open" && !this.open && showing)
|
|
102
|
+
this.show();
|
|
103
|
+
};
|
|
104
|
+
this.handleOutsideClick = (event) => {
|
|
105
|
+
// `composedPath()` and not `target`: when the component is in a shadow
|
|
106
|
+
// root, `target` is retargeted to the shadow host, and a click in the panel
|
|
107
|
+
// itself looked like a click outside.
|
|
108
|
+
const target = event.composedPath()[0];
|
|
109
|
+
if (this.contains(target) || this.panel?.contains(target))
|
|
110
|
+
return;
|
|
111
|
+
this.hide();
|
|
112
|
+
};
|
|
113
|
+
this.handleKeydown = (event) => {
|
|
114
|
+
if (event.key !== "Escape" || !this.open)
|
|
115
|
+
return;
|
|
116
|
+
// Something else has already used the key press, such as a suggestion list
|
|
117
|
+
// that closed. Without this one press closed both the list and the popover.
|
|
118
|
+
if (event.defaultPrevented)
|
|
119
|
+
return;
|
|
120
|
+
// `composedPath()` and not `contains`: a field in a shadow root in the
|
|
121
|
+
// panel is not in the tree `contains` sees, and a press there closed nothing.
|
|
122
|
+
const path = event.composedPath();
|
|
123
|
+
for (const node of path) {
|
|
124
|
+
if (node === this)
|
|
125
|
+
break;
|
|
126
|
+
// An open popover inside this one is closer. It takes the press, and this
|
|
127
|
+
// one closes on the next. The listeners are both on `document`, and the
|
|
128
|
+
// outer one came first: before, it closed and left the inner one open.
|
|
129
|
+
if (node instanceof LtPopover && node.open)
|
|
130
|
+
return;
|
|
131
|
+
// A modal dialog opened on top of the popover is closed by its own press.
|
|
132
|
+
if (node instanceof HTMLDialogElement &&
|
|
133
|
+
node.matches(":modal") &&
|
|
134
|
+
!node.contains(this)) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/*
|
|
139
|
+
* Focus is moved back only when it was in the popover, or nowhere else: on
|
|
140
|
+
* `body`, or on a dialog or a `<main tabindex="-1">` the popover is in. A
|
|
141
|
+
* mouse click does not give the button focus in Safari, and inside a modal
|
|
142
|
+
* dialog the dialog gets the focus. If focus was in another field, it stays
|
|
143
|
+
* there. Before, it jumped to the button.
|
|
144
|
+
*/
|
|
145
|
+
const target = path[0];
|
|
146
|
+
const fromWindow = path.includes(this) || (target instanceof Node && target.contains(this));
|
|
147
|
+
// Used here. Without this it also closed a modal dialog the popover was
|
|
148
|
+
// in: one press took both, and the user lost the dialog.
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
this.hide();
|
|
151
|
+
// Without this focus is on a panel that no longer exists, and the next
|
|
152
|
+
// key press starts at the top of the page.
|
|
153
|
+
if (fromWindow)
|
|
154
|
+
this.triggerElement?.focus();
|
|
155
|
+
};
|
|
156
|
+
/** Works out where the panel goes, against the button's place on screen. */
|
|
157
|
+
this.reposition = () => {
|
|
158
|
+
if (!this.open || !this.panel || !this.triggerElement)
|
|
159
|
+
return;
|
|
160
|
+
const anchor = this.triggerElement.getBoundingClientRect();
|
|
161
|
+
const panel = this.panel.getBoundingClientRect();
|
|
162
|
+
const space = 4;
|
|
163
|
+
const below = this.placement.startsWith("bottom");
|
|
164
|
+
// `start` and `end` follow the reading direction: in a right-to-left
|
|
165
|
+
// document `start` is the button's right edge. Without this the panel was on
|
|
166
|
+
// the wrong side of the button in RTL. `:dir(rtl)` and not `direction` from
|
|
167
|
+
// `getComputedStyle`: the stylesheet flips the value with `:dir(rtl)`, so
|
|
168
|
+
// both read the HTML direction from `dir`. A page that sets
|
|
169
|
+
// `direction: rtl` in CSS without `dir` is not flipped, neither here nor in
|
|
170
|
+
// the stylesheet, as with the background icons.
|
|
171
|
+
const rtl = this.panel.matches(":dir(rtl)");
|
|
172
|
+
const alignRight = this.placement.endsWith("end") !== rtl;
|
|
173
|
+
let top = below ? anchor.bottom + space : anchor.top - panel.height - space;
|
|
174
|
+
let left = alignRight ? anchor.right - panel.width : anchor.left;
|
|
175
|
+
// The panel must not end up off screen. If it goes out at the side, it is
|
|
176
|
+
// moved in. If there is no room on the side of the button the placement asks
|
|
177
|
+
// for, it goes on the other side, and is then clamped into the viewport
|
|
178
|
+
// either way. `top-*` lacked the last part, and a panel at the top of the
|
|
179
|
+
// page lay entirely off screen, with no way to scroll it into view.
|
|
180
|
+
left = Math.max(space, Math.min(left, window.innerWidth - panel.width - space));
|
|
181
|
+
if (below && top + panel.height > window.innerHeight) {
|
|
182
|
+
top = anchor.top - panel.height - space;
|
|
183
|
+
}
|
|
184
|
+
else if (!below && top < space) {
|
|
185
|
+
top = anchor.bottom + space;
|
|
186
|
+
}
|
|
187
|
+
top = Math.max(space, Math.min(top, window.innerHeight - panel.height - space));
|
|
188
|
+
this.panel.style.setProperty("--lt-popover-top", `${Math.round(top)}px`);
|
|
189
|
+
this.panel.style.setProperty("--lt-popover-left", `${Math.round(left)}px`);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/** Whether the panel is open. Mirrored, so CSS can match the state. */
|
|
193
|
+
get open() {
|
|
194
|
+
return this.hasAttribute("open");
|
|
195
|
+
}
|
|
196
|
+
set open(value) {
|
|
197
|
+
// The message is noted here, and not in `show()` and `hide()`. Both go
|
|
198
|
+
// through the setter, but so does `menu.open = false` from an app, and
|
|
199
|
+
// without this the component set the attribute straight back again.
|
|
200
|
+
//
|
|
201
|
+
// No memory when the server decides the state. Without that guard the
|
|
202
|
+
// popover popped open by itself the moment `server-controlled` was removed.
|
|
203
|
+
this.wantsOpen = isServerControlled(this) ? false : value;
|
|
204
|
+
setFlag(this, "open", value);
|
|
205
|
+
}
|
|
206
|
+
/** Which edge the panel hangs from. Default: `bottom-start`. */
|
|
207
|
+
get placement() {
|
|
208
|
+
const value = this.getAttribute("placement");
|
|
209
|
+
return isPopoverPlacement(value) ? value : "bottom-start";
|
|
210
|
+
}
|
|
211
|
+
set placement(value) {
|
|
212
|
+
setAttr(this, "placement", value);
|
|
213
|
+
}
|
|
214
|
+
connectedCallback() {
|
|
215
|
+
window.addEventListener("resize", this.reposition);
|
|
216
|
+
window.addEventListener("scroll", this.reposition, true);
|
|
217
|
+
/*
|
|
218
|
+
* The attributes are included, not only the children. `aria-expanded` on the
|
|
219
|
+
* button and the position on the panel are something the component works
|
|
220
|
+
* out, so if a patch removes them, they must come back. Every write in
|
|
221
|
+
* `sync()` compares first, or the observer would trigger itself.
|
|
222
|
+
*/
|
|
223
|
+
this.observer = new MutationObserver((records) => {
|
|
224
|
+
// `type` concerns only the button. A password field in the panel that
|
|
225
|
+
// switches between `password` and `text` must not run all of `sync()`.
|
|
226
|
+
const onlyOtherTypes = records.every((record) => record.attributeName === "type" &&
|
|
227
|
+
record.target !== this.triggerElement);
|
|
228
|
+
if (!onlyOtherTypes)
|
|
229
|
+
this.sync();
|
|
230
|
+
});
|
|
231
|
+
this.observer.observe(this, {
|
|
232
|
+
childList: true,
|
|
233
|
+
subtree: true,
|
|
234
|
+
attributes: true,
|
|
235
|
+
attributeFilter: [
|
|
236
|
+
"aria-expanded",
|
|
237
|
+
"style",
|
|
238
|
+
// The wiring the component fills in when the markup came without it.
|
|
239
|
+
"popover",
|
|
240
|
+
"id",
|
|
241
|
+
"aria-controls",
|
|
242
|
+
"class",
|
|
243
|
+
// A patch from a template without `type` removes it, and then the
|
|
244
|
+
// button submits the form again.
|
|
245
|
+
"type",
|
|
246
|
+
],
|
|
247
|
+
});
|
|
248
|
+
this.sync();
|
|
249
|
+
}
|
|
250
|
+
disconnectedCallback() {
|
|
251
|
+
window.removeEventListener("resize", this.reposition);
|
|
252
|
+
window.removeEventListener("scroll", this.reposition, true);
|
|
253
|
+
document.removeEventListener("click", this.handleOutsideClick, true);
|
|
254
|
+
document.removeEventListener("keydown", this.handleKeydown);
|
|
255
|
+
this.observer?.disconnect();
|
|
256
|
+
this.observer = undefined;
|
|
257
|
+
this.triggerElement?.removeEventListener("click", this.handleTriggerClick);
|
|
258
|
+
this.panel?.removeEventListener("toggle", this.handlePanelToggle);
|
|
259
|
+
// The reference must be reset, or `sync()` sees that the button is the
|
|
260
|
+
// same when the element is inserted again, and skips attaching the listener
|
|
261
|
+
// again. Then the panel can no longer be opened.
|
|
262
|
+
this.triggerElement = undefined;
|
|
263
|
+
this.panel = undefined;
|
|
264
|
+
}
|
|
265
|
+
attributeChangedCallback(name) {
|
|
266
|
+
// `server-controlled` turned on midway: the component lets go, and the
|
|
267
|
+
// next patch decides.
|
|
268
|
+
if (name === SERVER_CONTROLLED && isServerControlled(this)) {
|
|
269
|
+
this.wantsOpen = false;
|
|
270
|
+
}
|
|
271
|
+
if (this.isConnected)
|
|
272
|
+
this.sync();
|
|
273
|
+
}
|
|
274
|
+
sync() {
|
|
275
|
+
/*
|
|
276
|
+
* Puts `open` back when a patch took it.
|
|
277
|
+
*
|
|
278
|
+
* One way only: if `open` is there, the popover is open, and then either the
|
|
279
|
+
* user or the server has said so. If it is gone while the user opened it, the
|
|
280
|
+
* morph took it, and then it comes back.
|
|
281
|
+
*/
|
|
282
|
+
if (this.wantsOpen && !this.open && !isServerControlled(this)) {
|
|
283
|
+
/*
|
|
284
|
+
* Wait until the whole patch has landed before opening the popover again.
|
|
285
|
+
*
|
|
286
|
+
* A morph sets one attribute at a time, and `open` comes before
|
|
287
|
+
* `server-controlled` in document order. When the component repaired at
|
|
288
|
+
* once, it put `open` back while the server was in the middle of saying it
|
|
289
|
+
* was taking over the state, and the popover stayed open afterwards.
|
|
290
|
+
* `queueMicrotask` runs after the whole patch is done, and the condition is
|
|
291
|
+
* checked again there.
|
|
292
|
+
*/
|
|
293
|
+
queueMicrotask(() => {
|
|
294
|
+
if (!this.isConnected || isServerControlled(this))
|
|
295
|
+
return;
|
|
296
|
+
if (this.wantsOpen && !this.open)
|
|
297
|
+
setFlag(this, "open", true);
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
// The parts are recognised by the wiring that must be there anyway: the
|
|
301
|
+
// panel is the one with `popover`, and the button is the one pointing to the
|
|
302
|
+
// panel with `aria-controls`. Before, the button had `slot="trigger"`, a
|
|
303
|
+
// leftover from the time the component had shadow DOM. Without a shadow
|
|
304
|
+
// root `slot` does nothing in HTML, so the attribute was a label that looked
|
|
305
|
+
// like something it was not.
|
|
306
|
+
const panel = this.findPanel();
|
|
307
|
+
if (panel) {
|
|
308
|
+
// Only what is missing. A template may have written `popover` without a
|
|
309
|
+
// value, and that is `auto`; then the component follows along when the
|
|
310
|
+
// browser closes it.
|
|
311
|
+
addClass(panel, POPOVER_CLASS);
|
|
312
|
+
if (!panel.hasAttribute("popover"))
|
|
313
|
+
setAttr(panel, "popover", "manual");
|
|
314
|
+
// Never an id on the panel: see the comment at the top. Without an id there
|
|
315
|
+
// is nothing for `aria-controls` to point to.
|
|
316
|
+
warnAboutMarkup(this, "the panel has no id, so the button cannot be connected to it " +
|
|
317
|
+
"with aria-controls. Write an id on the panel in the template, " +
|
|
318
|
+
'such as id="menu", and the same value in aria-controls on the ' +
|
|
319
|
+
"button.", () => {
|
|
320
|
+
const found = this.findPanel();
|
|
321
|
+
return found !== null && !found.id;
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
const trigger = panel ? this.findTrigger(panel) : null;
|
|
325
|
+
if (panel?.id && trigger && !trigger.hasAttribute("aria-controls")) {
|
|
326
|
+
setAttr(trigger, "aria-controls", panel.id);
|
|
327
|
+
}
|
|
328
|
+
// A `<button>` without `type` is a submit button, and so is one with an
|
|
329
|
+
// empty or unknown `type`, which a template can write. A help popover next
|
|
330
|
+
// to a field sits inside the form, and a click to open it submitted the
|
|
331
|
+
// form, or brought up the error summary, instead of showing the panel. A
|
|
332
|
+
// button that says `submit` itself is left alone.
|
|
333
|
+
if (trigger instanceof HTMLButtonElement &&
|
|
334
|
+
trigger.type === "submit" &&
|
|
335
|
+
trigger.getAttribute("type")?.toLowerCase() !== "submit") {
|
|
336
|
+
setAttr(trigger, "type", "button");
|
|
337
|
+
}
|
|
338
|
+
if (!trigger || !panel) {
|
|
339
|
+
/*
|
|
340
|
+
* Two different faults, and a message for each, so the developer looks in
|
|
341
|
+
* the right place. An empty element is a region the server has not filled
|
|
342
|
+
* yet, and that is not a fault in the markup.
|
|
343
|
+
*/
|
|
344
|
+
const isEmpty = () => this.childElementCount === 0;
|
|
345
|
+
if (!panel) {
|
|
346
|
+
warnAboutMarkup(this, "found no panel: an element with popover or the class " +
|
|
347
|
+
"lt-popover. Without one there is nothing to open or position.", () => !isEmpty() && this.findPanel() === null);
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
warnAboutMarkup(this, "found no button: neither one with aria-controls pointing to " +
|
|
351
|
+
"the panel nor a <button> outside the panel. Without it the " +
|
|
352
|
+
"component does not know what opens the popover.", () => {
|
|
353
|
+
const found = this.findPanel();
|
|
354
|
+
return !isEmpty() && found !== null && !this.findTrigger(found);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/*
|
|
358
|
+
* Let go of what we had. When a patch removed the panel, the component
|
|
359
|
+
* otherwise held on to a detached node, and `reposition()` kept working out
|
|
360
|
+
* the position of something that is not on the page.
|
|
361
|
+
*
|
|
362
|
+
* The listeners on `document` must go too. Without that they stayed in the
|
|
363
|
+
* capture phase for as long as the markup was broken, and a click anywhere
|
|
364
|
+
* on the page gave the app a `popover-toggle` it had not asked for.
|
|
365
|
+
*/
|
|
366
|
+
this.triggerElement?.removeEventListener("click", this.handleTriggerClick);
|
|
367
|
+
this.triggerElement = undefined;
|
|
368
|
+
this.panel?.removeEventListener("toggle", this.handlePanelToggle);
|
|
369
|
+
this.panel = undefined;
|
|
370
|
+
document.removeEventListener("click", this.handleOutsideClick, true);
|
|
371
|
+
document.removeEventListener("keydown", this.handleKeydown);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (this.triggerElement !== trigger) {
|
|
375
|
+
this.triggerElement?.removeEventListener("click", this.handleTriggerClick);
|
|
376
|
+
trigger.addEventListener("click", this.handleTriggerClick);
|
|
377
|
+
this.triggerElement = trigger;
|
|
378
|
+
}
|
|
379
|
+
if (this.panel !== panel) {
|
|
380
|
+
if (this.panel)
|
|
381
|
+
this.warnAboutReplacedPanel(this.panel, panel);
|
|
382
|
+
/*
|
|
383
|
+
* The state is in the markup as `:popover-open`, and is read from there.
|
|
384
|
+
* When the browser closes a `popover="auto"` itself, because another one
|
|
385
|
+
* opens or the user clicks outside, `toggle` reports it. Without the
|
|
386
|
+
* listener the host kept `open` and the button `aria-expanded="true"` over a
|
|
387
|
+
* closed panel, and the next click did nothing visible.
|
|
388
|
+
*/
|
|
389
|
+
this.panel?.removeEventListener("toggle", this.handlePanelToggle);
|
|
390
|
+
panel.addEventListener("toggle", this.handlePanelToggle);
|
|
391
|
+
this.panel = panel;
|
|
392
|
+
}
|
|
393
|
+
// Written by the component, and set again if a patch took it.
|
|
394
|
+
setAttr(trigger, "aria-expanded", String(this.open));
|
|
395
|
+
if (this.open) {
|
|
396
|
+
if (!panel.matches(":popover-open"))
|
|
397
|
+
panel.showPopover();
|
|
398
|
+
this.reposition();
|
|
399
|
+
document.addEventListener("click", this.handleOutsideClick, true);
|
|
400
|
+
document.addEventListener("keydown", this.handleKeydown);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
if (panel.matches(":popover-open"))
|
|
404
|
+
panel.hidePopover();
|
|
405
|
+
document.removeEventListener("click", this.handleOutsideClick, true);
|
|
406
|
+
document.removeEventListener("keydown", this.handleKeydown);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Says so when a patch replaced the open panel because the id from the
|
|
411
|
+
* server changed.
|
|
412
|
+
*
|
|
413
|
+
* Datastar and idiomorph recognise an element by its id, and a new id is a
|
|
414
|
+
* new element to them. The component opens the new panel again, but focus,
|
|
415
|
+
* and what the user typed in a field in it, are gone. It happens when the
|
|
416
|
+
* template builds the id from something that changes between renders, such
|
|
417
|
+
* as a random number or a counter.
|
|
418
|
+
*
|
|
419
|
+
* The message comes only when the popover was open and both panels had an id
|
|
420
|
+
* from the server, with different values. A panel without an id is kept by
|
|
421
|
+
* the morph, and a server that deliberately sends another panel while the
|
|
422
|
+
* popover is closed has nothing to fix.
|
|
423
|
+
*/
|
|
424
|
+
warnAboutReplacedPanel(lost, panel) {
|
|
425
|
+
if (lost.isConnected || !this.wantsOpen)
|
|
426
|
+
return;
|
|
427
|
+
if (!lost.id || !panel.id || lost.id === panel.id)
|
|
428
|
+
return;
|
|
429
|
+
warnAboutMarkup(this, "a server update replaced the panel while it was open, because " +
|
|
430
|
+
"the panel's id was different from last time and the update did " +
|
|
431
|
+
"not recognise it. The panel is opened again, but focus and " +
|
|
432
|
+
"what the user did in it are lost; build the id from something " +
|
|
433
|
+
"that is the same every time, not from a random number or a " +
|
|
434
|
+
"counter.",
|
|
435
|
+
// The replacement has happened and cannot undo itself, unless a new
|
|
436
|
+
// update has already replaced the panel again.
|
|
437
|
+
() => !lost.isConnected && this.findPanel() === panel);
|
|
438
|
+
}
|
|
439
|
+
/** The panel: the one with `popover`, otherwise the one with the class. */
|
|
440
|
+
findPanel() {
|
|
441
|
+
return this.querySelector(LT_POPOVER_PARTS.panel);
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* The button: the one pointing to the panel with `aria-controls`, otherwise
|
|
445
|
+
* the first button outside the panel that does not point to anything else. A
|
|
446
|
+
* button with an `aria-controls` pointing elsewhere is not a fallback: then
|
|
447
|
+
* the server has said something else, and that is not to be guessed around.
|
|
448
|
+
*/
|
|
449
|
+
findTrigger(panel) {
|
|
450
|
+
if (panel.id) {
|
|
451
|
+
const pointing = this.querySelector(`[aria-controls="${CSS.escape(panel.id)}"]`);
|
|
452
|
+
if (pointing)
|
|
453
|
+
return pointing;
|
|
454
|
+
}
|
|
455
|
+
return ([...this.querySelectorAll(LT_POPOVER_PARTS.trigger)].find((button) => !panel.contains(button) && !button.hasAttribute("aria-controls")) ?? null);
|
|
456
|
+
}
|
|
457
|
+
emit(open) {
|
|
458
|
+
this.dispatchEvent(new CustomEvent("popover-toggle", {
|
|
459
|
+
detail: { open },
|
|
460
|
+
bubbles: true,
|
|
461
|
+
composed: true,
|
|
462
|
+
}));
|
|
463
|
+
}
|
|
464
|
+
/** Opens the panel. */
|
|
465
|
+
show() {
|
|
466
|
+
if (this.open)
|
|
467
|
+
return;
|
|
468
|
+
this.open = true;
|
|
469
|
+
this.emit(true);
|
|
470
|
+
}
|
|
471
|
+
/** Closes the panel. */
|
|
472
|
+
hide() {
|
|
473
|
+
if (!this.open)
|
|
474
|
+
return;
|
|
475
|
+
this.open = false;
|
|
476
|
+
this.emit(false);
|
|
477
|
+
}
|
|
478
|
+
/** Opens or closes. */
|
|
479
|
+
toggle() {
|
|
480
|
+
if (this.open)
|
|
481
|
+
this.hide();
|
|
482
|
+
else
|
|
483
|
+
this.show();
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
LtPopover.observedAttributes = ["open", "placement", SERVER_CONTROLLED];
|
|
487
|
+
export function defineLtPopover(tagName = LT_POPOVER_TAG) {
|
|
488
|
+
defineElement(tagName, LtPopover);
|
|
489
|
+
}
|
|
490
|
+
//# sourceMappingURL=lt-popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt-popover.js","sourceRoot":"","sources":["../../../../src/components/frame/popover/lt-popover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW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