@jcsoftdev/ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +132 -2
- package/bin/ui-theme.mjs +45 -0
- package/dist/ai/attachment/attachment.d.ts +19 -0
- package/dist/ai/attachment/attachment.js +87 -0
- package/dist/ai/attachment/index.d.ts +1 -0
- package/dist/ai/attachment/index.js +1 -0
- package/dist/ai/chain-of-thought/chain-of-thought.d.ts +21 -0
- package/dist/ai/chain-of-thought/chain-of-thought.js +88 -0
- package/dist/ai/chain-of-thought/index.d.ts +1 -0
- package/dist/ai/chain-of-thought/index.js +1 -0
- package/dist/ai/chat-list/chat-list.d.ts +24 -0
- package/dist/ai/chat-list/chat-list.js +94 -0
- package/dist/ai/chat-list/group.d.ts +12 -0
- package/dist/ai/chat-list/group.js +37 -0
- package/dist/ai/chat-list/index.d.ts +2 -0
- package/dist/ai/chat-list/index.js +7 -0
- package/dist/ai/chat-message/chat-message.d.ts +23 -0
- package/dist/ai/chat-message/chat-message.js +91 -0
- package/dist/ai/chat-message/index.d.ts +1 -0
- package/dist/ai/chat-message/index.js +1 -0
- package/dist/ai/code-block/code-block.d.ts +12 -0
- package/dist/ai/code-block/code-block.js +80 -0
- package/dist/ai/code-block/highlight.d.ts +9 -0
- package/dist/ai/code-block/highlight.js +160 -0
- package/dist/ai/code-block/index.d.ts +2 -0
- package/dist/ai/code-block/index.js +9 -0
- package/dist/ai/conversation/conversation.d.ts +12 -0
- package/dist/ai/conversation/conversation.js +87 -0
- package/dist/ai/conversation/index.d.ts +2 -0
- package/dist/ai/conversation/index.js +15 -0
- package/dist/ai/conversation/stick.d.ts +18 -0
- package/dist/ai/conversation/stick.js +22 -0
- package/dist/ai/index.d.ts +14 -0
- package/dist/ai/index.js +14 -0
- package/dist/ai/internal/disclosure.d.ts +13 -0
- package/dist/ai/internal/disclosure.js +62 -0
- package/dist/ai/internal/icon-action.d.ts +7 -0
- package/dist/ai/internal/icon-action.js +21 -0
- package/dist/ai/internal/keyframes.d.ts +5 -0
- package/dist/ai/internal/keyframes.js +7 -0
- package/dist/ai/internal/use-copy.d.ts +5 -0
- package/dist/ai/internal/use-copy.js +35 -0
- package/dist/ai/loader/index.d.ts +1 -0
- package/dist/ai/loader/index.js +1 -0
- package/dist/ai/loader/loader.d.ts +12 -0
- package/dist/ai/loader/loader.js +41 -0
- package/dist/ai/markdown/index.d.ts +2 -0
- package/dist/ai/markdown/index.js +6 -0
- package/dist/ai/markdown/markdown.d.ts +12 -0
- package/dist/ai/markdown/markdown.js +159 -0
- package/dist/ai/markdown/parse.d.ts +56 -0
- package/dist/ai/markdown/parse.js +229 -0
- package/dist/ai/message-actions/index.d.ts +1 -0
- package/dist/ai/message-actions/index.js +1 -0
- package/dist/ai/message-actions/message-actions.d.ts +15 -0
- package/dist/ai/message-actions/message-actions.js +72 -0
- package/dist/ai/prompt-input/index.d.ts +2 -0
- package/dist/ai/prompt-input/index.js +5 -0
- package/dist/ai/prompt-input/keys.d.ts +8 -0
- package/dist/ai/prompt-input/keys.js +6 -0
- package/dist/ai/prompt-input/prompt-input.d.ts +29 -0
- package/dist/ai/prompt-input/prompt-input.js +110 -0
- package/dist/ai/prompt-suggestion/index.d.ts +1 -0
- package/dist/ai/prompt-suggestion/index.js +1 -0
- package/dist/ai/prompt-suggestion/prompt-suggestion.d.ts +13 -0
- package/dist/ai/prompt-suggestion/prompt-suggestion.js +44 -0
- package/dist/ai/source/index.d.ts +1 -0
- package/dist/ai/source/index.js +1 -0
- package/dist/ai/source/source.d.ts +12 -0
- package/dist/ai/source/source.js +48 -0
- package/dist/ai/text-shimmer/index.d.ts +1 -0
- package/dist/ai/text-shimmer/index.js +1 -0
- package/dist/ai/text-shimmer/text-shimmer.d.ts +11 -0
- package/dist/ai/text-shimmer/text-shimmer.js +28 -0
- package/dist/ai/tool-call/index.d.ts +1 -0
- package/dist/ai/tool-call/index.js +1 -0
- package/dist/ai/tool-call/tool-call.d.ts +18 -0
- package/dist/ai/tool-call/tool-call.js +84 -0
- package/dist/atoms/avatar/avatar.d.ts +11 -0
- package/dist/atoms/avatar/avatar.js +39 -0
- package/dist/atoms/avatar/index.d.ts +1 -0
- package/dist/atoms/avatar/index.js +4 -0
- package/dist/atoms/avatar-group/avatar-group.d.ts +7 -0
- package/dist/atoms/avatar-group/avatar-group.js +8 -0
- package/dist/atoms/avatar-group/index.d.ts +1 -0
- package/dist/atoms/avatar-group/index.js +4 -0
- package/dist/atoms/big-date/big-date.d.ts +7 -0
- package/dist/atoms/big-date/big-date.js +18 -0
- package/dist/atoms/big-date/index.d.ts +1 -0
- package/dist/atoms/big-date/index.js +4 -0
- package/dist/atoms/button/button.d.ts +11 -0
- package/dist/atoms/button/button.js +60 -0
- package/dist/atoms/button/index.d.ts +1 -0
- package/dist/atoms/button/index.js +6 -0
- package/dist/atoms/checkbox/checkbox.d.ts +5 -0
- package/dist/atoms/checkbox/checkbox.js +18 -0
- package/dist/atoms/checkbox/index.d.ts +1 -0
- package/dist/atoms/checkbox/index.js +4 -0
- package/dist/atoms/chip/chip.d.ts +8 -0
- package/dist/atoms/chip/chip.js +28 -0
- package/dist/atoms/chip/index.d.ts +1 -0
- package/dist/atoms/chip/index.js +4 -0
- package/dist/atoms/icon/icon-map.d.ts +42 -0
- package/dist/atoms/icon/icon-map.js +81 -0
- package/dist/atoms/icon/icon.d.ts +12 -0
- package/dist/atoms/icon/icon.js +13 -0
- package/dist/atoms/icon/index.d.ts +2 -0
- package/dist/atoms/icon/index.js +6 -0
- package/dist/atoms/index.d.ts +16 -0
- package/dist/atoms/index.js +16 -0
- package/dist/atoms/led/index.d.ts +1 -0
- package/dist/atoms/led/index.js +4 -0
- package/dist/atoms/led/led.d.ts +9 -0
- package/dist/atoms/led/led.js +23 -0
- package/dist/atoms/number-value/format.d.ts +10 -0
- package/dist/atoms/number-value/format.js +19 -0
- package/dist/atoms/number-value/index.d.ts +2 -0
- package/dist/atoms/number-value/index.js +14 -0
- package/dist/atoms/number-value/number-value.d.ts +18 -0
- package/dist/atoms/number-value/number-value.js +42 -0
- package/dist/atoms/pressable-feedback/index.d.ts +1 -0
- package/dist/atoms/pressable-feedback/index.js +4 -0
- package/dist/atoms/pressable-feedback/pressable-feedback.d.ts +14 -0
- package/dist/atoms/pressable-feedback/pressable-feedback.js +66 -0
- package/dist/atoms/progress/index.d.ts +1 -0
- package/dist/atoms/progress/index.js +5 -0
- package/dist/atoms/progress/progress.d.ts +9 -0
- package/dist/atoms/progress/progress.js +29 -0
- package/dist/atoms/radio-group/index.d.ts +1 -0
- package/dist/atoms/radio-group/index.js +6 -0
- package/dist/atoms/radio-group/radio-group.d.ts +11 -0
- package/dist/atoms/radio-group/radio-group.js +47 -0
- package/dist/atoms/status-dot/index.d.ts +1 -0
- package/dist/atoms/status-dot/index.js +6 -0
- package/dist/atoms/status-dot/status-dot.d.ts +13 -0
- package/dist/atoms/status-dot/status-dot.js +39 -0
- package/dist/atoms/status-pill/index.d.ts +1 -0
- package/dist/atoms/status-pill/index.js +4 -0
- package/dist/atoms/status-pill/status-pill.d.ts +10 -0
- package/dist/atoms/status-pill/status-pill.js +25 -0
- package/dist/atoms/switch/index.d.ts +1 -0
- package/dist/atoms/switch/index.js +4 -0
- package/dist/atoms/switch/switch.d.ts +5 -0
- package/dist/atoms/switch/switch.js +17 -0
- package/dist/atoms/trend-chip/index.d.ts +2 -0
- package/dist/atoms/trend-chip/index.js +12 -0
- package/dist/atoms/trend-chip/trend-chip.d.ts +14 -0
- package/dist/atoms/trend-chip/trend-chip.js +58 -0
- package/dist/atoms/trend-chip/trend.d.ts +8 -0
- package/dist/atoms/trend-chip/trend.js +21 -0
- package/dist/brand/export.d.ts +7 -0
- package/dist/brand/export.js +62 -0
- package/dist/brand/generate.d.ts +65 -0
- package/dist/brand/generate.js +409 -0
- package/dist/brand/glyphs.d.ts +16 -0
- package/dist/brand/glyphs.js +91 -0
- package/dist/brand/index.d.ts +8 -0
- package/dist/brand/index.js +8 -0
- package/dist/brand/initials.d.ts +6 -0
- package/dist/brand/initials.js +41 -0
- package/dist/brand/logo-forge.d.ts +42 -0
- package/dist/brand/logo-forge.js +441 -0
- package/dist/brand/logo-mark.d.ts +8 -0
- package/dist/brand/logo-mark.js +34 -0
- package/dist/brand/palettes.d.ts +23 -0
- package/dist/brand/palettes.js +47 -0
- package/dist/brand/rng.d.ts +5 -0
- package/dist/brand/rng.js +26 -0
- package/dist/calendar/day-chip/day-chip.d.ts +8 -0
- package/dist/calendar/day-chip/day-chip.js +34 -0
- package/dist/calendar/day-chip/index.d.ts +2 -0
- package/dist/calendar/day-chip/index.js +4 -0
- package/dist/calendar/event-block/event-block.d.ts +9 -0
- package/dist/calendar/event-block/event-block.js +74 -0
- package/dist/calendar/event-block/index.d.ts +2 -0
- package/dist/calendar/event-block/index.js +4 -0
- package/dist/calendar/index.d.ts +5 -0
- package/dist/calendar/index.js +5 -0
- package/dist/calendar/internal/date-utils.d.ts +18 -0
- package/dist/calendar/internal/date-utils.js +66 -0
- package/dist/calendar/internal/index.d.ts +3 -0
- package/dist/calendar/internal/index.js +3 -0
- package/dist/calendar/internal/layout.d.ts +14 -0
- package/dist/calendar/internal/layout.js +42 -0
- package/dist/calendar/internal/styles.d.ts +2 -0
- package/dist/calendar/internal/styles.js +4 -0
- package/dist/calendar/internal/types.d.ts +29 -0
- package/dist/calendar/internal/types.js +0 -0
- package/dist/calendar/month-view/index.d.ts +1 -0
- package/dist/calendar/month-view/index.js +4 -0
- package/dist/calendar/month-view/month-view.d.ts +24 -0
- package/dist/calendar/month-view/month-view.js +110 -0
- package/dist/calendar/timeline-view/index.d.ts +1 -0
- package/dist/calendar/timeline-view/index.js +4 -0
- package/dist/calendar/timeline-view/timeline-view.d.ts +19 -0
- package/dist/calendar/timeline-view/timeline-view.js +64 -0
- package/dist/calendar/week-view/index.d.ts +1 -0
- package/dist/calendar/week-view/index.js +4 -0
- package/dist/calendar/week-view/week-view.d.ts +26 -0
- package/dist/calendar/week-view/week-view.js +172 -0
- package/dist/charts/area-chart/area-chart.d.ts +10 -0
- package/dist/charts/area-chart/area-chart.js +14 -0
- package/dist/charts/area-chart/index.d.ts +1 -0
- package/dist/charts/area-chart/index.js +1 -0
- package/dist/charts/bar-chart/bar-chart.d.ts +35 -0
- package/dist/charts/bar-chart/bar-chart.js +29 -0
- package/dist/charts/bar-chart/bar-race-chart.d.ts +41 -0
- package/dist/charts/bar-chart/bar-race-chart.js +252 -0
- package/dist/charts/bar-chart/bar-race.d.ts +23 -0
- package/dist/charts/bar-chart/bar-race.js +42 -0
- package/dist/charts/bar-chart/drilldown-bar-chart.d.ts +18 -0
- package/dist/charts/bar-chart/drilldown-bar-chart.js +69 -0
- package/dist/charts/bar-chart/index.d.ts +4 -0
- package/dist/charts/bar-chart/index.js +4 -0
- package/dist/charts/beeswarm-chart/beeswarm-chart.d.ts +53 -0
- package/dist/charts/beeswarm-chart/beeswarm-chart.js +356 -0
- package/dist/charts/beeswarm-chart/index.d.ts +1 -0
- package/dist/charts/beeswarm-chart/index.js +1 -0
- package/dist/charts/box-plot/box-plot.d.ts +48 -0
- package/dist/charts/box-plot/box-plot.js +330 -0
- package/dist/charts/box-plot/index.d.ts +1 -0
- package/dist/charts/box-plot/index.js +1 -0
- package/dist/charts/bubble-chart/bubble-chart.d.ts +8 -0
- package/dist/charts/bubble-chart/bubble-chart.js +9 -0
- package/dist/charts/bubble-chart/index.d.ts +1 -0
- package/dist/charts/bubble-chart/index.js +1 -0
- package/dist/charts/bubble-map/bubble-map.d.ts +94 -0
- package/dist/charts/bubble-map/bubble-map.js +520 -0
- package/dist/charts/bubble-map/index.d.ts +1 -0
- package/dist/charts/bubble-map/index.js +1 -0
- package/dist/charts/bullet-chart/bullet-chart.d.ts +49 -0
- package/dist/charts/bullet-chart/bullet-chart.js +478 -0
- package/dist/charts/bullet-chart/bullet-layout.d.ts +21 -0
- package/dist/charts/bullet-chart/bullet-layout.js +30 -0
- package/dist/charts/bullet-chart/index.d.ts +2 -0
- package/dist/charts/bullet-chart/index.js +2 -0
- package/dist/charts/candlestick-chart/candlestick-chart.d.ts +59 -0
- package/dist/charts/candlestick-chart/candlestick-chart.js +514 -0
- package/dist/charts/candlestick-chart/index.d.ts +1 -0
- package/dist/charts/candlestick-chart/index.js +1 -0
- package/dist/charts/chart-grid/chart-grid.d.ts +72 -0
- package/dist/charts/chart-grid/chart-grid.js +114 -0
- package/dist/charts/chart-grid/grid-math.d.ts +26 -0
- package/dist/charts/chart-grid/grid-math.js +37 -0
- package/dist/charts/chart-grid/index.d.ts +2 -0
- package/dist/charts/chart-grid/index.js +2 -0
- package/dist/charts/chord-chart/chord-chart.d.ts +59 -0
- package/dist/charts/chord-chart/chord-chart.js +427 -0
- package/dist/charts/chord-chart/index.d.ts +1 -0
- package/dist/charts/chord-chart/index.js +1 -0
- package/dist/charts/choropleth-map/choropleth-drilldown.d.ts +36 -0
- package/dist/charts/choropleth-map/choropleth-drilldown.js +60 -0
- package/dist/charts/choropleth-map/choropleth-map.d.ts +69 -0
- package/dist/charts/choropleth-map/choropleth-map.js +304 -0
- package/dist/charts/choropleth-map/index.d.ts +2 -0
- package/dist/charts/choropleth-map/index.js +2 -0
- package/dist/charts/combo-chart/combo-chart.d.ts +15 -0
- package/dist/charts/combo-chart/combo-chart.js +14 -0
- package/dist/charts/combo-chart/index.d.ts +1 -0
- package/dist/charts/combo-chart/index.js +1 -0
- package/dist/charts/core/a11y.d.ts +4 -0
- package/dist/charts/core/a11y.js +4 -0
- package/dist/charts/core/axes.d.ts +41 -0
- package/dist/charts/core/axes.js +128 -0
- package/dist/charts/core/breadcrumb.d.ts +17 -0
- package/dist/charts/core/breadcrumb.js +43 -0
- package/dist/charts/core/cartesian/annotations.d.ts +10 -0
- package/dist/charts/core/cartesian/annotations.js +139 -0
- package/dist/charts/core/cartesian/axis-stack.d.ts +43 -0
- package/dist/charts/core/cartesian/axis-stack.js +40 -0
- package/dist/charts/core/cartesian/brush.d.ts +31 -0
- package/dist/charts/core/cartesian/brush.js +211 -0
- package/dist/charts/core/cartesian/cartesian-chart.d.ts +8 -0
- package/dist/charts/core/cartesian/cartesian-chart.js +1068 -0
- package/dist/charts/core/cartesian/category-group-axis.d.ts +6 -0
- package/dist/charts/core/cartesian/category-group-axis.js +39 -0
- package/dist/charts/core/cartesian/category-groups.d.ts +15 -0
- package/dist/charts/core/cartesian/category-groups.js +23 -0
- package/dist/charts/core/cartesian/ink-layer.d.ts +63 -0
- package/dist/charts/core/cartesian/ink-layer.js +371 -0
- package/dist/charts/core/cartesian/layout.d.ts +164 -0
- package/dist/charts/core/cartesian/layout.js +550 -0
- package/dist/charts/core/cartesian/marks.d.ts +33 -0
- package/dist/charts/core/cartesian/marks.js +110 -0
- package/dist/charts/core/cartesian/sync-store.d.ts +34 -0
- package/dist/charts/core/cartesian/sync-store.js +61 -0
- package/dist/charts/core/cartesian/sync.d.ts +20 -0
- package/dist/charts/core/cartesian/sync.js +50 -0
- package/dist/charts/core/cartesian/types.d.ts +156 -0
- package/dist/charts/core/cartesian/types.js +0 -0
- package/dist/charts/core/category-axis.d.ts +37 -0
- package/dist/charts/core/category-axis.js +78 -0
- package/dist/charts/core/category-explorer.d.ts +48 -0
- package/dist/charts/core/category-explorer.js +88 -0
- package/dist/charts/core/chart-frame.d.ts +40 -0
- package/dist/charts/core/chart-frame.js +63 -0
- package/dist/charts/core/chart-states.d.ts +16 -0
- package/dist/charts/core/chart-states.js +79 -0
- package/dist/charts/core/chord.d.ts +59 -0
- package/dist/charts/core/chord.js +104 -0
- package/dist/charts/core/color-scale.d.ts +50 -0
- package/dist/charts/core/color-scale.js +59 -0
- package/dist/charts/core/data-table.d.ts +17 -0
- package/dist/charts/core/data-table.js +28 -0
- package/dist/charts/core/distribution/brush.d.ts +44 -0
- package/dist/charts/core/distribution/brush.js +89 -0
- package/dist/charts/core/distribution/dot-stack.d.ts +39 -0
- package/dist/charts/core/distribution/dot-stack.js +40 -0
- package/dist/charts/core/distribution/explorer.d.ts +23 -0
- package/dist/charts/core/distribution/explorer.js +73 -0
- package/dist/charts/core/distribution/geometry.d.ts +38 -0
- package/dist/charts/core/distribution/geometry.js +37 -0
- package/dist/charts/core/distribution/index.d.ts +11 -0
- package/dist/charts/core/distribution/index.js +11 -0
- package/dist/charts/core/distribution/labels.d.ts +28 -0
- package/dist/charts/core/distribution/labels.js +29 -0
- package/dist/charts/core/distribution/layout.d.ts +103 -0
- package/dist/charts/core/distribution/layout.js +183 -0
- package/dist/charts/core/distribution/marks.d.ts +57 -0
- package/dist/charts/core/distribution/marks.js +269 -0
- package/dist/charts/core/distribution/observations.d.ts +19 -0
- package/dist/charts/core/distribution/observations.js +46 -0
- package/dist/charts/core/distribution/point-index.d.ts +20 -0
- package/dist/charts/core/distribution/point-index.js +47 -0
- package/dist/charts/core/distribution/points.d.ts +15 -0
- package/dist/charts/core/distribution/points.js +18 -0
- package/dist/charts/core/distribution/stats.d.ts +132 -0
- package/dist/charts/core/distribution/stats.js +281 -0
- package/dist/charts/core/distribution/use-legend.d.ts +31 -0
- package/dist/charts/core/distribution/use-legend.js +43 -0
- package/dist/charts/core/distribution/xy-points.d.ts +109 -0
- package/dist/charts/core/distribution/xy-points.js +968 -0
- package/dist/charts/core/downsample.d.ts +21 -0
- package/dist/charts/core/downsample.js +65 -0
- package/dist/charts/core/drawing-height.d.ts +14 -0
- package/dist/charts/core/drawing-height.js +11 -0
- package/dist/charts/core/export-menu.d.ts +20 -0
- package/dist/charts/core/export-menu.js +52 -0
- package/dist/charts/core/export.d.ts +45 -0
- package/dist/charts/core/export.js +162 -0
- package/dist/charts/core/format.d.ts +48 -0
- package/dist/charts/core/format.js +88 -0
- package/dist/charts/core/gantt.d.ts +136 -0
- package/dist/charts/core/gantt.js +362 -0
- package/dist/charts/core/hierarchy-chart.d.ts +76 -0
- package/dist/charts/core/hierarchy-chart.js +158 -0
- package/dist/charts/core/hierarchy.d.ts +118 -0
- package/dist/charts/core/hierarchy.js +229 -0
- package/dist/charts/core/index.d.ts +54 -0
- package/dist/charts/core/index.js +54 -0
- package/dist/charts/core/indicators.d.ts +55 -0
- package/dist/charts/core/indicators.js +125 -0
- package/dist/charts/core/ink.d.ts +127 -0
- package/dist/charts/core/ink.js +178 -0
- package/dist/charts/core/legend.d.ts +23 -0
- package/dist/charts/core/legend.js +79 -0
- package/dist/charts/core/motion.d.ts +33 -0
- package/dist/charts/core/motion.js +81 -0
- package/dist/charts/core/palette.d.ts +38 -0
- package/dist/charts/core/palette.js +52 -0
- package/dist/charts/core/path.d.ts +40 -0
- package/dist/charts/core/path.js +141 -0
- package/dist/charts/core/pattern-defs.d.ts +15 -0
- package/dist/charts/core/pattern-defs.js +83 -0
- package/dist/charts/core/patterns.d.ts +49 -0
- package/dist/charts/core/patterns.js +93 -0
- package/dist/charts/core/plot-overlay.d.ts +36 -0
- package/dist/charts/core/plot-overlay.js +68 -0
- package/dist/charts/core/polar.d.ts +111 -0
- package/dist/charts/core/polar.js +173 -0
- package/dist/charts/core/sankey.d.ts +168 -0
- package/dist/charts/core/sankey.js +354 -0
- package/dist/charts/core/scales/band.d.ts +34 -0
- package/dist/charts/core/scales/band.js +58 -0
- package/dist/charts/core/scales/index.d.ts +4 -0
- package/dist/charts/core/scales/index.js +4 -0
- package/dist/charts/core/scales/linear.d.ts +27 -0
- package/dist/charts/core/scales/linear.js +73 -0
- package/dist/charts/core/scales/log.d.ts +8 -0
- package/dist/charts/core/scales/log.js +30 -0
- package/dist/charts/core/scales/time.d.ts +26 -0
- package/dist/charts/core/scales/time.js +98 -0
- package/dist/charts/core/shape-morph.d.ts +29 -0
- package/dist/charts/core/shape-morph.js +60 -0
- package/dist/charts/core/stack.d.ts +14 -0
- package/dist/charts/core/stack.js +27 -0
- package/dist/charts/core/time-range.d.ts +23 -0
- package/dist/charts/core/time-range.js +27 -0
- package/dist/charts/core/tooltip.d.ts +38 -0
- package/dist/charts/core/tooltip.js +83 -0
- package/dist/charts/core/tree-fit.d.ts +29 -0
- package/dist/charts/core/tree-fit.js +53 -0
- package/dist/charts/core/tree-layout.d.ts +85 -0
- package/dist/charts/core/tree-layout.js +237 -0
- package/dist/charts/core/tree-radial.d.ts +59 -0
- package/dist/charts/core/tree-radial.js +209 -0
- package/dist/charts/core/types.d.ts +106 -0
- package/dist/charts/core/types.js +18 -0
- package/dist/charts/core/unit-glyph.d.ts +40 -0
- package/dist/charts/core/unit-glyph.js +61 -0
- package/dist/charts/core/unit-icons.d.ts +132 -0
- package/dist/charts/core/unit-icons.js +157 -0
- package/dist/charts/core/units.d.ts +101 -0
- package/dist/charts/core/units.js +161 -0
- package/dist/charts/core/use-canvas.d.ts +24 -0
- package/dist/charts/core/use-canvas.js +50 -0
- package/dist/charts/core/use-chart-size.d.ts +19 -0
- package/dist/charts/core/use-chart-size.js +43 -0
- package/dist/charts/core/use-drill.d.ts +26 -0
- package/dist/charts/core/use-drill.js +67 -0
- package/dist/charts/core/use-index-navigation.d.ts +30 -0
- package/dist/charts/core/use-index-navigation.js +47 -0
- package/dist/charts/core/use-pan-zoom.d.ts +56 -0
- package/dist/charts/core/use-pan-zoom.js +163 -0
- package/dist/charts/core/use-series-state.d.ts +13 -0
- package/dist/charts/core/use-series-state.js +26 -0
- package/dist/charts/crossfilter/crossfilter-engine.d.ts +54 -0
- package/dist/charts/crossfilter/crossfilter-engine.js +125 -0
- package/dist/charts/crossfilter/crossfilter.d.ts +140 -0
- package/dist/charts/crossfilter/crossfilter.js +333 -0
- package/dist/charts/crossfilter/index.d.ts +2 -0
- package/dist/charts/crossfilter/index.js +2 -0
- package/dist/charts/donut-chart/center-fit.d.ts +14 -0
- package/dist/charts/donut-chart/center-fit.js +29 -0
- package/dist/charts/donut-chart/donut-chart.d.ts +73 -0
- package/dist/charts/donut-chart/donut-chart.js +639 -0
- package/dist/charts/donut-chart/index.d.ts +1 -0
- package/dist/charts/donut-chart/index.js +1 -0
- package/dist/charts/dumbbell-chart/dumbbell-chart.d.ts +68 -0
- package/dist/charts/dumbbell-chart/dumbbell-chart.js +585 -0
- package/dist/charts/dumbbell-chart/index.d.ts +1 -0
- package/dist/charts/dumbbell-chart/index.js +1 -0
- package/dist/charts/fill-gauge-chart/fill-gauge-chart.d.ts +42 -0
- package/dist/charts/fill-gauge-chart/fill-gauge-chart.js +259 -0
- package/dist/charts/fill-gauge-chart/index.d.ts +1 -0
- package/dist/charts/fill-gauge-chart/index.js +1 -0
- package/dist/charts/funnel-chart/funnel-chart.d.ts +48 -0
- package/dist/charts/funnel-chart/funnel-chart.js +423 -0
- package/dist/charts/funnel-chart/index.d.ts +1 -0
- package/dist/charts/funnel-chart/index.js +1 -0
- package/dist/charts/gantt-chart/gantt-chart.d.ts +120 -0
- package/dist/charts/gantt-chart/gantt-chart.js +1144 -0
- package/dist/charts/gantt-chart/gantt-export.d.ts +26 -0
- package/dist/charts/gantt-chart/gantt-export.js +103 -0
- package/dist/charts/gantt-chart/gantt-marks.d.ts +125 -0
- package/dist/charts/gantt-chart/gantt-marks.js +602 -0
- package/dist/charts/gantt-chart/index.d.ts +1 -0
- package/dist/charts/gantt-chart/index.js +1 -0
- package/dist/charts/gauge-chart/gauge-chart.d.ts +71 -0
- package/dist/charts/gauge-chart/gauge-chart.js +458 -0
- package/dist/charts/gauge-chart/index.d.ts +1 -0
- package/dist/charts/gauge-chart/index.js +1 -0
- package/dist/charts/globe-chart/globe-chart.d.ts +75 -0
- package/dist/charts/globe-chart/globe-chart.js +618 -0
- package/dist/charts/globe-chart/index.d.ts +1 -0
- package/dist/charts/globe-chart/index.js +1 -0
- package/dist/charts/heatmap-chart/calendar-heatmap.d.ts +47 -0
- package/dist/charts/heatmap-chart/calendar-heatmap.js +159 -0
- package/dist/charts/heatmap-chart/calendar-layout.d.ts +27 -0
- package/dist/charts/heatmap-chart/calendar-layout.js +47 -0
- package/dist/charts/heatmap-chart/datetime-columns.d.ts +8 -0
- package/dist/charts/heatmap-chart/datetime-columns.js +29 -0
- package/dist/charts/heatmap-chart/drilldown-heatmap.d.ts +33 -0
- package/dist/charts/heatmap-chart/drilldown-heatmap.js +58 -0
- package/dist/charts/heatmap-chart/heatmap-chart.d.ts +59 -0
- package/dist/charts/heatmap-chart/heatmap-chart.js +127 -0
- package/dist/charts/heatmap-chart/heatmap-grid.d.ts +75 -0
- package/dist/charts/heatmap-chart/heatmap-grid.js +494 -0
- package/dist/charts/heatmap-chart/heatmap-scale.d.ts +19 -0
- package/dist/charts/heatmap-chart/heatmap-scale.js +38 -0
- package/dist/charts/heatmap-chart/hex-layout.d.ts +35 -0
- package/dist/charts/heatmap-chart/hex-layout.js +58 -0
- package/dist/charts/heatmap-chart/index.d.ts +9 -0
- package/dist/charts/heatmap-chart/index.js +12 -0
- package/dist/charts/hex-tile-map/hex-layout.d.ts +40 -0
- package/dist/charts/hex-tile-map/hex-layout.js +96 -0
- package/dist/charts/hex-tile-map/hex-tile-map.d.ts +41 -0
- package/dist/charts/hex-tile-map/hex-tile-map.js +307 -0
- package/dist/charts/hex-tile-map/index.d.ts +2 -0
- package/dist/charts/hex-tile-map/index.js +2 -0
- package/dist/charts/hierarchy-morph/hierarchy-morph.d.ts +47 -0
- package/dist/charts/hierarchy-morph/hierarchy-morph.js +355 -0
- package/dist/charts/hierarchy-morph/index.d.ts +1 -0
- package/dist/charts/hierarchy-morph/index.js +1 -0
- package/dist/charts/histogram/histogram.d.ts +55 -0
- package/dist/charts/histogram/histogram.js +444 -0
- package/dist/charts/histogram/index.d.ts +1 -0
- package/dist/charts/histogram/index.js +1 -0
- package/dist/charts/icicle-chart/icicle-chart.d.ts +41 -0
- package/dist/charts/icicle-chart/icicle-chart.js +360 -0
- package/dist/charts/icicle-chart/index.d.ts +1 -0
- package/dist/charts/icicle-chart/index.js +1 -0
- package/dist/charts/index.d.ts +50 -0
- package/dist/charts/index.js +50 -0
- package/dist/charts/isotype-rows/index.d.ts +1 -0
- package/dist/charts/isotype-rows/index.js +1 -0
- package/dist/charts/isotype-rows/isotype-rows.d.ts +42 -0
- package/dist/charts/isotype-rows/isotype-rows.js +274 -0
- package/dist/charts/line-chart/index.d.ts +2 -0
- package/dist/charts/line-chart/index.js +2 -0
- package/dist/charts/line-chart/line-chart.d.ts +15 -0
- package/dist/charts/line-chart/line-chart.js +19 -0
- package/dist/charts/line-chart/line-drilldown.d.ts +18 -0
- package/dist/charts/line-chart/line-drilldown.js +51 -0
- package/dist/charts/lollipop-chart/index.d.ts +1 -0
- package/dist/charts/lollipop-chart/index.js +1 -0
- package/dist/charts/lollipop-chart/lollipop-chart.d.ts +45 -0
- package/dist/charts/lollipop-chart/lollipop-chart.js +325 -0
- package/dist/charts/maps/data/peru/index.d.ts +2 -0
- package/dist/charts/maps/data/peru/index.js +4 -0
- package/dist/charts/maps/data/world/index.d.ts +2 -0
- package/dist/charts/maps/data/world/index.js +4 -0
- package/dist/charts/maps/geo/build-topology.d.ts +20 -0
- package/dist/charts/maps/geo/build-topology.js +175 -0
- package/dist/charts/maps/geo/cluster.d.ts +22 -0
- package/dist/charts/maps/geo/cluster.js +58 -0
- package/dist/charts/maps/geo/geo-path.d.ts +20 -0
- package/dist/charts/maps/geo/geo-path.js +132 -0
- package/dist/charts/maps/geo/globe.d.ts +72 -0
- package/dist/charts/maps/geo/globe.js +223 -0
- package/dist/charts/maps/geo/index.d.ts +7 -0
- package/dist/charts/maps/geo/index.js +7 -0
- package/dist/charts/maps/geo/map-data-table.d.ts +25 -0
- package/dist/charts/maps/geo/map-data-table.js +99 -0
- package/dist/charts/maps/geo/map-labels.d.ts +33 -0
- package/dist/charts/maps/geo/map-labels.js +30 -0
- package/dist/charts/maps/geo/map-legend.d.ts +19 -0
- package/dist/charts/maps/geo/map-legend.js +70 -0
- package/dist/charts/maps/geo/map-viewport.d.ts +69 -0
- package/dist/charts/maps/geo/map-viewport.js +326 -0
- package/dist/charts/maps/geo/match.d.ts +9 -0
- package/dist/charts/maps/geo/match.js +12 -0
- package/dist/charts/maps/geo/projection.d.ts +47 -0
- package/dist/charts/maps/geo/projection.js +118 -0
- package/dist/charts/maps/geo/pure.d.ts +11 -0
- package/dist/charts/maps/geo/pure.js +11 -0
- package/dist/charts/maps/geo/routes.d.ts +19 -0
- package/dist/charts/maps/geo/routes.js +63 -0
- package/dist/charts/maps/geo/simplify.d.ts +11 -0
- package/dist/charts/maps/geo/simplify.js +49 -0
- package/dist/charts/maps/geo/topojson.d.ts +18 -0
- package/dist/charts/maps/geo/topojson.js +74 -0
- package/dist/charts/maps/geo/types.d.ts +54 -0
- package/dist/charts/maps/geo/types.js +0 -0
- package/dist/charts/maps/geo/use-map-geometry.d.ts +31 -0
- package/dist/charts/maps/geo/use-map-geometry.js +100 -0
- package/dist/charts/maps/geo/use-map-view.d.ts +44 -0
- package/dist/charts/maps/geo/use-map-view.js +199 -0
- package/dist/charts/maps/geo/view.d.ts +30 -0
- package/dist/charts/maps/geo/view.js +55 -0
- package/dist/charts/maps/index.d.ts +1 -0
- package/dist/charts/maps/index.js +1 -0
- package/dist/charts/parliament-chart/index.d.ts +1 -0
- package/dist/charts/parliament-chart/index.js +1 -0
- package/dist/charts/parliament-chart/parliament-chart.d.ts +40 -0
- package/dist/charts/parliament-chart/parliament-chart.js +325 -0
- package/dist/charts/pictogram-chart/index.d.ts +1 -0
- package/dist/charts/pictogram-chart/index.js +1 -0
- package/dist/charts/pictogram-chart/pictogram-chart.d.ts +43 -0
- package/dist/charts/pictogram-chart/pictogram-chart.js +319 -0
- package/dist/charts/pie-chart/index.d.ts +1 -0
- package/dist/charts/pie-chart/index.js +1 -0
- package/dist/charts/pie-chart/pie-chart.d.ts +7 -0
- package/dist/charts/pie-chart/pie-chart.js +9 -0
- package/dist/charts/polar-area-chart/index.d.ts +1 -0
- package/dist/charts/polar-area-chart/index.js +1 -0
- package/dist/charts/polar-area-chart/polar-area-chart.d.ts +46 -0
- package/dist/charts/polar-area-chart/polar-area-chart.js +389 -0
- package/dist/charts/progress-units/index.d.ts +1 -0
- package/dist/charts/progress-units/index.js +1 -0
- package/dist/charts/progress-units/progress-units.d.ts +39 -0
- package/dist/charts/progress-units/progress-units.js +154 -0
- package/dist/charts/radar-chart/index.d.ts +1 -0
- package/dist/charts/radar-chart/index.js +1 -0
- package/dist/charts/radar-chart/radar-chart.d.ts +44 -0
- package/dist/charts/radar-chart/radar-chart.js +434 -0
- package/dist/charts/radial-bar-chart/index.d.ts +1 -0
- package/dist/charts/radial-bar-chart/index.js +1 -0
- package/dist/charts/radial-bar-chart/radial-bar-chart.d.ts +53 -0
- package/dist/charts/radial-bar-chart/radial-bar-chart.js +430 -0
- package/dist/charts/raincloud-chart/index.d.ts +1 -0
- package/dist/charts/raincloud-chart/index.js +1 -0
- package/dist/charts/raincloud-chart/raincloud-chart.d.ts +39 -0
- package/dist/charts/raincloud-chart/raincloud-chart.js +363 -0
- package/dist/charts/range-area-chart/index.d.ts +1 -0
- package/dist/charts/range-area-chart/index.js +1 -0
- package/dist/charts/range-area-chart/range-area-chart.d.ts +52 -0
- package/dist/charts/range-area-chart/range-area-chart.js +414 -0
- package/dist/charts/sankey-chart/alluvial-chart.d.ts +11 -0
- package/dist/charts/sankey-chart/alluvial-chart.js +45 -0
- package/dist/charts/sankey-chart/index.d.ts +2 -0
- package/dist/charts/sankey-chart/index.js +2 -0
- package/dist/charts/sankey-chart/sankey-chart.d.ts +91 -0
- package/dist/charts/sankey-chart/sankey-chart.js +868 -0
- package/dist/charts/scatter-chart/index.d.ts +1 -0
- package/dist/charts/scatter-chart/index.js +1 -0
- package/dist/charts/scatter-chart/scatter-chart.d.ts +7 -0
- package/dist/charts/scatter-chart/scatter-chart.js +9 -0
- package/dist/charts/slope-chart/index.d.ts +2 -0
- package/dist/charts/slope-chart/index.js +2 -0
- package/dist/charts/slope-chart/label-layout.d.ts +10 -0
- package/dist/charts/slope-chart/label-layout.js +35 -0
- package/dist/charts/slope-chart/slope-chart.d.ts +43 -0
- package/dist/charts/slope-chart/slope-chart.js +421 -0
- package/dist/charts/sparkline/index.d.ts +1 -0
- package/dist/charts/sparkline/index.js +1 -0
- package/dist/charts/sparkline/sparkline.d.ts +30 -0
- package/dist/charts/sparkline/sparkline.js +227 -0
- package/dist/charts/stock-chart/index.d.ts +1 -0
- package/dist/charts/stock-chart/index.js +1 -0
- package/dist/charts/stock-chart/stock-chart.d.ts +103 -0
- package/dist/charts/stock-chart/stock-chart.js +552 -0
- package/dist/charts/stock-chart/stock-drawing-layer.d.ts +66 -0
- package/dist/charts/stock-chart/stock-drawing-layer.js +338 -0
- package/dist/charts/stock-chart/stock-drawings.d.ts +68 -0
- package/dist/charts/stock-chart/stock-drawings.js +74 -0
- package/dist/charts/stock-chart/stock-model.d.ts +87 -0
- package/dist/charts/stock-chart/stock-model.js +83 -0
- package/dist/charts/stock-chart/stock-plot.d.ts +84 -0
- package/dist/charts/stock-chart/stock-plot.js +1005 -0
- package/dist/charts/stock-chart/stock-stats.d.ts +49 -0
- package/dist/charts/stock-chart/stock-stats.js +68 -0
- package/dist/charts/stock-chart/stock-transforms.d.ts +19 -0
- package/dist/charts/stock-chart/stock-transforms.js +72 -0
- package/dist/charts/stock-chart/use-stock-stream.d.ts +16 -0
- package/dist/charts/stock-chart/use-stock-stream.js +16 -0
- package/dist/charts/stream-graph/index.d.ts +2 -0
- package/dist/charts/stream-graph/index.js +2 -0
- package/dist/charts/stream-graph/stream-graph.d.ts +38 -0
- package/dist/charts/stream-graph/stream-graph.js +415 -0
- package/dist/charts/stream-graph/stream-layout.d.ts +34 -0
- package/dist/charts/stream-graph/stream-layout.js +89 -0
- package/dist/charts/sunburst-chart/index.d.ts +1 -0
- package/dist/charts/sunburst-chart/index.js +1 -0
- package/dist/charts/sunburst-chart/sunburst-chart.d.ts +44 -0
- package/dist/charts/sunburst-chart/sunburst-chart.js +437 -0
- package/dist/charts/timeline-chart/index.d.ts +2 -0
- package/dist/charts/timeline-chart/index.js +2 -0
- package/dist/charts/timeline-chart/timeline-chart.d.ts +70 -0
- package/dist/charts/timeline-chart/timeline-chart.js +524 -0
- package/dist/charts/timeline-chart/timeline-lanes.d.ts +43 -0
- package/dist/charts/timeline-chart/timeline-lanes.js +65 -0
- package/dist/charts/tree-chart/index.d.ts +3 -0
- package/dist/charts/tree-chart/index.js +3 -0
- package/dist/charts/tree-chart/tree-card.d.ts +37 -0
- package/dist/charts/tree-chart/tree-card.js +94 -0
- package/dist/charts/tree-chart/tree-chart.d.ts +118 -0
- package/dist/charts/tree-chart/tree-chart.js +850 -0
- package/dist/charts/tree-chart/tree-model.d.ts +87 -0
- package/dist/charts/tree-chart/tree-model.js +116 -0
- package/dist/charts/tree-chart/use-tree-transition.d.ts +16 -0
- package/dist/charts/tree-chart/use-tree-transition.js +84 -0
- package/dist/charts/treemap-chart/index.d.ts +1 -0
- package/dist/charts/treemap-chart/index.js +1 -0
- package/dist/charts/treemap-chart/treemap-chart.d.ts +44 -0
- package/dist/charts/treemap-chart/treemap-chart.js +347 -0
- package/dist/charts/violin-chart/index.d.ts +1 -0
- package/dist/charts/violin-chart/index.js +1 -0
- package/dist/charts/violin-chart/violin-chart.d.ts +53 -0
- package/dist/charts/violin-chart/violin-chart.js +406 -0
- package/dist/charts/waffle-chart/index.d.ts +1 -0
- package/dist/charts/waffle-chart/index.js +1 -0
- package/dist/charts/waffle-chart/waffle-chart.d.ts +40 -0
- package/dist/charts/waffle-chart/waffle-chart.js +273 -0
- package/dist/charts/waterfall-chart/index.d.ts +2 -0
- package/dist/charts/waterfall-chart/index.js +2 -0
- package/dist/charts/waterfall-chart/waterfall-chart.d.ts +38 -0
- package/dist/charts/waterfall-chart/waterfall-chart.js +531 -0
- package/dist/charts/waterfall-chart/waterfall-layout.d.ts +51 -0
- package/dist/charts/waterfall-chart/waterfall-layout.js +54 -0
- package/dist/containers/action-bar/action-bar.d.ts +18 -0
- package/dist/containers/action-bar/action-bar.js +63 -0
- package/dist/containers/action-bar/index.d.ts +1 -0
- package/dist/containers/action-bar/index.js +4 -0
- package/dist/containers/banner/banner.d.ts +10 -0
- package/dist/containers/banner/banner.js +49 -0
- package/dist/containers/banner/index.d.ts +1 -0
- package/dist/containers/banner/index.js +1 -0
- package/dist/containers/card/card.d.ts +6 -0
- package/dist/containers/card/card.js +47 -0
- package/dist/containers/card/index.d.ts +1 -0
- package/dist/containers/card/index.js +1 -0
- package/dist/containers/carousel/carousel.d.ts +19 -0
- package/dist/containers/carousel/carousel.js +178 -0
- package/dist/containers/carousel/index.d.ts +2 -0
- package/dist/containers/carousel/index.js +7 -0
- package/dist/containers/carousel/model.d.ts +4 -0
- package/dist/containers/carousel/model.js +22 -0
- package/dist/containers/cell/cell.d.ts +44 -0
- package/dist/containers/cell/cell.js +83 -0
- package/dist/containers/cell/index.d.ts +1 -0
- package/dist/containers/cell/index.js +6 -0
- package/dist/containers/cols/cols.d.ts +15 -0
- package/dist/containers/cols/cols.js +46 -0
- package/dist/containers/cols/index.d.ts +1 -0
- package/dist/containers/cols/index.js +1 -0
- package/dist/containers/comment/comment.d.ts +14 -0
- package/dist/containers/comment/comment.js +44 -0
- package/dist/containers/comment/index.d.ts +1 -0
- package/dist/containers/comment/index.js +1 -0
- package/dist/containers/data-grid/chart-panel.d.ts +24 -0
- package/dist/containers/data-grid/chart-panel.js +114 -0
- package/dist/containers/data-grid/chart-range.d.ts +46 -0
- package/dist/containers/data-grid/chart-range.js +73 -0
- package/dist/containers/data-grid/column-groups.d.ts +15 -0
- package/dist/containers/data-grid/column-groups.js +29 -0
- package/dist/containers/data-grid/column-menu.d.ts +28 -0
- package/dist/containers/data-grid/column-menu.js +361 -0
- package/dist/containers/data-grid/data-grid.d.ts +199 -0
- package/dist/containers/data-grid/data-grid.demos.d.ts +15 -0
- package/dist/containers/data-grid/data-grid.demos.js +578 -0
- package/dist/containers/data-grid/data-grid.fixtures.d.ts +61 -0
- package/dist/containers/data-grid/data-grid.fixtures.js +316 -0
- package/dist/containers/data-grid/data-grid.js +2850 -0
- package/dist/containers/data-grid/data-grid.samples.d.ts +81 -0
- package/dist/containers/data-grid/data-grid.samples.js +345 -0
- package/dist/containers/data-grid/data-source.d.ts +56 -0
- package/dist/containers/data-grid/data-source.js +90 -0
- package/dist/containers/data-grid/fill-series.d.ts +97 -0
- package/dist/containers/data-grid/fill-series.js +168 -0
- package/dist/containers/data-grid/filter-builder-editor.d.ts +18 -0
- package/dist/containers/data-grid/filter-builder-editor.js +207 -0
- package/dist/containers/data-grid/filter-builder.d.ts +47 -0
- package/dist/containers/data-grid/filter-builder.js +227 -0
- package/dist/containers/data-grid/formula-bar.d.ts +18 -0
- package/dist/containers/data-grid/formula-bar.js +68 -0
- package/dist/containers/data-grid/formula-sheet.d.ts +48 -0
- package/dist/containers/data-grid/formula-sheet.js +175 -0
- package/dist/containers/data-grid/formula.d.ts +86 -0
- package/dist/containers/data-grid/formula.js +580 -0
- package/dist/containers/data-grid/grid-edit.d.ts +52 -0
- package/dist/containers/data-grid/grid-edit.js +99 -0
- package/dist/containers/data-grid/grid-toolbar.d.ts +53 -0
- package/dist/containers/data-grid/grid-toolbar.js +266 -0
- package/dist/containers/data-grid/history.d.ts +61 -0
- package/dist/containers/data-grid/history.js +84 -0
- package/dist/containers/data-grid/index.d.ts +18 -0
- package/dist/containers/data-grid/index.js +18 -0
- package/dist/containers/data-grid/labels.d.ts +141 -0
- package/dist/containers/data-grid/labels.js +157 -0
- package/dist/containers/data-grid/model.d.ts +93 -0
- package/dist/containers/data-grid/model.js +481 -0
- package/dist/containers/data-grid/pivot.d.ts +36 -0
- package/dist/containers/data-grid/pivot.js +126 -0
- package/dist/containers/data-grid/range.d.ts +41 -0
- package/dist/containers/data-grid/range.js +78 -0
- package/dist/containers/data-grid/rows.d.ts +26 -0
- package/dist/containers/data-grid/rows.js +67 -0
- package/dist/containers/data-grid/spreadsheet.demos.d.ts +75 -0
- package/dist/containers/data-grid/spreadsheet.demos.js +423 -0
- package/dist/containers/data-grid/tool-panel.d.ts +31 -0
- package/dist/containers/data-grid/tool-panel.js +222 -0
- package/dist/containers/data-grid/tree.d.ts +25 -0
- package/dist/containers/data-grid/tree.js +65 -0
- package/dist/containers/data-grid/types.d.ts +154 -0
- package/dist/containers/data-grid/types.js +0 -0
- package/dist/containers/data-grid/use-data-source.d.ts +31 -0
- package/dist/containers/data-grid/use-data-source.js +77 -0
- package/dist/containers/data-grid/use-grid-layout.d.ts +25 -0
- package/dist/containers/data-grid/use-grid-layout.js +99 -0
- package/dist/containers/data-grid/virtual.d.ts +53 -0
- package/dist/containers/data-grid/virtual.js +90 -0
- package/dist/containers/data-grid/xlsx-export.d.ts +9 -0
- package/dist/containers/data-grid/xlsx-export.js +39 -0
- package/dist/containers/description-list/description-list.d.ts +8 -0
- package/dist/containers/description-list/description-list.js +19 -0
- package/dist/containers/description-list/index.d.ts +1 -0
- package/dist/containers/description-list/index.js +1 -0
- package/dist/containers/facts/facts.d.ts +8 -0
- package/dist/containers/facts/facts.js +20 -0
- package/dist/containers/facts/index.d.ts +1 -0
- package/dist/containers/facts/index.js +1 -0
- package/dist/containers/file-tree/file-tree.d.ts +18 -0
- package/dist/containers/file-tree/file-tree.js +154 -0
- package/dist/containers/file-tree/index.d.ts +2 -0
- package/dist/containers/file-tree/index.js +16 -0
- package/dist/containers/file-tree/model.d.ts +37 -0
- package/dist/containers/file-tree/model.js +83 -0
- package/dist/containers/generic-row/generic-row.d.ts +16 -0
- package/dist/containers/generic-row/generic-row.js +29 -0
- package/dist/containers/generic-row/index.d.ts +1 -0
- package/dist/containers/generic-row/index.js +1 -0
- package/dist/containers/hbars/hbars.d.ts +57 -0
- package/dist/containers/hbars/hbars.js +124 -0
- package/dist/containers/hbars/index.d.ts +1 -0
- package/dist/containers/hbars/index.js +1 -0
- package/dist/containers/highlight-line/highlight-line.d.ts +7 -0
- package/dist/containers/highlight-line/highlight-line.js +14 -0
- package/dist/containers/highlight-line/index.d.ts +1 -0
- package/dist/containers/highlight-line/index.js +1 -0
- package/dist/containers/index.d.ts +26 -0
- package/dist/containers/index.js +26 -0
- package/dist/containers/item-card-group/index.d.ts +1 -0
- package/dist/containers/item-card-group/index.js +6 -0
- package/dist/containers/item-card-group/item-card-group.d.ts +22 -0
- package/dist/containers/item-card-group/item-card-group.js +66 -0
- package/dist/containers/kanban/index.d.ts +2 -0
- package/dist/containers/kanban/index.js +16 -0
- package/dist/containers/kanban/kanban.d.ts +22 -0
- package/dist/containers/kanban/kanban.js +329 -0
- package/dist/containers/kanban/model.d.ts +49 -0
- package/dist/containers/kanban/model.js +77 -0
- package/dist/containers/kpi/index.d.ts +1 -0
- package/dist/containers/kpi/index.js +1 -0
- package/dist/containers/kpi/kpi.d.ts +15 -0
- package/dist/containers/kpi/kpi.js +40 -0
- package/dist/containers/kpi-group/index.d.ts +1 -0
- package/dist/containers/kpi-group/index.js +4 -0
- package/dist/containers/kpi-group/kpi-group.d.ts +25 -0
- package/dist/containers/kpi-group/kpi-group.js +40 -0
- package/dist/containers/page-header/index.d.ts +1 -0
- package/dist/containers/page-header/index.js +1 -0
- package/dist/containers/page-header/page-header.d.ts +17 -0
- package/dist/containers/page-header/page-header.js +42 -0
- package/dist/containers/resizable/index.d.ts +2 -0
- package/dist/containers/resizable/index.js +14 -0
- package/dist/containers/resizable/model.d.ts +18 -0
- package/dist/containers/resizable/model.js +62 -0
- package/dist/containers/resizable/resizable.d.ts +27 -0
- package/dist/containers/resizable/resizable.js +234 -0
- package/dist/containers/scrolly/index.d.ts +2 -0
- package/dist/containers/scrolly/index.js +9 -0
- package/dist/containers/scrolly/scrolly-logic.d.ts +16 -0
- package/dist/containers/scrolly/scrolly-logic.js +29 -0
- package/dist/containers/scrolly/scrolly.d.ts +45 -0
- package/dist/containers/scrolly/scrolly.js +154 -0
- package/dist/containers/settings-layout/index.d.ts +1 -0
- package/dist/containers/settings-layout/index.js +1 -0
- package/dist/containers/settings-layout/settings-layout.d.ts +21 -0
- package/dist/containers/settings-layout/settings-layout.js +71 -0
- package/dist/containers/settings-row/index.d.ts +1 -0
- package/dist/containers/settings-row/index.js +1 -0
- package/dist/containers/settings-row/settings-row.d.ts +10 -0
- package/dist/containers/settings-row/settings-row.js +31 -0
- package/dist/containers/table/index.d.ts +1 -0
- package/dist/containers/table/index.js +1 -0
- package/dist/containers/table/pin.d.ts +33 -0
- package/dist/containers/table/pin.js +56 -0
- package/dist/containers/table/table.d.ts +60 -0
- package/dist/containers/table/table.js +325 -0
- package/dist/containers/timeline/index.d.ts +1 -0
- package/dist/containers/timeline/index.js +6 -0
- package/dist/containers/timeline/timeline.d.ts +25 -0
- package/dist/containers/timeline/timeline.js +56 -0
- package/dist/containers/toolbar/index.d.ts +1 -0
- package/dist/containers/toolbar/index.js +1 -0
- package/dist/containers/toolbar/toolbar.d.ts +7 -0
- package/dist/containers/toolbar/toolbar.js +18 -0
- package/dist/dashboards/data.d.ts +29 -0
- package/dist/dashboards/data.js +42 -0
- package/dist/dashboards/inicio-dashboard.d.ts +1 -0
- package/dist/dashboards/inicio-dashboard.js +200 -0
- package/dist/dashboards/layout.d.ts +33 -0
- package/dist/dashboards/layout.js +55 -0
- package/dist/forms/accent-picker/accent-picker.d.ts +20 -0
- package/dist/forms/accent-picker/accent-picker.js +51 -0
- package/dist/forms/accent-picker/index.d.ts +1 -0
- package/dist/forms/accent-picker/index.js +6 -0
- package/dist/forms/checkbox-button-group/checkbox-button-group.d.ts +16 -0
- package/dist/forms/checkbox-button-group/checkbox-button-group.js +52 -0
- package/dist/forms/checkbox-button-group/index.d.ts +1 -0
- package/dist/forms/checkbox-button-group/index.js +6 -0
- package/dist/forms/dropzone/dropzone.d.ts +19 -0
- package/dist/forms/dropzone/dropzone.js +103 -0
- package/dist/forms/dropzone/index.d.ts +1 -0
- package/dist/forms/dropzone/index.js +6 -0
- package/dist/forms/emoji-picker/emoji-data.d.ts +14 -0
- package/dist/forms/emoji-picker/emoji-data.js +160 -0
- package/dist/forms/emoji-picker/emoji-picker.d.ts +16 -0
- package/dist/forms/emoji-picker/emoji-picker.js +124 -0
- package/dist/forms/emoji-picker/index.d.ts +3 -0
- package/dist/forms/emoji-picker/index.js +9 -0
- package/dist/forms/emoji-picker/model.d.ts +8 -0
- package/dist/forms/emoji-picker/model.js +44 -0
- package/dist/forms/emoji-reaction-button/emoji-reaction-button.d.ts +28 -0
- package/dist/forms/emoji-reaction-button/emoji-reaction-button.js +95 -0
- package/dist/forms/emoji-reaction-button/index.d.ts +1 -0
- package/dist/forms/emoji-reaction-button/index.js +8 -0
- package/dist/forms/field/field.d.ts +16 -0
- package/dist/forms/field/field.js +26 -0
- package/dist/forms/field/index.d.ts +1 -0
- package/dist/forms/field/index.js +4 -0
- package/dist/forms/form-grid/form-grid.d.ts +7 -0
- package/dist/forms/form-grid/form-grid.js +17 -0
- package/dist/forms/form-grid/index.d.ts +1 -0
- package/dist/forms/form-grid/index.js +4 -0
- package/dist/forms/index.d.ts +20 -0
- package/dist/forms/index.js +20 -0
- package/dist/forms/inline-select/index.d.ts +1 -0
- package/dist/forms/inline-select/index.js +6 -0
- package/dist/forms/inline-select/inline-select.d.ts +14 -0
- package/dist/forms/inline-select/inline-select.js +28 -0
- package/dist/forms/input/index.d.ts +1 -0
- package/dist/forms/input/index.js +4 -0
- package/dist/forms/input/input.d.ts +4 -0
- package/dist/forms/input/input.js +17 -0
- package/dist/forms/input-icon/index.d.ts +1 -0
- package/dist/forms/input-icon/index.js +4 -0
- package/dist/forms/input-icon/input-icon.d.ts +7 -0
- package/dist/forms/input-icon/input-icon.js +19 -0
- package/dist/forms/internal/button-option.d.ts +18 -0
- package/dist/forms/internal/button-option.js +29 -0
- package/dist/forms/label/index.d.ts +1 -0
- package/dist/forms/label/index.js +4 -0
- package/dist/forms/label/label.d.ts +4 -0
- package/dist/forms/label/label.js +11 -0
- package/dist/forms/native-select/index.d.ts +1 -0
- package/dist/forms/native-select/index.js +6 -0
- package/dist/forms/native-select/native-select.d.ts +23 -0
- package/dist/forms/native-select/native-select.js +52 -0
- package/dist/forms/number-stepper/index.d.ts +1 -0
- package/dist/forms/number-stepper/index.js +4 -0
- package/dist/forms/number-stepper/number-stepper.d.ts +17 -0
- package/dist/forms/number-stepper/number-stepper.js +108 -0
- package/dist/forms/pin-input/index.d.ts +1 -0
- package/dist/forms/pin-input/index.js +4 -0
- package/dist/forms/pin-input/pin-input.d.ts +16 -0
- package/dist/forms/pin-input/pin-input.js +61 -0
- package/dist/forms/radio-button-group/index.d.ts +1 -0
- package/dist/forms/radio-button-group/index.js +6 -0
- package/dist/forms/radio-button-group/radio-button-group.d.ts +19 -0
- package/dist/forms/radio-button-group/radio-button-group.js +52 -0
- package/dist/forms/rating/index.d.ts +2 -0
- package/dist/forms/rating/index.js +9 -0
- package/dist/forms/rating/model.d.ts +8 -0
- package/dist/forms/rating/model.js +37 -0
- package/dist/forms/rating/rating.d.ts +20 -0
- package/dist/forms/rating/rating.js +114 -0
- package/dist/forms/select/index.d.ts +1 -0
- package/dist/forms/select/index.js +4 -0
- package/dist/forms/select/select.d.ts +8 -0
- package/dist/forms/select/select.js +28 -0
- package/dist/forms/slider/index.d.ts +2 -0
- package/dist/forms/slider/index.js +22 -0
- package/dist/forms/slider/model.d.ts +16 -0
- package/dist/forms/slider/model.js +65 -0
- package/dist/forms/slider/slider.d.ts +43 -0
- package/dist/forms/slider/slider.js +180 -0
- package/dist/forms/textarea/index.d.ts +1 -0
- package/dist/forms/textarea/index.js +4 -0
- package/dist/forms/textarea/textarea.d.ts +4 -0
- package/dist/forms/textarea/textarea.js +17 -0
- package/dist/forms/time-input/index.d.ts +1 -0
- package/dist/forms/time-input/index.js +4 -0
- package/dist/forms/time-input/time-input.d.ts +15 -0
- package/dist/forms/time-input/time-input.js +87 -0
- package/dist/navigation/floating-toc/floating-toc.d.ts +21 -0
- package/dist/navigation/floating-toc/floating-toc.js +86 -0
- package/dist/navigation/floating-toc/index.d.ts +2 -0
- package/dist/navigation/floating-toc/index.js +6 -0
- package/dist/navigation/floating-toc/model.d.ts +13 -0
- package/dist/navigation/floating-toc/model.js +9 -0
- package/dist/navigation/index.d.ts +4 -0
- package/dist/navigation/index.js +4 -0
- package/dist/navigation/segmented/index.d.ts +1 -0
- package/dist/navigation/segmented/index.js +8 -0
- package/dist/navigation/segmented/segmented.d.ts +9 -0
- package/dist/navigation/segmented/segmented.js +33 -0
- package/dist/navigation/stepper/index.d.ts +1 -0
- package/dist/navigation/stepper/index.js +4 -0
- package/dist/navigation/stepper/stepper.d.ts +11 -0
- package/dist/navigation/stepper/stepper.js +58 -0
- package/dist/navigation/tabs/index.d.ts +1 -0
- package/dist/navigation/tabs/index.js +12 -0
- package/dist/navigation/tabs/tabs.d.ts +20 -0
- package/dist/navigation/tabs/tabs.js +44 -0
- package/dist/overlays/context-menu/context-menu.d.ts +40 -0
- package/dist/overlays/context-menu/context-menu.js +201 -0
- package/dist/overlays/context-menu/index.d.ts +1 -0
- package/dist/overlays/context-menu/index.js +20 -0
- package/dist/overlays/dialog/dialog.d.ts +27 -0
- package/dist/overlays/dialog/dialog.js +128 -0
- package/dist/overlays/dialog/index.d.ts +1 -0
- package/dist/overlays/dialog/index.js +20 -0
- package/dist/overlays/drawer/drawer.d.ts +18 -0
- package/dist/overlays/drawer/drawer.js +82 -0
- package/dist/overlays/drawer/index.d.ts +1 -0
- package/dist/overlays/drawer/index.js +14 -0
- package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +19 -0
- package/dist/overlays/dropdown-menu/dropdown-menu.js +72 -0
- package/dist/overlays/dropdown-menu/index.d.ts +1 -0
- package/dist/overlays/dropdown-menu/index.js +20 -0
- package/dist/overlays/focus-return/focus-return.d.ts +30 -0
- package/dist/overlays/focus-return/focus-return.js +36 -0
- package/dist/overlays/focus-return/index.d.ts +1 -0
- package/dist/overlays/focus-return/index.js +12 -0
- package/dist/overlays/hover-card/hover-card.d.ts +28 -0
- package/dist/overlays/hover-card/hover-card.js +133 -0
- package/dist/overlays/hover-card/index.d.ts +1 -0
- package/dist/overlays/hover-card/index.js +10 -0
- package/dist/overlays/index.d.ts +8 -0
- package/dist/overlays/index.js +8 -0
- package/dist/overlays/popover/index.d.ts +1 -0
- package/dist/overlays/popover/index.js +14 -0
- package/dist/overlays/popover/popover.d.ts +10 -0
- package/dist/overlays/popover/popover.js +34 -0
- package/dist/overlays/toaster/index.d.ts +1 -0
- package/dist/overlays/toaster/index.js +5 -0
- package/dist/overlays/toaster/toaster.d.ts +10 -0
- package/dist/overlays/toaster/toaster.js +30 -0
- package/dist/palette/command-palette/command-palette.d.ts +32 -0
- package/dist/palette/command-palette/command-palette.js +95 -0
- package/dist/palette/command-palette/index.d.ts +1 -0
- package/dist/palette/command-palette/index.js +6 -0
- package/dist/palette/index.d.ts +1 -0
- package/dist/palette/index.js +1 -0
- package/dist/rich-text/index.d.ts +2 -0
- package/dist/rich-text/index.js +14 -0
- package/dist/rich-text/rich-text-editor.d.ts +31 -0
- package/dist/rich-text/rich-text-editor.js +364 -0
- package/dist/rich-text/sanitize.d.ts +17 -0
- package/dist/rich-text/sanitize.js +215 -0
- package/dist/shell/app-shell/app-shell.d.ts +24 -0
- package/dist/shell/app-shell/app-shell.js +42 -0
- package/dist/shell/app-shell/index.d.ts +1 -0
- package/dist/shell/app-shell/index.js +10 -0
- package/dist/shell/index.d.ts +3 -0
- package/dist/shell/index.js +3 -0
- package/dist/shell/sidebar/index.d.ts +1 -0
- package/dist/shell/sidebar/index.js +6 -0
- package/dist/shell/sidebar/sidebar.d.ts +48 -0
- package/dist/shell/sidebar/sidebar.js +110 -0
- package/dist/shell/topbar/index.d.ts +1 -0
- package/dist/shell/topbar/index.js +4 -0
- package/dist/shell/topbar/topbar.d.ts +22 -0
- package/dist/shell/topbar/topbar.js +93 -0
- package/dist/showcase/analytics-bento.d.ts +2 -0
- package/dist/showcase/analytics-bento.js +336 -0
- package/dist/showcase/bento.d.ts +43 -0
- package/dist/showcase/bento.js +131 -0
- package/dist/showcase/controls-bento.d.ts +2 -0
- package/dist/showcase/controls-bento.js +264 -0
- package/dist/showcase/dataviz-bento.d.ts +2 -0
- package/dist/showcase/dataviz-bento.js +444 -0
- package/dist/showcase/kit-tiles.d.ts +15 -0
- package/dist/showcase/kit-tiles.js +192 -0
- package/dist/showcase/operations-bento.d.ts +2 -0
- package/dist/showcase/operations-bento.js +450 -0
- package/dist/showcase/shell.d.ts +8 -0
- package/dist/showcase/shell.js +115 -0
- package/dist/states/empty-state/empty-state.d.ts +11 -0
- package/dist/states/empty-state/empty-state.js +22 -0
- package/dist/states/empty-state/index.d.ts +1 -0
- package/dist/states/empty-state/index.js +1 -0
- package/dist/states/error-state/error-state.d.ts +12 -0
- package/dist/states/error-state/error-state.js +42 -0
- package/dist/states/error-state/index.d.ts +1 -0
- package/dist/states/error-state/index.js +1 -0
- package/dist/states/forbidden-state/forbidden-state.d.ts +8 -0
- package/dist/states/forbidden-state/forbidden-state.js +21 -0
- package/dist/states/forbidden-state/index.d.ts +1 -0
- package/dist/states/forbidden-state/index.js +1 -0
- package/dist/states/index.d.ts +5 -0
- package/dist/states/index.js +5 -0
- package/dist/states/offline-banner/index.d.ts +1 -0
- package/dist/states/offline-banner/index.js +1 -0
- package/dist/states/offline-banner/offline-banner.d.ts +10 -0
- package/dist/states/offline-banner/offline-banner.js +24 -0
- package/dist/states/skeleton/index.d.ts +1 -0
- package/dist/states/skeleton/index.js +1 -0
- package/dist/states/skeleton/skeleton.d.ts +12 -0
- package/dist/states/skeleton/skeleton.js +35 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.js +86 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/reduced-motion.d.ts +2 -0
- package/dist/utils/reduced-motion.js +18 -0
- package/dist/xlsx/crc32.d.ts +4 -0
- package/dist/xlsx/crc32.js +19 -0
- package/dist/xlsx/index.d.ts +3 -0
- package/dist/xlsx/index.js +21 -0
- package/dist/xlsx/xlsx.d.ts +42 -0
- package/dist/xlsx/xlsx.js +242 -0
- package/dist/xlsx/zip.d.ts +16 -0
- package/dist/xlsx/zip.js +98 -0
- package/package.json +116 -4
- package/scripts/build-theme.mjs +423 -0
- package/src/ai/attachment/attachment.tsx +111 -0
- package/src/ai/attachment/index.ts +1 -0
- package/src/ai/chain-of-thought/chain-of-thought.tsx +120 -0
- package/src/ai/chain-of-thought/index.ts +1 -0
- package/src/ai/chat-list/chat-list.tsx +124 -0
- package/src/ai/chat-list/group.ts +48 -0
- package/src/ai/chat-list/index.ts +2 -0
- package/src/ai/chat-message/chat-message.tsx +116 -0
- package/src/ai/chat-message/index.ts +1 -0
- package/src/ai/code-block/code-block.tsx +91 -0
- package/src/ai/code-block/highlight.ts +195 -0
- package/src/ai/code-block/index.ts +8 -0
- package/src/ai/conversation/conversation.tsx +97 -0
- package/src/ai/conversation/index.ts +9 -0
- package/src/ai/conversation/stick.ts +40 -0
- package/src/ai/index.ts +14 -0
- package/src/ai/internal/disclosure.tsx +65 -0
- package/src/ai/internal/icon-action.tsx +25 -0
- package/src/ai/internal/keyframes.tsx +13 -0
- package/src/ai/internal/use-copy.ts +38 -0
- package/src/ai/loader/index.ts +1 -0
- package/src/ai/loader/loader.tsx +60 -0
- package/src/ai/markdown/index.ts +2 -0
- package/src/ai/markdown/markdown.tsx +211 -0
- package/src/ai/markdown/parse.ts +276 -0
- package/src/ai/message-actions/index.ts +1 -0
- package/src/ai/message-actions/message-actions.tsx +85 -0
- package/src/ai/prompt-input/index.ts +2 -0
- package/src/ai/prompt-input/keys.ts +11 -0
- package/src/ai/prompt-input/prompt-input.tsx +148 -0
- package/src/ai/prompt-suggestion/index.ts +1 -0
- package/src/ai/prompt-suggestion/prompt-suggestion.tsx +54 -0
- package/src/ai/source/index.ts +1 -0
- package/src/ai/source/source.tsx +73 -0
- package/src/ai/text-shimmer/index.ts +1 -0
- package/src/ai/text-shimmer/text-shimmer.tsx +42 -0
- package/src/ai/tool-call/index.ts +1 -0
- package/src/ai/tool-call/tool-call.tsx +108 -0
- package/src/atoms/avatar/avatar.tsx +51 -0
- package/src/atoms/avatar/index.ts +1 -0
- package/src/atoms/avatar-group/avatar-group.tsx +16 -0
- package/src/atoms/avatar-group/index.ts +1 -0
- package/src/atoms/big-date/big-date.tsx +23 -0
- package/src/atoms/big-date/index.ts +1 -0
- package/src/atoms/button/button.tsx +76 -0
- package/src/atoms/button/index.ts +6 -0
- package/src/atoms/checkbox/checkbox.tsx +23 -0
- package/src/atoms/checkbox/index.ts +1 -0
- package/src/atoms/chip/chip.tsx +41 -0
- package/src/atoms/chip/index.ts +1 -0
- package/src/atoms/icon/icon-map.ts +83 -0
- package/src/atoms/icon/icon.tsx +23 -0
- package/src/atoms/icon/index.ts +2 -0
- package/src/atoms/index.ts +16 -0
- package/src/atoms/led/index.ts +1 -0
- package/src/atoms/led/led.tsx +30 -0
- package/src/atoms/number-value/format.ts +28 -0
- package/src/atoms/number-value/index.ts +8 -0
- package/src/atoms/number-value/number-value.tsx +60 -0
- package/src/atoms/pressable-feedback/index.ts +1 -0
- package/src/atoms/pressable-feedback/pressable-feedback.tsx +79 -0
- package/src/atoms/progress/index.ts +1 -0
- package/src/atoms/progress/progress.tsx +32 -0
- package/src/atoms/radio-group/index.ts +5 -0
- package/src/atoms/radio-group/radio-group.tsx +52 -0
- package/src/atoms/status-dot/index.ts +6 -0
- package/src/atoms/status-dot/status-dot.tsx +52 -0
- package/src/atoms/status-pill/index.ts +1 -0
- package/src/atoms/status-pill/status-pill.tsx +32 -0
- package/src/atoms/switch/index.ts +1 -0
- package/src/atoms/switch/switch.tsx +20 -0
- package/src/atoms/trend-chip/index.ts +8 -0
- package/src/atoms/trend-chip/trend-chip.tsx +73 -0
- package/src/atoms/trend-chip/trend.ts +24 -0
- package/src/brand/export.ts +67 -0
- package/src/brand/generate.ts +531 -0
- package/src/brand/glyphs.ts +113 -0
- package/src/brand/index.ts +8 -0
- package/src/brand/initials.ts +51 -0
- package/src/brand/logo-forge.tsx +523 -0
- package/src/brand/logo-mark.tsx +40 -0
- package/src/brand/palettes.ts +69 -0
- package/src/brand/rng.ts +25 -0
- package/src/calendar/day-chip/day-chip.tsx +34 -0
- package/src/calendar/day-chip/index.ts +2 -0
- package/src/calendar/event-block/event-block.tsx +74 -0
- package/src/calendar/event-block/index.ts +2 -0
- package/src/calendar/index.ts +5 -0
- package/src/calendar/internal/date-utils.ts +78 -0
- package/src/calendar/internal/index.ts +3 -0
- package/src/calendar/internal/layout.ts +60 -0
- package/src/calendar/internal/styles.ts +3 -0
- package/src/calendar/internal/types.ts +32 -0
- package/src/calendar/month-view/index.ts +1 -0
- package/src/calendar/month-view/month-view.tsx +157 -0
- package/src/calendar/timeline-view/index.ts +1 -0
- package/src/calendar/timeline-view/timeline-view.tsx +100 -0
- package/src/calendar/week-view/index.ts +1 -0
- package/src/calendar/week-view/week-view.tsx +216 -0
- package/src/charts/README.md +598 -0
- package/src/charts/area-chart/area-chart.tsx +23 -0
- package/src/charts/area-chart/index.ts +1 -0
- package/src/charts/bar-chart/bar-chart.tsx +68 -0
- package/src/charts/bar-chart/bar-race-chart.tsx +303 -0
- package/src/charts/bar-chart/bar-race.ts +67 -0
- package/src/charts/bar-chart/drilldown-bar-chart.tsx +85 -0
- package/src/charts/bar-chart/index.ts +4 -0
- package/src/charts/beeswarm-chart/beeswarm-chart.tsx +470 -0
- package/src/charts/beeswarm-chart/index.ts +1 -0
- package/src/charts/box-plot/box-plot.tsx +417 -0
- package/src/charts/box-plot/index.ts +1 -0
- package/src/charts/bubble-chart/bubble-chart.tsx +14 -0
- package/src/charts/bubble-chart/index.ts +1 -0
- package/src/charts/bubble-map/bubble-map.tsx +678 -0
- package/src/charts/bubble-map/index.ts +1 -0
- package/src/charts/bullet-chart/bullet-chart.tsx +577 -0
- package/src/charts/bullet-chart/bullet-layout.ts +47 -0
- package/src/charts/bullet-chart/index.ts +2 -0
- package/src/charts/candlestick-chart/candlestick-chart.tsx +608 -0
- package/src/charts/candlestick-chart/index.ts +1 -0
- package/src/charts/chart-grid/chart-grid.tsx +197 -0
- package/src/charts/chart-grid/grid-math.ts +69 -0
- package/src/charts/chart-grid/index.ts +2 -0
- package/src/charts/chord-chart/chord-chart.tsx +551 -0
- package/src/charts/chord-chart/index.ts +1 -0
- package/src/charts/choropleth-map/choropleth-drilldown.tsx +98 -0
- package/src/charts/choropleth-map/choropleth-map.tsx +425 -0
- package/src/charts/choropleth-map/index.ts +2 -0
- package/src/charts/combo-chart/combo-chart.tsx +29 -0
- package/src/charts/combo-chart/index.ts +1 -0
- package/src/charts/core/a11y.ts +2 -0
- package/src/charts/core/axes.tsx +176 -0
- package/src/charts/core/breadcrumb.tsx +68 -0
- package/src/charts/core/cartesian/annotations.tsx +161 -0
- package/src/charts/core/cartesian/axis-stack.ts +88 -0
- package/src/charts/core/cartesian/brush.tsx +241 -0
- package/src/charts/core/cartesian/cartesian-chart.tsx +1239 -0
- package/src/charts/core/cartesian/category-group-axis.tsx +43 -0
- package/src/charts/core/cartesian/category-groups.ts +40 -0
- package/src/charts/core/cartesian/ink-layer.tsx +463 -0
- package/src/charts/core/cartesian/layout.ts +796 -0
- package/src/charts/core/cartesian/marks.tsx +158 -0
- package/src/charts/core/cartesian/sync-store.ts +103 -0
- package/src/charts/core/cartesian/sync.tsx +68 -0
- package/src/charts/core/cartesian/types.ts +169 -0
- package/src/charts/core/category-axis.ts +120 -0
- package/src/charts/core/category-explorer.tsx +132 -0
- package/src/charts/core/chart-frame.tsx +119 -0
- package/src/charts/core/chart-states.tsx +89 -0
- package/src/charts/core/chord.ts +176 -0
- package/src/charts/core/color-scale.ts +117 -0
- package/src/charts/core/data-table.tsx +49 -0
- package/src/charts/core/distribution/brush.ts +151 -0
- package/src/charts/core/distribution/dot-stack.ts +78 -0
- package/src/charts/core/distribution/explorer.tsx +96 -0
- package/src/charts/core/distribution/geometry.ts +76 -0
- package/src/charts/core/distribution/index.ts +11 -0
- package/src/charts/core/distribution/labels.ts +56 -0
- package/src/charts/core/distribution/layout.ts +302 -0
- package/src/charts/core/distribution/marks.tsx +334 -0
- package/src/charts/core/distribution/observations.tsx +61 -0
- package/src/charts/core/distribution/point-index.ts +68 -0
- package/src/charts/core/distribution/points.ts +35 -0
- package/src/charts/core/distribution/stats.ts +426 -0
- package/src/charts/core/distribution/use-legend.tsx +76 -0
- package/src/charts/core/distribution/xy-points.tsx +1202 -0
- package/src/charts/core/downsample.ts +85 -0
- package/src/charts/core/drawing-height.ts +22 -0
- package/src/charts/core/export-menu.tsx +68 -0
- package/src/charts/core/export.ts +217 -0
- package/src/charts/core/format.ts +154 -0
- package/src/charts/core/gantt.ts +531 -0
- package/src/charts/core/hierarchy-chart.tsx +236 -0
- package/src/charts/core/hierarchy.ts +380 -0
- package/src/charts/core/index.ts +54 -0
- package/src/charts/core/indicators.ts +175 -0
- package/src/charts/core/ink.ts +321 -0
- package/src/charts/core/legend.tsx +111 -0
- package/src/charts/core/motion.ts +112 -0
- package/src/charts/core/palette.ts +76 -0
- package/src/charts/core/path.ts +198 -0
- package/src/charts/core/pattern-defs.tsx +87 -0
- package/src/charts/core/patterns.ts +121 -0
- package/src/charts/core/plot-overlay.tsx +106 -0
- package/src/charts/core/polar.ts +316 -0
- package/src/charts/core/sankey.ts +544 -0
- package/src/charts/core/scales/band.ts +90 -0
- package/src/charts/core/scales/index.ts +4 -0
- package/src/charts/core/scales/linear.ts +94 -0
- package/src/charts/core/scales/log.ts +35 -0
- package/src/charts/core/scales/time.ts +136 -0
- package/src/charts/core/shape-morph.ts +101 -0
- package/src/charts/core/stack.ts +41 -0
- package/src/charts/core/time-range.ts +51 -0
- package/src/charts/core/tooltip.tsx +126 -0
- package/src/charts/core/tree-fit.ts +90 -0
- package/src/charts/core/tree-layout.ts +384 -0
- package/src/charts/core/tree-radial.ts +303 -0
- package/src/charts/core/types.ts +105 -0
- package/src/charts/core/unit-glyph.tsx +102 -0
- package/src/charts/core/unit-icons.ts +210 -0
- package/src/charts/core/units.ts +267 -0
- package/src/charts/core/use-canvas.ts +77 -0
- package/src/charts/core/use-chart-size.ts +65 -0
- package/src/charts/core/use-drill.ts +100 -0
- package/src/charts/core/use-index-navigation.ts +68 -0
- package/src/charts/core/use-pan-zoom.ts +219 -0
- package/src/charts/core/use-series-state.ts +40 -0
- package/src/charts/crossfilter/crossfilter-engine.ts +207 -0
- package/src/charts/crossfilter/crossfilter.tsx +494 -0
- package/src/charts/crossfilter/index.ts +2 -0
- package/src/charts/donut-chart/center-fit.ts +53 -0
- package/src/charts/donut-chart/donut-chart.tsx +826 -0
- package/src/charts/donut-chart/index.ts +1 -0
- package/src/charts/dumbbell-chart/dumbbell-chart.tsx +723 -0
- package/src/charts/dumbbell-chart/index.ts +1 -0
- package/src/charts/fill-gauge-chart/fill-gauge-chart.tsx +319 -0
- package/src/charts/fill-gauge-chart/index.ts +1 -0
- package/src/charts/funnel-chart/funnel-chart.tsx +517 -0
- package/src/charts/funnel-chart/index.ts +1 -0
- package/src/charts/gantt-chart/gantt-chart.tsx +1369 -0
- package/src/charts/gantt-chart/gantt-export.ts +139 -0
- package/src/charts/gantt-chart/gantt-marks.tsx +710 -0
- package/src/charts/gantt-chart/index.ts +1 -0
- package/src/charts/gauge-chart/gauge-chart.tsx +594 -0
- package/src/charts/gauge-chart/index.ts +1 -0
- package/src/charts/globe-chart/globe-chart.tsx +744 -0
- package/src/charts/globe-chart/index.ts +1 -0
- package/src/charts/heatmap-chart/calendar-heatmap.tsx +221 -0
- package/src/charts/heatmap-chart/calendar-layout.ts +68 -0
- package/src/charts/heatmap-chart/datetime-columns.ts +38 -0
- package/src/charts/heatmap-chart/drilldown-heatmap.tsx +92 -0
- package/src/charts/heatmap-chart/heatmap-chart.tsx +189 -0
- package/src/charts/heatmap-chart/heatmap-grid.tsx +588 -0
- package/src/charts/heatmap-chart/heatmap-scale.ts +64 -0
- package/src/charts/heatmap-chart/hex-layout.ts +88 -0
- package/src/charts/heatmap-chart/index.ts +9 -0
- package/src/charts/hex-tile-map/hex-layout.ts +147 -0
- package/src/charts/hex-tile-map/hex-tile-map.tsx +361 -0
- package/src/charts/hex-tile-map/index.ts +2 -0
- package/src/charts/hierarchy-morph/hierarchy-morph.tsx +455 -0
- package/src/charts/hierarchy-morph/index.ts +1 -0
- package/src/charts/histogram/histogram.tsx +556 -0
- package/src/charts/histogram/index.ts +1 -0
- package/src/charts/icicle-chart/icicle-chart.tsx +466 -0
- package/src/charts/icicle-chart/index.ts +1 -0
- package/src/charts/index.ts +50 -0
- package/src/charts/isotype-rows/index.ts +1 -0
- package/src/charts/isotype-rows/isotype-rows.tsx +336 -0
- package/src/charts/line-chart/index.ts +2 -0
- package/src/charts/line-chart/line-chart.tsx +36 -0
- package/src/charts/line-chart/line-drilldown.tsx +65 -0
- package/src/charts/lollipop-chart/index.ts +1 -0
- package/src/charts/lollipop-chart/lollipop-chart.tsx +402 -0
- package/src/charts/maps/data/README.md +51 -0
- package/src/charts/maps/data/peru/index.ts +5 -0
- package/src/charts/maps/data/world/index.ts +5 -0
- package/src/charts/maps/geo/build-topology.ts +226 -0
- package/src/charts/maps/geo/cluster.ts +81 -0
- package/src/charts/maps/geo/geo-path.ts +153 -0
- package/src/charts/maps/geo/globe.ts +309 -0
- package/src/charts/maps/geo/index.ts +7 -0
- package/src/charts/maps/geo/map-data-table.tsx +141 -0
- package/src/charts/maps/geo/map-labels.ts +60 -0
- package/src/charts/maps/geo/map-legend.tsx +82 -0
- package/src/charts/maps/geo/map-viewport.tsx +404 -0
- package/src/charts/maps/geo/match.ts +12 -0
- package/src/charts/maps/geo/projection.ts +177 -0
- package/src/charts/maps/geo/pure.ts +12 -0
- package/src/charts/maps/geo/routes.ts +95 -0
- package/src/charts/maps/geo/simplify.ts +57 -0
- package/src/charts/maps/geo/topojson.ts +94 -0
- package/src/charts/maps/geo/types.ts +59 -0
- package/src/charts/maps/geo/use-map-geometry.ts +132 -0
- package/src/charts/maps/geo/use-map-view.ts +253 -0
- package/src/charts/maps/geo/view.ts +100 -0
- package/src/charts/maps/index.ts +1 -0
- package/src/charts/parliament-chart/index.ts +1 -0
- package/src/charts/parliament-chart/parliament-chart.tsx +406 -0
- package/src/charts/pictogram-chart/index.ts +1 -0
- package/src/charts/pictogram-chart/pictogram-chart.tsx +406 -0
- package/src/charts/pie-chart/index.ts +1 -0
- package/src/charts/pie-chart/pie-chart.tsx +16 -0
- package/src/charts/polar-area-chart/index.ts +1 -0
- package/src/charts/polar-area-chart/polar-area-chart.tsx +505 -0
- package/src/charts/progress-units/index.ts +1 -0
- package/src/charts/progress-units/progress-units.tsx +209 -0
- package/src/charts/radar-chart/index.ts +1 -0
- package/src/charts/radar-chart/radar-chart.tsx +550 -0
- package/src/charts/radial-bar-chart/index.ts +1 -0
- package/src/charts/radial-bar-chart/radial-bar-chart.tsx +552 -0
- package/src/charts/raincloud-chart/index.ts +1 -0
- package/src/charts/raincloud-chart/raincloud-chart.tsx +453 -0
- package/src/charts/range-area-chart/index.ts +1 -0
- package/src/charts/range-area-chart/range-area-chart.tsx +516 -0
- package/src/charts/sankey-chart/alluvial-chart.tsx +56 -0
- package/src/charts/sankey-chart/index.ts +2 -0
- package/src/charts/sankey-chart/sankey-chart.tsx +1139 -0
- package/src/charts/scatter-chart/index.ts +1 -0
- package/src/charts/scatter-chart/scatter-chart.tsx +16 -0
- package/src/charts/slope-chart/index.ts +2 -0
- package/src/charts/slope-chart/label-layout.ts +48 -0
- package/src/charts/slope-chart/slope-chart.tsx +484 -0
- package/src/charts/sparkline/index.ts +1 -0
- package/src/charts/sparkline/sparkline.tsx +266 -0
- package/src/charts/stock-chart/index.ts +1 -0
- package/src/charts/stock-chart/stock-chart.tsx +728 -0
- package/src/charts/stock-chart/stock-drawing-layer.tsx +386 -0
- package/src/charts/stock-chart/stock-drawings.ts +121 -0
- package/src/charts/stock-chart/stock-model.ts +167 -0
- package/src/charts/stock-chart/stock-plot.tsx +1133 -0
- package/src/charts/stock-chart/stock-stats.ts +122 -0
- package/src/charts/stock-chart/stock-transforms.ts +86 -0
- package/src/charts/stock-chart/use-stock-stream.ts +28 -0
- package/src/charts/stream-graph/index.ts +2 -0
- package/src/charts/stream-graph/stream-graph.tsx +521 -0
- package/src/charts/stream-graph/stream-layout.ts +131 -0
- package/src/charts/sunburst-chart/index.ts +1 -0
- package/src/charts/sunburst-chart/sunburst-chart.tsx +558 -0
- package/src/charts/timeline-chart/index.ts +2 -0
- package/src/charts/timeline-chart/timeline-chart.tsx +656 -0
- package/src/charts/timeline-chart/timeline-lanes.ts +116 -0
- package/src/charts/tree-chart/index.ts +3 -0
- package/src/charts/tree-chart/tree-card.tsx +132 -0
- package/src/charts/tree-chart/tree-chart.tsx +1071 -0
- package/src/charts/tree-chart/tree-model.ts +217 -0
- package/src/charts/tree-chart/use-tree-transition.ts +116 -0
- package/src/charts/treemap-chart/index.ts +1 -0
- package/src/charts/treemap-chart/treemap-chart.tsx +435 -0
- package/src/charts/violin-chart/index.ts +1 -0
- package/src/charts/violin-chart/violin-chart.tsx +514 -0
- package/src/charts/waffle-chart/index.ts +1 -0
- package/src/charts/waffle-chart/waffle-chart.tsx +354 -0
- package/src/charts/waterfall-chart/index.ts +2 -0
- package/src/charts/waterfall-chart/waterfall-chart.tsx +629 -0
- package/src/charts/waterfall-chart/waterfall-layout.ts +112 -0
- package/src/containers/action-bar/action-bar.tsx +78 -0
- package/src/containers/action-bar/index.ts +1 -0
- package/src/containers/banner/banner.tsx +68 -0
- package/src/containers/banner/index.ts +1 -0
- package/src/containers/card/card.tsx +44 -0
- package/src/containers/card/index.ts +1 -0
- package/src/containers/carousel/carousel.tsx +216 -0
- package/src/containers/carousel/index.ts +2 -0
- package/src/containers/carousel/model.ts +21 -0
- package/src/containers/cell/cell.tsx +127 -0
- package/src/containers/cell/index.ts +8 -0
- package/src/containers/cols/cols.tsx +64 -0
- package/src/containers/cols/index.ts +1 -0
- package/src/containers/comment/comment.tsx +56 -0
- package/src/containers/comment/index.ts +1 -0
- package/src/containers/data-grid/README.md +38 -0
- package/src/containers/data-grid/chart-panel.tsx +141 -0
- package/src/containers/data-grid/chart-range.ts +131 -0
- package/src/containers/data-grid/column-groups.ts +45 -0
- package/src/containers/data-grid/column-menu.tsx +444 -0
- package/src/containers/data-grid/data-grid.demos.tsx +577 -0
- package/src/containers/data-grid/data-grid.fixtures.tsx +358 -0
- package/src/containers/data-grid/data-grid.samples.tsx +441 -0
- package/src/containers/data-grid/data-grid.tsx +3419 -0
- package/src/containers/data-grid/data-source.ts +144 -0
- package/src/containers/data-grid/fill-series.ts +282 -0
- package/src/containers/data-grid/filter-builder-editor.tsx +262 -0
- package/src/containers/data-grid/filter-builder.ts +308 -0
- package/src/containers/data-grid/formula-bar.tsx +80 -0
- package/src/containers/data-grid/formula-sheet.ts +254 -0
- package/src/containers/data-grid/formula.ts +687 -0
- package/src/containers/data-grid/grid-edit.ts +137 -0
- package/src/containers/data-grid/grid-toolbar.tsx +307 -0
- package/src/containers/data-grid/history.ts +137 -0
- package/src/containers/data-grid/index.ts +18 -0
- package/src/containers/data-grid/labels.ts +315 -0
- package/src/containers/data-grid/model.ts +641 -0
- package/src/containers/data-grid/pivot.ts +188 -0
- package/src/containers/data-grid/range.ts +124 -0
- package/src/containers/data-grid/rows.ts +95 -0
- package/src/containers/data-grid/spreadsheet.demos.tsx +520 -0
- package/src/containers/data-grid/tool-panel.tsx +289 -0
- package/src/containers/data-grid/tree.ts +97 -0
- package/src/containers/data-grid/types.ts +166 -0
- package/src/containers/data-grid/use-data-source.ts +124 -0
- package/src/containers/data-grid/use-grid-layout.ts +133 -0
- package/src/containers/data-grid/virtual.ts +158 -0
- package/src/containers/data-grid/xlsx-export.ts +54 -0
- package/src/containers/description-list/description-list.tsx +25 -0
- package/src/containers/description-list/index.ts +1 -0
- package/src/containers/facts/facts.tsx +26 -0
- package/src/containers/facts/index.ts +1 -0
- package/src/containers/file-tree/file-tree.tsx +185 -0
- package/src/containers/file-tree/index.ts +12 -0
- package/src/containers/file-tree/model.ts +111 -0
- package/src/containers/generic-row/generic-row.tsx +41 -0
- package/src/containers/generic-row/index.ts +1 -0
- package/src/containers/hbars/hbars.tsx +204 -0
- package/src/containers/hbars/index.ts +1 -0
- package/src/containers/highlight-line/highlight-line.tsx +17 -0
- package/src/containers/highlight-line/index.ts +1 -0
- package/src/containers/index.ts +26 -0
- package/src/containers/item-card-group/index.ts +5 -0
- package/src/containers/item-card-group/item-card-group.tsx +106 -0
- package/src/containers/kanban/index.ts +14 -0
- package/src/containers/kanban/kanban.tsx +402 -0
- package/src/containers/kanban/model.ts +141 -0
- package/src/containers/kpi/index.ts +1 -0
- package/src/containers/kpi/kpi.tsx +53 -0
- package/src/containers/kpi-group/index.ts +1 -0
- package/src/containers/kpi-group/kpi-group.tsx +71 -0
- package/src/containers/page-header/index.ts +1 -0
- package/src/containers/page-header/page-header.tsx +53 -0
- package/src/containers/resizable/index.ts +9 -0
- package/src/containers/resizable/model.ts +94 -0
- package/src/containers/resizable/resizable.tsx +281 -0
- package/src/containers/scrolly/index.ts +8 -0
- package/src/containers/scrolly/scrolly-logic.ts +41 -0
- package/src/containers/scrolly/scrolly.tsx +206 -0
- package/src/containers/settings-layout/index.ts +1 -0
- package/src/containers/settings-layout/settings-layout.tsx +85 -0
- package/src/containers/settings-row/index.ts +1 -0
- package/src/containers/settings-row/settings-row.tsx +38 -0
- package/src/containers/table/index.ts +1 -0
- package/src/containers/table/pin.ts +91 -0
- package/src/containers/table/table.tsx +406 -0
- package/src/containers/timeline/index.ts +6 -0
- package/src/containers/timeline/timeline.tsx +93 -0
- package/src/containers/toolbar/index.ts +1 -0
- package/src/containers/toolbar/toolbar.tsx +21 -0
- package/src/dashboards/data.ts +40 -0
- package/src/dashboards/inicio-dashboard.tsx +209 -0
- package/src/dashboards/layout.tsx +95 -0
- package/src/forms/accent-picker/accent-picker.tsx +68 -0
- package/src/forms/accent-picker/index.ts +5 -0
- package/src/forms/checkbox-button-group/checkbox-button-group.tsx +66 -0
- package/src/forms/checkbox-button-group/index.ts +5 -0
- package/src/forms/dropzone/dropzone.tsx +127 -0
- package/src/forms/dropzone/index.ts +6 -0
- package/src/forms/emoji-picker/emoji-data.ts +173 -0
- package/src/forms/emoji-picker/emoji-picker.tsx +142 -0
- package/src/forms/emoji-picker/index.ts +3 -0
- package/src/forms/emoji-picker/model.ts +49 -0
- package/src/forms/emoji-reaction-button/emoji-reaction-button.tsx +112 -0
- package/src/forms/emoji-reaction-button/index.ts +7 -0
- package/src/forms/field/field.tsx +53 -0
- package/src/forms/field/index.ts +1 -0
- package/src/forms/form-grid/form-grid.tsx +22 -0
- package/src/forms/form-grid/index.ts +1 -0
- package/src/forms/index.ts +20 -0
- package/src/forms/inline-select/index.ts +5 -0
- package/src/forms/inline-select/inline-select.tsx +41 -0
- package/src/forms/input/index.ts +1 -0
- package/src/forms/input/input.tsx +16 -0
- package/src/forms/input-icon/index.ts +1 -0
- package/src/forms/input-icon/input-icon.tsx +22 -0
- package/src/forms/internal/button-option.tsx +46 -0
- package/src/forms/label/index.ts +1 -0
- package/src/forms/label/label.tsx +11 -0
- package/src/forms/native-select/index.ts +6 -0
- package/src/forms/native-select/native-select.tsx +87 -0
- package/src/forms/number-stepper/index.ts +1 -0
- package/src/forms/number-stepper/number-stepper.tsx +124 -0
- package/src/forms/pin-input/index.ts +1 -0
- package/src/forms/pin-input/pin-input.tsx +79 -0
- package/src/forms/radio-button-group/index.ts +5 -0
- package/src/forms/radio-button-group/radio-button-group.tsx +68 -0
- package/src/forms/rating/index.ts +2 -0
- package/src/forms/rating/model.ts +48 -0
- package/src/forms/rating/rating.tsx +139 -0
- package/src/forms/select/index.ts +1 -0
- package/src/forms/select/select.tsx +29 -0
- package/src/forms/slider/index.ts +17 -0
- package/src/forms/slider/model.ts +89 -0
- package/src/forms/slider/slider.tsx +241 -0
- package/src/forms/textarea/index.ts +1 -0
- package/src/forms/textarea/textarea.tsx +16 -0
- package/src/forms/time-input/index.ts +1 -0
- package/src/forms/time-input/time-input.tsx +116 -0
- package/src/foundations/presets-gallery.mdx +59 -0
- package/src/navigation/floating-toc/floating-toc.tsx +115 -0
- package/src/navigation/floating-toc/index.ts +2 -0
- package/src/navigation/floating-toc/model.ts +23 -0
- package/src/navigation/index.ts +4 -0
- package/src/navigation/segmented/index.ts +6 -0
- package/src/navigation/segmented/segmented.tsx +36 -0
- package/src/navigation/stepper/index.ts +1 -0
- package/src/navigation/stepper/stepper.tsx +60 -0
- package/src/navigation/tabs/index.ts +10 -0
- package/src/navigation/tabs/tabs.tsx +55 -0
- package/src/overlays/context-menu/context-menu.tsx +256 -0
- package/src/overlays/context-menu/index.ts +15 -0
- package/src/overlays/dialog/dialog.tsx +146 -0
- package/src/overlays/dialog/index.ts +12 -0
- package/src/overlays/drawer/drawer.tsx +94 -0
- package/src/overlays/drawer/index.ts +8 -0
- package/src/overlays/dropdown-menu/dropdown-menu.tsx +82 -0
- package/src/overlays/dropdown-menu/index.ts +14 -0
- package/src/overlays/focus-return/focus-return.tsx +60 -0
- package/src/overlays/focus-return/index.ts +7 -0
- package/src/overlays/hover-card/hover-card.tsx +186 -0
- package/src/overlays/hover-card/index.ts +8 -0
- package/src/overlays/index.ts +8 -0
- package/src/overlays/popover/index.ts +8 -0
- package/src/overlays/popover/popover.tsx +35 -0
- package/src/overlays/toaster/index.ts +1 -0
- package/src/overlays/toaster/toaster.tsx +35 -0
- package/src/palette/command-palette/command-palette.tsx +131 -0
- package/src/palette/command-palette/index.ts +5 -0
- package/src/palette/index.ts +1 -0
- package/src/rich-text/index.ts +8 -0
- package/src/rich-text/rich-text-editor.tsx +419 -0
- package/src/rich-text/sanitize.ts +266 -0
- package/src/shell/app-shell/app-shell.tsx +76 -0
- package/src/shell/app-shell/index.ts +6 -0
- package/src/shell/index.ts +3 -0
- package/src/shell/sidebar/index.ts +8 -0
- package/src/shell/sidebar/sidebar.tsx +172 -0
- package/src/shell/topbar/index.ts +1 -0
- package/src/shell/topbar/topbar.tsx +120 -0
- package/src/showcase/analytics-bento.tsx +333 -0
- package/src/showcase/bento.tsx +169 -0
- package/src/showcase/controls-bento.tsx +313 -0
- package/src/showcase/dataviz-bento.tsx +452 -0
- package/src/showcase/kit-tiles.tsx +193 -0
- package/src/showcase/operations-bento.tsx +478 -0
- package/src/showcase/shell.tsx +136 -0
- package/src/states/empty-state/empty-state.tsx +40 -0
- package/src/states/empty-state/index.ts +1 -0
- package/src/states/error-state/error-state.tsx +52 -0
- package/src/states/error-state/index.ts +1 -0
- package/src/states/forbidden-state/forbidden-state.tsx +28 -0
- package/src/states/forbidden-state/index.ts +1 -0
- package/src/states/index.ts +5 -0
- package/src/states/offline-banner/index.ts +1 -0
- package/src/states/offline-banner/offline-banner.tsx +35 -0
- package/src/states/skeleton/index.ts +1 -0
- package/src/states/skeleton/skeleton.tsx +53 -0
- package/src/utils/cn.ts +94 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/reduced-motion.ts +20 -0
- package/src/xlsx/crc32.ts +22 -0
- package/src/xlsx/index.ts +15 -0
- package/src/xlsx/xlsx.ts +390 -0
- package/src/xlsx/zip.ts +117 -0
- package/styles/Theme.kt +246 -0
- package/styles/base.css +45 -0
- package/styles/fonts.css +2 -0
- package/styles/theme.css +272 -0
- package/styles/tokens.css +1109 -0
- package/tokens/default.json +1802 -0
|
@@ -0,0 +1,1139 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type KeyboardEvent,
|
|
5
|
+
memo,
|
|
6
|
+
type PointerEvent,
|
|
7
|
+
useEffect,
|
|
8
|
+
useId,
|
|
9
|
+
useMemo,
|
|
10
|
+
useRef,
|
|
11
|
+
useState,
|
|
12
|
+
} from "react";
|
|
13
|
+
import { DECORATIVE } from "../core/a11y.js";
|
|
14
|
+
import { estimateTextWidth } from "../core/axes.js";
|
|
15
|
+
import { ChartFrame } from "../core/chart-frame.js";
|
|
16
|
+
import { tint } from "../core/color-scale.js";
|
|
17
|
+
import { ChartDataTable } from "../core/data-table.js";
|
|
18
|
+
import { DEFAULT_EXPORT_TEXTS, ExportMenu, type ExportTexts } from "../core/export-menu.js";
|
|
19
|
+
import { resolveFormat, type ValueFormat, type ValueFormatter } from "../core/format.js";
|
|
20
|
+
import { fitLabel } from "../core/hierarchy-chart.js";
|
|
21
|
+
import { ChartLegend } from "../core/legend.js";
|
|
22
|
+
import { EASE_OUT, revealClip, useEntryAnimation, useReducedMotion } from "../core/motion.js";
|
|
23
|
+
import { seriesColor } from "../core/palette.js";
|
|
24
|
+
import {
|
|
25
|
+
type SankeyDiffLink,
|
|
26
|
+
type SankeyGraph,
|
|
27
|
+
type SankeyLink,
|
|
28
|
+
type SankeyLinkInput,
|
|
29
|
+
type SankeyNode,
|
|
30
|
+
type SankeyNodeInput,
|
|
31
|
+
sankeyDiff,
|
|
32
|
+
sankeyFlowOf,
|
|
33
|
+
sankeyLayout,
|
|
34
|
+
sankeyLinkPath,
|
|
35
|
+
sankeyTraceOf,
|
|
36
|
+
} from "../core/sankey.js";
|
|
37
|
+
import { ChartTooltip, type TooltipRow } from "../core/tooltip.js";
|
|
38
|
+
import { type ChartLabels, DEFAULT_LABELS } from "../core/types.js";
|
|
39
|
+
|
|
40
|
+
/** Visible strings of the sankey chart. */
|
|
41
|
+
export interface SankeyLabels extends ChartLabels {
|
|
42
|
+
/** Data table header: where a flow starts. */
|
|
43
|
+
source: string;
|
|
44
|
+
/** Data table header: where a flow ends. */
|
|
45
|
+
target: string;
|
|
46
|
+
/** Tooltip row: share of the flow's source node. */
|
|
47
|
+
ofSource: string;
|
|
48
|
+
/** Tooltip row and table header: share of everything that enters the diagram. */
|
|
49
|
+
ofTotal: string;
|
|
50
|
+
incoming: string;
|
|
51
|
+
outgoing: string;
|
|
52
|
+
/** Diff view: the two periods and the change between them. */
|
|
53
|
+
before: string;
|
|
54
|
+
after: string;
|
|
55
|
+
change: string;
|
|
56
|
+
increase: string;
|
|
57
|
+
decrease: string;
|
|
58
|
+
/** Legend entry of the previous period's width in the diff view. */
|
|
59
|
+
previous: string;
|
|
60
|
+
/** Export buttons. */
|
|
61
|
+
exportTexts: ExportTexts;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const DEFAULT_SANKEY_LABELS: SankeyLabels = {
|
|
65
|
+
...DEFAULT_LABELS,
|
|
66
|
+
explore:
|
|
67
|
+
"Flow diagram. Up and down move within a column, left and right between columns, Enter steps through the flows of a node, Escape clears.",
|
|
68
|
+
category: "Flow",
|
|
69
|
+
source: "From",
|
|
70
|
+
target: "To",
|
|
71
|
+
ofSource: "Share of",
|
|
72
|
+
ofTotal: "Share of total",
|
|
73
|
+
incoming: "In",
|
|
74
|
+
outgoing: "Out",
|
|
75
|
+
before: "Before",
|
|
76
|
+
after: "After",
|
|
77
|
+
change: "Change",
|
|
78
|
+
increase: "Increase",
|
|
79
|
+
decrease: "Decrease",
|
|
80
|
+
previous: "Previous period",
|
|
81
|
+
exportTexts: DEFAULT_EXPORT_TEXTS,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export interface SankeyChartProps {
|
|
85
|
+
/** Accessible name of the drawing and caption of the data table. */
|
|
86
|
+
title: string;
|
|
87
|
+
nodes: readonly SankeyNodeInput[];
|
|
88
|
+
/** Flows between node ids. Links that close a cycle are left out (with a dev warning). */
|
|
89
|
+
links: readonly SankeyLinkInput[];
|
|
90
|
+
/**
|
|
91
|
+
* Diff view: the flows of a previous period. `links` is then the current period; every band is
|
|
92
|
+
* colored by its change (`--chart-up` / `--chart-down`) with the previous width as a ghost behind it.
|
|
93
|
+
*/
|
|
94
|
+
compare?: readonly SankeyLinkInput[];
|
|
95
|
+
/** Hover or click traces a whole path: a link lights everything upstream of its source and downstream of its target; a click pins it. */
|
|
96
|
+
pathTracing?: boolean;
|
|
97
|
+
/** Dots travel along the bands (off under `prefers-reduced-motion`). */
|
|
98
|
+
particles?: boolean;
|
|
99
|
+
/** Show SVG and PNG export buttons above the drawing. */
|
|
100
|
+
exportable?: boolean;
|
|
101
|
+
/** Legend entries below the drawing; the nodes by default (an alluvial lists its categories). */
|
|
102
|
+
legendItems?: ReadonlyArray<{ id: string; name: string; color: string }>;
|
|
103
|
+
/** `false` keeps nodes in input order inside their column (see `AlluvialChart`). */
|
|
104
|
+
relax?: boolean;
|
|
105
|
+
/** Titles drawn above the columns, left to right, e.g. ["Origen", "Servicio", "Pago"]. */
|
|
106
|
+
columns?: readonly string[];
|
|
107
|
+
height?: number | "fill";
|
|
108
|
+
/** Width / height ratio of the drawing; ignored with `"fill"`. */
|
|
109
|
+
aspectRatio?: number;
|
|
110
|
+
valueFormat?: ValueFormat;
|
|
111
|
+
/** Thickness of the node bars (wider by default with inside labels). */
|
|
112
|
+
nodeWidth?: number;
|
|
113
|
+
/** Vertical gap between nodes of a column. */
|
|
114
|
+
nodePadding?: number;
|
|
115
|
+
/** `justify` puts the final nodes in the last column; `left` keeps each at its depth. */
|
|
116
|
+
align?: "justify" | "left";
|
|
117
|
+
/** Relaxation sweeps of the layout; more untangles more, at a cost. */
|
|
118
|
+
iterations?: number;
|
|
119
|
+
/** `gradient` blends source into target; `source`/`target` use one end; `neutral` is grey. */
|
|
120
|
+
linkColor?: "gradient" | "source" | "target" | "neutral";
|
|
121
|
+
/** Resting opacity of the links (0-1). */
|
|
122
|
+
linkOpacity?: number;
|
|
123
|
+
/** Node labels beside the bars (`outside`) or on wide bars (`inside`). */
|
|
124
|
+
labelPosition?: "outside" | "inside";
|
|
125
|
+
/** Value after each node label. */
|
|
126
|
+
showValues?: boolean;
|
|
127
|
+
tooltip?: boolean;
|
|
128
|
+
animate?: boolean;
|
|
129
|
+
loading?: boolean;
|
|
130
|
+
labels?: Partial<SankeyLabels>;
|
|
131
|
+
onNodeClick?: (node: SankeyNode) => void;
|
|
132
|
+
onLinkClick?: (link: SankeyLink) => void;
|
|
133
|
+
/** Links the layout left out (cycles, self links, unknown ids, invalid values). */
|
|
134
|
+
onRemovedLinks?: (removed: SankeyGraph["removed"]) => void;
|
|
135
|
+
className?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Sankey diagram: flows between columns of nodes, band widths proportional to
|
|
140
|
+
* the value. Hover (or keyboard) a node to follow its flows upstream and
|
|
141
|
+
* downstream, or a link to isolate it; the tooltip gives value and share.
|
|
142
|
+
*/
|
|
143
|
+
export function SankeyChart({
|
|
144
|
+
title,
|
|
145
|
+
nodes,
|
|
146
|
+
links: currentLinks,
|
|
147
|
+
compare,
|
|
148
|
+
exportable = false,
|
|
149
|
+
legendItems,
|
|
150
|
+
height = 380,
|
|
151
|
+
aspectRatio,
|
|
152
|
+
valueFormat,
|
|
153
|
+
loading,
|
|
154
|
+
labels: labelsProp,
|
|
155
|
+
className,
|
|
156
|
+
...rest
|
|
157
|
+
}: SankeyChartProps) {
|
|
158
|
+
const labels = useMemo(
|
|
159
|
+
() => (labelsProp ? { ...DEFAULT_SANKEY_LABELS, ...labelsProp } : DEFAULT_SANKEY_LABELS),
|
|
160
|
+
[labelsProp],
|
|
161
|
+
);
|
|
162
|
+
const format = useMemo(() => resolveFormat(valueFormat), [valueFormat]);
|
|
163
|
+
const diff = useMemo(
|
|
164
|
+
() => (compare ? sankeyDiff(compare, currentLinks) : null),
|
|
165
|
+
[compare, currentLinks],
|
|
166
|
+
);
|
|
167
|
+
const links: readonly SankeyLinkInput[] = diff ?? currentLinks;
|
|
168
|
+
// Unit-size layout just for colors, the legend, the table and the empty state.
|
|
169
|
+
const shape = useMemo(() => sankeyLayout(nodes, links, { width: 1, height: 1 }), [nodes, links]);
|
|
170
|
+
const colors = useMemo(() => nodeColors(nodes), [nodes]);
|
|
171
|
+
const total = sourceTotal(shape);
|
|
172
|
+
const diffById = useMemo(
|
|
173
|
+
() => new Map((diff ?? []).map((entry) => [`${entry.source}->${entry.target}`, entry])),
|
|
174
|
+
[diff],
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
const { onRemovedLinks } = rest;
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
if (shape.removed.length === 0) return;
|
|
180
|
+
onRemovedLinks?.(shape.removed);
|
|
181
|
+
const cycles = shape.removed.filter((entry) => entry.reason === "cycle");
|
|
182
|
+
if (cycles.length > 0 && !isProduction()) {
|
|
183
|
+
console.warn(
|
|
184
|
+
`SankeyChart "${title}": ${cycles.length} link(s) closed a cycle and were left out:`,
|
|
185
|
+
cycles.map(({ link }) => `${link.source} → ${link.target}`).join(", "),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}, [shape, title, onRemovedLinks]);
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<ChartFrame
|
|
192
|
+
height={height}
|
|
193
|
+
aspectRatio={aspectRatio}
|
|
194
|
+
labels={labels}
|
|
195
|
+
loading={loading}
|
|
196
|
+
empty={shape.nodes.length === 0}
|
|
197
|
+
skeleton="bars"
|
|
198
|
+
className={className}
|
|
199
|
+
legend={
|
|
200
|
+
diff || exportable ? (
|
|
201
|
+
<div className="flex flex-wrap items-center justify-between gap-x-4 gap-y-1">
|
|
202
|
+
{diff ? <DiffLegend labels={labels} /> : <span />}
|
|
203
|
+
{exportable ? (
|
|
204
|
+
<ExportMenu
|
|
205
|
+
title={title}
|
|
206
|
+
texts={labels.exportTexts}
|
|
207
|
+
getSvgs={(root) =>
|
|
208
|
+
Array.from(
|
|
209
|
+
root
|
|
210
|
+
.closest('[class~="@container/chart"]')
|
|
211
|
+
?.querySelectorAll<SVGSVGElement>("svg[data-export-part]") ?? [],
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
/>
|
|
215
|
+
) : null}
|
|
216
|
+
</div>
|
|
217
|
+
) : undefined
|
|
218
|
+
}
|
|
219
|
+
footer={
|
|
220
|
+
<ChartLegend
|
|
221
|
+
className="@lg/chart:hidden"
|
|
222
|
+
items={
|
|
223
|
+
legendItems ??
|
|
224
|
+
shape.nodes.map((node) => ({
|
|
225
|
+
id: node.id,
|
|
226
|
+
name: node.name,
|
|
227
|
+
color: colors.get(node.id) as string,
|
|
228
|
+
}))
|
|
229
|
+
}
|
|
230
|
+
/>
|
|
231
|
+
}
|
|
232
|
+
table={
|
|
233
|
+
<ChartDataTable
|
|
234
|
+
caption={title}
|
|
235
|
+
categoryHeader={labels.category}
|
|
236
|
+
categories={shape.links.map((link) => `${link.source.name} → ${link.target.name}`)}
|
|
237
|
+
columns={[
|
|
238
|
+
...(diff
|
|
239
|
+
? [
|
|
240
|
+
{
|
|
241
|
+
id: "before",
|
|
242
|
+
name: labels.before,
|
|
243
|
+
values: shape.links.map((link) => format(diffById.get(link.id)?.before ?? 0)),
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: "after",
|
|
247
|
+
name: labels.after,
|
|
248
|
+
values: shape.links.map((link) => format(diffById.get(link.id)?.after ?? 0)),
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "change",
|
|
252
|
+
name: labels.change,
|
|
253
|
+
values: shape.links.map((link) => signed(diffById.get(link.id), format)),
|
|
254
|
+
},
|
|
255
|
+
]
|
|
256
|
+
: [
|
|
257
|
+
{
|
|
258
|
+
id: "value",
|
|
259
|
+
name: labels.value,
|
|
260
|
+
values: shape.links.map((link) => format(link.value)),
|
|
261
|
+
},
|
|
262
|
+
]),
|
|
263
|
+
{
|
|
264
|
+
id: "source",
|
|
265
|
+
name: `${labels.ofSource} ${labels.source.toLowerCase()}`,
|
|
266
|
+
values: shape.links.map((link) => percent(link.value / link.source.value)),
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
id: "total",
|
|
270
|
+
name: labels.ofTotal,
|
|
271
|
+
values: shape.links.map((link) => percent(total > 0 ? link.value / total : 0)),
|
|
272
|
+
},
|
|
273
|
+
]}
|
|
274
|
+
/>
|
|
275
|
+
}
|
|
276
|
+
>
|
|
277
|
+
{(width, drawingHeight) => (
|
|
278
|
+
<SankeyPlot
|
|
279
|
+
{...rest}
|
|
280
|
+
title={title}
|
|
281
|
+
nodes={nodes}
|
|
282
|
+
links={links}
|
|
283
|
+
colors={colors}
|
|
284
|
+
format={format}
|
|
285
|
+
labels={labels}
|
|
286
|
+
diffById={diff ? diffById : null}
|
|
287
|
+
width={width}
|
|
288
|
+
height={drawingHeight}
|
|
289
|
+
/>
|
|
290
|
+
)}
|
|
291
|
+
</ChartFrame>
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function isProduction(): boolean {
|
|
296
|
+
return typeof process !== "undefined" && process.env?.NODE_ENV === "production";
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function nodeColors(nodes: readonly SankeyNodeInput[]): Map<string, string> {
|
|
300
|
+
return new Map(nodes.map((node, index) => [node.id, seriesColor(index, node.color)]));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** Everything that enters the diagram: the sum of the first-column nodes. */
|
|
304
|
+
function sourceTotal(graph: SankeyGraph): number {
|
|
305
|
+
return graph.nodes
|
|
306
|
+
.filter((node) => node.incoming.length === 0)
|
|
307
|
+
.reduce((sum, node) => sum + node.value, 0);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** "+12 (+8.5%)" for a diff link, "new" / "removed" when one period is empty. */
|
|
311
|
+
function signed(entry: SankeyDiffLink | undefined, format: ValueFormatter): string {
|
|
312
|
+
if (!entry) return "";
|
|
313
|
+
const sign = entry.delta > 0 ? "+" : entry.delta < 0 ? "-" : "";
|
|
314
|
+
const amount = `${sign}${format(Math.abs(entry.delta))}`;
|
|
315
|
+
if (entry.before <= 0) return amount;
|
|
316
|
+
const ratio = Math.abs(entry.delta) / entry.before;
|
|
317
|
+
return `${amount} (${sign}${(ratio * 100).toFixed(ratio < 0.1 ? 1 : 0)}%)`;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function DiffLegend({ labels }: { labels: SankeyLabels }) {
|
|
321
|
+
const items: Array<[string, string, string]> = [
|
|
322
|
+
[labels.increase, "var(--chart-up)", "1"],
|
|
323
|
+
[labels.decrease, "var(--chart-down)", "1"],
|
|
324
|
+
[labels.previous, "var(--ink-3)", "0.3"],
|
|
325
|
+
];
|
|
326
|
+
return (
|
|
327
|
+
<ul className="m-0 flex list-none flex-wrap gap-x-4 gap-y-0.5 p-0 text-[12px] text-ink-2">
|
|
328
|
+
{items.map(([name, color, opacity]) => (
|
|
329
|
+
<li key={name} className="flex items-center gap-1.5">
|
|
330
|
+
<span
|
|
331
|
+
aria-hidden="true"
|
|
332
|
+
className="h-2 w-4 rounded-[3px]"
|
|
333
|
+
style={{ background: color, opacity }}
|
|
334
|
+
/>
|
|
335
|
+
{name}
|
|
336
|
+
</li>
|
|
337
|
+
))}
|
|
338
|
+
</ul>
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function percent(value: number): string {
|
|
343
|
+
return `${(value * 100).toFixed(value < 0.1 ? 1 : 0)}%`;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface SankeyPlotProps
|
|
347
|
+
extends Omit<
|
|
348
|
+
SankeyChartProps,
|
|
349
|
+
| "height"
|
|
350
|
+
| "aspectRatio"
|
|
351
|
+
| "valueFormat"
|
|
352
|
+
| "loading"
|
|
353
|
+
| "labels"
|
|
354
|
+
| "className"
|
|
355
|
+
| "compare"
|
|
356
|
+
| "exportable"
|
|
357
|
+
> {
|
|
358
|
+
colors: Map<string, string>;
|
|
359
|
+
format: ValueFormatter;
|
|
360
|
+
labels: SankeyLabels;
|
|
361
|
+
/** Diff view: the two periods of every link, by link id. */
|
|
362
|
+
diffById: ReadonlyMap<string, SankeyDiffLink> | null;
|
|
363
|
+
width: number;
|
|
364
|
+
height: number;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
type Focus = { kind: "node"; id: string } | { kind: "link"; id: string };
|
|
368
|
+
|
|
369
|
+
const LABEL_GAP = 6;
|
|
370
|
+
const HEADER = 22;
|
|
371
|
+
|
|
372
|
+
function SankeyPlot({
|
|
373
|
+
title,
|
|
374
|
+
nodes,
|
|
375
|
+
links,
|
|
376
|
+
columns: columnTitles,
|
|
377
|
+
colors,
|
|
378
|
+
format,
|
|
379
|
+
labels,
|
|
380
|
+
diffById,
|
|
381
|
+
width,
|
|
382
|
+
height,
|
|
383
|
+
pathTracing = false,
|
|
384
|
+
particles = false,
|
|
385
|
+
relax = true,
|
|
386
|
+
nodeWidth: nodeWidthProp,
|
|
387
|
+
nodePadding = 14,
|
|
388
|
+
align = "justify",
|
|
389
|
+
iterations = 6,
|
|
390
|
+
linkColor = "gradient",
|
|
391
|
+
linkOpacity = 0.38,
|
|
392
|
+
labelPosition = "outside",
|
|
393
|
+
showValues = true,
|
|
394
|
+
tooltip = true,
|
|
395
|
+
animate = true,
|
|
396
|
+
onNodeClick,
|
|
397
|
+
onLinkClick,
|
|
398
|
+
}: SankeyPlotProps) {
|
|
399
|
+
const uid = useId().replace(/:/g, "");
|
|
400
|
+
const inside = labelPosition === "inside";
|
|
401
|
+
const top = columnTitles && columnTitles.length > 0 ? HEADER : 0;
|
|
402
|
+
const plotHeight = Math.max(40, height - top);
|
|
403
|
+
const nodeWidth = nodeWidthProp ?? (inside ? Math.min(120, Math.max(56, width * 0.16)) : 12);
|
|
404
|
+
const graph = useMemo(
|
|
405
|
+
() =>
|
|
406
|
+
sankeyLayout(nodes, links, {
|
|
407
|
+
width,
|
|
408
|
+
height: plotHeight,
|
|
409
|
+
nodeWidth,
|
|
410
|
+
nodePadding,
|
|
411
|
+
iterations,
|
|
412
|
+
align,
|
|
413
|
+
relax,
|
|
414
|
+
}),
|
|
415
|
+
[nodes, links, width, plotHeight, nodeWidth, nodePadding, iterations, align, relax],
|
|
416
|
+
);
|
|
417
|
+
const total = sourceTotal(graph);
|
|
418
|
+
const lastColumn = graph.columns - 1;
|
|
419
|
+
const step = lastColumn > 0 ? (width - nodeWidth) / lastColumn : width;
|
|
420
|
+
// Room for an outside label between two columns.
|
|
421
|
+
const labelRoom = inside ? nodeWidth - 12 : step - nodeWidth - LABEL_GAP * 2;
|
|
422
|
+
|
|
423
|
+
const [hover, setHover] = useState<{ focus: Focus; x: number; y: number } | null>(null);
|
|
424
|
+
const [active, setActive] = useState<Focus | null>(null);
|
|
425
|
+
const [pinned, setPinned] = useState<Focus | null>(null);
|
|
426
|
+
const reducedMotion = useReducedMotion();
|
|
427
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
428
|
+
const svgRef = useRef<SVGSVGElement>(null);
|
|
429
|
+
|
|
430
|
+
useEntryAnimation(
|
|
431
|
+
svgRef,
|
|
432
|
+
(root) => {
|
|
433
|
+
const clip = root.querySelector("[data-reveal]");
|
|
434
|
+
if (clip) revealClip(clip, 1100);
|
|
435
|
+
root.querySelectorAll("[data-sankey-node]").forEach((element, index) => {
|
|
436
|
+
element.animate(
|
|
437
|
+
[
|
|
438
|
+
{ opacity: 0, transform: "scaleY(0.4)" },
|
|
439
|
+
{ opacity: 1, transform: "scaleY(1)" },
|
|
440
|
+
],
|
|
441
|
+
{ duration: 420, delay: Math.min(index * 30, 300), easing: EASE_OUT, fill: "backwards" },
|
|
442
|
+
);
|
|
443
|
+
});
|
|
444
|
+
},
|
|
445
|
+
{ disabled: !animate, replayKey: graph.nodes.length * 1000 + graph.links.length },
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
const focus = hover?.focus ?? active ?? (pathTracing ? pinned : null);
|
|
449
|
+
const lit = useMemo(() => {
|
|
450
|
+
if (!focus) return null;
|
|
451
|
+
if (focus.kind === "node") {
|
|
452
|
+
const node = graph.nodes.find((candidate) => candidate.id === focus.id);
|
|
453
|
+
return node ? sankeyFlowOf(node) : null;
|
|
454
|
+
}
|
|
455
|
+
const link = graph.links.find((candidate) => candidate.id === focus.id);
|
|
456
|
+
if (!link) return null;
|
|
457
|
+
return pathTracing
|
|
458
|
+
? sankeyTraceOf(link)
|
|
459
|
+
: { nodes: new Set([link.source.id, link.target.id]), links: new Set([link.id]) };
|
|
460
|
+
}, [focus, graph, pathTracing]);
|
|
461
|
+
const pin = (next: Focus) =>
|
|
462
|
+
setPinned((current) => (current?.kind === next.kind && current.id === next.id ? null : next));
|
|
463
|
+
|
|
464
|
+
const pointer = (event: PointerEvent<Element>) => {
|
|
465
|
+
const box = containerRef.current?.getBoundingClientRect();
|
|
466
|
+
return box ? { x: event.clientX - box.left, y: event.clientY - box.top } : { x: 0, y: 0 };
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
// Keyboard order: column by column, top to bottom.
|
|
470
|
+
const ordered = useMemo(
|
|
471
|
+
() => [...graph.nodes].sort((a, b) => a.column - b.column || a.y0 - b.y0),
|
|
472
|
+
[graph.nodes],
|
|
473
|
+
);
|
|
474
|
+
const activeNode =
|
|
475
|
+
active?.kind === "node"
|
|
476
|
+
? graph.nodes.find((node) => node.id === active.id)
|
|
477
|
+
: active?.kind === "link"
|
|
478
|
+
? graph.links.find((link) => link.id === active.id)?.source
|
|
479
|
+
: undefined;
|
|
480
|
+
const activeLink =
|
|
481
|
+
active?.kind === "link" ? graph.links.find((link) => link.id === active.id) : undefined;
|
|
482
|
+
|
|
483
|
+
const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
|
|
484
|
+
const current = activeNode ?? null;
|
|
485
|
+
const column = (c: number) => ordered.filter((node) => node.column === c);
|
|
486
|
+
let next: Focus | null | undefined;
|
|
487
|
+
switch (event.key) {
|
|
488
|
+
case "ArrowDown":
|
|
489
|
+
case "ArrowUp": {
|
|
490
|
+
if (!current) next = ordered[0] ? { kind: "node", id: ordered[0].id } : null;
|
|
491
|
+
else {
|
|
492
|
+
const siblings = column(current.column);
|
|
493
|
+
const index = siblings.indexOf(current) + (event.key === "ArrowDown" ? 1 : -1);
|
|
494
|
+
const target = siblings[Math.max(0, Math.min(siblings.length - 1, index))];
|
|
495
|
+
next = target ? { kind: "node", id: target.id } : null;
|
|
496
|
+
}
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
case "ArrowLeft":
|
|
500
|
+
case "ArrowRight": {
|
|
501
|
+
if (!current) {
|
|
502
|
+
next = ordered[0] ? { kind: "node", id: ordered[0].id } : null;
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
const delta = event.key === "ArrowRight" ? 1 : -1;
|
|
506
|
+
let c = current.column + delta;
|
|
507
|
+
while (c >= 0 && c <= lastColumn && column(c).length === 0) c += delta;
|
|
508
|
+
const candidates = column(c);
|
|
509
|
+
if (candidates.length === 0) {
|
|
510
|
+
next = { kind: "node", id: current.id };
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
const mid = (current.y0 + current.y1) / 2;
|
|
514
|
+
const target = candidates.reduce((best, node) =>
|
|
515
|
+
Math.abs((node.y0 + node.y1) / 2 - mid) < Math.abs((best.y0 + best.y1) / 2 - mid)
|
|
516
|
+
? node
|
|
517
|
+
: best,
|
|
518
|
+
);
|
|
519
|
+
next = { kind: "node", id: target.id };
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
case "Home":
|
|
523
|
+
next = ordered[0] ? { kind: "node", id: ordered[0].id } : null;
|
|
524
|
+
break;
|
|
525
|
+
case "End": {
|
|
526
|
+
const last = ordered[ordered.length - 1];
|
|
527
|
+
next = last ? { kind: "node", id: last.id } : null;
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
case "Enter":
|
|
531
|
+
case " ": {
|
|
532
|
+
if (!current) break;
|
|
533
|
+
const flows = current.outgoing.length > 0 ? current.outgoing : current.incoming;
|
|
534
|
+
if (flows.length === 0) break;
|
|
535
|
+
const index = activeLink ? flows.indexOf(activeLink) + 1 : 0;
|
|
536
|
+
const link = flows[index % flows.length] as SankeyLink;
|
|
537
|
+
next = { kind: "link", id: link.id };
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
case "Escape":
|
|
541
|
+
next = activeLink && current ? { kind: "node", id: current.id } : null;
|
|
542
|
+
break;
|
|
543
|
+
default:
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
if (next === undefined) return;
|
|
547
|
+
event.preventDefault();
|
|
548
|
+
setHover(null);
|
|
549
|
+
setActive(next);
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
const shown = hover
|
|
553
|
+
? hover
|
|
554
|
+
: active
|
|
555
|
+
? active.kind === "node" && activeNode
|
|
556
|
+
? {
|
|
557
|
+
focus: active,
|
|
558
|
+
x: activeNode.column === lastColumn ? activeNode.x0 : activeNode.x1,
|
|
559
|
+
y: top + (activeNode.y0 + activeNode.y1) / 2,
|
|
560
|
+
}
|
|
561
|
+
: activeLink
|
|
562
|
+
? {
|
|
563
|
+
focus: active,
|
|
564
|
+
x: (activeLink.source.x1 + activeLink.target.x0) / 2,
|
|
565
|
+
y: top + (activeLink.y0 + activeLink.y1) / 2,
|
|
566
|
+
}
|
|
567
|
+
: null
|
|
568
|
+
: null;
|
|
569
|
+
|
|
570
|
+
const tip = shown
|
|
571
|
+
? tooltipContent(shown.focus, graph, colors, format, labels, total, diffById)
|
|
572
|
+
: null;
|
|
573
|
+
const valueText = activeLink
|
|
574
|
+
? linkText(activeLink, format, labels, total)
|
|
575
|
+
: activeNode
|
|
576
|
+
? nodeText(activeNode, format, labels, total)
|
|
577
|
+
: title;
|
|
578
|
+
|
|
579
|
+
return (
|
|
580
|
+
<div ref={containerRef} className="relative h-full w-full" style={{ height }}>
|
|
581
|
+
<svg
|
|
582
|
+
ref={svgRef}
|
|
583
|
+
role="img"
|
|
584
|
+
aria-label={title}
|
|
585
|
+
data-export-part=""
|
|
586
|
+
width={width}
|
|
587
|
+
height={height}
|
|
588
|
+
className="block overflow-visible"
|
|
589
|
+
>
|
|
590
|
+
<defs>
|
|
591
|
+
<clipPath id={`${uid}-reveal`}>
|
|
592
|
+
<rect
|
|
593
|
+
data-reveal=""
|
|
594
|
+
x={-2}
|
|
595
|
+
y={-2}
|
|
596
|
+
width={width + 4}
|
|
597
|
+
height={plotHeight + 4}
|
|
598
|
+
style={{ transformBox: "fill-box", transformOrigin: "left center" }}
|
|
599
|
+
/>
|
|
600
|
+
</clipPath>
|
|
601
|
+
{linkColor === "gradient"
|
|
602
|
+
? graph.links.map((link, index) => (
|
|
603
|
+
<linearGradient
|
|
604
|
+
key={link.id}
|
|
605
|
+
id={`${uid}-g${index}`}
|
|
606
|
+
gradientUnits="userSpaceOnUse"
|
|
607
|
+
x1={link.source.x1}
|
|
608
|
+
x2={link.target.x0}
|
|
609
|
+
y1={0}
|
|
610
|
+
y2={0}
|
|
611
|
+
>
|
|
612
|
+
<stop offset="0%" style={{ stopColor: colors.get(link.source.id) }} />
|
|
613
|
+
<stop offset="100%" style={{ stopColor: colors.get(link.target.id) }} />
|
|
614
|
+
</linearGradient>
|
|
615
|
+
))
|
|
616
|
+
: null}
|
|
617
|
+
</defs>
|
|
618
|
+
{columnTitles && top > 0 ? (
|
|
619
|
+
<g {...DECORATIVE}>
|
|
620
|
+
{columnTitles.slice(0, graph.columns).map((name, c) => {
|
|
621
|
+
const x = c * step + (c === 0 ? 0 : c === lastColumn ? nodeWidth : nodeWidth / 2);
|
|
622
|
+
const anchor = c === 0 ? "start" : c === lastColumn ? "end" : "middle";
|
|
623
|
+
const text = fitLabel(name, Math.max(40, step - 8), 11);
|
|
624
|
+
return text ? (
|
|
625
|
+
<text
|
|
626
|
+
key={name}
|
|
627
|
+
x={x}
|
|
628
|
+
y={12}
|
|
629
|
+
textAnchor={anchor}
|
|
630
|
+
className="select-none font-bold text-[11px] uppercase tracking-wide"
|
|
631
|
+
style={{ fill: "var(--ink-3)" }}
|
|
632
|
+
>
|
|
633
|
+
{text}
|
|
634
|
+
</text>
|
|
635
|
+
) : null;
|
|
636
|
+
})}
|
|
637
|
+
</g>
|
|
638
|
+
) : null}
|
|
639
|
+
<g transform={`translate(0,${top})`}>
|
|
640
|
+
<g clipPath={`url(#${uid}-reveal)`}>
|
|
641
|
+
<SankeyLinks
|
|
642
|
+
graph={graph}
|
|
643
|
+
colors={colors}
|
|
644
|
+
uid={uid}
|
|
645
|
+
linkColor={linkColor}
|
|
646
|
+
opacity={linkOpacity}
|
|
647
|
+
lit={lit?.links ?? null}
|
|
648
|
+
diffById={diffById}
|
|
649
|
+
onEnter={(link, event) =>
|
|
650
|
+
setHover({ focus: { kind: "link", id: link.id }, ...pointer(event) })
|
|
651
|
+
}
|
|
652
|
+
onLeave={() => setHover(null)}
|
|
653
|
+
onClick={(link) => {
|
|
654
|
+
if (pathTracing) pin({ kind: "link", id: link.id });
|
|
655
|
+
onLinkClick?.(link);
|
|
656
|
+
}}
|
|
657
|
+
/>
|
|
658
|
+
{particles && !reducedMotion ? (
|
|
659
|
+
<SankeyParticles graph={graph} lit={lit?.links ?? null} diffById={diffById} />
|
|
660
|
+
) : null}
|
|
661
|
+
</g>
|
|
662
|
+
<SankeyNodes
|
|
663
|
+
graph={graph}
|
|
664
|
+
colors={colors}
|
|
665
|
+
lit={lit?.nodes ?? null}
|
|
666
|
+
active={activeNode && !activeLink ? activeNode.id : null}
|
|
667
|
+
inside={inside}
|
|
668
|
+
onEnter={(node, event) =>
|
|
669
|
+
setHover({ focus: { kind: "node", id: node.id }, ...pointer(event) })
|
|
670
|
+
}
|
|
671
|
+
onLeave={() => setHover(null)}
|
|
672
|
+
onClick={(node) => {
|
|
673
|
+
if (pathTracing) pin({ kind: "node", id: node.id });
|
|
674
|
+
onNodeClick?.(node);
|
|
675
|
+
}}
|
|
676
|
+
/>
|
|
677
|
+
<SankeyNodeLabels
|
|
678
|
+
graph={graph}
|
|
679
|
+
format={format}
|
|
680
|
+
inside={inside}
|
|
681
|
+
showValues={showValues}
|
|
682
|
+
room={labelRoom}
|
|
683
|
+
lit={lit?.nodes ?? null}
|
|
684
|
+
/>
|
|
685
|
+
</g>
|
|
686
|
+
</svg>
|
|
687
|
+
|
|
688
|
+
<div
|
|
689
|
+
role="slider"
|
|
690
|
+
tabIndex={0}
|
|
691
|
+
aria-label={labels.explore}
|
|
692
|
+
aria-valuemin={1}
|
|
693
|
+
aria-valuemax={Math.max(1, ordered.length)}
|
|
694
|
+
aria-valuenow={activeNode ? ordered.indexOf(activeNode) + 1 : 1}
|
|
695
|
+
aria-valuetext={valueText}
|
|
696
|
+
onKeyDown={onKeyDown}
|
|
697
|
+
onFocus={(event) => {
|
|
698
|
+
if (event.currentTarget.matches(":focus-visible") && ordered[0]) {
|
|
699
|
+
const first = ordered[0];
|
|
700
|
+
setActive((current) => current ?? { kind: "node", id: first.id });
|
|
701
|
+
}
|
|
702
|
+
}}
|
|
703
|
+
onBlur={() => setActive(null)}
|
|
704
|
+
className="pointer-events-none absolute inset-0 rounded-xs outline-none focus-visible:outline-2 focus-visible:outline-accent-ink focus-visible:outline-offset-4"
|
|
705
|
+
/>
|
|
706
|
+
|
|
707
|
+
{tooltip && shown && tip ? (
|
|
708
|
+
<ChartTooltip
|
|
709
|
+
x={shown.x}
|
|
710
|
+
y={shown.y}
|
|
711
|
+
containerWidth={width}
|
|
712
|
+
title={tip.title}
|
|
713
|
+
rows={tip.rows}
|
|
714
|
+
/>
|
|
715
|
+
) : null}
|
|
716
|
+
</div>
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
function tooltipContent(
|
|
721
|
+
focus: Focus,
|
|
722
|
+
graph: SankeyGraph,
|
|
723
|
+
colors: Map<string, string>,
|
|
724
|
+
format: ValueFormatter,
|
|
725
|
+
labels: SankeyLabels,
|
|
726
|
+
total: number,
|
|
727
|
+
diffById: ReadonlyMap<string, SankeyDiffLink> | null,
|
|
728
|
+
): { title: string; rows: TooltipRow[] } | null {
|
|
729
|
+
if (focus.kind === "link") {
|
|
730
|
+
const link = graph.links.find((candidate) => candidate.id === focus.id);
|
|
731
|
+
if (!link) return null;
|
|
732
|
+
const entry = diffById?.get(link.id);
|
|
733
|
+
if (entry) {
|
|
734
|
+
const tone =
|
|
735
|
+
entry.delta > 0
|
|
736
|
+
? "var(--chart-up)"
|
|
737
|
+
: entry.delta < 0
|
|
738
|
+
? "var(--chart-down)"
|
|
739
|
+
: "var(--ink-3)";
|
|
740
|
+
return {
|
|
741
|
+
title: `${link.source.name} → ${link.target.name}`,
|
|
742
|
+
rows: [
|
|
743
|
+
{
|
|
744
|
+
id: "before",
|
|
745
|
+
name: labels.before,
|
|
746
|
+
value: format(entry.before),
|
|
747
|
+
color: "var(--ink-3)",
|
|
748
|
+
},
|
|
749
|
+
{ id: "after", name: labels.after, value: format(entry.after), color: tone },
|
|
750
|
+
{
|
|
751
|
+
id: "change",
|
|
752
|
+
name: labels.change,
|
|
753
|
+
value: signed(entry, format) || "0",
|
|
754
|
+
color: "transparent",
|
|
755
|
+
emphasis: true,
|
|
756
|
+
},
|
|
757
|
+
],
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
title: `${link.source.name} → ${link.target.name}`,
|
|
762
|
+
rows: [
|
|
763
|
+
{
|
|
764
|
+
id: "value",
|
|
765
|
+
name: labels.value,
|
|
766
|
+
value: format(link.value),
|
|
767
|
+
color: colors.get(link.source.id) as string,
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
id: "source",
|
|
771
|
+
name: `${labels.ofSource} ${link.source.name}`,
|
|
772
|
+
value: percent(link.value / link.source.value),
|
|
773
|
+
color: "transparent",
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
id: "total",
|
|
777
|
+
name: labels.ofTotal,
|
|
778
|
+
value: percent(total > 0 ? link.value / total : 0),
|
|
779
|
+
color: "transparent",
|
|
780
|
+
},
|
|
781
|
+
],
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
const node = graph.nodes.find((candidate) => candidate.id === focus.id);
|
|
785
|
+
if (!node) return null;
|
|
786
|
+
const color = colors.get(node.id) as string;
|
|
787
|
+
if (diffById) {
|
|
788
|
+
const flows = node.outgoing.length > 0 ? node.outgoing : node.incoming;
|
|
789
|
+
const sum = (pick: (entry: SankeyDiffLink) => number) =>
|
|
790
|
+
flows.reduce((acc, link) => acc + pick(diffById.get(link.id) as SankeyDiffLink), 0);
|
|
791
|
+
const before = sum((entry) => entry.before);
|
|
792
|
+
const after = sum((entry) => entry.after);
|
|
793
|
+
const delta = after - before;
|
|
794
|
+
return {
|
|
795
|
+
title: node.name,
|
|
796
|
+
rows: [
|
|
797
|
+
{ id: "before", name: labels.before, value: format(before), color: "var(--ink-3)" },
|
|
798
|
+
{ id: "after", name: labels.after, value: format(after), color },
|
|
799
|
+
{
|
|
800
|
+
id: "change",
|
|
801
|
+
name: labels.change,
|
|
802
|
+
value: signed({ source: "", target: "", value: 0, before, after, delta }, format) || "0",
|
|
803
|
+
color: "transparent",
|
|
804
|
+
emphasis: true,
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
const rows: TooltipRow[] = [
|
|
810
|
+
{
|
|
811
|
+
id: "value",
|
|
812
|
+
name: labels.value,
|
|
813
|
+
value: format(node.value),
|
|
814
|
+
color,
|
|
815
|
+
note: percent(total > 0 ? node.value / total : 0),
|
|
816
|
+
},
|
|
817
|
+
];
|
|
818
|
+
if (node.incoming.length > 0 && node.outgoing.length > 0 && node.inValue !== node.outValue) {
|
|
819
|
+
rows.push(
|
|
820
|
+
{ id: "in", name: labels.incoming, value: format(node.inValue), color: "transparent" },
|
|
821
|
+
{ id: "out", name: labels.outgoing, value: format(node.outValue), color: "transparent" },
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
const flows = node.outgoing.length > 0 ? node.outgoing : node.incoming;
|
|
825
|
+
for (const link of [...flows].sort((a, b) => b.value - a.value).slice(0, 4)) {
|
|
826
|
+
const other = link.source === node ? link.target : link.source;
|
|
827
|
+
rows.push({
|
|
828
|
+
id: link.id,
|
|
829
|
+
name: `${link.source === node ? "→" : "←"} ${other.name}`,
|
|
830
|
+
value: format(link.value),
|
|
831
|
+
color: colors.get(other.id) as string,
|
|
832
|
+
note: percent(link.value / node.value),
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
return { title: node.name, rows };
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function nodeText(
|
|
839
|
+
node: SankeyNode,
|
|
840
|
+
format: ValueFormatter,
|
|
841
|
+
labels: SankeyLabels,
|
|
842
|
+
total: number,
|
|
843
|
+
): string {
|
|
844
|
+
const flows = node.outgoing.length > 0 ? node.outgoing : node.incoming;
|
|
845
|
+
const parts = flows.map((link) => {
|
|
846
|
+
const other = link.source === node ? link.target : link.source;
|
|
847
|
+
return `${other.name} ${format(link.value)}`;
|
|
848
|
+
});
|
|
849
|
+
return `${node.name}: ${format(node.value)}, ${labels.ofTotal} ${percent(
|
|
850
|
+
total > 0 ? node.value / total : 0,
|
|
851
|
+
)}. ${parts.join(", ")}`;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
function linkText(
|
|
855
|
+
link: SankeyLink,
|
|
856
|
+
format: ValueFormatter,
|
|
857
|
+
labels: SankeyLabels,
|
|
858
|
+
total: number,
|
|
859
|
+
): string {
|
|
860
|
+
return `${link.source.name} → ${link.target.name}: ${format(link.value)}, ${percent(
|
|
861
|
+
link.value / link.source.value,
|
|
862
|
+
)} ${labels.ofSource} ${link.source.name}, ${percent(total > 0 ? link.value / total : 0)} ${labels.ofTotal}`;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
interface SankeyLinksProps {
|
|
866
|
+
graph: SankeyGraph;
|
|
867
|
+
colors: Map<string, string>;
|
|
868
|
+
uid: string;
|
|
869
|
+
linkColor: NonNullable<SankeyChartProps["linkColor"]>;
|
|
870
|
+
opacity: number;
|
|
871
|
+
lit: ReadonlySet<string> | null;
|
|
872
|
+
diffById: ReadonlyMap<string, SankeyDiffLink> | null;
|
|
873
|
+
onEnter: (link: SankeyLink, event: PointerEvent<SVGPathElement>) => void;
|
|
874
|
+
onLeave: () => void;
|
|
875
|
+
onClick?: (link: SankeyLink) => void;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
const SankeyLinks = memo(function SankeyLinks({
|
|
879
|
+
graph,
|
|
880
|
+
colors,
|
|
881
|
+
uid,
|
|
882
|
+
linkColor,
|
|
883
|
+
opacity,
|
|
884
|
+
lit,
|
|
885
|
+
diffById,
|
|
886
|
+
onEnter,
|
|
887
|
+
onLeave,
|
|
888
|
+
onClick,
|
|
889
|
+
}: SankeyLinksProps) {
|
|
890
|
+
return (
|
|
891
|
+
<g fill="none">
|
|
892
|
+
{diffById
|
|
893
|
+
? graph.links.map((link) => {
|
|
894
|
+
const entry = diffById.get(link.id);
|
|
895
|
+
if (!entry) return null;
|
|
896
|
+
const on = lit ? lit.has(link.id) : null;
|
|
897
|
+
const fade = on === null ? 1 : on ? 1 : 0.2;
|
|
898
|
+
const color =
|
|
899
|
+
entry.delta > 0
|
|
900
|
+
? "var(--chart-up)"
|
|
901
|
+
: entry.delta < 0
|
|
902
|
+
? "var(--chart-down)"
|
|
903
|
+
: "var(--ink-3)";
|
|
904
|
+
const d = sankeyLinkPath(link);
|
|
905
|
+
return (
|
|
906
|
+
<g key={`diff-${link.id}`} className="pointer-events-none">
|
|
907
|
+
<path
|
|
908
|
+
d={d}
|
|
909
|
+
strokeWidth={Math.max(1, entry.before * graph.ky)}
|
|
910
|
+
style={{ stroke: "var(--ink-3)", strokeOpacity: 0.2 * fade }}
|
|
911
|
+
/>
|
|
912
|
+
{entry.after > 0 ? (
|
|
913
|
+
<path
|
|
914
|
+
d={d}
|
|
915
|
+
strokeWidth={Math.max(1, entry.after * graph.ky)}
|
|
916
|
+
className="motion-safe:transition-[stroke-opacity] motion-safe:duration-150"
|
|
917
|
+
style={{ stroke: color, strokeOpacity: (on ? 0.8 : 0.58) * fade }}
|
|
918
|
+
/>
|
|
919
|
+
) : (
|
|
920
|
+
<path
|
|
921
|
+
d={d}
|
|
922
|
+
strokeWidth={Math.max(1, entry.before * graph.ky)}
|
|
923
|
+
strokeDasharray="5 4"
|
|
924
|
+
style={{ stroke: color, strokeOpacity: 0.7 * fade }}
|
|
925
|
+
/>
|
|
926
|
+
)}
|
|
927
|
+
</g>
|
|
928
|
+
);
|
|
929
|
+
})
|
|
930
|
+
: null}
|
|
931
|
+
{graph.links.map((link, index) => {
|
|
932
|
+
const stroke =
|
|
933
|
+
linkColor === "gradient"
|
|
934
|
+
? `url(#${uid}-g${index})`
|
|
935
|
+
: linkColor === "source"
|
|
936
|
+
? colors.get(link.source.id)
|
|
937
|
+
: linkColor === "target"
|
|
938
|
+
? colors.get(link.target.id)
|
|
939
|
+
: "var(--ink-3)";
|
|
940
|
+
const on = lit ? lit.has(link.id) : null;
|
|
941
|
+
return (
|
|
942
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: pointer shortcut; keyboard users explore through the slider.
|
|
943
|
+
<path
|
|
944
|
+
key={link.id}
|
|
945
|
+
d={sankeyLinkPath(link)}
|
|
946
|
+
strokeWidth={Math.max(1, link.width)}
|
|
947
|
+
className="cursor-pointer motion-safe:transition-[stroke-opacity] motion-safe:duration-150"
|
|
948
|
+
style={{
|
|
949
|
+
stroke: diffById ? "transparent" : stroke,
|
|
950
|
+
strokeOpacity: diffById
|
|
951
|
+
? 0
|
|
952
|
+
: on === null
|
|
953
|
+
? opacity
|
|
954
|
+
: on
|
|
955
|
+
? Math.min(1, opacity + 0.3)
|
|
956
|
+
: 0.07,
|
|
957
|
+
pointerEvents: "stroke",
|
|
958
|
+
}}
|
|
959
|
+
onPointerEnter={(event) => onEnter(link, event)}
|
|
960
|
+
onPointerMove={(event) => onEnter(link, event)}
|
|
961
|
+
onPointerLeave={onLeave}
|
|
962
|
+
onClick={() => onClick?.(link)}
|
|
963
|
+
/>
|
|
964
|
+
);
|
|
965
|
+
})}
|
|
966
|
+
</g>
|
|
967
|
+
);
|
|
968
|
+
});
|
|
969
|
+
|
|
970
|
+
interface SankeyNodesProps {
|
|
971
|
+
graph: SankeyGraph;
|
|
972
|
+
colors: Map<string, string>;
|
|
973
|
+
lit: ReadonlySet<string> | null;
|
|
974
|
+
active: string | null;
|
|
975
|
+
/** Labels sit on the bars: a soft fill keeps them readable. */
|
|
976
|
+
inside: boolean;
|
|
977
|
+
onEnter: (node: SankeyNode, event: PointerEvent<SVGRectElement>) => void;
|
|
978
|
+
onLeave: () => void;
|
|
979
|
+
onClick?: (node: SankeyNode) => void;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
function SankeyNodes({
|
|
983
|
+
graph,
|
|
984
|
+
colors,
|
|
985
|
+
lit,
|
|
986
|
+
active,
|
|
987
|
+
inside,
|
|
988
|
+
onEnter,
|
|
989
|
+
onLeave,
|
|
990
|
+
onClick,
|
|
991
|
+
}: SankeyNodesProps) {
|
|
992
|
+
return (
|
|
993
|
+
<g>
|
|
994
|
+
{graph.nodes.map((node) => (
|
|
995
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: pointer shortcut; keyboard users explore through the slider.
|
|
996
|
+
<rect
|
|
997
|
+
key={node.id}
|
|
998
|
+
data-sankey-node=""
|
|
999
|
+
x={node.x0}
|
|
1000
|
+
y={node.y0}
|
|
1001
|
+
width={node.x1 - node.x0}
|
|
1002
|
+
height={Math.max(1, node.y1 - node.y0)}
|
|
1003
|
+
rx={Math.min(3, (node.x1 - node.x0) / 2)}
|
|
1004
|
+
className="cursor-pointer motion-safe:transition-opacity motion-safe:duration-150"
|
|
1005
|
+
style={{
|
|
1006
|
+
fill: inside ? tint(colors.get(node.id) as string, 30) : colors.get(node.id),
|
|
1007
|
+
opacity: lit && !lit.has(node.id) ? 0.35 : 1,
|
|
1008
|
+
stroke: active === node.id ? "var(--ink)" : inside ? colors.get(node.id) : "none",
|
|
1009
|
+
strokeWidth: active === node.id ? 2 : 1,
|
|
1010
|
+
transformBox: "fill-box",
|
|
1011
|
+
transformOrigin: "center",
|
|
1012
|
+
}}
|
|
1013
|
+
onPointerEnter={(event) => onEnter(node, event)}
|
|
1014
|
+
onPointerMove={(event) => onEnter(node, event)}
|
|
1015
|
+
onPointerLeave={onLeave}
|
|
1016
|
+
onClick={() => onClick?.(node)}
|
|
1017
|
+
/>
|
|
1018
|
+
))}
|
|
1019
|
+
</g>
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
interface SankeyNodeLabelsProps {
|
|
1024
|
+
graph: SankeyGraph;
|
|
1025
|
+
format: ValueFormatter;
|
|
1026
|
+
inside: boolean;
|
|
1027
|
+
showValues: boolean;
|
|
1028
|
+
/** Horizontal room for a label. */
|
|
1029
|
+
room: number;
|
|
1030
|
+
lit: ReadonlySet<string> | null;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/** Names (and values) beside or on the bars; hidden where they do not fit. */
|
|
1034
|
+
function SankeyNodeLabels({ graph, format, inside, showValues, room, lit }: SankeyNodeLabelsProps) {
|
|
1035
|
+
if (room < 40) return null;
|
|
1036
|
+
const last = graph.columns - 1;
|
|
1037
|
+
return (
|
|
1038
|
+
<g {...DECORATIVE} className="pointer-events-none select-none">
|
|
1039
|
+
{graph.nodes.map((node) => {
|
|
1040
|
+
const tall = node.y1 - node.y0;
|
|
1041
|
+
if (tall < 10) return null;
|
|
1042
|
+
const end = !inside && node.column === last && last > 0;
|
|
1043
|
+
const x = inside ? node.x0 + 6 : end ? node.x0 - LABEL_GAP : node.x1 + LABEL_GAP;
|
|
1044
|
+
const name = fitLabel(node.name, room, 12);
|
|
1045
|
+
if (!name) return null;
|
|
1046
|
+
const value = format(node.value);
|
|
1047
|
+
const twoLines = showValues && tall >= 32;
|
|
1048
|
+
const oneLine =
|
|
1049
|
+
showValues &&
|
|
1050
|
+
!twoLines &&
|
|
1051
|
+
name === node.name &&
|
|
1052
|
+
estimateTextWidth(`${node.name} ${value}`, 12) <= room;
|
|
1053
|
+
const y = (node.y0 + node.y1) / 2;
|
|
1054
|
+
return (
|
|
1055
|
+
<text
|
|
1056
|
+
key={node.id}
|
|
1057
|
+
x={x}
|
|
1058
|
+
y={twoLines ? y - 7 : y}
|
|
1059
|
+
dominantBaseline="middle"
|
|
1060
|
+
textAnchor={end ? "end" : "start"}
|
|
1061
|
+
className="font-semibold text-[12px] motion-safe:transition-opacity motion-safe:duration-150"
|
|
1062
|
+
style={{
|
|
1063
|
+
fill: "var(--ink)",
|
|
1064
|
+
opacity: lit && !lit.has(node.id) ? 0.4 : 1,
|
|
1065
|
+
}}
|
|
1066
|
+
>
|
|
1067
|
+
{name}
|
|
1068
|
+
{oneLine ? (
|
|
1069
|
+
<tspan dx={6} className="font-bold tabular-nums" style={{ fill: "var(--ink-3)" }}>
|
|
1070
|
+
{value}
|
|
1071
|
+
</tspan>
|
|
1072
|
+
) : null}
|
|
1073
|
+
{twoLines ? (
|
|
1074
|
+
<tspan
|
|
1075
|
+
x={x}
|
|
1076
|
+
dy={15}
|
|
1077
|
+
className="font-bold text-[11px] tabular-nums"
|
|
1078
|
+
style={{ fill: inside ? "var(--ink-2)" : "var(--ink-3)" }}
|
|
1079
|
+
>
|
|
1080
|
+
{value}
|
|
1081
|
+
</tspan>
|
|
1082
|
+
) : null}
|
|
1083
|
+
</text>
|
|
1084
|
+
);
|
|
1085
|
+
})}
|
|
1086
|
+
</g>
|
|
1087
|
+
);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
interface SankeyParticlesProps {
|
|
1091
|
+
graph: SankeyGraph;
|
|
1092
|
+
lit: ReadonlySet<string> | null;
|
|
1093
|
+
diffById: ReadonlyMap<string, SankeyDiffLink> | null;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** Dots that travel along the bands; slower and fewer on thin bands. Skipped by the SVG export. */
|
|
1097
|
+
const SankeyParticles = memo(function SankeyParticles({
|
|
1098
|
+
graph,
|
|
1099
|
+
lit,
|
|
1100
|
+
diffById,
|
|
1101
|
+
}: SankeyParticlesProps) {
|
|
1102
|
+
return (
|
|
1103
|
+
<g {...DECORATIVE} data-export-skip="" className="pointer-events-none">
|
|
1104
|
+
{graph.links.map((link) => {
|
|
1105
|
+
if (lit && !lit.has(link.id)) return null;
|
|
1106
|
+
const width = diffById ? (diffById.get(link.id)?.after ?? 0) * graph.ky : link.width;
|
|
1107
|
+
if (width < 3) return null;
|
|
1108
|
+
const d = sankeyLinkPath(link);
|
|
1109
|
+
const length = Math.hypot(link.target.x0 - link.source.x1, link.y1 - link.y0) * 1.1;
|
|
1110
|
+
const duration = Math.min(14, Math.max(3.5, length / 42));
|
|
1111
|
+
const count = Math.min(5, Math.max(1, Math.round(width / 6)));
|
|
1112
|
+
const radius = Math.min(2.6, Math.max(1.3, width * 0.16));
|
|
1113
|
+
return Array.from({ length: count }, (_, i) => (
|
|
1114
|
+
<circle
|
|
1115
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: fixed particle slots per link.
|
|
1116
|
+
key={`${link.id}-${i}`}
|
|
1117
|
+
r={radius}
|
|
1118
|
+
style={{ fill: "var(--surface)", fillOpacity: 0.92 }}
|
|
1119
|
+
>
|
|
1120
|
+
<animateMotion
|
|
1121
|
+
dur={`${duration}s`}
|
|
1122
|
+
begin={`-${((i / count) * duration).toFixed(2)}s`}
|
|
1123
|
+
repeatCount="indefinite"
|
|
1124
|
+
path={d}
|
|
1125
|
+
/>
|
|
1126
|
+
<animate
|
|
1127
|
+
attributeName="opacity"
|
|
1128
|
+
values="0;1;1;0"
|
|
1129
|
+
keyTimes="0;0.12;0.88;1"
|
|
1130
|
+
dur={`${duration}s`}
|
|
1131
|
+
begin={`-${((i / count) * duration).toFixed(2)}s`}
|
|
1132
|
+
repeatCount="indefinite"
|
|
1133
|
+
/>
|
|
1134
|
+
</circle>
|
|
1135
|
+
));
|
|
1136
|
+
})}
|
|
1137
|
+
</g>
|
|
1138
|
+
);
|
|
1139
|
+
});
|