@misoto22/design 0.5.0 → 0.6.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.
Files changed (214) hide show
  1. package/README.md +124 -0
  2. package/bin/misoto22-design.mjs +205 -0
  3. package/dist/agent/Accordion.md +41 -0
  4. package/dist/agent/Alert.md +42 -0
  5. package/dist/agent/AppShell.md +40 -0
  6. package/dist/agent/AreaChart.md +68 -0
  7. package/dist/agent/Article.md +41 -0
  8. package/dist/agent/Avatar.md +32 -0
  9. package/dist/agent/Badge.md +40 -0
  10. package/dist/agent/BarChart.md +65 -0
  11. package/dist/agent/BarList.md +40 -0
  12. package/dist/agent/BigNumber.md +45 -0
  13. package/dist/agent/BoxPlot.md +58 -0
  14. package/dist/agent/Breadcrumb.md +32 -0
  15. package/dist/agent/BulletChart.md +48 -0
  16. package/dist/agent/Button.md +56 -0
  17. package/dist/agent/Calendar.md +42 -0
  18. package/dist/agent/Card.md +49 -0
  19. package/dist/agent/Checkbox.md +35 -0
  20. package/dist/agent/Collapsible.md +46 -0
  21. package/dist/agent/Combobox.md +50 -0
  22. package/dist/agent/Command.md +93 -0
  23. package/dist/agent/ComposedChart.md +57 -0
  24. package/dist/agent/ContextMenu.md +59 -0
  25. package/dist/agent/DatePicker.md +75 -0
  26. package/dist/agent/Diagram.md +46 -0
  27. package/dist/agent/Dialog.md +52 -0
  28. package/dist/agent/DropdownMenu.md +70 -0
  29. package/dist/agent/EmptyState.md +37 -0
  30. package/dist/agent/ErrorState.md +41 -0
  31. package/dist/agent/Facet.md +82 -0
  32. package/dist/agent/Field.md +37 -0
  33. package/dist/agent/FigureBand.md +37 -0
  34. package/dist/agent/FloatingIconButton.md +38 -0
  35. package/dist/agent/FunnelChart.md +52 -0
  36. package/dist/agent/Heatmap.md +53 -0
  37. package/dist/agent/Histogram.md +63 -0
  38. package/dist/agent/Input.md +30 -0
  39. package/dist/agent/Kbd.md +29 -0
  40. package/dist/agent/LineChart.md +60 -0
  41. package/dist/agent/LinkArrow.md +29 -0
  42. package/dist/agent/NativeSelect.md +40 -0
  43. package/dist/agent/NavItem.md +35 -0
  44. package/dist/agent/Pagination.md +43 -0
  45. package/dist/agent/PieChart.md +55 -0
  46. package/dist/agent/Popover.md +57 -0
  47. package/dist/agent/Progress.md +33 -0
  48. package/dist/agent/RadarChart.md +54 -0
  49. package/dist/agent/RadialChart.md +57 -0
  50. package/dist/agent/RadioGroup.md +44 -0
  51. package/dist/agent/SankeyChart.md +61 -0
  52. package/dist/agent/ScatterChart.md +54 -0
  53. package/dist/agent/ScrollArea.md +40 -0
  54. package/dist/agent/SearchableMenu.md +46 -0
  55. package/dist/agent/Select.md +75 -0
  56. package/dist/agent/Separator.md +35 -0
  57. package/dist/agent/Sheet.md +57 -0
  58. package/dist/agent/Skeleton.md +73 -0
  59. package/dist/agent/Slider.md +39 -0
  60. package/dist/agent/Sparkline.md +45 -0
  61. package/dist/agent/Spinner.md +39 -0
  62. package/dist/agent/StatusDot.md +36 -0
  63. package/dist/agent/StatusPill.md +28 -0
  64. package/dist/agent/Steps.md +44 -0
  65. package/dist/agent/Switch.md +29 -0
  66. package/dist/agent/Table.md +85 -0
  67. package/dist/agent/Tabs.md +48 -0
  68. package/dist/agent/Tag.md +35 -0
  69. package/dist/agent/Textarea.md +26 -0
  70. package/dist/agent/Toast.md +26 -0
  71. package/dist/agent/ToggleGroup.md +44 -0
  72. package/dist/agent/Tooltip.md +51 -0
  73. package/dist/agent/TreemapChart.md +52 -0
  74. package/dist/agent/WaterfallChart.md +62 -0
  75. package/dist/agent/catalog.json +1791 -0
  76. package/dist/agent/index.md +131 -0
  77. package/dist/charts/AreaChart/AreaChart.d.ts +191 -0
  78. package/dist/charts/AreaChart/AreaChart.js +480 -0
  79. package/dist/charts/AreaChart/AreaChart.js.map +1 -0
  80. package/dist/charts/BarChart/BarChart.d.ts +179 -0
  81. package/dist/charts/BarChart/BarChart.js +591 -0
  82. package/dist/charts/BarChart/BarChart.js.map +1 -0
  83. package/dist/charts/BarList/BarList.d.ts +57 -0
  84. package/dist/charts/BarList/BarList.js +71 -0
  85. package/dist/charts/BarList/BarList.js.map +1 -0
  86. package/dist/charts/BigNumber/BigNumber.d.ts +56 -0
  87. package/dist/charts/BigNumber/BigNumber.js +31 -0
  88. package/dist/charts/BigNumber/BigNumber.js.map +1 -0
  89. package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
  90. package/dist/charts/BoxPlot/BoxPlot.js +495 -0
  91. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
  92. package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
  93. package/dist/charts/BulletChart/BulletChart.js +162 -0
  94. package/dist/charts/BulletChart/BulletChart.js.map +1 -0
  95. package/dist/charts/ComposedChart/ComposedChart.d.ts +171 -0
  96. package/dist/charts/ComposedChart/ComposedChart.js +667 -0
  97. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
  98. package/dist/charts/Facet/Facet.d.ts +240 -0
  99. package/dist/charts/Facet/Facet.js +133 -0
  100. package/dist/charts/Facet/Facet.js.map +1 -0
  101. package/dist/charts/Facet/panels.d.ts +187 -0
  102. package/dist/charts/Facet/panels.js +203 -0
  103. package/dist/charts/Facet/panels.js.map +1 -0
  104. package/dist/charts/FunnelChart/FunnelChart.d.ts +101 -0
  105. package/dist/charts/FunnelChart/FunnelChart.js +147 -0
  106. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
  107. package/dist/charts/Heatmap/Heatmap.d.ts +78 -0
  108. package/dist/charts/Heatmap/Heatmap.js +108 -0
  109. package/dist/charts/Heatmap/Heatmap.js.map +1 -0
  110. package/dist/charts/Histogram/Histogram.d.ts +165 -0
  111. package/dist/charts/Histogram/Histogram.js +350 -0
  112. package/dist/charts/Histogram/Histogram.js.map +1 -0
  113. package/dist/charts/LineChart/LineChart.d.ts +167 -0
  114. package/dist/charts/LineChart/LineChart.js +486 -0
  115. package/dist/charts/LineChart/LineChart.js.map +1 -0
  116. package/dist/charts/PieChart/PieChart.d.ts +128 -0
  117. package/dist/charts/PieChart/PieChart.js +309 -0
  118. package/dist/charts/PieChart/PieChart.js.map +1 -0
  119. package/dist/charts/RadarChart/RadarChart.d.ts +123 -0
  120. package/dist/charts/RadarChart/RadarChart.js +299 -0
  121. package/dist/charts/RadarChart/RadarChart.js.map +1 -0
  122. package/dist/charts/RadialChart/RadialChart.d.ts +124 -0
  123. package/dist/charts/RadialChart/RadialChart.js +257 -0
  124. package/dist/charts/RadialChart/RadialChart.js.map +1 -0
  125. package/dist/charts/SankeyChart/SankeyChart.d.ts +137 -0
  126. package/dist/charts/SankeyChart/SankeyChart.js +501 -0
  127. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
  128. package/dist/charts/ScatterChart/ScatterChart.d.ts +128 -0
  129. package/dist/charts/ScatterChart/ScatterChart.js +269 -0
  130. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
  131. package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
  132. package/dist/charts/Sparkline/Sparkline.js +93 -0
  133. package/dist/charts/Sparkline/Sparkline.js.map +1 -0
  134. package/dist/charts/TreemapChart/TreemapChart.d.ts +93 -0
  135. package/dist/charts/TreemapChart/TreemapChart.js +118 -0
  136. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
  137. package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
  138. package/dist/charts/WaterfallChart/WaterfallChart.js +319 -0
  139. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
  140. package/dist/charts/index.d.ts +41 -0
  141. package/dist/charts/index.js +128 -0
  142. package/dist/charts/index.js.map +1 -0
  143. package/dist/charts/lib/annotations.d.ts +103 -0
  144. package/dist/charts/lib/annotations.js +99 -0
  145. package/dist/charts/lib/annotations.js.map +1 -0
  146. package/dist/charts/lib/axis.d.ts +18 -0
  147. package/dist/charts/lib/axis.js +21 -0
  148. package/dist/charts/lib/axis.js.map +1 -0
  149. package/dist/charts/lib/background.d.ts +33 -0
  150. package/dist/charts/lib/background.js +173 -0
  151. package/dist/charts/lib/background.js.map +1 -0
  152. package/dist/charts/lib/brush.d.ts +94 -0
  153. package/dist/charts/lib/brush.js +535 -0
  154. package/dist/charts/lib/brush.js.map +1 -0
  155. package/dist/charts/lib/chart.d.ts +94 -0
  156. package/dist/charts/lib/chart.js +134 -0
  157. package/dist/charts/lib/chart.js.map +1 -0
  158. package/dist/charts/lib/dot.d.ts +29 -0
  159. package/dist/charts/lib/dot.js +78 -0
  160. package/dist/charts/lib/dot.js.map +1 -0
  161. package/dist/charts/lib/empty.d.ts +31 -0
  162. package/dist/charts/lib/empty.js +13 -0
  163. package/dist/charts/lib/empty.js.map +1 -0
  164. package/dist/charts/lib/export.d.ts +103 -0
  165. package/dist/charts/lib/export.js +204 -0
  166. package/dist/charts/lib/export.js.map +1 -0
  167. package/dist/charts/lib/figure.d.ts +61 -0
  168. package/dist/charts/lib/figure.js +59 -0
  169. package/dist/charts/lib/figure.js.map +1 -0
  170. package/dist/charts/lib/format.d.ts +46 -0
  171. package/dist/charts/lib/format.js +56 -0
  172. package/dist/charts/lib/format.js.map +1 -0
  173. package/dist/charts/lib/legend.d.ts +45 -0
  174. package/dist/charts/lib/legend.js +117 -0
  175. package/dist/charts/lib/legend.js.map +1 -0
  176. package/dist/charts/lib/loading.d.ts +48 -0
  177. package/dist/charts/lib/loading.js +105 -0
  178. package/dist/charts/lib/loading.js.map +1 -0
  179. package/dist/charts/lib/paint.d.ts +154 -0
  180. package/dist/charts/lib/paint.js +551 -0
  181. package/dist/charts/lib/paint.js.map +1 -0
  182. package/dist/charts/lib/sonify-control.d.ts +163 -0
  183. package/dist/charts/lib/sonify-control.js +172 -0
  184. package/dist/charts/lib/sonify-control.js.map +1 -0
  185. package/dist/charts/lib/sonify.d.ts +248 -0
  186. package/dist/charts/lib/sonify.js +262 -0
  187. package/dist/charts/lib/sonify.js.map +1 -0
  188. package/dist/charts/lib/toolbar.d.ts +143 -0
  189. package/dist/charts/lib/toolbar.js +156 -0
  190. package/dist/charts/lib/toolbar.js.map +1 -0
  191. package/dist/charts/lib/tooltip.d.ts +59 -0
  192. package/dist/charts/lib/tooltip.js +135 -0
  193. package/dist/charts/lib/tooltip.js.map +1 -0
  194. package/dist/charts/lib/values.d.ts +56 -0
  195. package/dist/charts/lib/values.js +71 -0
  196. package/dist/charts/lib/values.js.map +1 -0
  197. package/dist/charts/lib/zoom.d.ts +139 -0
  198. package/dist/charts/lib/zoom.js +314 -0
  199. package/dist/charts/lib/zoom.js.map +1 -0
  200. package/dist/semantic.css +19 -0
  201. package/dist/styles.css +1 -1
  202. package/dist/themes.css +50 -0
  203. package/dist/tokens.css +118 -0
  204. package/dist/tokens.d.ts +17 -0
  205. package/dist/tokens.js +101 -0
  206. package/dist/tokens.json +101 -0
  207. package/package.json +26 -4
  208. package/skills/misoto22-design/SKILL.md +171 -0
  209. package/skills/misoto22-design/evals/claims.json +95 -0
  210. package/skills/misoto22-design/rules/a11y.md +115 -0
  211. package/skills/misoto22-design/rules/composition.md +108 -0
  212. package/skills/misoto22-design/rules/forms.md +128 -0
  213. package/skills/misoto22-design/rules/naming.md +155 -0
  214. package/skills/misoto22-design/rules/tokens.md +131 -0
@@ -0,0 +1,131 @@
1
+ # @misoto22/design 0.6.0
2
+
3
+ > Monochrome design system: portable CSS tokens and accessible React 19
4
+ > primitives. Components ship compiled — import them, do not copy them.
5
+
6
+ Install: `npm install @misoto22/design`. Styles: `import '@misoto22/design/styles.css'`.
7
+
8
+ One component, in full, offline:
9
+
10
+ ```bash
11
+ npx misoto22-design docs <Component>
12
+ ```
13
+
14
+ ## Theme axes
15
+
16
+ Attributes, independent, and they work on any element — not just the root.
17
+ An unset axis is the default.
18
+
19
+ - `data-chart-palette`: `chroma` (unset = the neutral series ramp)
20
+ - `data-density`: `compact` (unset = comfortable)
21
+ - `data-mode`: `dark` `light` (unset = follows the app)
22
+ - `data-motion`: `snappy` `still` (unset = calm)
23
+ - `data-radius`: `round` `sharp` (unset = the default radius ladder)
24
+ - `data-rules`: `firm` `quiet` (unset = hairline)
25
+ - `data-surface`: `cool` `glass` `warm` (unset = paper)
26
+ - `data-table-density`: `compact` (unset = comfortable — whatever `data-density` is doing around it)
27
+ - `data-type`: `bookish` `grotesk` (unset = editorial)
28
+
29
+ There is no `data-accent` attribute: `--accent` is a CSS custom property,
30
+ re-pointed in a stylesheet.
31
+
32
+ ## Components
33
+
34
+ ### Actions
35
+
36
+ - **Button** — The system’s action, on the same corner as the field beside it.
37
+ - **FloatingIconButton** — A round action pinned to a screen corner.
38
+
39
+ ### Forms
40
+
41
+ - **Field** — A labelled form row: label, control, and the one message below it.
42
+ - **Input** — A single line of text entry.
43
+ - **Textarea** — Multi-line text entry, resizable vertically only.
44
+ - **Select** — A choice from a list, styled the whole way down.
45
+ - **NativeSelect** — The platform’s own picker, restyled where it can be.
46
+ - **Checkbox** — A choice that takes effect when the form is submitted.
47
+ - **RadioGroup** — A set of mutually exclusive choices.
48
+ - **Switch** — A setting that takes effect immediately.
49
+ - **Combobox** — A select you can type into.
50
+ - **DatePicker** — A date — or a span of them — chosen from a calendar.
51
+ - **Slider** — A value chosen along a range.
52
+ - **ToggleGroup** — A segmented control: several options, one strip.
53
+
54
+ ### Navigation
55
+
56
+ - **Tabs** — One strip, several panels.
57
+ - **Accordion** — Disclosure rows that open in place.
58
+ - **Breadcrumb** — Where you are, as a path.
59
+ - **Pagination** — Numbered pages, with the middle elided.
60
+ - **NavItem** — A row in a sidebar.
61
+ - **Collapsible** — One thing that opens, on its own.
62
+
63
+ ### Overlays
64
+
65
+ - **Dialog** — A modal surface: portal, scrim, centred panel.
66
+ - **DropdownMenu** — A menu of actions.
67
+ - **Tooltip** — A short label on hover and on focus.
68
+ - **Popover** — A panel anchored to a control, holding content you can interact with.
69
+ - **Sheet** — A panel docked to an edge of the viewport.
70
+ - **ContextMenu** — The menu a right-click opens.
71
+ - **SearchableMenu** — A menu of actions you can type into.
72
+ - **Command** — A filterable list of actions — the ⌘K surface.
73
+
74
+ ### Feedback
75
+
76
+ - **Spinner** — The one “working” indicator — a ring, never a shimmer.
77
+ - **Skeleton** — The shape of the page, before the page.
78
+ - **Progress** — A bar that fills, or sweeps when the end is unknown.
79
+ - **Alert** — A message about the page, in place.
80
+ - **EmptyState** — A collection with nothing in it — yet.
81
+ - **ErrorState** — A page that could not be shown.
82
+ - **Toast** — A transient confirmation, mounted once near the app root.
83
+
84
+ ### Display
85
+
86
+ - **Badge** — A count or a state, set in mono so it reads as metadata.
87
+ - **Tag** — A subject label — a topic, a technology, a filter facet.
88
+ - **Kbd** — A key on a keyboard, set as one.
89
+ - **Avatar** — A person, as a circle, with initials until the image lands.
90
+ - **StatusDot** — The dot beside a status word.
91
+ - **Steps** — A numbered sequence, as a rail — one thing after another, with a rule through them.
92
+ - **StatusPill** — A live state, named: a dot plus an uppercase mono label.
93
+ - **LinkArrow** — The mark on a link that leaves the page.
94
+ - **Separator** — A rule, in the three weights a monochrome page needs.
95
+ - **Diagram** — A flow or architecture figure, drawn out of the system’s own parts.
96
+ - **FigureBand** — A row of counted facts, divided by hairlines and nothing else.
97
+
98
+ ### Surfaces
99
+
100
+ - **Article** — The long-form reading surface — everything a Markdown pipeline emits, in this system’s type.
101
+ - **Card** — A bounded surface, with no shadow under it.
102
+ - **AppShell** — Two columns on a desktop, a drawer on a phone.
103
+ - **Calendar** — A month, as a grid of days.
104
+ - **ScrollArea** — A box that scrolls, with a scrollbar that looks the same everywhere.
105
+
106
+ ### Data
107
+
108
+ - **Table** — A ruled data table — alignment, sorting and rules all per column.
109
+ - **Heatmap** — A grid of values read by weight.
110
+ - **Sparkline** — A run of numbers at the size of a word.
111
+ - **BarList** — A ranked list, with the bar behind the name rather than beside it.
112
+ - **BigNumber** — One number, at the size of a headline.
113
+ - **BulletChart** — A measure, its target, and the bands that say whether it is any good.
114
+
115
+ ### Charts
116
+
117
+ - **AreaChart** — A filled series over a continuous axis, where the area means something.
118
+ - **BarChart** — Discrete categories compared by length.
119
+ - **LineChart** — Several series compared over a continuous axis.
120
+ - **ComposedChart** — Bars and lines over one axis — the volume, and the rate it moved at.
121
+ - **PieChart** — Parts of one whole.
122
+ - **RadarChart** — A profile across several named dimensions.
123
+ - **RadialChart** — Values on an arc — a gauge, or a few totals against one scale.
124
+ - **SankeyChart** — Where a quantity goes as it moves through stages.
125
+ - **ScatterChart** — Two measures against each other, one mark per observation.
126
+ - **FunnelChart** — Stages that only ever narrow.
127
+ - **TreemapChart** — Part of a whole, when the whole has too many parts for a pie — and the parts nest.
128
+ - **BoxPlot** — The spread of a measurement, per category.
129
+ - **Histogram** — The shape of one distribution.
130
+ - **WaterfallChart** — How a total got from one figure to another.
131
+ - **Facet** — The same chart once per group, on one shared scale.
@@ -0,0 +1,191 @@
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. Selection dims every other series. */
86
+ defaultSelectedDataKey?: string | null;
87
+ /** Fires when the selection changes, and with null when it is cleared. */
88
+ onSelectionChange?: (selectedDataKey: string | null) => void;
89
+ /**
90
+ * Swaps the marks for an animated skeleton, keeping the measured height so
91
+ * the page does not jump when the data lands.
92
+ */
93
+ isLoading?: boolean;
94
+ /** How many points the skeleton draws. */
95
+ loadingPoints?: number;
96
+ /**
97
+ * The row field on the category axis. Needed by the brush and by the table
98
+ * view.
99
+ */
100
+ xDataKey?: keyof TData & string;
101
+ /**
102
+ * Drops the hidden table view. Only correct when the page prints the data
103
+ * itself.
104
+ */
105
+ hideDataTable?: boolean;
106
+ /**
107
+ * What the chart shows when it has nothing to draw.
108
+ *
109
+ * Rendered instead of the plot whenever `data` is empty and the chart is not
110
+ * loading — the state a real dashboard reaches within a week, and the one an
111
+ * empty pair of axes is indistinguishable from a failed load. `false` keeps
112
+ * the axes, for a chart whose emptiness is itself the reading.
113
+ */
114
+ empty?: ChartEmptyProps | false;
115
+ }
116
+ /**
117
+ * A filled series over a category axis — the shape for a magnitude that is
118
+ * continuous, where the area under the line means something.
119
+ *
120
+ * Composed rather than configured: axes, grid, tooltip, legend and the areas
121
+ * themselves are children, so a chart renders exactly the parts it asked for
122
+ * and nothing is switched on by a prop nobody can see.
123
+ *
124
+ * Reach for `<LineChart>` instead when the reader is comparing several series
125
+ * against each other rather than reading one total, and for `<BarChart>` when
126
+ * the categories are discrete.
127
+ *
128
+ * @example
129
+ * <AreaChart title="Visitors per month" config={config} data={data} xDataKey="month">
130
+ * <AreaChart.Grid />
131
+ * <AreaChart.XAxis dataKey="month" />
132
+ * <AreaChart.Tooltip />
133
+ * <AreaChart.Area dataKey="desktop" variant="gradient" />
134
+ * </AreaChart>
135
+ */
136
+ 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, onSelectionChange, isLoading, loadingPoints, xDataKey, hideDataTable, empty, }: AreaChartProps<TData, TConfig>): react.JSX.Element;
137
+ declare namespace AreaChart {
138
+ var Area: ({ dataKey, variant, strokeVariant, strokeWidth, curveType, animationType, connectNulls, isClickable, children, areaProps, }: AreaProps) => react.JSX.Element | null;
139
+ var Dot: FC<DotProps>;
140
+ var ActiveDot: FC<DotProps>;
141
+ var XAxis: ({ tickLine, axisLine, tickMargin, minTickGap, label, ...rest }: ChartXAxisProps) => react.JSX.Element | null;
142
+ var YAxis: ({ tickLine, axisLine, tickMargin, minTickGap, width, tickFormatter, label, ...rest }: ChartYAxisProps) => react.JSX.Element | null;
143
+ var Grid: ({ vertical, strokeDasharray, ...rest }: ComponentProps<typeof CartesianGrid>) => react.JSX.Element;
144
+ var Tooltip: ({ variant, roundness, defaultIndex, cursor }: ChartTooltipSlotProps) => react.JSX.Element | null;
145
+ var Legend: ({ variant, align, verticalAlign, isClickable, }: ChartLegendSlotProps) => react.JSX.Element;
146
+ var Background: ({ variant }: {
147
+ variant: ChartBackgroundVariant;
148
+ }) => react.JSX.Element | null;
149
+ var ReferenceLine: typeof ReferenceLine;
150
+ var ReferenceBand: typeof ReferenceBand;
151
+ var Annotation: typeof Annotation;
152
+ var Values: FC<ValuesProps>;
153
+ var Brush: FC<BrushProps>;
154
+ var Toolbar: FC<ToolbarProps>;
155
+ var Sonify: FC<SonifyProps>;
156
+ }
157
+ interface AreaProps {
158
+ /** The series to draw. Must exist on both the rows and the config. */
159
+ dataKey: string;
160
+ variant?: AreaVariant;
161
+ strokeVariant?: AreaStrokeVariant;
162
+ strokeWidth?: number;
163
+ curveType?: ChartCurveType;
164
+ animationType?: ChartRevealType;
165
+ connectNulls?: boolean;
166
+ /** Lets a click on this area select it, dimming the rest. */
167
+ isClickable?: boolean;
168
+ /** `<AreaChart.Dot>`, `<AreaChart.ActiveDot>` and `<AreaChart.Values>`. */
169
+ children?: ReactNode;
170
+ areaProps?: ComponentProps<typeof Area>;
171
+ }
172
+ interface DotProps {
173
+ variant?: ChartDotVariant;
174
+ }
175
+ interface ChartTooltipSlotProps {
176
+ variant?: ChartTooltipVariant;
177
+ roundness?: ChartTooltipRoundness;
178
+ /** Shows the tooltip at this row before anything is hovered. */
179
+ defaultIndex?: number;
180
+ /** The crosshair that follows the pointer along the axis. */
181
+ cursor?: boolean;
182
+ }
183
+ interface ChartLegendSlotProps {
184
+ variant?: ChartLegendVariant;
185
+ align?: ChartLegendAlign;
186
+ verticalAlign?: 'top' | 'middle' | 'bottom';
187
+ /** Makes each entry a button that selects its series. */
188
+ isClickable?: boolean;
189
+ }
190
+
191
+ 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 };