@aceshooting/lyra-ui 9.1.1 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +785 -0
- package/custom-elements.json +1 -1
- package/design-tokens.json +13 -0
- package/dist/cli/migrate-wa.mjs +216 -1
- 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.class.d.ts +27 -0
- package/dist/components/charts/chart/box-plot.class.js +14 -4
- package/dist/components/charts/chart/box-plot.styles.js +28 -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 +120 -0
- package/dist/components/charts/chart/chart.class.js +16 -6
- package/dist/components/charts/chart/chart.styles.js +28 -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 +117 -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.d.ts +71 -3
- package/dist/components/forms/combobox/combobox.class.js +5 -3
- package/dist/components/forms/combobox/combobox.styles.js +31 -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 +47 -0
- package/dist/components/forms/date-picker/date-picker.class.js +36 -22
- package/dist/components/forms/date-picker/date-picker.styles.js +82 -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 +23 -1
- 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 +178 -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 +32 -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 +28 -4
- 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 +72 -40
- 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 +20 -113
- package/dist/lyra.d.ts +9 -6
- package/dist/styles/reservations.css +82 -0
- package/dist/svelte.d.ts +72 -40
- 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 +72 -40
- 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 +8 -6
- package/llms/components/lr-box-plot.md +15 -4
- package/llms/components/lr-browser-frame.md +7 -3
- package/llms/components/lr-bubble-chart.md +8 -6
- package/llms/components/lr-calendar.md +9 -2
- package/llms/components/lr-card.md +24 -0
- package/llms/components/lr-chart.md +45 -11
- 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 +47 -8
- 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-date-input.md +22 -2
- package/llms/components/lr-date-picker.md +23 -3
- package/llms/components/lr-details.md +11 -2
- package/llms/components/lr-dialog.md +16 -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 +8 -6
- 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 +30 -8
- package/llms/components/lr-heatmap.md +46 -0
- package/llms/components/lr-histogram.md +7 -4
- 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 +8 -6
- package/llms/components/lr-lite-chart.md +16 -6
- package/llms/components/lr-map.md +91 -10
- 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 +46 -7
- package/llms/components/lr-pdf-viewer.md +62 -2
- package/llms/components/lr-pie-chart.md +8 -6
- package/llms/components/lr-polar-area-chart.md +8 -6
- package/llms/components/lr-popover.md +25 -1
- 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 +8 -6
- 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 +8 -6
- 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/tokens.md +15 -1
- package/llms-full.txt +1335 -306
- package/package.json +17 -5
- package/vscode-css-data.json +93 -2
- package/vscode-html-data.json +513 -59
- package/web-types.json +457 -72
|
@@ -1,33 +1,9 @@
|
|
|
1
1
|
import{css}from"lit";const styles=css`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
|
-
/* Lets the host shrink below its row's max-content width when it's a flex/grid
|
|
5
|
-
item in a consumer's own narrow layout -- the default min-width:auto for flex
|
|
6
|
-
items would otherwise force the row wide regardless of [part='base']'s
|
|
7
|
-
flex-wrap below. */
|
|
8
4
|
min-inline-size: 0;
|
|
9
|
-
/* Ring drawn around the selected swatch. A dedicated token (rather than reusing
|
|
10
|
-
--lr-focus-ring-color from tokens.styles.ts) so a host can retheme the
|
|
11
|
-
selection indicator independently of the :focus-visible outline and every
|
|
12
|
-
other ring color in the library, while defaulting to the brand color. */
|
|
13
5
|
--_lr-swatch-picker-selected-color: var(--lr-color-brand);
|
|
14
|
-
/* Blur radius of that same ring -- 0 by default (a crisp ring, today's look for every
|
|
15
|
-
existing consumer). A host that wants a soft glow instead sets this to a real length
|
|
16
|
-
(e.g. 0.4rem) rather than reaching for ::part(swatch)[aria-checked] from outside, which
|
|
17
|
-
isn't reliably selectable: the CSS Shadow Parts spec only allows a fixed set of
|
|
18
|
-
pseudo-classes after ::part(), not arbitrary attribute selectors, so that combinator can
|
|
19
|
-
silently fail to match depending on the engine. */
|
|
20
6
|
--_lr-swatch-picker-selected-blur: 0;
|
|
21
|
-
/* Pulsing "shine" duration for the selected swatch -- 0s (the default) is a no-op (today's
|
|
22
|
-
static look for every existing consumer, and unaffected by this token at all: a 0-duration
|
|
23
|
-
animation resolves to its end state instantly and imperceptibly). A host sets a real
|
|
24
|
-
duration (e.g. 1.6s) to make the selected swatch rhythmically brighten and settle back. A
|
|
25
|
-
separate filter: brightness() animation (not box-shadow, which
|
|
26
|
-
--lr-swatch-picker-selected-blur above already owns) so the two compose freely without
|
|
27
|
-
fighting over the same CSS property, and so this reads identically for a plain color circle
|
|
28
|
-
and an icon swatch alike -- filter applies to the whole element including a slotted icon,
|
|
29
|
-
with no icon-specific branching needed (unlike the box-shadow/drop-shadow split below, which
|
|
30
|
-
needs one precisely because box-shadow doesn't reach into a transparent box's own content). */
|
|
31
7
|
--_lr-swatch-picker-shine-duration: 0s;
|
|
32
8
|
--_lr-swatch-picker-gemstone-selected-blur: var(--lr-size-0-5rem);
|
|
33
9
|
--_lr-swatch-picker-gemstone-shine-duration: var(--lr-transition-ambient);
|
|
@@ -38,11 +14,6 @@ import{css}from"lit";const styles=css`
|
|
|
38
14
|
);
|
|
39
15
|
--_lr-swatch-picker-gap: var(--lr-space-xs);
|
|
40
16
|
}
|
|
41
|
-
/* A swatch is a square tap target in a wrapping grid, not a form-control row, so this is the
|
|
42
|
-
component's own ladder rather than the shared --lr-form-control-height one: the two agree from
|
|
43
|
-
m upwards, but the shared 2xs/xs steps (20/24px) would put a swatch at or under the WCAG 2.5.8
|
|
44
|
-
minimum with no margin. It still matches both spellings of every tier, the same way
|
|
45
|
-
internal/sizes.styles.ts does, so size="small" is honoured here too. */
|
|
46
17
|
:host([size="2xs"]) {
|
|
47
18
|
--_lr-swatch-picker-hit-size: var(--lr-size-1-5rem);
|
|
48
19
|
--_lr-swatch-picker-fill-size: var(
|
|
@@ -98,14 +69,6 @@ import{css}from"lit";const styles=css`
|
|
|
98
69
|
}
|
|
99
70
|
[part="swatch"] {
|
|
100
71
|
box-sizing: border-box;
|
|
101
|
-
/* The interactive hit target is sized via the component-scoped --lr-swatch-picker-hit-size
|
|
102
|
-
(default --lr-size-2-5rem, swapped per size tier below, floored at 24px for WCAG 2.5.8),
|
|
103
|
-
while the *visible* fill is sized independently via --lr-swatch-picker-fill-size (default
|
|
104
|
-
--lr-size-1-5rem, also swapped per tier) -- rendered on the separate
|
|
105
|
-
[part='swatch-fill']/[part='swatch-icon'] child below and centered via flex, not by resizing
|
|
106
|
-
this button itself. A swatch's own fill/icon is what previously doubled as the clickable box;
|
|
107
|
-
splitting them keeps the dense picker grid's visual density unchanged while still growing the
|
|
108
|
-
real click/tap area. */
|
|
109
72
|
display: inline-flex;
|
|
110
73
|
align-items: center;
|
|
111
74
|
justify-content: center;
|
|
@@ -121,8 +84,6 @@ import{css}from"lit";const styles=css`
|
|
|
121
84
|
border: none;
|
|
122
85
|
border-radius: 50%;
|
|
123
86
|
background: none;
|
|
124
|
-
/* Exposes the option's color to a slotted icon (part='swatch-icon') via currentColor -- inert
|
|
125
|
-
when no icon is present, since [part='swatch-fill'] paints its own background-color instead. */
|
|
126
87
|
color: var(--lr-swatch-color);
|
|
127
88
|
cursor: pointer;
|
|
128
89
|
}
|
|
@@ -139,13 +100,8 @@ import{css}from"lit";const styles=css`
|
|
|
139
100
|
);
|
|
140
101
|
border: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
141
102
|
border-radius: 50%;
|
|
142
|
-
/* Per-swatch fill from the option's color, set inline by swatch-picker.class.ts.
|
|
143
|
-
Read through a var() (rather than an inline background-color declaration) so a
|
|
144
|
-
consumer's ::part(swatch-fill) background rule can still win when overriding it. */
|
|
145
103
|
background-color: var(--lr-swatch-color);
|
|
146
104
|
transition: transform var(--lr-transition-fast);
|
|
147
|
-
/* The fill is the option's data, not component chrome. Preserve it while the enclosing button
|
|
148
|
-
and its focus/selection affordances continue to use system colors in forced-colors mode. */
|
|
149
105
|
forced-color-adjust: none;
|
|
150
106
|
}
|
|
151
107
|
[part="swatch-icon"] {
|
|
@@ -160,9 +116,6 @@ import{css}from"lit";const styles=css`
|
|
|
160
116
|
--lr-swatch-picker-fill-size,
|
|
161
117
|
var(--_lr-swatch-picker-fill-size)
|
|
162
118
|
);
|
|
163
|
-
/* gemstoneGlyph() follows the icon convention of a 1em intrinsic box. Establish that em from
|
|
164
|
-
the visible fill token here so the SVG fills this wrapper instead of inheriting the browser's
|
|
165
|
-
smaller default button font size. Consumer-provided em-sized icons benefit identically. */
|
|
166
119
|
font-size: var(
|
|
167
120
|
--lr-swatch-picker-fill-size,
|
|
168
121
|
var(--_lr-swatch-picker-fill-size)
|
|
@@ -170,10 +123,6 @@ import{css}from"lit";const styles=css`
|
|
|
170
123
|
transition: transform var(--lr-transition-fast);
|
|
171
124
|
forced-color-adjust: none;
|
|
172
125
|
}
|
|
173
|
-
/* The disabled arm keys off the button's own native :disabled, which is exactly what render()
|
|
174
|
-
binds -- not :host([disabled]) -- so the swatch that is actually inert is the swatch that
|
|
175
|
-
actually dims. (:host(:disabled) would be dead code here: this control is deliberately not
|
|
176
|
-
form-associated, so the UA never computes a FACE disabled state for the host.) */
|
|
177
126
|
[part="swatch"]:disabled {
|
|
178
127
|
opacity: var(--lr-opacity-disabled);
|
|
179
128
|
cursor: not-allowed;
|
|
@@ -190,13 +139,6 @@ import{css}from"lit";const styles=css`
|
|
|
190
139
|
[part="swatch"][aria-checked="true"] [part="swatch-icon"] {
|
|
191
140
|
transform: scale(1.2);
|
|
192
141
|
}
|
|
193
|
-
/* The pressed state is expressed as scale, not as a colour mix, because this part's fill IS the
|
|
194
|
-
option's colour -- tinting it would misreport the value the swatch exists to show. Pressing
|
|
195
|
-
pushes the raised swatch back down past its resting size, so the press reads as a physical
|
|
196
|
-
depress against the hover lift rather than as a second, slightly-larger lift.
|
|
197
|
-
Deliberately placed AFTER the aria-checked rule above: the two selectors are the same
|
|
198
|
-
specificity (0,3,0), so ordering is the only thing that lets the already-selected swatch --
|
|
199
|
-
the one most likely to be pressed again -- show any pressed feedback at all. */
|
|
200
142
|
[part="swatch"]:not(:disabled):active [part="swatch-fill"],
|
|
201
143
|
[part="swatch"]:not(:disabled):active [part="swatch-icon"] {
|
|
202
144
|
transform: scale(0.95);
|
|
@@ -228,19 +170,6 @@ import{css}from"lit";const styles=css`
|
|
|
228
170
|
filter: brightness(1.4);
|
|
229
171
|
}
|
|
230
172
|
}
|
|
231
|
-
/* An icon option renders its own shape instead of the plain filled circle, so the box-shadow ring
|
|
232
|
-
above (drawn around [part='swatch-fill']'s true shape) doesn't apply to it at all -- render()
|
|
233
|
-
only ever mounts one of [part='swatch-fill']/[part='swatch-icon'] per swatch (see
|
|
234
|
-
swatch-picker.class.ts), so this selector and the one above never both match the same swatch.
|
|
235
|
-
Swap to a drop-shadow on the icon itself, which follows its real rendered shape.
|
|
236
|
-
|
|
237
|
-
The shine gets its OWN keyframe here (rather than sharing the fill's) because both effects
|
|
238
|
-
land on filter for an icon, and a running animation outranks an author-normal declaration:
|
|
239
|
-
a brightness-only keyframe would win the cascade and blank this glow out entirely for the
|
|
240
|
-
whole animation -- i.e. for every swatch in mode="gemstone", where the shine is on by default.
|
|
241
|
-
The keyframe therefore re-states the drop-shadow alongside the brightness so the two compose,
|
|
242
|
-
and the static declaration below stays as the path taken when the animation isn't running
|
|
243
|
-
(--lr-swatch-picker-shine-duration: 0s, and prefers-reduced-motion). */
|
|
244
173
|
[part="swatch"][aria-checked="true"] [part="swatch-icon"] {
|
|
245
174
|
filter: drop-shadow(
|
|
246
175
|
0 0
|
|
@@ -291,12 +220,6 @@ import{css}from"lit";const styles=css`
|
|
|
291
220
|
brightness(1.4);
|
|
292
221
|
}
|
|
293
222
|
}
|
|
294
|
-
/* The scale is redundant selection feedback (the ring already conveys it), so keep the
|
|
295
|
-
transform but drop its easing under reduced-motion -- the swatch snaps rather than glides.
|
|
296
|
-
The shine animation stops outright (a steady brightness, not a pulsing one) rather than
|
|
297
|
-
merely losing its own easing, matching prefers-reduced-motion's intent for anything that
|
|
298
|
-
loops -- a host that opted into --lr-swatch-picker-shine-duration still gets a selected
|
|
299
|
-
swatch, just without the rhythmic brightening. */
|
|
300
223
|
@media (prefers-reduced-motion: reduce) {
|
|
301
224
|
[part="swatch-fill"],
|
|
302
225
|
[part="swatch-icon"] {
|
|
@@ -75,6 +75,9 @@ export interface LyraSwitchEventMap {
|
|
|
75
75
|
* @cssstate checked - Matches while the live switch state is on.
|
|
76
76
|
* @cssstate disabled - Matches while disabled directly or by an ancestor fieldset.
|
|
77
77
|
* @csspart form-control - The outer wrapper around the switch, error and hint.
|
|
78
|
+
* @csspart row - The row wrapping the switch owner and the label as siblings. This is the node
|
|
79
|
+
* to size or align when laying out a column of switches; `base`/`switch` is only the track box
|
|
80
|
+
* inside it, so its inline size tracks the track, not the row.
|
|
78
81
|
* @csspart wrapper - Compatibility name on the semantic switch owner.
|
|
79
82
|
* @csspart base - Compatibility name for the semantic switch owner; use `switch`.
|
|
80
83
|
* @csspart switch - The interactive `role="switch"` owner around the track, with the rich default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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{LyraElement}from"../../../internal/lyra-element.js";import{AnchoredValidityController,VALIDITY_ANCHOR}from"../../../internal/anchored-validity.js";import{setCustomState,syncValidityStates}from"../../../internal/custom-states.js";import{sizes}from"../../../internal/sizes.styles.js";import{styles}from"./switch.styles.js";import{dispatchNativeEvent,dispatchNativeInputEvent,relayNativeEvent}from"../../../internal/native-event-relay.js";import{installInvalidEventAlias}from"../../../internal/invalid-event-alias.js";import{omittedEmptyStringConverter}from"../../../internal/converters.js";import{hasRealContent}from"../../../internal/a11y.js";import{isActionableElement}from"../../../internal/focus-navigation.js";import{attachInternalsSafely,getFormOwner,installCustomErrorProperty,isBarredFromValidation,setFormOwner}from"../../../internal/form-associated.js";import{currentValidityValidator}from"../form-validator.js";import{LYRA_DEFAULT_fieldRequired,LYRA_DEFAULT_switchRequired}from"../../../internal/default-strings.generated.js";class LyraSwitch extends LyraElement{static{this.defaultStrings={...super.defaultStrings,fieldRequired:LYRA_DEFAULT_fieldRequired,switchRequired:LYRA_DEFAULT_switchRequired}}static get validators(){return[currentValidityValidator("required","disabled","checked","value")]}static{this.styles=[LyraElement.styles,sizes,styles]}static{this.formAssociated=!0}static{this.properties={customError:{attribute:"custom-error",reflect:!0,noAccessor:!0},checked:{attribute:!1,noAccessor:!0},defaultChecked:{attribute:"checked",type:Boolean,reflect:!0,useDefault:!0,noAccessor:!0},disabled:{type:Boolean,reflect:!0,noAccessor:!0},name:{reflect:!0,noAccessor:!0,converter:omittedEmptyStringConverter},required:{type:Boolean,reflect:!0,noAccessor:!0},size:{reflect:!0},value:{reflect:!0,noAccessor:!0}}}get effectiveDisabled(){return this.disabled||this._fieldsetDisabled}get checked(){return this._checked}set checked(next){const old=this._checked;this.settingDefaultChecked||(this._checkedDirty=!0),this._checked=!!next,this.syncFormState(),this.requestUpdate("checked",old)}get defaultChecked(){return this._defaultChecked}set defaultChecked(next){if(this.reflectingDefaultChecked)return;const old=this._defaultChecked;this._defaultChecked=!!next,this.reflectingDefaultChecked=!0;try{this.toggleAttribute("checked",this._defaultChecked)}finally{this.reflectingDefaultChecked=!1}this._checkedDirty||this.restoreCheckedFromDefault(),this.requestUpdate("defaultChecked",old)}get disabled(){return this._disabled}set disabled(next){const old=this._disabled;this._disabled=!!next,this.toggleAttribute("disabled",this._disabled),this.updateValidity(),this.requestUpdate("disabled",old)}get name(){return this._name}set name(next){const old=this._name;this._name=next??"",this._name?this.setAttribute("name",this._name):this.removeAttribute("name"),this.requestUpdate("name",old)}get required(){return this._required}set required(next){const old=this._required;this._required=!!next,this.toggleAttribute("required",this._required),this.updateValidity(),this.requestUpdate("required",old)}get value(){return this._value}set value(next){const old=this._value;this._value=next??"on",next==null?this.hasAttribute("value")&&this.removeAttribute("value"):this.getAttribute("value")!==this._value&&this.setAttribute("value",this._value),this.syncFormState(),this.requestUpdate("value",old,{reflect:!1})}constructor(){super(),this.size="m",this.hint="",this.helpText="",this.withHint=!1,this.errorText="",this.hasLabelSlot=!1,this.hasHintSlot=!1,this.hasHelpTextSlot=!1,this.hasErrorSlot=!1,this.touched=!1,this.hasInteracted=!1,this._defaultChecked=!1,this._checkedDirty=!1,this.settingDefaultChecked=!1,this.reflectingDefaultChecked=!1,this._fieldsetDisabled=!1,this._name="",this._checked=!1,this._disabled=!1,this._required=!1,this._value="on",this.onClick=event=>{const owner=this[VALIDITY_ANCHOR]();for(const target of event.composedPath()){if(target===event.currentTarget)break;if(target&&typeof target=="object"&&target.nodeType===1&&target!==owner&&isActionableElement(target))return}this.setFromUser(!this.checked)},this.onBlur=event=>{this.liveDisabled||(this.touched=!0,this.hasInteracted=!0,this.reflectValidityStates()),relayNativeEvent(this,event)},this.onFocus=event=>{if(this.liveDisabled){event.stopPropagation();return}relayNativeEvent(this,event)},this.onKeyDown=e=>{if(!this.liveDisabled&&!e.repeat){if(e.key===" "||e.key==="Spacebar"){e.preventDefault(),this.setFromUser(!this.checked);return}if(e.key==="ArrowLeft"||e.key==="ArrowRight"){e.preventDefault();const turnsOn=this.effectiveDirection==="rtl"?e.key==="ArrowLeft":e.key==="ArrowRight";this.setFromUser(turnsOn)}}},this.onLabelSlotChange=event=>this.handleLabelSlotChange(event),this.onSlotChange=event=>this.handleLabelSlotChange(event),this.onHintSlotChange=e=>{this.hasHintSlot=e.target.assignedElements({flatten:!0}).length>0},this.onHelpTextSlotChange=e=>{this.hasHelpTextSlot=e.target.assignedElements({flatten:!0}).length>0},this.onErrorSlotChange=e=>{this.hasErrorSlot=e.target.assignedElements({flatten:!0}).length>0},installInvalidEventAlias(this,init=>this.emit("lr-invalid",null,init)),this.internals=attachInternalsSafely(this),this.validityController=new AnchoredValidityController(this,this.internals,()=>this[VALIDITY_ANCHOR]()),installCustomErrorProperty(this,()=>this.validityController.customValidityMessage),this.syncFormState()}get form(){return getFormOwner(this.internals)}set form(owner){setFormOwner(this,owner)}getForm(){return getFormOwner(this.internals)}get labels(){return this.internals.labels}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}[VALIDITY_ANCHOR](){return this.renderRoot?.querySelector(".switch-owner")??null}get liveDisabled(){return this.effectiveDisabled||this.matches(":disabled")}click(){this.liveDisabled||this[VALIDITY_ANCHOR]()?.click()}focus(options){this.liveDisabled||this[VALIDITY_ANCHOR]()?.focus(options)}blur(){this[VALIDITY_ANCHOR]()?.blur()}connectedCallback(){super.connectedCallback(),this.updateValidity();const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;this.labelObserver=MutationObserverCtor?new MutationObserverCtor(()=>{this.bindLabelObserverTargets(),this.recomputeHasLabelSlot()}):void 0,this.addEventListener("slotchange",this.onLabelSlotChange),this.bindLabelObserverTargets(),this.hasUpdated?this.recomputeLightDomSlotState():this.seedFirstRenderState(()=>this.recomputeLightDomSlotState())}disconnectedCallback(){this.removeEventListener("slotchange",this.onLabelSlotChange),this.labelObserver?.disconnect(),this.labelObserver=void 0,super.disconnectedCallback()}willUpdate(changed){super.willUpdate(changed)}get barredFromValidation(){return isBarredFromValidation(this,this.internals)}updateValidity(){this.barredFromValidation?this.validityController.setValidity({}):this.required&&!this.checked?this.validityController.setValidity({valueMissing:!0},this.localize("switchRequired")):this.validityController.setValidity({}),this.reflectValidityStates()}reflectValidityStates(){syncValidityStates(this.internals,{required:this.required,hasInteracted:this.hasInteracted,barred:this.barredFromValidation}),setCustomState(this.internals,"checked",this.checked),setCustomState(this.internals,"disabled",this.effectiveDisabled)}syncFormState(){this.internals.setFormValue(this.checked?this.value:null,this.checked?"checked":"unchecked"),this.updateValidity()}formResetCallback(){this.touched=!1,this.hasInteracted=!1,this.restoreCheckedFromDefault(),this.reflectValidityStates()}formStateRestoreCallback(state2,reason){this.checked=state2==="checked"}restoreCheckedFromDefault(){this.settingDefaultChecked=!0;try{this.checked=this._defaultChecked}finally{this.settingDefaultChecked=!1}this._checkedDirty=!1}formDisabledCallback(disabled){this._fieldsetDisabled=disabled,this.updateValidity(),this.requestUpdate()}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.hasInteracted=!0,this.reflectValidityStates(),this.internals.reportValidity()}setCustomValidity(message){this.validityController.setCustomValidity(message??""),this.reflectValidityStates(),this.requestUpdate()}resetValidity(){this.setCustomValidity("")}setFromUser(next){this.liveDisabled||this.checked!==next&&(this.hasInteracted=!0,this.checked=next,dispatchNativeInputEvent(this),this.emit("lr-input",{checked:this.checked}),dispatchNativeEvent(this,"change"),this.emit("lr-change",{checked:this.checked}))}isDefaultLabelNode(node){if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName===null||slotName===""}labelForwardingSlots(){return Array.from(this.querySelectorAll("slot")).filter(slot=>{let top=slot;for(;top.parentNode&&top.parentNode!==this;)top=top.parentNode;return top.parentNode===this&&this.isDefaultLabelNode(top)})}observeLabelNode(node){if(this.labelObserver){if(node.nodeType===3){this.labelObserver.observe(node,{characterData:!0});return}node.nodeType===1&&this.labelObserver.observe(node,{attributes:!0,attributeFilter:["aria-hidden","aria-label","class","hidden","inert","slot","style"],childList:!0,characterData:!0,subtree:!0})}}bindLabelObserverTargets(){if(this.labelObserver){this.labelObserver.disconnect(),this.observeLabelNode(this);for(const slot of this.labelForwardingSlots())if(slot.assignedNodes().length!==0)for(const assigned of slot.assignedNodes({flatten:!0}))this.observeLabelNode(assigned)}}recomputeHasLabelSlot(){const renderRoot=this.renderRoot,childNodes=this.childNodes;if(!renderRoot||!childNodes)return;const slot=renderRoot.querySelector("slot:not([name])"),nodes=slot?slot.assignedNodes({flatten:!0}):Array.from(childNodes).filter(node=>this.isDefaultLabelNode(node)).flatMap(node=>{if(node.nodeType!==1||node.localName!=="slot")return[node];const forwardingSlot=node;return forwardingSlot.assignedNodes().length>0?forwardingSlot.assignedNodes({flatten:!0}):Array.from(forwardingSlot.childNodes)});this.hasLabelSlot=hasRealContent(nodes)}recomputeLightDomSlotState(){this.recomputeHasLabelSlot();const children=this.children;children&&(this.hasHintSlot=Array.from(children).some(element=>element.getAttribute("slot")==="hint"),this.hasHelpTextSlot=Array.from(children).some(element=>element.getAttribute("slot")==="help-text"),this.hasErrorSlot=Array.from(children).some(element=>element.getAttribute("slot")==="error"))}handleLabelSlotChange(event){const target=event.target;target?.nodeType!==1||target.localName!=="slot"||target.getRootNode()!==this.renderRoot&&!this.labelForwardingSlots().includes(target)||(this.bindLabelObserverTargets(),this.recomputeHasLabelSlot())}render(){const hasHint=this.withHint||this.hasHintSlot||this.hasHelpTextSlot||this.hint.length>0||this.helpText.length>0,hasError=this.hasErrorSlot||this.errorText.length>0,describedBy=[hasError?"switch-error":"",hasHint?"switch-hint":""].filter(Boolean).join(" ");return html`
|
|
2
2
|
<div part="form-control">
|
|
3
|
-
<span class="switch-layout" @click=${this.onClick}>
|
|
3
|
+
<span class="switch-layout" part="row" @click=${this.onClick}>
|
|
4
4
|
<span
|
|
5
5
|
class="switch-owner"
|
|
6
6
|
part="base switch wrapper"
|
|
@@ -2,23 +2,12 @@ import{css}from"lit";const styles=css`
|
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
max-inline-size: 100%;
|
|
5
|
-
/* Component-local geometry knobs (defined on :host so each instance can
|
|
6
|
-
tune its own geometry) — a fully-rounded pill/thumb
|
|
7
|
-
needs a radius well past --lr-radius's small 0.375rem default, so
|
|
8
|
-
it's expressed here rather than bent onto that shared token.
|
|
9
|
-
Both track dimensions ride the shared size ladder
|
|
10
|
-
(internal/sizes.styles.ts): the track is half the tier's control height, and its inline size
|
|
11
|
-
keeps the 1.8:1 aspect ratio the control has always had. At the default "m" tier that is
|
|
12
|
-
exactly the 1.25rem x 2.25rem it shipped with before it had a size at all. */
|
|
13
5
|
--_lr-switch-track-block-size: calc(var(--lr-form-control-height) * 0.5);
|
|
14
6
|
--_lr-switch-track-inline-size: calc(
|
|
15
7
|
var(--lr-switch-track-block-size, var(--_lr-switch-track-block-size)) *
|
|
16
8
|
1.8
|
|
17
9
|
);
|
|
18
10
|
--_lr-switch-thumb-offset: var(--lr-size-2px);
|
|
19
|
-
/* The track's resting fill, named so the hover and press mixes below have exactly one base to
|
|
20
|
-
move away from in BOTH states -- the unchecked grey and the checked brand -- rather than two
|
|
21
|
-
rules each restating a colour. */
|
|
22
11
|
--_lr-switch-track-fill: var(--lr-color-border);
|
|
23
12
|
}
|
|
24
13
|
.switch-layout {
|
|
@@ -40,15 +29,6 @@ import{css}from"lit";const styles=css`
|
|
|
40
29
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
41
30
|
outline-offset: var(--lr-focus-ring-offset);
|
|
42
31
|
}
|
|
43
|
-
/* Gives mouse users the same 'this is interactive' cue the :focus-visible ring above already
|
|
44
|
-
gives keyboard users, and a press that reads as deeper than the hover. Gated on
|
|
45
|
-
:host(:not(:disabled)) the same way lr-checkbox's/lr-radio's [part~='base']:hover rules are
|
|
46
|
-
(this control isn't a native button, so a bare [part~='base']:hover would otherwise also fire
|
|
47
|
-
while disabled).
|
|
48
|
-
Both land on the TRACK, and both are colour mixes. This was a filter: brightness() lift on
|
|
49
|
-
[part~='base'] before 8.0.0, which was wrong twice over: a filter multiplies every channel, so
|
|
50
|
-
it moved the track only by luck of its tone, and it applies to the whole subtree, so it faded
|
|
51
|
-
the label text sitting next to the track as well. */
|
|
52
32
|
:host(:not(:disabled)) .switch-layout:hover [part~="track"] {
|
|
53
33
|
background: var(
|
|
54
34
|
--lr-switch-track-hover-fill,
|
|
@@ -77,14 +57,6 @@ import{css}from"lit";const styles=css`
|
|
|
77
57
|
[part~="track"] {
|
|
78
58
|
position: relative;
|
|
79
59
|
flex: 0 0 auto;
|
|
80
|
-
/* content-box, not the library-wide border-box default: the thumb is absolutely positioned
|
|
81
|
-
against this element's padding box, and its own size/travel math (below) is derived from
|
|
82
|
-
these same declared dimensions. Under border-box, a consumer-added ::part(track) border
|
|
83
|
-
would eat into the padding box without the thumb shrinking to match, breaking clearance
|
|
84
|
-
symmetry on the far edge. content-box keeps the padding box exactly this declared size
|
|
85
|
-
regardless of any border width, so an added border grows the track's outer footprint
|
|
86
|
-
instead -- the same "sits outside, doesn't touch the fill" effect the docs already point
|
|
87
|
-
consumers wanting a rim toward via outline. */
|
|
88
60
|
box-sizing: content-box;
|
|
89
61
|
inline-size: var(
|
|
90
62
|
--width,
|
|
@@ -143,10 +115,6 @@ import{css}from"lit";const styles=css`
|
|
|
143
115
|
);
|
|
144
116
|
border-radius: 50%;
|
|
145
117
|
background: var(--lr-switch-thumb-fill, var(--lr-color-surface));
|
|
146
|
-
/* Animates the logical 'inset-inline-start' rather than a physical
|
|
147
|
-
'transform: translateX()' so the slide direction mirrors correctly
|
|
148
|
-
under dir="rtl" — consistent with this library's CSS-logical-
|
|
149
|
-
properties approach to RTL (see internal/lyra-element.ts). */
|
|
150
118
|
transition: inset-inline-start var(--lr-transition-fast);
|
|
151
119
|
}
|
|
152
120
|
[part~="track"][part~="checked"] [part="thumb"] {
|
|
@@ -177,10 +145,6 @@ import{css}from"lit";const styles=css`
|
|
|
177
145
|
);
|
|
178
146
|
}
|
|
179
147
|
|
|
180
|
-
/* No explicit "display" here (unlike e.g. lr-combobox's
|
|
181
|
-
[part='form-control-label']), so the UA stylesheet's default
|
|
182
|
-
"[hidden] { display: none }" rule needs no author-side override to
|
|
183
|
-
take effect when hasLabelSlot is false. */
|
|
184
148
|
[part="label"] {
|
|
185
149
|
font-size: var(--lr-font-size-md-sm);
|
|
186
150
|
color: var(--lr-color-text);
|
|
@@ -191,7 +155,6 @@ import{css}from"lit";const styles=css`
|
|
|
191
155
|
font-size: var(--lr-font-size-sm);
|
|
192
156
|
color: var(--lr-color-text-quiet);
|
|
193
157
|
}
|
|
194
|
-
/* :empty never matches here -- same fix as [part='hint']/[part='error'] on lr-select. */
|
|
195
158
|
[part~="hint"][hidden] {
|
|
196
159
|
display: none;
|
|
197
160
|
}
|
|
@@ -2,21 +2,12 @@ import{css}from"lit";import{formControlRequiredMarker}from"../../../internal/for
|
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
--_lr-textarea-max-block-size: none;
|
|
5
|
-
/* Geometry from the shared form-control ladder (internal/sizes.styles.ts, pulled in ahead of
|
|
6
|
-
this sheet by textarea.class.ts), so this field's scale and lr-input's are the same scale
|
|
7
|
-
rather than two copies. The ladder's INLINE gutter is used on all four sides on purpose: its
|
|
8
|
-
block padding is 0 at the two tightest tiers because a control row's height floor supplies
|
|
9
|
-
the space there, and a textarea has no floor -- the first line would sit on the border. */
|
|
10
5
|
--_lr-textarea-padding: var(--lr-form-control-padding-inline);
|
|
11
6
|
--_lr-textarea-font-size: var(--lr-form-control-font-size);
|
|
12
7
|
--_lr-textarea-radius: var(--lr-form-control-radius);
|
|
13
|
-
/* Fill/border pair swapped per appearance below; the mapped default is outlined. */
|
|
14
8
|
--_lr-textarea-fill: transparent;
|
|
15
9
|
--_lr-textarea-border-color: var(--lr-color-border);
|
|
16
10
|
}
|
|
17
|
-
/* Changes the private radius default rather than declaring border-radius on [part='textarea'],
|
|
18
|
-
so that one consumption point below stays the only place a corner radius is read -- and an
|
|
19
|
-
inherited or direct --lr-textarea-radius override remains authoritative. */
|
|
20
11
|
:host([pill]) {
|
|
21
12
|
--_lr-textarea-radius: var(--lr-radius-pill);
|
|
22
13
|
}
|
|
@@ -40,8 +31,6 @@ import{css}from"lit";import{formControlRequiredMarker}from"../../../internal/for
|
|
|
40
31
|
--_lr-textarea-fill: transparent;
|
|
41
32
|
--_lr-textarea-border-color: transparent;
|
|
42
33
|
}
|
|
43
|
-
/* Quiet brand tint as the fill, loud brand only on the border -- same reasoning as lr-input's
|
|
44
|
-
accent tier: the user's own text has to stay legible on it. */
|
|
45
34
|
:host([appearance="accent"]) {
|
|
46
35
|
--_lr-textarea-fill: var(--lr-color-brand-quiet);
|
|
47
36
|
--_lr-textarea-border-color: var(--lr-color-brand);
|
|
@@ -52,16 +41,10 @@ import{css}from"lit";import{formControlRequiredMarker}from"../../../internal/for
|
|
|
52
41
|
font-size: var(--lr-font-size-md-sm);
|
|
53
42
|
font-weight: var(--lr-font-weight-semibold);
|
|
54
43
|
}
|
|
55
|
-
/* :empty never matches here -- the part always contains a literal slot child element regardless
|
|
56
|
-
of assigned/text content -- so real emptiness is tracked in JS (hasLabelSlot) and reflected
|
|
57
|
-
via the hidden attribute instead (same fix as lr-select's identical part). */
|
|
58
44
|
[part="form-control-label"][hidden] {
|
|
59
45
|
display: none;
|
|
60
46
|
}
|
|
61
47
|
${formControlRequiredMarker}
|
|
62
|
-
/* A plain block box around the native control: the native resize grip writes its own inline
|
|
63
|
-
width/height onto the <textarea> itself, so the wrapper deliberately imposes no size of its
|
|
64
|
-
own and lets the field drive it. */
|
|
65
48
|
[part~='textarea-wrapper'] {
|
|
66
49
|
display: block;
|
|
67
50
|
min-inline-size: 0;
|
|
@@ -90,15 +73,6 @@ import{css}from"lit";import{formControlRequiredMarker}from"../../../internal/for
|
|
|
90
73
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
91
74
|
outline-offset: var(--lr-focus-ring-offset);
|
|
92
75
|
}
|
|
93
|
-
/* Gives mouse users the same 'this is interactive' cue the :focus-visible ring above already
|
|
94
|
-
gives keyboard users -- mirrors lr-checkbox's/lr-radio's [part='base']:hover pattern, gated
|
|
95
|
-
via :host(:not(:disabled)) rather than a same-selector [part='textarea']:hover:not(:disabled)
|
|
96
|
-
(which would exceed a consumer's ::part(textarea):hover specificity -- see
|
|
97
|
-
lr-attachment-trigger's :where() fix for that class of bug). */
|
|
98
|
-
/* no-pressed-state: pressing inside a text surface places a caret, it does not actuate anything.
|
|
99
|
-
The mousedown that would match :active is the same gesture that focuses the field, so a pressed
|
|
100
|
-
treatment would render for one frame between the hover border and the focus ring and read as a
|
|
101
|
-
flicker; focus is this control's real "you are acting on me" state. */
|
|
102
76
|
:host(:not(:disabled)) [part="textarea"]:hover {
|
|
103
77
|
border-color: var(--lr-textarea-hover-border-color, var(--lr-color-brand));
|
|
104
78
|
}
|
|
@@ -137,8 +111,6 @@ import{css}from"lit";import{formControlRequiredMarker}from"../../../internal/for
|
|
|
137
111
|
font-size: var(--lr-font-size-sm);
|
|
138
112
|
color: var(--lr-color-text-quiet);
|
|
139
113
|
}
|
|
140
|
-
/* Inspection mirror only -- the visible [part='count'] carries the same text for sighted users,
|
|
141
|
-
while the spoken copy is appended to the shared light-DOM polite sink. */
|
|
142
114
|
.count-announcement {
|
|
143
115
|
position: absolute;
|
|
144
116
|
inline-size: var(--lr-size-1px);
|
|
@@ -35,17 +35,8 @@ import{css}from"lit";const styles=css`
|
|
|
35
35
|
var(--lr-font-size-sm) *
|
|
36
36
|
var(--lr-time-range-size-scale, var(--_lr-time-range-size-scale))
|
|
37
37
|
);
|
|
38
|
-
/* No fixed block-size here (unlike before presets existed): [part="base"]
|
|
39
|
-
now carries its own 1.5rem below and the host's block box is just the
|
|
40
|
-
natural stack height of its children. With presets empty this still
|
|
41
|
-
computes to exactly 1.5rem (the one [part="base"] child), so the
|
|
42
|
-
brush-only case renders byte-for-byte the same as before. */
|
|
43
38
|
--_lr-time-range-size-scale: 1;
|
|
44
39
|
}
|
|
45
|
-
/* This control has no form-control row to floor: size scales a brush track, its handles and the
|
|
46
|
-
preset chips together, so the tier resolves to one multiplier rather than to the shared
|
|
47
|
-
--lr-form-control-height ladder. It still matches both spellings of every tier, the same way
|
|
48
|
-
internal/sizes.styles.ts does, so size="small" is honoured here too. */
|
|
49
40
|
:host([size="2xs"]) {
|
|
50
41
|
--_lr-time-range-size-scale: 0.5;
|
|
51
42
|
}
|
|
@@ -72,12 +63,6 @@ import{css}from"lit";const styles=css`
|
|
|
72
63
|
[part="preset-button"] {
|
|
73
64
|
display: inline-flex;
|
|
74
65
|
align-items: center;
|
|
75
|
-
/* Floors, not fixed sizes -- matches --lr-icon-button-size's contract elsewhere in the library:
|
|
76
|
-
at m/l/xl the scaled padding+font-size already clear 24px on their own (28px/33.6px/37.2px)
|
|
77
|
-
and these never engage, but at 2xs/xs/s the scale factor shrinks the button toward ~15-21px
|
|
78
|
-
tall, under the WCAG 2.5.8 24px minimum hit-area even though this is a real <button>, not a
|
|
79
|
-
decorative label. min-inline-size guards the same floor along the other axis: a short preset
|
|
80
|
-
label (e.g. "1h") measures under 24px wide at 2xs/xs once the padding shrinks with it. */
|
|
81
66
|
min-block-size: var(--lr-size-24px);
|
|
82
67
|
min-inline-size: var(--lr-size-24px);
|
|
83
68
|
padding: var(
|
|
@@ -99,20 +84,12 @@ import{css}from"lit";const styles=css`
|
|
|
99
84
|
cursor: pointer;
|
|
100
85
|
transition: var(--lr-transition-fast);
|
|
101
86
|
}
|
|
102
|
-
/* :where() zeroes the wrapped selectors' specificity contribution, leaving only :hover itself --
|
|
103
|
-
functionally identical selection to [part='preset-button']:hover:not(:disabled), but no longer
|
|
104
|
-
beating a consumer's own ::part(preset-button):hover override on specificity -- mirrors
|
|
105
|
-
lr-attachment-trigger's identical :where() fix for this exact selector shape. */
|
|
106
87
|
:where([part="preset-button"]):hover:where(:not(:disabled)) {
|
|
107
88
|
border-color: var(
|
|
108
89
|
--lr-time-range-preset-hover-border-color,
|
|
109
90
|
var(--lr-color-brand)
|
|
110
91
|
);
|
|
111
92
|
}
|
|
112
|
-
/* Pressed goes further than the hover's edge change: the button's own surface fill mixes toward
|
|
113
|
-
--lr-color-mix-partner (which follows the text colour), so it darkens on a light theme and
|
|
114
|
-
lightens on a dark one. Same :where() wrapping as the hover rule above, for the same
|
|
115
|
-
specificity reason, and gated on :not(:disabled) so a disabled preset stays inert. */
|
|
116
93
|
:where([part="preset-button"]):active:where(:not(:disabled)) {
|
|
117
94
|
border-color: var(
|
|
118
95
|
--lr-time-range-preset-pressed-border-color,
|
|
@@ -135,12 +112,6 @@ import{css}from"lit";const styles=css`
|
|
|
135
112
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
136
113
|
outline-offset: var(--lr-focus-ring-offset);
|
|
137
114
|
}
|
|
138
|
-
/* Inline var() fallbacks rather than :host-declared properties, so a consumer can set them on any
|
|
139
|
-
ancestor without a :host declaration shadowing that. ::part(preset-button)[data-active] is
|
|
140
|
-
invalid CSS (an attribute selector cannot follow ::part), so recoloring the active preset used
|
|
141
|
-
to require hijacking the shared --lr-color-brand/--lr-color-on-brand tokens, repainting
|
|
142
|
-
everything else that reads them. Unset, each falls back to the token the rule used before, so
|
|
143
|
-
the rendering is unchanged. */
|
|
144
115
|
[part="preset-button"][data-active] {
|
|
145
116
|
background: var(--lr-time-range-preset-active-bg, var(--lr-color-brand));
|
|
146
117
|
border-color: var(
|
|
@@ -149,11 +120,19 @@ import{css}from"lit";const styles=css`
|
|
|
149
120
|
);
|
|
150
121
|
color: var(--lr-time-range-preset-active-color, var(--lr-color-on-brand));
|
|
151
122
|
}
|
|
123
|
+
[part="preset-button"][data-active]:active:where(:not(:disabled)) {
|
|
124
|
+
background: color-mix(
|
|
125
|
+
in oklab,
|
|
126
|
+
var(--lr-time-range-preset-active-bg, var(--lr-color-brand)),
|
|
127
|
+
var(--lr-color-mix-partner) var(--lr-color-mix-active)
|
|
128
|
+
);
|
|
129
|
+
border-color: color-mix(
|
|
130
|
+
in oklab,
|
|
131
|
+
var(--lr-time-range-preset-active-border-color, var(--lr-color-brand)),
|
|
132
|
+
var(--lr-color-mix-partner) var(--lr-color-mix-active)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
152
135
|
[part="preset-button"]:disabled {
|
|
153
|
-
/* Dimming already comes from :host(:disabled)'s opacity below (applies
|
|
154
|
-
to the whole host, presets row included) — stacking a second opacity
|
|
155
|
-
here would compound multiplicatively and over-dim relative to the
|
|
156
|
-
handles, which only restate the cursor for the same reason. */
|
|
157
136
|
cursor: not-allowed;
|
|
158
137
|
}
|
|
159
138
|
[part="base"] {
|
|
@@ -196,7 +175,6 @@ import{css}from"lit";const styles=css`
|
|
|
196
175
|
background: var(--lr-time-range-handle-bg, var(--lr-color-brand));
|
|
197
176
|
border: var(--lr-border-width-medium) solid
|
|
198
177
|
var(--lr-time-range-handle-border-color, var(--lr-color-surface));
|
|
199
|
-
/* Resting chrome, not an overlay: a knob riding on its own track, matching lr-slider's thumb. */
|
|
200
178
|
box-shadow: var(--lr-shadow-s);
|
|
201
179
|
transform: translateX(-50%);
|
|
202
180
|
cursor: grab;
|
|
@@ -208,12 +186,6 @@ import{css}from"lit";const styles=css`
|
|
|
208
186
|
[part^="handle"][data-at-domain-end] {
|
|
209
187
|
transform: translateX(-100%);
|
|
210
188
|
}
|
|
211
|
-
/* [part^='handle'] is positioned with a logical inset-inline-start:<pct>%
|
|
212
|
-
(set inline in render()), which the browser anchors to the box's own
|
|
213
|
-
*start* edge -- the physical right edge under :dir(rtl). The fixed
|
|
214
|
-
translateX(-50%) above assumes an LTR left edge anchor, so it has to
|
|
215
|
-
flip sign under RTL or the visible dot ends up a full handle-width off
|
|
216
|
-
from its true track position. */
|
|
217
189
|
:host(:dir(rtl)) [part^="handle"] {
|
|
218
190
|
transform: translateX(50%);
|
|
219
191
|
}
|
|
@@ -223,23 +195,6 @@ import{css}from"lit";const styles=css`
|
|
|
223
195
|
:host(:dir(rtl)) [part^="handle"][data-at-domain-end] {
|
|
224
196
|
transform: translateX(100%);
|
|
225
197
|
}
|
|
226
|
-
/*
|
|
227
|
-
* The visible dot's base size is var(--lr-size-14px) by design, but only renders at that literal
|
|
228
|
-
* value at the default \`m\` tier (scale 1) -- at every other tier it scales proportionally with
|
|
229
|
-
* --lr-time-range-size-scale, from 7px at 2xs up to 19.6px at xl. Whatever the tier, the dot alone
|
|
230
|
-
* is well under the ~var(--lr-size-24px) minimum touch target size despite \`touch-action: none\`
|
|
231
|
-
* signalling this is meant to be touch-dragged. Widen the actual hit/drag area with a
|
|
232
|
-
* transparent ::before instead of growing the handle box itself -- and unlike the dot, the
|
|
233
|
-
* ::before is deliberately floored at 24px via max() below (see its own size declarations), so
|
|
234
|
-
* the drag hit-area never shrinks with the visible dot at the small tiers, only grows past 24px
|
|
235
|
-
* once the scaled 28px base overtakes the floor (m and up):
|
|
236
|
-
* onPointerMove (time-range.ts) never reads the handle's own
|
|
237
|
-
* getBoundingClientRect() — it only measures \`[part="base"]\`'s rect and
|
|
238
|
-
* e.clientX/e.clientY — and a pointerdown inside the ::before still
|
|
239
|
-
* reports \`e.target\` as the real handle element (pseudo-elements have no
|
|
240
|
-
* separate DOM node/event target), so this is purely additive and cannot
|
|
241
|
-
* change the drag math.
|
|
242
|
-
*/
|
|
243
198
|
[part^="handle"]::before {
|
|
244
199
|
content: "";
|
|
245
200
|
position: absolute;
|
|
@@ -258,10 +213,6 @@ import{css}from"lit";const styles=css`
|
|
|
258
213
|
inset-inline-start: 100%;
|
|
259
214
|
transform: translate(-100%, -50%);
|
|
260
215
|
}
|
|
261
|
-
/* Same logical-inset-vs-physical-transform mismatch as the handle itself:
|
|
262
|
-
this enlarged hit-area is centered on inset-inline-start: 50%, so its
|
|
263
|
-
horizontal translate must flip sign under RTL too or the actual drag
|
|
264
|
-
hit zone detaches from the visible handle. */
|
|
265
216
|
:host(:dir(rtl))
|
|
266
217
|
[part^="handle"]:not([data-at-domain-start]):not(
|
|
267
218
|
[data-at-domain-end]
|
|
@@ -278,10 +229,6 @@ import{css}from"lit";const styles=css`
|
|
|
278
229
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
279
230
|
outline-offset: var(--lr-focus-ring-offset);
|
|
280
231
|
}
|
|
281
|
-
/* Gives mouse users the same 'this is interactive' cue the :focus-visible ring above already
|
|
282
|
-
gives keyboard users, matching the sibling [part='preset-button']:hover treatment above --
|
|
283
|
-
gated via :host(:not(:disabled)) the same way lr-checkbox's/lr-radio's [part='base']:hover
|
|
284
|
-
rules are, since a disabled handle must not still brighten on hover. */
|
|
285
232
|
:host(:not(:disabled)) [part^="handle"]:hover {
|
|
286
233
|
background: var(
|
|
287
234
|
--lr-time-range-handle-hover-bg,
|
|
@@ -292,12 +239,6 @@ import{css}from"lit";const styles=css`
|
|
|
292
239
|
)
|
|
293
240
|
);
|
|
294
241
|
}
|
|
295
|
-
/* Pressed = the grab itself, which is the only feedback a drag has before the value starts
|
|
296
|
-
moving: the knob mixes a full step further toward the text colour and the cursor closes.
|
|
297
|
-
Both states mix the fill instead of running filter: brightness() over the handle -- the filter
|
|
298
|
-
applied to the whole subtree, so it also washed out the surface-coloured ring and the shadow
|
|
299
|
-
that separate the knob from its own track, and it did nothing at all on a theme whose brand
|
|
300
|
-
colour is pure white or pure black. */
|
|
301
242
|
:host(:not(:disabled)) [part^="handle"]:active {
|
|
302
243
|
background: var(
|
|
303
244
|
--lr-time-range-handle-pressed-bg,
|
|
@@ -309,24 +250,11 @@ import{css}from"lit";const styles=css`
|
|
|
309
250
|
);
|
|
310
251
|
cursor: grabbing;
|
|
311
252
|
}
|
|
312
|
-
/* :host(:disabled), not :host([disabled]) -- this is a form-associated custom element
|
|
313
|
-
(static formAssociated = true), so the UA computes its disabled state (and therefore
|
|
314
|
-
:disabled/:enabled matching) the same way it does for a native <input>: from its own
|
|
315
|
-
disabled content attribute *or* an ancestor <fieldset disabled>'s cascade. Keying this off
|
|
316
|
-
the attribute selector only ever matched the first case -- a time-range disabled purely via
|
|
317
|
-
an ancestor fieldset had effectiveDisabled correctly gating pointer/keyboard interaction and
|
|
318
|
-
tabindex/aria-disabled on the handles and preset buttons, but the host still rendered at full
|
|
319
|
-
opacity with a normal cursor. Mirrors lr-radio's/lr-checkbox's identical fix. */
|
|
320
253
|
:host(:disabled) {
|
|
321
254
|
opacity: var(--lr-opacity-disabled);
|
|
322
255
|
cursor: not-allowed;
|
|
323
256
|
}
|
|
324
257
|
:host(:disabled) [part^="handle"] {
|
|
325
|
-
/* [part^='handle'] above sets \`cursor: grab\` unconditionally, which
|
|
326
|
-
would otherwise keep winning over the inherited :host cursor (it
|
|
327
|
-
isn't conditioned on [disabled]) — restate not-allowed here so the
|
|
328
|
-
cursor actually changes over the handles themselves, not just the
|
|
329
|
-
track/base. */
|
|
330
258
|
cursor: not-allowed;
|
|
331
259
|
}
|
|
332
260
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -54,13 +54,20 @@ export interface LyraTokenInputEventMap {
|
|
|
54
54
|
* @event lr-change - Lyra commit alias; detail is `{ value }` with the current token list.
|
|
55
55
|
* @event focus - Native `FocusEvent` relayed from the draft input or inline token editor.
|
|
56
56
|
* @event blur - Native `FocusEvent` relayed from the draft input or inline token editor.
|
|
57
|
-
* @event lr-add - One or more tokens
|
|
57
|
+
* @event lr-add - One or more tokens are about to be added in a single commit. Detail is
|
|
58
58
|
* `{ value, values }`, where `value` is the final added token for compatibility and `values` is
|
|
59
|
-
* the complete ordered batch.
|
|
59
|
+
* the complete ordered batch. Cancelable -- call `preventDefault()` to veto the add (e.g. a
|
|
60
|
+
* server-side validation check) and the tokens stay out of `value`; the typed draft text is left
|
|
61
|
+
* in the input unchanged so the user can correct it, rather than being silently cleared.
|
|
60
62
|
* @event lr-remove - A token is about to be removed; detail is `{ value, index }`. Cancelable --
|
|
61
63
|
* call `preventDefault()` to veto the removal (e.g. pending an async confirmation or a
|
|
62
64
|
* protected-token check) and the token stays in `value` unchanged.
|
|
63
|
-
* @event lr-token-edit - An existing token
|
|
65
|
+
* @event lr-token-edit - An existing token is about to be edited in place; detail is
|
|
66
|
+
* `{ value, previousValue, index }`. Not emitted for a reverted, unchanged, emptied, or
|
|
67
|
+
* duplicate-colliding edit -- those close the editor with no event. Cancelable -- call
|
|
68
|
+
* `preventDefault()` to veto the edit and the token stays in `value` unchanged; the inline
|
|
69
|
+
* editor stays open with the user's edited text intact so they can correct it, rather than
|
|
70
|
+
* closing and discarding it.
|
|
64
71
|
* @event lr-invalid - The token list failed a validity check. Cancelable: calling
|
|
65
72
|
* `preventDefault()` also cancels the native `invalid` event behind it, suppressing the
|
|
66
73
|
* browser's own validation bubble so an app can present the failure its own way.
|
|
@@ -340,12 +347,19 @@ export declare class LyraTokenInput extends LyraElement<LyraTokenInputEventMap>
|
|
|
340
347
|
/** Close the editor discarding its contents, returning focus to the token it was opened from. */
|
|
341
348
|
private cancelEdit;
|
|
342
349
|
/**
|
|
343
|
-
* Close the editor, applying its contents when they are a usable change.
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
350
|
+
* Close the editor, applying its contents when they are a usable change. An emptied editor
|
|
351
|
+
* cancels rather than removing the token -- removal stays the explicit job of the remove button
|
|
352
|
+
* -- and an edit colliding with an existing token under `allowDuplicates = false` is discarded,
|
|
353
|
+
* mirroring how `addDraft()` skips a duplicate candidate instead of rejecting the whole entry.
|
|
354
|
+
* None of those "no usable change" cases fire `lr-token-edit`, so the editor closes for them
|
|
355
|
+
* unconditionally.
|
|
356
|
+
*
|
|
357
|
+
* A genuine change emits `lr-token-edit` as cancelable and checks `defaultPrevented` *before*
|
|
358
|
+
* closing the editor or mutating `value` -- the same emit-then-check-then-mutate shape
|
|
359
|
+
* `removeToken()` uses for `lr-remove`. A vetoed edit leaves the editor open with the user's
|
|
360
|
+
* edited (uncommitted) text intact, so they can correct it, rather than closing and discarding
|
|
361
|
+
* it. Only past that veto check does the editor close first, so the teardown blur it triggers
|
|
362
|
+
* re-enters this method as a no-op rather than committing (and emitting `change`) a second time.
|
|
349
363
|
*/
|
|
350
364
|
private commitEdit;
|
|
351
365
|
private moveRovingFocus;
|