@aceshooting/lyra-ui 32.0.0 → 33.0.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 +224 -1380
- package/README.md +36 -7
- package/custom-elements.slim.json +1 -0
- package/design-tokens.json +1 -1
- package/dist/accent-roles.css +1 -0
- package/dist/all.d.ts +1 -1
- package/dist/all.js +1 -1
- package/dist/autoloader.d.ts +10 -0
- package/dist/autoloader.js +1 -1
- package/dist/cli/migrate-wa.mjs +54 -44
- package/dist/cli/migration-contract.json.gz +0 -0
- package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +1 -0
- package/dist/components/agent-tools/budget-meter/budget-meter.styles.js +1 -1
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +1 -1
- package/dist/components/charts/chart/box-plot.class.d.ts +3 -0
- package/dist/components/charts/chart/chart-band.js +1 -1
- package/dist/components/charts/chart/chart-input-projection.js +1 -1
- package/dist/components/charts/chart/chart-surface.styles.js +1 -1
- package/dist/components/charts/chart/chart-types.d.ts +16 -2
- package/dist/components/charts/chart/chart.class.d.ts +4 -1
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/charts/chart/lite-chart.class.d.ts +3 -0
- package/dist/components/charts/chart/lite-chart.styles.js +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +10 -0
- package/dist/components/conversation/code-block/code-block-base.class.d.ts +31 -3
- package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.d.ts +46 -2
- package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.d.ts +6 -2
- package/dist/components/conversation/code-block/code-block-shared.js +5 -4
- package/dist/components/conversation/code-block/code-block.class.d.ts +48 -3
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/code-block/code-block.styles.js +1 -1
- package/dist/components/conversation/code-block/code-grammar-registry.d.ts +35 -0
- package/dist/components/conversation/code-block/code-grammar-registry.js +1 -0
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +12 -0
- package/dist/components/conversation/markdown/markdown.class.d.ts +12 -0
- package/dist/components/conversation/markdown/markdown.styles.js +1 -1
- package/dist/components/conversation/model-select/model-select.class.d.ts +12 -5
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +1 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +3 -0
- package/dist/components/conversation/thread-list/thread-list.styles.js +1 -1
- package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +1 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +12 -5
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +4 -0
- package/dist/components/data/heatmap/heatmap.class.d.ts +21 -2
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.styles.js +1 -1
- package/dist/components/data/stat/stat.class.d.ts +24 -1
- package/dist/components/data/stat/stat.class.js +2 -2
- package/dist/components/data/stat/stat.styles.js +1 -1
- package/dist/components/data/table/table-row-attributes.js +1 -0
- package/dist/components/data/table/table-support.d.ts +64 -5
- package/dist/components/data/table/table-support.js +1 -1
- package/dist/components/data/table/table.class.d.ts +78 -7
- package/dist/components/data/table/table.class.js +10 -10
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +27 -5
- package/dist/components/data/timeline/timeline-item.class.js +11 -7
- package/dist/components/data/timeline/timeline-item.styles.js +1 -1
- package/dist/components/data/timeline/timeline.class.d.ts +54 -8
- package/dist/components/data/timeline/timeline.class.js +11 -7
- package/dist/components/data/timeline/timeline.styles.js +1 -1
- package/dist/components/data/tree/tree-item.class.d.ts +2 -0
- package/dist/components/data/tree/tree-item.class.js +2 -2
- package/dist/components/data/tree/tree-item.styles.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +13 -0
- package/dist/components/forms/button/button.styles.js +1 -1
- package/dist/components/forms/catalog-picker-base.d.ts +14 -1
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +28 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +3 -3
- package/dist/components/forms/checkbox-group/checkbox-group.styles.js +1 -1
- package/dist/components/forms/code-editor/code-editor.class.d.ts +18 -3
- package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
- package/dist/components/forms/color-picker/color-picker.class.d.ts +25 -5
- package/dist/components/forms/color-picker/color-picker.class.js +3 -3
- package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
- package/dist/components/forms/combobox/combobox-option-html.js +1 -0
- package/dist/components/forms/combobox/combobox.class.d.ts +140 -12
- package/dist/components/forms/combobox/combobox.class.js +113 -22
- package/dist/components/forms/combobox/combobox.styles.js +1 -1
- package/dist/components/forms/country-picker/country-picker.class.d.ts +4 -3
- package/dist/components/forms/currency-picker/currency-picker.class.d.ts +4 -3
- package/dist/components/forms/date-picker/date-input.class.d.ts +53 -3
- package/dist/components/forms/date-picker/date-input.class.js +2 -2
- package/dist/components/forms/date-picker/date-input.styles.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +14 -0
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +2 -1
- package/dist/components/forms/icon-button/icon-button.styles.js +1 -1
- package/dist/components/forms/input/input-shared.d.ts +24 -3
- package/dist/components/forms/input/input.styles.js +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +19 -4
- package/dist/components/forms/input/time-input.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +17 -5
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
- package/dist/components/forms/otp-input/otp-input.class.d.ts +8 -3
- package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
- package/dist/components/forms/phone-input/phone-input.class.d.ts +18 -3
- package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
- package/dist/components/forms/radio/radio-group.class.d.ts +23 -2
- package/dist/components/forms/radio/radio-group.class.js +2 -2
- package/dist/components/forms/radio/radio-group.styles.js +1 -1
- package/dist/components/forms/radio/radio.class.js +2 -2
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts +4 -0
- package/dist/components/forms/select/select.class.d.ts +16 -4
- package/dist/components/forms/select/select.class.js +1 -1
- package/dist/components/forms/select/select.styles.js +1 -1
- package/dist/components/forms/signature-pad/signature-pad.class.d.ts +8 -3
- package/dist/components/forms/signature-pad/signature-pad.styles.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +29 -2
- package/dist/components/forms/slider/slider.class.js +3 -3
- package/dist/components/forms/slider/slider.styles.js +1 -1
- package/dist/components/forms/switch/switch.class.d.ts +2 -0
- package/dist/components/forms/switch/switch.styles.js +1 -1
- package/dist/components/forms/textarea/textarea.class.d.ts +20 -3
- package/dist/components/forms/textarea/textarea.styles.js +1 -1
- package/dist/components/forms/time-zone-picker/time-zone-picker.class.d.ts +4 -3
- package/dist/components/forms/token-input/token-input.class.d.ts +99 -21
- package/dist/components/forms/token-input/token-input.class.js +11 -8
- package/dist/components/forms/token-input/token-input.styles.js +1 -1
- package/dist/components/forms/unit-picker/unit-picker.class.d.ts +4 -3
- package/dist/components/layout/app-rail/app-rail.class.d.ts +3 -0
- package/dist/components/layout/app-rail/app-rail.styles.js +1 -1
- package/dist/components/layout/button-group/button-group.class.d.ts +4 -0
- package/dist/components/layout/button-group/button-group.class.js +1 -1
- package/dist/components/layout/card/card.class.d.ts +15 -1
- package/dist/components/layout/card/card.styles.js +1 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +1 -1
- package/dist/components/layout/details/details.class.d.ts +6 -0
- package/dist/components/layout/details/details.styles.js +1 -1
- package/dist/components/layout/filter-bar/filter-bar.class.d.ts +6 -0
- package/dist/components/layout/filter-bar/filter-bar.styles.js +1 -1
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/layout/menu/dropdown-item.class.d.ts +8 -2
- package/dist/components/layout/menu/dropdown-item.class.js +1 -1
- package/dist/components/layout/menu/menu-item.class.d.ts +7 -0
- package/dist/components/layout/menu/menu-item.styles.js +1 -1
- package/dist/components/layout/menu/menu-label.class.d.ts +5 -0
- package/dist/components/layout/menu/menu-label.class.js +1 -1
- package/dist/components/layout/menu/menu.class.d.ts +4 -1
- package/dist/components/layout/menu/menu.styles.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.d.ts +1 -1
- package/dist/components/layout/page/page.class.d.ts +9 -1
- package/dist/components/layout/page/page.class.js +2 -2
- package/dist/components/layout/segmented/segmented.class.d.ts +22 -3
- package/dist/components/layout/segmented/segmented.class.js +3 -4
- package/dist/components/layout/segmented/segmented.styles.js +1 -1
- package/dist/components/layout/stepper/step.class.d.ts +102 -0
- package/dist/components/layout/stepper/step.class.js +18 -0
- package/dist/components/layout/stepper/step.styles.js +1 -0
- package/dist/components/layout/stepper/stepper.class.d.ts +106 -13
- package/dist/components/layout/stepper/stepper.class.js +6 -2
- package/dist/components/layout/stepper/stepper.styles.js +1 -1
- package/dist/components/layout/tab-group/tab-group.class.d.ts +10 -1
- package/dist/components/layout/tab-group/tab-group.class.js +1 -1
- package/dist/components/layout/tab-group/tab-group.styles.js +1 -1
- package/dist/components/layout/tab-group/tab-panel.class.d.ts +1 -0
- package/dist/components/layout/tab-group/tab-panel.class.js +1 -1
- package/dist/components/layout/tab-group/tab.class.d.ts +4 -0
- package/dist/components/layout/widget/widget.class.d.ts +1 -0
- package/dist/components/layout/widget/widget.styles.js +1 -1
- package/dist/components/lr-code-block-core.d.ts +1 -1
- package/dist/components/lr-code-block.d.ts +1 -1
- package/dist/components/lr-counter.d.ts +1 -0
- package/dist/components/lr-counter.js +1 -0
- package/dist/components/lr-lightbox-item.d.ts +1 -0
- package/dist/components/lr-lightbox-item.js +1 -0
- package/dist/components/lr-lightbox.d.ts +1 -1
- package/dist/components/lr-lightbox.js +1 -1
- package/dist/components/lr-number-ticker.d.ts +1 -0
- package/dist/components/lr-number-ticker.js +1 -0
- package/dist/components/lr-step.d.ts +1 -0
- package/dist/components/lr-step.js +1 -0
- package/dist/components/media/file-input/file-input.class.d.ts +8 -1
- package/dist/components/media/file-input/file-input.class.js +2 -2
- package/dist/components/media/file-input/file-input.styles.js +1 -1
- package/dist/components/media/index.d.ts +1 -1
- package/dist/components/media/index.js +1 -1
- package/dist/components/media/lightbox/lightbox-item.class.d.ts +67 -0
- package/dist/components/media/lightbox/lightbox-item.class.js +9 -0
- package/dist/components/media/lightbox/lightbox-item.styles.js +1 -0
- package/dist/components/media/lightbox/lightbox-source.js +1 -1
- package/dist/components/media/lightbox/lightbox-types.d.ts +4 -1
- package/dist/components/media/lightbox/lightbox.class.d.ts +123 -30
- package/dist/components/media/lightbox/lightbox.class.js +18 -12
- package/dist/components/media/lightbox/lightbox.styles.js +1 -1
- package/dist/components/media/map/map-anchor-avoid.js +1 -1
- package/dist/components/media/map/map-drawing-controller.js +1 -1
- package/dist/components/media/map/map.class.d.ts +137 -7
- package/dist/components/media/map/map.class.js +6 -6
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +9 -0
- package/dist/components/media/sequence-playback/sequence-playback.class.js +2 -2
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
- package/dist/components/media/video/video.class.d.ts +4 -0
- package/dist/components/media/video/video.class.js +2 -2
- package/dist/components/media/video/video.styles.js +1 -1
- package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +15 -0
- package/dist/components/media/zoomable-frame/zoomable-frame.class.js +2 -2
- package/dist/components/overlays/badge/badge.class.d.ts +2 -0
- package/dist/components/overlays/badge/badge.styles.js +1 -1
- package/dist/components/overlays/badge/tag.class.d.ts +2 -0
- package/dist/components/overlays/badge/tag.class.js +1 -1
- package/dist/components/overlays/chip/chip-group.class.d.ts +31 -4
- package/dist/components/overlays/chip/chip-group.class.js +3 -3
- package/dist/components/overlays/context-menu/context-menu.class.d.ts +6 -1
- package/dist/components/overlays/context-menu/context-menu.class.js +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +54 -6
- package/dist/components/overlays/dialog/dialog.class.js +3 -3
- package/dist/components/overlays/dialog/dialog.styles.js +1 -1
- package/dist/components/overlays/dialog/prompt.d.ts +60 -0
- package/dist/components/overlays/dialog/prompt.js +1 -0
- package/dist/components/overlays/drawer/drawer.class.d.ts +22 -1
- package/dist/components/overlays/drawer/drawer.class.js +1 -1
- package/dist/components/overlays/empty/empty.class.d.ts +1 -0
- package/dist/components/overlays/empty/empty.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.d.ts +5 -1
- package/dist/components/overlays/overlay/dropdown.class.js +1 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/overlays/overlay/popover.class.d.ts +30 -4
- package/dist/components/overlays/overlay/popover.class.js +2 -2
- package/dist/components/overlays/overlay/tooltip.class.d.ts +7 -0
- package/dist/components/overlays/overlay/tooltip.class.js +4 -4
- package/dist/components/overlays/toast/toast-item.class.d.ts +3 -2
- package/dist/components/overlays/toast/toast-item.class.js +1 -1
- package/dist/components/overlays/toast/toast-item.styles.js +1 -1
- package/dist/components/overlays/toast/toast.class.d.ts +6 -0
- package/dist/components/overlays/toast/toast.class.js +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +1 -1
- package/dist/components/utility/copy-button/copy-button.class.d.ts +4 -1
- package/dist/components/utility/copy-button/copy-button.class.js +2 -2
- package/dist/components/utility/counter/counter-time.d.ts +15 -0
- package/dist/components/utility/counter/counter-time.js +1 -0
- package/dist/components/utility/counter/counter.class.d.ts +67 -0
- package/dist/components/utility/counter/counter.class.js +1 -0
- package/dist/components/utility/counter/counter.styles.js +1 -0
- package/dist/components/utility/divider/divider.class.d.ts +21 -3
- package/dist/components/utility/divider/divider.class.js +5 -1
- package/dist/components/utility/export-button/export-button.class.d.ts +6 -1
- package/dist/components/utility/export-button/export-button.styles.js +1 -1
- package/dist/components/utility/icon/icon-library-bootstrap.d.ts +50 -0
- package/dist/components/utility/icon/icon-library-bootstrap.js +1 -0
- package/dist/components/utility/icon/icon-library-font-awesome.d.ts +68 -0
- package/dist/components/utility/icon/icon-library-font-awesome.js +1 -0
- package/dist/components/utility/icon/icon-library.d.ts +14 -1
- package/dist/components/utility/icon/icon-library.js +1 -1
- package/dist/components/utility/icon/icon-sprite.js +1 -0
- package/dist/components/utility/icon/icon.class.d.ts +4 -2
- package/dist/components/utility/icon/icon.class.js +2 -2
- package/dist/components/utility/index.d.ts +1 -1
- package/dist/components/utility/index.js +1 -1
- package/dist/components/utility/known-date/known-date.class.d.ts +14 -0
- package/dist/components/utility/mention-popover/mention-popover.class.d.ts +1 -1
- package/dist/components/utility/number-ticker/number-ticker.class.d.ts +66 -0
- package/dist/components/utility/number-ticker/number-ticker.class.js +1 -0
- package/dist/components/utility/number-ticker/number-ticker.styles.js +1 -0
- package/dist/components/utility/tour/tour.class.d.ts +1 -1
- package/dist/components/viewers/include/include.class.d.ts +4 -1
- package/dist/components/viewers/include/include.class.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +10 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.styles.js +1 -1
- package/dist/custom-elements-jsx.d.ts +1 -1
- package/dist/event-classes.d.ts +2342 -0
- package/dist/event-classes.js +1 -0
- package/dist/events.d.ts +48 -22
- package/dist/framework-types.d.ts +2 -2
- package/dist/internal/accessibility-visibility.js +1 -1
- package/dist/internal/all-defined-arguments.d.ts +19 -0
- package/dist/internal/all-defined-arguments.js +1 -0
- package/dist/internal/autoloader-manifest.js +1 -1
- package/dist/internal/autoloader-tags.d.ts +1 -1
- package/dist/internal/autoloader-tags.js +1 -1
- package/dist/internal/checked-control-label.js +1 -1
- package/dist/internal/component-loaders.generated.js +1 -1
- package/dist/internal/declarative-overlay-action.js +1 -0
- package/dist/internal/dedent.js +7 -0
- package/dist/internal/default-strings/forms.generated.js +1 -1
- package/dist/internal/default-strings/layout.generated.js +1 -1
- package/dist/internal/dev-mode-attribute-warning.development.js +1 -1
- package/dist/internal/document-token-css.generated.js +10 -0
- package/dist/internal/document-tokens.generated.js +2 -11
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/dom-guards.js +1 -1
- package/dist/internal/external-label-association.js +1 -0
- package/dist/internal/focus-navigation.js +1 -1
- package/dist/internal/form-control/chrome.styles.js +1 -1
- package/dist/internal/form-control-labels.js +1 -1
- package/dist/internal/form-control.styles.js +1 -1
- package/dist/internal/interactive-control.styles.js +2 -2
- package/dist/internal/labeled-group.js +1 -1
- package/dist/internal/localization-runtime.d.ts +5 -0
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +2 -2
- package/dist/internal/lyra-element.d.ts +11 -2
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/lyra-event.d.ts +22 -0
- package/dist/internal/lyra-event.js +1 -0
- package/dist/internal/overlay-shared.d.ts +5 -2
- package/dist/internal/overlay-shared.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/root-registration-allowlist.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/shiki/core.d.ts +4 -1
- package/dist/internal/shiki/tokenize.js +1 -1
- package/dist/internal/srcset.js +1 -0
- package/dist/internal/theme-observation.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/lyra.js +1 -1
- package/dist/ssr/all.d.ts +1 -1
- package/dist/ssr/all.js +1 -1
- package/dist/ssr.d.ts +5 -5
- package/dist/ssr.js +1 -1
- package/dist/styles/native.css +1 -1
- package/dist/styles/palette.css +1 -0
- package/dist/styles/tokens-root.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/testing/happy-dom-shims.d.ts +11 -2
- package/dist/testing/happy-dom-shims.js +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/lyra-tag-event-map.d.ts +2 -2
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/theme-core.css +1 -1
- package/dist/theme.css +1 -1
- package/dist/utilities/defined.d.ts +10 -1
- package/dist/utilities/defined.js +1 -1
- package/dist/utilities/form.d.ts +9 -0
- package/dist/utilities/form.js +1 -0
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/vue.d.ts +1 -1
- package/llms/components/lr-app-rail.md +4 -2
- package/llms/components/lr-badge.md +4 -4
- package/llms/components/lr-bar-chart.md +1 -1
- package/llms/components/lr-box-plot.md +6 -1
- package/llms/components/lr-bubble-chart.md +1 -1
- package/llms/components/lr-budget-meter.md +2 -2
- package/llms/components/lr-button-group.md +7 -3
- package/llms/components/lr-button.md +11 -1
- package/llms/components/lr-card.md +11 -1
- package/llms/components/lr-chart.md +21 -7
- package/llms/components/lr-checkbox-group.md +11 -1
- package/llms/components/lr-chip.md +11 -1
- package/llms/components/lr-citation-badge.md +1 -1
- package/llms/components/lr-code-block-core.md +39 -9
- package/llms/components/lr-code-block.md +59 -6
- package/llms/components/lr-code-editor.md +11 -1
- package/llms/components/lr-color-picker.md +19 -6
- package/llms/components/lr-combobox.md +81 -9
- package/llms/components/lr-context-menu.md +6 -4
- package/llms/components/lr-copy-button.md +6 -4
- package/llms/components/lr-counter.md +60 -0
- package/llms/components/lr-country-picker.md +4 -0
- package/llms/components/lr-currency-picker.md +4 -0
- package/llms/components/lr-date-input.md +1 -1
- package/llms/components/lr-date-picker.md +25 -1
- package/llms/components/lr-details.md +6 -2
- package/llms/components/lr-dialog.md +101 -9
- package/llms/components/lr-divider.md +14 -5
- package/llms/components/lr-doughnut-chart.md +1 -1
- package/llms/components/lr-drawer.md +32 -7
- package/llms/components/lr-dropdown-item.md +1 -1
- package/llms/components/lr-dropdown.md +8 -4
- package/llms/components/lr-emoji-picker.md +10 -1
- package/llms/components/lr-empty.md +3 -2
- package/llms/components/lr-entity-chip.md +1 -1
- package/llms/components/lr-export-button.md +6 -3
- package/llms/components/lr-file-input.md +13 -1
- package/llms/components/lr-filter-bar.md +6 -2
- package/llms/components/lr-graph-query-builder.md +10 -1
- package/llms/components/lr-heatmap.md +20 -3
- package/llms/components/lr-histogram.md +7 -2
- package/llms/components/lr-icon-button.md +3 -1
- package/llms/components/lr-icon.md +104 -0
- package/llms/components/lr-include.md +3 -0
- package/llms/components/lr-input.md +9 -1
- package/llms/components/lr-known-date.md +10 -1
- package/llms/components/lr-lightbox-item.md +14 -0
- package/llms/components/lr-lightbox.md +119 -14
- package/llms/components/lr-line-chart.md +7 -2
- package/llms/components/lr-lite-chart.md +3 -2
- package/llms/components/lr-locale-picker.md +17 -1
- package/llms/components/lr-map.md +122 -11
- package/llms/components/lr-markdown-core.md +15 -4
- package/llms/components/lr-markdown.md +13 -4
- package/llms/components/lr-mention-popover.md +1 -1
- package/llms/components/lr-menu-item.md +1 -1
- package/llms/components/lr-menu-label.md +5 -2
- package/llms/components/lr-menu.md +22 -7
- package/llms/components/lr-model-select.md +13 -3
- package/llms/components/lr-native-time-input.md +11 -1
- package/llms/components/lr-number-input.md +11 -1
- package/llms/components/lr-number-ticker.md +60 -0
- package/llms/components/lr-otp-input.md +11 -1
- package/llms/components/lr-page.md +7 -1
- package/llms/components/lr-pagination.md +18 -0
- package/llms/components/lr-pdf-viewer.md +6 -1
- package/llms/components/lr-phone-input.md +11 -1
- package/llms/components/lr-pie-chart.md +1 -1
- package/llms/components/lr-polar-area-chart.md +1 -1
- package/llms/components/lr-popover.md +26 -6
- package/llms/components/lr-radar-chart.md +1 -1
- package/llms/components/lr-radio-group.md +11 -1
- package/llms/components/lr-rubric-form.md +7 -1
- package/llms/components/lr-scatter-chart.md +1 -1
- package/llms/components/lr-segmented.md +20 -2
- package/llms/components/lr-select.md +11 -3
- package/llms/components/lr-selection-toolbar.md +1 -1
- package/llms/components/lr-sequence-playback.md +8 -2
- package/llms/components/lr-signature-pad.md +8 -1
- package/llms/components/lr-slider.md +17 -4
- package/llms/components/lr-stat.md +20 -5
- package/llms/components/lr-step.md +67 -0
- package/llms/components/lr-stepper.md +64 -8
- package/llms/components/lr-suggestion-chips.md +3 -2
- package/llms/components/lr-switch.md +4 -3
- package/llms/components/lr-tab-group.md +10 -3
- package/llms/components/lr-tab-panel.md +2 -2
- package/llms/components/lr-table.md +87 -8
- package/llms/components/lr-tag.md +1 -1
- package/llms/components/lr-textarea.md +17 -1
- package/llms/components/lr-thread-list.md +4 -2
- package/llms/components/lr-time-input.md +9 -2
- package/llms/components/lr-time-zone-picker.md +4 -0
- package/llms/components/lr-timeline-item.md +1 -1
- package/llms/components/lr-timeline.md +47 -3
- package/llms/components/lr-toast-item.md +1 -1
- package/llms/components/lr-toast.md +8 -3
- package/llms/components/lr-token-input.md +68 -11
- package/llms/components/lr-tool-call-chip.md +1 -1
- package/llms/components/lr-tooltip.md +8 -3
- package/llms/components/lr-tree-item.md +1 -1
- package/llms/components/lr-tree.md +2 -1
- package/llms/components/lr-unit-picker.md +4 -0
- package/llms/components/lr-usage-badge.md +1 -1
- package/llms/components/lr-video.md +5 -4
- package/llms/components/lr-voice-picker.md +10 -2
- package/llms/components/lr-widget.md +2 -2
- package/llms/components/lr-zoomable-frame.md +8 -0
- package/llms/index.md +205 -201
- package/llms/migration.md +103 -16
- package/llms/peers.md +3 -3
- package/llms/shared/events-and-types.md +36 -0
- package/llms/shared/forms-and-accessibility.md +4 -1
- package/llms/shared/frameworks-and-ssr.md +10 -1
- package/llms/shared/imports-and-registration.md +68 -2
- package/llms/shared/localization-and-rtl.md +5 -0
- package/llms/shared/native-styles-and-utilities.md +142 -7
- package/llms/shared/styles-and-tokens.md +60 -6
- package/llms/shared/testing-and-utilities.md +30 -0
- package/llms/shared.md +354 -17
- package/llms/tokens.md +6 -1
- package/llms.txt +3 -3
- package/locales.json +1 -1
- package/package.json +48 -10
- package/registrations.json +1 -1
- package/skills/compose-lyra-interfaces/SKILL.md +1 -1
- package/skills/lyra-ui/SKILL.md +1 -1
- package/skills/lyra-ui/commands/migrate.md +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** `shiki` — see `llms/peers.md`
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 21 parts, 42 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Tokens by part** (prefer these over a `::part()` rule) `body`: `--lr-code-block-max-height`, `--lr-theme-scrollbar-color`, `--lr-theme-scrollbar-gutter`, `--lr-theme-scrollbar-width`; `code`: `--lr-code-block-font`; `header`: `--lr-code-block-language-bg`; `language`: `--lr-code-block-language-bg`, `--lr-code-block-language-color`; `pre`: `--lr-code-block-font`, `--lr-code-block-tab-size`
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
15
|
|
|
@@ -41,8 +41,10 @@ highlighted markup.
|
|
|
41
41
|
|
|
42
42
|
A `language` value absent from `languages` always renders the plain `<pre><code>` fallback — there is
|
|
43
43
|
no default/full-table highlighter here to fall back to, unlike `<lr-code-block>`'s dynamic-import
|
|
44
|
-
path for an unmapped language
|
|
45
|
-
same as `<lr-code-block>`'s own plain-text
|
|
44
|
+
path for an unmapped language, and reports `:state(error)` with an `lr-load` whose `detail.highlighted` is `false`. That fallback is
|
|
45
|
+
the _default_ rendering path, not a degraded one, same as `<lr-code-block>`'s own plain-text
|
|
46
|
+
fallback. The custom states, `lr-load`, the `copy-button__*` parts and the syntax color properties
|
|
47
|
+
behave as described for `<lr-code-block>`. Everything else — `code`/`language`/
|
|
46
48
|
`filename`/`withoutCopyButton`/`collapsible`/`collapsed`/`maxHeight`, the copy button, the collapse header
|
|
47
49
|
toggle, the loading-skeleton behavior while the fine-grained highlighter resolves — matches
|
|
48
50
|
`<lr-code-block>` exactly, including its CSS parts, themeable custom properties, and stylesheet
|
|
@@ -94,7 +96,9 @@ patch existing lines without retokenizing, and gutter navigation reuses the sour
|
|
|
94
96
|
the displayed code. For a
|
|
95
97
|
TypeScript annotation, use `import type { ShikiLanguageSource } from
|
|
96
98
|
'@aceshooting/lyra-ui/components/lr-code-block-core.js'`; the type-only
|
|
97
|
-
granular import emits no registration side effect.
|
|
99
|
+
granular import emits no registration side effect. Grammars registered with
|
|
100
|
+
`registerCodeGrammar()` (see `<lr-code-block>`) also count as supplied here; an entry in this map
|
|
101
|
+
wins for the same language.
|
|
98
102
|
- `copyAppearance: 'text' | 'icon' = 'text'` (attribute `copy-appearance`, reflected) — identical to
|
|
99
103
|
`<lr-code-block>`'s own property: `'text'` is the labelled button, `'icon'` swaps the visible label
|
|
100
104
|
for a compact glyph and promotes the same localized string to the control's accessible name
|
|
@@ -103,6 +107,9 @@ The collapse control keeps the constant `codeBlockToggle` name (`Toggle code`) i
|
|
|
103
107
|
reports its state through `aria-expanded`.
|
|
104
108
|
A synchronous write to `collapsed` in an `lr-toggle-request` listener owns the state change.
|
|
105
109
|
|
|
110
|
+
More properties: `without-copy`: see the component JSDoc. `without-dedent`: see the component JSDoc.
|
|
111
|
+
`wrap`: see the component JSDoc.
|
|
112
|
+
|
|
106
113
|
**Methods:** `scrollToAnchor(target)` — resolves a `line-range` anchor (or a `highlights` id string
|
|
107
114
|
resolving to one) by scrolling its start line into view within `[part="body"]`; resolves `false`
|
|
108
115
|
when the anchor isn't a `line-range`, the id isn't found, or the start line is out of bounds.
|
|
@@ -110,9 +117,10 @@ when the anchor isn't a `line-range`, the id isn't found, or the start line is o
|
|
|
110
117
|
Identical behavior to `<lr-code-block>`'s own method.
|
|
111
118
|
|
|
112
119
|
**Events:** the same fulfilled-only `lr-copy`, generic `lr-error`, full `lr-copy-error`, cancelable
|
|
113
|
-
`lr-toggle-request`, committed `lr-toggle`, and `lr-line-activate` contracts as
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
`lr-toggle-request`, committed `lr-toggle`, `lr-load`, and `lr-line-activate` contracts as
|
|
121
|
+
`<lr-code-block>` (`lr-load` carries `detail: { highlighted }` once highlighting settles for the
|
|
122
|
+
current `language`); `lr-text-select` (`detail: { text, anchor, rects }` — a text selection inside
|
|
123
|
+
the code body ended; `anchor` is a `line-range` anchor covering the selected lines).
|
|
116
124
|
|
|
117
125
|
**Slots:** `header-actions` — identical to `<lr-code-block>`'s own slot.
|
|
118
126
|
|
|
@@ -120,9 +128,16 @@ body ended; `anchor` is a `line-range` anchor covering the selected lines).
|
|
|
120
128
|
`copy-button-icon`, `copy-button-control`, `header-actions`, `toggle`, `body`, `pre`, `code`, `line-highlight`, `line-button`, `limit` —
|
|
121
129
|
identical set to `<lr-code-block>`.
|
|
122
130
|
|
|
131
|
+
Further CSS parts: `copy-button__button`: Alias of `copy-button-control`. `copy-button__copy-icon`:
|
|
132
|
+
The copy glyph at rest while `copyAppearance` is `'icon'`. `copy-button__error-icon`: The error
|
|
133
|
+
glyph after a failed copy while `copyAppearance` is `'icon'`. `copy-button__feedback`: Visually
|
|
134
|
+
hidden, `aria-hidden` mirror of the copy outcome text; empty at rest. `copy-button__success-icon`:
|
|
135
|
+
The check glyph after a successful copy while `copyAppearance` is `'icon'`.
|
|
136
|
+
|
|
123
137
|
**Themeable custom properties:** identical to `<lr-code-block>`, including `--lr-code-block-padding`,
|
|
124
|
-
`--lr-code-block-radius`, `--lr-code-block-
|
|
125
|
-
`--lr-code-block-
|
|
138
|
+
`--lr-code-block-radius`, `--lr-code-block-border`, `--lr-code-block-bg`,
|
|
139
|
+
`--lr-code-block-header-bg`, `--lr-code-block-header-padding`, `--lr-code-block-header-border`,
|
|
140
|
+
`--lr-code-block-header-color` and `--lr-code-block-line-number-color`, and the `--lr-code-block-toggle-bg*` and
|
|
126
141
|
`--lr-code-block-gutter-bg*` state tokens. `--lr-code-block-max-height`
|
|
127
142
|
(independently settable; an authored `max-height` attribute wins inline),
|
|
128
143
|
`--lr-code-block-font`, `--lr-code-block-tab-size` (default `2`, applied to `[part='pre']`),
|
|
@@ -138,6 +153,21 @@ for the full rationale, including why `<lr-markdown>`/`<lr-markdown-core>` must
|
|
|
138
153
|
fallback separately. `base` is a flex column and `body` grows to fill whatever block space a
|
|
139
154
|
explicitly sized host gives it too, identically to `<lr-code-block>` above.
|
|
140
155
|
|
|
156
|
+
More themeable custom properties: `--comment-color`: Color of highlighted comments and quotes. Unset
|
|
157
|
+
keeps the theme color. `--constant-color`: Color of highlighted numbers, booleans, constants and
|
|
158
|
+
entities. Unset keeps the theme color. `--deleted-color`: Color of highlighted deleted diff lines.
|
|
159
|
+
Unset keeps the theme color. `--function-color`: Color of highlighted functions and decorators.
|
|
160
|
+
Unset keeps the theme color. `--inserted-color`: Color of highlighted inserted diff lines. Unset
|
|
161
|
+
keeps the theme color. `--keyword-color`: Color of highlighted keywords, storage modifiers, doctypes
|
|
162
|
+
and headings. Unset keeps the theme color. `--operator-color`: Color of highlighted operators and
|
|
163
|
+
punctuation. Unset keeps the theme color. `--property-color`: Color of highlighted properties, keys
|
|
164
|
+
and attribute names. Unset keeps the theme color. `--selector-color`: Color of highlighted CSS
|
|
165
|
+
selectors. Unset keeps the theme color. `--string-color`: Color of highlighted strings, regular
|
|
166
|
+
expressions, links and raw text. Unset keeps the theme color. `--tag-color`: Color of highlighted
|
|
167
|
+
markup tags. Unset keeps the theme color. `--type-color`: Color of highlighted types, classes and
|
|
168
|
+
built-ins. Unset keeps the theme color. `--variable-color`: Color of highlighted variables and
|
|
169
|
+
interpolations. Unset keeps the theme color.
|
|
170
|
+
|
|
141
171
|
**Optional peer deps:** `shiki` (specifically its `shiki/core`, `shiki/engine/javascript` (the default), and `shiki/themes/github-{light,dark}.mjs` subpaths — never
|
|
142
172
|
`shiki`'s main entry point, which is what carries the ~200-language table this component exists to
|
|
143
173
|
avoid). Building the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** `shiki` — see `llms/peers.md`
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 21 parts, 42 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Tokens by part** (prefer these over a `::part()` rule) `body`: `--lr-code-block-max-height`, `--lr-theme-scrollbar-color`, `--lr-theme-scrollbar-gutter`, `--lr-theme-scrollbar-width`; `code`: `--lr-code-block-font`; `header`: `--lr-code-block-language-bg`; `language`: `--lr-code-block-language-bg`, `--lr-code-block-language-color`; `pre`: `--lr-code-block-font`, `--lr-code-block-language-color`, `--lr-code-block-tab-size`
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
15
|
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
Assign new `languages` or `languageLoaders` maps to update available grammars. The component preserves the identity of a supplied concrete map.
|
|
21
21
|
|
|
22
|
-
Fenced code display with optional lazy syntax highlighting and a copy button.
|
|
23
|
-
|
|
22
|
+
Fenced code display with optional lazy syntax highlighting and a copy button. Mirrors Web Awesome's
|
|
23
|
+
`wa-code-highlighter`. It lazily loads the optional `shiki` peer for syntax highlighting and
|
|
24
24
|
includes a compact GreyCat/GCL grammar because
|
|
25
25
|
Shiki does not bundle one. It falls back to a plain `<pre><code>` when that peer isn't installed or
|
|
26
26
|
`language` is unset/unrecognized. That
|
|
@@ -63,6 +63,15 @@ through an activatable gutter reuses the source lines and updates the previous a
|
|
|
63
63
|
- `collapsible: boolean = false` (reflected) — shows the collapse/expand chevron button
|
|
64
64
|
- `collapsed: boolean = false` (reflected) — only has a visible effect while `collapsible` is also
|
|
65
65
|
true
|
|
66
|
+
- `wrap: boolean = false` (reflected) — wraps long lines instead of scrolling horizontally, in plain
|
|
67
|
+
and highlighted rendering alike.
|
|
68
|
+
- Light-DOM source: with an empty `code`, the element's own text (text nodes, `<script
|
|
69
|
+
type="text/plain">` or `<template>`; children with a `slot` attribute are skipped) is the source,
|
|
70
|
+
dedented, and edits are followed. `withoutDedent: boolean = false` (attribute `without-dedent`,
|
|
71
|
+
reflected) keeps it as written except the newline right after the opening tag. A non-empty `code`
|
|
72
|
+
wins and is never dedented.
|
|
73
|
+
- Aliases: `label` (accessible name; host `aria-label` wins) and `without-copy`
|
|
74
|
+
(= `without-copy-button`; `withoutCopy: boolean = false`, reflected whichever spelling set it).
|
|
66
75
|
- `withoutCopyButton: boolean = false` (attribute `without-copy-button`, reflected) — hides the
|
|
67
76
|
copy-to-clipboard button, which is shown by default.
|
|
68
77
|
- `maxHeight: string = ''` (attribute `max-height`) — a CSS length (e.g. `"20rem"`); once set, the
|
|
@@ -107,6 +116,20 @@ through an activatable gutter reuses the source lines and updates the previous a
|
|
|
107
116
|
is exported from the same entry and returns
|
|
108
117
|
`Promise<ShikiLanguageInput | { default: ShikiLanguageInput }>`; assign new map objects after edits.
|
|
109
118
|
|
|
119
|
+
- Global grammar registry — `registerCodeGrammar(name, grammarOrLoader, { aliases? })` and
|
|
120
|
+
`unregisterCodeGrammar(name)` (root barrel, or
|
|
121
|
+
`@aceshooting/lyra-ui/components/conversation/code-block/code-grammar-registry.js`) register a
|
|
122
|
+
Shiki grammar object or a lazy loader (`() => import('shiki/langs/rust.mjs')`) once for every
|
|
123
|
+
`lr-code-block` and `lr-code-block-core` on the page. A per-element `languages` or
|
|
124
|
+
`languageLoaders` entry wins for the same language. Names and aliases are case-insensitive; an
|
|
125
|
+
alias already held by another grammar moves to the new one, and `unregisterCodeGrammar()` removes
|
|
126
|
+
the name with its aliases. Blocks already showing that language re-highlight on register and
|
|
127
|
+
unregister (they subscribe while connected only), so registration may happen after render. A
|
|
128
|
+
rejected loader leaves the localized plain-text fallback with `:state(error)`. Invalid names
|
|
129
|
+
(1-64 characters of letters, digits and `. _ + # -`), aliases or sources throw `TypeError`.
|
|
130
|
+
Migrating a `wa-code-highlighter` app that calls the global `registerCodeGrammar()` is a call-site
|
|
131
|
+
rename of the import.
|
|
132
|
+
|
|
110
133
|
- `copyAppearance: 'text' | 'icon' = 'text'` (attribute `copy-appearance`, reflected) — how the
|
|
111
134
|
header's copy control presents itself. `'text'` is the labelled button this component has always
|
|
112
135
|
rendered; `'icon'` swaps the visible label for a compact glyph and promotes the same localized
|
|
@@ -123,7 +146,11 @@ when the anchor isn't a `line-range`, the id isn't found, or the start line is o
|
|
|
123
146
|
|
|
124
147
|
**Events:** `lr-copy` (frozen `detail: { ok: true, text }` — fires only after the raw `code` value
|
|
125
148
|
was written successfully), `lr-error` (`detail: null` — generic notification when clipboard writing
|
|
126
|
-
fails
|
|
149
|
+
fails; `lr-copy-error` carries the full failure), `lr-load` (`detail: { highlighted: boolean }` —
|
|
150
|
+
`true` when the grammar loaded and the code was highlighted, fired again whenever new highlighted
|
|
151
|
+
output replaces the old; `false` once when no grammar exists for the current `language` and the code
|
|
152
|
+
renders as plain text, alongside `:state(error)`; unlike `wa-error`, a missing grammar never fires
|
|
153
|
+
`lr-error`), `lr-copy-error` (frozen `detail: { ok: false, text, reason, error }`, where `reason` is
|
|
127
154
|
`'unsupported' | 'denied' | 'failed'`), `lr-toggle-request` (cancelable;
|
|
128
155
|
`detail: { expanded }` is the proposed next state; canceling leaves the host `collapsed` property
|
|
129
156
|
unchanged),
|
|
@@ -133,7 +160,8 @@ unchanged),
|
|
|
133
160
|
`lr-text-select` (`detail: { text, anchor, rects }` — a text selection inside the code body ended;
|
|
134
161
|
`anchor` is a `line-range` anchor covering the selected lines)
|
|
135
162
|
|
|
136
|
-
**Slots:**
|
|
163
|
+
**Slots:** default — the code as light-DOM text when `code` is empty (read as source, not
|
|
164
|
+
projected; see light-DOM source above). `header-actions` — extra controls for the header row, rendered after the copy control.
|
|
137
165
|
Their presence alone is enough to render the header, and appending or removing such a child at any
|
|
138
166
|
time brings the header into existence or retires it (the host's own light DOM is observed; no
|
|
139
167
|
property write is needed).
|
|
@@ -142,7 +170,11 @@ property write is needed).
|
|
|
142
170
|
`copy-button` (the copy control, a composed `<lr-icon-button>` as of 16.0.0; it also carries
|
|
143
171
|
`copy-button-text` or `copy-button-icon` for the active `copyAppearance`, so match it by token —
|
|
144
172
|
`[part~="copy-button"]` — not by exact value), `copy-button-text` / `copy-button-icon` (the copy
|
|
145
|
-
control in each appearance), `copy-button-control` (the copy control's own native `<button
|
|
173
|
+
control in each appearance), `copy-button-control` (the copy control's own native `<button>`;
|
|
174
|
+
`copy-button__button` is the same node), `copy-button__copy-icon` / `copy-button__success-icon` /
|
|
175
|
+
`copy-button__error-icon` (the icon-appearance glyph at rest, after a successful copy and after a
|
|
176
|
+
failed one), `copy-button__feedback` (visually hidden, `aria-hidden` mirror of the copy outcome text,
|
|
177
|
+
empty at rest),
|
|
146
178
|
`header-actions` (the wrapper around the `header-actions` slot; it carries the `hidden` attribute
|
|
147
179
|
and computes to `display: none` whenever nothing is assigned, so an empty slot contributes no
|
|
148
180
|
header gap — a rule that sets `display` on it must qualify itself with `:not([hidden])`),
|
|
@@ -166,9 +198,30 @@ border simply has no default to relay, which is different from border theming be
|
|
|
166
198
|
remains the one exception that does not cross this way: use `--lr-theme-icon-button-size`, never
|
|
167
199
|
`--lr-icon-button-size`, as noted above.
|
|
168
200
|
|
|
201
|
+
**Custom states:** `:state(loading)` (a `language` is set and its grammar or the highlighter is
|
|
202
|
+
still loading), `:state(error)` (no grammar exists for the current `language`; plain text renders),
|
|
203
|
+
`:state(highlighted)` (the code is rendered with syntax highlighting). None applies while
|
|
204
|
+
`language` is unset or the source exceeds the highlighting ceiling.
|
|
205
|
+
|
|
206
|
+
**Syntax colors:** `--comment-color`, `--keyword-color`, `--operator-color`, `--string-color`,
|
|
207
|
+
`--constant-color`, `--function-color`, `--type-color`, `--variable-color`, `--property-color`,
|
|
208
|
+
`--tag-color`, `--selector-color`, `--inserted-color` and `--deleted-color` recolor highlighted
|
|
209
|
+
tokens of that category in both the light and dark themes. Each is unset by default, which keeps
|
|
210
|
+
the Shiki theme's own token color. Tokens are classified from their TextMate scopes; the plain-text
|
|
211
|
+
fallback has no tokens to recolor.
|
|
212
|
+
|
|
213
|
+
```css
|
|
214
|
+
lr-code-block { --keyword-color: var(--lr-color-brand); --string-color: var(--lr-color-success); }
|
|
215
|
+
```
|
|
216
|
+
|
|
169
217
|
**Themeable custom properties:** `--lr-code-block-padding` controls code padding, `--lr-code-block-radius`
|
|
170
218
|
controls the frame corners, and `--lr-code-block-header-bg`, `--lr-code-block-header-color` and
|
|
171
219
|
`--lr-code-block-line-number-color` set the header background, filename color and gutter color.
|
|
220
|
+
`--lr-code-block-border` (default `var(--lr-border-width-thin) solid var(--lr-color-border-subtle)`)
|
|
221
|
+
and `--lr-code-block-bg` (default `var(--lr-color-surface)`; highlighted code paints its theme
|
|
222
|
+
background over it) style the frame; `--lr-code-block-header-padding` (default `var(--lr-space-xs)
|
|
223
|
+
var(--lr-space-s)`) and `--lr-code-block-header-border` (default `var(--lr-border-width-thin) solid
|
|
224
|
+
var(--lr-color-border-subtle)`, the rule under the header) style the header.
|
|
172
225
|
`--lr-code-block-toggle-bg`, `--lr-code-block-toggle-hover-bg`, and `--lr-code-block-toggle-active-bg`
|
|
173
226
|
style the disclosure. `--lr-code-block-gutter-bg`, `--lr-code-block-gutter-hover-bg`, and
|
|
174
227
|
`--lr-code-block-gutter-active-bg` style the line buttons. Each token applies to its own state.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via** 8 parts,
|
|
12
|
+
- **Themeable via** 8 parts, 33 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Tokens by part** (prefer these over a `::part()` rule) `editor`: `--lr-code-editor-radius`, `--lr-theme-scrollbar-width`, `--lr-theme-scrollbar-gutter`, `--lr-theme-scrollbar-color`
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
15
15
|
|
|
@@ -165,6 +165,9 @@ of them on `:root` or any ancestor for one declaration to retheme every internal
|
|
|
165
165
|
the library, including `lr-table`,
|
|
166
166
|
`lr-virtual-list`, `lr-scroller`, `lr-carousel`, and `lr-code-block`.
|
|
167
167
|
|
|
168
|
+
More themeable custom properties: `--lr-form-control-label-line-height` (default `inherit`): Line
|
|
169
|
+
height of the field label.
|
|
170
|
+
|
|
168
171
|
**Known gotchas:**
|
|
169
172
|
|
|
170
173
|
- Keyboard contract (no keyboard trap, WCAG 2.1.2): Tab inserts one indent unit of spaces at the
|
|
@@ -180,3 +183,10 @@ the library, including `lr-table`,
|
|
|
180
183
|
**Additional API surface:** `click()` activates the internal editing surface.
|
|
181
184
|
|
|
182
185
|
The start-placed label aligns to the first line of the field, measured with `--lr-form-control-height`.
|
|
186
|
+
|
|
187
|
+
Further custom properties:
|
|
188
|
+
|
|
189
|
+
- `--lr-form-control-label-gap` also spaces a label above the field.
|
|
190
|
+
- `--lr-form-control-label-line-height` (default `inherit`): Line height of the field label.
|
|
191
|
+
- `--lr-form-control-label-text-align` (default `inherit`): Text alignment of the field label.
|
|
192
|
+
- `--lr-form-control-label-text-transform` (default `inherit`): Text transform of the field label.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 47 parts, 48 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -231,7 +231,7 @@ layer closes.
|
|
|
231
231
|
**CSS parts:** `base` (permanent compatibility name on the same field wrapper as `color-picker`),
|
|
232
232
|
`color-picker` (the field wrapper; it is the same node as `base` and `form-control`),
|
|
233
233
|
`form-control` (the field wrapper; it is the same node as `base` and `color-picker`),
|
|
234
|
-
`form-control-label` (the label; `label` is its permanent compatibility name), `trigger-container`
|
|
234
|
+
`form-control-label` (the label; `label` is its permanent compatibility name), `trigger-container` (also `form-control-input`)
|
|
235
235
|
(the row wrapping the trigger), `trigger` (the swatch button that
|
|
236
236
|
opens the panel), `panel` (the positioned `role="dialog"` surface), `grid` (the
|
|
237
237
|
saturation/brightness square) and `grid-handle` (its draggable, keyboard-operable handle),
|
|
@@ -240,11 +240,11 @@ saturation/brightness square) and `grid-handle` (its draggable, keyboard-operabl
|
|
|
240
240
|
token, so `::part(slider)` styles both ramps while `::part(hue-slider)` reaches only one; the
|
|
241
241
|
opacity pair renders only with `opacity` set), `preview` (the current-colour dot beside the ramps),
|
|
242
242
|
`input` (the text field holding the serialized value), `format-button` (the format-cycling button,
|
|
243
|
-
absent with either format-toggle suppression property), plus `format-button__base
|
|
243
|
+
absent with either format-toggle suppression property), plus `format-button__base` and `format-button__button` (same node),
|
|
244
244
|
`format-button__start`/`format-button__prefix`, `format-button__label`,
|
|
245
245
|
`format-button__end`/`format-button__suffix`, and `format-button__caret`;
|
|
246
246
|
`eyedropper-button` / `eye-dropper-button` (rendered only where the browser exposes the EyeDropper
|
|
247
|
-
API), with the corresponding `eyedropper-button__base|start|label|end|caret` and Shoelace
|
|
247
|
+
API), with the corresponding `eyedropper-button__base|button|start|label|end|caret` and Shoelace
|
|
248
248
|
`eye-dropper-button__base|prefix|label|suffix|caret` aliases; `swatches` (the palette container, rendered only when the normalized `swatches`
|
|
249
249
|
list is non-empty), `swatch` (one palette entry), `swatch-icon` (a swatch entry's optional
|
|
250
250
|
decorative icon, inert and `aria-hidden`), `swatch-selected` (a token **added to** the
|
|
@@ -263,6 +263,9 @@ above, not a copy of it, so `--lr-form-control-required-content`,
|
|
|
263
263
|
here exactly as they do on `lr-input`. With no label text the part is hidden and no glyph is
|
|
264
264
|
painted. Also `swatch-check` (the check-mark icon inside the selected swatch).
|
|
265
265
|
|
|
266
|
+
Further CSS parts: `eyedropper-button__button`: Web Awesome-named alias on the same node as
|
|
267
|
+
`eyedropper-button`.
|
|
268
|
+
|
|
266
269
|
**Themeable custom properties:** `--lr-color-picker-swatch-size` sizes the centered visible swatch,
|
|
267
270
|
not the button's minimum target. Its private default follows `size` (default `'m'` reads `2.25rem`,
|
|
268
271
|
`'2xs'` reads `1.25rem`, etc.), matching the visual-density ladder `lr-input` uses. The trigger's
|
|
@@ -310,8 +313,8 @@ The popup panel is a floating surface and paints from the **shared overlay-surfa
|
|
|
310
313
|
`--lr-overlay-surface` (default `var(--lr-color-surface-overlay)`), `--lr-overlay-border` (default
|
|
311
314
|
`var(--lr-color-border)`) and `--lr-overlay-shadow-anchored` (default `var(--lr-shadow-m)`). None is
|
|
312
315
|
declared on `:host`, so one declaration on `:root` — or on any ancestor, to scope it — retints this
|
|
313
|
-
surface together with every other floating surface in the library. `--lr-overlay-radius`
|
|
314
|
-
`--lr-color-picker-radius`, which still wins when set. The edge deliberately keeps the control tier, `var(--lr-color-border)`, rather than the
|
|
316
|
+
surface together with every other floating surface in the library. `--lr-overlay-radius` reaches it only as the middle arm of
|
|
317
|
+
`--lr-color-picker-radius`, which still wins when set; left unset, the panel keeps the component's own radius default. The edge deliberately keeps the control tier, `var(--lr-color-border)`, rather than the
|
|
315
318
|
decorative `var(--lr-color-border-subtle)` floating panels default to: this panel belongs to the
|
|
316
319
|
form control it opens from and keeps that control's boundary contrast (see `<lr-popover>`).
|
|
317
320
|
|
|
@@ -322,6 +325,9 @@ over it; otherwise it wins over this control's own mirrored `absolute` default.
|
|
|
322
325
|
`:root`, a theme, or a single clipping ancestor changes every unset color picker beneath it instead
|
|
323
326
|
of authoring `positioning-strategy`/`hoist` on each instance.
|
|
324
327
|
|
|
328
|
+
More themeable custom properties: `--lr-form-control-label-line-height` (default `inherit`): Line
|
|
329
|
+
height of the field label.
|
|
330
|
+
|
|
325
331
|
**Additional API surface:**
|
|
326
332
|
|
|
327
333
|
- `click()` — In popup mode activates the trigger, opening or closing the panel; in inline mode
|
|
@@ -383,3 +389,10 @@ of authoring `positioning-strategy`/`hoist` on each instance.
|
|
|
383
389
|
entry in the text field is discarded rather than reappearing on the next open.
|
|
384
390
|
|
|
385
391
|
The start-placed label aligns to the first line of the field, measured with `--lr-form-control-height`.
|
|
392
|
+
|
|
393
|
+
Further custom properties:
|
|
394
|
+
|
|
395
|
+
- `--lr-form-control-label-gap` also spaces a label above the field.
|
|
396
|
+
- `--lr-form-control-label-line-height` (default `inherit`): Line height of the field label.
|
|
397
|
+
- `--lr-form-control-label-text-align` (default `inherit`): Text alignment of the field label.
|
|
398
|
+
- `--lr-form-control-label-text-transform` (default `inherit`): Text transform of the field label.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
|
-
- **Optional peers**
|
|
12
|
-
- **Themeable via**
|
|
11
|
+
- **Optional peers** `dompurify` — see `llms/peers.md`
|
|
12
|
+
- **Themeable via** 43 parts, 53 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Tokens by part** (prefer these over a `::part()` rule) `combobox`: `--lr-combobox-gap`, `--lr-combobox-radius`; `form-control-label`: `--lr-form-control-required-content`; `listbox`: `--lr-theme-scrollbar-color`, `--lr-theme-scrollbar-gutter`, `--lr-theme-scrollbar-width`; `option-badge`: `--lr-combobox-option-badge-bg`
|
|
14
14
|
- **Documented with** `lr-option` (same section below)
|
|
15
15
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
@@ -173,6 +173,8 @@ zoom on focus; see "Touch font floor".
|
|
|
173
173
|
otherwise followed by implicit form submission) and when focus leaves; the text stays after blur,
|
|
174
174
|
and reopening edits it in place instead of blanking the field. Escape closes the list and drops
|
|
175
175
|
an uncommitted edit. No `allow-custom-value` is needed, and no unknown-value badge is shown.
|
|
176
|
+
`value = ''` means no value here, like clearing the text: the placeholder shows and `required`
|
|
177
|
+
reports `valueMissing`.
|
|
176
178
|
The list opens on focus in every mode, and a press on the already-focused input reopens it:
|
|
177
179
|
|
|
178
180
|
```html
|
|
@@ -309,7 +311,7 @@ matches"` in the built-in English locale); any supplied string, including `''`,
|
|
|
309
311
|
A supplied template wins verbatim over `.strings`, including when it equals that English
|
|
310
312
|
template or is empty; `{n}` is still replaced with the locale-formatted hidden count
|
|
311
313
|
- `filter: OptionFilter | null = null` (attribute: false — `(option, query) => boolean`; default
|
|
312
|
-
matches `label`/`searchText` case-insensitively; ignored while `source` is set)
|
|
314
|
+
matches `label`/`searchText` case-insensitively; ignored while `source` is set or `server` is on)
|
|
313
315
|
- `source: ComboboxSource | null = null` (attribute: false — `(query: string, options: { signal:
|
|
314
316
|
AbortSignal; limit: number }) => Promise<readonly ComboboxSourceRow[] | { rows, total? }>`; when set, replaces the light-DOM `<lr-option>`
|
|
315
317
|
list with an async lookup, debounced by `sourceDelay` ms after each keystroke and re-run on
|
|
@@ -328,7 +330,34 @@ AbortSignal; limit: number }) => Promise<readonly ComboboxSourceRow[] | { rows,
|
|
|
328
330
|
including an identical retry, while raw caught error text stays out of the UI.)
|
|
329
331
|
- `sourceDelay: number = 200` (attribute `source-delay` — debounce in ms between the last keystroke
|
|
330
332
|
and the `source` call; `0` fires on every keystroke. Sanitized to a finite non-negative duration,
|
|
331
|
-
falling back to `200` for a non-finite value)
|
|
333
|
+
falling back to `200` for a non-finite value). `filterDebounce` (attribute `filter-debounce`) is the
|
|
334
|
+
same setting under its upstream name.
|
|
335
|
+
Unset, it stays `200`, where Web Awesome's `filter-debounce` defaults to `250`; write
|
|
336
|
+
`filter-debounce="250"` to match that timing.
|
|
337
|
+
- `dataSource: ((request: ComboboxRequest) => Promise<ComboboxOptions> | ComboboxOptions) | null = null`
|
|
338
|
+
(attribute: false) — the single-argument provider shape: it receives `{ query, signal }` and returns
|
|
339
|
+
option objects (`{ value, label, disabled? }` plus any `source` row field), option elements, a
|
|
340
|
+
`{ rows, total }` envelope, or a string of option markup, directly or as a promise. Elements and
|
|
341
|
+
markup contribute only their `value` attribute, label text and `disabled` state; markup is parsed
|
|
342
|
+
into an inert document and never inserted, so nothing in it runs; only its top-level `<option>` or
|
|
343
|
+
`*-option` elements become rows. It drives the same pipeline as
|
|
344
|
+
`source` (debounce, `lr-options-request`, cancellation, loading and failed states, row ceilings).
|
|
345
|
+
An option object may carry `html` (rich row content, see `ComboboxSourceRow.html` below).
|
|
346
|
+
Assigning either provider replaces the other, and `dataSource` reads `null` once `source` is
|
|
347
|
+
assigned; `source` keeps its `(query, { signal, limit })` shape.
|
|
348
|
+
- `server: boolean = false` (attribute `server`, reflected) — server mode without a provider:
|
|
349
|
+
client-side filtering is off (`filter` is ignored and every `<lr-option>` child shows), and each
|
|
350
|
+
request is announced through `lr-options-request` instead. Typing requests after the
|
|
351
|
+
`source-delay`/`filter-debounce` wait; opening the listbox and `reload()` request at once.
|
|
352
|
+
Scheduling a request sets `loading`; the host replaces the `<lr-option>` children for
|
|
353
|
+
`detail.query`, then sets `loading = false`, and drops an answer whose `detail.signal` has aborted.
|
|
354
|
+
Options already shown stay visible while `loading` is set, with the in-field `spinner`; the
|
|
355
|
+
`loading` row appears only while no option is shown. A `source`/`dataSource` provider takes
|
|
356
|
+
precedence over the flag.
|
|
357
|
+
- `currentOption: LyraOption | undefined` — the `<lr-option>` behind the keyboard-active
|
|
358
|
+
row, or `undefined` while none is active, the listbox is closed, or the active row is an async or
|
|
359
|
+
synthetic row with no option element. It clears as soon as that option stops being available. Assigning a shown, available option moves
|
|
360
|
+
the highlight to it (selecting nothing, emitting nothing); any other value clears the highlight.
|
|
332
361
|
- `maxRender: number = 200` (attribute `max-render`) — ordinary suggestion-prefix size, retaining
|
|
333
362
|
active and selected options within an absolute 1,000-row ceiling. The active option has priority;
|
|
334
363
|
selections remain committed even when every selected row cannot mount. Zero omits the ordinary
|
|
@@ -397,7 +426,8 @@ minimum at zero when empty-query label lookup or immediate catalog browsing is r
|
|
|
397
426
|
**Methods:** `focus(options?)`, `blur()`, `select()`, `setSelectionRange()`, and `setRangeText()`
|
|
398
427
|
forward to the internal input. `setRangeText()` synchronizes the filter query and visible options.
|
|
399
428
|
`show(): Promise<void>` and `hide(): Promise<void>` settle after `lr-after-show` and
|
|
400
|
-
`lr-after-hide`, respectively. `
|
|
429
|
+
`lr-after-hide`, respectively. `reload(): void` is an alias of `refresh()`; in `server` mode both
|
|
430
|
+
announce a fresh `lr-options-request`. `refresh(): void` re-runs the current `source` query without changing
|
|
401
431
|
the source's identity, its debounce controller, or its delay. Reassigning `source` is a provider
|
|
402
432
|
change and clears the fetched rows and pending-selection cache; `refresh()` does not. It queues for
|
|
403
433
|
the next open while the listbox is closed, and is a no-op without a `source`. `resetValidity()`
|
|
@@ -413,7 +443,7 @@ every selection change and a `form.reset()` — like a native control, only anot
|
|
|
413
443
|
**8.0 migration:** the former camel-case string property `autoCorrect` is not retained as a public
|
|
414
444
|
alias. Set the boolean `autocorrect` IDL, or use `autocorrect="on"` / `autocorrect="off"` in markup.
|
|
415
445
|
|
|
416
|
-
`ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly icon?: unknown; readonly start?: unknown;
|
|
446
|
+
`ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly html?: string; readonly icon?: unknown; readonly start?: unknown;
|
|
417
447
|
readonly end?: unknown; readonly badge?: string |
|
|
418
448
|
number; readonly title?: string; accessibleLabel?: string; data?: unknown; dotColor?: string; group?: string; disabled?:
|
|
419
449
|
boolean }` — the row shape used by the async `source` path. `start` and `end` (new in 11.0.0) are
|
|
@@ -426,6 +456,19 @@ of the accessible name), and `data` is retained without being rendered
|
|
|
426
456
|
for retrieval through `selectedRows`.
|
|
427
457
|
`dotColor` accepts a valid CSS `color`; invalid values, declaration-breaking input, and `url()`
|
|
428
458
|
render a transparent dot.
|
|
459
|
+
`html` is optional rich markup shown in place of the label text, as the `option-html`
|
|
460
|
+
part. It always passes through the optional `dompurify` peer (install it to use this field) and then a
|
|
461
|
+
passive-content pass: script, event handlers, `style`, `part`, network attributes (`src`, `href`, …),
|
|
462
|
+
iframes and media are removed, and links, buttons, form controls and custom elements are replaced by
|
|
463
|
+
their text. A result superseded by a newer query is never applied. The row's text `label` remains its
|
|
464
|
+
accessible name, filter text and committed text, and the rich content is `aria-hidden`; use
|
|
465
|
+
`accessibleLabel` for a fuller spoken name as usual. While the peer loads, every row shows its plain
|
|
466
|
+
label. If the peer is missing, unusable or throws, rows stay on their plain labels (raw markup is never
|
|
467
|
+
rendered), the listbox shows the localized `comboboxRichContentUnavailable` message as
|
|
468
|
+
`option-html-fallback` (plain text, not a live region), and the same message is announced once to
|
|
469
|
+
`[data-lr-live-region="polite"]`. Markup longer than 4,096 UTF-16 code units, or markup that sanitizes
|
|
470
|
+
to nothing, leaves the plain label. Style the content through `::part(option-html)` and inherited properties; class names in the
|
|
471
|
+
markup do not match the component's shadow styles.
|
|
429
472
|
The light-DOM `<lr-option>` path normalizes its supported label/sub/dot/group/data fields to the
|
|
430
473
|
same internal row model — `<lr-option data>` is the light-DOM counterpart of an async row's own
|
|
431
474
|
`data` field, reached by reference through `selectedRows` exactly the same way.
|
|
@@ -502,6 +545,11 @@ never shows the raw error. A current request that rejects with `AbortError` (one
|
|
|
502
545
|
not abort itself) is a failure like any other rejection; the previous query's results are not kept
|
|
503
546
|
as its answer.
|
|
504
547
|
Rejections from superseded or disconnected requests are ignored.
|
|
548
|
+
`lr-options-request` fires before each `source`/`dataSource` call and for each `server`-mode request (after the debounce, only while the call is still
|
|
549
|
+
current): `detail: { query, signal }`, where `signal` is the `AbortSignal` the source receives, aborted
|
|
550
|
+
when a newer request supersedes it, `source` is reassigned, or the control disconnects. It is bubbling,
|
|
551
|
+
composed and not cancelable. `lr-options-error` fires with `lr-source-error` for the same rejection with
|
|
552
|
+
`detail: { error, request: { query } }`; both events stay.
|
|
505
553
|
`lr-retry-request` is cancelable; the built-in failed-load action calls `refresh()`, and `preventDefault()`
|
|
506
554
|
leaves the failure on screen. While the failure state is the only popup content, the popup swaps
|
|
507
555
|
`role="listbox"` for `role="dialog"` (the input gains the matching `aria-haspopup="dialog"` and
|
|
@@ -572,13 +620,17 @@ attribute when provided), plus two adornment slots:
|
|
|
572
620
|
- `source-error` — replaces the built-in failed-`source` state, retry control included. Deliberately
|
|
573
621
|
named apart from the form-control `error` slot: they are different failures and a field has to be
|
|
574
622
|
able to show both.
|
|
623
|
+
- `empty`, `no-results` and `loading` — replace the listbox status row shown while no option is
|
|
624
|
+
available and nothing is typed, while the typed query matches nothing, and while options load.
|
|
625
|
+
Each falls back to `empty-text`/`loading-text`, else the localized `noMatches`/`loading` copy.
|
|
575
626
|
|
|
576
627
|
**CSS parts:** `form-control`, `form-control-label`, `label`, `form-control-input`, `combobox`,
|
|
577
628
|
`start` and `end` (the two
|
|
578
629
|
adornment-slot wrappers, each `hidden` while nothing is slotted into it), `tags`, `tag`,
|
|
579
630
|
`tag-overflow` (the "+N" indicator, carried alongside `tag` past `max-options-visible`,
|
|
580
631
|
mirroring `lr-select`'s identical two-part overflow chip), `tag-label`, `tag__content`,
|
|
581
|
-
`tag__remove-button`, `tag__remove-button__base`, `
|
|
632
|
+
`tag__remove-button`, `tag__remove-button__base`, `tag__remove-button__button` (an alias on the
|
|
633
|
+
same remove button), `combobox-input`,
|
|
582
634
|
`clear-button`, `unknown-value` (the dashed/italic badge shown next to the closed single-select
|
|
583
635
|
input, or on a `multiple`-mode tag, when the committed value matches no current option/row),
|
|
584
636
|
`expand-icon`, `listbox` (the scrolling popup; it honors the theme-level
|
|
@@ -593,10 +645,18 @@ aria-hidden adornments cloned from the source option's `start`/`prefix` and `end
|
|
|
593
645
|
from an async row's `start`/`end`), `option-label`, `option-sub` (a row's
|
|
594
646
|
secondary line, when `sub` is set), `option-badge` (an async row's trailing metadata),
|
|
595
647
|
`option-overflow` (the "+N more" indicator from `maxRender`),
|
|
648
|
+
`option-html` (the sanitized rich content of an async row carrying `html`, hidden from assistive
|
|
649
|
+
technology), `option-html-fallback` (the localized note shown when the `dompurify` peer is unavailable),
|
|
596
650
|
`source-error-row` (the listbox row holding the failed-`source` state), `source-error` (the shared
|
|
597
651
|
failed-load state itself, with `source-error-base`, `source-error-icon`, `source-error-heading`,
|
|
598
652
|
`source-error-description` and `source-error-actions` forwarded from the composed `<lr-empty>`),
|
|
599
|
-
`retry-button`, `
|
|
653
|
+
`retry-button`, `status` (the listbox status row, which also carries `empty`, `no-results` or
|
|
654
|
+
`loading`), `empty`, `no-results`, `loading`, `spinner` (the decorative in-field spinner shown while
|
|
655
|
+
options load and the listbox is not showing its loading row), `error`, `hint`
|
|
656
|
+
|
|
657
|
+
**Custom states** add `:state(loading)` (`loading` is set or a `source`/`dataSource` request is in
|
|
658
|
+
flight) and `:state(showing-loading-row)` (the open listbox shows its loading row, so the in-field
|
|
659
|
+
spinner is hidden) to `blank`, `disabled` and the shared validity states.
|
|
600
660
|
|
|
601
661
|
`--lr-form-control-invalid-border-color` (default `var(--lr-color-danger)`) themes the resting border while the field matches `:state(user-invalid)`; a component-specific invalid border, where one exists, overrides it.
|
|
602
662
|
|
|
@@ -673,7 +733,7 @@ can retheme the selected row without hijacking `--lr-color-brand` library-wide.
|
|
|
673
733
|
The listbox popup itself is a floating surface and paints from the **shared overlay-surface family**
|
|
674
734
|
(16.0.0), not from the page surface every card and input reads: `--lr-overlay-surface` (default
|
|
675
735
|
`var(--lr-color-surface-overlay)`), `--lr-overlay-border` (default `var(--lr-color-border)`),
|
|
676
|
-
`--lr-overlay-radius` (default `var(--lr-radius)`) and `--lr-overlay-shadow-anchored` (default
|
|
736
|
+
`--lr-overlay-radius` (default `var(--lr-radius-container)`) and `--lr-overlay-shadow-anchored` (default
|
|
677
737
|
`var(--lr-shadow-m)`). None is declared on `:host`, so one declaration on `:root` — or on any
|
|
678
738
|
ancestor, to scope it — retints this popup together with every other floating surface, and none of
|
|
679
739
|
it touches the trigger row the popup drops from. The edge deliberately keeps the control tier, `var(--lr-color-border)`, rather than the
|
|
@@ -695,6 +755,9 @@ see "exact-height hatches" under `lr-input` for why `auto` is not a way to opt b
|
|
|
695
755
|
for a single-row combobox: in `multiple` mode, a tag row long enough to wrap overflows the pinned
|
|
696
756
|
box visibly (nothing is clipped or made unreachable), so leave it unset there.
|
|
697
757
|
|
|
758
|
+
More themeable custom properties: `--lr-form-control-label-line-height` (default `inherit`): Line
|
|
759
|
+
height of the field label.
|
|
760
|
+
|
|
698
761
|
**CSS custom states:** `blank`, `disabled`, `required`, `optional`, `valid`, `invalid`,
|
|
699
762
|
`user-valid`, and `user-invalid`.
|
|
700
763
|
|
|
@@ -860,3 +923,12 @@ synchronous and fires no `input`/`change`/`lr-change` event.
|
|
|
860
923
|
<a id="popup-select-keyboard"></a>
|
|
861
924
|
|
|
862
925
|
The start-placed label aligns to the first line of the field, measured with `--lr-form-control-height`.
|
|
926
|
+
|
|
927
|
+
`--lr-form-control-transition` (default `none`) is the shared opt-in `transition` for the field's border and halo; see the shared form-control tokens.
|
|
928
|
+
|
|
929
|
+
Further custom properties:
|
|
930
|
+
|
|
931
|
+
- `--lr-form-control-label-gap` also spaces a label above the field.
|
|
932
|
+
- `--lr-form-control-label-line-height` (default `inherit`): Line height of the field label.
|
|
933
|
+
- `--lr-form-control-label-text-align` (default `inherit`): Text alignment of the field label.
|
|
934
|
+
- `--lr-form-control-label-text-transform` (default `inherit`): Text transform of the field label.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via** 2 parts,
|
|
12
|
+
- **Themeable via** 2 parts, 10 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -186,9 +186,11 @@ parent; set `lr-context-menu { display: block }` to get a box.
|
|
|
186
186
|
`lr-context-menu` or any ancestor): `--max-width`
|
|
187
187
|
(`var(--lr-overlay-max-inline-size, var(--lr-size-20rem))`), `--lr-overlay-surface`
|
|
188
188
|
(`var(--lr-color-surface-overlay)`), `--lr-overlay-border` (`var(--lr-color-border-subtle)`),
|
|
189
|
-
`--lr-overlay-radius` (`var(--lr-radius)`), `--lr-overlay-shadow-anchored` (`var(--lr-shadow-m)`),
|
|
190
|
-
`--lr-overlay-max-inline-size` (`var(--lr-size-20rem)`),
|
|
191
|
-
(
|
|
189
|
+
`--lr-overlay-radius` (`var(--lr-radius-container)`), `--lr-overlay-shadow-anchored` (`var(--lr-shadow-m)`),
|
|
190
|
+
`--lr-overlay-max-inline-size` (`var(--lr-size-20rem)`), `--lr-context-menu-min-inline-size`
|
|
191
|
+
(the menu's minimum inline size, capped by the available space; it wins over the shared
|
|
192
|
+
`--lr-overlay-min-inline-size`, default `0px`, which it falls back to while unset), and
|
|
193
|
+
`--show-duration` / `--hide-duration` (`var(--lr-transition-fast)`). Row styling uses the `--lr-menu-item-*` properties on your rows.
|
|
192
194
|
The popup always uses fixed positioning (the anchor is a viewport point), so the cascading
|
|
193
195
|
`--lr-positioning-strategy` is not consulted. Like `lr-dropdown`, it is promoted to the top layer
|
|
194
196
|
only when a transformed, filtered or contained ancestor (such as an `lr-virtual-list` row) would
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 14 parts, 2 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -60,9 +60,10 @@ buttons.
|
|
|
60
60
|
`xl` ladder; `small`/`medium`/`large` alias `s`/`m`/`l`. Scales the minimum hit area, glyph font
|
|
61
61
|
and corner radius. Unset preserves the established icon-button footprint and inherited font;
|
|
62
62
|
custom default-slot triggers keep their own geometry.
|
|
63
|
-
- `feedbackDuration: number =
|
|
64
|
-
confirmation **or** the failure state returns to the copy icon
|
|
65
|
-
`
|
|
63
|
+
- `feedbackDuration: number = 1000` (attribute `feedback-duration`) — milliseconds before the
|
|
64
|
+
confirmation **or** the failure state returns to the copy icon; the default matches
|
|
65
|
+
`wa-copy-button` and `sl-copy-button`. A non-finite value falls back to `1000` rather than
|
|
66
|
+
leaving the state stuck; a negative one clamps to `0`.
|
|
66
67
|
|
|
67
68
|
**Methods:** `focus(options?)`, `blur()` and `click()` forward to the active built-in or custom
|
|
68
69
|
trigger. `getToolbarActions(): readonly LyraToolbarAction[]` implements the public logical-toolbar
|
|
@@ -113,6 +114,7 @@ the built-in button. Exactly one named icon is rendered at a time.
|
|
|
113
114
|
not reliably announced (JAWS with Firefox ignores one outright). Assert against that
|
|
114
115
|
document-level region rather than `::part(feedback)`; the part is a styling and inspection
|
|
115
116
|
surface, and still tells you what the button last announced.
|
|
117
|
+
- `copy-button` — the Web Awesome-named outer wrapper (the nested tooltip element holding the trigger).
|
|
116
118
|
- `tooltip__base`, `tooltip__base__popup`, `tooltip__base__arrow`, `tooltip__body` — exported nested
|
|
117
119
|
tooltip parts.
|
|
118
120
|
|