@misoto22/folio 0.0.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +88 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +208 -2
- package/bin/folio-design.mjs +277 -0
- package/bin/migrate-legacy.mjs +81 -0
- package/dist/agent/Accordion.md +65 -0
- package/dist/agent/Actions.md +49 -0
- package/dist/agent/Alert.md +65 -0
- package/dist/agent/AppShell.md +69 -0
- package/dist/agent/ArchitectureFigure.md +72 -0
- package/dist/agent/AreaChart.md +94 -0
- package/dist/agent/Article.md +65 -0
- package/dist/agent/AspectRatio.md +58 -0
- package/dist/agent/Avatar.md +53 -0
- package/dist/agent/Badge.md +62 -0
- package/dist/agent/BarChart.md +93 -0
- package/dist/agent/BarList.md +67 -0
- package/dist/agent/BigNumber.md +70 -0
- package/dist/agent/BoxPlot.md +82 -0
- package/dist/agent/Breadcrumb.md +55 -0
- package/dist/agent/BulletChart.md +71 -0
- package/dist/agent/Button.md +81 -0
- package/dist/agent/Calendar.md +77 -0
- package/dist/agent/CalendarHeatmap.md +75 -0
- package/dist/agent/Card.md +72 -0
- package/dist/agent/Checkbox.md +57 -0
- package/dist/agent/Code.md +51 -0
- package/dist/agent/CodeBlock.md +77 -0
- package/dist/agent/Collapsible.md +68 -0
- package/dist/agent/Collection.md +169 -0
- package/dist/agent/ColorPicker.md +76 -0
- package/dist/agent/Combobox.md +77 -0
- package/dist/agent/Command.md +122 -0
- package/dist/agent/ComposedChart.md +82 -0
- package/dist/agent/Contact.md +90 -0
- package/dist/agent/Content.md +70 -0
- package/dist/agent/ContextMenu.md +93 -0
- package/dist/agent/Conversation.md +247 -0
- package/dist/agent/DataflowFigure.md +49 -0
- package/dist/agent/DatePicker.md +104 -0
- package/dist/agent/DescriptionList.md +69 -0
- package/dist/agent/Diagram.md +71 -0
- package/dist/agent/DiagramCanvas.md +71 -0
- package/dist/agent/DiagramExportMenu.md +65 -0
- package/dist/agent/DiagramInspector.md +73 -0
- package/dist/agent/DiagramLegend.md +56 -0
- package/dist/agent/DiagramMinimap.md +69 -0
- package/dist/agent/DiagramToolbar.md +70 -0
- package/dist/agent/Dialog.md +76 -0
- package/dist/agent/DropdownMenu.md +110 -0
- package/dist/agent/EmptyState.md +63 -0
- package/dist/agent/ErrorState.md +67 -0
- package/dist/agent/Evidence.md +165 -0
- package/dist/agent/Facet.md +107 -0
- package/dist/agent/Field.md +79 -0
- package/dist/agent/FigureBand.md +49 -0
- package/dist/agent/FloatingIconButton.md +61 -0
- package/dist/agent/FunnelChart.md +75 -0
- package/dist/agent/Heading.md +65 -0
- package/dist/agent/Heatmap.md +78 -0
- package/dist/agent/Histogram.md +88 -0
- package/dist/agent/Input.md +52 -0
- package/dist/agent/Kbd.md +48 -0
- package/dist/agent/LifecycleFigure.md +50 -0
- package/dist/agent/LineChart.md +85 -0
- package/dist/agent/LinkArrow.md +49 -0
- package/dist/agent/Markdown.md +69 -0
- package/dist/agent/Media.md +261 -0
- package/dist/agent/Metric.md +70 -0
- package/dist/agent/Metrics.md +114 -0
- package/dist/agent/Music.md +86 -0
- package/dist/agent/NativeSelect.md +62 -0
- package/dist/agent/NavItem.md +56 -0
- package/dist/agent/NumberField.md +73 -0
- package/dist/agent/PageHeader.md +69 -0
- package/dist/agent/Pagination.md +70 -0
- package/dist/agent/PieChart.md +80 -0
- package/dist/agent/Popover.md +80 -0
- package/dist/agent/Portfolio.md +93 -0
- package/dist/agent/PortfolioIndex.md +34 -0
- package/dist/agent/Progress.md +58 -0
- package/dist/agent/RadarChart.md +79 -0
- package/dist/agent/RadialChart.md +81 -0
- package/dist/agent/RadioGroup.md +66 -0
- package/dist/agent/Reading.md +233 -0
- package/dist/agent/Recovery.md +72 -0
- package/dist/agent/SankeyChart.md +85 -0
- package/dist/agent/ScatterChart.md +80 -0
- package/dist/agent/ScrollArea.md +62 -0
- package/dist/agent/SearchPalette.md +51 -0
- package/dist/agent/SearchableMenu.md +69 -0
- package/dist/agent/Select.md +102 -0
- package/dist/agent/Separator.md +60 -0
- package/dist/agent/SequenceFigure.md +51 -0
- package/dist/agent/Sheet.md +82 -0
- package/dist/agent/Sidebar.md +194 -0
- package/dist/agent/SiteNavigation.md +62 -0
- package/dist/agent/SiteShell.md +67 -0
- package/dist/agent/Skeleton.md +96 -0
- package/dist/agent/Slider.md +67 -0
- package/dist/agent/Sparkline.md +68 -0
- package/dist/agent/Spinner.md +62 -0
- package/dist/agent/StatusDot.md +56 -0
- package/dist/agent/StatusPill.md +55 -0
- package/dist/agent/Steps.md +68 -0
- package/dist/agent/Switch.md +50 -0
- package/dist/agent/Table.md +111 -0
- package/dist/agent/Tabs.md +71 -0
- package/dist/agent/Tag.md +67 -0
- package/dist/agent/Text.md +66 -0
- package/dist/agent/Textarea.md +46 -0
- package/dist/agent/Timeline.md +114 -0
- package/dist/agent/Timestamp.md +65 -0
- package/dist/agent/Toast.md +51 -0
- package/dist/agent/ToggleGroup.md +67 -0
- package/dist/agent/Toolbar.md +72 -0
- package/dist/agent/Tooltip.md +74 -0
- package/dist/agent/TreemapChart.md +76 -0
- package/dist/agent/WaterfallChart.md +86 -0
- package/dist/agent/WorkflowFigure.md +51 -0
- package/dist/agent/catalog.json +8006 -0
- package/dist/agent/index.md +182 -0
- package/dist/article.css +407 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
- package/dist/charts/AreaChart/AreaChart.js +479 -0
- package/dist/charts/AreaChart/AreaChart.js.map +1 -0
- package/dist/charts/BarChart/BarChart.d.ts +190 -0
- package/dist/charts/BarChart/BarChart.js +599 -0
- package/dist/charts/BarChart/BarChart.js.map +1 -0
- package/dist/charts/BarList/BarList.d.ts +65 -0
- package/dist/charts/BarList/BarList.js +79 -0
- package/dist/charts/BarList/BarList.js.map +1 -0
- package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
- package/dist/charts/BigNumber/BigNumber.js +51 -0
- package/dist/charts/BigNumber/BigNumber.js.map +1 -0
- package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
- package/dist/charts/BoxPlot/BoxPlot.js +497 -0
- package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
- package/dist/charts/BulletChart/BulletChart.js +197 -0
- package/dist/charts/BulletChart/BulletChart.js.map +1 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
- package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
- package/dist/charts/ComposedChart/ComposedChart.js +667 -0
- package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
- package/dist/charts/Facet/Facet.d.ts +240 -0
- package/dist/charts/Facet/Facet.js +133 -0
- package/dist/charts/Facet/Facet.js.map +1 -0
- package/dist/charts/Facet/panels.d.ts +187 -0
- package/dist/charts/Facet/panels.js +203 -0
- package/dist/charts/Facet/panels.js.map +1 -0
- package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
- package/dist/charts/FunnelChart/FunnelChart.js +137 -0
- package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
- package/dist/charts/Heatmap/Heatmap.js +125 -0
- package/dist/charts/Heatmap/Heatmap.js.map +1 -0
- package/dist/charts/Histogram/Histogram.d.ts +188 -0
- package/dist/charts/Histogram/Histogram.js +382 -0
- package/dist/charts/Histogram/Histogram.js.map +1 -0
- package/dist/charts/LineChart/LineChart.d.ts +174 -0
- package/dist/charts/LineChart/LineChart.js +485 -0
- package/dist/charts/LineChart/LineChart.js.map +1 -0
- package/dist/charts/PieChart/PieChart.d.ts +140 -0
- package/dist/charts/PieChart/PieChart.js +317 -0
- package/dist/charts/PieChart/PieChart.js.map +1 -0
- package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
- package/dist/charts/RadarChart/RadarChart.js +303 -0
- package/dist/charts/RadarChart/RadarChart.js.map +1 -0
- package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
- package/dist/charts/RadialChart/RadialChart.js +279 -0
- package/dist/charts/RadialChart/RadialChart.js.map +1 -0
- package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
- package/dist/charts/SankeyChart/SankeyChart.js +509 -0
- package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
- package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
- package/dist/charts/ScatterChart/ScatterChart.js +275 -0
- package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
- package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
- package/dist/charts/Sparkline/Sparkline.js +95 -0
- package/dist/charts/Sparkline/Sparkline.js.map +1 -0
- package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
- package/dist/charts/TreemapChart/TreemapChart.js +127 -0
- package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
- package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
- package/dist/charts/index.d.ts +43 -0
- package/dist/charts/index.js +130 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/lib/annotations.d.ts +103 -0
- package/dist/charts/lib/annotations.js +99 -0
- package/dist/charts/lib/annotations.js.map +1 -0
- package/dist/charts/lib/axis.d.ts +18 -0
- package/dist/charts/lib/axis.js +21 -0
- package/dist/charts/lib/axis.js.map +1 -0
- package/dist/charts/lib/background.d.ts +33 -0
- package/dist/charts/lib/background.js +173 -0
- package/dist/charts/lib/background.js.map +1 -0
- package/dist/charts/lib/brush.d.ts +94 -0
- package/dist/charts/lib/brush.js +535 -0
- package/dist/charts/lib/brush.js.map +1 -0
- package/dist/charts/lib/chart.d.ts +94 -0
- package/dist/charts/lib/chart.js +149 -0
- package/dist/charts/lib/chart.js.map +1 -0
- package/dist/charts/lib/dot.d.ts +29 -0
- package/dist/charts/lib/dot.js +78 -0
- package/dist/charts/lib/dot.js.map +1 -0
- package/dist/charts/lib/empty.d.ts +31 -0
- package/dist/charts/lib/empty.js +24 -0
- package/dist/charts/lib/empty.js.map +1 -0
- package/dist/charts/lib/export.d.ts +94 -0
- package/dist/charts/lib/export.js +62 -0
- package/dist/charts/lib/export.js.map +1 -0
- package/dist/charts/lib/figure.d.ts +81 -0
- package/dist/charts/lib/figure.js +62 -0
- package/dist/charts/lib/figure.js.map +1 -0
- package/dist/charts/lib/format.d.ts +46 -0
- package/dist/charts/lib/format.js +56 -0
- package/dist/charts/lib/format.js.map +1 -0
- package/dist/charts/lib/legend.d.ts +45 -0
- package/dist/charts/lib/legend.js +117 -0
- package/dist/charts/lib/legend.js.map +1 -0
- package/dist/charts/lib/loading.d.ts +48 -0
- package/dist/charts/lib/loading.js +105 -0
- package/dist/charts/lib/loading.js.map +1 -0
- package/dist/charts/lib/paint.d.ts +154 -0
- package/dist/charts/lib/paint.js +551 -0
- package/dist/charts/lib/paint.js.map +1 -0
- package/dist/charts/lib/scale.d.ts +23 -0
- package/dist/charts/lib/scale.js +13 -0
- package/dist/charts/lib/scale.js.map +1 -0
- package/dist/charts/lib/selection.d.ts +20 -0
- package/dist/charts/lib/selection.js +18 -0
- package/dist/charts/lib/selection.js.map +1 -0
- package/dist/charts/lib/sonify-control.d.ts +163 -0
- package/dist/charts/lib/sonify-control.js +172 -0
- package/dist/charts/lib/sonify-control.js.map +1 -0
- package/dist/charts/lib/sonify.d.ts +248 -0
- package/dist/charts/lib/sonify.js +262 -0
- package/dist/charts/lib/sonify.js.map +1 -0
- package/dist/charts/lib/toolbar.d.ts +144 -0
- package/dist/charts/lib/toolbar.js +156 -0
- package/dist/charts/lib/toolbar.js.map +1 -0
- package/dist/charts/lib/tooltip.d.ts +59 -0
- package/dist/charts/lib/tooltip.js +135 -0
- package/dist/charts/lib/tooltip.js.map +1 -0
- package/dist/charts/lib/values.d.ts +56 -0
- package/dist/charts/lib/values.js +71 -0
- package/dist/charts/lib/values.js.map +1 -0
- package/dist/charts/lib/zoom.d.ts +139 -0
- package/dist/charts/lib/zoom.js +314 -0
- package/dist/charts/lib/zoom.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +34 -0
- package/dist/components/Accordion/Accordion.js +43 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.js +49 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.js +126 -0
- package/dist/components/AppShell/AppShell.js.map +1 -0
- package/dist/components/Article/Article.d.ts +58 -0
- package/dist/components/Article/Article.js +34 -0
- package/dist/components/Article/Article.js.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
- package/dist/components/AspectRatio/AspectRatio.js +33 -0
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +38 -0
- package/dist/components/Avatar/Avatar.js +44 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +30 -0
- package/dist/components/Badge/Badge.js +29 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Button/Button.d.ts +70 -0
- package/dist/components/Button/Button.js +95 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +54 -0
- package/dist/components/Calendar/Calendar.js +369 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Card/Card.d.ts +55 -0
- package/dist/components/Card/Card.js +64 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox/Checkbox.js +34 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Code/Code.d.ts +30 -0
- package/dist/components/Code/Code.js +21 -0
- package/dist/components/Code/Code.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
- package/dist/components/CodeBlock/CodeBlock.js +114 -0
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +45 -0
- package/dist/components/Collapsible/Collapsible.js +60 -0
- package/dist/components/Collapsible/Collapsible.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
- package/dist/components/ColorPicker/ColorPicker.js +334 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +77 -0
- package/dist/components/Combobox/Combobox.js +170 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Command/Command.d.ts +125 -0
- package/dist/components/Command/Command.js +204 -0
- package/dist/components/Command/Command.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
- package/dist/components/ContextMenu/ContextMenu.js +109 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +130 -0
- package/dist/components/DatePicker/DatePicker.js +257 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
- package/dist/components/DescriptionList/DescriptionList.js +35 -0
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Diagram/Diagram.d.ts +86 -0
- package/dist/components/Diagram/Diagram.js +211 -0
- package/dist/components/Diagram/Diagram.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +63 -0
- package/dist/components/Dialog/Dialog.js +90 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +55 -0
- package/dist/components/EmptyState/EmptyState.js +32 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/ErrorState/ErrorState.d.ts +55 -0
- package/dist/components/ErrorState/ErrorState.js +41 -0
- package/dist/components/ErrorState/ErrorState.js.map +1 -0
- package/dist/components/Field/Field.d.ts +111 -0
- package/dist/components/Field/Field.js +95 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/field-control.d.ts +31 -0
- package/dist/components/Field/field-control.js +12 -0
- package/dist/components/Field/field-control.js.map +1 -0
- package/dist/components/FigureBand/FigureBand.d.ts +31 -0
- package/dist/components/FigureBand/FigureBand.js +51 -0
- package/dist/components/FigureBand/FigureBand.js.map +1 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
- package/dist/components/Heading/Heading.d.ts +62 -0
- package/dist/components/Heading/Heading.js +44 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Input/Input.d.ts +22 -0
- package/dist/components/Input/Input.js +21 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Kbd/Kbd.d.ts +27 -0
- package/dist/components/Kbd/Kbd.js +21 -0
- package/dist/components/Kbd/Kbd.js.map +1 -0
- package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
- package/dist/components/LinkArrow/LinkArrow.js +24 -0
- package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
- package/dist/components/Markdown/Markdown.d.ts +139 -0
- package/dist/components/Markdown/Markdown.js +135 -0
- package/dist/components/Markdown/Markdown.js.map +1 -0
- package/dist/components/Markdown/inline.d.ts +29 -0
- package/dist/components/Markdown/inline.js +74 -0
- package/dist/components/Markdown/inline.js.map +1 -0
- package/dist/components/Markdown/nodes.d.ts +65 -0
- package/dist/components/Markdown/nodes.js +1 -0
- package/dist/components/Markdown/nodes.js.map +1 -0
- package/dist/components/Markdown/parse.d.ts +24 -0
- package/dist/components/Markdown/parse.js +110 -0
- package/dist/components/Markdown/parse.js.map +1 -0
- package/dist/components/Markdown/slug.d.ts +15 -0
- package/dist/components/Markdown/slug.js +7 -0
- package/dist/components/Markdown/slug.js.map +1 -0
- package/dist/components/Metric/Metric.d.ts +61 -0
- package/dist/components/Metric/Metric.js +51 -0
- package/dist/components/Metric/Metric.js.map +1 -0
- package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
- package/dist/components/NativeSelect/NativeSelect.js +44 -0
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
- package/dist/components/NavItem/NavItem.d.ts +39 -0
- package/dist/components/NavItem/NavItem.js +31 -0
- package/dist/components/NavItem/NavItem.js.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +69 -0
- package/dist/components/NumberField/NumberField.js +162 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +92 -0
- package/dist/components/PageHeader/PageHeader.js +37 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +67 -0
- package/dist/components/Pagination/Pagination.js +112 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +39 -0
- package/dist/components/Popover/Popover.js +57 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Progress/Progress.d.ts +43 -0
- package/dist/components/Progress/Progress.js +57 -0
- package/dist/components/Progress/Progress.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
- package/dist/components/RadioGroup/RadioGroup.js +53 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
- package/dist/components/ScrollArea/ScrollArea.js +54 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
- package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
- package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
- package/dist/components/Select/Select.d.ts +87 -0
- package/dist/components/Select/Select.js +130 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Separator/Separator.d.ts +48 -0
- package/dist/components/Separator/Separator.js +43 -0
- package/dist/components/Separator/Separator.js.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts +43 -0
- package/dist/components/Sheet/Sheet.js +79 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +357 -0
- package/dist/components/Sidebar/Sidebar.js +447 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +70 -0
- package/dist/components/Skeleton/Skeleton.js +44 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +74 -0
- package/dist/components/Slider/Slider.js +143 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +58 -0
- package/dist/components/Spinner/Spinner.js +49 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/StatusDot/StatusDot.d.ts +29 -0
- package/dist/components/StatusDot/StatusDot.js +44 -0
- package/dist/components/StatusDot/StatusDot.js.map +1 -0
- package/dist/components/StatusPill/StatusPill.d.ts +30 -0
- package/dist/components/StatusPill/StatusPill.js +37 -0
- package/dist/components/StatusPill/StatusPill.js.map +1 -0
- package/dist/components/Steps/Steps.d.ts +65 -0
- package/dist/components/Steps/Steps.js +25 -0
- package/dist/components/Steps/Steps.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +23 -0
- package/dist/components/Switch/Switch.js +23 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Table/Table.d.ts +116 -0
- package/dist/components/Table/Table.js +137 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.js +205 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +87 -0
- package/dist/components/Tag/Tag.js +62 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Text/Text.d.ts +62 -0
- package/dist/components/Text/Text.js +30 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +20 -0
- package/dist/components/Textarea/Textarea.js +32 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Timestamp/Timestamp.d.ts +59 -0
- package/dist/components/Timestamp/Timestamp.js +56 -0
- package/dist/components/Timestamp/Timestamp.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +32 -0
- package/dist/components/Toast/Toast.js +64 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +55 -0
- package/dist/components/Toolbar/Toolbar.js +43 -0
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +43 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
- package/dist/diagrams/index.d.ts +17 -0
- package/dist/diagrams/index.js +29 -0
- package/dist/diagrams/index.js.map +1 -0
- package/dist/diagrams/lib/dev.d.ts +61 -0
- package/dist/diagrams/lib/dev.js +96 -0
- package/dist/diagrams/lib/dev.js.map +1 -0
- package/dist/diagrams/lib/frame.d.ts +138 -0
- package/dist/diagrams/lib/frame.js +131 -0
- package/dist/diagrams/lib/frame.js.map +1 -0
- package/dist/diagrams/lib/geometry.d.ts +114 -0
- package/dist/diagrams/lib/geometry.js +113 -0
- package/dist/diagrams/lib/geometry.js.map +1 -0
- package/dist/diagrams/lib/legend.d.ts +32 -0
- package/dist/diagrams/lib/legend.js +84 -0
- package/dist/diagrams/lib/legend.js.map +1 -0
- package/dist/diagrams/lib/marks.d.ts +207 -0
- package/dist/diagrams/lib/marks.js +480 -0
- package/dist/diagrams/lib/marks.js.map +1 -0
- package/dist/diagrams/lib/route.d.ts +106 -0
- package/dist/diagrams/lib/route.js +201 -0
- package/dist/diagrams/lib/route.js.map +1 -0
- package/dist/diagrams/lib/wires.d.ts +59 -0
- package/dist/diagrams/lib/wires.js +94 -0
- package/dist/diagrams/lib/wires.js.map +1 -0
- package/dist/diagrams/spec.d.ts +405 -0
- package/dist/diagrams/spec.js +1 -0
- package/dist/diagrams/spec.js.map +1 -0
- package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
- package/dist/fonts/newsreader-300.woff2 +0 -0
- package/dist/fonts/newsreader-400.woff2 +0 -0
- package/dist/fonts/newsreader-500.woff2 +0 -0
- package/dist/fonts/newsreader-600.woff2 +0 -0
- package/dist/fonts.css +96 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/keyframes.css +300 -0
- package/dist/lib/cn.d.ts +21 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/color.d.ts +80 -0
- package/dist/lib/color.js +189 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/control.d.ts +32 -0
- package/dist/lib/control.js +14 -0
- package/dist/lib/control.js.map +1 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/numeric.d.ts +35 -0
- package/dist/lib/numeric.js +29 -0
- package/dist/lib/numeric.js.map +1 -0
- package/dist/lib/overlay-container.d.ts +48 -0
- package/dist/lib/overlay-container.js +15 -0
- package/dist/lib/overlay-container.js.map +1 -0
- package/dist/lib/slot-content.d.ts +8 -0
- package/dist/lib/slot-content.js +17 -0
- package/dist/lib/slot-content.js.map +1 -0
- package/dist/lib/step-rail.d.ts +45 -0
- package/dist/lib/step-rail.js +47 -0
- package/dist/lib/step-rail.js.map +1 -0
- package/dist/lib/svg-export.d.ts +138 -0
- package/dist/lib/svg-export.js +198 -0
- package/dist/lib/svg-export.js.map +1 -0
- package/dist/lib/useClipboardCopy.d.ts +30 -0
- package/dist/lib/useClipboardCopy.js +37 -0
- package/dist/lib/useClipboardCopy.js.map +1 -0
- package/dist/lib/useSelectionIndicator.d.ts +29 -0
- package/dist/lib/useSelectionIndicator.js +49 -0
- package/dist/lib/useSelectionIndicator.js.map +1 -0
- package/dist/lib/warn.d.ts +73 -0
- package/dist/lib/warn.js +38 -0
- package/dist/lib/warn.js.map +1 -0
- package/dist/semantic.css +193 -0
- package/dist/styles.css +98 -0
- package/dist/themes.css +514 -0
- package/dist/tokens/brand.d.ts +47 -0
- package/dist/tokens/brand.js +38 -0
- package/dist/tokens/brand.js.map +1 -0
- package/dist/tokens.css +652 -0
- package/dist/tokens.d.ts +198 -0
- package/dist/tokens.js +1020 -0
- package/dist/tokens.json +1019 -0
- package/dist/website/Actions/Actions.d.ts +34 -0
- package/dist/website/Actions/Actions.js +29 -0
- package/dist/website/Actions/Actions.js.map +1 -0
- package/dist/website/Collection/Collection.d.ts +128 -0
- package/dist/website/Collection/Collection.js +162 -0
- package/dist/website/Collection/Collection.js.map +1 -0
- package/dist/website/Contact/Contact.d.ts +87 -0
- package/dist/website/Contact/Contact.js +94 -0
- package/dist/website/Contact/Contact.js.map +1 -0
- package/dist/website/Content/CodePanel.d.ts +27 -0
- package/dist/website/Content/CodePanel.js +30 -0
- package/dist/website/Content/CodePanel.js.map +1 -0
- package/dist/website/Content/Content.d.ts +29 -0
- package/dist/website/Content/Content.js +38 -0
- package/dist/website/Content/Content.js.map +1 -0
- package/dist/website/Conversation/Conversation.d.ts +193 -0
- package/dist/website/Conversation/Conversation.js +252 -0
- package/dist/website/Conversation/Conversation.js.map +1 -0
- package/dist/website/Evidence/Evidence.d.ts +116 -0
- package/dist/website/Evidence/Evidence.js +142 -0
- package/dist/website/Evidence/Evidence.js.map +1 -0
- package/dist/website/Media/Media.d.ts +173 -0
- package/dist/website/Media/Media.js +225 -0
- package/dist/website/Media/Media.js.map +1 -0
- package/dist/website/Media/MediaLightbox.d.ts +18 -0
- package/dist/website/Media/MediaLightbox.js +38 -0
- package/dist/website/Media/MediaLightbox.js.map +1 -0
- package/dist/website/Metrics/Metrics.d.ts +74 -0
- package/dist/website/Metrics/Metrics.js +96 -0
- package/dist/website/Metrics/Metrics.js.map +1 -0
- package/dist/website/Music/Music.d.ts +60 -0
- package/dist/website/Music/Music.js +80 -0
- package/dist/website/Music/Music.js.map +1 -0
- package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
- package/dist/website/Portfolio/FrameLayout.js +42 -0
- package/dist/website/Portfolio/FrameLayout.js.map +1 -0
- package/dist/website/Portfolio/Portfolio.d.ts +49 -0
- package/dist/website/Portfolio/Portfolio.js +66 -0
- package/dist/website/Portfolio/Portfolio.js.map +1 -0
- package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
- package/dist/website/Portfolio/QuestionCard.js +33 -0
- package/dist/website/Portfolio/QuestionCard.js.map +1 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
- package/dist/website/Reading/Reading.d.ts +203 -0
- package/dist/website/Reading/Reading.js +357 -0
- package/dist/website/Reading/Reading.js.map +1 -0
- package/dist/website/Recovery/Recovery.d.ts +39 -0
- package/dist/website/Recovery/Recovery.js +96 -0
- package/dist/website/Recovery/Recovery.js.map +1 -0
- package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
- package/dist/website/SearchPalette/SearchPalette.js +120 -0
- package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
- package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
- package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
- package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
- package/dist/website/SiteShell/SiteShell.d.ts +45 -0
- package/dist/website/SiteShell/SiteShell.js +46 -0
- package/dist/website/SiteShell/SiteShell.js.map +1 -0
- package/dist/website/Timeline/Timeline.d.ts +80 -0
- package/dist/website/Timeline/Timeline.js +99 -0
- package/dist/website/Timeline/Timeline.js.map +1 -0
- package/dist/website/index.d.ts +27 -0
- package/dist/website/index.js +21 -0
- package/dist/website/index.js.map +1 -0
- package/dist/website-actions.css +6 -0
- package/dist/website-base.css +46 -0
- package/dist/website-collection.css +89 -0
- package/dist/website-contact.css +29 -0
- package/dist/website-content.css +17 -0
- package/dist/website-controls.css +91 -0
- package/dist/website-conversation.css +115 -0
- package/dist/website-evidence.css +56 -0
- package/dist/website-media.css +227 -0
- package/dist/website-metrics.css +15 -0
- package/dist/website-music.css +27 -0
- package/dist/website-portfolio.css +94 -0
- package/dist/website-reading.css +159 -0
- package/dist/website-recovery.css +28 -0
- package/dist/website-search.css +26 -0
- package/dist/website-shell.css +89 -0
- package/dist/website-timeline.css +43 -0
- package/dist/website.css +25 -0
- package/llms.txt +35 -0
- package/package.json +163 -5
- package/skills/folio-design/SKILL.md +228 -0
- package/skills/folio-design/evals/claims.json +95 -0
- package/skills/folio-design/evals/evals.json +84 -0
- package/skills/folio-design/rules/a11y.md +167 -0
- package/skills/folio-design/rules/composition.md +108 -0
- package/skills/folio-design/rules/forms.md +135 -0
- package/skills/folio-design/rules/naming.md +155 -0
- package/skills/folio-design/rules/tokens.md +133 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, ComponentProps, FC } from 'react';
|
|
3
|
+
import { AreaChart as AreaChart$1, Area, XAxis, YAxis, CartesianGrid } from 'recharts';
|
|
4
|
+
import { ChartConfig } from '../lib/chart.js';
|
|
5
|
+
import { ChartEmptyProps } from '../lib/empty.js';
|
|
6
|
+
import { ValuesProps } from '../lib/values.js';
|
|
7
|
+
import { SonifyProps } from '../lib/sonify-control.js';
|
|
8
|
+
import { ChartBackgroundVariant } from '../lib/background.js';
|
|
9
|
+
import { BrushProps } from '../lib/brush.js';
|
|
10
|
+
import { ToolbarProps } from '../lib/toolbar.js';
|
|
11
|
+
import { ChartRevealType } from '../lib/paint.js';
|
|
12
|
+
import { ChartDotVariant } from '../lib/dot.js';
|
|
13
|
+
import { ChartLegendVariant, ChartLegendAlign } from '../lib/legend.js';
|
|
14
|
+
import { ChartTooltipVariant, ChartTooltipRoundness } from '../lib/tooltip.js';
|
|
15
|
+
import { ReferenceLine, ReferenceBand, Annotation } from '../lib/annotations.js';
|
|
16
|
+
import '../lib/sonify.js';
|
|
17
|
+
import '../lib/zoom.js';
|
|
18
|
+
import '../lib/figure.js';
|
|
19
|
+
import 'recharts/types/component/DefaultTooltipContent';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The axis props, with `label` narrowed to a string.
|
|
23
|
+
*
|
|
24
|
+
* Recharts' own `label` accepts a render function and a config object, neither
|
|
25
|
+
* of which a call site should be reaching for to name an axis — and both of
|
|
26
|
+
* which would let a consumer opt out of the system's own axis type styling
|
|
27
|
+
* without noticing.
|
|
28
|
+
*/
|
|
29
|
+
type ChartXAxisProps = Omit<ComponentProps<typeof XAxis>, 'label'> & {
|
|
30
|
+
/** What this axis measures. Say the unit here or in the series label, once. */
|
|
31
|
+
label?: string;
|
|
32
|
+
};
|
|
33
|
+
type ChartYAxisProps = Omit<ComponentProps<typeof YAxis>, 'label'> & {
|
|
34
|
+
/** What this axis measures. Say the unit here or in the series label, once. */
|
|
35
|
+
label?: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** How an area's curve is interpolated between points. */
|
|
39
|
+
type ChartCurveType = ComponentProps<typeof Area>['type'];
|
|
40
|
+
/**
|
|
41
|
+
* How an area meets the plot.
|
|
42
|
+
*
|
|
43
|
+
* In the monochrome default this is the PRIMARY way two series are told apart
|
|
44
|
+
* — the ramp is the second encoding — so a chart with more than one area
|
|
45
|
+
* should vary this before it varies anything else.
|
|
46
|
+
*/
|
|
47
|
+
type AreaVariant = 'gradient' | 'gradient-reverse' | 'solid' | 'dotted' | 'lines' | 'hatched';
|
|
48
|
+
/** How the line on top of an area is drawn. */
|
|
49
|
+
type AreaStrokeVariant = 'solid' | 'dashed' | 'animated-dashed';
|
|
50
|
+
/** How several areas combine: side by side, stacked, or normalised to 100%. */
|
|
51
|
+
type AreaStackType = 'default' | 'stacked' | 'expanded';
|
|
52
|
+
/** Fails the build when a config names a series the rows do not have. */
|
|
53
|
+
type ValidateKeys<TData, TConfig> = {
|
|
54
|
+
[K in keyof TConfig]: K extends keyof TData ? ChartConfig[string] : never;
|
|
55
|
+
};
|
|
56
|
+
interface AreaChartProps<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>> {
|
|
57
|
+
/** Series keys → their label and paint. Declaration order is ramp order. */
|
|
58
|
+
config: TConfig & ValidateKeys<TData, TConfig>;
|
|
59
|
+
/** The rows the chart draws. One entry per point, bar or category. */
|
|
60
|
+
data: TData[];
|
|
61
|
+
/**
|
|
62
|
+
* What the chart shows, in a sentence a reader could act on. Required, and
|
|
63
|
+
* announced to a screen reader even when it is not printed.
|
|
64
|
+
*/
|
|
65
|
+
title: string;
|
|
66
|
+
/** Prints the title above the plot instead of hiding it from sight. */
|
|
67
|
+
showTitle?: boolean;
|
|
68
|
+
/** A line under the title — the unit, the window, the caveat. */
|
|
69
|
+
description?: ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* The composed parts — axes, grid, tooltip, legend, and the marks
|
|
72
|
+
* themselves.
|
|
73
|
+
*/
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
/** Merged onto the figure, last, so a call site can size or space it. */
|
|
76
|
+
className?: string;
|
|
77
|
+
/** Escape hatch onto the raw Recharts chart element. */
|
|
78
|
+
chartProps?: ComponentProps<typeof AreaChart$1>;
|
|
79
|
+
/** The curve every `<AreaChart.Area>` inherits. */
|
|
80
|
+
curveType?: ChartCurveType;
|
|
81
|
+
/** The intro wipe every `<AreaChart.Area>` inherits. */
|
|
82
|
+
animationType?: ChartRevealType;
|
|
83
|
+
/** How several marks combine: side by side, stacked, or normalised to 100%. */
|
|
84
|
+
stackType?: AreaStackType;
|
|
85
|
+
/** The series lit on first render, when the chart keeps its own selection. */
|
|
86
|
+
defaultSelectedDataKey?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* The selected series, driven from outside.
|
|
89
|
+
*
|
|
90
|
+
* Give this and the chart follows it; leave it undefined and the chart keeps
|
|
91
|
+
* its own, starting from `defaultSelectedDataKey`.
|
|
92
|
+
*/
|
|
93
|
+
selectedDataKey?: string | null;
|
|
94
|
+
/** Fires when the selection changes, and with null when it is cleared. */
|
|
95
|
+
onSelectionChange?: (selectedDataKey: string | null) => void;
|
|
96
|
+
/**
|
|
97
|
+
* Swaps the marks for an animated skeleton, keeping the measured height so
|
|
98
|
+
* the page does not jump when the data lands.
|
|
99
|
+
*/
|
|
100
|
+
isLoading?: boolean;
|
|
101
|
+
/** How many points the skeleton draws. */
|
|
102
|
+
loadingPoints?: number;
|
|
103
|
+
/**
|
|
104
|
+
* The row field on the category axis. Needed by the brush and by the table
|
|
105
|
+
* view.
|
|
106
|
+
*/
|
|
107
|
+
xDataKey?: keyof TData & string;
|
|
108
|
+
/**
|
|
109
|
+
* Drops the hidden table view. Only correct when the page prints the data
|
|
110
|
+
* itself.
|
|
111
|
+
*/
|
|
112
|
+
hideDataTable?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* What the chart shows when it has nothing to draw.
|
|
115
|
+
*
|
|
116
|
+
* Rendered instead of the plot whenever `data` is empty and the chart is not
|
|
117
|
+
* loading — the state a real dashboard reaches within a week, and the one an
|
|
118
|
+
* empty pair of axes is indistinguishable from a failed load. `false` keeps
|
|
119
|
+
* the axes, for a chart whose emptiness is itself the reading.
|
|
120
|
+
*/
|
|
121
|
+
empty?: ChartEmptyProps | false;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A filled series over a category axis — the shape for a magnitude that is
|
|
125
|
+
* continuous, where the area under the line means something.
|
|
126
|
+
*
|
|
127
|
+
* Composed rather than configured: axes, grid, tooltip, legend and the areas
|
|
128
|
+
* themselves are children, so a chart renders exactly the parts it asked for
|
|
129
|
+
* and nothing is switched on by a prop nobody can see.
|
|
130
|
+
*
|
|
131
|
+
* Reach for `<LineChart>` instead when the reader is comparing several series
|
|
132
|
+
* against each other rather than reading one total, and for `<BarChart>` when
|
|
133
|
+
* the categories are discrete.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* <AreaChart title="Visitors per month" config={config} data={data} xDataKey="month">
|
|
137
|
+
* <AreaChart.Grid />
|
|
138
|
+
* <AreaChart.XAxis dataKey="month" />
|
|
139
|
+
* <AreaChart.Tooltip />
|
|
140
|
+
* <AreaChart.Area dataKey="desktop" variant="gradient" />
|
|
141
|
+
* </AreaChart>
|
|
142
|
+
*/
|
|
143
|
+
declare function AreaChart<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>>({ config, data, title, showTitle, description, children, className, chartProps, curveType, animationType, stackType, defaultSelectedDataKey, selectedDataKey: controlledDataKey, onSelectionChange, isLoading, loadingPoints, xDataKey, hideDataTable, empty, }: AreaChartProps<TData, TConfig>): react.JSX.Element;
|
|
144
|
+
declare namespace AreaChart {
|
|
145
|
+
var Area: ({ dataKey, variant, strokeVariant, strokeWidth, curveType, animationType, connectNulls, isClickable, children, areaProps, }: AreaProps) => react.JSX.Element | null;
|
|
146
|
+
var Dot: FC<DotProps>;
|
|
147
|
+
var ActiveDot: FC<DotProps>;
|
|
148
|
+
var XAxis: ({ tickLine, axisLine, tickMargin, minTickGap, label, ...rest }: ChartXAxisProps) => react.JSX.Element | null;
|
|
149
|
+
var YAxis: ({ tickLine, axisLine, tickMargin, minTickGap, width, tickFormatter, label, ...rest }: ChartYAxisProps) => react.JSX.Element | null;
|
|
150
|
+
var Grid: ({ vertical, strokeDasharray, ...rest }: ComponentProps<typeof CartesianGrid>) => react.JSX.Element;
|
|
151
|
+
var Tooltip: ({ variant, roundness, defaultIndex, cursor }: ChartTooltipSlotProps) => react.JSX.Element | null;
|
|
152
|
+
var Legend: ({ variant, align, verticalAlign, isClickable, }: ChartLegendSlotProps) => react.JSX.Element;
|
|
153
|
+
var Background: ({ variant }: {
|
|
154
|
+
variant: ChartBackgroundVariant;
|
|
155
|
+
}) => react.JSX.Element | null;
|
|
156
|
+
var ReferenceLine: typeof ReferenceLine;
|
|
157
|
+
var ReferenceBand: typeof ReferenceBand;
|
|
158
|
+
var Annotation: typeof Annotation;
|
|
159
|
+
var Values: FC<ValuesProps>;
|
|
160
|
+
var Brush: FC<BrushProps>;
|
|
161
|
+
var Toolbar: FC<ToolbarProps>;
|
|
162
|
+
var Sonify: FC<SonifyProps>;
|
|
163
|
+
}
|
|
164
|
+
interface AreaProps {
|
|
165
|
+
/** The series to draw. Must exist on both the rows and the config. */
|
|
166
|
+
dataKey: string;
|
|
167
|
+
variant?: AreaVariant;
|
|
168
|
+
strokeVariant?: AreaStrokeVariant;
|
|
169
|
+
strokeWidth?: number;
|
|
170
|
+
curveType?: ChartCurveType;
|
|
171
|
+
animationType?: ChartRevealType;
|
|
172
|
+
connectNulls?: boolean;
|
|
173
|
+
/** Lets a click on this area select it, dimming the rest. */
|
|
174
|
+
isClickable?: boolean;
|
|
175
|
+
/** `<AreaChart.Dot>`, `<AreaChart.ActiveDot>` and `<AreaChart.Values>`. */
|
|
176
|
+
children?: ReactNode;
|
|
177
|
+
areaProps?: ComponentProps<typeof Area>;
|
|
178
|
+
}
|
|
179
|
+
interface DotProps {
|
|
180
|
+
variant?: ChartDotVariant;
|
|
181
|
+
}
|
|
182
|
+
interface ChartTooltipSlotProps {
|
|
183
|
+
variant?: ChartTooltipVariant;
|
|
184
|
+
roundness?: ChartTooltipRoundness;
|
|
185
|
+
/** Shows the tooltip at this row before anything is hovered. */
|
|
186
|
+
defaultIndex?: number;
|
|
187
|
+
/** The crosshair that follows the pointer along the axis. */
|
|
188
|
+
cursor?: boolean;
|
|
189
|
+
}
|
|
190
|
+
interface ChartLegendSlotProps {
|
|
191
|
+
variant?: ChartLegendVariant;
|
|
192
|
+
align?: ChartLegendAlign;
|
|
193
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
194
|
+
/** Makes each entry a button that selects its series. */
|
|
195
|
+
isClickable?: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { AreaChart, type AreaChartProps, type AreaProps, type AreaStackType, type AreaStrokeVariant, type AreaVariant, type ChartCurveType, type ChartLegendSlotProps, type ChartTooltipSlotProps, type ChartXAxisProps, type ChartYAxisProps, type DotProps, AreaChart as default };
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
Children,
|
|
5
|
+
createContext,
|
|
6
|
+
isValidElement,
|
|
7
|
+
useContext,
|
|
8
|
+
useId,
|
|
9
|
+
useMemo
|
|
10
|
+
} from "react";
|
|
11
|
+
import {
|
|
12
|
+
Area as RechartsArea,
|
|
13
|
+
AreaChart as RechartsAreaChart,
|
|
14
|
+
CartesianGrid,
|
|
15
|
+
XAxis as RechartsXAxis,
|
|
16
|
+
YAxis as RechartsYAxis
|
|
17
|
+
} from "recharts";
|
|
18
|
+
import { useReducedMotion } from "motion/react";
|
|
19
|
+
import { ChartContainer, percentTick } from "../lib/chart.js";
|
|
20
|
+
import { ChartFigure } from "../lib/figure.js";
|
|
21
|
+
import { useChartSelection } from "../lib/selection.js";
|
|
22
|
+
import {} from "../lib/empty.js";
|
|
23
|
+
import { axisLabel } from "../lib/axis.js";
|
|
24
|
+
import { defaultTick } from "../lib/format.js";
|
|
25
|
+
import { Annotation, ReferenceBand, ReferenceLine } from "../lib/annotations.js";
|
|
26
|
+
import { Values, findSlot, resolveValues } from "../lib/values.js";
|
|
27
|
+
import {
|
|
28
|
+
ChartSonifyButton,
|
|
29
|
+
Sonify,
|
|
30
|
+
useChartSonifySeries
|
|
31
|
+
} from "../lib/sonify-control.js";
|
|
32
|
+
import { ChartBackground } from "../lib/background.js";
|
|
33
|
+
import { ChartDot } from "../lib/dot.js";
|
|
34
|
+
import {
|
|
35
|
+
ChartLegend,
|
|
36
|
+
ChartLegendContent
|
|
37
|
+
} from "../lib/legend.js";
|
|
38
|
+
import {
|
|
39
|
+
ChartTooltip,
|
|
40
|
+
ChartTooltipContent
|
|
41
|
+
} from "../lib/tooltip.js";
|
|
42
|
+
import { Brush, ChartBrush } from "../lib/brush.js";
|
|
43
|
+
import { ChartControls, Toolbar } from "../lib/toolbar.js";
|
|
44
|
+
import { useChartZoom } from "../lib/zoom.js";
|
|
45
|
+
import { LoadingIndicator, LoadingShimmer, LOADING_KEY, useLoadingRows } from "../lib/loading.js";
|
|
46
|
+
import {
|
|
47
|
+
AnimatedDashedStroke,
|
|
48
|
+
AreaDottedFill,
|
|
49
|
+
AreaGradientFill,
|
|
50
|
+
AreaGradientReverseFill,
|
|
51
|
+
AreaHatchedFill,
|
|
52
|
+
AreaLinesFill,
|
|
53
|
+
AreaSolidFill,
|
|
54
|
+
RevealMask,
|
|
55
|
+
SeriesGradient,
|
|
56
|
+
UnselectedFill
|
|
57
|
+
} from "../lib/paint.js";
|
|
58
|
+
const STROKE_WIDTH = 0.8;
|
|
59
|
+
const STACK_ID = "folio-area-stack";
|
|
60
|
+
const CHART_MARGIN = { top: 8, right: 12, bottom: 0, left: 12 };
|
|
61
|
+
const AreaChartContext = createContext(null);
|
|
62
|
+
function useAreaChart() {
|
|
63
|
+
const context = useContext(AreaChartContext);
|
|
64
|
+
if (!context) throw new Error("An area chart part must be rendered inside <AreaChart>");
|
|
65
|
+
return context;
|
|
66
|
+
}
|
|
67
|
+
function AreaChart({
|
|
68
|
+
config,
|
|
69
|
+
data,
|
|
70
|
+
title,
|
|
71
|
+
showTitle,
|
|
72
|
+
description,
|
|
73
|
+
children,
|
|
74
|
+
className,
|
|
75
|
+
chartProps,
|
|
76
|
+
curveType = "linear",
|
|
77
|
+
animationType = "forward",
|
|
78
|
+
stackType = "default",
|
|
79
|
+
defaultSelectedDataKey = null,
|
|
80
|
+
selectedDataKey: controlledDataKey,
|
|
81
|
+
onSelectionChange,
|
|
82
|
+
isLoading = false,
|
|
83
|
+
loadingPoints,
|
|
84
|
+
xDataKey,
|
|
85
|
+
hideDataTable = false,
|
|
86
|
+
empty
|
|
87
|
+
}) {
|
|
88
|
+
const chartId = useId().replace(/:/g, "");
|
|
89
|
+
const { rows: loadingData, onShimmerExit } = useLoadingRows(isLoading, loadingPoints);
|
|
90
|
+
const zoom = useChartZoom({ data, xDataKey });
|
|
91
|
+
const { brushSlot, toolbarSlot, sonifySlot, chartChildren } = useMemo(() => {
|
|
92
|
+
const parts = Children.toArray(children);
|
|
93
|
+
const element = parts.find((child) => isValidElement(child) && child.type === Brush);
|
|
94
|
+
const props = isValidElement(element) ? element.props : {};
|
|
95
|
+
return {
|
|
96
|
+
brushSlot: { present: isValidElement(element), ...props },
|
|
97
|
+
toolbarSlot: findSlot(parts, Toolbar),
|
|
98
|
+
sonifySlot: findSlot(parts, Sonify),
|
|
99
|
+
chartChildren: parts.filter(
|
|
100
|
+
(child) => !(isValidElement(child) && (child.type === Brush || child.type === Toolbar || child.type === Sonify))
|
|
101
|
+
)
|
|
102
|
+
};
|
|
103
|
+
}, [children]);
|
|
104
|
+
const columns = useMemo(
|
|
105
|
+
() => Object.entries(config).map(([key, series]) => ({ key, label: series.label })),
|
|
106
|
+
[config]
|
|
107
|
+
);
|
|
108
|
+
const isExpanded = stackType === "expanded";
|
|
109
|
+
const isStacked = stackType === "stacked" || isExpanded;
|
|
110
|
+
const showBrush = brushSlot.present && !isLoading;
|
|
111
|
+
const showToolbar = toolbarSlot !== null && !isLoading;
|
|
112
|
+
const isEmpty = !isLoading && empty !== false && data.length === 0;
|
|
113
|
+
const displayData = isLoading ? loadingData : showBrush || showToolbar ? zoom.visibleData : data;
|
|
114
|
+
const sonifySeries = useChartSonifySeries(
|
|
115
|
+
sonifySlot,
|
|
116
|
+
displayData,
|
|
117
|
+
config,
|
|
118
|
+
xDataKey
|
|
119
|
+
);
|
|
120
|
+
const [selectedDataKey, selectDataKey] = useChartSelection(
|
|
121
|
+
controlledDataKey,
|
|
122
|
+
defaultSelectedDataKey,
|
|
123
|
+
onSelectionChange
|
|
124
|
+
);
|
|
125
|
+
const context = useMemo(
|
|
126
|
+
() => ({
|
|
127
|
+
config,
|
|
128
|
+
rows: displayData,
|
|
129
|
+
curveType,
|
|
130
|
+
animationType,
|
|
131
|
+
isStacked,
|
|
132
|
+
isExpanded,
|
|
133
|
+
isLoading,
|
|
134
|
+
selectedDataKey,
|
|
135
|
+
selectDataKey
|
|
136
|
+
}),
|
|
137
|
+
[
|
|
138
|
+
animationType,
|
|
139
|
+
config,
|
|
140
|
+
curveType,
|
|
141
|
+
displayData,
|
|
142
|
+
isExpanded,
|
|
143
|
+
isLoading,
|
|
144
|
+
isStacked,
|
|
145
|
+
selectDataKey,
|
|
146
|
+
selectedDataKey
|
|
147
|
+
]
|
|
148
|
+
);
|
|
149
|
+
return /* @__PURE__ */ jsx(AreaChartContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
150
|
+
ChartFigure,
|
|
151
|
+
{
|
|
152
|
+
title,
|
|
153
|
+
showTitle,
|
|
154
|
+
description,
|
|
155
|
+
className,
|
|
156
|
+
table: hideDataTable ? false : { rows: data, rowKey: xDataKey, columns },
|
|
157
|
+
isEmpty,
|
|
158
|
+
empty,
|
|
159
|
+
children: [
|
|
160
|
+
sonifySlot && /* @__PURE__ */ jsx(ChartSonifyButton, { ...sonifySlot, title, series: sonifySeries }),
|
|
161
|
+
/* @__PURE__ */ jsx(
|
|
162
|
+
ChartControls,
|
|
163
|
+
{
|
|
164
|
+
toolbar: showToolbar ? toolbarSlot : null,
|
|
165
|
+
zoom,
|
|
166
|
+
title,
|
|
167
|
+
rows: data,
|
|
168
|
+
columns,
|
|
169
|
+
rowKey: xDataKey,
|
|
170
|
+
children: /* @__PURE__ */ jsx(
|
|
171
|
+
ChartContainer,
|
|
172
|
+
{
|
|
173
|
+
config,
|
|
174
|
+
footer: showBrush && /* @__PURE__ */ jsx(
|
|
175
|
+
ChartBrush,
|
|
176
|
+
{
|
|
177
|
+
data,
|
|
178
|
+
config,
|
|
179
|
+
xDataKey,
|
|
180
|
+
variant: "area",
|
|
181
|
+
curveType,
|
|
182
|
+
height: brushSlot.height,
|
|
183
|
+
formatLabel: brushSlot.formatLabel,
|
|
184
|
+
stacked: isStacked,
|
|
185
|
+
className: "mt-1",
|
|
186
|
+
...zoom.brushProps,
|
|
187
|
+
onChange: (range) => {
|
|
188
|
+
zoom.brushProps.onChange(range);
|
|
189
|
+
brushSlot.onChange?.(range);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
children: /* @__PURE__ */ jsxs(
|
|
194
|
+
RechartsAreaChart,
|
|
195
|
+
{
|
|
196
|
+
id: chartId,
|
|
197
|
+
accessibilityLayer: true,
|
|
198
|
+
margin: CHART_MARGIN,
|
|
199
|
+
stackOffset: isExpanded ? "expand" : void 0,
|
|
200
|
+
data: displayData,
|
|
201
|
+
...chartProps,
|
|
202
|
+
children: [
|
|
203
|
+
chartChildren,
|
|
204
|
+
isLoading && /* @__PURE__ */ jsx(LoadingArea, { chartId, curveType, onShimmerExit })
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ jsx(LoadingIndicator, { isLoading })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
) });
|
|
216
|
+
}
|
|
217
|
+
function Area({
|
|
218
|
+
dataKey,
|
|
219
|
+
variant = "gradient",
|
|
220
|
+
strokeVariant = "dashed",
|
|
221
|
+
strokeWidth = STROKE_WIDTH,
|
|
222
|
+
curveType,
|
|
223
|
+
animationType,
|
|
224
|
+
connectNulls = false,
|
|
225
|
+
isClickable = false,
|
|
226
|
+
children,
|
|
227
|
+
areaProps
|
|
228
|
+
}) {
|
|
229
|
+
const {
|
|
230
|
+
config,
|
|
231
|
+
curveType: defaultCurve,
|
|
232
|
+
animationType: defaultAnimation,
|
|
233
|
+
isStacked,
|
|
234
|
+
isExpanded,
|
|
235
|
+
isLoading,
|
|
236
|
+
rows,
|
|
237
|
+
selectedDataKey,
|
|
238
|
+
selectDataKey
|
|
239
|
+
} = useAreaChart();
|
|
240
|
+
const id = useId().replace(/:/g, "");
|
|
241
|
+
const reduceMotion = useReducedMotion();
|
|
242
|
+
if (isLoading) return null;
|
|
243
|
+
const reveal = reduceMotion ? "none" : animationType ?? defaultAnimation;
|
|
244
|
+
const maskId = reveal === "none" ? void 0 : `${id}-reveal-mask`;
|
|
245
|
+
const isSelected = selectedDataKey === dataKey;
|
|
246
|
+
const hasSelection = selectedDataKey !== null;
|
|
247
|
+
const dimmed = hasSelection && !isSelected;
|
|
248
|
+
const opacity = dimmed ? { fill: 0.25, stroke: 0.3, dot: 0.3 } : { fill: 1, stroke: 1, dot: 1 };
|
|
249
|
+
const { dot, activeDot } = resolveDots(children, id, dataKey, opacity.dot, maskId);
|
|
250
|
+
const labels = resolveValues(
|
|
251
|
+
findSlot(children, Values),
|
|
252
|
+
rows.map((row) => Number(row[dataKey])).filter(Number.isFinite)
|
|
253
|
+
);
|
|
254
|
+
const animateDash = strokeVariant === "animated-dashed" && !hasSelection && !reduceMotion;
|
|
255
|
+
const isDashed = strokeVariant !== "solid";
|
|
256
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
257
|
+
/* @__PURE__ */ jsxs(
|
|
258
|
+
RechartsArea,
|
|
259
|
+
{
|
|
260
|
+
type: curveType ?? defaultCurve,
|
|
261
|
+
dataKey,
|
|
262
|
+
connectNulls,
|
|
263
|
+
fillOpacity: opacity.fill,
|
|
264
|
+
strokeOpacity: opacity.stroke,
|
|
265
|
+
fill: `url(#${id}-${dimmed ? "unselected" : variant}-${dataKey})`,
|
|
266
|
+
stroke: `url(#${id}-colors-${dataKey})`,
|
|
267
|
+
stackId: isStacked ? STACK_ID : void 0,
|
|
268
|
+
dot,
|
|
269
|
+
activeDot,
|
|
270
|
+
strokeWidth,
|
|
271
|
+
strokeDasharray: isDashed ? "3 3" : void 0,
|
|
272
|
+
isAnimationActive: false,
|
|
273
|
+
style: {
|
|
274
|
+
...maskId ? { mask: `url(#${maskId})` } : {},
|
|
275
|
+
...isClickable ? { cursor: "pointer" } : {}
|
|
276
|
+
},
|
|
277
|
+
onClick: () => {
|
|
278
|
+
if (!isClickable) return;
|
|
279
|
+
selectDataKey(isSelected ? null : dataKey);
|
|
280
|
+
},
|
|
281
|
+
...areaProps,
|
|
282
|
+
children: [
|
|
283
|
+
animateDash && /* @__PURE__ */ jsx(AnimatedDashedStroke, {}),
|
|
284
|
+
labels
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
289
|
+
reveal !== "none" && /* @__PURE__ */ jsx(RevealMask, { id, type: reveal }),
|
|
290
|
+
/* @__PURE__ */ jsx(
|
|
291
|
+
SeriesGradient,
|
|
292
|
+
{
|
|
293
|
+
id,
|
|
294
|
+
dataKey,
|
|
295
|
+
config,
|
|
296
|
+
gradientUnits: isExpanded ? "userSpaceOnUse" : "objectBoundingBox"
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
variant === "gradient" && /* @__PURE__ */ jsx(AreaGradientFill, { id, dataKey }),
|
|
300
|
+
variant === "gradient-reverse" && /* @__PURE__ */ jsx(AreaGradientReverseFill, { id, dataKey }),
|
|
301
|
+
variant === "solid" && /* @__PURE__ */ jsx(AreaSolidFill, { id, dataKey }),
|
|
302
|
+
variant === "dotted" && /* @__PURE__ */ jsx(AreaDottedFill, { id, dataKey }),
|
|
303
|
+
variant === "lines" && /* @__PURE__ */ jsx(AreaLinesFill, { id, dataKey }),
|
|
304
|
+
variant === "hatched" && /* @__PURE__ */ jsx(AreaHatchedFill, { id, dataKey }),
|
|
305
|
+
dimmed && /* @__PURE__ */ jsx(UnselectedFill, { id, dataKey })
|
|
306
|
+
] })
|
|
307
|
+
] });
|
|
308
|
+
}
|
|
309
|
+
const Dot = () => null;
|
|
310
|
+
const ActiveDot = () => null;
|
|
311
|
+
function resolveDots(children, id, dataKey, dotOpacity, maskId) {
|
|
312
|
+
let dot = false;
|
|
313
|
+
let activeDot = false;
|
|
314
|
+
Children.forEach(children, (child) => {
|
|
315
|
+
if (!isValidElement(child)) return;
|
|
316
|
+
const { variant } = child.props;
|
|
317
|
+
if (child.type === Dot) {
|
|
318
|
+
dot = /* @__PURE__ */ jsx(
|
|
319
|
+
ChartDot,
|
|
320
|
+
{
|
|
321
|
+
variant,
|
|
322
|
+
dataKey,
|
|
323
|
+
chartId: id,
|
|
324
|
+
fillOpacity: dotOpacity,
|
|
325
|
+
maskId
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
if (child.type === ActiveDot) {
|
|
330
|
+
activeDot = /* @__PURE__ */ jsx(ChartDot, { variant, dataKey, chartId: id, fillOpacity: dotOpacity });
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
return { dot, activeDot };
|
|
334
|
+
}
|
|
335
|
+
function XAxis({
|
|
336
|
+
tickLine = false,
|
|
337
|
+
axisLine = false,
|
|
338
|
+
tickMargin = 8,
|
|
339
|
+
minTickGap = 8,
|
|
340
|
+
label,
|
|
341
|
+
...rest
|
|
342
|
+
}) {
|
|
343
|
+
const { isLoading } = useAreaChart();
|
|
344
|
+
if (isLoading) return null;
|
|
345
|
+
return /* @__PURE__ */ jsx(
|
|
346
|
+
RechartsXAxis,
|
|
347
|
+
{
|
|
348
|
+
tickLine,
|
|
349
|
+
axisLine,
|
|
350
|
+
tickMargin,
|
|
351
|
+
minTickGap,
|
|
352
|
+
...rest,
|
|
353
|
+
children: axisLabel(label, "x")
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
function YAxis({
|
|
358
|
+
tickLine = false,
|
|
359
|
+
axisLine = false,
|
|
360
|
+
tickMargin = 8,
|
|
361
|
+
minTickGap = 8,
|
|
362
|
+
width = "auto",
|
|
363
|
+
tickFormatter,
|
|
364
|
+
label,
|
|
365
|
+
...rest
|
|
366
|
+
}) {
|
|
367
|
+
const { isLoading, isExpanded } = useAreaChart();
|
|
368
|
+
if (isLoading) return null;
|
|
369
|
+
return /* @__PURE__ */ jsx(
|
|
370
|
+
RechartsYAxis,
|
|
371
|
+
{
|
|
372
|
+
tickLine,
|
|
373
|
+
axisLine,
|
|
374
|
+
tickMargin,
|
|
375
|
+
minTickGap,
|
|
376
|
+
width,
|
|
377
|
+
tickFormatter: tickFormatter ?? (isExpanded ? percentTick : defaultTick),
|
|
378
|
+
...rest,
|
|
379
|
+
children: axisLabel(label, "y")
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
function Grid({
|
|
384
|
+
vertical = false,
|
|
385
|
+
strokeDasharray = "3 3",
|
|
386
|
+
...rest
|
|
387
|
+
}) {
|
|
388
|
+
return /* @__PURE__ */ jsx(CartesianGrid, { vertical, strokeDasharray, ...rest });
|
|
389
|
+
}
|
|
390
|
+
function Tooltip({ variant, roundness, defaultIndex, cursor = true }) {
|
|
391
|
+
const { isLoading, selectedDataKey } = useAreaChart();
|
|
392
|
+
if (isLoading) return null;
|
|
393
|
+
return /* @__PURE__ */ jsx(
|
|
394
|
+
ChartTooltip,
|
|
395
|
+
{
|
|
396
|
+
defaultIndex,
|
|
397
|
+
cursor: cursor ? { strokeDasharray: "3 3", strokeWidth: STROKE_WIDTH } : false,
|
|
398
|
+
content: /* @__PURE__ */ jsx(ChartTooltipContent, { selected: selectedDataKey, roundness, variant })
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
function Legend({
|
|
403
|
+
variant,
|
|
404
|
+
align = "right",
|
|
405
|
+
verticalAlign = "top",
|
|
406
|
+
isClickable = false
|
|
407
|
+
}) {
|
|
408
|
+
const { selectedDataKey, selectDataKey } = useAreaChart();
|
|
409
|
+
return /* @__PURE__ */ jsx(
|
|
410
|
+
ChartLegend,
|
|
411
|
+
{
|
|
412
|
+
verticalAlign,
|
|
413
|
+
align,
|
|
414
|
+
content: /* @__PURE__ */ jsx(
|
|
415
|
+
ChartLegendContent,
|
|
416
|
+
{
|
|
417
|
+
selected: selectedDataKey,
|
|
418
|
+
onSelectChange: selectDataKey,
|
|
419
|
+
isClickable,
|
|
420
|
+
variant
|
|
421
|
+
}
|
|
422
|
+
)
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
function Background({ variant }) {
|
|
427
|
+
const { isLoading } = useAreaChart();
|
|
428
|
+
if (isLoading) return null;
|
|
429
|
+
return /* @__PURE__ */ jsx(ChartBackground, { variant });
|
|
430
|
+
}
|
|
431
|
+
function LoadingArea({
|
|
432
|
+
chartId,
|
|
433
|
+
curveType,
|
|
434
|
+
onShimmerExit
|
|
435
|
+
}) {
|
|
436
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
437
|
+
/* @__PURE__ */ jsx(
|
|
438
|
+
RechartsArea,
|
|
439
|
+
{
|
|
440
|
+
type: curveType,
|
|
441
|
+
dataKey: LOADING_KEY,
|
|
442
|
+
fillOpacity: 0.05,
|
|
443
|
+
fill: "currentColor",
|
|
444
|
+
stroke: "currentColor",
|
|
445
|
+
strokeOpacity: 0.5,
|
|
446
|
+
isAnimationActive: false,
|
|
447
|
+
legendType: "none",
|
|
448
|
+
tooltipType: "none",
|
|
449
|
+
activeDot: false,
|
|
450
|
+
dot: false,
|
|
451
|
+
className: "text-(--ink)",
|
|
452
|
+
style: { mask: `url(#${chartId}-loading-mask)` }
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(LoadingShimmer, { id: chartId, onShimmerExit }) })
|
|
456
|
+
] });
|
|
457
|
+
}
|
|
458
|
+
AreaChart.Area = Area;
|
|
459
|
+
AreaChart.Dot = Dot;
|
|
460
|
+
AreaChart.ActiveDot = ActiveDot;
|
|
461
|
+
AreaChart.XAxis = XAxis;
|
|
462
|
+
AreaChart.YAxis = YAxis;
|
|
463
|
+
AreaChart.Grid = Grid;
|
|
464
|
+
AreaChart.Tooltip = Tooltip;
|
|
465
|
+
AreaChart.Legend = Legend;
|
|
466
|
+
AreaChart.Background = Background;
|
|
467
|
+
AreaChart.ReferenceLine = ReferenceLine;
|
|
468
|
+
AreaChart.ReferenceBand = ReferenceBand;
|
|
469
|
+
AreaChart.Annotation = Annotation;
|
|
470
|
+
AreaChart.Values = Values;
|
|
471
|
+
AreaChart.Brush = Brush;
|
|
472
|
+
AreaChart.Toolbar = Toolbar;
|
|
473
|
+
AreaChart.Sonify = Sonify;
|
|
474
|
+
var AreaChart_default = AreaChart;
|
|
475
|
+
export {
|
|
476
|
+
AreaChart,
|
|
477
|
+
AreaChart_default as default
|
|
478
|
+
};
|
|
479
|
+
//# sourceMappingURL=AreaChart.js.map
|