@aceshooting/lyra-ui 9.1.1 → 10.0.1
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 +597 -0
- package/custom-elements.json +1 -1
- package/dist/cli/migrate-wa.mjs +52 -0
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +0 -16
- package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.class.js +1 -1
- package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.styles.js +7 -5
- package/dist/components/agent-tools/agent-run/agent-run.class.js +2 -2
- package/dist/components/agent-tools/agent-run/agent-run.styles.js +0 -13
- package/dist/components/agent-tools/agent-trace/agent-trace.styles.js +7 -4
- package/dist/components/agent-tools/approval-queue/approval-queue.styles.js +7 -5
- package/dist/components/agent-tools/artifact-panel/artifact-panel.styles.js +0 -3
- package/dist/components/agent-tools/browser-frame/browser-frame.styles.js +3 -5
- package/dist/components/agent-tools/commit-card/commit-card.styles.js +0 -10
- package/dist/components/agent-tools/compare-panel/compare-panel.styles.js +11 -6
- package/dist/components/agent-tools/confirm-bar/confirm-bar.styles.js +0 -46
- package/dist/components/agent-tools/eval-dataset/eval-dataset.styles.js +0 -7
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +2 -2
- package/dist/components/agent-tools/prompt-studio/prompt-studio.styles.js +0 -15
- package/dist/components/agent-tools/result-card/result-card.styles.js +0 -7
- package/dist/components/agent-tools/result-card/result-field.styles.js +0 -5
- package/dist/components/agent-tools/schema-viewer/schema-viewer.styles.js +0 -3
- package/dist/components/agent-tools/span-waterfall/span-waterfall.styles.js +0 -15
- package/dist/components/agent-tools/stack-trace/stack-trace.styles.js +0 -20
- package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +2 -2
- package/dist/components/agent-tools/subagent-panel/subagent-panel.styles.js +0 -3
- package/dist/components/agent-tools/task-list/task-list.styles.js +0 -15
- package/dist/components/agent-tools/terminal/terminal.class.d.ts +11 -6
- package/dist/components/agent-tools/terminal/terminal.class.js +4 -4
- package/dist/components/agent-tools/terminal/terminal.styles.js +0 -46
- package/dist/components/agent-tools/test-results/test-results.class.js +2 -2
- package/dist/components/agent-tools/test-results/test-results.styles.js +0 -5
- package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +0 -41
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.styles.js +0 -41
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.styles.js +0 -30
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +6 -6
- package/dist/components/agent-tools/tool-param-form/tool-param-form.styles.js +0 -5
- package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +0 -20
- package/dist/components/agent-tools/tool-result-view/tool-result-view.styles.js +0 -4
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.styles.js +0 -21
- package/dist/components/agent-tools/trace-tree/trace-tree.styles.js +7 -31
- package/dist/components/charts/chart/box-plot.styles.js +0 -20
- package/dist/components/charts/chart/chart-colors.d.ts +1 -1
- package/dist/components/charts/chart/chart-colors.js +1 -1
- package/dist/components/charts/chart/chart-core-loader.d.ts +1 -0
- package/dist/components/charts/chart/chart-core-loader.js +1 -1
- package/dist/components/charts/chart/chart-feature-loader.d.ts +35 -0
- package/dist/components/charts/chart/chart-feature-loader.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +93 -0
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/charts/chart/chart.styles.js +0 -27
- package/dist/components/charts/chart/lite-chart.class.d.ts +20 -1
- package/dist/components/charts/chart/lite-chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart.styles.js +0 -27
- package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +20 -0
- package/dist/components/conversation/agent-workspace/agent-workspace.class.js +3 -1
- package/dist/components/conversation/agent-workspace/agent-workspace.styles.js +3 -0
- package/dist/components/conversation/audio-visualizer/audio-visualizer.styles.js +0 -7
- package/dist/components/conversation/branch-picker/branch-picker.styles.js +0 -3
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +0 -51
- package/dist/components/conversation/chat-message/chat-message.styles.js +7 -35
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +0 -33
- package/dist/components/conversation/checkpoint/checkpoint.class.js +1 -1
- package/dist/components/conversation/checkpoint/checkpoint.styles.js +0 -3
- package/dist/components/conversation/code-block/code-block-shared.d.ts +5 -2
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/code-block/code-block.styles.js +4 -95
- package/dist/components/conversation/code-block/code-loader.d.ts +11 -0
- package/dist/components/conversation/code-block/code-loader.js +1 -1
- package/dist/components/conversation/code-block/shiki-types.d.ts +12 -0
- package/dist/components/conversation/code-block/shiki-types.js +1 -1
- package/dist/components/conversation/conversation-item/conversation-item.styles.js +8 -54
- package/dist/components/conversation/generation-metrics/generation-metrics.class.js +2 -2
- package/dist/components/conversation/generation-metrics/generation-metrics.styles.js +0 -17
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown.styles.js +0 -41
- package/dist/components/conversation/message-actions/message-actions.styles.js +0 -3
- package/dist/components/conversation/message-feedback/message-feedback.styles.js +0 -35
- package/dist/components/conversation/message-parts/message-parts.class.d.ts +1 -1
- package/dist/components/conversation/message-parts/message-parts.styles.js +0 -5
- package/dist/components/conversation/model-select/model-select.class.js +3 -3
- package/dist/components/conversation/model-select/model-select.styles.js +12 -47
- package/dist/components/conversation/model-settings-panel/model-settings-panel.styles.js +0 -6
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +3 -0
- package/dist/components/conversation/prompt-input/prompt-input.styles.js +0 -10
- package/dist/components/conversation/push-to-talk/push-to-talk.styles.js +0 -8
- package/dist/components/conversation/selection-toolbar/selection-toolbar.styles.js +1 -11
- package/dist/components/conversation/stream-status/stream-status.styles.js +0 -16
- package/dist/components/conversation/streaming-text/streaming-text.styles.js +0 -15
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +0 -5
- package/dist/components/conversation/thread-list/thread-list.styles.js +0 -23
- package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +16 -4
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.styles.js +0 -1
- package/dist/components/conversation/typing-indicator/typing-indicator.styles.js +0 -23
- package/dist/components/conversation/usage-badge/usage-badge.styles.js +0 -3
- package/dist/components/conversation/voice-picker/voice-picker.class.js +3 -3
- package/dist/components/conversation/voice-picker/voice-picker.styles.js +9 -29
- package/dist/components/conversation/widget-renderer/resolve.d.ts +2 -0
- package/dist/components/conversation/widget-renderer/resolve.js +1 -1
- package/dist/components/data/calendar/calendar.class.d.ts +15 -2
- package/dist/components/data/calendar/calendar.class.js +2 -2
- package/dist/components/data/calendar/calendar.styles.js +2 -28
- package/dist/components/data/condition-builder/condition-builder.class.d.ts +10 -6
- package/dist/components/data/condition-builder/condition-builder.class.js +2 -2
- package/dist/components/data/condition-builder/condition-builder.styles.js +0 -6
- package/dist/components/data/context-meter/context-meter.styles.js +0 -24
- package/dist/components/data/data-grid/data-grid.class.js +3 -3
- package/dist/components/data/data-grid/data-grid.styles.js +0 -22
- package/dist/components/data/document-library/document-library.class.js +2 -2
- package/dist/components/data/document-library/document-library.styles.js +0 -4
- package/dist/components/data/env-list/env-list.class.js +1 -1
- package/dist/components/data/env-list/env-list.styles.js +7 -4
- package/dist/components/data/file-tree/file-tree.class.d.ts +12 -0
- package/dist/components/data/flow-canvas/flow-canvas.styles.js +12 -19
- package/dist/components/data/flow-controls/flow-controls.class.js +2 -2
- package/dist/components/data/flow-controls/flow-controls.styles.js +3 -36
- package/dist/components/data/flow-minimap/flow-minimap.class.js +1 -1
- package/dist/components/data/flow-minimap/flow-minimap.styles.js +0 -9
- package/dist/components/data/flow-node/flow-node.styles.js +0 -23
- package/dist/components/data/flow-run-status/flow-run-status.class.js +1 -1
- package/dist/components/data/flow-run-status/flow-run-status.styles.js +0 -7
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +0 -7
- package/dist/components/data/graph-query-builder/graph-query-builder.class.js +1 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +0 -10
- package/dist/components/data/heatmap/heatmap-scale.d.ts +20 -0
- package/dist/components/data/heatmap/heatmap-scale.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +84 -1
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.styles.js +0 -54
- package/dist/components/data/pagination/pagination.styles.js +23 -46
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +34 -1
- package/dist/components/data/sequence-strip/sequence-strip.class.js +5 -2
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +14 -20
- package/dist/components/data/sparkline/sparkline.class.js +1 -1
- package/dist/components/data/stat/stat.styles.js +0 -67
- package/dist/components/data/table/table.class.d.ts +42 -3
- package/dist/components/data/table/table.class.js +4 -4
- package/dist/components/data/table/table.styles.js +20 -91
- package/dist/components/data/timeline/timeline-item.styles.js +0 -30
- package/dist/components/data/timeline/timeline.class.d.ts +89 -1
- package/dist/components/data/timeline/timeline.class.js +2 -2
- package/dist/components/data/timeline/timeline.styles.js +111 -31
- package/dist/components/data/tree/tree-item.styles.js +1 -28
- package/dist/components/data/tree/tree.class.js +2 -2
- package/dist/components/data/tree/tree.styles.js +0 -6
- package/dist/components/data/word-cloud/word-cloud.styles.js +0 -5
- package/dist/components/forms/button/button.class.js +1 -1
- package/dist/components/forms/button/button.styles.js +0 -105
- package/dist/components/forms/checkbox/checkbox.class.d.ts +3 -0
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox/checkbox.styles.js +0 -39
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +21 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.styles.js +0 -18
- package/dist/components/forms/code-editor/code-editor.styles.js +0 -30
- package/dist/components/forms/color-picker/color-picker.class.js +2 -2
- package/dist/components/forms/color-picker/color-picker.styles.js +0 -69
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/combobox/combobox.styles.js +22 -111
- package/dist/components/forms/combobox/option.styles.js +7 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/date-picker/date-input.styles.js +12 -67
- package/dist/components/forms/date-picker/date-picker.class.d.ts +1 -0
- package/dist/components/forms/date-picker/date-picker.class.js +22 -20
- package/dist/components/forms/date-picker/date-picker.styles.js +36 -29
- package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +6 -3
- package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +8 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js +3 -41
- package/dist/components/forms/icon-button/icon-button.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.styles.js +0 -16
- package/dist/components/forms/input/input.styles.js +0 -54
- package/dist/components/forms/input/number-input.styles.d.ts +4 -5
- package/dist/components/forms/input/number-input.styles.js +0 -11
- package/dist/components/forms/input/time-input-shared.d.ts +11 -0
- package/dist/components/forms/input/time-input-shared.js +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +11 -2
- package/dist/components/forms/input/time-input.class.js +1 -1
- package/dist/components/forms/input/time-input.styles.js +0 -6
- package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -26
- package/dist/components/forms/otp-input/otp-input.class.js +3 -3
- package/dist/components/forms/otp-input/otp-input.styles.js +0 -16
- package/dist/components/forms/phone-input/phone-input.class.d.ts +9 -1
- package/dist/components/forms/phone-input/phone-input.class.js +2 -2
- package/dist/components/forms/phone-input/phone-input.styles.js +0 -37
- package/dist/components/forms/radio/radio-button.styles.js +1 -30
- package/dist/components/forms/radio/radio-group.styles.js +0 -4
- package/dist/components/forms/radio/radio.styles.js +0 -44
- package/dist/components/forms/rubric-form/rubric-form.styles.js +0 -5
- package/dist/components/forms/select/select.class.js +1 -1
- package/dist/components/forms/select/select.styles.js +14 -114
- package/dist/components/forms/slider/slider.styles.js +0 -55
- package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +0 -11
- package/dist/components/forms/swatch-picker/swatch-picker.class.js +2 -2
- package/dist/components/forms/swatch-picker/swatch-picker.styles.js +0 -77
- package/dist/components/forms/switch/switch.class.d.ts +3 -0
- package/dist/components/forms/switch/switch.class.js +1 -1
- package/dist/components/forms/switch/switch.styles.js +0 -37
- package/dist/components/forms/textarea/textarea.styles.js +0 -28
- package/dist/components/forms/time-range/time-range.styles.js +12 -84
- package/dist/components/forms/token-input/token-input.class.d.ts +23 -9
- package/dist/components/forms/token-input/token-input.class.js +1 -1
- package/dist/components/forms/token-input/token-input.styles.js +1 -54
- package/dist/components/layout/app-rail/app-rail-item.class.js +2 -2
- package/dist/components/layout/app-rail/app-rail-item.styles.js +0 -13
- package/dist/components/layout/app-rail/app-rail.class.d.ts +5 -0
- package/dist/components/layout/app-rail/app-rail.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail.styles.js +0 -46
- package/dist/components/layout/button-group/button-group.styles.js +0 -6
- package/dist/components/layout/card/card.class.d.ts +12 -0
- package/dist/components/layout/card/card.styles.js +3 -11
- package/dist/components/layout/carousel/carousel.styles.js +0 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +8 -0
- package/dist/components/layout/command-palette/command-palette.class.js +3 -1
- package/dist/components/layout/command-palette/command-palette.styles.js +1 -13
- package/dist/components/layout/control-group/control-group.styles.js +0 -7
- package/dist/components/layout/dashboard-grid/dashboard-grid.styles.js +6 -25
- package/dist/components/layout/details/accordion.class.d.ts +13 -0
- package/dist/components/layout/details/accordion.class.js +1 -1
- package/dist/components/layout/details/details.class.js +1 -1
- package/dist/components/layout/details/details.styles.js +0 -12
- package/dist/components/layout/dock-panel/dock-panel.styles.js +0 -45
- package/dist/components/layout/drilldown-panel/drilldown-panel.class.d.ts +2 -0
- package/dist/components/layout/drilldown-panel/drilldown-panel.class.js +2 -2
- package/dist/components/layout/drilldown-panel/drilldown-panel.styles.js +0 -4
- package/dist/components/layout/filter-bar/filter-bar.class.js +1 -1
- package/dist/components/layout/filter-bar/filter-bar.styles.js +0 -9
- package/dist/components/layout/menu/menu-item.class.d.ts +5 -0
- package/dist/components/layout/menu/menu-item.class.js +1 -1
- package/dist/components/layout/menu/menu-item.styles.js +0 -49
- package/dist/components/layout/menu/menu-label.styles.js +0 -2
- package/dist/components/layout/menu/menu.styles.js +0 -18
- package/dist/components/layout/multi-split/multi-split.styles.js +0 -63
- package/dist/components/layout/page/page.class.d.ts +4 -0
- package/dist/components/layout/page/page.class.js +1 -1
- package/dist/components/layout/reorder-list/reorder-item.styles.js +0 -4
- package/dist/components/layout/responsive-panel/responsive-panel.styles.js +0 -27
- package/dist/components/layout/scroller/scroller.styles.js +0 -20
- package/dist/components/layout/segmented/segmented.class.d.ts +7 -1
- package/dist/components/layout/segmented/segmented.class.js +1 -1
- package/dist/components/layout/segmented/segmented.styles.js +69 -37
- package/dist/components/layout/split-panel/split-panel.styles.js +1 -7
- package/dist/components/layout/stepper/stepper.class.d.ts +8 -1
- package/dist/components/layout/stepper/stepper.class.js +1 -1
- package/dist/components/layout/stepper/stepper.styles.js +140 -41
- package/dist/components/layout/tab-group/tab-group.class.d.ts +4 -1
- package/dist/components/layout/tab-group/tab-group.styles.js +9 -75
- package/dist/components/layout/tab-group/tab.styles.js +0 -2
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +4 -4
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.styles.js +0 -68
- package/dist/components/layout/widget/widget.class.d.ts +5 -1
- package/dist/components/layout/widget/widget.class.js +1 -1
- package/dist/components/layout/widget/widget.styles.js +97 -40
- package/dist/components/media/animated-image/animated-image.class.d.ts +3 -0
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.styles.js +0 -28
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.styles.js +0 -31
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/attachment-trigger/attachment-trigger.styles.js +0 -40
- package/dist/components/media/av-player/av-player.class.d.ts +5 -6
- package/dist/components/media/av-player/av-player.class.js +1 -1
- package/dist/components/media/av-player/av-player.styles.js +0 -45
- package/dist/components/media/avatar/avatar.styles.js +3 -16
- package/dist/components/media/file-icon/file-icon.class.d.ts +1 -2
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/file-input/file-input.class.d.ts +12 -0
- package/dist/components/media/file-input/file-input.styles.js +3 -24
- package/dist/components/media/flag/flag.class.d.ts +20 -0
- package/dist/components/media/flag/flag.class.js +4 -2
- package/dist/components/media/flag/flag.styles.js +7 -1
- package/dist/components/media/flag/language-map.d.ts +10 -0
- package/dist/components/media/flag/language-map.js +1 -1
- package/dist/components/media/image-comparer/image-comparer.styles.js +4 -33
- package/dist/components/media/image-viewer/image-viewer.class.js +0 -2
- package/dist/components/media/image-viewer/image-viewer.styles.js +7 -27
- package/dist/components/media/lightbox/lightbox.class.js +0 -2
- package/dist/components/media/lightbox/lightbox.styles.js +0 -21
- package/dist/components/media/map/map-loader.d.ts +19 -1
- package/dist/components/media/map/map-loader.js +1 -1
- package/dist/components/media/map/map.class.d.ts +141 -1
- package/dist/components/media/map/map.class.js +15 -3
- package/dist/components/media/map/map.styles.js +20 -17
- package/dist/components/media/media-card/media-card.class.d.ts +14 -3
- package/dist/components/media/media-card/media-card.class.js +1 -1
- package/dist/components/media/media-card/media-card.styles.js +2 -28
- package/dist/components/media/pan-zoom/pan-zoom.styles.js +0 -3
- package/dist/components/media/qr-code/qr-code.class.d.ts +3 -2
- package/dist/components/media/qr-code/qr-code.class.js +2 -2
- package/dist/components/media/qr-code/qr-code.styles.js +0 -3
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +2 -0
- package/dist/components/media/sequence-playback/sequence-playback.class.js +2 -1
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +0 -19
- package/dist/components/media/video/video.class.d.ts +23 -2
- package/dist/components/media/video/video.class.js +3 -3
- package/dist/components/media/video/video.styles.js +4 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +3 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.class.js +2 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.styles.js +0 -5
- package/dist/components/overlays/alert/alert.styles.js +4 -2
- package/dist/components/overlays/badge/badge.styles.js +4 -48
- package/dist/components/overlays/badge/tag.styles.js +0 -14
- package/dist/components/overlays/callout/callout.styles.js +0 -11
- package/dist/components/overlays/chip/chip-group.styles.js +0 -18
- package/dist/components/overlays/chip/chip.styles.js +6 -69
- package/dist/components/overlays/dialog/confirm.d.ts +1 -4
- package/dist/components/overlays/dialog/confirm.js +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +12 -9
- package/dist/components/overlays/dialog/dialog.class.js +1 -1
- package/dist/components/overlays/dialog/dialog.styles.js +0 -43
- package/dist/components/overlays/drawer/drawer.class.d.ts +2 -2
- package/dist/components/overlays/drawer/drawer.styles.js +0 -9
- package/dist/components/overlays/empty/empty.styles.js +0 -12
- package/dist/components/overlays/kbd/kbd.styles.js +0 -8
- package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -6
- package/dist/components/overlays/overlay/dropdown.class.js +2 -2
- package/dist/components/overlays/overlay/overlay.styles.js +0 -28
- package/dist/components/overlays/overlay/popover.class.d.ts +9 -1
- package/dist/components/overlays/overlay/popover.class.js +2 -2
- package/dist/components/overlays/overlay/tooltip.class.d.ts +10 -0
- package/dist/components/overlays/overlay/tooltip.class.js +1 -1
- package/dist/components/overlays/popup/popup.class.d.ts +1 -0
- package/dist/components/overlays/popup/popup.class.js +1 -1
- package/dist/components/overlays/popup/popup.styles.js +0 -15
- package/dist/components/overlays/progress/progress-ring.class.d.ts +9 -1
- package/dist/components/overlays/progress/progress-ring.class.js +3 -3
- package/dist/components/overlays/progress/progress.styles.js +0 -21
- package/dist/components/overlays/rating/rating.styles.js +0 -25
- package/dist/components/overlays/skeleton/skeleton.styles.js +0 -4
- package/dist/components/overlays/spinner/spinner.styles.js +0 -3
- package/dist/components/overlays/toast/toast-item.styles.js +3 -45
- package/dist/components/retrieval/chunk-inspector/chunk-inspector.styles.js +0 -35
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +2 -2
- package/dist/components/retrieval/citation-badge/citation-badge.class.js +3 -3
- package/dist/components/retrieval/citation-badge/citation-badge.styles.js +0 -20
- package/dist/components/retrieval/claim-evidence/claim-evidence.styles.js +0 -8
- package/dist/components/retrieval/community-card/community-card.class.d.ts +1 -0
- package/dist/components/retrieval/community-card/community-card.styles.js +0 -6
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +8 -12
- package/dist/components/retrieval/entity-card/entity-card.class.d.ts +4 -3
- package/dist/components/retrieval/entity-card/entity-card.class.js +1 -1
- package/dist/components/retrieval/entity-card/entity-card.styles.js +0 -12
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +10 -4
- package/dist/components/retrieval/entity-chip/entity-chip.class.js +3 -3
- package/dist/components/retrieval/entity-chip/entity-chip.styles.js +6 -9
- package/dist/components/retrieval/entity-dossier/entity-dossier.class.d.ts +19 -5
- package/dist/components/retrieval/graph/graph.class.d.ts +5 -0
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/graph/graph.styles.js +0 -30
- package/dist/components/retrieval/graph-legend/graph-legend.styles.js +0 -3
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +0 -25
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.d.ts +2 -0
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.styles.js +0 -7
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +20 -6
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +2 -2
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.styles.js +0 -16
- package/dist/components/retrieval/mind-map/mind-map.class.d.ts +5 -3
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.styles.js +0 -2
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +3 -2
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.styles.js +0 -30
- package/dist/components/retrieval/node-palette/node-palette.styles.js +0 -11
- package/dist/components/retrieval/path-strip/path-strip.styles.js +0 -10
- package/dist/components/retrieval/provenance-panel/provenance-panel.class.d.ts +12 -3
- package/dist/components/retrieval/provenance-panel/provenance-panel.styles.js +0 -2
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +3 -2
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +2 -2
- package/dist/components/retrieval/retrieval-results/retrieval-results.styles.js +0 -28
- package/dist/components/retrieval/retrieval-search/retrieval-search.styles.js +0 -4
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.styles.js +0 -2
- package/dist/components/retrieval/source-card/source-card.styles.js +0 -13
- package/dist/components/retrieval/source-list/source-list.styles.js +0 -7
- package/dist/components/retrieval/source-picker/source-picker.styles.js +0 -7
- package/dist/components/utility/copy-button/copy-button.styles.js +0 -10
- package/dist/components/utility/diff-view/diff-view.styles.js +0 -14
- package/dist/components/utility/export-button/export-button.styles.js +0 -22
- package/dist/components/utility/icon/icon.styles.js +0 -6
- package/dist/components/utility/json-viewer/json-viewer.styles.js +2 -48
- package/dist/components/utility/known-date/known-date.class.d.ts +7 -3
- package/dist/components/utility/known-date/known-date.styles.js +10 -51
- package/dist/components/utility/live-region/live-region.styles.js +0 -4
- package/dist/components/utility/mention-popover/mention-popover.styles.js +0 -25
- package/dist/components/utility/poll-status/poll-status.styles.js +0 -4
- package/dist/components/utility/random-content/random-content.class.d.ts +22 -0
- package/dist/components/utility/random-content/random-content.class.js +3 -2
- package/dist/components/utility/random-content/random-content.styles.js +6 -13
- package/dist/components/utility/tour/tour.class.d.ts +4 -2
- package/dist/components/utility/tour/tour.class.js +3 -3
- package/dist/components/utility/tour/tour.styles.js +0 -13
- package/dist/components/utility/visually-hidden/visually-hidden.styles.js +0 -5
- package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.styles.d.ts +2 -2
- package/dist/components/viewers/archive-viewer/archive-viewer.styles.js +0 -10
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.styles.js +0 -19
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.styles.js +0 -15
- package/dist/components/viewers/document-compare/document-compare.styles.js +0 -3
- package/dist/components/viewers/document-preview/document-preview.styles.js +0 -25
- package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +2 -1
- package/dist/components/viewers/document-viewer/document-viewer.class.js +1 -1
- package/dist/components/viewers/document-viewer/document-viewer.styles.js +0 -5
- package/dist/components/viewers/docx-viewer/docx-viewer.styles.js +0 -17
- package/dist/components/viewers/ebook-viewer/ebook-viewer.styles.js +0 -4
- package/dist/components/viewers/email-viewer/email-viewer.styles.js +0 -7
- package/dist/components/viewers/geojson-view/geojson-view.styles.js +0 -5
- package/dist/components/viewers/highlight-layer/highlight-layer.styles.js +0 -3
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.styles.js +0 -38
- package/dist/components/viewers/page-rail/page-rail.class.js +1 -1
- package/dist/components/viewers/page-rail/page-rail.styles.js +0 -13
- package/dist/components/viewers/pdf-viewer/pdf-loader.d.ts +13 -2
- package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +32 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +4 -4
- package/dist/components/viewers/pdf-viewer/pdf-viewer.styles.js +1 -27
- package/dist/components/viewers/pptx-viewer/pptx-viewer.styles.js +0 -3
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.styles.js +0 -14
- package/dist/components/viewers/svg-viewer/svg-viewer.styles.js +0 -7
- package/dist/components/viewers/xml-viewer/xml-viewer.styles.js +2 -24
- package/dist/custom-elements-jsx.d.ts +56 -37
- package/dist/events.d.ts +43 -33
- package/dist/internal/agent-status-variants.d.ts +18 -0
- package/dist/internal/agent-status-variants.js +1 -0
- package/dist/internal/announcer.d.ts +8 -3
- package/dist/internal/announcer.js +1 -1
- package/dist/internal/autoloader-manifest.js +1 -1
- package/dist/internal/canvas-color.d.ts +16 -0
- package/dist/internal/canvas-color.js +1 -1
- package/dist/internal/catalog-picker.d.ts +0 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/default-strings.generated.d.ts +1 -0
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/dev-mode-attribute-warning.d.ts +27 -4
- package/dist/internal/dev-mode-attribute-warning.js +1 -1
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.d.ts +13 -0
- package/dist/internal/lyra-element.js +1 -1
- package/dist/internal/media-controller.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/scroll-overflow.d.ts +35 -13
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/sizes.styles.js +0 -2
- package/dist/internal/specialist-tokens.styles.js +6 -11
- package/dist/internal/text-highlights.d.ts +4 -1
- package/dist/internal/text-highlights.js +1 -1
- package/dist/internal/tokens/palette.styles.js +0 -15
- package/dist/internal/tokens.styles.js +19 -113
- package/dist/lyra.d.ts +8 -5
- package/dist/styles/reservations.css +82 -0
- package/dist/svelte.d.ts +56 -37
- package/dist/translations/ar.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/pt-BR.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/zh-CN.js +1 -1
- package/dist/vue.d.ts +56 -37
- package/llms/components/lr-accordion-item.md +12 -3
- package/llms/components/lr-accordion.md +11 -2
- package/llms/components/lr-agent-eval-dashboard.md +1 -1
- package/llms/components/lr-agent-trace.md +3 -1
- package/llms/components/lr-agent-workspace.md +20 -0
- package/llms/components/lr-artifact-panel.md +10 -4
- package/llms/components/lr-attachment-chip.md +7 -4
- package/llms/components/lr-attachment-trigger.md +7 -4
- package/llms/components/lr-av-player.md +3 -1
- package/llms/components/lr-avatar.md +6 -6
- package/llms/components/lr-bar-chart.md +4 -3
- package/llms/components/lr-box-plot.md +1 -1
- package/llms/components/lr-browser-frame.md +7 -3
- package/llms/components/lr-bubble-chart.md +4 -3
- package/llms/components/lr-calendar.md +9 -2
- package/llms/components/lr-card.md +24 -0
- package/llms/components/lr-chart.md +32 -8
- package/llms/components/lr-chat-viewport.md +7 -2
- package/llms/components/lr-checkbox-group.md +13 -5
- package/llms/components/lr-checkbox.md +5 -2
- package/llms/components/lr-checkpoint.md +6 -2
- package/llms/components/lr-combobox.md +5 -2
- package/llms/components/lr-command-palette.md +4 -1
- package/llms/components/lr-confirm-bar.md +7 -3
- package/llms/components/lr-context-meter.md +12 -11
- package/llms/components/lr-conversation-item.md +7 -4
- package/llms/components/lr-details.md +11 -2
- package/llms/components/lr-dialog.md +15 -10
- package/llms/components/lr-dock-panel.md +7 -10
- package/llms/components/lr-document-preview.md +6 -1
- package/llms/components/lr-document-viewer.md +3 -2
- package/llms/components/lr-doughnut-chart.md +4 -3
- package/llms/components/lr-drawer.md +3 -3
- package/llms/components/lr-entity-card.md +3 -3
- package/llms/components/lr-entity-chip.md +1 -1
- package/llms/components/lr-entity-dossier.md +4 -1
- package/llms/components/lr-file-input.md +2 -2
- package/llms/components/lr-flag.md +20 -5
- package/llms/components/lr-heatmap.md +28 -0
- package/llms/components/lr-histogram.md +3 -1
- package/llms/components/lr-icon.md +1 -1
- package/llms/components/lr-json-schema-viewer.md +2 -1
- package/llms/components/lr-knowledge-graph-explorer.md +8 -3
- package/llms/components/lr-known-date.md +4 -2
- package/llms/components/lr-line-chart.md +4 -3
- package/llms/components/lr-lite-chart.md +16 -6
- package/llms/components/lr-map.md +72 -8
- package/llms/components/lr-markdown-core.md +3 -2
- package/llms/components/lr-media-card.md +28 -12
- package/llms/components/lr-message-parts.md +2 -1
- package/llms/components/lr-model-select.md +9 -10
- package/llms/components/lr-model-settings-panel.md +9 -9
- package/llms/components/lr-neighbor-list.md +1 -1
- package/llms/components/lr-notebook-viewer.md +6 -3
- package/llms/components/lr-option.md +5 -2
- package/llms/components/lr-pdf-viewer.md +62 -2
- package/llms/components/lr-pie-chart.md +4 -3
- package/llms/components/lr-polar-area-chart.md +4 -3
- package/llms/components/lr-popover.md +5 -0
- package/llms/components/lr-progress-ring.md +8 -1
- package/llms/components/lr-prompt-studio.md +1 -1
- package/llms/components/lr-provenance-panel.md +4 -2
- package/llms/components/lr-qr-code.md +1 -1
- package/llms/components/lr-radar-chart.md +4 -3
- package/llms/components/lr-rag-eval-dashboard.md +2 -2
- package/llms/components/lr-random-content.md +13 -0
- package/llms/components/lr-reorder-item.md +6 -1
- package/llms/components/lr-reorder-list.md +6 -1
- package/llms/components/lr-responsive-panel.md +11 -7
- package/llms/components/lr-scatter-chart.md +4 -3
- package/llms/components/lr-sequence-strip.md +16 -2
- package/llms/components/lr-slider.md +12 -5
- package/llms/components/lr-sparkline.md +1 -1
- package/llms/components/lr-suggestion-chips.md +7 -2
- package/llms/components/lr-swatch-picker.md +5 -5
- package/llms/components/lr-switch.md +5 -2
- package/llms/components/lr-table.md +30 -4
- package/llms/components/lr-terminal.md +3 -1
- package/llms/components/lr-thread-list.md +8 -8
- package/llms/components/lr-time-input.md +6 -1
- package/llms/components/lr-timeline-item.md +24 -0
- package/llms/components/lr-timeline.md +25 -1
- package/llms/components/lr-token-input.md +7 -2
- package/llms/components/lr-tool-approval-dialog.md +7 -8
- package/llms/components/lr-tool-call-chip.md +5 -1
- package/llms/components/lr-tool-param-form.md +14 -12
- package/llms/components/lr-tool-result-dialog.md +11 -9
- package/llms/components/lr-tool-result-view.md +7 -6
- package/llms/components/lr-tool-select-dialog.md +18 -16
- package/llms/components/lr-trace-tree.md +3 -1
- package/llms/components/lr-usage-badge.md +4 -1
- package/llms/components/lr-video-playlist.md +1 -1
- package/llms/components/lr-virtual-list.md +22 -14
- package/llms/components/lr-voice-picker.md +8 -5
- package/llms/components/lr-widget-renderer.md +3 -3
- package/llms/components/lr-widget.md +1 -1
- package/llms/components/lr-word-cloud.md +6 -2
- package/llms/peers.md +12 -2
- package/llms/shared.md +70 -2
- package/llms-full.txt +1143 -285
- package/package.json +17 -5
- package/vscode-css-data.json +37 -2
- package/vscode-html-data.json +401 -44
- package/web-types.json +299 -55
|
@@ -3,47 +3,14 @@ import{css}from"lit";const styles=css`
|
|
|
3
3
|
display: block;
|
|
4
4
|
min-inline-size: 0;
|
|
5
5
|
max-inline-size: 100%;
|
|
6
|
-
/* Sequential ramp endpoints for the data-driven cell colors (canvas can't
|
|
7
|
-
consume var() directly, so heatmap.ts resolves these via
|
|
8
|
-
getComputedStyle and interpolates between them). Component-specific
|
|
9
|
-
business color — exposed so hosts can retheme
|
|
10
|
-
the ramp without raw hex leaking into the public API. */
|
|
11
6
|
--_lr-heatmap-scale-lo: var(--lr-color-brand-quiet);
|
|
12
7
|
--_lr-heatmap-scale-hi: var(--lr-color-brand);
|
|
13
|
-
/* No-data cell fill (the -1 sentinel / NaN case) — same resolve-via-
|
|
14
|
-
getComputedStyle pattern as the ramp endpoints above, so hosts can
|
|
15
|
-
retheme it instead of it being a hardcoded literal in heatmap.ts. */
|
|
16
8
|
--_lr-heatmap-no-data-fill: var(--lr-color-no-data);
|
|
17
|
-
/* Canvas-drawn axis/month/weekday label font — same resolve-via-
|
|
18
|
-
getComputedStyle pattern as the ramp endpoints above (canvas can't
|
|
19
|
-
consume var() directly). */
|
|
20
9
|
--_lr-heatmap-label-font: var(--lr-size-10px) var(--lr-font);
|
|
21
|
-
/* [part="tooltip"] is a real DOM element (not canvas-drawn), so unlike
|
|
22
|
-
the tokens above it consumes these var()s directly — no getComputedStyle
|
|
23
|
-
resolution needed. Own tokens (not the bare --lr-color-surface/-text)
|
|
24
|
-
so a host can retheme just the heatmap tooltip, same rationale as
|
|
25
|
-
chart.ts's --lr-chart-tooltip-bg/-text. */
|
|
26
10
|
--_lr-heatmap-tooltip-bg: var(--lr-color-surface);
|
|
27
11
|
--_lr-heatmap-tooltip-text: var(--lr-color-text);
|
|
28
|
-
/* Canvas-drawn focus-ring stroke around the keyboard-focused cell — same
|
|
29
|
-
resolve-via-getComputedStyle pattern as the ramp endpoints (canvas
|
|
30
|
-
can't consume var() directly). A dedicated token (rather than reusing
|
|
31
|
-
--lr-focus-ring-color straight from tokens.styles.ts) so a host can
|
|
32
|
-
retheme the in-canvas ring independently of every other :focus-visible
|
|
33
|
-
outline in the library, while defaulting to that same brand color —
|
|
34
|
-
also reused by the [part="canvas"]:focus-visible outline below so the
|
|
35
|
-
two stay visually in sync. */
|
|
36
12
|
--_lr-heatmap-focus-ring-color: var(--lr-focus-ring-color);
|
|
37
|
-
/* Canvas-drawn ring around annotated cells — same resolve-via-
|
|
38
|
-
getComputedStyle pattern. Defaults to --lr-color-danger (a loud,
|
|
39
|
-
attention-grabbing color distinct from the sequential data ramp) so an
|
|
40
|
-
annotation reads clearly against any point on that ramp. */
|
|
41
13
|
--_lr-heatmap-annotation-color: var(--lr-color-danger);
|
|
42
|
-
/* Canvas-drawn ring around the persistently selectedCell — same
|
|
43
|
-
resolve-via-getComputedStyle pattern. A dedicated token so a host can
|
|
44
|
-
retheme it independently of the focus ring
|
|
45
|
-
(--lr-heatmap-focus-ring-color) and the annotation ring
|
|
46
|
-
(--lr-heatmap-annotation-color) it's drawn between. */
|
|
47
14
|
--_lr-heatmap-selected-color: var(--lr-color-success);
|
|
48
15
|
}
|
|
49
16
|
[part="base"] {
|
|
@@ -57,17 +24,7 @@ import{css}from"lit";const styles=css`
|
|
|
57
24
|
canvas {
|
|
58
25
|
display: block;
|
|
59
26
|
inline-size: 100%;
|
|
60
|
-
/* The 2D context defaults ctx.direction to 'inherit' (the canvas element's computed
|
|
61
|
-
direction), and the axis labels are drawn with the default textAlign:'start'. Under an
|
|
62
|
-
ancestor dir="rtl" that 'start' anchors to the right, so a left-drawn row label (x=2/x=4)
|
|
63
|
-
runs off the left edge and only its trailing glyph survives ("Mon" -> "n"). The grid is
|
|
64
|
-
positioned physically regardless of direction (see the [part='cells'] direction:ltr pin
|
|
65
|
-
and the arrow-key note in heatmap.class.ts), so the canvas is pinned LTR to match. */
|
|
66
27
|
direction: ltr;
|
|
67
|
-
/* Only takes visual effect when the canvas itself is the clickable/focusable surface (the
|
|
68
|
-
default, accessible-cells unset) -- [part='canvas'][aria-hidden] below turns off
|
|
69
|
-
pointer-events entirely once the accessible-cells overlay takes over hit-testing, so this
|
|
70
|
-
never shows a pointer over a canvas the mouse can't actually interact with. */
|
|
71
28
|
cursor: pointer;
|
|
72
29
|
}
|
|
73
30
|
[part="canvas"]:hover {
|
|
@@ -75,10 +32,6 @@ import{css}from"lit";const styles=css`
|
|
|
75
32
|
var(--lr-heatmap-focus-ring-color, var(--_lr-heatmap-focus-ring-color));
|
|
76
33
|
outline-offset: var(--lr-focus-ring-offset);
|
|
77
34
|
}
|
|
78
|
-
/* Neither the canvas nor a cell has a background of its own to tint -- the fill under the pointer
|
|
79
|
-
is painted into the bitmap from the consumer's data -- so the pointer feedback is carried by the
|
|
80
|
-
outline, and the pressed step is the ring thickening from a hairline to the full focus-ring
|
|
81
|
-
width. */
|
|
82
35
|
[part="canvas"]:active {
|
|
83
36
|
outline: var(--lr-focus-ring-width) solid
|
|
84
37
|
var(--lr-heatmap-focus-ring-color, var(--_lr-heatmap-focus-ring-color));
|
|
@@ -169,14 +122,9 @@ import{css}from"lit";const styles=css`
|
|
|
169
122
|
)
|
|
170
123
|
);
|
|
171
124
|
}
|
|
172
|
-
/* Flex row order already follows inherited direction, placing the low
|
|
173
|
-
endpoint at inline-start. Mirror the physical CSS gradient as well so
|
|
174
|
-
its colors stay aligned with those labels, including custom step ramps. */
|
|
175
125
|
:host(:dir(rtl)) [part="legend"] .bar {
|
|
176
126
|
transform: scaleX(-1);
|
|
177
127
|
}
|
|
178
|
-
/* One discrete legendStops entry. Same swatch-then-text shape (and the same gap) as
|
|
179
|
-
[part='legend-annotation'] below, so a legend mixing stops and annotations reads as one row. */
|
|
180
128
|
[part="legend-stop"] {
|
|
181
129
|
display: inline-flex;
|
|
182
130
|
align-items: center;
|
|
@@ -185,8 +133,6 @@ import{css}from"lit";const styles=css`
|
|
|
185
133
|
max-inline-size: 100%;
|
|
186
134
|
overflow-wrap: anywhere;
|
|
187
135
|
}
|
|
188
|
-
/* The swatch's background is the consumer-supplied stop color, applied inline per stop --
|
|
189
|
-
it's data, not a themeable design value, so it can't live here. */
|
|
190
136
|
[part="legend-swatch"] {
|
|
191
137
|
flex: 0 0 auto;
|
|
192
138
|
inline-size: var(--lr-size-0-6rem);
|
|
@@ -4,11 +4,6 @@ import{css}from"lit";const styles=css`
|
|
|
4
4
|
min-inline-size: 0;
|
|
5
5
|
container-type: inline-size;
|
|
6
6
|
contain-intrinsic-inline-size: var(--lr-size-20rem);
|
|
7
|
-
/* Both knobs read the shared control ladder, which owns every tier and matches both the s/m/l
|
|
8
|
-
and small/medium/large spellings in one selector list. Keeping the public
|
|
9
|
-
--lr-pagination-* names in front lets a consumer retune this component alone, while the
|
|
10
|
-
values still come from one place. The literal fallbacks are the ladder's own "m" tier, so
|
|
11
|
-
this sheet resolves to the resting control footprint on its own. */
|
|
12
7
|
--_lr-pagination-control-size: var(
|
|
13
8
|
--lr-form-control-height,
|
|
14
9
|
var(--lr-size-2-5rem)
|
|
@@ -18,17 +13,7 @@ import{css}from"lit";const styles=css`
|
|
|
18
13
|
var(--lr-font-size-m)
|
|
19
14
|
);
|
|
20
15
|
--_lr-pagination-control-radius: var(--lr-radius);
|
|
21
|
-
/* Inner padding of the nav buttons and the page input. Exposed as a single knob (previously
|
|
22
|
-
a hardcoded var(--lr-space-xs) repeated at both sites) so a consumer can adjust the icon /
|
|
23
|
-
digit inset. Kept uniform across every tier -- today's padding is identical at every tier,
|
|
24
|
-
and per-tier divergence would visibly change the current rendering, which must stay
|
|
25
|
-
byte-identical. The control's outer footprint is fixed by --lr-pagination-control-size
|
|
26
|
-
(border-box), so this only affects the inner inset, not the button size. */
|
|
27
16
|
--_lr-pagination-control-padding: var(--lr-space-xs);
|
|
28
|
-
/* Resting fill and border of every control, varied by the appearance variant below. Routed through two
|
|
29
|
-
properties rather than one rule per appearance so the rule that consumes them stays at the
|
|
30
|
-
specificity of a bare [part] selector -- a consumer's ::part(page) override has to be able
|
|
31
|
-
to win, and an :host([appearance=...]) [part=...] rule would out-specify it. */
|
|
32
17
|
--_lr-pagination-control-bg-default: var(--lr-color-surface);
|
|
33
18
|
--_lr-pagination-control-border-color-default: var(--lr-color-border);
|
|
34
19
|
}
|
|
@@ -123,14 +108,9 @@ import{css}from"lit";const styles=css`
|
|
|
123
108
|
text-decoration: none;
|
|
124
109
|
cursor: pointer;
|
|
125
110
|
}
|
|
126
|
-
/* A numbered page grows with its digits instead of clipping a four-digit page number, while the
|
|
127
|
-
icon-only controls keep their square footprint. */
|
|
128
111
|
[part~="page"] {
|
|
129
112
|
inline-size: auto;
|
|
130
113
|
}
|
|
131
|
-
/* The applied page reads as a solid chip in every appearance -- which page you are on must not
|
|
132
|
-
depend on which look the consumer picked. Declared after the appearance-driven rule above and
|
|
133
|
-
at the same specificity, so a consumer ::part(page-current) override still wins. */
|
|
134
114
|
[part~="page-current"] {
|
|
135
115
|
border-color: var(--lr-pagination-current-border-color, transparent);
|
|
136
116
|
background: var(--lr-pagination-current-bg, var(--lr-color-brand));
|
|
@@ -140,8 +120,6 @@ import{css}from"lit";const styles=css`
|
|
|
140
120
|
[part~="ellipsis"] {
|
|
141
121
|
color: var(--lr-color-text-quiet);
|
|
142
122
|
}
|
|
143
|
-
/* :where() zeroes every state qualifier's specificity contribution, so a consumer's
|
|
144
|
-
::part(previous-button):hover / ::part(next-button):hover override wins without !important. */
|
|
145
123
|
[part~="first-button"]:where(:hover):where(:not(:disabled)):where(
|
|
146
124
|
:not([aria-disabled="true"])
|
|
147
125
|
),
|
|
@@ -159,17 +137,13 @@ import{css}from"lit";const styles=css`
|
|
|
159
137
|
),
|
|
160
138
|
[part~="page"]:where(:hover):where(:not(:disabled)):where(
|
|
161
139
|
:not([aria-disabled="true"])
|
|
162
|
-
):where(:not([part~="page-current"]))
|
|
163
|
-
[part="page-input"]:where(:hover):where(:not(:disabled)) {
|
|
140
|
+
):where(:not([part~="page-current"])) {
|
|
164
141
|
background: var(--lr-pagination-hover-bg, var(--lr-color-brand-quiet));
|
|
165
142
|
border-color: var(
|
|
166
143
|
--lr-pagination-hover-border-color,
|
|
167
144
|
var(--lr-color-brand)
|
|
168
145
|
);
|
|
169
146
|
}
|
|
170
|
-
/* Same selectors, same zeroed specificity, one step further toward --lr-color-mix-partner (which
|
|
171
|
-
follows the text colour) -- so the pressed fill is unmistakably deeper than the hovered one in
|
|
172
|
-
either theme, and a consumer's ::part(next-button):active still wins. */
|
|
173
147
|
[part~="first-button"]:where(:active):where(:not(:disabled)):where(
|
|
174
148
|
:not([aria-disabled="true"])
|
|
175
149
|
),
|
|
@@ -187,8 +161,7 @@ import{css}from"lit";const styles=css`
|
|
|
187
161
|
),
|
|
188
162
|
[part~="page"]:where(:active):where(:not(:disabled)):where(
|
|
189
163
|
:not([aria-disabled="true"])
|
|
190
|
-
):where(:not([part~="page-current"]))
|
|
191
|
-
[part="page-input"]:where(:active):where(:not(:disabled)) {
|
|
164
|
+
):where(:not([part~="page-current"])) {
|
|
192
165
|
background: var(
|
|
193
166
|
--lr-pagination-active-bg,
|
|
194
167
|
color-mix(
|
|
@@ -202,15 +175,10 @@ import{css}from"lit";const styles=css`
|
|
|
202
175
|
var(--lr-color-brand)
|
|
203
176
|
);
|
|
204
177
|
}
|
|
205
|
-
/* The current page is already a brand chip; without its own :hover arm it would fall back to the
|
|
206
|
-
rule above and visibly lighten under the pointer, reading as "not selected". */
|
|
207
178
|
[part~="page-current"]:where(:hover) {
|
|
208
179
|
background: var(--lr-pagination-current-hover-bg, var(--lr-color-brand));
|
|
209
180
|
border-color: var(--lr-pagination-current-hover-border-color, transparent);
|
|
210
181
|
}
|
|
211
|
-
/* Pressing the page you are already on is a no-op, but it still has to acknowledge the click --
|
|
212
|
-
the chip deepens rather than lightening, so it never momentarily reads as deselected. MUST stay
|
|
213
|
-
after the generic :active rule above: both are (0,1,0) after :where(), so source order decides. */
|
|
214
182
|
[part~="page-current"]:where(:active) {
|
|
215
183
|
background: var(
|
|
216
184
|
--lr-pagination-current-active-bg,
|
|
@@ -242,8 +210,6 @@ import{css}from"lit";const styles=css`
|
|
|
242
210
|
cursor: not-allowed;
|
|
243
211
|
opacity: var(--lr-opacity-disabled);
|
|
244
212
|
}
|
|
245
|
-
/* Link mode has no :disabled to hang off -- the anchors carry aria-disabled and lose their href
|
|
246
|
-
instead, so the resting look has to follow that attribute. */
|
|
247
213
|
[part~="button"]:where([aria-disabled="true"]) {
|
|
248
214
|
cursor: not-allowed;
|
|
249
215
|
opacity: var(--lr-opacity-disabled);
|
|
@@ -257,8 +223,6 @@ import{css}from"lit";const styles=css`
|
|
|
257
223
|
justify-content: center;
|
|
258
224
|
line-height: var(--lr-line-height-none);
|
|
259
225
|
}
|
|
260
|
-
/* The two chevrons of an edge control overlap slightly so they read as one doubled glyph rather
|
|
261
|
-
than two separate arrows. */
|
|
262
226
|
[part="first-icon"] slot > svg + svg,
|
|
263
227
|
[part="last-icon"] slot > svg + svg {
|
|
264
228
|
margin-inline-start: var(--lr-size-neg-4px);
|
|
@@ -319,11 +283,27 @@ import{css}from"lit";const styles=css`
|
|
|
319
283
|
appearance: none;
|
|
320
284
|
margin: 0;
|
|
321
285
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
286
|
+
[part="page-input"]:where(:hover):where(:not(:disabled)) {
|
|
287
|
+
background: var(--lr-pagination-hover-bg, var(--lr-color-brand-quiet));
|
|
288
|
+
border-color: var(
|
|
289
|
+
--lr-pagination-hover-border-color,
|
|
290
|
+
var(--lr-color-brand)
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
[part="page-input"]:where(:active):where(:not(:disabled)) {
|
|
294
|
+
background: var(
|
|
295
|
+
--lr-pagination-active-bg,
|
|
296
|
+
color-mix(
|
|
297
|
+
in oklab,
|
|
298
|
+
var(--lr-color-brand-quiet),
|
|
299
|
+
var(--lr-color-mix-partner) var(--lr-color-mix-active)
|
|
300
|
+
)
|
|
301
|
+
);
|
|
302
|
+
border-color: var(
|
|
303
|
+
--lr-pagination-active-border-color,
|
|
304
|
+
var(--lr-color-brand)
|
|
305
|
+
);
|
|
306
|
+
}
|
|
327
307
|
[part="page-input"]:where([aria-invalid="true"]) {
|
|
328
308
|
border-color: var(--lr-pagination-invalid-border, var(--lr-color-danger));
|
|
329
309
|
}
|
|
@@ -338,9 +318,6 @@ import{css}from"lit";const styles=css`
|
|
|
338
318
|
white-space: nowrap;
|
|
339
319
|
border: 0;
|
|
340
320
|
}
|
|
341
|
-
/* Container-query lengths cannot reference custom properties. This is the
|
|
342
|
-
documented 320px narrow-allocation baseline expressed in root-relative
|
|
343
|
-
units so it still follows the page's type scale. */
|
|
344
321
|
@container (max-inline-size: 20rem) {
|
|
345
322
|
[part~="base"] {
|
|
346
323
|
flex-direction: column;
|
|
@@ -19,6 +19,15 @@ export interface SequenceStripCategory {
|
|
|
19
19
|
* localized unnamed-category label rather than exposing an internal id. */
|
|
20
20
|
readonly label?: string;
|
|
21
21
|
}
|
|
22
|
+
/** Detail of `lr-item-activate`: which strip item the user picked. */
|
|
23
|
+
export interface LyraSequenceStripActivateDetail {
|
|
24
|
+
readonly index: number;
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly item: SequenceStripItem;
|
|
27
|
+
}
|
|
28
|
+
export interface LyraSequenceStripEventMap {
|
|
29
|
+
'lr-item-activate': CustomEvent<LyraSequenceStripActivateDetail>;
|
|
30
|
+
}
|
|
22
31
|
/**
|
|
23
32
|
* `<lr-sequence-strip>` — a compact, one-thin-cell-per-item strip visualizing a sequence of
|
|
24
33
|
* categorical states, with an optional secondary per-cell marker. Pure CSS/flex, no chart.js/SVG/
|
|
@@ -40,6 +49,10 @@ export interface SequenceStripCategory {
|
|
|
40
49
|
* collection after changing it.
|
|
41
50
|
*
|
|
42
51
|
* @customElement lr-sequence-strip
|
|
52
|
+
* @event lr-item-activate - Fired when a cell is clicked, or activated with Enter/Space on the
|
|
53
|
+
* roving-tabindex focus. `detail: { index, id, item }` identifies the picked item. Not
|
|
54
|
+
* cancelable, and it does not move `selectedIndex` on its own -- the selection is controlled,
|
|
55
|
+
* so the consumer stays the single source of truth for a playback index this strip does not own.
|
|
43
56
|
* @csspart base - The root strip wrapper (`role="list"`).
|
|
44
57
|
* @csspart cell - Each named, roving-focus item cell, background-colored by its category.
|
|
45
58
|
* @csspart marker - The small bottom marker on a cell whose item sets `marker: true`.
|
|
@@ -63,7 +76,7 @@ export interface SequenceStripCategory {
|
|
|
63
76
|
* @status stable
|
|
64
77
|
* @since 4.0.0
|
|
65
78
|
*/
|
|
66
|
-
export declare class LyraSequenceStrip extends LyraElement {
|
|
79
|
+
export declare class LyraSequenceStrip extends LyraElement<LyraSequenceStripEventMap> {
|
|
67
80
|
static styles: import("lit").CSSResultGroup[];
|
|
68
81
|
private _items;
|
|
69
82
|
private _categories;
|
|
@@ -79,6 +92,26 @@ export declare class LyraSequenceStrip extends LyraElement {
|
|
|
79
92
|
* computes the summary from `items`/`categories`; an explicitly empty string renders as an
|
|
80
93
|
* empty label rather than falling back to the auto-generated summary. */
|
|
81
94
|
accessibleLabel?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Index of the currently selected item, or `-1` (the default) for none — the controlled selection
|
|
97
|
+
* this strip's natural companion, `lr-sequence-playback`, scrubs through. Mirrors the shape
|
|
98
|
+
* `lr-lite-chart`'s `selectedIndices` and `lr-heatmap`'s `selectedCell` already establish.
|
|
99
|
+
*
|
|
100
|
+
* Controlled, not self-managing: activating a cell emits `lr-item-activate` and does **not**
|
|
101
|
+
* move the selection on its own, so the consumer stays the single source of truth and the
|
|
102
|
+
* component cannot drift from a playback index it does not own. An out-of-range or non-integer
|
|
103
|
+
* value selects nothing rather than throwing.
|
|
104
|
+
*/
|
|
105
|
+
selectedIndex: number;
|
|
106
|
+
/** Whether `index` is the selected one, guarding a non-integer or out-of-range value. */
|
|
107
|
+
private isSelected;
|
|
108
|
+
/**
|
|
109
|
+
* Emits `lr-item-activate` for `index`.
|
|
110
|
+
*
|
|
111
|
+
* Not cancelable: nothing in this component branches on `defaultPrevented`, and the library's
|
|
112
|
+
* contract reserves cancelable events for real veto points.
|
|
113
|
+
*/
|
|
114
|
+
private activateItem;
|
|
82
115
|
/** Renders a static `[part="legend"]` key of every `categories` entry below the strip, so the
|
|
83
116
|
* color-to-category mapping is readable without hovering each cell. Deliberately
|
|
84
117
|
* non-interactive: unlike `<lr-graph-legend>` this toggles nothing and emits nothing — the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getListFormat,getNumberFormat}from"../../../internal/intl-cache.js";import{isRtl}from"../../../internal/rtl.js";import{sanitizeCssColor}from"../../../internal/safe-css.js";import{styles}from"./sequence-strip.styles.js";import{LYRA_DEFAULT_sequenceStripCategoryCount,LYRA_DEFAULT_sequenceStripEmpty,LYRA_DEFAULT_sequenceStripUnnamedCategory}from"../../../internal/default-strings.generated.js";const MAX_RENDERED_ITEMS=200,MAX_RENDERED_CATEGORIES=200,MAX_SEQUENCE_COLLECTION_ENTRIES=1e4;class LyraSequenceStrip extends LyraElement{constructor(){super(...arguments),this._items=[],this._categories=[],this.showLegend=!1,this.hoverIndex=null,this.keyboardIndex=null,this.restoringOwnedFocus=!1,this.focusRestoreGeneration=0}static{this.defaultStrings={...super.defaultStrings,sequenceStripCategoryCount:LYRA_DEFAULT_sequenceStripCategoryCount,sequenceStripEmpty:LYRA_DEFAULT_sequenceStripEmpty,sequenceStripUnnamedCategory:LYRA_DEFAULT_sequenceStripUnnamedCategory}}static{this.styles=[LyraElement.styles,styles]}get items(){return this._items}set items(value){const previous=this._items,seen=new Set,next=[];if(Array.isArray(value))for(const item of value.slice(0,MAX_SEQUENCE_COLLECTION_ENTRIES))try{if(!item||typeof item.id!="string"||item.id.trim().length===0||seen.has(item.id))continue;seen.add(item.id),next.push(Object.freeze({id:item.id,categoryId:typeof item.categoryId=="string"?item.categoryId:"",...item.marker===void 0?{}:{marker:!!item.marker},...typeof item.label=="string"?{label:item.label}:{}}))}catch{}this._items=Object.freeze(next),this.requestUpdate("items",previous)}get categories(){return this._categories}set categories(value){const previous=this._categories,seen=new Set,next=[];if(Array.isArray(value))for(const category of value.slice(0,MAX_SEQUENCE_COLLECTION_ENTRIES))try{if(!category||typeof category.id!="string"||category.id.trim().length===0||seen.has(category.id))continue;seen.add(category.id),next.push(Object.freeze({id:category.id,color:typeof category.color=="string"?category.color:"",...typeof category.label=="string"?{label:category.label}:{}}))}catch{}this._categories=Object.freeze(next),this.requestUpdate("categories",previous)}willUpdate(changed){if(super.willUpdate(changed),changed.has("items")){this.focusRestoreGeneration++,this.hoverIndex=null;const focusedCell=this.shadowRoot?.activeElement,focusedIndex=Number(focusedCell?.dataset.index);if(!Number.isInteger(focusedIndex)||focusedIndex<0){this.keyboardIndex=null;return}const focusedId=(changed.get("items")??[])[focusedIndex]?.id,retainedIndex=focusedId==null?-1:this.items.findIndex(item=>item.id===focusedId),nextIndex=retainedIndex>=0?retainedIndex:this.items.length?Math.min(focusedIndex,this.items.length-1):-1;this.keyboardIndex=nextIndex>=0?nextIndex:null,this.pendingFocusTarget=nextIndex>=0?nextIndex:"base",this.restoringOwnedFocus=!0}}updated(changed){super.updated(changed);const pending=this.pendingFocusTarget;if(pending===void 0)return;this.pendingFocusTarget=void 0;const generation=this.focusRestoreGeneration;this.scheduleAfterUpdate(()=>{try{if(generation!==this.focusRestoreGeneration||!this.isConnected)return;if(pending==="base"){this.shadowRoot?.querySelector('[part="base"]')?.focus();return}this.shadowRoot?.querySelector(`[part="cell"][data-index="${pending}"]`)?.focus()}finally{this.restoringOwnedFocus=!1}},"sequence-strip-focus")}disconnectedCallback(){this.focusRestoreGeneration++,this.pendingFocusTarget=void 0,this.restoringOwnedFocus=!1,this.hoverIndex=null,this.keyboardIndex=null,super.disconnectedCallback()}categoryMap(){return new Map(this.categories.map(category=>[category.id,category]))}categoryColor(categoryId,categories){return sanitizeCssColor(categories.get(categoryId)?.color)??"transparent"}categoryLabel(categoryId,categories){const label=categories.get(categoryId)?.label;return label!==void 0&&label.trim().length>0?label:this.localize("sequenceStripUnnamedCategory")}autoSummary(){const counts=new Map,categories=this.categoryMap();for(const item of this.items)counts.set(item.categoryId,(counts.get(item.categoryId)??0)+1);if(counts.size===0)return this.localize("sequenceStripEmpty");const clauses=[...counts.entries()].map(([categoryId,count])=>{const label=this.categoryLabel(categoryId,categories);return this.localize("sequenceStripCategoryCount",void 0,{label,count:getNumberFormat(this.effectiveLocale).format(count),pluralCount:count})}),markerCount=this.items.filter(item=>item.marker).length;return this.markerLabel&&markerCount>0&&clauses.push(this.localize("sequenceStripCategoryCount",void 0,{label:this.markerLabel,count:getNumberFormat(this.effectiveLocale).format(markerCount),pluralCount:markerCount})),getListFormat(this.effectiveLocale,{style:"long",type:"unit"}).format(clauses)}itemLabel(item,categories=this.categoryMap()){return item.label!==void 0&&item.label.trim().length>0?item.label:this.categoryLabel(item.categoryId,categories)}onCellEnter(index){this.hoverIndex=index}onCellLeave(){this.hoverIndex=null}onCellFocus(index){this.restoringOwnedFocus||(this.keyboardIndex=index)}onStripFocusOut(e){if(this.restoringOwnedFocus)return;const next=e.relatedTarget;(!(next instanceof Element)||next.getAttribute("part")!=="cell")&&(this.keyboardIndex=null)}onCellKeyDown(e,index){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key)||this.items.length===0)return;e.preventDefault();const forwardKey=isRtl(this)?"ArrowLeft":"ArrowRight",backwardKey=isRtl(this)?"ArrowRight":"ArrowLeft";let next=index;e.key==="Home"?next=0:e.key==="End"?next=this.items.length-1:e.key===forwardKey?next=Math.min(this.items.length-1,index+1):e.key===backwardKey&&(next=Math.max(0,index-1));const items=this.items,targetId=items[next]?.id;if(targetId===void 0)return;const generation=this.focusRestoreGeneration;this.keyboardIndex=next,this.updateComplete.then(()=>{if(generation!==this.focusRestoreGeneration||!this.isConnected||this.items!==items)return;const target=this.shadowRoot?.querySelector(`[part="cell"][data-index="${next}"]`);target?.dataset.itemId===targetId&&target.focus()})}renderLegend(){const renderedCategories=this.categories.slice(0,MAX_RENDERED_CATEGORIES),categoryMap=this.categoryMap(),number=getNumberFormat(this.effectiveLocale);return html`
|
|
1
|
+
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getListFormat,getNumberFormat}from"../../../internal/intl-cache.js";import{isRtl}from"../../../internal/rtl.js";import{sanitizeCssColor}from"../../../internal/safe-css.js";import{styles}from"./sequence-strip.styles.js";import{LYRA_DEFAULT_sequenceStripCategoryCount,LYRA_DEFAULT_sequenceStripEmpty,LYRA_DEFAULT_sequenceStripUnnamedCategory}from"../../../internal/default-strings.generated.js";const MAX_RENDERED_ITEMS=200,MAX_RENDERED_CATEGORIES=200,MAX_SEQUENCE_COLLECTION_ENTRIES=1e4;class LyraSequenceStrip extends LyraElement{constructor(){super(...arguments),this._items=[],this._categories=[],this.selectedIndex=-1,this.showLegend=!1,this.hoverIndex=null,this.keyboardIndex=null,this.restoringOwnedFocus=!1,this.focusRestoreGeneration=0}static{this.defaultStrings={...super.defaultStrings,sequenceStripCategoryCount:LYRA_DEFAULT_sequenceStripCategoryCount,sequenceStripEmpty:LYRA_DEFAULT_sequenceStripEmpty,sequenceStripUnnamedCategory:LYRA_DEFAULT_sequenceStripUnnamedCategory}}static{this.styles=[LyraElement.styles,styles]}get items(){return this._items}set items(value){const previous=this._items,seen=new Set,next=[];if(Array.isArray(value))for(const item of value.slice(0,MAX_SEQUENCE_COLLECTION_ENTRIES))try{if(!item||typeof item.id!="string"||item.id.trim().length===0||seen.has(item.id))continue;seen.add(item.id),next.push(Object.freeze({id:item.id,categoryId:typeof item.categoryId=="string"?item.categoryId:"",...item.marker===void 0?{}:{marker:!!item.marker},...typeof item.label=="string"?{label:item.label}:{}}))}catch{}this._items=Object.freeze(next),this.requestUpdate("items",previous)}get categories(){return this._categories}set categories(value){const previous=this._categories,seen=new Set,next=[];if(Array.isArray(value))for(const category of value.slice(0,MAX_SEQUENCE_COLLECTION_ENTRIES))try{if(!category||typeof category.id!="string"||category.id.trim().length===0||seen.has(category.id))continue;seen.add(category.id),next.push(Object.freeze({id:category.id,color:typeof category.color=="string"?category.color:"",...typeof category.label=="string"?{label:category.label}:{}}))}catch{}this._categories=Object.freeze(next),this.requestUpdate("categories",previous)}isSelected(index){return Number.isInteger(this.selectedIndex)&&this.selectedIndex>=0&&this.selectedIndex<this.items.length&&this.selectedIndex===index}activateItem(index){const item=this.items[index];item&&this.emit("lr-item-activate",{index,id:item.id,item})}willUpdate(changed){if(super.willUpdate(changed),changed.has("items")){this.focusRestoreGeneration++,this.hoverIndex=null;const focusedCell=this.shadowRoot?.activeElement,focusedIndex=Number(focusedCell?.dataset.index);if(!Number.isInteger(focusedIndex)||focusedIndex<0){this.keyboardIndex=null;return}const focusedId=(changed.get("items")??[])[focusedIndex]?.id,retainedIndex=focusedId==null?-1:this.items.findIndex(item=>item.id===focusedId),nextIndex=retainedIndex>=0?retainedIndex:this.items.length?Math.min(focusedIndex,this.items.length-1):-1;this.keyboardIndex=nextIndex>=0?nextIndex:null,this.pendingFocusTarget=nextIndex>=0?nextIndex:"base",this.restoringOwnedFocus=!0}}updated(changed){super.updated(changed);const pending=this.pendingFocusTarget;if(pending===void 0)return;this.pendingFocusTarget=void 0;const generation=this.focusRestoreGeneration;this.scheduleAfterUpdate(()=>{try{if(generation!==this.focusRestoreGeneration||!this.isConnected)return;if(pending==="base"){this.shadowRoot?.querySelector('[part="base"]')?.focus();return}this.shadowRoot?.querySelector(`[part="cell"][data-index="${pending}"]`)?.focus()}finally{this.restoringOwnedFocus=!1}},"sequence-strip-focus")}disconnectedCallback(){this.focusRestoreGeneration++,this.pendingFocusTarget=void 0,this.restoringOwnedFocus=!1,this.hoverIndex=null,this.keyboardIndex=null,super.disconnectedCallback()}categoryMap(){return new Map(this.categories.map(category=>[category.id,category]))}categoryColor(categoryId,categories){return sanitizeCssColor(categories.get(categoryId)?.color)??"transparent"}categoryLabel(categoryId,categories){const label=categories.get(categoryId)?.label;return label!==void 0&&label.trim().length>0?label:this.localize("sequenceStripUnnamedCategory")}autoSummary(){const counts=new Map,categories=this.categoryMap();for(const item of this.items)counts.set(item.categoryId,(counts.get(item.categoryId)??0)+1);if(counts.size===0)return this.localize("sequenceStripEmpty");const clauses=[...counts.entries()].map(([categoryId,count])=>{const label=this.categoryLabel(categoryId,categories);return this.localize("sequenceStripCategoryCount",void 0,{label,count:getNumberFormat(this.effectiveLocale).format(count),pluralCount:count})}),markerCount=this.items.filter(item=>item.marker).length;return this.markerLabel&&markerCount>0&&clauses.push(this.localize("sequenceStripCategoryCount",void 0,{label:this.markerLabel,count:getNumberFormat(this.effectiveLocale).format(markerCount),pluralCount:markerCount})),getListFormat(this.effectiveLocale,{style:"long",type:"unit"}).format(clauses)}itemLabel(item,categories=this.categoryMap()){return item.label!==void 0&&item.label.trim().length>0?item.label:this.categoryLabel(item.categoryId,categories)}onCellEnter(index){this.hoverIndex=index}onCellLeave(){this.hoverIndex=null}onCellFocus(index){this.restoringOwnedFocus||(this.keyboardIndex=index)}onStripFocusOut(e){if(this.restoringOwnedFocus)return;const next=e.relatedTarget;(!(next instanceof Element)||next.getAttribute("part")!=="cell")&&(this.keyboardIndex=null)}onCellKeyDown(e,index){if(e.key==="Enter"||e.key===" "||e.key==="Spacebar"){e.preventDefault(),this.activateItem(index);return}if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key)||this.items.length===0)return;e.preventDefault();const forwardKey=isRtl(this)?"ArrowLeft":"ArrowRight",backwardKey=isRtl(this)?"ArrowRight":"ArrowLeft";let next=index;e.key==="Home"?next=0:e.key==="End"?next=this.items.length-1:e.key===forwardKey?next=Math.min(this.items.length-1,index+1):e.key===backwardKey&&(next=Math.max(0,index-1));const items=this.items,targetId=items[next]?.id;if(targetId===void 0)return;const generation=this.focusRestoreGeneration;this.keyboardIndex=next,this.updateComplete.then(()=>{if(generation!==this.focusRestoreGeneration||!this.isConnected||this.items!==items)return;const target=this.shadowRoot?.querySelector(`[part="cell"][data-index="${next}"]`);target?.dataset.itemId===targetId&&target.focus()})}renderLegend(){const renderedCategories=this.categories.slice(0,MAX_RENDERED_CATEGORIES),categoryMap=this.categoryMap(),number=getNumberFormat(this.effectiveLocale);return html`
|
|
2
2
|
<div part="legend" aria-hidden="true">
|
|
3
3
|
${renderedCategories.map(category=>html`
|
|
4
4
|
<span part="legend-item">
|
|
@@ -41,6 +41,9 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
|
|
|
41
41
|
@pointerleave=${()=>this.onCellLeave()}
|
|
42
42
|
@focus=${()=>this.onCellFocus(index)}
|
|
43
43
|
@keydown=${e=>this.onCellKeyDown(e,index)}
|
|
44
|
+
@click=${()=>this.activateItem(index)}
|
|
45
|
+
aria-current=${this.isSelected(index)?"true":"false"}
|
|
46
|
+
?data-selected=${this.isSelected(index)}
|
|
44
47
|
>
|
|
45
48
|
${item.marker?html`<span part="marker"></span>`:nothing}
|
|
46
49
|
${index===tooltipIndex?html`
|
|
@@ -52,4 +55,4 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
|
|
|
52
55
|
</div>
|
|
53
56
|
${this.items.length>renderedItems.length?html`<div part="window-range" aria-hidden="true">${number.format(windowStart+1)}–${number.format(windowStart+renderedItems.length)} / ${number.format(this.items.length)}</div>`:nothing}
|
|
54
57
|
${this.showLegend?this.renderLegend():nothing}
|
|
55
|
-
`}}__decorate([property({attribute:!1})],LyraSequenceStrip.prototype,"items",null),__decorate([property({attribute:!1})],LyraSequenceStrip.prototype,"categories",null),__decorate([property({attribute:"accessible-label"})],LyraSequenceStrip.prototype,"accessibleLabel",void 0),__decorate([property({type:Boolean,reflect:!0,attribute:"show-legend"})],LyraSequenceStrip.prototype,"showLegend",void 0),__decorate([property({attribute:"marker-label"})],LyraSequenceStrip.prototype,"markerLabel",void 0),__decorate([state()],LyraSequenceStrip.prototype,"hoverIndex",void 0),__decorate([state()],LyraSequenceStrip.prototype,"keyboardIndex",void 0);export{LyraSequenceStrip};
|
|
58
|
+
`}}__decorate([property({attribute:!1})],LyraSequenceStrip.prototype,"items",null),__decorate([property({attribute:!1})],LyraSequenceStrip.prototype,"categories",null),__decorate([property({attribute:"accessible-label"})],LyraSequenceStrip.prototype,"accessibleLabel",void 0),__decorate([property({type:Number,attribute:"selected-index"})],LyraSequenceStrip.prototype,"selectedIndex",void 0),__decorate([property({type:Boolean,reflect:!0,attribute:"show-legend"})],LyraSequenceStrip.prototype,"showLegend",void 0),__decorate([property({attribute:"marker-label"})],LyraSequenceStrip.prototype,"markerLabel",void 0),__decorate([state()],LyraSequenceStrip.prototype,"hoverIndex",void 0),__decorate([state()],LyraSequenceStrip.prototype,"keyboardIndex",void 0);export{LyraSequenceStrip};
|
|
@@ -9,9 +9,6 @@ import{css}from"lit";const styles=css`
|
|
|
9
9
|
gap: var(--lr-size-1px);
|
|
10
10
|
block-size: var(--lr-sequence-strip-height, var(--lr-size-1-5rem));
|
|
11
11
|
}
|
|
12
|
-
/* Above the documented 320-item dense threshold, retaining a 1px gap per item would make the
|
|
13
|
-
gaps alone wider than the 320px responsive baseline. Collapse only that decorative spacing;
|
|
14
|
-
every semantic cell stays rendered, colored, named, and keyboard reachable. */
|
|
15
12
|
[part='base'][data-dense] {
|
|
16
13
|
gap: 0;
|
|
17
14
|
}
|
|
@@ -23,17 +20,25 @@ import{css}from"lit";const styles=css`
|
|
|
23
20
|
align-items: flex-end;
|
|
24
21
|
justify-content: center;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
would be promising an action the strip does not have. */
|
|
23
|
+
[part='cell'] {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
30
26
|
[part='cell']:hover,
|
|
31
27
|
[part='cell']:focus-visible {
|
|
32
28
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
33
29
|
outline-offset: calc(-1 * var(--lr-focus-ring-width));
|
|
34
30
|
}
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
[part='cell']:active {
|
|
32
|
+
outline: var(--lr-focus-ring-width) solid var(--lr-color-text);
|
|
33
|
+
outline-offset: calc(-1 * var(--lr-focus-ring-width));
|
|
34
|
+
}
|
|
35
|
+
[part='cell'][data-selected] {
|
|
36
|
+
outline: var(--lr-focus-ring-width) solid var(--lr-color-text);
|
|
37
|
+
outline-offset: calc(-1 * var(--lr-focus-ring-width));
|
|
38
|
+
}
|
|
39
|
+
[part='cell'][data-selected]:focus-visible {
|
|
40
|
+
outline-color: var(--lr-focus-ring-color);
|
|
41
|
+
}
|
|
37
42
|
[part='cell']:first-child {
|
|
38
43
|
border-start-start-radius: var(--lr-radius-xs);
|
|
39
44
|
border-end-start-radius: var(--lr-radius-xs);
|
|
@@ -63,19 +68,12 @@ import{css}from"lit";const styles=css`
|
|
|
63
68
|
pointer-events: none;
|
|
64
69
|
z-index: var(--lr-layer-content);
|
|
65
70
|
}
|
|
66
|
-
/* The tooltip is a child of the active cell, so this 50% inset tracks that cell instead of the
|
|
67
|
-
strip. Under RTL the inset anchors to the physical right edge; the fixed horizontal -50%
|
|
68
|
-
translate must flip sign there because translateX is physical, not logical. */
|
|
69
71
|
:host(:dir(rtl)) [part='tooltip'] {
|
|
70
72
|
transform: translate(50%, calc(-1 * var(--lr-size-6px)));
|
|
71
73
|
}
|
|
72
74
|
[part='tooltip'][hidden] {
|
|
73
75
|
display: none;
|
|
74
76
|
}
|
|
75
|
-
/* The legend keys the whole category scheme, so its row count grows with the consumer's
|
|
76
|
-
categories and its labels grow with translation -- it wraps rather than overflowing, and each
|
|
77
|
-
item keeps min-inline-size: 0 so a long label shrinks inside its own row instead of forcing
|
|
78
|
-
the strip's allocation wider. */
|
|
79
77
|
[part='legend'] {
|
|
80
78
|
display: flex;
|
|
81
79
|
flex-wrap: wrap;
|
|
@@ -108,10 +106,6 @@ import{css}from"lit";const styles=css`
|
|
|
108
106
|
block-size: var(--lr-sequence-strip-legend-swatch-size, var(--lr-size-0-625rem));
|
|
109
107
|
border-radius: var(--lr-radius-xs);
|
|
110
108
|
}
|
|
111
|
-
/* The marker legend row stands for the marker on *any* cell, so its chip is deliberately a
|
|
112
|
-
neutral background rather than a category color, with the cell's own bottom bar reproduced as
|
|
113
|
-
an inset shadow (same thickness, same --lr-sequence-strip-marker-color) instead of a child
|
|
114
|
-
element -- the chip has no children to give the bar its own box. */
|
|
115
109
|
[part='legend-marker-swatch'] {
|
|
116
110
|
background: var(--lr-sequence-strip-legend-marker-bg, var(--lr-color-surface-raised));
|
|
117
111
|
box-shadow: inset 0 calc(-1 * var(--lr-size-2px)) 0 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing,svg}from"lit";import{property}from"lit/decorators.js";import{nextId}from"../../../internal/a11y.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{finiteNumber,finiteRatio}from"../../../internal/numbers.js";import{styles}from"./sparkline.styles.js";import{LYRA_DEFAULT_noData,LYRA_DEFAULT_trendOf}from"../../../internal/default-strings.generated.js";const VIEW=100,MAX_POINTS=500;function decimate(arr,max){if(arr.length<=max)return[...arr];const step=(arr.length-1)/(max-1);return Array.from({length:max},(_,i)=>arr[Math.round(i*step)])}function finiteData(value){const source=value.trim();return source?source.split(/\s+/u).map(Number).filter(item=>Number.isFinite(item)):[]}function normalizeAppearance(value){return value==="gradient"||value==="line"||value==="solid"?value:"solid"}function normalizeCurve(value){return value==="natural"||value==="step"||value==="linear"?value:"linear"}class LyraSparkline extends LyraElement{constructor(){super(...arguments),this.appearance="solid",this.curve="linear",this.data="",this.label="",this.accessibleLabel=null,this.values=[],this._mark="line",this.gradientId=nextId("sparkline-gradient")}static{this.defaultStrings={...super.defaultStrings,noData:LYRA_DEFAULT_noData,trendOf:LYRA_DEFAULT_trendOf}}static{this.styles=[LyraElement.styles,styles]}get mark(){return this._mark}set mark(value){const normalized=value==="bar"?"bar":"line",previous=this._mark;if(previous===normalized){value!==normalized&&this.requestUpdate("mark",previous);return}this._mark=normalized,this.requestUpdate("mark",previous)}plotValues(){if(this.data.trim()){const parsed=finiteData(this.data);return parsed.length>=2?parsed:[]}return Array.isArray(this.values)?this.values.filter(item=>Number.isFinite(item)):[]}points(values=this.plotValues()){let autoLo=values[0]??0,autoHi=values[0]??0;if(!Number.isFinite(this.min)||!Number.isFinite(this.max))for(const value of values)value<autoLo&&(autoLo=value),value>autoHi&&(autoHi=value);let lo=finiteNumber(this.min??autoLo,autoLo),hi=finiteNumber(this.max??autoHi,autoHi);lo>hi&&([lo,hi]=[hi,lo]);const samples=values.length>MAX_POINTS?decimate(values,MAX_POINTS):[...values];return samples.map((value,index)=>{const forwardX=samples.length>1?index/(samples.length-1)*VIEW:VIEW/2,x=this.effectiveDirection==="rtl"?VIEW-forwardX:forwardX,y=lo===hi?VIEW/2:VIEW-finiteRatio(value,lo,hi)*VIEW;return[x,y]})}linePath(points){const first=points[0];if(!first)return"";if(points.length===1)return`M${first[0]},${first[1]} L${first[0]},${first[1]}`;const curve=normalizeCurve(this.curve);if(curve==="step")return points.slice(1).reduce((path,point)=>`${path} H${point[0]} V${point[1]}`,`M${first[0]},${first[1]}`);if(curve==="natural"){let path=`M${first[0]},${first[1]}`;for(let index=0;index<points.length-1;index++){const before=points[Math.max(0,index-1)],start=points[index],end=points[index+1],after=points[Math.min(points.length-1,index+2)],c1x=start[0]+(end[0]-before[0])/6,c1y=start[1]+(end[1]-before[1])/6,c2x=end[0]-(after[0]-start[0])/6,c2y=end[1]-(after[1]-start[1])/6;path+=` C${c1x},${c1y} ${c2x},${c2y} ${end[0]},${end[1]}`}return path}return points.map(([x,y],index)=>`${index?"L":"M"}${x},${y}`).join(" ")}accessibleName(values){if(this.
|
|
1
|
+
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing,svg}from"lit";import{property}from"lit/decorators.js";import{nextId}from"../../../internal/a11y.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{finiteNumber,finiteRatio}from"../../../internal/numbers.js";import{styles}from"./sparkline.styles.js";import{LYRA_DEFAULT_noData,LYRA_DEFAULT_trendOf}from"../../../internal/default-strings.generated.js";const VIEW=100,MAX_POINTS=500;function decimate(arr,max){if(arr.length<=max)return[...arr];const step=(arr.length-1)/(max-1);return Array.from({length:max},(_,i)=>arr[Math.round(i*step)])}function finiteData(value){const source=value.trim();return source?source.split(/\s+/u).map(Number).filter(item=>Number.isFinite(item)):[]}function normalizeAppearance(value){return value==="gradient"||value==="line"||value==="solid"?value:"solid"}function normalizeCurve(value){return value==="natural"||value==="step"||value==="linear"?value:"linear"}class LyraSparkline extends LyraElement{constructor(){super(...arguments),this.appearance="solid",this.curve="linear",this.data="",this.label="",this.accessibleLabel=null,this.values=[],this._mark="line",this.gradientId=nextId("sparkline-gradient")}static{this.defaultStrings={...super.defaultStrings,noData:LYRA_DEFAULT_noData,trendOf:LYRA_DEFAULT_trendOf}}static{this.styles=[LyraElement.styles,styles]}get mark(){return this._mark}set mark(value){const normalized=value==="bar"?"bar":"line",previous=this._mark;if(previous===normalized){value!==normalized&&this.requestUpdate("mark",previous);return}this._mark=normalized,this.requestUpdate("mark",previous)}plotValues(){if(this.data.trim()){const parsed=finiteData(this.data);return parsed.length>=2?parsed:[]}return Array.isArray(this.values)?this.values.filter(item=>Number.isFinite(item)):[]}points(values=this.plotValues()){let autoLo=values[0]??0,autoHi=values[0]??0;if(!Number.isFinite(this.min)||!Number.isFinite(this.max))for(const value of values)value<autoLo&&(autoLo=value),value>autoHi&&(autoHi=value);let lo=finiteNumber(this.min??autoLo,autoLo),hi=finiteNumber(this.max??autoHi,autoHi);lo>hi&&([lo,hi]=[hi,lo]);const samples=values.length>MAX_POINTS?decimate(values,MAX_POINTS):[...values];return samples.map((value,index)=>{const forwardX=samples.length>1?index/(samples.length-1)*VIEW:VIEW/2,x=this.effectiveDirection==="rtl"?VIEW-forwardX:forwardX,y=lo===hi?VIEW/2:VIEW-finiteRatio(value,lo,hi)*VIEW;return[x,y]})}linePath(points){const first=points[0];if(!first)return"";if(points.length===1)return`M${first[0]},${first[1]} L${first[0]},${first[1]}`;const curve=normalizeCurve(this.curve);if(curve==="step")return points.slice(1).reduce((path,point)=>`${path} H${point[0]} V${point[1]}`,`M${first[0]},${first[1]}`);if(curve==="natural"){let path=`M${first[0]},${first[1]}`;for(let index=0;index<points.length-1;index++){const before=points[Math.max(0,index-1)],start=points[index],end=points[index+1],after=points[Math.min(points.length-1,index+2)],c1x=start[0]+(end[0]-before[0])/6,c1y=start[1]+(end[1]-before[1])/6,c2x=end[0]-(after[0]-start[0])/6,c2y=end[1]-(after[1]-start[1])/6;path+=` C${c1x},${c1y} ${c2x},${c2y} ${end[0]},${end[1]}`}return path}return points.map(([x,y],index)=>`${index?"L":"M"}${x},${y}`).join(" ")}accessibleName(values){if(this.accessibleLabel)return this.accessibleLabel;if(this.label)return this.label;const last=values.at(-1);return last===void 0?this.localize("noData"):this.localize("trendOf",void 0,{count:getNumberFormat(this.effectiveLocale).format(values.length),value:getNumberFormat(this.effectiveLocale,{maximumFractionDigits:2}).format(last)})}renderBars(points){const slot=VIEW/Math.max(1,points.length),barWidth=Math.min(4,Math.max(1,slot*.7));return html`${points.map(([x,y])=>{const barY=Math.min(VIEW,Math.max(0,y));return svg`<rect
|
|
2
2
|
part="bar"
|
|
3
3
|
x="${x-barWidth/2}"
|
|
4
4
|
y="${barY}"
|
|
@@ -28,10 +28,6 @@ import{css}from"lit";const styles=css`
|
|
|
28
28
|
inset: 0;
|
|
29
29
|
z-index: var(--lr-layer-base);
|
|
30
30
|
}
|
|
31
|
-
/* The visible content is a sibling of the stretched native link. Built-in, non-interactive
|
|
32
|
-
regions let pointer input pass through to that link; public slots opt back into hit testing so
|
|
33
|
-
their own controls remain independently operable. Plain slotted content delegates its click
|
|
34
|
-
to the link in the class rather than becoming a dead patch in the card. */
|
|
35
31
|
.linked-content {
|
|
36
32
|
position: relative;
|
|
37
33
|
z-index: var(--lr-layer-content);
|
|
@@ -53,19 +49,11 @@ import{css}from"lit";const styles=css`
|
|
|
53
49
|
cursor: pointer;
|
|
54
50
|
transition: border-color var(--lr-transition-fast), box-shadow var(--lr-transition-fast);
|
|
55
51
|
}
|
|
56
|
-
/* :where() zeroes the extra [href] attribute selector's specificity contribution, leaving only
|
|
57
|
-
:hover itself so a consumer's ::part(base):hover override ((0,1,1)) wins without needing
|
|
58
|
-
!important. */
|
|
59
52
|
:where([part='base'][href]):hover,
|
|
60
53
|
:where(.linked-shell:hover > [part='base']) {
|
|
61
54
|
border-color: var(--lr-stat-link-hover-border-color, var(--lr-color-brand));
|
|
62
|
-
/* One step of lift on an otherwise flat resting card -- a hovered tile is still resting chrome,
|
|
63
|
-
not an overlay, so it stops at the card step. */
|
|
64
55
|
box-shadow: var(--lr-stat-link-hover-shadow, var(--lr-shadow-s));
|
|
65
56
|
}
|
|
66
|
-
/* The pressed tile keeps the hovered border and lift and adds a fill: a shadow change alone is
|
|
67
|
-
nearly invisible on a card this large, and the tint mixes toward --lr-color-mix-partner (the
|
|
68
|
-
text colour) so it darkens a light theme and lightens a dark one rather than always doing one. */
|
|
69
57
|
:where([part='base'][href]):active {
|
|
70
58
|
border-color: var(
|
|
71
59
|
--lr-stat-link-active-border-color,
|
|
@@ -100,8 +88,6 @@ import{css}from"lit";const styles=css`
|
|
|
100
88
|
letter-spacing: var(--lr-size-0-04em);
|
|
101
89
|
color: var(--lr-color-text-quiet);
|
|
102
90
|
}
|
|
103
|
-
/* An empty label part is still a flex item and still picks up [part='base']'s gap, leaving a
|
|
104
|
-
stray blank line above the value — collapse it the same way icon/sub/spark/caption/rows do. */
|
|
105
91
|
[part='label'][hidden] {
|
|
106
92
|
display: none;
|
|
107
93
|
}
|
|
@@ -120,26 +106,11 @@ import{css}from"lit";const styles=css`
|
|
|
120
106
|
font-weight: var(--lr-font-weight-bold);
|
|
121
107
|
font-family: var(--lr-font-mono);
|
|
122
108
|
}
|
|
123
|
-
/* [part='value']/[part='row-value'] become keyboard-focusable (tabindex="0")
|
|
124
|
-
whenever exactValue/row.exactValue is set (see stat.class.ts), so they
|
|
125
|
-
need their own visible focus ring like every other focusable part in the
|
|
126
|
-
library. */
|
|
127
109
|
[part='value']:focus-visible,
|
|
128
110
|
[part='row-value']:focus-visible {
|
|
129
111
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
130
112
|
outline-offset: var(--lr-focus-ring-offset);
|
|
131
113
|
}
|
|
132
|
-
/* Mouse-user counterpart to the :focus-visible rule above: only the [tabindex] state (i.e.
|
|
133
|
-
exactValue/row.exactValue is actually set, so there's a tooltip to reveal) gets a hover
|
|
134
|
-
affordance -- a value with nothing to reveal stays inert on hover, matching its own lack of a
|
|
135
|
-
focus ring. :where() zeroes the extra [tabindex] attribute selector's specificity
|
|
136
|
-
contribution, leaving only :hover itself so a consumer's ::part(value):hover /
|
|
137
|
-
::part(row-value):hover override wins without needing !important. */
|
|
138
|
-
/* no-pressed-state: the [tabindex] on these parts exists only so a keyboard user can reach the
|
|
139
|
-
same native title tooltip a mouse user gets by hovering -- there is no click handler and
|
|
140
|
-
nothing to activate, which is exactly what cursor: help says. A value part inside a linked
|
|
141
|
-
stat never takes the tabindex at all (the anchor owns the interaction, and its own pressed
|
|
142
|
-
state above covers it). */
|
|
143
114
|
:where([part='value'][tabindex]):hover,
|
|
144
115
|
:where([part='row-value'][tabindex]):hover {
|
|
145
116
|
color: var(--lr-color-brand);
|
|
@@ -159,10 +130,6 @@ import{css}from"lit";const styles=css`
|
|
|
159
130
|
font-size: var(--lr-font-size-sm);
|
|
160
131
|
font-weight: var(--lr-font-weight-semibold);
|
|
161
132
|
border-radius: var(--lr-radius);
|
|
162
|
-
/* 0.05rem/0.4rem don't cleanly map to any --lr-space-* step (the
|
|
163
|
-
smallest, --lr-space-xs, is 0.25rem): rounding the vertical value
|
|
164
|
-
up to xs would 5x this chip's padding and blow out the compact
|
|
165
|
-
trend-chip look, so both stay literal here. */
|
|
166
133
|
padding: var(--lr-size-0-05rem) var(--lr-size-0-4rem);
|
|
167
134
|
align-self: flex-start;
|
|
168
135
|
}
|
|
@@ -172,10 +139,6 @@ import{css}from"lit";const styles=css`
|
|
|
172
139
|
[part='trend'][data-direction='down'] svg {
|
|
173
140
|
transform: rotate(90deg);
|
|
174
141
|
}
|
|
175
|
-
/* Scoped cssprops (falling back to today's exact shared-token values) so a consumer can retint
|
|
176
|
-
just the trend pill without also recoloring the headline value's variant="success"/"danger"
|
|
177
|
-
tint below, which deliberately keeps reading the shared --lr-color-success/-danger tokens
|
|
178
|
-
directly -- and vice versa. */
|
|
179
142
|
[part='trend'][data-polarity='good'] {
|
|
180
143
|
color: var(--lr-stat-trend-good-color, var(--lr-color-success));
|
|
181
144
|
background: var(--lr-stat-trend-good-bg, color-mix(in srgb, var(--lr-color-success) 8%, transparent));
|
|
@@ -197,8 +160,6 @@ import{css}from"lit";const styles=css`
|
|
|
197
160
|
color: var(--lr-stat-value-danger-color, var(--lr-color-danger));
|
|
198
161
|
}
|
|
199
162
|
[part='spark'] {
|
|
200
|
-
/* Consumers compose their own <lr-sparkline slot="spark">; this part
|
|
201
|
-
only needs to reserve width for it. */
|
|
202
163
|
display: block;
|
|
203
164
|
}
|
|
204
165
|
[part='spark'][hidden] {
|
|
@@ -226,9 +187,6 @@ import{css}from"lit";const styles=css`
|
|
|
226
187
|
display: flex;
|
|
227
188
|
min-inline-size: 0;
|
|
228
189
|
flex-direction: column;
|
|
229
|
-
/* Slightly tighter than the card's own --lr-space-xs gap so the
|
|
230
|
-
breakdown list reads as one nested group rather than siblings of
|
|
231
|
-
equal weight with label/value/caption. */
|
|
232
190
|
gap: var(--lr-size-0-125rem);
|
|
233
191
|
}
|
|
234
192
|
[part='rows'][hidden] {
|
|
@@ -255,14 +213,9 @@ import{css}from"lit";const styles=css`
|
|
|
255
213
|
font-family: var(--lr-font-mono);
|
|
256
214
|
font-weight: var(--lr-font-weight-semibold);
|
|
257
215
|
}
|
|
258
|
-
/* Orthogonal to the status variant: an accent edge that marks a stat as
|
|
259
|
-
visually emphasized (e.g. the "headline" stat in a group) regardless of
|
|
260
|
-
status color. */
|
|
261
216
|
:host([emphasis]) [part='base'] {
|
|
262
217
|
border-inline-start: var(--lr-border-width-thick) solid var(--lr-stat-emphasis-border-color, var(--lr-color-brand));
|
|
263
218
|
}
|
|
264
|
-
/* Status semantics win over visual emphasis: only tint the value with the
|
|
265
|
-
brand color when there's no status variant already claiming it. */
|
|
266
219
|
:host([emphasis][variant='neutral']) [part='value'] {
|
|
267
220
|
color: var(--lr-stat-emphasis-value-color, var(--lr-color-brand));
|
|
268
221
|
}
|
|
@@ -283,13 +236,6 @@ import{css}from"lit";const styles=css`
|
|
|
283
236
|
padding: var(--lr-space-s);
|
|
284
237
|
gap: var(--lr-size-0-125rem);
|
|
285
238
|
}
|
|
286
|
-
/* MUST stay after :host([compact]): both selectors are :host([x]) [part='base'], i.e. equal
|
|
287
|
-
specificity, so source order alone decides which padding wins when a stat is both compact and
|
|
288
|
-
plain. plain is the stronger statement ("no chrome at all"), so it goes last.
|
|
289
|
-
Also drops block-size: 100% — stretching to fill an arbitrarily tall parent is card behavior;
|
|
290
|
-
a chrome-less stat sits at its content height so it can be dropped inline in prose or a
|
|
291
|
-
toolbar. The emphasis accent edge is card chrome too and goes with the rest of the border;
|
|
292
|
-
the emphasis brand value tint is unaffected and still applies. */
|
|
293
239
|
:host([frame='plain']) [part='base'] {
|
|
294
240
|
padding: 0;
|
|
295
241
|
border: 0;
|
|
@@ -304,15 +250,9 @@ import{css}from"lit";const styles=css`
|
|
|
304
250
|
:host([frame='plain']) .linked-content {
|
|
305
251
|
padding: 0;
|
|
306
252
|
}
|
|
307
|
-
/* The card's interactive affordance is a border-color shift plus a lift shadow, and neither
|
|
308
|
-
reads on a border-less, background-less box — a linked plain stat underlines its headline
|
|
309
|
-
value instead. The :focus-visible outline above needs no border and still applies as-is. */
|
|
310
253
|
:host([frame='plain']) [part='base'][href]:hover {
|
|
311
254
|
box-shadow: none;
|
|
312
255
|
}
|
|
313
|
-
/* The pressed card treatment has to be stripped for the same reason the hovered one is: a lift
|
|
314
|
-
shadow with no surface under it reads as a smudge, and a fill would put back exactly the box
|
|
315
|
-
frame="plain" exists to remove. The thicker underline below carries the press instead. */
|
|
316
256
|
:host([frame='plain']) [part='base'][href]:active {
|
|
317
257
|
box-shadow: none;
|
|
318
258
|
background: transparent;
|
|
@@ -321,9 +261,6 @@ import{css}from"lit";const styles=css`
|
|
|
321
261
|
:host([frame='plain']) [part='base'][href]:focus-visible + .linked-content [part='value'] {
|
|
322
262
|
text-decoration: underline;
|
|
323
263
|
}
|
|
324
|
-
/* Pressed thickens the same underline rather than recolouring the value -- the value already
|
|
325
|
-
carries the status variant's colour, and overriding it for the length of a click would read as
|
|
326
|
-
the stat changing state. */
|
|
327
264
|
:host([frame='plain']) [part='base'][href]:active + .linked-content [part='value'] {
|
|
328
265
|
text-decoration: underline;
|
|
329
266
|
text-decoration-thickness: var(--lr-border-width-medium);
|
|
@@ -340,13 +277,9 @@ import{css}from"lit";const styles=css`
|
|
|
340
277
|
align-items: baseline;
|
|
341
278
|
column-gap: var(--lr-space-s);
|
|
342
279
|
}
|
|
343
|
-
/* The trend pill opts out of baseline alignment in the stacked layout; on a single baseline row
|
|
344
|
-
it has to sit on that baseline like everything else. */
|
|
345
280
|
:host([orientation='horizontal']) [part='trend'] {
|
|
346
281
|
align-self: baseline;
|
|
347
282
|
}
|
|
348
|
-
/* A breakdown list and a sparkline have no sensible place on a text baseline, so they claim a
|
|
349
|
-
full line of their own and stay stacked beneath the horizontal row. */
|
|
350
283
|
:host([orientation='horizontal']) [part='spark'],
|
|
351
284
|
:host([orientation='horizontal']) [part='rows'] {
|
|
352
285
|
flex-basis: 100%;
|