@ngrok/mantle 0.82.0 → 0.83.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 (175) hide show
  1. package/dist/accordion.d.ts +7 -7
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +3 -1
  4. package/dist/{alert-BWwNPOMI.d.ts → alert-B1HXfkYn.d.ts} +9 -7
  5. package/dist/{alert-QMs0PqMq.js → alert-BuG2qS5l.js} +1 -1
  6. package/dist/alert-center.d.ts +220 -22
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +18 -18
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert.d.ts +1 -1
  11. package/dist/alert.js +1 -1
  12. package/dist/{anchor-DvbNsphX.js → anchor-3OGK2UKU.js} +1 -1
  13. package/dist/anchor.d.ts +2 -2
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +296 -213
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +67 -19
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.d.ts +319 -0
  20. package/dist/avatar.js +1 -0
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +73 -20
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.d.ts +50 -17
  25. package/dist/breadcrumb.js +1 -1
  26. package/dist/browser-only.d.ts +3 -3
  27. package/dist/{button-C-gMbPso.d.ts → button-BIf69CSV.d.ts} +2 -2
  28. package/dist/button-BLDjW1u9.js +1 -0
  29. package/dist/{button-C0S8RbaJ.js → button-CCkGqE1t.js} +1 -1
  30. package/dist/{button-BUospUB3.js → button-Cnja9Bsr.js} +1 -1
  31. package/dist/{button-C7vAl6lS.d.ts → button-DJ7AAgII.d.ts} +4 -6
  32. package/dist/{button-BO2CKsz6.js → button-DmJkYfyl.js} +1 -1
  33. package/dist/{button-DARFK2KJ.d.ts → button-PoIujPMX.d.ts} +2 -2
  34. package/dist/button.d.ts +3 -3
  35. package/dist/button.js +1 -1
  36. package/dist/calendar.d.ts +1 -1
  37. package/dist/calendar.js +1 -1
  38. package/dist/card.d.ts +15 -15
  39. package/dist/card.js +1 -1
  40. package/dist/centered-layout.js +1 -1
  41. package/dist/{chart-1cVjAcj8.d.ts → chart-0zcFJh4n.d.ts} +75 -22
  42. package/dist/chart-DBxT9BNl.js +2 -0
  43. package/dist/{choice-BNRQXszu.d.ts → choice-CVdQrs-m.d.ts} +118 -6
  44. package/dist/{choice-C9gLKECf.js → choice-CnwfjSEu.js} +1 -1
  45. package/dist/choice.d.ts +1 -1
  46. package/dist/choice.js +1 -1
  47. package/dist/{code-block-C9uaM9-V.js → code-block-CIE0F2fu.js} +1 -1
  48. package/dist/{code-block-B6OlZrSI.d.ts → code-block-CZWPrV4k.d.ts} +3 -3
  49. package/dist/code-block.d.ts +10 -7
  50. package/dist/code-block.js +2 -2
  51. package/dist/code-block_highlight-utils.d.ts +1 -1
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.js +1 -1
  54. package/dist/combobox.d.ts +8 -9
  55. package/dist/combobox.js +1 -1
  56. package/dist/command.d.ts +668 -106
  57. package/dist/command.js +1 -1
  58. package/dist/cookie-ca4g5CKp.js +1 -0
  59. package/dist/data-table.d.ts +6 -6
  60. package/dist/data-table.js +1 -1
  61. package/dist/description-list.js +1 -1
  62. package/dist/dialog-02mNrAT1.d.ts +806 -0
  63. package/dist/{dialog-Bsj_dX6r.js → dialog-BRjTD83p.js} +1 -1
  64. package/dist/dialog.d.ts +2 -805
  65. package/dist/dialog.js +1 -1
  66. package/dist/{dropdown-menu-fUMqjRC0.js → dropdown-menu-BRH0Wd_z.js} +1 -1
  67. package/dist/dropdown-menu-BcALUQMp.d.ts +1 -0
  68. package/dist/{dropdown-menu-D6pMAY7I.d.ts → dropdown-menu-DZOfj6HB.d.ts} +1 -1
  69. package/dist/dropdown-menu.d.ts +2 -2
  70. package/dist/dropdown-menu.js +1 -1
  71. package/dist/empty.js +1 -1
  72. package/dist/field.d.ts +5 -5
  73. package/dist/field.js +1 -1
  74. package/dist/flag.js +1 -1
  75. package/dist/hooks.d.ts +16 -17
  76. package/dist/hooks.js +1 -1
  77. package/dist/icons-DEVx1oP9.js +1 -0
  78. package/dist/icons.d.ts +7 -6
  79. package/dist/icons.js +1 -1
  80. package/dist/{in-view-DDEGUKDR.d.ts → in-view-gxyc9Q1_.d.ts} +1 -1
  81. package/dist/{input-BuYDU6CF.d.ts → input-DpnC3Xgj.d.ts} +2 -2
  82. package/dist/input.d.ts +1 -1
  83. package/dist/kbd.d.ts +1 -1
  84. package/dist/line-chart.d.ts +60 -13
  85. package/dist/line-chart.js +1 -1
  86. package/dist/list-CwL23L_B.js +1 -0
  87. package/dist/list.d.ts +2 -2
  88. package/dist/list.js +1 -1
  89. package/dist/llms.txt +3 -1
  90. package/dist/main.d.ts +32 -1
  91. package/dist/mantle-dark-high-contrast.css +30 -17
  92. package/dist/mantle-dark.css +48 -13
  93. package/dist/mantle-light-high-contrast.css +33 -15
  94. package/dist/mantle.css +436 -26
  95. package/dist/media-object.d.ts +5 -1
  96. package/dist/media-object.js +1 -1
  97. package/dist/multi-select.d.ts +7 -7
  98. package/dist/multi-select.js +1 -1
  99. package/dist/otp-input.d.ts +4 -4
  100. package/dist/otp-input.js +1 -1
  101. package/dist/pagination.d.ts +2 -2
  102. package/dist/pagination.js +1 -1
  103. package/dist/{primitive-Dv-3snU3.js → primitive-D-9GIFWb.js} +1 -1
  104. package/dist/progress.d.ts +4 -4
  105. package/dist/qr-code.d.ts +2 -2
  106. package/dist/qr-code.js +1 -1
  107. package/dist/radio-group.js +1 -1
  108. package/dist/sandbar.d.ts +471 -0
  109. package/dist/sandbar.js +1 -0
  110. package/dist/sandboxed-on-click.d.ts +4 -6
  111. package/dist/sandboxed-on-click.js +1 -1
  112. package/dist/scatter-plot.d.ts +69 -24
  113. package/dist/scatter-plot.js +1 -1
  114. package/dist/{select-0z7HVS6r.d.ts → select-DVHmgih8.d.ts} +13 -7
  115. package/dist/select-LK9NX-vV.js +1 -0
  116. package/dist/select.d.ts +1 -1
  117. package/dist/select.js +1 -1
  118. package/dist/selectable-list.d.ts +4 -4
  119. package/dist/selectable-list.js +1 -1
  120. package/dist/{separator-B5UmkVRL.d.ts → separator-CNDs98Dv.d.ts} +2 -2
  121. package/dist/{separator-BepAcFFy.js → separator-D0D6VyyM.js} +1 -1
  122. package/dist/separator.d.ts +1 -1
  123. package/dist/separator.js +1 -1
  124. package/dist/{sheet-_fXLjiq2.js → sheet-BOSknSN9.js} +1 -1
  125. package/dist/sheet.d.ts +1 -1
  126. package/dist/sheet.js +1 -1
  127. package/dist/sidebar.d.ts +783 -328
  128. package/dist/sidebar.js +1 -1
  129. package/dist/{skeleton-DsHXIa9j.js → skeleton-BhcJMpem.js} +1 -1
  130. package/dist/skeleton.js +1 -1
  131. package/dist/skip-to-main-link.js +1 -1
  132. package/dist/slider.d.ts +1 -1
  133. package/dist/slot-DdgxmuI5.d.ts +67 -0
  134. package/dist/slot-DpNWVci8.js +1 -0
  135. package/dist/slot.d.ts +1 -1
  136. package/dist/slot.js +1 -1
  137. package/dist/split-button.d.ts +12 -12
  138. package/dist/split-button.js +1 -1
  139. package/dist/switch.d.ts +2 -1
  140. package/dist/{table-CGxJwtbL.js → table-C_Nm_RSV.js} +1 -1
  141. package/dist/{table-CZBYEmyK.d.ts → table-D51ZtV4U.d.ts} +18 -8
  142. package/dist/table.d.ts +1 -1
  143. package/dist/table.js +1 -1
  144. package/dist/tabs.d.ts +8 -13
  145. package/dist/tabs.js +1 -1
  146. package/dist/{theme-FbfjYiD3.d.ts → theme-6OxNhf6l.d.ts} +6 -6
  147. package/dist/theme-CVfq037P.js +1 -0
  148. package/dist/theme-switcher.d.ts +4 -4
  149. package/dist/theme-switcher.js +1 -1
  150. package/dist/theme.d.ts +86 -23
  151. package/dist/theme.js +1 -1
  152. package/dist/toast.d.ts +9 -9
  153. package/dist/toast.js +1 -1
  154. package/dist/tooltip-Dnu35cjU.js +1 -0
  155. package/dist/tooltip-DuXGxIse.d.ts +220 -0
  156. package/dist/tooltip.d.ts +1 -217
  157. package/dist/tooltip.js +1 -1
  158. package/dist/use-breakpoint-Dqu12Szq.js +1 -0
  159. package/dist/use-callback-ref-IYti9y7x.js +1 -0
  160. package/dist/use-is-apple-platform-Cxwrb86L.js +1 -0
  161. package/dist/use-matches-media-query-Bd_GhhVd.js +1 -0
  162. package/dist/utils.d.ts +1 -1
  163. package/dist/well.js +1 -1
  164. package/package.json +4 -2
  165. package/dist/button-DvHMWAPl.js +0 -1
  166. package/dist/chart-DdBQ3xwx.js +0 -2
  167. package/dist/dropdown-menu-BbbQuae2.d.ts +0 -1
  168. package/dist/icons-CPbOq7cF.js +0 -1
  169. package/dist/list-CQFWx6Z8.js +0 -1
  170. package/dist/select-B-9yWrif.js +0 -1
  171. package/dist/slot-BtwKJTLq.d.ts +0 -25
  172. package/dist/slot-Dpsqz16D.js +0 -1
  173. package/dist/theme-IAnQ35bd.js +0 -1
  174. package/dist/use-breakpoint-Wd7_5-Mu.js +0 -1
  175. package/dist/use-matches-media-query-CMSxHR9n.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-Dpsqz16D.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout`),className:e(`group/app-layout bg-base relative isolate flex h-full w-full flex-col overflow-hidden`,o),...c,children:a}),Notice:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-notice`),className:e(`flex w-full shrink-0 flex-col`,o),...c,children:a}),Body:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-body`),className:e(`flex min-h-0 flex-1`,o),...c,children:a}),Inset:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-inset`),className:e(`flex min-w-0 flex-1 flex-col gap-2 p-2`,o),...c,children:a}),Header:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`header`,{"data-slot":t(s,`app-layout-header`),className:e(`border-card-muted bg-card sticky top-0 z-10 flex h-14 shrink-0 items-center gap-2 border-b px-4`,`group-has-[[data-slot~=sidebar-header]]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-1rem-2px)]`,o),...c,children:a}),Content:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-content`),className:e(`bg-card border-card-muted scrollbar min-h-0 flex-1 overflow-y-auto overscroll-none rounded-xl border shadow-sm`,o),...c,children:a})};export{i as AppLayout};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DpNWVci8.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout`),className:e(`group/app-layout bg-base relative isolate flex h-full w-full flex-col`,`overflow-clip`,o),...c,children:a}),Notice:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-notice`),className:e(`flex w-full shrink-0 flex-col`,o),...c,children:a}),Workspace:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-workspace`),className:e(`flex min-h-0 flex-1`,o),...c,children:a}),Content:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-content`),className:e(`bg-card border-card-muted relative flex min-w-0 flex-1 flex-col rounded-xl border shadow-sm`,`m-(--app-layout-card-gutter,0.5rem)`,`overflow-clip`,o),...c,children:a}),Header:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-header`),className:e(`border-card-muted flex h-14 shrink-0 items-center gap-2 border-b px-4`,`group-has-data-[slot~=sidebar-header]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-2*var(--app-layout-card-gutter,0.5rem)-2px)]`,o),...c,children:a}),Body:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`app-layout-body`),className:e(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,o),...c,children:a})};export{i as AppLayout};
@@ -1,4 +1,4 @@
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";
1
+ import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as CurveKind, h as ContinuousXScale, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, v as SeriesColor } from "./chart-0zcFJh4n.js";
2
2
  //#region src/components/area-chart/area-chart.d.ts
3
3
  /**
4
4
  * Props for {@link AreaChart.Root}. Areas fill from a shared zero baseline, so
@@ -27,12 +27,26 @@ type AreaChartAreaProps = {
27
27
  /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
28
28
  label?: string;
29
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.
30
+ * A fixed visual identity slot. Slots `1` through `8` select a paired chart
31
+ * color and point shape. `"other"` selects the shared neutral treatment.
32
+ *
33
+ * Series receive unreserved slots in composition order. Set `seriesSlot` to
34
+ * give a series a fixed visual identity.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <AreaChart.Area dataKey="errors" seriesSlot={4} />
39
+ * ```
40
+ */
41
+ seriesSlot?: ChartSeriesSlot;
42
+ /**
43
+ * Override the color channel with a chart token or any CSS color. This does
44
+ * not change the series slot or its paired point shape. When omitted, the
45
+ * series paints the color from its slot.
46
+ *
47
+ * A static color (raw hex) cannot follow the four themes, so prefer a
48
+ * `var(--your-token)` declared per theme. A series that carries good/bad
49
+ * meaning should wear the semantic status colors, never a categorical slot.
36
50
  */
37
51
  color?: SeriesColor;
38
52
  /**
@@ -46,9 +60,11 @@ type AreaChartAreaProps = {
46
60
  */
47
61
  connectNulls?: boolean;
48
62
  /**
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.
63
+ * The glyph the hover dot and the legend key wear: `"circle"`, `"square"`,
64
+ * `"triangle"`, `"diamond"`, `"triangle-down"`, `"plus"`, `"cross"`, or
65
+ * `"star"`. Shape is a redundant encoding alongside color that keeps series
66
+ * distinguishable without color vision. When omitted, the series wears the
67
+ * glyph paired to its series slot, so both channels name one slot.
52
68
  */
53
69
  shape?: PointShape;
54
70
  };
@@ -88,8 +104,18 @@ type AreaChartCopyButtonProps = CopyButtonPrimitiveProps;
88
104
  * tooltip, keyboard stepping with polite announcements, an sr-only data
89
105
  * table, Enter/Space + click activation). Areas fill with a 10% wash of the
90
106
  * 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.
107
+ * series in registration order, the first-registered series at the baseline.
108
+ * Large datasets decimate before painting on canvas. Compose the chrome and
109
+ * series parts as children.
110
+ *
111
+ * The Root's own subtree is addressable by slot: `area-chart` on the wrapper,
112
+ * then `area-chart-plot`, `area-chart-canvas`, `area-chart-crosshair`,
113
+ * `area-chart-hover-band`, `area-chart-markers`, `area-chart-tooltip`, and
114
+ * `area-chart-data-table`. An area chart shows the crosshair and one marker dot
115
+ * per series, and never the band, but all three layers mount on every kind.
116
+ * Each hover dot carries `chart-active-point` plus a `data-shape` of
117
+ * `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
118
+ * `"plus"`, `"cross"`, or `"star"`, naming the glyph its series wears.
93
119
  *
94
120
  * @see https://mantle.ngrok.com/components/charts/area-chart#areachartroot
95
121
  *
@@ -116,8 +142,9 @@ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: AreaChartRoo
116
142
  /**
117
143
  * One area series. Renders nothing itself — it registers the series with the
118
144
  * 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.
145
+ * `stacked` on the Root, areas stack in registration order with the
146
+ * first-registered series at the baseline, so an `Area` that mounts later
147
+ * stacks on top whatever its position in the JSX.
121
148
  *
122
149
  * @see https://mantle.ngrok.com/components/charts/area-chart#areachartarea
123
150
  *
@@ -218,9 +245,9 @@ declare const YAxis: (props: AreaChartYAxisProps) => null;
218
245
  declare const ReferenceLine: (props: AreaChartReferenceLineProps) => null;
219
246
  /**
220
247
  * 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`.
248
+ * of `AreaChart.Root`'s interaction contract and renders even when this part
249
+ * is absent — compose it to format the label or values, append a footer, or
250
+ * replace the content entirely via the render-prop `children`.
224
251
  *
225
252
  * @see https://mantle.ngrok.com/components/charts/area-chart#areacharttooltip
226
253
  *
@@ -244,6 +271,13 @@ declare const Tooltip: (props: AreaChartTooltipProps) => null;
244
271
  * must never rely on color-matching alone. It renders nothing for a single
245
272
  * series (the chart's title already names it).
246
273
  *
274
+ * **Data attributes:**
275
+ *
276
+ * | Data Attribute | Value | Description |
277
+ * | --- | --- | --- |
278
+ * | `data-slot` | `"area-chart-legend"` | The legend list. `AreaChart.Legend` renders it in flow below the plot. |
279
+ * | `data-shape` | `"circle"` \| `"square"` \| `"triangle"` \| `"diamond"` \| `"triangle-down"` \| `"plus"` \| `"cross"` \| `"star"` | On each series' swatch, naming the glyph its `AreaChart.Area` wears — the `shape` it set, else the one paired to its series slot. The swatch clips itself to that glyph, so target this only to restyle a key. |
280
+ *
247
281
  * @see https://mantle.ngrok.com/components/charts/area-chart#areachartlegend
248
282
  *
249
283
  * @example
@@ -285,14 +319,28 @@ declare const CopyButton: (props: AreaChartCopyButtonProps) => import("react").J
285
319
  * A canvas-rendered area chart for showing how values — and, when stacked, a
286
320
  * total and its parts — change over a continuous x axis. Each area fills with
287
321
  * 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-*`
322
+ * `stacked` prop stacks the series in registration order from the baseline.
323
+ * Series colors come from the theme's validated `--color-chart-*`
290
324
  * tokens; areas keep a fixed slot color for the chart's lifetime even as
291
325
  * other series are filtered in and out. Interaction — a crosshair with an
292
326
  * every-series tooltip, keyboard stepping, aria-live announcements, and an
293
327
  * sr-only data table — ships with `Root` unconditionally; large datasets
294
328
  * decimate before painting on canvas.
295
329
  *
330
+ * **CSS variables (public API):**
331
+ *
332
+ * | CSS Variable | Default | Description |
333
+ * | --- | --- | --- |
334
+ * | `--color-chart-1` … `--color-chart-8` | per theme | The validated categorical series slots, in assignment order. |
335
+ * | `--color-chart-other` | `--color-neutral-500` | The neutral overflow slot a series wears once every slot is held. |
336
+ *
337
+ * Two ways to change a series color, both public API. The `color` prop on
338
+ * `AreaChart.Area` sets one series and takes any CSS color. To restyle a slot itself,
339
+ * redeclare its token on `Root` —
340
+ * `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
341
+ * token through a probe inside `Root`, so a declaration scoped there wins for
342
+ * that chart and leaves every other chart on the page alone.
343
+ *
296
344
  * @see https://mantle.ngrok.com/components/charts/area-chart
297
345
  *
298
346
  * @example
@@ -1 +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-DdBQ3xwx.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};
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-DBxT9BNl.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};
@@ -0,0 +1,319 @@
1
+ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
+ import { ComponentProps, ReactEventHandler, ReactNode } from "react";
4
+ //#region src/components/avatar/avatar.d.ts
5
+ /**
6
+ * The shape an `Avatar.Root` renders as. Circles read as people, rounded
7
+ * squares as the things people belong to — accounts, workspaces, teams,
8
+ * organizations. Keeping the two shapes visually distinct is the point: a
9
+ * switcher row showing both at once stays legible without labels.
10
+ *
11
+ * @see https://mantle.ngrok.com/components/data-display/avatar
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
16
+ * <Avatar.Fallback name="Acme Corp" />
17
+ * </Avatar.Root>
18
+ * ```
19
+ */
20
+ type AvatarAppearance = "circle" | "square";
21
+ /**
22
+ * The props for `Avatar.Root`. A `<span>`'s props — so `className`, `style`,
23
+ * `ref`, `asChild`, and any `data-*` or `aria-*` reach the rendered element —
24
+ * plus the shape and swatch this root owns.
25
+ */
26
+ type AvatarRootProps = ComponentProps<"span"> & WithAsChild & WithDataSlot & {
27
+ /**
28
+ * The shape to render. `"circle"` for a person, `"square"` for a rounded
29
+ * square representing an account, workspace, or team.
30
+ *
31
+ * @default "circle"
32
+ */
33
+ appearance?: AvatarAppearance;
34
+ /**
35
+ * A stable identifier — an account id, a user id — that deterministically
36
+ * selects a background swatch, so the same subject always gets the same
37
+ * color with nothing persisted. Omit it for a neutral surface, or set your
38
+ * own `bg-*` class through `className` to opt out entirely.
39
+ *
40
+ * Seed it with an **id, not a display name**: names get edited, and a
41
+ * rename would silently recolor the avatar.
42
+ */
43
+ colorSeed?: string;
44
+ };
45
+ /**
46
+ * A small image representing a person or an account, with a text or icon
47
+ * fallback for when there is no picture — or before one loads.
48
+ *
49
+ * The root sizes and shapes the avatar and paints the surface behind it. It is
50
+ * `size-7` and `shrink-0` by default: an avatar is a fixed-size visual, and the
51
+ * flex rows it usually sits in (a switcher row, a table cell, a comment header)
52
+ * must not be able to squeeze it. Override the size with `className`, which
53
+ * merges last and wins.
54
+ *
55
+ * It renders a `<span>`, not a `<div>`, so it stays valid inside the `<button>`
56
+ * of a switcher row.
57
+ *
58
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarroot
59
+ *
60
+ * **Data attributes:**
61
+ *
62
+ * | Data Attribute | Value | Description |
63
+ * | -------------- | ---------- | ------------------------------------------------------- |
64
+ * | `data-slot` | `"avatar"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
69
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
70
+ * <Avatar.Fallback name="Acme Corp" />
71
+ * </Avatar.Root>
72
+ * ```
73
+ */
74
+ declare const Root: ({ appearance, asChild, className, colorSeed, "data-slot": dataSlot, ...props }: AvatarRootProps) => import("react").JSX.Element;
75
+ /**
76
+ * The props for `Avatar.Image`. An `<img>`'s props — so `srcSet`, `sizes`,
77
+ * `loading`, `referrerPolicy`, `crossOrigin`, `className`, `style`, `ref`,
78
+ * `asChild`, and any `data-*` reach the element — with `alt` promoted to
79
+ * required.
80
+ */
81
+ type AvatarImageProps = Omit<ComponentProps<"img">, "alt" | "onError"> & WithAsChild & WithDataSlot & {
82
+ /**
83
+ * The image's alternative text. **Required**, deliberately stricter than the
84
+ * `<img>` element: an avatar is the one image a developer reliably forgets,
85
+ * and an `<img>` with no `alt` announces its URL.
86
+ *
87
+ * Pass `alt=""` when adjacent text already names the subject — the common
88
+ * case, and the reason this is not just "always pass the name". Pass the name
89
+ * when the avatar stands alone, and name `Avatar.Root` as well (`role="img"`
90
+ * + `aria-label`) so the label survives the states where the image is gone.
91
+ */
92
+ alt: string;
93
+ /**
94
+ * Called when the image fails to load, **before** it unmounts itself.
95
+ * `preventDefault()` keeps it mounted, for a consumer who would rather retry
96
+ * a URL than fall back.
97
+ *
98
+ * Typed against `HTMLElement` rather than `HTMLImageElement`, because
99
+ * `asChild` means the element that failed may be a consumer's own.
100
+ */
101
+ onError?: ReactEventHandler<HTMLElement>;
102
+ };
103
+ /**
104
+ * The avatar's picture, layered over `Avatar.Fallback` so the fallback shows
105
+ * through until the image paints. It is a plain `<img>` in the markup, which is
106
+ * the whole point: the server renders it, the browser starts fetching while it
107
+ * parses the HTML, and a cached image is *there* on the first frame — no
108
+ * hydration, no swap, no flash of initials.
109
+ *
110
+ * A failed load unmounts the image and leaves the fallback showing. That covers
111
+ * every failure the client can observe; one it cannot is a load that fails
112
+ * *before* hydration, where the error event has already come and gone. There the
113
+ * browser's own rendering stands, which for `alt=""` is nothing at all — the
114
+ * fallback shows through — and is one more reason to prefer `alt=""`
115
+ * whenever adjacent text names the subject.
116
+ *
117
+ * `onError` runs first and can `preventDefault()` to keep the image mounted, for
118
+ * a consumer who would rather retry a URL than fall back. Changing `src` is
119
+ * always a fresh attempt: only the exact URL that failed stays unmounted.
120
+ *
121
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarimage
122
+ *
123
+ * **Data attributes:**
124
+ *
125
+ * | Data Attribute | Value | Description |
126
+ * | -------------- | ---------------- | ------------------------------------------------------- |
127
+ * | `data-slot` | `"avatar-image"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
128
+ *
129
+ * @example
130
+ * ```tsx
131
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
132
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
133
+ * <Avatar.Fallback name="Acme Corp" />
134
+ * </Avatar.Root>
135
+ * ```
136
+ */
137
+ declare const Image: ({ asChild, className, "data-slot": dataSlot, onError, src, ...props }: AvatarImageProps) => import("react").JSX.Element | null;
138
+ /**
139
+ * The props for `Avatar.Fallback`. A `<span>`'s props, with the content stated
140
+ * exactly one way: either `children` you render yourself, or a `name` this part
141
+ * derives initials from. Passing both would leave the winner to precedence, so
142
+ * the type forbids it — and `asChild`, which needs a real element to clone,
143
+ * belongs to the `children` side only.
144
+ */
145
+ type AvatarFallbackProps = Omit<ComponentProps<"span">, "children"> & WithDataSlot & ({
146
+ /**
147
+ * Render this element instead of the fallback's own `<span>`. Only
148
+ * available beside `children` — there has to be an element to clone.
149
+ */
150
+ asChild?: boolean;
151
+ /**
152
+ * What to show when there is no image: initials, an icon, anything.
153
+ * When the content is only the subject's initials, use `name` instead.
154
+ */
155
+ children: ReactNode;
156
+ name?: never;
157
+ } | {
158
+ asChild?: never;
159
+ children?: never;
160
+ /**
161
+ * The subject's display name, rendered as at most two uppercase
162
+ * initials — `"Acme Corp"` becomes `"AC"`, a name with no usable
163
+ * characters becomes `"?"`. Deriving it here keeps one implementation
164
+ * of a surprisingly fiddly rule (punctuation, code points, and casing
165
+ * that has to match between server and client).
166
+ *
167
+ * Initials derived this way are `aria-hidden`: they abbreviate a name
168
+ * the page already carries in text beside the avatar. When the avatar
169
+ * is the only thing naming its subject, name it — `role="img"` plus
170
+ * `aria-label` on `Avatar.Root` — rather than announcing `"AC"`.
171
+ */
172
+ name: string;
173
+ });
174
+ /**
175
+ * What the avatar shows when there is no picture — initials, an icon, a
176
+ * monogram. It always renders, sitting *behind* `Avatar.Image`: that is what
177
+ * makes a loading image show initials instead of an empty box, with no loading
178
+ * state for anyone to handle. A loaded image covers it, so give a transparent
179
+ * PNG its own backdrop if you would rather not see initials through it.
180
+ *
181
+ * Pass `name` to render the subject's initials, or `children` for anything else.
182
+ * A fallback is decorative when adjacent text already names the subject, so
183
+ * unless the avatar is the only label, give an icon child `aria-hidden`.
184
+ *
185
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarfallback
186
+ *
187
+ * **Data attributes:**
188
+ *
189
+ * | Data Attribute | Value | Description |
190
+ * | -------------- | ------------------- | ------------------------------------------------------- |
191
+ * | `data-slot` | `"avatar-fallback"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
192
+ *
193
+ * @example
194
+ * ```tsx
195
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
196
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
197
+ * <Avatar.Fallback name="Acme Corp" />
198
+ * </Avatar.Root>
199
+ * ```
200
+ */
201
+ declare const Fallback: ({ asChild, children, className, "data-slot": dataSlot, name, ...props }: AvatarFallbackProps) => import("react").JSX.Element;
202
+ /**
203
+ * A small image representing a person or an account, with a text or icon
204
+ * fallback for when there is no picture — or before one loads.
205
+ *
206
+ * `appearance` carries the meaning: `"circle"` for a person, `"square"` (a
207
+ * rounded square) for an account, workspace, team, or organization. A row that
208
+ * shows both — an account switcher with the signed-in user's photo beside it —
209
+ * stays readable without labels because the shapes differ.
210
+ *
211
+ * `colorSeed` gives a subject a stable color derived from its id, so the same
212
+ * account is the same color on every device with nothing stored. Omit it for a
213
+ * neutral surface.
214
+ *
215
+ * The picture is a plain `<img>` layered over the fallback, so the server
216
+ * renders it and a cached image is on screen in the first frame. There is no
217
+ * loading state to handle: the fallback is behind, and shows until the
218
+ * image paints.
219
+ *
220
+ * For a person's name and title beside their avatar, compose it with
221
+ * [MediaObject](https://mantle.ngrok.com/components/structure/media-object).
222
+ * For the leading visual of a sidebar switcher row, put it inside
223
+ * [Sidebar.SwitcherTrigger](https://mantle.ngrok.com/components/navigation/sidebar#sidebarswitchertrigger).
224
+ *
225
+ * @see https://mantle.ngrok.com/components/data-display/avatar
226
+ *
227
+ * @example
228
+ * Composition:
229
+ * ```
230
+ * Avatar.Root
231
+ * ├── Avatar.Image
232
+ * └── Avatar.Fallback
233
+ * ```
234
+ *
235
+ * @example
236
+ * ```tsx
237
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
238
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
239
+ * <Avatar.Fallback name="Acme Corp" />
240
+ * </Avatar.Root>
241
+ * ```
242
+ */
243
+ declare const Avatar: {
244
+ /**
245
+ * A small image representing a person or an account, with a text or icon
246
+ * fallback for when there is no picture — or before one loads.
247
+ *
248
+ * The root sizes and shapes the avatar and paints the surface behind it. It is
249
+ * `size-7` and `shrink-0` by default: an avatar is a fixed-size visual, and the
250
+ * flex rows it usually sits in must not be able to squeeze it. Override the
251
+ * size with `className`, which merges last and wins. It renders a `<span>`, so
252
+ * it stays valid inside the `<button>` of a switcher row.
253
+ *
254
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarroot
255
+ *
256
+ * **Data attributes:**
257
+ *
258
+ * | Data Attribute | Value | Description |
259
+ * | -------------- | ---------- | ------------------------------------------------------- |
260
+ * | `data-slot` | `"avatar"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
261
+ *
262
+ * @example
263
+ * ```tsx
264
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
265
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
266
+ * <Avatar.Fallback name="Acme Corp" />
267
+ * </Avatar.Root>
268
+ * ```
269
+ */
270
+ readonly Root: typeof Root;
271
+ /**
272
+ * The avatar's picture, layered over `Avatar.Fallback` so the fallback shows
273
+ * through until the image paints. A plain `<img>` in the markup: the server
274
+ * renders it, and a cached image needs no hydration to appear. A failed load
275
+ * unmounts it and leaves the fallback showing.
276
+ *
277
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarimage
278
+ *
279
+ * **Data attributes:**
280
+ *
281
+ * | Data Attribute | Value | Description |
282
+ * | -------------- | ---------------- | ------------------------------------------------------- |
283
+ * | `data-slot` | `"avatar-image"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
284
+ *
285
+ * @example
286
+ * ```tsx
287
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
288
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
289
+ * <Avatar.Fallback name="Acme Corp" />
290
+ * </Avatar.Root>
291
+ * ```
292
+ */
293
+ readonly Image: typeof Image;
294
+ /**
295
+ * What the avatar shows when there is no picture — initials, an icon, a
296
+ * monogram. It always renders, behind `Avatar.Image`, which is what makes a
297
+ * loading image show initials rather than an empty box. Pass `name` to render
298
+ * the subject's initials, or `children` for anything else.
299
+ *
300
+ * @see https://mantle.ngrok.com/components/data-display/avatar#avatarfallback
301
+ *
302
+ * **Data attributes:**
303
+ *
304
+ * | Data Attribute | Value | Description |
305
+ * | -------------- | ------------------- | ------------------------------------------------------- |
306
+ * | `data-slot` | `"avatar-fallback"` | Styling and test-targeting hook, with any forwarded chain ahead of it. |
307
+ *
308
+ * @example
309
+ * ```tsx
310
+ * <Avatar.Root appearance="square" colorSeed="acc_123">
311
+ * <Avatar.Image src="https://example.com/acme.png" alt="" />
312
+ * <Avatar.Fallback name="Acme Corp" />
313
+ * </Avatar.Root>
314
+ * ```
315
+ */
316
+ readonly Fallback: typeof Fallback;
317
+ };
318
+ //#endregion
319
+ export { Avatar, type AvatarAppearance, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps };
package/dist/avatar.js ADDED
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DpNWVci8.js";import{useState as r}from"react";import{jsx as i}from"react/jsx-runtime";const a={circle:`rounded-full`,square:`rounded-md`},o=[`bg-emerald-500`,`bg-gray-500`,`bg-red-500`,`bg-violet-500`,`bg-cyan-500`,`bg-rose-500`,`bg-purple-500`,`bg-fuchsia-500`,`bg-green-500`,`bg-orange-500`,`bg-indigo-500`,`bg-teal-500`,`bg-yellow-500`,`bg-sky-500`,`bg-pink-500`,`bg-blue-500`,`bg-amber-500`];function s(e){let t=5381;for(let n=0;n<e.length;n+=1)t=t*33^e.charCodeAt(n);return t>>>0}function c(e){let t=s(e)%o.length;return o[t]??`bg-neutral-500`}function l(e){return e.replace(/[\p{P}`~!@#$%^&*+|=<>]/gu,``).trim().split(/\s+/).slice(0,2).map(e=>Array.from(e.toUpperCase())[0]??``).join(``)||`?`}const u={Root:({appearance:r=`circle`,asChild:o,className:s,colorSeed:l,"data-slot":u,...d})=>i(o?n:`span`,{className:e(`text-body bg-neutral-500/15 relative flex size-7 shrink-0 items-center justify-center overflow-hidden text-xs font-medium select-none`,a[r],l!=null&&[`text-static-white`,c(l)],s),"data-slot":t(u,`avatar`),...d}),Image:({asChild:a,className:o,"data-slot":s,onError:c,src:l,...u})=>{let[d,f]=r();return l==null||l===``||l===d?null:i(a?n:`img`,{className:e(`absolute inset-0 size-full object-cover`,o),"data-slot":t(s,`avatar-image`),onError:e=>{c?.(e),e.defaultPrevented||f(l)},src:l,...u})},Fallback:({asChild:r,children:a,className:o,"data-slot":s,name:c,...u})=>i(r?n:`span`,{"aria-hidden":c!=null||void 0,className:e(`flex size-full items-center justify-center`,o),"data-slot":t(s,`avatar-fallback`),...u,children:c==null?a:l(c)})};export{u as Avatar};
package/dist/badge.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-Dpsqz16D.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-DpNWVci8.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};