@ngrok/mantle 0.80.0 → 0.81.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.
Files changed (175) hide show
  1. package/dist/accordion.d.ts +19 -37
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +15 -48
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +167 -83
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/area-chart.d.ts +505 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +492 -0
  14. package/dist/bar-chart.js +1 -0
  15. package/dist/breadcrumb.d.ts +6 -24
  16. package/dist/breadcrumb.js +1 -1
  17. package/dist/button-BAno7KIU.js +1 -0
  18. package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
  19. package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
  20. package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
  21. package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
  22. package/dist/button-DvHMWAPl.js +1 -0
  23. package/dist/button.d.ts +5 -5
  24. package/dist/button.js +1 -1
  25. package/dist/calendar.js +1 -1
  26. package/dist/card.d.ts +5 -20
  27. package/dist/card.js +1 -1
  28. package/dist/centered-layout.d.ts +5 -20
  29. package/dist/centered-layout.js +1 -1
  30. package/dist/chart-1cVjAcj8.d.ts +334 -0
  31. package/dist/chart-Do2qkrxl.js +2 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +13 -1
  34. package/dist/checkbox.js +1 -1
  35. package/dist/choice-BHwFSSyv.js +1 -0
  36. package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
  37. package/dist/choice.d.ts +1 -1
  38. package/dist/choice.js +1 -1
  39. package/dist/code-block.d.ts +60 -44
  40. package/dist/code-block.js +6 -6
  41. package/dist/code-block_highlight-utils.d.ts +1 -1
  42. package/dist/code-block_highlight-utils.js +1 -1
  43. package/dist/combobox.d.ts +9 -33
  44. package/dist/combobox.js +1 -1
  45. package/dist/command.d.ts +70 -18
  46. package/dist/command.js +1 -1
  47. package/dist/data-table.d.ts +6 -12
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +40 -32
  50. package/dist/description-list.js +1 -1
  51. package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
  52. package/dist/dialog-DWZWd5Jt.js +1 -0
  53. package/dist/dialog.d.ts +13 -43
  54. package/dist/dialog.js +1 -1
  55. package/dist/dropdown-menu-BbbQuae2.d.ts +1 -0
  56. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-D6pMAY7I.d.ts} +156 -54
  57. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  58. package/dist/dropdown-menu.d.ts +2 -2
  59. package/dist/dropdown-menu.js +1 -1
  60. package/dist/empty.d.ts +6 -21
  61. package/dist/empty.js +1 -1
  62. package/dist/field-B1wqeZr4.js +1 -0
  63. package/dist/field.d.ts +26 -53
  64. package/dist/field.js +1 -1
  65. package/dist/flag.d.ts +1 -1
  66. package/dist/hooks.js +1 -1
  67. package/dist/hover-card.d.ts +3 -12
  68. package/dist/hover-card.js +1 -1
  69. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  70. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  71. package/dist/icon-lZ48P8Nn.js +1 -0
  72. package/dist/icon.d.ts +3 -3
  73. package/dist/icon.js +1 -1
  74. package/dist/icons-DLCs1hLP.js +1 -0
  75. package/dist/icons.d.ts +53 -2
  76. package/dist/icons.js +1 -1
  77. package/dist/input-BnlpQF0c.js +1 -0
  78. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  79. package/dist/input.d.ts +2 -2
  80. package/dist/input.js +1 -1
  81. package/dist/line-chart.d.ts +491 -0
  82. package/dist/line-chart.js +1 -0
  83. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  84. package/dist/list.d.ts +5 -20
  85. package/dist/list.js +1 -1
  86. package/dist/llms.txt +5 -1
  87. package/dist/mantle-dark-high-contrast.css +17 -0
  88. package/dist/mantle-dark.css +13 -0
  89. package/dist/mantle-light-high-contrast.css +15 -0
  90. package/dist/mantle.css +29 -0
  91. package/dist/media-object.d.ts +45 -12
  92. package/dist/media-object.js +1 -1
  93. package/dist/multi-select.d.ts +14 -53
  94. package/dist/multi-select.js +1 -1
  95. package/dist/otp-input.d.ts +5 -17
  96. package/dist/otp-input.js +1 -1
  97. package/dist/pagination.d.ts +11 -21
  98. package/dist/pagination.js +1 -1
  99. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  100. package/dist/popover-CQ9s7jG5.js +1 -0
  101. package/dist/popover.d.ts +1 -1
  102. package/dist/popover.js +1 -1
  103. package/dist/primitive-trJDqIXJ.js +1 -0
  104. package/dist/progress.d.ts +2 -8
  105. package/dist/progress.js +1 -1
  106. package/dist/qr-code.d.ts +4 -16
  107. package/dist/qr-code.js +1 -1
  108. package/dist/radio-group.d.ts +129 -40
  109. package/dist/radio-group.js +1 -1
  110. package/dist/sandboxed-on-click.d.ts +2 -2
  111. package/dist/scatter-plot.d.ts +495 -0
  112. package/dist/scatter-plot.js +1 -0
  113. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  114. package/dist/select-BCHWvmyC.js +1 -0
  115. package/dist/select.d.ts +1 -1
  116. package/dist/select.js +1 -1
  117. package/dist/selectable-list.d.ts +11 -38
  118. package/dist/selectable-list.js +1 -1
  119. package/dist/sheet.d.ts +22 -49
  120. package/dist/sheet.js +1 -1
  121. package/dist/skip-to-main-link.js +1 -1
  122. package/dist/slider.js +1 -1
  123. package/dist/slot.d.ts +1 -1
  124. package/dist/split-button.d.ts +155 -31
  125. package/dist/split-button.js +1 -1
  126. package/dist/switch.d.ts +1 -1
  127. package/dist/switch.js +1 -1
  128. package/dist/table-CGxJwtbL.js +1 -0
  129. package/dist/{table-DUSvU_Jw.d.ts → table-CZBYEmyK.d.ts} +11 -38
  130. package/dist/table.d.ts +1 -1
  131. package/dist/table.js +1 -1
  132. package/dist/tabs.d.ts +21 -36
  133. package/dist/tabs.js +1 -1
  134. package/dist/text-area.d.ts +2 -2
  135. package/dist/text-area.js +1 -1
  136. package/dist/theme-C26-Xolp.js +1 -0
  137. package/dist/{themes-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
  138. package/dist/theme-switcher.d.ts +6 -15
  139. package/dist/theme-switcher.js +1 -1
  140. package/dist/theme.d.ts +42 -2
  141. package/dist/theme.js +1 -1
  142. package/dist/toast.d.ts +9 -17
  143. package/dist/toast.js +1 -1
  144. package/dist/tooltip.d.ts +26 -8
  145. package/dist/tooltip.js +1 -1
  146. package/dist/types.js +1 -1
  147. package/package.json +20 -14
  148. package/dist/checkbox-Cq17y0-R.js +0 -1
  149. package/dist/choice-Cc8dA5r8.js +0 -1
  150. package/dist/dialog-CQ2C6vkE.js +0 -1
  151. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  152. package/dist/field-context-BR01g789.js +0 -1
  153. package/dist/icon-CGgMKpJg.js +0 -1
  154. package/dist/icon-button-DiOhreJD.js +0 -1
  155. package/dist/index-CdPXa9h1.d.ts +0 -1
  156. package/dist/input-CVyAVbim.js +0 -1
  157. package/dist/popover-CBMADtjV.js +0 -1
  158. package/dist/primitive-DCPHJsRs.js +0 -1
  159. package/dist/select-SR_9-bxA.js +0 -1
  160. package/dist/table-GDkapNFi.js +0 -1
  161. package/dist/theme-provider-BftkIiZn.js +0 -1
  162. package/dist/theme-wVnzzx2F.js +0 -1
  163. package/dist/toast-DKgMRv4F.js +0 -1
  164. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  165. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  166. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  167. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  168. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  169. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  170. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  171. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  172. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  173. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  174. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  175. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
@@ -0,0 +1,505 @@
1
+ import { _ as SeriesColor, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as PointShape, h as CurveKind, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ContinuousXScale, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps } from "./chart-1cVjAcj8.js";
2
+ //#region src/components/area-chart/area-chart.d.ts
3
+ /**
4
+ * Props for {@link AreaChart.Root}. Areas fill from a shared zero baseline, so
5
+ * the y domain minimum is fixed at `0` — a truncated-area axis is
6
+ * unrepresentable.
7
+ */
8
+ type AreaChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "yDomain"> & ChartAccessibilityProps & {
9
+ /** Rows of data; each `AreaChart.Area` reads one numeric key per row. */
10
+ data: readonly TDatum[];
11
+ /** The key of each row's x value. */
12
+ xKey: Extract<keyof TDatum, string>;
13
+ /**
14
+ * Override the auto-detected x scale (`Date` values → `"time"`, numbers →
15
+ * `"linear"`, strings → `"point"`).
16
+ */
17
+ xScale?: ContinuousXScale;
18
+ /** Override the automatic y maximum. The minimum is always the zero baseline. */
19
+ yDomain?: [0, number | "auto"];
20
+ };
21
+ /**
22
+ * Props for {@link AreaChart.Area}.
23
+ */
24
+ type AreaChartAreaProps = {
25
+ /** The row key this series reads its numeric values from. */
26
+ dataKey: string;
27
+ /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
28
+ label?: string;
29
+ /**
30
+ * One of the validated chart tokens (`"chart-1"`…`"chart-8"`, `"chart-other"`)
31
+ * or any CSS color as an escape hatch. Defaults to the next sticky slot in
32
+ * mount order. Static colors (raw hex) do not adapt across themes; custom
33
+ * palettes must be validated for colorblind-safe adjacency and surface
34
+ * contrast, and a series that carries good/bad meaning should wear the
35
+ * semantic status colors, never a categorical slot.
36
+ */
37
+ color?: SeriesColor;
38
+ /**
39
+ * Interpolation between points: `"linear"` (default), `"monotone"`
40
+ * (smoothed), or `"step"`.
41
+ */
42
+ curve?: CurveKind;
43
+ /**
44
+ * Join across `null`/missing values instead of leaving gaps. Gaps are the
45
+ * default and usually correct.
46
+ */
47
+ connectNulls?: boolean;
48
+ /**
49
+ * The glyph the hover dot wears: `"circle"` (default), `"square"`,
50
+ * `"triangle"`, or `"diamond"` — a redundant encoding alongside color that
51
+ * keeps series distinguishable without color vision.
52
+ */
53
+ shape?: PointShape;
54
+ };
55
+ /**
56
+ * Props for {@link AreaChart.Grid}.
57
+ */
58
+ type AreaChartGridProps = GridPrimitiveProps;
59
+ /**
60
+ * Props for {@link AreaChart.XAxis}. The tick formatter receives the row's x
61
+ * value — the category value on point scales, a `Date` on time scales, and a
62
+ * number on linear scales.
63
+ */
64
+ type AreaChartXAxisProps = XAxisPrimitiveProps;
65
+ /**
66
+ * Props for {@link AreaChart.YAxis}.
67
+ */
68
+ type AreaChartYAxisProps = YAxisPrimitiveProps;
69
+ /**
70
+ * Props for {@link AreaChart.ReferenceLine}.
71
+ */
72
+ type AreaChartReferenceLineProps = ReferenceLinePrimitiveProps;
73
+ /**
74
+ * Props for {@link AreaChart.Tooltip}.
75
+ */
76
+ type AreaChartTooltipProps = TooltipPrimitiveProps;
77
+ /**
78
+ * Props for {@link AreaChart.Legend}.
79
+ */
80
+ type AreaChartLegendProps = LegendPrimitiveProps;
81
+ /**
82
+ * Props for {@link AreaChart.CopyButton}.
83
+ */
84
+ type AreaChartCopyButtonProps = CopyButtonPrimitiveProps;
85
+ /**
86
+ * The root of an area chart: owns the data, the scales, the canvas renderer,
87
+ * and the entire interaction contract (a crosshair with an every-series
88
+ * tooltip, keyboard stepping with polite announcements, an sr-only data
89
+ * table, Enter/Space + click activation). Areas fill with a 10% wash of the
90
+ * series color plus a 2px band-edge stroke; `stacked` on the Root stacks the
91
+ * composed series, the first series at the baseline. Large datasets decimate
92
+ * before painting on canvas. Compose the chrome and series parts as children.
93
+ *
94
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartroot
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * const data = [
99
+ * { date: new Date("2026-07-15"), http: 4200, tcp: 1400 },
100
+ * { date: new Date("2026-07-16"), http: 5100, tcp: 1650 },
101
+ * { date: new Date("2026-07-17"), http: 4700, tcp: 1500 },
102
+ * ];
103
+ *
104
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
105
+ * <AreaChart.Grid />
106
+ * <AreaChart.XAxis />
107
+ * <AreaChart.YAxis />
108
+ * <AreaChart.Area dataKey="http" label="HTTP" />
109
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
110
+ * <AreaChart.Tooltip />
111
+ * <AreaChart.Legend />
112
+ * </AreaChart.Root>
113
+ * ```
114
+ */
115
+ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: AreaChartRootProps<TDatum>) => import("react").JSX.Element;
116
+ /**
117
+ * One area series. Renders nothing itself — it registers the series with the
118
+ * chart, which paints it on canvas. Compose one `Area` per series; with
119
+ * `stacked` on the Root, areas stack in composition order with the first
120
+ * series at the baseline.
121
+ *
122
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartarea
123
+ *
124
+ * @example
125
+ * ```tsx
126
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
127
+ * <AreaChart.Grid />
128
+ * <AreaChart.XAxis />
129
+ * <AreaChart.YAxis />
130
+ * <AreaChart.Area dataKey="http" label="HTTP" />
131
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
132
+ * <AreaChart.Tooltip />
133
+ * <AreaChart.Legend />
134
+ * </AreaChart.Root>
135
+ * ```
136
+ */
137
+ declare const Area: (props: AreaChartAreaProps) => null;
138
+ /**
139
+ * Horizontal hairline gridlines behind the areas (renderless; painted on
140
+ * canvas). Omit the part to omit the grid.
141
+ *
142
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartgrid
143
+ *
144
+ * @example
145
+ * ```tsx
146
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
147
+ * <AreaChart.Grid />
148
+ * <AreaChart.XAxis />
149
+ * <AreaChart.YAxis />
150
+ * <AreaChart.Area dataKey="http" label="HTTP" />
151
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
152
+ * <AreaChart.Tooltip />
153
+ * <AreaChart.Legend />
154
+ * </AreaChart.Root>
155
+ * ```
156
+ */
157
+ declare const Grid: (props: AreaChartGridProps) => null;
158
+ /**
159
+ * Tick labels along the bottom of the plot (renderless; painted on canvas).
160
+ * Labels that would collide are skipped, never rotated.
161
+ *
162
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartxaxis
163
+ *
164
+ * @example
165
+ * ```tsx
166
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
167
+ * <AreaChart.Grid />
168
+ * <AreaChart.XAxis tickFormat={(date) => new Date(date).toLocaleDateString()} />
169
+ * <AreaChart.YAxis />
170
+ * <AreaChart.Area dataKey="http" label="HTTP" />
171
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
172
+ * <AreaChart.Tooltip />
173
+ * <AreaChart.Legend />
174
+ * </AreaChart.Root>
175
+ * ```
176
+ */
177
+ declare const XAxis: (props: AreaChartXAxisProps) => null;
178
+ /**
179
+ * Value tick labels along the left of the plot (renderless; painted on
180
+ * canvas). Ticks land on clean thousands-separated numbers.
181
+ *
182
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartyaxis
183
+ *
184
+ * @example
185
+ * ```tsx
186
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
187
+ * <AreaChart.Grid />
188
+ * <AreaChart.XAxis />
189
+ * <AreaChart.YAxis tickFormat={(value) => `${value / 1000}k`} />
190
+ * <AreaChart.Area dataKey="http" label="HTTP" />
191
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
192
+ * <AreaChart.Tooltip />
193
+ * <AreaChart.Legend />
194
+ * </AreaChart.Root>
195
+ * ```
196
+ */
197
+ declare const YAxis: (props: AreaChartYAxisProps) => null;
198
+ /**
199
+ * A dashed horizontal marker at a y value — an SLO threshold, a budget, a
200
+ * limit (renderless; painted on canvas).
201
+ *
202
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartreferenceline
203
+ *
204
+ * @example
205
+ * ```tsx
206
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
207
+ * <AreaChart.Grid />
208
+ * <AreaChart.XAxis />
209
+ * <AreaChart.YAxis />
210
+ * <AreaChart.Area dataKey="http" label="HTTP" />
211
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
212
+ * <AreaChart.ReferenceLine y={6000} label="Capacity" />
213
+ * <AreaChart.Tooltip />
214
+ * <AreaChart.Legend />
215
+ * </AreaChart.Root>
216
+ * ```
217
+ */
218
+ declare const ReferenceLine: (props: AreaChartReferenceLineProps) => null;
219
+ /**
220
+ * Customizes the hover/keyboard tooltip readout. The tooltip itself is part
221
+ * of `AreaChart.Root`'s interaction contract and renders whether or not this
222
+ * part is composed — compose it to format the label or values, append a
223
+ * footer, or replace the content entirely via the render-prop `children`.
224
+ *
225
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areacharttooltip
226
+ *
227
+ * @example
228
+ * ```tsx
229
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
230
+ * <AreaChart.Grid />
231
+ * <AreaChart.XAxis />
232
+ * <AreaChart.YAxis />
233
+ * <AreaChart.Area dataKey="http" label="HTTP" />
234
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
235
+ * <AreaChart.Tooltip valueFormat={(value) => `${value} requests`} footer="Click to view logs" />
236
+ * <AreaChart.Legend />
237
+ * </AreaChart.Root>
238
+ * ```
239
+ */
240
+ declare const Tooltip: (props: AreaChartTooltipProps) => null;
241
+ /**
242
+ * The legend: series names keyed by color swatches, rendered as real DOM in
243
+ * flow below the plot. Always compose it on multi-series charts — identity
244
+ * must never rely on color-matching alone. It renders nothing for a single
245
+ * series (the chart's title already names it).
246
+ *
247
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartlegend
248
+ *
249
+ * @example
250
+ * ```tsx
251
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
252
+ * <AreaChart.Grid />
253
+ * <AreaChart.XAxis />
254
+ * <AreaChart.YAxis />
255
+ * <AreaChart.Area dataKey="http" label="HTTP" />
256
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
257
+ * <AreaChart.Tooltip />
258
+ * <AreaChart.Legend />
259
+ * </AreaChart.Root>
260
+ * ```
261
+ */
262
+ declare const Legend: (props: AreaChartLegendProps) => import("react").JSX.Element;
263
+ /**
264
+ * A button that copies the chart's current data to the clipboard as a
265
+ * markdown table (ISO dates, plain numbers, one column per series) —
266
+ * pasteable into Slack, issues, docs, spreadsheets, and LLM chats. Renders
267
+ * in flow where composed (alongside `Legend`, below the plot); `Root` is
268
+ * relatively positioned, so `className` can dock it over a corner instead
269
+ * (e.g. `absolute right-0 top-0`).
270
+ *
271
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartcopybutton
272
+ *
273
+ * @example
274
+ * ```tsx
275
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
276
+ * <AreaChart.Area dataKey="http" label="HTTP" />
277
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
278
+ * <AreaChart.Legend />
279
+ * <AreaChart.CopyButton />
280
+ * </AreaChart.Root>
281
+ * ```
282
+ */
283
+ declare const CopyButton: (props: AreaChartCopyButtonProps) => import("react").JSX.Element;
284
+ /**
285
+ * A canvas-rendered area chart for showing how values — and, when stacked, a
286
+ * total and its parts — change over a continuous x axis. Each area fills with
287
+ * a 10% wash of the series color plus a 2px band-edge stroke; the Root-level
288
+ * `stacked` prop stacks the composed series in composition order from the
289
+ * baseline. Series colors come from the theme's validated `--color-chart-*`
290
+ * tokens; areas keep a fixed slot color for the chart's lifetime even as
291
+ * other series are filtered in and out. Interaction — a crosshair with an
292
+ * every-series tooltip, keyboard stepping, aria-live announcements, and an
293
+ * sr-only data table — ships with `Root` unconditionally; large datasets
294
+ * decimate before painting on canvas.
295
+ *
296
+ * @see https://mantle.ngrok.com/components/charts/area-chart
297
+ *
298
+ * @example
299
+ * Composition:
300
+ * ```
301
+ * AreaChart.Root
302
+ * ├── AreaChart.Grid
303
+ * ├── AreaChart.XAxis
304
+ * ├── AreaChart.YAxis
305
+ * ├── AreaChart.Area (one per series)
306
+ * ├── AreaChart.ReferenceLine
307
+ * ├── AreaChart.Tooltip
308
+ * ├── AreaChart.Legend
309
+ * └── AreaChart.CopyButton
310
+ * ```
311
+ *
312
+ * @example
313
+ * ```tsx
314
+ * const data = [
315
+ * { date: new Date("2026-07-15"), http: 4200, tcp: 1400 },
316
+ * { date: new Date("2026-07-16"), http: 5100, tcp: 1650 },
317
+ * { date: new Date("2026-07-17"), http: 4700, tcp: 1500 },
318
+ * ];
319
+ *
320
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
321
+ * <AreaChart.Grid />
322
+ * <AreaChart.XAxis />
323
+ * <AreaChart.YAxis />
324
+ * <AreaChart.Area dataKey="http" label="HTTP" />
325
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
326
+ * <AreaChart.Tooltip />
327
+ * <AreaChart.Legend />
328
+ * </AreaChart.Root>
329
+ * ```
330
+ */
331
+ declare const AreaChart: {
332
+ /**
333
+ * The root of an area chart: owns the data, the scales, the canvas renderer,
334
+ * and the entire interaction contract.
335
+ *
336
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartroot
337
+ *
338
+ * @example
339
+ * ```tsx
340
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
341
+ * <AreaChart.Grid />
342
+ * <AreaChart.XAxis />
343
+ * <AreaChart.YAxis />
344
+ * <AreaChart.Area dataKey="http" label="HTTP" />
345
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
346
+ * <AreaChart.Tooltip />
347
+ * <AreaChart.Legend />
348
+ * </AreaChart.Root>
349
+ * ```
350
+ */
351
+ readonly Root: typeof Root;
352
+ /**
353
+ * One area series; registers with the chart and paints on canvas.
354
+ *
355
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartarea
356
+ *
357
+ * @example
358
+ * ```tsx
359
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
360
+ * <AreaChart.Grid />
361
+ * <AreaChart.XAxis />
362
+ * <AreaChart.YAxis />
363
+ * <AreaChart.Area dataKey="http" label="HTTP" />
364
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
365
+ * <AreaChart.Tooltip />
366
+ * <AreaChart.Legend />
367
+ * </AreaChart.Root>
368
+ * ```
369
+ */
370
+ readonly Area: typeof Area;
371
+ /**
372
+ * Hairline gridlines behind the areas.
373
+ *
374
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartgrid
375
+ *
376
+ * @example
377
+ * ```tsx
378
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
379
+ * <AreaChart.Grid />
380
+ * <AreaChart.XAxis />
381
+ * <AreaChart.YAxis />
382
+ * <AreaChart.Area dataKey="http" label="HTTP" />
383
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
384
+ * <AreaChart.Tooltip />
385
+ * <AreaChart.Legend />
386
+ * </AreaChart.Root>
387
+ * ```
388
+ */
389
+ readonly Grid: typeof Grid;
390
+ /**
391
+ * Tick labels along the bottom of the plot.
392
+ *
393
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartxaxis
394
+ *
395
+ * @example
396
+ * ```tsx
397
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
398
+ * <AreaChart.Grid />
399
+ * <AreaChart.XAxis tickFormat={(date) => new Date(date).toLocaleDateString()} />
400
+ * <AreaChart.YAxis />
401
+ * <AreaChart.Area dataKey="http" label="HTTP" />
402
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
403
+ * <AreaChart.Tooltip />
404
+ * <AreaChart.Legend />
405
+ * </AreaChart.Root>
406
+ * ```
407
+ */
408
+ readonly XAxis: typeof XAxis;
409
+ /**
410
+ * Value tick labels along the left of the plot.
411
+ *
412
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartyaxis
413
+ *
414
+ * @example
415
+ * ```tsx
416
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
417
+ * <AreaChart.Grid />
418
+ * <AreaChart.XAxis />
419
+ * <AreaChart.YAxis tickFormat={(value) => `${value / 1000}k`} />
420
+ * <AreaChart.Area dataKey="http" label="HTTP" />
421
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
422
+ * <AreaChart.Tooltip />
423
+ * <AreaChart.Legend />
424
+ * </AreaChart.Root>
425
+ * ```
426
+ */
427
+ readonly YAxis: typeof YAxis;
428
+ /**
429
+ * A dashed horizontal marker at a y value (threshold, budget, limit).
430
+ *
431
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartreferenceline
432
+ *
433
+ * @example
434
+ * ```tsx
435
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
436
+ * <AreaChart.Grid />
437
+ * <AreaChart.XAxis />
438
+ * <AreaChart.YAxis />
439
+ * <AreaChart.Area dataKey="http" label="HTTP" />
440
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
441
+ * <AreaChart.ReferenceLine y={6000} label="Capacity" />
442
+ * <AreaChart.Tooltip />
443
+ * <AreaChart.Legend />
444
+ * </AreaChart.Root>
445
+ * ```
446
+ */
447
+ readonly ReferenceLine: typeof ReferenceLine;
448
+ /**
449
+ * Customizes the always-on hover/keyboard tooltip readout.
450
+ *
451
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areacharttooltip
452
+ *
453
+ * @example
454
+ * ```tsx
455
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
456
+ * <AreaChart.Grid />
457
+ * <AreaChart.XAxis />
458
+ * <AreaChart.YAxis />
459
+ * <AreaChart.Area dataKey="http" label="HTTP" />
460
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
461
+ * <AreaChart.Tooltip valueFormat={(value) => `${value} requests`} />
462
+ * <AreaChart.Legend />
463
+ * </AreaChart.Root>
464
+ * ```
465
+ */
466
+ readonly Tooltip: typeof Tooltip;
467
+ /**
468
+ * The legend; always compose it on multi-series charts. Renders nothing for
469
+ * a single series.
470
+ *
471
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartlegend
472
+ *
473
+ * @example
474
+ * ```tsx
475
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
476
+ * <AreaChart.Grid />
477
+ * <AreaChart.XAxis />
478
+ * <AreaChart.YAxis />
479
+ * <AreaChart.Area dataKey="http" label="HTTP" />
480
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
481
+ * <AreaChart.Tooltip />
482
+ * <AreaChart.Legend />
483
+ * </AreaChart.Root>
484
+ * ```
485
+ */
486
+ readonly Legend: typeof Legend;
487
+ /**
488
+ * Copies the chart's current data to the clipboard as a markdown table.
489
+ *
490
+ * @see https://mantle.ngrok.com/components/charts/area-chart#areachartcopybutton
491
+ *
492
+ * @example
493
+ * ```tsx
494
+ * <AreaChart.Root data={data} xKey="date" stacked aria-label="Traffic by protocol">
495
+ * <AreaChart.Area dataKey="http" label="HTTP" />
496
+ * <AreaChart.Area dataKey="tcp" label="TCP" />
497
+ * <AreaChart.Legend />
498
+ * <AreaChart.CopyButton />
499
+ * </AreaChart.Root>
500
+ * ```
501
+ */
502
+ readonly CopyButton: typeof CopyButton;
503
+ };
504
+ //#endregion
505
+ export { AreaChart, type AreaChartAreaProps, type AreaChartCopyButtonProps, type AreaChartGridProps, type AreaChartLegendProps, type AreaChartReferenceLineProps, type AreaChartRootProps, type AreaChartTooltipProps, type AreaChartXAxisProps, type AreaChartYAxisProps, type ChartDatumEvent };
@@ -0,0 +1 @@
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-Do2qkrxl.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`area`,componentName:`AreaChart`,slotName:`area-chart`,...e}),Area:e=>a(`AreaChart.Area`,`area`,e),Grid:e=>n(`AreaChart.Grid`,e),XAxis:e=>t(`AreaChart.XAxis`,e),YAxis:e=>r(`AreaChart.YAxis`,e),ReferenceLine:t=>e(`AreaChart.ReferenceLine`,t),Tooltip:e=>s(`AreaChart.Tooltip`,e),Legend:e=>l(i,{partName:`AreaChart.Legend`,slotName:`area-chart`,...e}),CopyButton:e=>l(c,{partName:`AreaChart.CopyButton`,slotName:`area-chart`,...e})};export{u as AreaChart};
package/dist/badge.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=({appearance:u,asChild:d=!1,children:p,className:h,color:g=`neutral`,icon:_,...v})=>{let y=f(g,u),b=m(g,u),x=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,_&&`ps-1`,y,b,h);if(d){let e=r.only(p);o(a(e),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{"data-slot":`badge`,className:x,...v,children:i(e,{},l(s,{children:[_&&c(t,{className:`size-4`,svg:_}),u]}))})}return l(`span`,{"data-slot":`badge`,className:x,...v,children:[_&&c(t,{className:`size-4`,svg:_}),p]})},d={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function f(e,t){switch(t){case`muted`:return d[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}const p={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function m(e,t){switch(t){case`muted`:return p[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}export{u as Badge};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=({appearance:u,asChild:d=!1,children:p,className:h,color:g=`neutral`,icon:_,...v})=>{let y=f(g,u),b=m(g,u),x=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,_&&`ps-1`,y,b,h);if(d){let e=r.only(p);o(a(e),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{"data-slot":`badge`,className:x,...v,children:i(e,{},l(s,{children:[_&&c(t,{className:`size-4`,svg:_}),u]}))})}return l(`span`,{"data-slot":`badge`,className:x,...v,children:[_&&c(t,{className:`size-4`,svg:_}),p]})},d={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function f(e,t){switch(t){case`muted`:return d[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}const p={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function m(e,t){switch(t){case`muted`:return p[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}export{u as Badge};