@aceshooting/lyra-ui 1.1.0 → 2.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/README.md +12 -1
- package/custom-elements.json +21460 -8489
- package/dist/components/app-rail/app-rail.d.ts +171 -0
- package/dist/components/app-rail/app-rail.js +483 -0
- package/dist/components/app-rail/app-rail.styles.d.ts +1 -0
- package/dist/components/app-rail/app-rail.styles.js +125 -0
- package/dist/components/attachment-chip/attachment-chip.d.ts +114 -0
- package/dist/components/attachment-chip/attachment-chip.js +312 -0
- package/dist/components/attachment-chip/attachment-chip.styles.d.ts +1 -0
- package/dist/components/attachment-chip/attachment-chip.styles.js +184 -0
- package/dist/components/attachment-trigger/attachment-trigger.d.ts +83 -0
- package/dist/components/attachment-trigger/attachment-trigger.js +258 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.d.ts +1 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.js +68 -0
- package/dist/components/chart/box-plot.js +11 -1
- package/dist/components/chart/chart-loader.d.ts +44 -13
- package/dist/components/chart/chart-loader.js +65 -18
- package/dist/components/chart/chart.d.ts +12 -2
- package/dist/components/chart/chart.js +121 -14
- package/dist/components/chart/histogram-bin.d.ts +4 -1
- package/dist/components/chart/histogram-bin.js +24 -14
- package/dist/components/chart/lite-chart.d.ts +63 -0
- package/dist/components/chart/lite-chart.js +181 -23
- package/dist/components/chart/lite-chart.styles.js +9 -0
- package/dist/components/chat-composer/chat-composer.d.ts +92 -0
- package/dist/components/chat-composer/chat-composer.js +285 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +1 -0
- package/dist/components/chat-composer/chat-composer.styles.js +135 -0
- package/dist/components/chat-message/chat-message.d.ts +113 -0
- package/dist/components/chat-message/chat-message.js +291 -0
- package/dist/components/chat-message/chat-message.styles.d.ts +1 -0
- package/dist/components/chat-message/chat-message.styles.js +203 -0
- package/dist/components/checkbox/checkbox.d.ts +59 -0
- package/dist/components/checkbox/checkbox.js +230 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
- package/dist/components/checkbox/checkbox.styles.js +70 -0
- package/dist/components/chip/chip-group.d.ts +56 -0
- package/dist/components/chip/chip-group.js +124 -0
- package/dist/components/chip/chip-group.styles.d.ts +1 -0
- package/dist/components/chip/chip-group.styles.js +57 -0
- package/dist/components/chip/chip.d.ts +64 -0
- package/dist/components/chip/chip.js +115 -0
- package/dist/components/chip/chip.styles.d.ts +1 -0
- package/dist/components/chip/chip.styles.js +115 -0
- package/dist/components/citation-badge/citation-badge.d.ts +113 -0
- package/dist/components/citation-badge/citation-badge.js +300 -0
- package/dist/components/citation-badge/citation-badge.styles.d.ts +1 -0
- package/dist/components/citation-badge/citation-badge.styles.js +96 -0
- package/dist/components/code-block/code-block.d.ts +89 -0
- package/dist/components/code-block/code-block.js +317 -0
- package/dist/components/code-block/code-block.styles.d.ts +1 -0
- package/dist/components/code-block/code-block.styles.js +187 -0
- package/dist/components/code-block/code-loader.d.ts +44 -0
- package/dist/components/code-block/code-loader.js +79 -0
- package/dist/components/combobox/combobox.d.ts +19 -1
- package/dist/components/combobox/combobox.js +84 -14
- package/dist/components/combobox/option.d.ts +5 -1
- package/dist/components/combobox/option.js +35 -0
- package/dist/components/context-meter/context-meter.d.ts +53 -0
- package/dist/components/context-meter/context-meter.js +150 -0
- package/dist/components/context-meter/context-meter.styles.d.ts +1 -0
- package/dist/components/context-meter/context-meter.styles.js +120 -0
- package/dist/components/conversation-item/conversation-item.d.ts +128 -0
- package/dist/components/conversation-item/conversation-item.js +322 -0
- package/dist/components/conversation-item/conversation-item.styles.d.ts +1 -0
- package/dist/components/conversation-item/conversation-item.styles.js +155 -0
- package/dist/components/date-picker/date-input.d.ts +24 -0
- package/dist/components/date-picker/date-input.js +134 -22
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +85 -16
- package/dist/components/dialog/confirm.d.ts +40 -0
- package/dist/components/dialog/confirm.js +79 -0
- package/dist/components/dialog/dialog.d.ts +85 -0
- package/dist/components/dialog/dialog.js +272 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +52 -0
- package/dist/components/dock-panel/dock-panel.d.ts +134 -0
- package/dist/components/dock-panel/dock-panel.js +345 -0
- package/dist/components/dock-panel/dock-panel.styles.d.ts +1 -0
- package/dist/components/dock-panel/dock-panel.styles.js +145 -0
- package/dist/components/document-preview/document-preview.d.ts +135 -0
- package/dist/components/document-preview/document-preview.js +372 -0
- package/dist/components/document-preview/document-preview.styles.d.ts +1 -0
- package/dist/components/document-preview/document-preview.styles.js +191 -0
- package/dist/components/export-button/csv.js +1 -1
- package/dist/components/export-button/export-button.js +2 -0
- package/dist/components/flag/flag.d.ts +42 -5
- package/dist/components/flag/flag.js +70 -3
- package/dist/components/gauge/gauge.js +19 -10
- package/dist/components/generation-status/generation-status.d.ts +109 -0
- package/dist/components/generation-status/generation-status.js +273 -0
- package/dist/components/generation-status/generation-status.styles.d.ts +1 -0
- package/dist/components/generation-status/generation-status.styles.js +84 -0
- package/dist/components/heatmap/calendar-grid.d.ts +4 -1
- package/dist/components/heatmap/calendar-grid.js +25 -12
- package/dist/components/heatmap/heatmap-scale.d.ts +6 -0
- package/dist/components/heatmap/heatmap-scale.js +7 -1
- package/dist/components/heatmap/heatmap.d.ts +89 -3
- package/dist/components/heatmap/heatmap.js +158 -29
- package/dist/components/json-viewer/json-viewer.d.ts +53 -0
- package/dist/components/json-viewer/json-viewer.js +283 -0
- package/dist/components/json-viewer/json-viewer.styles.d.ts +1 -0
- package/dist/components/json-viewer/json-viewer.styles.js +176 -0
- package/dist/components/kbd/kbd.d.ts +77 -0
- package/dist/components/kbd/kbd.js +214 -0
- package/dist/components/kbd/kbd.styles.d.ts +1 -0
- package/dist/components/kbd/kbd.styles.js +52 -0
- package/dist/components/live-region/live-region.d.ts +81 -0
- package/dist/components/live-region/live-region.js +153 -0
- package/dist/components/live-region/live-region.styles.d.ts +1 -0
- package/dist/components/live-region/live-region.styles.js +10 -0
- package/dist/components/map/map.d.ts +8 -6
- package/dist/components/map/map.js +44 -8
- package/dist/components/markdown/markdown-loader.d.ts +34 -0
- package/dist/components/markdown/markdown-loader.js +43 -0
- package/dist/components/markdown/markdown.d.ts +81 -0
- package/dist/components/markdown/markdown.js +284 -0
- package/dist/components/markdown/markdown.styles.d.ts +1 -0
- package/dist/components/markdown/markdown.styles.js +82 -0
- package/dist/components/media-card/media-card.d.ts +122 -0
- package/dist/components/media-card/media-card.js +295 -0
- package/dist/components/media-card/media-card.styles.d.ts +1 -0
- package/dist/components/media-card/media-card.styles.js +132 -0
- package/dist/components/mention-popover/mention-popover.d.ts +200 -0
- package/dist/components/mention-popover/mention-popover.js +475 -0
- package/dist/components/mention-popover/mention-popover.styles.d.ts +1 -0
- package/dist/components/mention-popover/mention-popover.styles.js +101 -0
- package/dist/components/menu/menu-item.d.ts +62 -0
- package/dist/components/menu/menu-item.js +119 -0
- package/dist/components/menu/menu-item.styles.d.ts +1 -0
- package/dist/components/menu/menu-item.styles.js +67 -0
- package/dist/components/menu/menu.d.ts +143 -0
- package/dist/components/menu/menu.js +365 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +66 -0
- package/dist/components/model-select/model-select.d.ts +125 -0
- package/dist/components/model-select/model-select.js +490 -0
- package/dist/components/model-select/model-select.styles.d.ts +1 -0
- package/dist/components/model-select/model-select.styles.js +189 -0
- package/dist/components/model-settings-panel/model-settings-panel.d.ts +69 -0
- package/dist/components/model-settings-panel/model-settings-panel.js +145 -0
- package/dist/components/model-settings-panel/model-settings-panel.styles.d.ts +1 -0
- package/dist/components/model-settings-panel/model-settings-panel.styles.js +82 -0
- package/dist/components/playback/playback.d.ts +13 -1
- package/dist/components/playback/playback.js +47 -14
- package/dist/components/responsive-panel/responsive-panel.d.ts +150 -0
- package/dist/components/responsive-panel/responsive-panel.js +365 -0
- package/dist/components/responsive-panel/responsive-panel.styles.d.ts +1 -0
- package/dist/components/responsive-panel/responsive-panel.styles.js +103 -0
- package/dist/components/result-card/result-card.d.ts +44 -0
- package/dist/components/result-card/result-card.js +83 -0
- package/dist/components/result-card/result-card.styles.d.ts +1 -0
- package/dist/components/result-card/result-card.styles.js +50 -0
- package/dist/components/result-card/result-field.d.ts +36 -0
- package/dist/components/result-card/result-field.js +87 -0
- package/dist/components/result-card/result-field.styles.d.ts +1 -0
- package/dist/components/result-card/result-field.styles.js +32 -0
- package/dist/components/select/select.d.ts +45 -1
- package/dist/components/select/select.js +114 -17
- package/dist/components/select/select.styles.js +26 -2
- package/dist/components/slider/slider.d.ts +89 -0
- package/dist/components/slider/slider.js +352 -0
- package/dist/components/slider/slider.styles.d.ts +1 -0
- package/dist/components/slider/slider.styles.js +87 -0
- package/dist/components/source-card/source-card.d.ts +92 -0
- package/dist/components/source-card/source-card.js +148 -0
- package/dist/components/source-card/source-card.styles.d.ts +1 -0
- package/dist/components/source-card/source-card.styles.js +69 -0
- package/dist/components/source-list/source-list.d.ts +63 -0
- package/dist/components/source-list/source-list.js +122 -0
- package/dist/components/source-list/source-list.styles.d.ts +1 -0
- package/dist/components/source-list/source-list.styles.js +59 -0
- package/dist/components/sparkline/sparkline.js +27 -13
- package/dist/components/split/split.d.ts +93 -1
- package/dist/components/split/split.js +284 -15
- package/dist/components/split/split.styles.js +30 -0
- package/dist/components/stat/stat.d.ts +22 -1
- package/dist/components/stat/stat.js +49 -3
- package/dist/components/stat/stat.styles.js +20 -0
- package/dist/components/stream-status/stream-status.d.ts +110 -0
- package/dist/components/stream-status/stream-status.js +210 -0
- package/dist/components/stream-status/stream-status.styles.d.ts +1 -0
- package/dist/components/stream-status/stream-status.styles.js +103 -0
- package/dist/components/streaming-text/streaming-text.d.ts +98 -0
- package/dist/components/streaming-text/streaming-text.js +209 -0
- package/dist/components/streaming-text/streaming-text.styles.d.ts +1 -0
- package/dist/components/streaming-text/streaming-text.styles.js +62 -0
- package/dist/components/switch/switch.d.ts +58 -0
- package/dist/components/switch/switch.js +179 -0
- package/dist/components/switch/switch.styles.d.ts +1 -0
- package/dist/components/switch/switch.styles.js +75 -0
- package/dist/components/table/table.d.ts +73 -4
- package/dist/components/table/table.js +169 -20
- package/dist/components/table/table.styles.js +6 -1
- package/dist/components/tabs/tabs.d.ts +51 -0
- package/dist/components/tabs/tabs.js +190 -0
- package/dist/components/tabs/tabs.styles.d.ts +1 -0
- package/dist/components/tabs/tabs.styles.js +63 -0
- package/dist/components/thinking-panel/thinking-panel.d.ts +121 -0
- package/dist/components/thinking-panel/thinking-panel.js +235 -0
- package/dist/components/thinking-panel/thinking-panel.styles.d.ts +1 -0
- package/dist/components/thinking-panel/thinking-panel.styles.js +117 -0
- package/dist/components/toast/toast-item.d.ts +1 -0
- package/dist/components/toast/toast-item.js +31 -6
- package/dist/components/tool-approval-dialog/tool-approval-dialog.d.ts +130 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.js +403 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.d.ts +1 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.js +160 -0
- package/dist/components/tool-call-chip/tool-call-chip.d.ts +89 -0
- package/dist/components/tool-call-chip/tool-call-chip.js +288 -0
- package/dist/components/tool-call-chip/tool-call-chip.styles.d.ts +1 -0
- package/dist/components/tool-call-chip/tool-call-chip.styles.js +203 -0
- package/dist/components/tool-param-form/tool-param-form.d.ts +145 -0
- package/dist/components/tool-param-form/tool-param-form.js +366 -0
- package/dist/components/tool-param-form/tool-param-form.styles.d.ts +1 -0
- package/dist/components/tool-param-form/tool-param-form.styles.js +75 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.d.ts +102 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.js +393 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.styles.d.ts +1 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.styles.js +176 -0
- package/dist/components/tool-result-view/registry.d.ts +81 -0
- package/dist/components/tool-result-view/registry.js +84 -0
- package/dist/components/tool-result-view/tool-result-view.d.ts +55 -0
- package/dist/components/tool-result-view/tool-result-view.js +138 -0
- package/dist/components/tool-result-view/tool-result-view.styles.d.ts +1 -0
- package/dist/components/tool-result-view/tool-result-view.styles.js +13 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.d.ts +151 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.js +439 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.styles.d.ts +1 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.styles.js +182 -0
- package/dist/components/tree/tree-node.d.ts +11 -2
- package/dist/components/tree/tree-node.js +16 -6
- package/dist/components/tree/tree.d.ts +8 -2
- package/dist/components/tree/tree.js +18 -11
- package/dist/components/typing-indicator/typing-indicator.d.ts +60 -0
- package/dist/components/typing-indicator/typing-indicator.js +96 -0
- package/dist/components/typing-indicator/typing-indicator.styles.d.ts +1 -0
- package/dist/components/typing-indicator/typing-indicator.styles.js +132 -0
- package/dist/components/virtual-list/virtual-list.d.ts +173 -0
- package/dist/components/virtual-list/virtual-list.js +461 -0
- package/dist/components/virtual-list/virtual-list.styles.d.ts +1 -0
- package/dist/components/virtual-list/virtual-list.styles.js +44 -0
- package/dist/components/widget/widget.d.ts +10 -0
- package/dist/components/widget/widget.js +24 -1
- package/dist/components/widget/widget.styles.js +9 -2
- package/dist/components/word-cloud/word-cloud-layout.js +14 -1
- package/dist/components/word-cloud/word-cloud.d.ts +6 -0
- package/dist/components/word-cloud/word-cloud.js +25 -14
- package/dist/components/word-cloud/word-cloud.styles.js +4 -2
- package/dist/internal/announcer.d.ts +57 -0
- package/dist/internal/announcer.js +71 -0
- package/dist/internal/form-associated.d.ts +1 -0
- package/dist/internal/form-associated.js +55 -11
- package/dist/internal/group-by-recency.d.ts +50 -0
- package/dist/internal/group-by-recency.js +80 -0
- package/dist/internal/rtl.d.ts +23 -0
- package/dist/internal/rtl.js +28 -0
- package/dist/internal/scroll-lock.d.ts +10 -5
- package/dist/internal/scroll-lock.js +30 -14
- package/dist/internal/tokens.styles.js +6 -0
- package/dist/lyra.d.ts +130 -31
- package/dist/lyra.js +94 -26
- package/llms-full.txt +3921 -32
- package/llms.txt +16 -1
- package/package.json +23 -5
- package/dist/components/chart/bar-chart.stories.d.ts +0 -5
- package/dist/components/chart/bar-chart.stories.js +0 -20
- package/dist/components/chart/box-plot.stories.d.ts +0 -5
- package/dist/components/chart/box-plot.stories.js +0 -29
- package/dist/components/chart/bubble-chart.stories.d.ts +0 -5
- package/dist/components/chart/bubble-chart.stories.js +0 -26
- package/dist/components/chart/chart.stories.d.ts +0 -32
- package/dist/components/chart/chart.stories.js +0 -141
- package/dist/components/chart/doughnut-chart.stories.d.ts +0 -5
- package/dist/components/chart/doughnut-chart.stories.js +0 -26
- package/dist/components/chart/histogram.stories.d.ts +0 -5
- package/dist/components/chart/histogram.stories.js +0 -17
- package/dist/components/chart/line-chart.stories.d.ts +0 -22
- package/dist/components/chart/line-chart.stories.js +0 -99
- package/dist/components/chart/lite-chart.stories.d.ts +0 -12
- package/dist/components/chart/lite-chart.stories.js +0 -98
- package/dist/components/chart/pie-chart.stories.d.ts +0 -5
- package/dist/components/chart/pie-chart.stories.js +0 -26
- package/dist/components/chart/polar-area-chart.stories.d.ts +0 -5
- package/dist/components/chart/polar-area-chart.stories.js +0 -20
- package/dist/components/chart/radar-chart.stories.d.ts +0 -5
- package/dist/components/chart/radar-chart.stories.js +0 -20
- package/dist/components/chart/scatter-chart.stories.d.ts +0 -5
- package/dist/components/chart/scatter-chart.stories.js +0 -31
- package/dist/components/combobox/combobox.stories.d.ts +0 -24
- package/dist/components/combobox/combobox.stories.js +0 -102
- package/dist/components/date-picker/date-input.stories.d.ts +0 -10
- package/dist/components/date-picker/date-input.stories.js +0 -48
- package/dist/components/date-picker/date-picker.stories.d.ts +0 -10
- package/dist/components/date-picker/date-picker.stories.js +0 -25
- package/dist/components/empty/empty.stories.d.ts +0 -7
- package/dist/components/empty/empty.stories.js +0 -34
- package/dist/components/export-button/export-button.stories.d.ts +0 -7
- package/dist/components/export-button/export-button.stories.js +0 -37
- package/dist/components/file-input/file-input.stories.d.ts +0 -7
- package/dist/components/file-input/file-input.stories.js +0 -19
- package/dist/components/flag/flag.stories.d.ts +0 -5
- package/dist/components/flag/flag.stories.js +0 -17
- package/dist/components/gauge/gauge.stories.d.ts +0 -8
- package/dist/components/gauge/gauge.stories.js +0 -19
- package/dist/components/graph/graph.stories.d.ts +0 -8
- package/dist/components/graph/graph.stories.js +0 -68
- package/dist/components/heatmap/heatmap.stories.d.ts +0 -22
- package/dist/components/heatmap/heatmap.stories.js +0 -154
- package/dist/components/map/map.stories.d.ts +0 -15
- package/dist/components/map/map.stories.js +0 -135
- package/dist/components/playback/playback.stories.d.ts +0 -7
- package/dist/components/playback/playback.stories.js +0 -16
- package/dist/components/select/select.stories.d.ts +0 -19
- package/dist/components/select/select.stories.js +0 -75
- package/dist/components/skeleton/skeleton.stories.d.ts +0 -5
- package/dist/components/skeleton/skeleton.stories.js +0 -16
- package/dist/components/sparkline/sparkline.stories.d.ts +0 -11
- package/dist/components/sparkline/sparkline.stories.js +0 -39
- package/dist/components/split/split.stories.d.ts +0 -7
- package/dist/components/split/split.stories.js +0 -36
- package/dist/components/stat/stat.stories.d.ts +0 -8
- package/dist/components/stat/stat.stories.js +0 -64
- package/dist/components/table/table.stories.d.ts +0 -12
- package/dist/components/table/table.stories.js +0 -67
- package/dist/components/time-range/time-range.stories.d.ts +0 -8
- package/dist/components/time-range/time-range.stories.js +0 -26
- package/dist/components/toast/toast.stories.d.ts +0 -8
- package/dist/components/toast/toast.stories.js +0 -72
- package/dist/components/tree/tree.stories.d.ts +0 -9
- package/dist/components/tree/tree.stories.js +0 -52
- package/dist/components/widget/widget.stories.d.ts +0 -7
- package/dist/components/widget/widget.stories.js +0 -41
- package/dist/components/word-cloud/word-cloud.stories.d.ts +0 -10
- package/dist/components/word-cloud/word-cloud.stories.js +0 -55
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const nodes = [
|
|
3
|
-
{ id: 'a', label: 'A' },
|
|
4
|
-
{ id: 'b', label: 'B' },
|
|
5
|
-
{ id: 'c', label: 'C' },
|
|
6
|
-
{ id: 'd', label: 'D' },
|
|
7
|
-
];
|
|
8
|
-
const links = [
|
|
9
|
-
{ source: 'a', target: 'b' },
|
|
10
|
-
{ source: 'a', target: 'c' },
|
|
11
|
-
{ source: 'b', target: 'd' },
|
|
12
|
-
{ source: 'c', target: 'd' },
|
|
13
|
-
];
|
|
14
|
-
const meta = {
|
|
15
|
-
title: 'Graph',
|
|
16
|
-
component: 'lyra-graph',
|
|
17
|
-
tags: ['autodocs'],
|
|
18
|
-
};
|
|
19
|
-
export default meta;
|
|
20
|
-
export const Default = {
|
|
21
|
-
render: () => html `
|
|
22
|
-
<lyra-graph
|
|
23
|
-
width="480"
|
|
24
|
-
height="320"
|
|
25
|
-
style="height: 20rem"
|
|
26
|
-
.nodes=${nodes}
|
|
27
|
-
.links=${links}
|
|
28
|
-
></lyra-graph>
|
|
29
|
-
`,
|
|
30
|
-
};
|
|
31
|
-
export const TunedForces = {
|
|
32
|
-
render: () => html `
|
|
33
|
-
<lyra-graph
|
|
34
|
-
width="480"
|
|
35
|
-
height="320"
|
|
36
|
-
style="height: 20rem"
|
|
37
|
-
charge-strength="-900"
|
|
38
|
-
link-distance="200"
|
|
39
|
-
.nodes=${nodes}
|
|
40
|
-
.links=${links}
|
|
41
|
-
></lyra-graph>
|
|
42
|
-
`,
|
|
43
|
-
};
|
|
44
|
-
export const BoundedZoom = {
|
|
45
|
-
render: () => html `
|
|
46
|
-
<lyra-graph
|
|
47
|
-
width="480"
|
|
48
|
-
height="320"
|
|
49
|
-
style="height: 20rem"
|
|
50
|
-
min-zoom="1"
|
|
51
|
-
max-zoom="2"
|
|
52
|
-
.nodes=${nodes}
|
|
53
|
-
.links=${links}
|
|
54
|
-
></lyra-graph>
|
|
55
|
-
`,
|
|
56
|
-
};
|
|
57
|
-
export const SeededLayout = {
|
|
58
|
-
render: () => html `
|
|
59
|
-
<p>
|
|
60
|
-
Both graphs below share <code>seed="42"</code> — reload the page or diff a screenshot across builds and their
|
|
61
|
-
node positions are bit-identical, unlike the non-seeded <code>Default</code> story above.
|
|
62
|
-
</p>
|
|
63
|
-
<div style="display: flex; gap: 1rem; flex-wrap: wrap">
|
|
64
|
-
<lyra-graph width="320" height="240" style="height: 15rem" seed="42" .nodes=${nodes} .links=${links}></lyra-graph>
|
|
65
|
-
<lyra-graph width="320" height="240" style="height: 15rem" seed="42" .nodes=${nodes} .links=${links}></lyra-graph>
|
|
66
|
-
</div>
|
|
67
|
-
`,
|
|
68
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const SqrtScaleFitToWidth: Story;
|
|
7
|
-
export declare const CalendarMode: Story;
|
|
8
|
-
export declare const CustomTheme: Story;
|
|
9
|
-
/**
|
|
10
|
-
* Hover a cell for its tooltip, tab to the grid and use the arrow keys to
|
|
11
|
-
* move the focus ring (a visually-hidden live region announces each move),
|
|
12
|
-
* and click or press Enter/Space on a cell to see its `lyra-cell-click`
|
|
13
|
-
* detail logged below.
|
|
14
|
-
*/
|
|
15
|
-
export declare const HoverFocusClick: Story;
|
|
16
|
-
/**
|
|
17
|
-
* Cells flagged via `annotations` get a stroked ring; ones with a `label`
|
|
18
|
-
* also surface a swatch + text entry in the legend.
|
|
19
|
-
*/
|
|
20
|
-
export declare const Annotations: Story;
|
|
21
|
-
/** `annotations` in calendar mode match by ISO `date` instead of `row`/`col`. */
|
|
22
|
-
export declare const CalendarAnnotations: Story;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Heatmap',
|
|
4
|
-
component: 'lyra-heatmap',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Default = {
|
|
9
|
-
render: () => html `
|
|
10
|
-
<lyra-heatmap
|
|
11
|
-
cell-size="24"
|
|
12
|
-
value-label="events"
|
|
13
|
-
.rowLabels=${['Mon', 'Tue', 'Wed', 'Thu', 'Fri']}
|
|
14
|
-
.colLabels=${['0h', '6h', '12h', '18h']}
|
|
15
|
-
.values=${[
|
|
16
|
-
[1, 4, 9, 2],
|
|
17
|
-
[0, 2, 6, 3],
|
|
18
|
-
[5, 8, 3, 1],
|
|
19
|
-
[-1, 1, 4, 7],
|
|
20
|
-
[2, 3, 5, 6],
|
|
21
|
-
]}
|
|
22
|
-
></lyra-heatmap>
|
|
23
|
-
`,
|
|
24
|
-
};
|
|
25
|
-
export const SqrtScaleFitToWidth = {
|
|
26
|
-
render: () => html `
|
|
27
|
-
<lyra-heatmap
|
|
28
|
-
scale="sqrt"
|
|
29
|
-
fit-to-width
|
|
30
|
-
value-label="requests"
|
|
31
|
-
.rowLabels=${['Mon', 'Tue', 'Wed']}
|
|
32
|
-
.colLabels=${['0h', '6h', '12h', '18h']}
|
|
33
|
-
.values=${[
|
|
34
|
-
[1, 8, 400, 20],
|
|
35
|
-
[0, 2, 6, 3],
|
|
36
|
-
[-1, 1, 4, 7],
|
|
37
|
-
]}
|
|
38
|
-
></lyra-heatmap>
|
|
39
|
-
`,
|
|
40
|
-
};
|
|
41
|
-
export const CalendarMode = {
|
|
42
|
-
render: () => {
|
|
43
|
-
const days = [];
|
|
44
|
-
const start = Date.UTC(2026, 0, 1);
|
|
45
|
-
for (let i = 0; i < 120; i++) {
|
|
46
|
-
const date = new Date(start + i * 86_400_000).toISOString().slice(0, 10);
|
|
47
|
-
const value = Math.round(Math.abs(Math.sin(i / 6)) * 10);
|
|
48
|
-
days.push({ date, value });
|
|
49
|
-
}
|
|
50
|
-
return html `
|
|
51
|
-
<lyra-heatmap mode="calendar" value-label="commits" bucket-count="5" .days=${days}></lyra-heatmap>
|
|
52
|
-
`;
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
export const CustomTheme = {
|
|
56
|
-
render: () => html `
|
|
57
|
-
<lyra-heatmap
|
|
58
|
-
style="
|
|
59
|
-
--lyra-heatmap-scale-lo: #fde7e9;
|
|
60
|
-
--lyra-heatmap-scale-hi: #b3122f;
|
|
61
|
-
--lyra-heatmap-no-data-fill: rgba(0, 0, 0, 0.08);
|
|
62
|
-
--lyra-heatmap-label-font: 11px monospace;
|
|
63
|
-
"
|
|
64
|
-
cell-size="24"
|
|
65
|
-
value-label="events"
|
|
66
|
-
.rowLabels=${['Mon', 'Tue', 'Wed']}
|
|
67
|
-
.colLabels=${['0h', '6h', '12h']}
|
|
68
|
-
.values=${[
|
|
69
|
-
[1, 4, 9],
|
|
70
|
-
[0, 2, 6],
|
|
71
|
-
[-1, 1, 4],
|
|
72
|
-
]}
|
|
73
|
-
></lyra-heatmap>
|
|
74
|
-
`,
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Hover a cell for its tooltip, tab to the grid and use the arrow keys to
|
|
78
|
-
* move the focus ring (a visually-hidden live region announces each move),
|
|
79
|
-
* and click or press Enter/Space on a cell to see its `lyra-cell-click`
|
|
80
|
-
* detail logged below.
|
|
81
|
-
*/
|
|
82
|
-
export const HoverFocusClick = {
|
|
83
|
-
render: () => {
|
|
84
|
-
const onCellClick = (e) => {
|
|
85
|
-
const detail = e.detail;
|
|
86
|
-
const out = document.getElementById('cell-click-out');
|
|
87
|
-
if (out)
|
|
88
|
-
out.textContent = JSON.stringify(detail);
|
|
89
|
-
};
|
|
90
|
-
return html `
|
|
91
|
-
<lyra-heatmap
|
|
92
|
-
cell-size="28"
|
|
93
|
-
value-label="events"
|
|
94
|
-
.rowLabels=${['Mon', 'Tue', 'Wed', 'Thu', 'Fri']}
|
|
95
|
-
.colLabels=${['0h', '6h', '12h', '18h']}
|
|
96
|
-
.values=${[
|
|
97
|
-
[1, 4, 9, 2],
|
|
98
|
-
[0, 2, 6, 3],
|
|
99
|
-
[5, 8, 3, 1],
|
|
100
|
-
[-1, 1, 4, 7],
|
|
101
|
-
[2, 3, 5, 6],
|
|
102
|
-
]}
|
|
103
|
-
@lyra-cell-click=${onCellClick}
|
|
104
|
-
></lyra-heatmap>
|
|
105
|
-
<p>Last <code>lyra-cell-click</code> detail: <code id="cell-click-out">(none yet)</code></p>
|
|
106
|
-
`;
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Cells flagged via `annotations` get a stroked ring; ones with a `label`
|
|
111
|
-
* also surface a swatch + text entry in the legend.
|
|
112
|
-
*/
|
|
113
|
-
export const Annotations = {
|
|
114
|
-
render: () => html `
|
|
115
|
-
<lyra-heatmap
|
|
116
|
-
cell-size="24"
|
|
117
|
-
value-label="events"
|
|
118
|
-
.rowLabels=${['Mon', 'Tue', 'Wed', 'Thu', 'Fri']}
|
|
119
|
-
.colLabels=${['0h', '6h', '12h', '18h']}
|
|
120
|
-
.values=${[
|
|
121
|
-
[1, 4, 9, 2],
|
|
122
|
-
[0, 2, 6, 3],
|
|
123
|
-
[5, 8, 3, 1],
|
|
124
|
-
[-1, 1, 4, 7],
|
|
125
|
-
[2, 3, 5, 6],
|
|
126
|
-
]}
|
|
127
|
-
.annotations=${[
|
|
128
|
-
{ row: 0, col: 2, label: 'Peak load' },
|
|
129
|
-
{ row: 2, col: 1, label: 'Incident' },
|
|
130
|
-
]}
|
|
131
|
-
></lyra-heatmap>
|
|
132
|
-
`,
|
|
133
|
-
};
|
|
134
|
-
/** `annotations` in calendar mode match by ISO `date` instead of `row`/`col`. */
|
|
135
|
-
export const CalendarAnnotations = {
|
|
136
|
-
render: () => {
|
|
137
|
-
const days = [];
|
|
138
|
-
const start = Date.UTC(2026, 0, 1);
|
|
139
|
-
for (let i = 0; i < 120; i++) {
|
|
140
|
-
const date = new Date(start + i * 86_400_000).toISOString().slice(0, 10);
|
|
141
|
-
const value = Math.round(Math.abs(Math.sin(i / 6)) * 10);
|
|
142
|
-
days.push({ date, value });
|
|
143
|
-
}
|
|
144
|
-
return html `
|
|
145
|
-
<lyra-heatmap
|
|
146
|
-
mode="calendar"
|
|
147
|
-
value-label="commits"
|
|
148
|
-
bucket-count="5"
|
|
149
|
-
.days=${days}
|
|
150
|
-
.annotations=${[{ date: '2026-02-14', label: 'Release day' }]}
|
|
151
|
-
></lyra-heatmap>
|
|
152
|
-
`;
|
|
153
|
-
},
|
|
154
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
/**
|
|
7
|
-
* `choropleth` adds a GeoJSON fill layer, colored by interpolating `field`'s
|
|
8
|
-
* value across `stops` -- pair it with `legend` to label the color ramp.
|
|
9
|
-
*/
|
|
10
|
-
export declare const Choropleth: Story;
|
|
11
|
-
/**
|
|
12
|
-
* `markers` renders a pin per entry, each with an optional colored tint and
|
|
13
|
-
* an openable popup built from `label` (plain text) or `html` (raw markup).
|
|
14
|
-
*/
|
|
15
|
-
export declare const Markers: Story;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const legend = [
|
|
3
|
-
{ color: '#5b8def', label: 'Low' },
|
|
4
|
-
{ color: '#e5484d', label: 'High' },
|
|
5
|
-
];
|
|
6
|
-
const RASTER_STYLE = {
|
|
7
|
-
version: 8,
|
|
8
|
-
sources: {
|
|
9
|
-
demo: {
|
|
10
|
-
type: 'raster',
|
|
11
|
-
tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],
|
|
12
|
-
tileSize: 256,
|
|
13
|
-
attribution: '© OpenStreetMap contributors',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
layers: [{ id: 'demo', type: 'raster', source: 'demo' }],
|
|
17
|
-
};
|
|
18
|
-
const meta = {
|
|
19
|
-
title: 'Map',
|
|
20
|
-
component: 'lyra-map',
|
|
21
|
-
tags: ['autodocs'],
|
|
22
|
-
parameters: {
|
|
23
|
-
docs: {
|
|
24
|
-
description: {
|
|
25
|
-
component: 'Demoed with a raster OpenStreetMap tile style since a vector style needs an API key.',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
export default meta;
|
|
31
|
-
export const Default = {
|
|
32
|
-
render: () => html `
|
|
33
|
-
<lyra-map
|
|
34
|
-
style="height: 20rem"
|
|
35
|
-
center="[2.3522, 48.8566]"
|
|
36
|
-
zoom="4"
|
|
37
|
-
.legend=${legend}
|
|
38
|
-
.mapStyle=${RASTER_STYLE}
|
|
39
|
-
></lyra-map>
|
|
40
|
-
`,
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* `choropleth` adds a GeoJSON fill layer, colored by interpolating `field`'s
|
|
44
|
-
* value across `stops` -- pair it with `legend` to label the color ramp.
|
|
45
|
-
*/
|
|
46
|
-
export const Choropleth = {
|
|
47
|
-
render: () => {
|
|
48
|
-
const choropleth = {
|
|
49
|
-
sourceId: 'regions',
|
|
50
|
-
field: 'value',
|
|
51
|
-
stops: [
|
|
52
|
-
[0, '#5b8def'],
|
|
53
|
-
[50, '#f2c94c'],
|
|
54
|
-
[100, '#e5484d'],
|
|
55
|
-
],
|
|
56
|
-
geojson: {
|
|
57
|
-
type: 'FeatureCollection',
|
|
58
|
-
features: [
|
|
59
|
-
{
|
|
60
|
-
type: 'Feature',
|
|
61
|
-
properties: { value: 20 },
|
|
62
|
-
geometry: {
|
|
63
|
-
type: 'Polygon',
|
|
64
|
-
coordinates: [
|
|
65
|
-
[
|
|
66
|
-
[2.25, 48.9],
|
|
67
|
-
[2.35, 48.9],
|
|
68
|
-
[2.35, 48.85],
|
|
69
|
-
[2.25, 48.85],
|
|
70
|
-
[2.25, 48.9],
|
|
71
|
-
],
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: 'Feature',
|
|
77
|
-
properties: { value: 80 },
|
|
78
|
-
geometry: {
|
|
79
|
-
type: 'Polygon',
|
|
80
|
-
coordinates: [
|
|
81
|
-
[
|
|
82
|
-
[2.35, 48.9],
|
|
83
|
-
[2.45, 48.9],
|
|
84
|
-
[2.45, 48.85],
|
|
85
|
-
[2.35, 48.85],
|
|
86
|
-
[2.35, 48.9],
|
|
87
|
-
],
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
return html `
|
|
95
|
-
<lyra-map
|
|
96
|
-
style="height: 20rem"
|
|
97
|
-
center="[2.3522, 48.8566]"
|
|
98
|
-
zoom="10"
|
|
99
|
-
.legend=${[
|
|
100
|
-
{ color: '#5b8def', label: 'Low' },
|
|
101
|
-
{ color: '#f2c94c', label: 'Medium' },
|
|
102
|
-
{ color: '#e5484d', label: 'High' },
|
|
103
|
-
]}
|
|
104
|
-
.choropleth=${choropleth}
|
|
105
|
-
.mapStyle=${RASTER_STYLE}
|
|
106
|
-
></lyra-map>
|
|
107
|
-
`;
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* `markers` renders a pin per entry, each with an optional colored tint and
|
|
112
|
-
* an openable popup built from `label` (plain text) or `html` (raw markup).
|
|
113
|
-
*/
|
|
114
|
-
export const Markers = {
|
|
115
|
-
render: () => {
|
|
116
|
-
const markers = [
|
|
117
|
-
{ id: 'eiffel', lngLat: [2.2945, 48.8584], label: 'Eiffel Tower' },
|
|
118
|
-
{
|
|
119
|
-
id: 'louvre',
|
|
120
|
-
lngLat: [2.3364, 48.8606],
|
|
121
|
-
color: '#e5484d',
|
|
122
|
-
html: '<strong>Louvre</strong><br>Museum',
|
|
123
|
-
},
|
|
124
|
-
];
|
|
125
|
-
return html `
|
|
126
|
-
<lyra-map
|
|
127
|
-
style="height: 20rem"
|
|
128
|
-
center="[2.3522, 48.8566]"
|
|
129
|
-
zoom="12"
|
|
130
|
-
.markers=${markers}
|
|
131
|
-
.mapStyle=${RASTER_STYLE}
|
|
132
|
-
></lyra-map>
|
|
133
|
-
`;
|
|
134
|
-
},
|
|
135
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Playback',
|
|
4
|
-
component: 'lyra-playback',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Default = {
|
|
9
|
-
render: () => html `<lyra-playback length="10" interval-ms="500" loop></lyra-playback>`,
|
|
10
|
-
};
|
|
11
|
-
export const NoLoop = {
|
|
12
|
-
render: () => html `<lyra-playback length="10" interval-ms="500" .loop=${false}></lyra-playback>`,
|
|
13
|
-
};
|
|
14
|
-
export const SingleFrame = {
|
|
15
|
-
render: () => html `<lyra-playback length="1"></lyra-playback>`,
|
|
16
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
/** `<lyra-option selected>` seeds the initial value, mirroring `<option selected>`. */
|
|
7
|
-
export declare const PreSelectedValue: Story;
|
|
8
|
-
/**
|
|
9
|
-
* Rows come from `<lyra-option>` children plus `group` (section headers),
|
|
10
|
-
* `sub` (a secondary line), and `dot-color` (a leading status dot) — same
|
|
11
|
-
* rich-row support as `<lyra-combobox>`.
|
|
12
|
-
*/
|
|
13
|
-
export declare const RichRows: Story;
|
|
14
|
-
export declare const Disabled: Story;
|
|
15
|
-
/**
|
|
16
|
-
* `required` blocks form submission while empty; `error-text` renders a
|
|
17
|
-
* validation message alongside the shared `hint`.
|
|
18
|
-
*/
|
|
19
|
-
export declare const RequiredWithValidation: Story;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Select',
|
|
4
|
-
component: 'lyra-select',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Default = {
|
|
9
|
-
render: () => html `
|
|
10
|
-
<lyra-select label="Fruit" placeholder="Pick one…" style="max-width: 20rem">
|
|
11
|
-
<lyra-option value="a">Apple</lyra-option>
|
|
12
|
-
<lyra-option value="b">Banana</lyra-option>
|
|
13
|
-
<lyra-option value="c">Cherry</lyra-option>
|
|
14
|
-
<lyra-option value="d">Date</lyra-option>
|
|
15
|
-
</lyra-select>
|
|
16
|
-
`,
|
|
17
|
-
};
|
|
18
|
-
/** `<lyra-option selected>` seeds the initial value, mirroring `<option selected>`. */
|
|
19
|
-
export const PreSelectedValue = {
|
|
20
|
-
render: () => html `
|
|
21
|
-
<lyra-select label="Fruit" style="max-width: 20rem">
|
|
22
|
-
<lyra-option value="a">Apple</lyra-option>
|
|
23
|
-
<lyra-option value="b" selected>Banana</lyra-option>
|
|
24
|
-
<lyra-option value="c">Cherry</lyra-option>
|
|
25
|
-
<lyra-option value="d">Date</lyra-option>
|
|
26
|
-
</lyra-select>
|
|
27
|
-
`,
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Rows come from `<lyra-option>` children plus `group` (section headers),
|
|
31
|
-
* `sub` (a secondary line), and `dot-color` (a leading status dot) — same
|
|
32
|
-
* rich-row support as `<lyra-combobox>`.
|
|
33
|
-
*/
|
|
34
|
-
export const RichRows = {
|
|
35
|
-
render: () => html `
|
|
36
|
-
<lyra-select label="Inverter" placeholder="Pick one…" style="max-width: 22rem">
|
|
37
|
-
<lyra-option value="inv-1" group="Building A" sub="Running" dot-color="var(--lyra-color-success)">
|
|
38
|
-
Inverter 1
|
|
39
|
-
</lyra-option>
|
|
40
|
-
<lyra-option value="inv-2" group="Building A" sub="Idle" dot-color="var(--lyra-color-text-quiet)">
|
|
41
|
-
Inverter 2
|
|
42
|
-
</lyra-option>
|
|
43
|
-
<lyra-option value="inv-3" group="Building B" sub="Fault" dot-color="var(--lyra-color-danger)">
|
|
44
|
-
Inverter 3
|
|
45
|
-
</lyra-option>
|
|
46
|
-
</lyra-select>
|
|
47
|
-
`,
|
|
48
|
-
};
|
|
49
|
-
export const Disabled = {
|
|
50
|
-
render: () => html `
|
|
51
|
-
<lyra-select label="Disabled" disabled placeholder="Can't touch this" style="max-width: 20rem">
|
|
52
|
-
<lyra-option value="a">Apple</lyra-option>
|
|
53
|
-
<lyra-option value="b">Banana</lyra-option>
|
|
54
|
-
</lyra-select>
|
|
55
|
-
`,
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* `required` blocks form submission while empty; `error-text` renders a
|
|
59
|
-
* validation message alongside the shared `hint`.
|
|
60
|
-
*/
|
|
61
|
-
export const RequiredWithValidation = {
|
|
62
|
-
render: () => html `
|
|
63
|
-
<form style="display: flex; flex-direction: column; gap: 1.5rem; max-width: 22rem">
|
|
64
|
-
<lyra-select label="Required" required hint="Pick your favorite">
|
|
65
|
-
<lyra-option value="a">Apple</lyra-option>
|
|
66
|
-
<lyra-option value="b">Banana</lyra-option>
|
|
67
|
-
</lyra-select>
|
|
68
|
-
<lyra-select label="Invalid" required error-text="Selection required">
|
|
69
|
-
<lyra-option value="a">Apple</lyra-option>
|
|
70
|
-
<lyra-option value="b">Banana</lyra-option>
|
|
71
|
-
</lyra-select>
|
|
72
|
-
<button type="submit">Submit</button>
|
|
73
|
-
</form>
|
|
74
|
-
`,
|
|
75
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Skeleton',
|
|
4
|
-
component: 'lyra-skeleton',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Gallery = {
|
|
9
|
-
render: () => html `
|
|
10
|
-
<div style="display:flex; gap:1rem; align-items:center;">
|
|
11
|
-
<lyra-skeleton width="10rem" height="1rem"></lyra-skeleton>
|
|
12
|
-
<lyra-skeleton variant="circle" width="3rem" height="3rem"></lyra-skeleton>
|
|
13
|
-
<lyra-skeleton variant="rect" effect="sheen" width="6rem" height="3rem"></lyra-skeleton>
|
|
14
|
-
</div>
|
|
15
|
-
`,
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Line: Story;
|
|
6
|
-
export declare const Area: Story;
|
|
7
|
-
export declare const Bar: Story;
|
|
8
|
-
export declare const ExplicitRange: Story;
|
|
9
|
-
export declare const NoData: Story;
|
|
10
|
-
export declare const FlatData: Story;
|
|
11
|
-
export declare const SingleValue: Story;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const DATA = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5];
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Sparkline',
|
|
5
|
-
component: 'lyra-sparkline',
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
export const Line = {
|
|
10
|
-
render: () => html `<lyra-sparkline type="line" .values=${DATA}></lyra-sparkline>`,
|
|
11
|
-
};
|
|
12
|
-
export const Area = {
|
|
13
|
-
render: () => html `<lyra-sparkline type="area" .values=${DATA}></lyra-sparkline>`,
|
|
14
|
-
};
|
|
15
|
-
export const Bar = {
|
|
16
|
-
render: () => html `<lyra-sparkline type="bar" .values=${DATA}></lyra-sparkline>`,
|
|
17
|
-
};
|
|
18
|
-
export const ExplicitRange = {
|
|
19
|
-
render: () => html `
|
|
20
|
-
<lyra-sparkline type="bar" .values=${[20, 40, 30]} min="0" max="100"></lyra-sparkline>
|
|
21
|
-
<lyra-sparkline type="bar" .values=${[70, 90, 80]} min="0" max="100"></lyra-sparkline>
|
|
22
|
-
`,
|
|
23
|
-
};
|
|
24
|
-
export const NoData = {
|
|
25
|
-
render: () => html `<lyra-sparkline></lyra-sparkline>`,
|
|
26
|
-
};
|
|
27
|
-
export const FlatData = {
|
|
28
|
-
render: () => html `
|
|
29
|
-
<lyra-sparkline type="line" .values=${[5, 5, 5, 5]}></lyra-sparkline>
|
|
30
|
-
<lyra-sparkline type="area" .values=${[5, 5, 5, 5]}></lyra-sparkline>
|
|
31
|
-
<lyra-sparkline type="bar" .values=${[5, 5, 5, 5]}></lyra-sparkline>
|
|
32
|
-
`,
|
|
33
|
-
};
|
|
34
|
-
export const SingleValue = {
|
|
35
|
-
render: () => html `
|
|
36
|
-
<lyra-sparkline type="line" .values=${[5]}></lyra-sparkline>
|
|
37
|
-
<lyra-sparkline type="bar" .values=${[5]}></lyra-sparkline>
|
|
38
|
-
`,
|
|
39
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const Vertical: Story;
|
|
7
|
-
export declare const FixedPixelRangePanel: Story;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Split',
|
|
4
|
-
component: 'lyra-split',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
export const Default = {
|
|
9
|
-
render: () => html `
|
|
10
|
-
<lyra-split style="height: 8rem; border: 1px solid #ddd">
|
|
11
|
-
<div style="padding: 0.5rem">Panel A</div>
|
|
12
|
-
<div style="padding: 0.5rem">Panel B</div>
|
|
13
|
-
<div style="padding: 0.5rem">Panel C</div>
|
|
14
|
-
</lyra-split>
|
|
15
|
-
`,
|
|
16
|
-
};
|
|
17
|
-
export const Vertical = {
|
|
18
|
-
render: () => html `
|
|
19
|
-
<lyra-split orientation="vertical" style="height: 16rem; border: 1px solid #ddd">
|
|
20
|
-
<div style="padding: 0.5rem">Panel A</div>
|
|
21
|
-
<div style="padding: 0.5rem">Panel B</div>
|
|
22
|
-
<div style="padding: 0.5rem">Panel C</div>
|
|
23
|
-
</lyra-split>
|
|
24
|
-
`,
|
|
25
|
-
};
|
|
26
|
-
export const FixedPixelRangePanel = {
|
|
27
|
-
render: () => html `
|
|
28
|
-
<lyra-split
|
|
29
|
-
style="height: 8rem; border: 1px solid #ddd"
|
|
30
|
-
.panelConstraints=${[{ minPx: 160, maxPx: 320 }, null]}
|
|
31
|
-
>
|
|
32
|
-
<div style="padding: 0.5rem">Sidebar — pinned between 160px and 320px regardless of the split's own percent-based sizing or a container resize</div>
|
|
33
|
-
<div style="padding: 0.5rem">Main content — fills the rest, percent-based as usual</div>
|
|
34
|
-
</lyra-split>
|
|
35
|
-
`,
|
|
36
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
declare const meta: Meta;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj;
|
|
5
|
-
export declare const Gallery: Story;
|
|
6
|
-
export declare const SparkAndBreakdown: Story;
|
|
7
|
-
export declare const BreakdownRows: Story;
|
|
8
|
-
export declare const Emphasis: Story;
|