tuiuiu.js 0.1.1 → 0.1.4-next.64ff654
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 +67 -36
- package/dist/atoms/button.d.ts.map +1 -1
- package/dist/atoms/button.js +17 -9
- package/dist/atoms/button.js.map +1 -1
- package/dist/atoms/text-input.d.ts +2 -0
- package/dist/atoms/text-input.d.ts.map +1 -1
- package/dist/atoms/text-input.js +13 -7
- package/dist/atoms/text-input.js.map +1 -1
- package/dist/atoms/tooltip.d.ts.map +1 -1
- package/dist/atoms/tooltip.js +2 -1
- package/dist/atoms/tooltip.js.map +1 -1
- package/dist/cli/commands/help.d.ts +5 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +31 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +11 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +21 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/storybook.d.ts +5 -0
- package/dist/cli/commands/storybook.d.ts.map +1 -0
- package/dist/cli/commands/storybook.js +9 -0
- package/dist/cli/commands/storybook.js.map +1 -0
- package/dist/cli/index.d.ts +14 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/error-boundary.d.ts.map +1 -1
- package/dist/core/error-boundary.js +2 -1
- package/dist/core/error-boundary.js.map +1 -1
- package/dist/core/hotkeys.d.ts +62 -0
- package/dist/core/hotkeys.d.ts.map +1 -0
- package/dist/core/hotkeys.js +0 -0
- package/dist/core/hotkeys.js.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/screen.d.ts.map +1 -1
- package/dist/core/screen.js +2 -0
- package/dist/core/screen.js.map +1 -1
- package/dist/core/theme.d.ts +79 -0
- package/dist/core/theme.d.ts.map +1 -1
- package/dist/core/theme.js +358 -0
- package/dist/core/theme.js.map +1 -1
- package/dist/design-system/data-display/index.d.ts +9 -6
- package/dist/design-system/data-display/index.d.ts.map +1 -1
- package/dist/design-system/data-display/index.js +16 -7
- package/dist/design-system/data-display/index.js.map +1 -1
- package/dist/design-system/feedback/badge.d.ts +21 -4
- package/dist/design-system/feedback/badge.d.ts.map +1 -1
- package/dist/design-system/feedback/badge.js +15 -2
- package/dist/design-system/feedback/badge.js.map +1 -1
- package/dist/design-system/forms/index.d.ts +11 -8
- package/dist/design-system/forms/index.d.ts.map +1 -1
- package/dist/design-system/forms/index.js +19 -10
- package/dist/design-system/forms/index.js.map +1 -1
- package/dist/design-system/layout/index.d.ts +7 -4
- package/dist/design-system/layout/index.d.ts.map +1 -1
- package/dist/design-system/layout/index.js +18 -6
- package/dist/design-system/layout/index.js.map +1 -1
- package/dist/design-system/media/picture.d.ts.map +1 -1
- package/dist/design-system/media/picture.js +2 -1
- package/dist/design-system/media/picture.js.map +1 -1
- package/dist/design-system/overlays/index.d.ts +6 -3
- package/dist/design-system/overlays/index.d.ts.map +1 -1
- package/dist/design-system/overlays/index.js +9 -3
- package/dist/design-system/overlays/index.js.map +1 -1
- package/dist/design-system/visual/splash-screen.d.ts.map +1 -1
- package/dist/design-system/visual/splash-screen.js +38 -18
- package/dist/design-system/visual/splash-screen.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-hotkeys.d.ts +153 -0
- package/dist/hooks/use-hotkeys.d.ts.map +1 -0
- package/dist/hooks/use-hotkeys.js +379 -0
- package/dist/hooks/use-hotkeys.js.map +1 -0
- package/dist/hooks/use-input.d.ts +2 -10
- package/dist/hooks/use-input.d.ts.map +1 -1
- package/dist/hooks/use-input.js +2 -287
- package/dist/hooks/use-input.js.map +1 -1
- package/dist/hooks/use-mouse.d.ts +5 -0
- package/dist/hooks/use-mouse.d.ts.map +1 -1
- package/dist/hooks/use-mouse.js +29 -11
- package/dist/hooks/use-mouse.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/docs-data.d.ts +31 -0
- package/dist/mcp/docs-data.d.ts.map +1 -0
- package/dist/mcp/docs-data.js +637 -0
- package/dist/mcp/docs-data.js.map +1 -0
- package/dist/mcp/index.d.ts +14 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +31 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +597 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/types.d.ts +114 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +16 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/molecules/autocomplete.d.ts.map +1 -1
- package/dist/molecules/autocomplete.js +2 -1
- package/dist/molecules/autocomplete.js.map +1 -1
- package/dist/molecules/calendar.d.ts.map +1 -1
- package/dist/molecules/calendar.js +5 -3
- package/dist/molecules/calendar.js.map +1 -1
- package/dist/molecules/data-viz/annotations.d.ts +75 -0
- package/dist/molecules/data-viz/annotations.d.ts.map +1 -0
- package/dist/molecules/data-viz/annotations.js +40 -0
- package/dist/molecules/data-viz/annotations.js.map +1 -0
- package/dist/molecules/data-viz/gantt-chart.d.ts +66 -0
- package/dist/molecules/data-viz/gantt-chart.d.ts.map +1 -0
- package/dist/molecules/data-viz/gantt-chart.js +134 -0
- package/dist/molecules/data-viz/gantt-chart.js.map +1 -0
- package/dist/molecules/data-viz/gauge.d.ts +2 -2
- package/dist/molecules/data-viz/gauge.d.ts.map +1 -1
- package/dist/molecules/data-viz/gauge.js +24 -8
- package/dist/molecules/data-viz/gauge.js.map +1 -1
- package/dist/molecules/data-viz/heatmap.d.ts +8 -2
- package/dist/molecules/data-viz/heatmap.d.ts.map +1 -1
- package/dist/molecules/data-viz/heatmap.js +41 -9
- package/dist/molecules/data-viz/heatmap.js.map +1 -1
- package/dist/molecules/data-viz/hooks.d.ts +264 -0
- package/dist/molecules/data-viz/hooks.d.ts.map +1 -0
- package/dist/molecules/data-viz/hooks.js +373 -0
- package/dist/molecules/data-viz/hooks.js.map +1 -0
- package/dist/molecules/data-viz/index.d.ts +14 -0
- package/dist/molecules/data-viz/index.d.ts.map +1 -1
- package/dist/molecules/data-viz/index.js +14 -0
- package/dist/molecules/data-viz/index.js.map +1 -1
- package/dist/molecules/data-viz/legend.d.ts +82 -0
- package/dist/molecules/data-viz/legend.d.ts.map +1 -0
- package/dist/molecules/data-viz/legend.js +146 -0
- package/dist/molecules/data-viz/legend.js.map +1 -0
- package/dist/molecules/data-viz/line-chart.d.ts.map +1 -1
- package/dist/molecules/data-viz/line-chart.js +48 -12
- package/dist/molecules/data-viz/line-chart.js.map +1 -1
- package/dist/molecules/data-viz/radar-chart.d.ts +61 -0
- package/dist/molecules/data-viz/radar-chart.d.ts.map +1 -0
- package/dist/molecules/data-viz/radar-chart.js +86 -0
- package/dist/molecules/data-viz/radar-chart.js.map +1 -0
- package/dist/molecules/data-viz/scatter-plot.d.ts +97 -0
- package/dist/molecules/data-viz/scatter-plot.d.ts.map +1 -0
- package/dist/molecules/data-viz/scatter-plot.js +205 -0
- package/dist/molecules/data-viz/scatter-plot.js.map +1 -0
- package/dist/molecules/data-viz/time-heatmap.d.ts +48 -0
- package/dist/molecules/data-viz/time-heatmap.d.ts.map +1 -0
- package/dist/molecules/data-viz/time-heatmap.js +145 -0
- package/dist/molecules/data-viz/time-heatmap.js.map +1 -0
- package/dist/molecules/select.d.ts +2 -0
- package/dist/molecules/select.d.ts.map +1 -1
- package/dist/molecules/select.js +4 -3
- package/dist/molecules/select.js.map +1 -1
- package/dist/molecules/tabs.d.ts.map +1 -1
- package/dist/molecules/tabs.js +14 -2
- package/dist/molecules/tabs.js.map +1 -1
- package/dist/organisms/command-palette.d.ts.map +1 -1
- package/dist/organisms/command-palette.js +2 -1
- package/dist/organisms/command-palette.js.map +1 -1
- package/dist/storybook/app.d.ts.map +1 -1
- package/dist/storybook/app.js +53 -44
- package/dist/storybook/app.js.map +1 -1
- package/dist/storybook/components/compare-view.d.ts.map +1 -1
- package/dist/storybook/components/compare-view.js +19 -18
- package/dist/storybook/components/compare-view.js.map +1 -1
- package/dist/storybook/components/log-viewer.d.ts.map +1 -1
- package/dist/storybook/components/log-viewer.js +9 -8
- package/dist/storybook/components/log-viewer.js.map +1 -1
- package/dist/storybook/components/preview.d.ts.map +1 -1
- package/dist/storybook/components/preview.js +34 -33
- package/dist/storybook/components/preview.js.map +1 -1
- package/dist/storybook/components/sidebar.d.ts.map +1 -1
- package/dist/storybook/components/sidebar.js +21 -20
- package/dist/storybook/components/sidebar.js.map +1 -1
- package/dist/storybook/stories/apps/index.d.ts.map +1 -1
- package/dist/storybook/stories/apps/index.js +306 -209
- package/dist/storybook/stories/apps/index.js.map +1 -1
- package/dist/storybook/stories/atoms/index.d.ts.map +1 -1
- package/dist/storybook/stories/atoms/index.js.map +1 -1
- package/dist/storybook/stories/molecules/index.d.ts +25 -0
- package/dist/storybook/stories/molecules/index.d.ts.map +1 -1
- package/dist/storybook/stories/molecules/index.js +402 -20
- package/dist/storybook/stories/molecules/index.js.map +1 -1
- package/dist/storybook/stories/organisms/index.d.ts.map +1 -1
- package/dist/storybook/stories/organisms/index.js +1 -1
- package/dist/storybook/stories/organisms/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/system-data.d.ts +73 -0
- package/dist/utils/system-data.d.ts.map +1 -0
- package/dist/utils/system-data.js +367 -0
- package/dist/utils/system-data.js.map +1 -0
- package/dist/version.d.ts +43 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +82 -0
- package/dist/version.js.map +1 -0
- package/package.json +22 -22
- package/dist/components/canvas.d.ts +0 -322
- package/dist/components/canvas.d.ts.map +0 -1
- package/dist/components/canvas.js +0 -833
- package/dist/components/canvas.js.map +0 -1
- package/dist/components/code-block.d.ts +0 -75
- package/dist/components/code-block.d.ts.map +0 -1
- package/dist/components/code-block.js +0 -322
- package/dist/components/code-block.js.map +0 -1
- package/dist/components/components.d.ts +0 -122
- package/dist/components/components.d.ts.map +0 -1
- package/dist/components/components.js +0 -151
- package/dist/components/components.js.map +0 -1
- package/dist/components/data-viz/bar-chart.d.ts +0 -167
- package/dist/components/data-viz/bar-chart.d.ts.map +0 -1
- package/dist/components/data-viz/bar-chart.js +0 -375
- package/dist/components/data-viz/bar-chart.js.map +0 -1
- package/dist/components/data-viz/gauge.d.ts +0 -163
- package/dist/components/data-viz/gauge.d.ts.map +0 -1
- package/dist/components/data-viz/gauge.js +0 -451
- package/dist/components/data-viz/gauge.js.map +0 -1
- package/dist/components/data-viz/heatmap.d.ts +0 -154
- package/dist/components/data-viz/heatmap.d.ts.map +0 -1
- package/dist/components/data-viz/heatmap.js +0 -458
- package/dist/components/data-viz/heatmap.js.map +0 -1
- package/dist/components/data-viz/index.d.ts +0 -16
- package/dist/components/data-viz/index.d.ts.map +0 -1
- package/dist/components/data-viz/index.js +0 -16
- package/dist/components/data-viz/index.js.map +0 -1
- package/dist/components/data-viz/line-chart.d.ts +0 -157
- package/dist/components/data-viz/line-chart.d.ts.map +0 -1
- package/dist/components/data-viz/line-chart.js +0 -578
- package/dist/components/data-viz/line-chart.js.map +0 -1
- package/dist/components/data-viz/sparkline.d.ts +0 -156
- package/dist/components/data-viz/sparkline.d.ts.map +0 -1
- package/dist/components/data-viz/sparkline.js +0 -325
- package/dist/components/data-viz/sparkline.js.map +0 -1
- package/dist/components/grid.d.ts +0 -234
- package/dist/components/grid.d.ts.map +0 -1
- package/dist/components/grid.js +0 -719
- package/dist/components/grid.js.map +0 -1
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -69
- package/dist/components/index.js.map +0 -1
- package/dist/components/markdown.d.ts +0 -52
- package/dist/components/markdown.d.ts.map +0 -1
- package/dist/components/markdown.js +0 -341
- package/dist/components/markdown.js.map +0 -1
- package/dist/components/modal.d.ts +0 -237
- package/dist/components/modal.d.ts.map +0 -1
- package/dist/components/modal.js +0 -396
- package/dist/components/modal.js.map +0 -1
- package/dist/components/progress-bar.d.ts +0 -89
- package/dist/components/progress-bar.d.ts.map +0 -1
- package/dist/components/progress-bar.js +0 -288
- package/dist/components/progress-bar.js.map +0 -1
- package/dist/components/select.d.ts +0 -114
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js +0 -415
- package/dist/components/select.js.map +0 -1
- package/dist/components/spinner.d.ts +0 -71
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -300
- package/dist/components/spinner.js.map +0 -1
- package/dist/components/split-panel.d.ts +0 -175
- package/dist/components/split-panel.d.ts.map +0 -1
- package/dist/components/split-panel.js +0 -322
- package/dist/components/split-panel.js.map +0 -1
- package/dist/components/table.d.ts +0 -103
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js +0 -359
- package/dist/components/table.js.map +0 -1
- package/dist/components/text-input.d.ts +0 -79
- package/dist/components/text-input.d.ts.map +0 -1
- package/dist/components/text-input.js +0 -332
- package/dist/components/text-input.js.map +0 -1
- package/dist/design-system/data-display/calendar.d.ts +0 -141
- package/dist/design-system/data-display/calendar.d.ts.map +0 -1
- package/dist/design-system/data-display/calendar.js +0 -524
- package/dist/design-system/data-display/calendar.js.map +0 -1
- package/dist/design-system/data-display/code-block.d.ts +0 -75
- package/dist/design-system/data-display/code-block.d.ts.map +0 -1
- package/dist/design-system/data-display/code-block.js +0 -311
- package/dist/design-system/data-display/code-block.js.map +0 -1
- package/dist/design-system/data-display/data-table.d.ts +0 -173
- package/dist/design-system/data-display/data-table.d.ts.map +0 -1
- package/dist/design-system/data-display/data-table.js +0 -428
- package/dist/design-system/data-display/data-table.js.map +0 -1
- package/dist/design-system/data-display/markdown.d.ts +0 -52
- package/dist/design-system/data-display/markdown.d.ts.map +0 -1
- package/dist/design-system/data-display/markdown.js +0 -341
- package/dist/design-system/data-display/markdown.js.map +0 -1
- package/dist/design-system/data-display/table.d.ts +0 -103
- package/dist/design-system/data-display/table.d.ts.map +0 -1
- package/dist/design-system/data-display/table.js +0 -342
- package/dist/design-system/data-display/table.js.map +0 -1
- package/dist/design-system/data-display/tree.d.ts +0 -166
- package/dist/design-system/data-display/tree.d.ts.map +0 -1
- package/dist/design-system/data-display/tree.js +0 -428
- package/dist/design-system/data-display/tree.js.map +0 -1
- package/dist/design-system/forms/autocomplete.d.ts +0 -163
- package/dist/design-system/forms/autocomplete.d.ts.map +0 -1
- package/dist/design-system/forms/autocomplete.js +0 -455
- package/dist/design-system/forms/autocomplete.js.map +0 -1
- package/dist/design-system/forms/button.d.ts +0 -106
- package/dist/design-system/forms/button.d.ts.map +0 -1
- package/dist/design-system/forms/button.js +0 -170
- package/dist/design-system/forms/button.js.map +0 -1
- package/dist/design-system/forms/multi-select.d.ts +0 -102
- package/dist/design-system/forms/multi-select.d.ts.map +0 -1
- package/dist/design-system/forms/multi-select.js +0 -309
- package/dist/design-system/forms/multi-select.js.map +0 -1
- package/dist/design-system/forms/radio-group.d.ts +0 -88
- package/dist/design-system/forms/radio-group.d.ts.map +0 -1
- package/dist/design-system/forms/radio-group.js +0 -145
- package/dist/design-system/forms/radio-group.js.map +0 -1
- package/dist/design-system/forms/select.d.ts +0 -116
- package/dist/design-system/forms/select.d.ts.map +0 -1
- package/dist/design-system/forms/select.js +0 -441
- package/dist/design-system/forms/select.js.map +0 -1
- package/dist/design-system/forms/slider.d.ts +0 -134
- package/dist/design-system/forms/slider.d.ts.map +0 -1
- package/dist/design-system/forms/slider.js +0 -314
- package/dist/design-system/forms/slider.js.map +0 -1
- package/dist/design-system/forms/switch.d.ts +0 -99
- package/dist/design-system/forms/switch.d.ts.map +0 -1
- package/dist/design-system/forms/switch.js +0 -173
- package/dist/design-system/forms/switch.js.map +0 -1
- package/dist/design-system/forms/text-input.d.ts +0 -79
- package/dist/design-system/forms/text-input.d.ts.map +0 -1
- package/dist/design-system/forms/text-input.js +0 -344
- package/dist/design-system/forms/text-input.js.map +0 -1
- package/dist/design-system/layout/collapsible.d.ts +0 -166
- package/dist/design-system/layout/collapsible.d.ts.map +0 -1
- package/dist/design-system/layout/collapsible.js +0 -286
- package/dist/design-system/layout/collapsible.js.map +0 -1
- package/dist/design-system/layout/scroll-area.d.ts +0 -188
- package/dist/design-system/layout/scroll-area.d.ts.map +0 -1
- package/dist/design-system/layout/scroll-area.js +0 -348
- package/dist/design-system/layout/scroll-area.js.map +0 -1
- package/dist/design-system/layout/split-panel.d.ts +0 -183
- package/dist/design-system/layout/split-panel.d.ts.map +0 -1
- package/dist/design-system/layout/split-panel.js +0 -323
- package/dist/design-system/layout/split-panel.js.map +0 -1
- package/dist/design-system/layout/tabs.d.ts +0 -129
- package/dist/design-system/layout/tabs.d.ts.map +0 -1
- package/dist/design-system/layout/tabs.js +0 -373
- package/dist/design-system/layout/tabs.js.map +0 -1
- package/dist/design-system/overlays/command-palette.d.ts +0 -217
- package/dist/design-system/overlays/command-palette.d.ts.map +0 -1
- package/dist/design-system/overlays/command-palette.js +0 -443
- package/dist/design-system/overlays/command-palette.js.map +0 -1
- package/dist/design-system/overlays/modal.d.ts +0 -251
- package/dist/design-system/overlays/modal.d.ts.map +0 -1
- package/dist/design-system/overlays/modal.js +0 -461
- package/dist/design-system/overlays/modal.js.map +0 -1
- package/dist/design-system/overlays/overlay-stack.d.ts +0 -200
- package/dist/design-system/overlays/overlay-stack.d.ts.map +0 -1
- package/dist/design-system/overlays/overlay-stack.js +0 -341
- package/dist/design-system/overlays/overlay-stack.js.map +0 -1
- package/dist/design-system/primitives/box.d.ts +0 -16
- package/dist/design-system/primitives/box.d.ts.map +0 -1
- package/dist/design-system/primitives/box.js +0 -23
- package/dist/design-system/primitives/box.js.map +0 -1
- package/dist/design-system/primitives/divider.d.ts +0 -52
- package/dist/design-system/primitives/divider.d.ts.map +0 -1
- package/dist/design-system/primitives/divider.js +0 -72
- package/dist/design-system/primitives/divider.js.map +0 -1
- package/dist/design-system/primitives/helpers.d.ts +0 -10
- package/dist/design-system/primitives/helpers.d.ts.map +0 -1
- package/dist/design-system/primitives/helpers.js +0 -27
- package/dist/design-system/primitives/helpers.js.map +0 -1
- package/dist/design-system/primitives/index.d.ts +0 -11
- package/dist/design-system/primitives/index.d.ts.map +0 -1
- package/dist/design-system/primitives/index.js +0 -14
- package/dist/design-system/primitives/index.js.map +0 -1
- package/dist/design-system/primitives/slot.d.ts +0 -35
- package/dist/design-system/primitives/slot.d.ts.map +0 -1
- package/dist/design-system/primitives/slot.js +0 -17
- package/dist/design-system/primitives/slot.js.map +0 -1
- package/dist/design-system/primitives/spacer.d.ts +0 -34
- package/dist/design-system/primitives/spacer.d.ts.map +0 -1
- package/dist/design-system/primitives/spacer.js +0 -53
- package/dist/design-system/primitives/spacer.js.map +0 -1
- package/dist/design-system/primitives/text.d.ts +0 -12
- package/dist/design-system/primitives/text.d.ts.map +0 -1
- package/dist/design-system/primitives/text.js +0 -25
- package/dist/design-system/primitives/text.js.map +0 -1
- package/dist/design-system/primitives/utilities.d.ts +0 -70
- package/dist/design-system/primitives/utilities.d.ts.map +0 -1
- package/dist/design-system/primitives/utilities.js +0 -56
- package/dist/design-system/primitives/utilities.js.map +0 -1
- package/dist/storybook/cli.d.ts +0 -10
- package/dist/storybook/cli.d.ts.map +0 -1
- package/dist/storybook/cli.js +0 -14
- package/dist/storybook/cli.js.map +0 -1
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
* - Toast: Notification popups
|
|
10
10
|
* - Tabs: Tab navigation
|
|
11
11
|
* - Sparkline & Gauge: Simple data visualizations
|
|
12
|
+
* - Advanced Charts: LineChart, ScatterPlot, RadarChart, GanttChart, TimeHeatmap, Legend
|
|
12
13
|
*/
|
|
13
|
-
import { Box, Text, When, Each, Fragment, Spacer } from '../../../primitives/nodes.js';
|
|
14
|
+
import { Box, Text, When, Each, Fragment, Spacer, Newline } from '../../../primitives/nodes.js';
|
|
14
15
|
import { Divider } from '../../../primitives/divider.js';
|
|
15
16
|
import { TextInput, Checkbox, Select, RadioGroup } from '../../../design-system/forms/index.js';
|
|
17
|
+
import { LineChart, ScatterPlot, RadarChart, GanttChart, TimeHeatmap, Legend, } from '../../../molecules/data-viz/index.js';
|
|
16
18
|
import { story, defaultControls } from '../../core/registry.js';
|
|
19
|
+
import { getContrastColor } from '../../../core/theme.js';
|
|
17
20
|
// Chart helpers
|
|
18
21
|
const sparklineChars = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
|
19
22
|
function textSparkline(data) {
|
|
@@ -325,13 +328,17 @@ export const alertStories = [
|
|
|
325
328
|
story('Alert - Success')
|
|
326
329
|
.category('Molecules')
|
|
327
330
|
.description('Success alert')
|
|
328
|
-
.render(() =>
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
.render(() => {
|
|
332
|
+
const bg = 'green';
|
|
333
|
+
const fg = getContrastColor(bg);
|
|
334
|
+
return Box({
|
|
335
|
+
borderStyle: 'round',
|
|
336
|
+
borderColor: bg,
|
|
337
|
+
backgroundColor: bg,
|
|
338
|
+
padding: 1,
|
|
339
|
+
width: 50,
|
|
340
|
+
}, Text({ color: fg, backgroundColor: bg, bold: true }, '✓ Operation completed successfully!'));
|
|
341
|
+
}),
|
|
335
342
|
story('Alert - Warning')
|
|
336
343
|
.category('Molecules')
|
|
337
344
|
.description('Warning alert')
|
|
@@ -405,18 +412,30 @@ export const tabsStories = [
|
|
|
405
412
|
})
|
|
406
413
|
.render((props) => {
|
|
407
414
|
const tabs = ['Overview', 'Details', 'Settings'];
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
+
const activeBg = 'blue';
|
|
416
|
+
const activeFg = getContrastColor(activeBg);
|
|
417
|
+
return Box({ width: 50, flexDirection: 'column' }, Box({ flexDirection: 'row', borderStyle: 'single', borderColor: 'gray' }, ...tabs.map((tab, idx) => {
|
|
418
|
+
const isActive = idx === props.activeTab;
|
|
419
|
+
const bg = isActive ? activeBg : undefined;
|
|
420
|
+
const fg = isActive ? activeFg : 'gray';
|
|
421
|
+
return Box({
|
|
422
|
+
paddingX: 2,
|
|
423
|
+
backgroundColor: bg,
|
|
424
|
+
}, Text({
|
|
425
|
+
color: fg,
|
|
426
|
+
backgroundColor: bg,
|
|
427
|
+
bold: isActive,
|
|
428
|
+
}, tab));
|
|
429
|
+
})), Box({ borderStyle: 'single', borderColor: 'blue', padding: 1, height: 5 }, Text({}, `${tabs[props.activeTab]} content here...`)));
|
|
415
430
|
}),
|
|
416
431
|
story('Tabs - With Icons')
|
|
417
432
|
.category('Molecules')
|
|
418
433
|
.description('Tabs with icons')
|
|
419
|
-
.render(() =>
|
|
434
|
+
.render(() => {
|
|
435
|
+
const activeBg = 'blue';
|
|
436
|
+
const activeFg = getContrastColor(activeBg);
|
|
437
|
+
return Box({ width: 50, flexDirection: 'column' }, Box({ flexDirection: 'row', borderStyle: 'single', borderColor: 'gray' }, Box({ paddingX: 2, backgroundColor: activeBg }, Text({ color: activeFg, backgroundColor: activeBg, bold: true }, '🏠 Home')), Box({ paddingX: 2 }, Text({ color: 'gray' }, '📁 Files')), Box({ paddingX: 2 }, Text({ color: 'gray' }, '⚙️ Settings'))), Box({ borderStyle: 'single', borderColor: 'blue', padding: 1, height: 5 }, Text({}, 'Home content')));
|
|
438
|
+
}),
|
|
420
439
|
story('Tabs - Styled')
|
|
421
440
|
.category('Molecules')
|
|
422
441
|
.description('Tabs with custom styling')
|
|
@@ -503,7 +522,11 @@ export const mouseStories = [
|
|
|
503
522
|
story('Mouse - Position Tracker')
|
|
504
523
|
.category('Molecules')
|
|
505
524
|
.description('Real-time mouse position tracking')
|
|
506
|
-
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'double', borderColor: 'magenta' }, Text({ bold: true, color: 'magenta' }, '📍 Mouse Position Tracker'), Divider({}), Box({ flexDirection: 'row', gap: 4 }, Box({ flexDirection: 'column' }, Text({ color: 'gray' }, 'X Position'), Text({ color: 'cyan', bold: true }, ' 24 ')), Box({ flexDirection: 'column' }, Text({ color: 'gray' }, 'Y Position'), Text({ color: 'cyan', bold: true }, ' 12 '))), Spacer({ size: 1 }),
|
|
525
|
+
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'double', borderColor: 'magenta' }, Text({ bold: true, color: 'magenta' }, '📍 Mouse Position Tracker'), Divider({}), Box({ flexDirection: 'row', gap: 4 }, Box({ flexDirection: 'column' }, Text({ color: 'gray' }, 'X Position'), Text({ color: 'cyan', bold: true }, ' 24 ')), Box({ flexDirection: 'column' }, Text({ color: 'gray' }, 'Y Position'), Text({ color: 'cyan', bold: true }, ' 12 '))), Spacer({ size: 1 }), (() => {
|
|
526
|
+
const bg = 'gray';
|
|
527
|
+
const fg = getContrastColor(bg);
|
|
528
|
+
return Box({ flexDirection: 'column', backgroundColor: bg }, Text({ color: fg, backgroundColor: bg }, ' '), Text({ color: fg, backgroundColor: bg }, ' Move mouse here... '), Text({ color: fg, backgroundColor: bg }, ' ● '), Text({ color: fg, backgroundColor: bg }, ' '));
|
|
529
|
+
})(), Text({ color: 'gray', dim: true }, "action === 'move' for tracking"))),
|
|
507
530
|
story('Mouse - Double Click')
|
|
508
531
|
.category('Molecules')
|
|
509
532
|
.description('Detect double-click events')
|
|
@@ -523,7 +546,11 @@ export const mouseStories = [
|
|
|
523
546
|
story('Mouse - Click Hitbox')
|
|
524
547
|
.category('Molecules')
|
|
525
548
|
.description('Detect clicks on specific regions')
|
|
526
|
-
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '🎯 Hitbox Detection'), Divider({}), Box({ flexDirection: 'row', gap: 1 },
|
|
549
|
+
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '🎯 Hitbox Detection'), Divider({}), Box({ flexDirection: 'row', gap: 1 }, (() => {
|
|
550
|
+
const bg = 'green';
|
|
551
|
+
const fg = getContrastColor(bg);
|
|
552
|
+
return Box({ padding: 1, borderStyle: 'round', borderColor: bg, backgroundColor: bg }, Text({ color: fg, backgroundColor: bg, bold: true }, ' Button 1 '));
|
|
553
|
+
})(), Box({ padding: 1, borderStyle: 'round', borderColor: 'blue' }, Text({ color: 'blue' }, ' Button 2 ')), Box({ padding: 1, borderStyle: 'round', borderColor: 'red' }, Text({ color: 'red' }, ' Button 3 '))), Spacer({ size: 1 }), Text({}, 'Clicked: Button 1'), Text({ color: 'gray', dim: true }, 'Check x,y against element bounds'))),
|
|
527
554
|
story('Mouse - Interactive Canvas')
|
|
528
555
|
.category('Molecules')
|
|
529
556
|
.description('Draw with mouse clicks')
|
|
@@ -552,11 +579,19 @@ export const mouseStories = [
|
|
|
552
579
|
story('Mouse - Hover State')
|
|
553
580
|
.category('Molecules')
|
|
554
581
|
.description('Track hover state over elements')
|
|
555
|
-
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '👆 Hover Detection'), Divider({}), Box({ flexDirection: 'row', gap: 2 },
|
|
582
|
+
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '👆 Hover Detection'), Divider({}), Box({ flexDirection: 'row', gap: 2 }, (() => {
|
|
583
|
+
const bg = 'blue';
|
|
584
|
+
const fg = getContrastColor(bg);
|
|
585
|
+
return Box({ padding: 1, borderStyle: 'round', borderColor: 'cyan', backgroundColor: bg }, Text({ color: fg, backgroundColor: bg, bold: true }, ' Hovered! '));
|
|
586
|
+
})(), Box({ padding: 1, borderStyle: 'round', borderColor: 'gray' }, Text({ color: 'gray' }, ' Normal ')), Box({ padding: 1, borderStyle: 'round', borderColor: 'gray' }, Text({ color: 'gray' }, ' Normal '))), Spacer({ size: 1 }), Text({ color: 'gray' }, 'Hovering: Item 1'), Text({ color: 'gray', dim: true }, "Track mouse position for hover effects"))),
|
|
556
587
|
story('Mouse - Context Menu')
|
|
557
588
|
.category('Molecules')
|
|
558
589
|
.description('Right-click context menu trigger')
|
|
559
|
-
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '📜 Context Menu'), Divider({}), Box({ flexDirection: 'row', gap: 0 },
|
|
590
|
+
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '📜 Context Menu'), Divider({}), Box({ flexDirection: 'row', gap: 0 }, (() => {
|
|
591
|
+
const selBg = 'blue';
|
|
592
|
+
const selFg = getContrastColor(selBg);
|
|
593
|
+
return Box({ flexDirection: 'column', width: 20 }, Text({}, ' 📄 Document.txt'), Text({}, ' 📁 Folder'), Text({ backgroundColor: selBg, color: selFg }, ' 📄 Selected.md '));
|
|
594
|
+
})(), Box({ flexDirection: 'column', borderStyle: 'single', borderColor: 'cyan', padding: 1 }, Text({ color: 'cyan' }, ' Open '), Text({}, ' Edit '), Text({}, ' Copy '), Text({ color: 'gray' }, ' ────────── '), Text({ color: 'red' }, ' Delete '))), Text({ color: 'gray', dim: true }, "if (event.button === 'right') showMenu()"))),
|
|
560
595
|
story('Mouse - Drag & Drop')
|
|
561
596
|
.category('Molecules')
|
|
562
597
|
.description('Visual drag and drop interface')
|
|
@@ -566,6 +601,347 @@ export const mouseStories = [
|
|
|
566
601
|
.description('Drag to create selection rectangle')
|
|
567
602
|
.render(() => Box({ flexDirection: 'column', gap: 1, padding: 1, borderStyle: 'single' }, Text({ bold: true }, '⬜ Selection Box'), Divider({}), Box({ flexDirection: 'column' }, Text({ color: 'gray' }, '┌──────────────────────────────┐'), Text({ color: 'gray' }, '│ ○ ● ○ ○ │'), Text({ color: 'gray' }, '│ ┏━━━━━━━━━━━┓ │'), Text({ color: 'gray' }, '│ ○ ┃ ● ● ┃ ○ │'), Text({ color: 'gray' }, '│ ┃ ● ┃ │'), Text({ color: 'gray' }, '│ ┗━━━━━━━━━━━┛ ○ │'), Text({ color: 'gray' }, '│ ○ ○ │'), Text({ color: 'gray' }, '└──────────────────────────────┘')), Text({ color: 'cyan' }, 'Selected: 4 items'), Text({ color: 'gray', dim: true }, 'Track start & end drag positions'))),
|
|
568
603
|
];
|
|
604
|
+
/**
|
|
605
|
+
* LineChart stories - Multi-series with color coding
|
|
606
|
+
*/
|
|
607
|
+
export const lineChartStories = [
|
|
608
|
+
story('LineChart - Single Series')
|
|
609
|
+
.category('Molecules')
|
|
610
|
+
.description('Single data series line chart')
|
|
611
|
+
.render(() => LineChart({
|
|
612
|
+
series: [
|
|
613
|
+
{ name: 'Usage', data: [10, 25, 30, 45, 60, 55, 70], color: 'cyan' },
|
|
614
|
+
],
|
|
615
|
+
width: 50,
|
|
616
|
+
height: 8,
|
|
617
|
+
title: 'System Usage Over Time',
|
|
618
|
+
showLegend: true,
|
|
619
|
+
})),
|
|
620
|
+
story('LineChart - Multi-Series Colors')
|
|
621
|
+
.category('Molecules')
|
|
622
|
+
.description('Multiple series with automatic color assignment')
|
|
623
|
+
.render(() => LineChart({
|
|
624
|
+
series: [
|
|
625
|
+
{ name: 'Frontend', data: [10, 25, 30, 45, 60, 55, 70] },
|
|
626
|
+
{ name: 'Backend', data: [15, 20, 35, 40, 55, 65, 75] },
|
|
627
|
+
{ name: 'Database', data: [5, 15, 25, 35, 45, 50, 60] },
|
|
628
|
+
],
|
|
629
|
+
width: 50,
|
|
630
|
+
height: 10,
|
|
631
|
+
title: 'Performance Metrics',
|
|
632
|
+
showLegend: true,
|
|
633
|
+
})),
|
|
634
|
+
story('LineChart - Custom Colors')
|
|
635
|
+
.category('Molecules')
|
|
636
|
+
.description('Line chart with custom series colors')
|
|
637
|
+
.controls({
|
|
638
|
+
color1: defaultControls.color('Series 1 Color', 'green'),
|
|
639
|
+
color2: defaultControls.color('Series 2 Color', 'yellow'),
|
|
640
|
+
})
|
|
641
|
+
.render((props) => LineChart({
|
|
642
|
+
series: [
|
|
643
|
+
{ name: 'Profit', data: [50, 65, 75, 70, 85, 90, 95], color: props.color1 },
|
|
644
|
+
{ name: 'Costs', data: [30, 35, 40, 45, 40, 38, 35], color: props.color2 },
|
|
645
|
+
],
|
|
646
|
+
width: 50,
|
|
647
|
+
height: 8,
|
|
648
|
+
title: 'Revenue Analysis',
|
|
649
|
+
showLegend: true,
|
|
650
|
+
})),
|
|
651
|
+
];
|
|
652
|
+
/**
|
|
653
|
+
* ScatterPlot stories - 2D correlation analysis
|
|
654
|
+
*/
|
|
655
|
+
export const scatterPlotStories = [
|
|
656
|
+
story('ScatterPlot - Basic Correlation')
|
|
657
|
+
.category('Molecules')
|
|
658
|
+
.description('2D scatter plot for correlation analysis')
|
|
659
|
+
.render(() => ScatterPlot({
|
|
660
|
+
points: [
|
|
661
|
+
{ x: 1, y: 2 },
|
|
662
|
+
{ x: 2, y: 4 },
|
|
663
|
+
{ x: 3, y: 6 },
|
|
664
|
+
{ x: 4, y: 8 },
|
|
665
|
+
{ x: 5, y: 10 },
|
|
666
|
+
{ x: 6, y: 12 },
|
|
667
|
+
],
|
|
668
|
+
width: 40,
|
|
669
|
+
height: 10,
|
|
670
|
+
title: 'X vs Y Correlation',
|
|
671
|
+
markerStyle: 'circle',
|
|
672
|
+
})),
|
|
673
|
+
story('ScatterPlot - Multiple Markers')
|
|
674
|
+
.category('Molecules')
|
|
675
|
+
.description('Scatter plot with different marker styles')
|
|
676
|
+
.controls({
|
|
677
|
+
markerStyle: defaultControls.select('Marker Style', ['circle', 'square', 'diamond', 'plus', 'star', 'cross']),
|
|
678
|
+
})
|
|
679
|
+
.render((props) => ScatterPlot({
|
|
680
|
+
points: [
|
|
681
|
+
{ x: 1, y: 3 },
|
|
682
|
+
{ x: 2, y: 5 },
|
|
683
|
+
{ x: 3, y: 4 },
|
|
684
|
+
{ x: 4, y: 7 },
|
|
685
|
+
{ x: 5, y: 6 },
|
|
686
|
+
{ x: 6, y: 9 },
|
|
687
|
+
{ x: 7, y: 8 },
|
|
688
|
+
],
|
|
689
|
+
width: 40,
|
|
690
|
+
height: 10,
|
|
691
|
+
title: 'Data Distribution',
|
|
692
|
+
markerStyle: props.markerStyle,
|
|
693
|
+
})),
|
|
694
|
+
story('ScatterPlot - Scatter with Color')
|
|
695
|
+
.category('Molecules')
|
|
696
|
+
.description('Scatter plot with color highlighting')
|
|
697
|
+
.render(() => ScatterPlot({
|
|
698
|
+
points: Array.from({ length: 15 }, () => ({
|
|
699
|
+
x: Math.floor(Math.random() * 10) + 1,
|
|
700
|
+
y: Math.floor(Math.random() * 10) + 1,
|
|
701
|
+
})),
|
|
702
|
+
width: 40,
|
|
703
|
+
height: 10,
|
|
704
|
+
title: 'Random Distribution',
|
|
705
|
+
markerStyle: 'circle',
|
|
706
|
+
color: 'green',
|
|
707
|
+
})),
|
|
708
|
+
];
|
|
709
|
+
/**
|
|
710
|
+
* RadarChart stories - Multi-dimensional comparison
|
|
711
|
+
*/
|
|
712
|
+
export const radarChartStories = [
|
|
713
|
+
story('RadarChart - Product Comparison')
|
|
714
|
+
.category('Molecules')
|
|
715
|
+
.description('Compare multiple products across dimensions')
|
|
716
|
+
.render(() => RadarChart({
|
|
717
|
+
axes: [
|
|
718
|
+
{ name: 'Speed', max: 100 },
|
|
719
|
+
{ name: 'Power', max: 100 },
|
|
720
|
+
{ name: 'Efficiency', max: 100 },
|
|
721
|
+
{ name: 'Durability', max: 100 },
|
|
722
|
+
{ name: 'Cost', max: 100 },
|
|
723
|
+
],
|
|
724
|
+
series: [
|
|
725
|
+
{ name: 'Model A', values: [80, 75, 70, 85, 60], color: 'cyan' },
|
|
726
|
+
{ name: 'Model B', values: [70, 85, 80, 75, 80], color: 'green' },
|
|
727
|
+
],
|
|
728
|
+
showLegend: true,
|
|
729
|
+
})),
|
|
730
|
+
story('RadarChart - Skills Assessment')
|
|
731
|
+
.category('Molecules')
|
|
732
|
+
.description('Compare skill levels across multiple domains')
|
|
733
|
+
.render(() => RadarChart({
|
|
734
|
+
axes: [
|
|
735
|
+
{ name: 'Frontend', max: 100 },
|
|
736
|
+
{ name: 'Backend', max: 100 },
|
|
737
|
+
{ name: 'DevOps', max: 100 },
|
|
738
|
+
{ name: 'Security', max: 100 },
|
|
739
|
+
{ name: 'Testing', max: 100 },
|
|
740
|
+
{ name: 'Documentation', max: 100 },
|
|
741
|
+
],
|
|
742
|
+
series: [
|
|
743
|
+
{ name: 'Developer 1', values: [85, 75, 65, 70, 80, 75], color: 'yellow' },
|
|
744
|
+
{ name: 'Developer 2', values: [70, 85, 80, 75, 70, 80], color: 'magenta' },
|
|
745
|
+
],
|
|
746
|
+
showLegend: true,
|
|
747
|
+
})),
|
|
748
|
+
];
|
|
749
|
+
/**
|
|
750
|
+
* GanttChart stories - Project timeline
|
|
751
|
+
*/
|
|
752
|
+
export const ganttChartStories = [
|
|
753
|
+
story('GanttChart - Project Timeline')
|
|
754
|
+
.category('Molecules')
|
|
755
|
+
.description('Project timeline with task dependencies')
|
|
756
|
+
.render(() => GanttChart({
|
|
757
|
+
tasks: [
|
|
758
|
+
{
|
|
759
|
+
id: '1',
|
|
760
|
+
name: 'Design',
|
|
761
|
+
startDate: '2024-01-01',
|
|
762
|
+
endDate: '2024-01-15',
|
|
763
|
+
progress: 100,
|
|
764
|
+
status: 'complete',
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
id: '2',
|
|
768
|
+
name: 'Development',
|
|
769
|
+
startDate: '2024-01-15',
|
|
770
|
+
endDate: '2024-02-15',
|
|
771
|
+
progress: 65,
|
|
772
|
+
status: 'in-progress',
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
id: '3',
|
|
776
|
+
name: 'Testing',
|
|
777
|
+
startDate: '2024-02-01',
|
|
778
|
+
endDate: '2024-02-20',
|
|
779
|
+
progress: 30,
|
|
780
|
+
status: 'in-progress',
|
|
781
|
+
dependsOn: '2',
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
id: '4',
|
|
785
|
+
name: 'Deployment',
|
|
786
|
+
startDate: '2024-02-20',
|
|
787
|
+
endDate: '2024-02-25',
|
|
788
|
+
progress: 0,
|
|
789
|
+
status: 'pending',
|
|
790
|
+
dependsOn: '3',
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
width: 60,
|
|
794
|
+
title: 'Project Timeline Q1 2024',
|
|
795
|
+
showLegend: true,
|
|
796
|
+
})),
|
|
797
|
+
story('GanttChart - Sprint Planning')
|
|
798
|
+
.category('Molecules')
|
|
799
|
+
.description('Sprint timeline with multiple tasks')
|
|
800
|
+
.render(() => GanttChart({
|
|
801
|
+
tasks: [
|
|
802
|
+
{
|
|
803
|
+
id: '1',
|
|
804
|
+
name: 'Epic Planning',
|
|
805
|
+
startDate: '2024-01-01',
|
|
806
|
+
endDate: '2024-01-03',
|
|
807
|
+
progress: 100,
|
|
808
|
+
status: 'complete',
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
id: '2',
|
|
812
|
+
name: 'Feature A',
|
|
813
|
+
startDate: '2024-01-03',
|
|
814
|
+
endDate: '2024-01-07',
|
|
815
|
+
progress: 100,
|
|
816
|
+
status: 'complete',
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
id: '3',
|
|
820
|
+
name: 'Feature B',
|
|
821
|
+
startDate: '2024-01-05',
|
|
822
|
+
endDate: '2024-01-10',
|
|
823
|
+
progress: 75,
|
|
824
|
+
status: 'in-progress',
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
id: '4',
|
|
828
|
+
name: 'QA Review',
|
|
829
|
+
startDate: '2024-01-07',
|
|
830
|
+
endDate: '2024-01-12',
|
|
831
|
+
progress: 50,
|
|
832
|
+
status: 'in-progress',
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
id: '5',
|
|
836
|
+
name: 'Release',
|
|
837
|
+
startDate: '2024-01-12',
|
|
838
|
+
endDate: '2024-01-15',
|
|
839
|
+
progress: 0,
|
|
840
|
+
status: 'pending',
|
|
841
|
+
},
|
|
842
|
+
],
|
|
843
|
+
width: 60,
|
|
844
|
+
title: 'Sprint 2024-01',
|
|
845
|
+
showLegend: true,
|
|
846
|
+
})),
|
|
847
|
+
];
|
|
848
|
+
/**
|
|
849
|
+
* TimeHeatmap stories - Activity calendar
|
|
850
|
+
*/
|
|
851
|
+
export const timeHeatmapStories = [
|
|
852
|
+
story('TimeHeatmap - Daily Activity')
|
|
853
|
+
.category('Molecules')
|
|
854
|
+
.description('Daily activity heatmap')
|
|
855
|
+
.render(() => TimeHeatmap({
|
|
856
|
+
data: [
|
|
857
|
+
{ date: '2024-12-01', value: 5 },
|
|
858
|
+
{ date: '2024-12-02', value: 10 },
|
|
859
|
+
{ date: '2024-12-03', value: 8 },
|
|
860
|
+
{ date: '2024-12-04', value: 15 },
|
|
861
|
+
{ date: '2024-12-05', value: 12 },
|
|
862
|
+
{ date: '2024-12-06', value: 20 },
|
|
863
|
+
{ date: '2024-12-07', value: 18 },
|
|
864
|
+
{ date: '2024-12-08', value: 5 },
|
|
865
|
+
{ date: '2024-12-09', value: 10 },
|
|
866
|
+
{ date: '2024-12-10', value: 25 },
|
|
867
|
+
{ date: '2024-12-11', value: 30 },
|
|
868
|
+
{ date: '2024-12-12', value: 22 },
|
|
869
|
+
],
|
|
870
|
+
granularity: 'day',
|
|
871
|
+
colorScale: 'greens',
|
|
872
|
+
title: 'Daily Activity Heatmap',
|
|
873
|
+
showLegend: true,
|
|
874
|
+
})),
|
|
875
|
+
story('TimeHeatmap - Color Scales')
|
|
876
|
+
.category('Molecules')
|
|
877
|
+
.description('Heatmap with different color scales')
|
|
878
|
+
.controls({
|
|
879
|
+
colorScale: defaultControls.select('Color Scale', ['greens', 'blues', 'reds', 'heat']),
|
|
880
|
+
})
|
|
881
|
+
.render((props) => TimeHeatmap({
|
|
882
|
+
data: [
|
|
883
|
+
{ date: '2024-12-01', value: 5 },
|
|
884
|
+
{ date: '2024-12-02', value: 15 },
|
|
885
|
+
{ date: '2024-12-03', value: 8 },
|
|
886
|
+
{ date: '2024-12-04', value: 25 },
|
|
887
|
+
{ date: '2024-12-05', value: 12 },
|
|
888
|
+
{ date: '2024-12-06', value: 30 },
|
|
889
|
+
{ date: '2024-12-07', value: 18 },
|
|
890
|
+
{ date: '2024-12-08', value: 10 },
|
|
891
|
+
{ date: '2024-12-09', value: 20 },
|
|
892
|
+
{ date: '2024-12-10', value: 28 },
|
|
893
|
+
{ date: '2024-12-11', value: 22 },
|
|
894
|
+
{ date: '2024-12-12', value: 15 },
|
|
895
|
+
],
|
|
896
|
+
granularity: 'day',
|
|
897
|
+
colorScale: props.colorScale,
|
|
898
|
+
title: 'Activity Distribution',
|
|
899
|
+
showLegend: true,
|
|
900
|
+
})),
|
|
901
|
+
];
|
|
902
|
+
/**
|
|
903
|
+
* Legend stories - Reusable legend component
|
|
904
|
+
*/
|
|
905
|
+
export const legendStories = [
|
|
906
|
+
story('Legend - Horizontal Bottom')
|
|
907
|
+
.category('Molecules')
|
|
908
|
+
.description('Legend positioned at bottom')
|
|
909
|
+
.render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', height: 5, borderStyle: 'single', borderColor: 'gray', padding: 1 }, Text({ color: 'gray' }, 'Chart Area')), Legend({
|
|
910
|
+
items: [
|
|
911
|
+
{ label: 'Series 1', color: 'cyan' },
|
|
912
|
+
{ label: 'Series 2', color: 'green' },
|
|
913
|
+
{ label: 'Series 3', color: 'yellow' },
|
|
914
|
+
],
|
|
915
|
+
position: 'bottom',
|
|
916
|
+
showSymbols: true,
|
|
917
|
+
}))),
|
|
918
|
+
story('Legend - Priority Levels')
|
|
919
|
+
.category('Molecules')
|
|
920
|
+
.description('Legend for priority classification')
|
|
921
|
+
.render(() => Box({ flexDirection: 'column', gap: 2, padding: 1 }, Text({ bold: true, color: 'cyan' }, 'Task Priority Levels'), Newline(), Legend({
|
|
922
|
+
items: [
|
|
923
|
+
{ label: 'Critical', color: 'red' },
|
|
924
|
+
{ label: 'High', color: 'yellow' },
|
|
925
|
+
{ label: 'Medium', color: 'blue' },
|
|
926
|
+
{ label: 'Low', color: 'green' },
|
|
927
|
+
],
|
|
928
|
+
position: 'bottom',
|
|
929
|
+
showSymbols: true,
|
|
930
|
+
}))),
|
|
931
|
+
story('Legend - Status Indicators')
|
|
932
|
+
.category('Molecules')
|
|
933
|
+
.description('Legend for status tracking')
|
|
934
|
+
.render(() => Box({ flexDirection: 'column', gap: 2, padding: 1 }, Text({ bold: true, color: 'magenta' }, 'Build Status Legend'), Newline(), Legend({
|
|
935
|
+
items: [
|
|
936
|
+
{ label: 'Passing', color: 'green' },
|
|
937
|
+
{ label: 'Failing', color: 'red' },
|
|
938
|
+
{ label: 'Pending', color: 'yellow' },
|
|
939
|
+
{ label: 'Skipped', color: 'gray' },
|
|
940
|
+
],
|
|
941
|
+
position: 'bottom',
|
|
942
|
+
showSymbols: true,
|
|
943
|
+
}))),
|
|
944
|
+
];
|
|
569
945
|
/**
|
|
570
946
|
* All molecule stories
|
|
571
947
|
*/
|
|
@@ -581,6 +957,12 @@ export const allMoleculeStories = [
|
|
|
581
957
|
...tabsStories,
|
|
582
958
|
...sparklineStories,
|
|
583
959
|
...gaugeStories,
|
|
960
|
+
...lineChartStories,
|
|
961
|
+
...scatterPlotStories,
|
|
962
|
+
...radarChartStories,
|
|
963
|
+
...ganttChartStories,
|
|
964
|
+
...timeHeatmapStories,
|
|
965
|
+
...legendStories,
|
|
584
966
|
...mouseStories,
|
|
585
967
|
];
|
|
586
968
|
export default allMoleculeStories;
|