@dodopayments/ui 1.0.0 → 1.0.2

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 (283) hide show
  1. package/README.md +2 -0
  2. package/ai/component-registry.json +431 -88
  3. package/ai/components/app-top-bar.md +18 -10
  4. package/ai/components/bar-chart.md +5 -3
  5. package/ai/components/button.md +1 -1
  6. package/ai/components/chart-legend.md +3 -1
  7. package/ai/components/chart-tooltip.md +2 -2
  8. package/ai/components/composed-chart.md +5 -6
  9. package/ai/components/data-grid.md +11 -23
  10. package/ai/components/date-picker.md +1 -1
  11. package/ai/components/details-panel.md +1 -1
  12. package/ai/components/funnel-chart.md +12 -5
  13. package/ai/components/gauge-chart.md +9 -4
  14. package/ai/components/line-chart.md +1 -0
  15. package/ai/components/list-item.md +146 -6
  16. package/ai/components/pie-chart.md +1 -0
  17. package/ai/components/quantity-stepper.md +34 -2
  18. package/ai/components/radio-group.md +2 -2
  19. package/ai/components/retention-matrix.md +20 -5
  20. package/ai/components/ring-chart.md +7 -4
  21. package/ai/components/sankey-chart.md +18 -8
  22. package/ai/components/scatter-chart.md +4 -2
  23. package/ai/components/settings-section.md +1 -62
  24. package/ai/components/setup-guide.md +114 -118
  25. package/ai/components/sidebar.md +5 -0
  26. package/ai/components/stat-card.md +13 -14
  27. package/ai/components/sunburst-chart.md +138 -18
  28. package/ai/components/value-flash.md +74 -15
  29. package/ai/skills/dodo-charts/SKILL.md +3 -2
  30. package/ai/skills/dodo-design/SKILL.md +2 -2
  31. package/dist/components/button/button.d.ts +1 -1
  32. package/dist/components/button/button.d.ts.map +1 -1
  33. package/dist/components/button/button.js +5 -3
  34. package/dist/components/button/button.js.map +1 -1
  35. package/dist/components/data-grid/data-grid.d.ts +16 -13
  36. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  37. package/dist/components/data-grid/data-grid.js +17 -110
  38. package/dist/components/data-grid/data-grid.js.map +1 -1
  39. package/dist/components/data-grid/index.d.ts.map +1 -1
  40. package/dist/components/data-grid/index.js +1 -0
  41. package/dist/components/data-grid/index.js.map +1 -1
  42. package/dist/components/data-grid/table.d.ts +3 -6
  43. package/dist/components/data-grid/table.d.ts.map +1 -1
  44. package/dist/components/data-grid/table.js +10 -12
  45. package/dist/components/data-grid/table.js.map +1 -1
  46. package/dist/components/funnel-chart/funnel-chart.d.ts +3 -1
  47. package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -1
  48. package/dist/components/funnel-chart/funnel-chart.js +3 -1
  49. package/dist/components/funnel-chart/funnel-chart.js.map +1 -1
  50. package/dist/components/gauge-chart/gauge-chart.d.ts +3 -1
  51. package/dist/components/gauge-chart/gauge-chart.d.ts.map +1 -1
  52. package/dist/components/gauge-chart/gauge-chart.js +3 -1
  53. package/dist/components/gauge-chart/gauge-chart.js.map +1 -1
  54. package/dist/components/icon-morph/icon-morph.d.ts.map +1 -1
  55. package/dist/components/icon-morph/icon-morph.js +7 -4
  56. package/dist/components/icon-morph/icon-morph.js.map +1 -1
  57. package/dist/components/list-item/list-item.d.ts +21 -2
  58. package/dist/components/list-item/list-item.d.ts.map +1 -1
  59. package/dist/components/list-item/list-item.js +18 -4
  60. package/dist/components/list-item/list-item.js.map +1 -1
  61. package/dist/components/plan-picker/plan-picker.js +1 -1
  62. package/dist/components/plan-picker/plan-picker.js.map +1 -1
  63. package/dist/components/product-card/product-card.d.ts.map +1 -1
  64. package/dist/components/product-card/product-card.js +10 -3
  65. package/dist/components/product-card/product-card.js.map +1 -1
  66. package/dist/components/quantity-stepper/index.d.ts +1 -1
  67. package/dist/components/quantity-stepper/index.d.ts.map +1 -1
  68. package/dist/components/quantity-stepper/index.js +1 -1
  69. package/dist/components/quantity-stepper/index.js.map +1 -1
  70. package/dist/components/quantity-stepper/quantity-stepper.d.ts +33 -3
  71. package/dist/components/quantity-stepper/quantity-stepper.d.ts.map +1 -1
  72. package/dist/components/quantity-stepper/quantity-stepper.js +41 -8
  73. package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
  74. package/dist/components/radio-group/radio-group.d.ts +6 -6
  75. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  76. package/dist/components/radio-group/radio-group.js +11 -10
  77. package/dist/components/radio-group/radio-group.js.map +1 -1
  78. package/dist/components/retention-matrix/index.d.ts +1 -1
  79. package/dist/components/retention-matrix/index.d.ts.map +1 -1
  80. package/dist/components/retention-matrix/index.js +1 -1
  81. package/dist/components/retention-matrix/index.js.map +1 -1
  82. package/dist/components/retention-matrix/retention-matrix.d.ts +32 -16
  83. package/dist/components/retention-matrix/retention-matrix.d.ts.map +1 -1
  84. package/dist/components/retention-matrix/retention-matrix.js +42 -19
  85. package/dist/components/retention-matrix/retention-matrix.js.map +1 -1
  86. package/dist/components/sankey-chart/sankey-chart.d.ts +4 -1
  87. package/dist/components/sankey-chart/sankey-chart.d.ts.map +1 -1
  88. package/dist/components/sankey-chart/sankey-chart.js +4 -1
  89. package/dist/components/sankey-chart/sankey-chart.js.map +1 -1
  90. package/dist/components/settings-section/index.d.ts.map +1 -1
  91. package/dist/components/settings-section/index.js +1 -0
  92. package/dist/components/settings-section/index.js.map +1 -1
  93. package/dist/components/settings-section/settings-section.d.ts +8 -5
  94. package/dist/components/settings-section/settings-section.d.ts.map +1 -1
  95. package/dist/components/settings-section/settings-section.js +8 -11
  96. package/dist/components/settings-section/settings-section.js.map +1 -1
  97. package/dist/components/setup-guide/index.d.ts +1 -1
  98. package/dist/components/setup-guide/index.d.ts.map +1 -1
  99. package/dist/components/setup-guide/index.js +1 -1
  100. package/dist/components/setup-guide/index.js.map +1 -1
  101. package/dist/components/setup-guide/setup-guide.d.ts +41 -16
  102. package/dist/components/setup-guide/setup-guide.d.ts.map +1 -1
  103. package/dist/components/setup-guide/setup-guide.js +53 -30
  104. package/dist/components/setup-guide/setup-guide.js.map +1 -1
  105. package/dist/components/sidebar/sidebar.d.ts +12 -5
  106. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  107. package/dist/components/sidebar/sidebar.js +127 -16
  108. package/dist/components/sidebar/sidebar.js.map +1 -1
  109. package/dist/components/stat-card/stat-card.d.ts +18 -11
  110. package/dist/components/stat-card/stat-card.d.ts.map +1 -1
  111. package/dist/components/stat-card/stat-card.js +18 -12
  112. package/dist/components/stat-card/stat-card.js.map +1 -1
  113. package/dist/components/sunburst-chart/index.d.ts +1 -0
  114. package/dist/components/sunburst-chart/index.d.ts.map +1 -1
  115. package/dist/components/sunburst-chart/index.js +1 -0
  116. package/dist/components/sunburst-chart/index.js.map +1 -1
  117. package/dist/components/sunburst-chart/sunburst-chart.d.ts +7 -5
  118. package/dist/components/sunburst-chart/sunburst-chart.d.ts.map +1 -1
  119. package/dist/components/sunburst-chart/sunburst-chart.js +7 -5
  120. package/dist/components/sunburst-chart/sunburst-chart.js.map +1 -1
  121. package/dist/components/value-flash/index.d.ts +1 -1
  122. package/dist/components/value-flash/index.d.ts.map +1 -1
  123. package/dist/components/value-flash/index.js +1 -1
  124. package/dist/components/value-flash/index.js.map +1 -1
  125. package/dist/components/value-flash/value-flash.d.ts +52 -0
  126. package/dist/components/value-flash/value-flash.d.ts.map +1 -1
  127. package/dist/components/value-flash/value-flash.js +37 -1
  128. package/dist/components/value-flash/value-flash.js.map +1 -1
  129. package/dist/icons/index.d.ts +6 -0
  130. package/dist/icons/index.js +6 -0
  131. package/dist/icons/ui/arrow-door-out-3.d.ts +3 -0
  132. package/dist/icons/ui/arrow-door-out-3.js +5 -0
  133. package/dist/icons/ui/circle-check-outline-duo.d.ts +3 -0
  134. package/dist/icons/ui/circle-check-outline-duo.d.ts.map +1 -0
  135. package/dist/icons/ui/circle-check-outline-duo.js +5 -0
  136. package/dist/icons/ui/circle-check-outline-duo.js.map +1 -0
  137. package/dist/icons/ui/circle-dashed-outline-duo.d.ts +3 -0
  138. package/dist/icons/ui/circle-dashed-outline-duo.d.ts.map +1 -0
  139. package/dist/icons/ui/circle-dashed-outline-duo.js +5 -0
  140. package/dist/icons/ui/circle-dashed-outline-duo.js.map +1 -0
  141. package/dist/icons/ui/circle-warning-outline-duo.d.ts +3 -0
  142. package/dist/icons/ui/circle-warning-outline-duo.d.ts.map +1 -0
  143. package/dist/icons/ui/circle-warning-outline-duo.js +5 -0
  144. package/dist/icons/ui/circle-warning-outline-duo.js.map +1 -0
  145. package/dist/icons/ui/circle-xmark-outline-duo.d.ts +3 -0
  146. package/dist/icons/ui/circle-xmark-outline-duo.d.ts.map +1 -0
  147. package/dist/icons/ui/circle-xmark-outline-duo.js +5 -0
  148. package/dist/icons/ui/circle-xmark-outline-duo.js.map +1 -0
  149. package/dist/icons/ui/clock-outline-duo.d.ts +3 -0
  150. package/dist/icons/ui/clock-outline-duo.d.ts.map +1 -0
  151. package/dist/icons/ui/clock-outline-duo.js +5 -0
  152. package/dist/icons/ui/clock-outline-duo.js.map +1 -0
  153. package/dist/lib/cn-tables.js +5 -5
  154. package/dist/lib/cn-tables.js.map +1 -1
  155. package/dist/lib/locale-messages.d.ts +6 -3
  156. package/dist/lib/locale-messages.d.ts.map +1 -1
  157. package/dist/lib/locale-messages.js +6 -3
  158. package/dist/lib/locale-messages.js.map +1 -1
  159. package/dist/locales/ar.d.ts.map +1 -1
  160. package/dist/locales/ar.js +1 -0
  161. package/dist/locales/ar.js.map +1 -1
  162. package/dist/locales/de.d.ts.map +1 -1
  163. package/dist/locales/de.js +1 -0
  164. package/dist/locales/de.js.map +1 -1
  165. package/dist/locales/es.d.ts.map +1 -1
  166. package/dist/locales/es.js +1 -0
  167. package/dist/locales/es.js.map +1 -1
  168. package/dist/locales/fr.d.ts.map +1 -1
  169. package/dist/locales/fr.js +1 -0
  170. package/dist/locales/fr.js.map +1 -1
  171. package/dist/locales/he.d.ts.map +1 -1
  172. package/dist/locales/he.js +1 -0
  173. package/dist/locales/he.js.map +1 -1
  174. package/dist/locales/hi.d.ts.map +1 -1
  175. package/dist/locales/hi.js +1 -0
  176. package/dist/locales/hi.js.map +1 -1
  177. package/dist/locales/ja.d.ts.map +1 -1
  178. package/dist/locales/ja.js +1 -0
  179. package/dist/locales/ja.js.map +1 -1
  180. package/dist/locales/pt-BR.d.ts.map +1 -1
  181. package/dist/locales/pt-BR.js +1 -0
  182. package/dist/locales/pt-BR.js.map +1 -1
  183. package/dist/locales/zh-CN.d.ts.map +1 -1
  184. package/dist/locales/zh-CN.js +1 -0
  185. package/dist/locales/zh-CN.js.map +1 -1
  186. package/dist/primitives/charts/bar.d.ts +11 -0
  187. package/dist/primitives/charts/bar.d.ts.map +1 -1
  188. package/dist/primitives/charts/bar.js +65 -11
  189. package/dist/primitives/charts/bar.js.map +1 -1
  190. package/dist/primitives/charts/funnel-chart.d.ts +22 -3
  191. package/dist/primitives/charts/funnel-chart.d.ts.map +1 -1
  192. package/dist/primitives/charts/funnel-chart.js +122 -110
  193. package/dist/primitives/charts/funnel-chart.js.map +1 -1
  194. package/dist/primitives/charts/gauge.d.ts +7 -0
  195. package/dist/primitives/charts/gauge.d.ts.map +1 -1
  196. package/dist/primitives/charts/gauge.js +37 -9
  197. package/dist/primitives/charts/gauge.js.map +1 -1
  198. package/dist/primitives/charts/index.d.ts +1 -0
  199. package/dist/primitives/charts/index.d.ts.map +1 -1
  200. package/dist/primitives/charts/index.js +1 -0
  201. package/dist/primitives/charts/index.js.map +1 -1
  202. package/dist/primitives/charts/legend/legend-marker.d.ts +7 -2
  203. package/dist/primitives/charts/legend/legend-marker.d.ts.map +1 -1
  204. package/dist/primitives/charts/legend/legend-marker.js +9 -3
  205. package/dist/primitives/charts/legend/legend-marker.js.map +1 -1
  206. package/dist/primitives/charts/legend/legend-progress.d.ts +6 -1
  207. package/dist/primitives/charts/legend/legend-progress.d.ts.map +1 -1
  208. package/dist/primitives/charts/legend/legend-progress.js +7 -2
  209. package/dist/primitives/charts/legend/legend-progress.js.map +1 -1
  210. package/dist/primitives/charts/loading-sweep.d.ts.map +1 -1
  211. package/dist/primitives/charts/loading-sweep.js +11 -2
  212. package/dist/primitives/charts/loading-sweep.js.map +1 -1
  213. package/dist/primitives/charts/pie-slice.d.ts +6 -1
  214. package/dist/primitives/charts/pie-slice.d.ts.map +1 -1
  215. package/dist/primitives/charts/pie-slice.js +26 -16
  216. package/dist/primitives/charts/pie-slice.js.map +1 -1
  217. package/dist/primitives/charts/ring.d.ts +12 -3
  218. package/dist/primitives/charts/ring.d.ts.map +1 -1
  219. package/dist/primitives/charts/ring.js +46 -9
  220. package/dist/primitives/charts/ring.js.map +1 -1
  221. package/dist/primitives/charts/sankey/sankey-link.d.ts +14 -5
  222. package/dist/primitives/charts/sankey/sankey-link.d.ts.map +1 -1
  223. package/dist/primitives/charts/sankey/sankey-link.js +34 -10
  224. package/dist/primitives/charts/sankey/sankey-link.js.map +1 -1
  225. package/dist/primitives/charts/sankey/sankey-node.d.ts +8 -2
  226. package/dist/primitives/charts/sankey/sankey-node.d.ts.map +1 -1
  227. package/dist/primitives/charts/sankey/sankey-node.js +13 -7
  228. package/dist/primitives/charts/sankey/sankey-node.js.map +1 -1
  229. package/dist/primitives/charts/scatter-chart.d.ts.map +1 -1
  230. package/dist/primitives/charts/scatter-chart.js +22 -8
  231. package/dist/primitives/charts/scatter-chart.js.map +1 -1
  232. package/dist/primitives/charts/scatter.d.ts +8 -3
  233. package/dist/primitives/charts/scatter.d.ts.map +1 -1
  234. package/dist/primitives/charts/scatter.js +9 -4
  235. package/dist/primitives/charts/scatter.js.map +1 -1
  236. package/dist/primitives/charts/series-bar.d.ts +5 -1
  237. package/dist/primitives/charts/series-bar.d.ts.map +1 -1
  238. package/dist/primitives/charts/series-bar.js +30 -11
  239. package/dist/primitives/charts/series-bar.js.map +1 -1
  240. package/dist/primitives/charts/series-markers.d.ts +6 -1
  241. package/dist/primitives/charts/series-markers.d.ts.map +1 -1
  242. package/dist/primitives/charts/series-markers.js +19 -8
  243. package/dist/primitives/charts/series-markers.js.map +1 -1
  244. package/dist/primitives/charts/sunburst-center.d.ts +10 -3
  245. package/dist/primitives/charts/sunburst-center.d.ts.map +1 -1
  246. package/dist/primitives/charts/sunburst-center.js +20 -12
  247. package/dist/primitives/charts/sunburst-center.js.map +1 -1
  248. package/dist/primitives/charts/sunburst-chart.d.ts +1 -1
  249. package/dist/primitives/charts/sunburst-chart.d.ts.map +1 -1
  250. package/dist/primitives/charts/sunburst-chart.js +27 -7
  251. package/dist/primitives/charts/sunburst-chart.js.map +1 -1
  252. package/dist/primitives/charts/sunburst-context.d.ts +2 -0
  253. package/dist/primitives/charts/sunburst-context.d.ts.map +1 -1
  254. package/dist/primitives/charts/sunburst-context.js +2 -0
  255. package/dist/primitives/charts/sunburst-context.js.map +1 -1
  256. package/dist/primitives/charts/sunburst-labels.d.ts.map +1 -1
  257. package/dist/primitives/charts/sunburst-labels.js +2 -2
  258. package/dist/primitives/charts/sunburst-labels.js.map +1 -1
  259. package/dist/primitives/charts/sunburst-legend.d.ts +19 -0
  260. package/dist/primitives/charts/sunburst-legend.d.ts.map +1 -0
  261. package/dist/primitives/charts/sunburst-legend.js +52 -0
  262. package/dist/primitives/charts/sunburst-legend.js.map +1 -0
  263. package/dist/primitives/charts/sunburst-segment.d.ts +7 -1
  264. package/dist/primitives/charts/sunburst-segment.d.ts.map +1 -1
  265. package/dist/primitives/charts/sunburst-segment.js +35 -10
  266. package/dist/primitives/charts/sunburst-segment.js.map +1 -1
  267. package/dist/primitives/charts/sunburst.d.ts +7 -5
  268. package/dist/primitives/charts/sunburst.d.ts.map +1 -1
  269. package/dist/primitives/charts/sunburst.js +24 -25
  270. package/dist/primitives/charts/sunburst.js.map +1 -1
  271. package/dist/primitives/ui/button.d.ts.map +1 -1
  272. package/dist/primitives/ui/button.js +3 -1
  273. package/dist/primitives/ui/button.js.map +1 -1
  274. package/dist/primitives/ui/sidebar.d.ts.map +1 -1
  275. package/dist/primitives/ui/sidebar.js +4 -2
  276. package/dist/primitives/ui/sidebar.js.map +1 -1
  277. package/dist/styles/theme.css +4 -0
  278. package/dist/styles/tokens.css +3 -1
  279. package/dist/styles/tokens.test.tsx +5 -2
  280. package/eslint/restricted-classes.js +46 -5
  281. package/package.json +1 -2
  282. package/dist/icons/ui/refresh-clockwise.d.ts.map +0 -1
  283. package/dist/icons/ui/refresh-clockwise.js.map +0 -1
@@ -159,6 +159,7 @@ export default function AppTopBarCallbacks() {
159
159
  import { AppTopBar } from "@dodopayments/ui/app-top-bar";
160
160
  import { CommandPalette, type CommandPaletteGroup } from "@dodopayments/ui/command";
161
161
  import {
162
+ ArrowDoorOut3Icon,
162
163
  ArrowsTransactionIcon,
163
164
  BoxIcon,
164
165
  CreditCardIcon,
@@ -166,7 +167,7 @@ import {
166
167
  UserIcon,
167
168
  WalletIcon,
168
169
  } from "@dodopayments/ui/icons";
169
- import { MenuGroup, MenuGroupLabel, MenuItem } from "@dodopayments/ui/menu";
170
+ import { MenuGroup, MenuGroupLabel, MenuItem, MenuSeparator } from "@dodopayments/ui/menu";
170
171
  import {
171
172
  PopoverHeader,
172
173
  PopoverNotificationItem,
@@ -241,17 +242,24 @@ export default function AppTopBarMaster() {
241
242
  </>
242
243
  }
243
244
  account={
244
- <MenuGroup>
245
- <MenuGroupLabel>Account Options</MenuGroupLabel>
246
- <MenuItem>
247
- <UserIcon aria-hidden="true" />
248
- Profile
249
- </MenuItem>
245
+ <>
246
+ <MenuGroup>
247
+ <MenuGroupLabel>Account Options</MenuGroupLabel>
248
+ <MenuItem>
249
+ <UserIcon aria-hidden="true" />
250
+ Profile
251
+ </MenuItem>
252
+ <MenuItem>
253
+ <PenIcon aria-hidden="true" />
254
+ Edit Business
255
+ </MenuItem>
256
+ </MenuGroup>
257
+ <MenuSeparator />
250
258
  <MenuItem>
251
- <PenIcon aria-hidden="true" />
252
- Edit Business
259
+ <ArrowDoorOut3Icon aria-hidden="true" />
260
+ Sign out
253
261
  </MenuItem>
254
- </MenuGroup>
262
+ </>
255
263
  }
256
264
  />
257
265
  <CommandPalette
@@ -68,6 +68,7 @@ gradient or a pattern `url(#id)`; set `stroke` for the tooltip dot when `fill` i
68
68
  | `stackGap` | `number` | - | Gap between stacked bars in pixels. Default: 0 |
69
69
  | `staggerDelay` | `number` | - | Stagger delay between bars in seconds. Auto-calculated if not provided. |
70
70
  | `stroke` | `string` | - | Color for tooltip dot. Use when fill is a gradient/pattern. Default: uses fill value |
71
+ | `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look, an opaque 20% wash of the colour (mixed into the card, so gridlines stay behind it) with a solid 3px edge at the value end (35% while hovered). `"solid"`: the full colour. A gradient or pattern `fill` without `stroke`, and `perspective` bars, stay solid. Default: "tint" |
71
72
  | `yAxisId` | `string \| number` | - | Y-scale group id for vertical bars (Recharts `yAxisId`). Default: `"left"`. |
72
73
 
73
74
  ## BarXAxis
@@ -136,6 +137,7 @@ Several `SeriesBar`s in a composed chart group or stack by the chart's bar setti
136
137
  | `fill` | `string` | - | Fill color. Default: var(--chart-1) |
137
138
  | `radius` | `number` | - | Corner radius for bar top corners. Default: 0 (square tops, similar to Bar lineCap="butt") |
138
139
  | `stroke` | `string` | - | Tooltip dot color when fill is gradient/pattern. Default: fill |
140
+ | `variant` | `"tint" \| "solid"` | - | `"tint"`: the look of `Bar`, an opaque 20% wash of the colour (35% for the hovered point) with a solid 3px edge along the top. `"solid"`: the full colour. A gradient or pattern `fill` without `stroke` stays solid. Default: "tint" |
139
141
 
140
142
  ## BarColumnTrack
141
143
 
@@ -306,7 +308,7 @@ export default function BarChartGrouped() {
306
308
  <div className="flex w-full flex-col gap-3">
307
309
  <Legend items={legendItems} className="flex-row flex-wrap gap-1">
308
310
  <LegendItem className="flex items-center gap-2">
309
- <LegendMarker />
311
+ <LegendMarker variant="bar" />
310
312
  <LegendLabel />
311
313
  </LegendItem>
312
314
  </Legend>
@@ -460,14 +462,14 @@ export default function BarChartStacked() {
460
462
  <div className="flex w-full flex-col gap-3">
461
463
  <Legend items={legendItems} className="flex-row flex-wrap gap-1">
462
464
  <LegendItem className="flex items-center gap-2">
463
- <LegendMarker />
465
+ <LegendMarker variant="bar" />
464
466
  <LegendLabel />
465
467
  </LegendItem>
466
468
  </Legend>
467
469
  <BarChart data={data} xDataKey="week" stacked stackGap={2} label="Payouts by method, last 6 weeks">
468
470
  <ChartGrid horizontal />
469
471
  {series.map(({ key, color }) => (
470
- <Bar key={key} dataKey={key} fill={color} lineCap={2} />
472
+ <Bar key={key} dataKey={key} fill={color} />
471
473
  ))}
472
474
  <BarXAxis />
473
475
  <ChartTooltip
@@ -32,7 +32,7 @@ and announces it.
32
32
  | `result` | `"success" \| "error" \| null` | - | Outcome of the last action, after interior.dev's loading button. `"success"` swaps the label for a check and `successText`, `"error"` for a warning icon and `errorText`; `null` shows the label. The outcome is announced through a polite live region. Pass it (even `null`) on buttons that report an outcome, so every face shares one cell from the first render. Clear it yourself, e.g. after 1.4s. With `result`, `Button` renders the button and a sibling status element, so do not pass a `Button` with `result` as the `render` element of another component. |
33
33
  | `size` | `"xs" \| "default" \| "lg" \| "icon" \| "icon-xs" \| "icon-lg"` | `"lg"` | `xs`: 28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions.<br>`default`: 36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`.<br>`lg`: 40px tall (36px from `sm`), Figma `lg`, the default: page, form, dialog and card actions, next to an Input.<br>`icon`: Square icon-only button at the default height. Requires `aria-label`.<br>`icon-xs`: Square icon-only button at `xs` height. Requires `aria-label`.<br>`icon-lg`: Square icon-only button at `lg` height. Requires `aria-label`. |
34
34
  | `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
35
- | `variant` | `"default" \| "secondary" \| "ghost" \| "destructive" \| "warning" \| "wallet" \| "destructive-outline" \| "link"` | `"default"` | `default`: Primary action (Figma Button primary): a dark gradient with white text, white in dark mode. Use it for the one main action of a view, form or dialog.<br>`secondary`: Tactile light button (Figma Button secondary). The default for most actions in forms, toolbars and dialogs.<br>`ghost`: No chrome until hover (Figma Button ghost). Use for icon buttons and dense UI.<br>`destructive`: Irreversible or dangerous actions such as delete or revoke (Figma Button destructive): a red gradient with white text.<br>`warning`: Confirms an action that needs attention but can be undone, such as pause (Figma Button warning): an amber gradient with white text.<br>`wallet`: Express checkout (Apple Pay, Google Pay): the wallet brands' black button, white in dark mode, holding the wallet's `WalletLogo` (20 tall). Name it with `aria-label` ("Pay with Apple Pay"). `WalletButtons` lays out a row of them.<br>`destructive-outline`: Bordered destructive action where a solid red button is too loud, e.g. in a row of actions.<br>`link`: Looks like an inline link but behaves as a button. |
35
+ | `variant` | `"default" \| "secondary" \| "ghost" \| "destructive" \| "warning" \| "wallet" \| "destructive-outline" \| "link"` | `"default"` | `default`: Primary action (Figma Button primary): a dark gradient with white text, white in dark mode. Use it for the one main action of a view, form or dialog.<br>`secondary`: Tactile light button (Figma Button secondary). The default for most actions in forms, toolbars and dialogs.<br>`ghost`: No chrome until hover (Figma Button ghost). Use for icon buttons and dense UI.<br>`destructive`: Irreversible or dangerous actions such as delete or revoke (Figma Button destructive): a red gradient with white text.<br>`warning`: Confirms an action that needs attention but can be undone, such as pause (Figma Button warning): an amber gradient with white text.<br>`wallet`: Express checkout (Apple Pay, Google Pay): the wallet brands' black button, white in dark mode, holding the wallet's `WalletLogo` (20 tall). Name it with `aria-label` ("Pay with Apple Pay"). `WalletButtons` lays out a row of them.<br>`destructive-outline`: Bordered destructive action where a solid red button is too loud, e.g. in a row of actions.<br>`link`: Looks like an inline link (link colour, underlined; the underline turns solid on hover) but behaves as a button. |
36
36
 
37
37
  Also accepts Base UI props: `focusableWhenDisabled`, `nativeButton`, `render`.
38
38
 
@@ -69,11 +69,12 @@ The label of the current legend item.
69
69
 
70
70
  ## LegendMarker
71
71
 
72
- The colour dot of the current legend item.
72
+ The marker of the current legend item: a colour dot, or a small bar for bar charts.
73
73
 
74
74
  | Prop | Type | Default | Description |
75
75
  | --- | --- | --- | --- |
76
76
  | `className` | `string` | - | Marker size class. Default: "h-2.5 w-2.5" |
77
+ | `variant` | `"dot" \| "bar"` | - | `"dot"`: a dot in the series colour. `"bar"`: a small bar like the tint bars of a `BarChart`, the colour washed into the card with a solid 2px edge on top. Default: "dot" |
77
78
 
78
79
  ## LegendProgress
79
80
 
@@ -85,6 +86,7 @@ renders nothing when the item has no `maxValue`.
85
86
  | `height` | `string` | - | Track height. Default: "h-1.5" |
86
87
  | `indicatorClassName` | `string` | - | Indicator class name |
87
88
  | `trackClassName` | `string` | - | Track class name |
89
+ | `variant` | `"tint" \| "solid"` | - | `"tint"`: the ring chart's look, a light grey `--muted` track, the bar as a 25% wash of the item colour (mixed into the card) and a solid 2px end. `"solid"`: a `bg-muted` track and a bar in the item colour. Default: "solid" |
88
90
 
89
91
  ## LegendValue
90
92
 
@@ -26,7 +26,7 @@ value; pass `rows` to rename or format them, or `content` to render the whole pa
26
26
  | `dotScale` | `number` | - | Multiplier applied to the computed dot / ring pixel radius. Default: 1 |
27
27
  | `dotSize` | `number` | - | Dot / ring radius in pixels. Default: 5 |
28
28
  | `dotStrokeWidth` | `number` | - | Ring stroke width in pixels. Default: 1.5 for ring variant |
29
- | `dotVariant` | `"dot" \| "ring"` | - | Dot style: filled circle or transparent ring. Default: "dot" |
29
+ | `dotVariant` | `"ring" \| "dot"` | - | Dot style: filled circle or transparent ring. Default: "dot" |
30
30
  | `indicatorColor` | `string \| ((point: Record<string, unknown>) => string)` | - | Color for the crosshair/indicator line. When a function, receives the hovered point (e.g. to match the series colour of that point). Default: --chart-crosshair. |
31
31
  | `indicatorDasharray` | `string` | - | SVG stroke dash pattern for the crosshair. Omit for solid. |
32
32
  | `indicatorFadeEdges` | `IndicatorFadeEdges` | - | Vertical crosshair fade: `both`, `top`, `bottom`, or `none` (solid). Default: `both`. |
@@ -102,7 +102,7 @@ The dot (or ring) that follows the hovered point of one series.
102
102
  | `springConfig` | `SpringConfig` | - | Per-chart override; falls back to `ChartConfigProvider.tooltipSpring`. |
103
103
  | `strokeColor` | `string` | - | |
104
104
  | `strokeWidth` | `number` | - | |
105
- | `variant` | `"dot" \| "ring"` | - | Dot fill or transparent ring around the hovered mark. Default: "dot" |
105
+ | `variant` | `"ring" \| "dot"` | - | Dot fill or transparent ring around the hovered mark. Default: "dot" |
106
106
 
107
107
  ## ChartTooltipIndicator
108
108
 
@@ -52,7 +52,6 @@ lay out the columns; lines and areas are never stacked. Rows need a `Date` under
52
52
  ```tsx
53
53
  "use client";
54
54
 
55
- import { Area } from "@dodopayments/ui/area-chart";
56
55
  import { SeriesBar } from "@dodopayments/ui/bar-chart";
57
56
  import { ChartGrid, XAxis } from "@dodopayments/ui/chart";
58
57
  import { Legend, LegendItem, LegendLabel, LegendMarker } from "@dodopayments/ui/chart-legend";
@@ -60,7 +59,7 @@ import { ChartTooltip } from "@dodopayments/ui/chart-tooltip";
60
59
  import { ComposedChart } from "@dodopayments/ui/composed-chart";
61
60
  import { Line } from "@dodopayments/ui/line-chart";
62
61
 
63
- // Daily orders (columns), revenue in $K (line) and the 7-day revenue run rate in $K (area).
62
+ // Daily orders (tinted columns), revenue in $K (line) and the 7-day revenue run rate in $K (dashed grey line).
64
63
  const data = Array.from({ length: 30 }, (_, day) => {
65
64
  const revenue = 42 + 9 * Math.sin(day / 4) + 0.6 * day + 3 * Math.cos(day * 1.3);
66
65
  return {
@@ -72,9 +71,9 @@ const data = Array.from({ length: 30 }, (_, day) => {
72
71
  });
73
72
 
74
73
  const legendItems = [
75
- { label: "Orders", value: 0, color: "var(--chart-3)" },
74
+ { label: "Orders", value: 0, color: "var(--chart-2)" },
76
75
  { label: "Revenue ($K)", value: 0, color: "var(--chart-1)" },
77
- { label: "7-day run rate ($K)", value: 0, color: "var(--chart-4)" },
76
+ { label: "7-day run rate ($K)", value: 0, color: "var(--chart-comparison)" },
78
77
  ];
79
78
 
80
79
  export default function ComposedChartDefault() {
@@ -93,8 +92,8 @@ export default function ComposedChartDefault() {
93
92
  maxBarSize={32}
94
93
  >
95
94
  <ChartGrid horizontal />
96
- <Area dataKey="runRate" fill="var(--chart-4)" fillOpacity={0.3} />
97
- <SeriesBar dataKey="orders" fill="var(--chart-3)" radius={4} />
95
+ <SeriesBar dataKey="orders" fill="var(--chart-2)" radius={4} />
96
+ <Line dataKey="runRate" variant="comparison" />
98
97
  <Line dataKey="revenue" stroke="var(--chart-1)" />
99
98
  <XAxis numTicks={6} />
100
99
  <ChartTooltip showCrosshair={false} />
@@ -2,8 +2,8 @@
2
2
 
3
3
  The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
4
4
  the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
5
- `emptyMessage` centred in the panel when there are no rows. Below a 896 container the rows become a
6
- card list (title, badge and actions, then label/value lines; see column `meta.card`). It sets
5
+ `emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
6
+ a table wider than its container scrolls sideways (the container is then a tab stop). It sets
7
7
  `aria-sort` on sortable headers and marks selected rows `data-state="selected"` (they keep their
8
8
  colour; the checkbox shows the selection). Sorting, selection and pagination stay in the table
9
9
  instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
@@ -19,8 +19,8 @@ import { DataGrid, DataGridColumnHeader, DataGridPagination, DataGridRowSelect,
19
19
 
20
20
  The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
21
21
  the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
22
- `emptyMessage` centred in the panel when there are no rows. Below a 896 container the rows become a
23
- card list (title, badge and actions, then label/value lines; see column `meta.card`). It sets
22
+ `emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
23
+ a table wider than its container scrolls sideways (the container is then a tab stop). It sets
24
24
  `aria-sort` on sortable headers and marks selected rows `data-state="selected"` (they keep their
25
25
  colour; the checkbox shows the selection). Sorting, selection and pagination stay in the table
26
26
  instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
@@ -39,7 +39,7 @@ the selected rows.
39
39
  | `emptyMessage` | `ReactNode` | `"No data available"` | Shown centred in the panel (48 above and below) when there are no rows: an `Empty`, for no data yet or for no results with a "Clear filters" action. |
40
40
  | `formatSortAnnouncement` | `((sort: DataGridSortAnnouncement \| null) => string)` | `(sort) => sort ? `Sorted by ${sort.column}, ${sort.direction}.` : "Sort cleared."` | Text that a polite live region announces after the user changes the sort. `null` means the sort was cleared. |
41
41
  | `isLoading` | `boolean` | `false` | Render skeleton rows instead of data and mark the table `aria-busy`. |
42
- | `layout` | `"table" \| "auto" \| "cards"` | `"auto"` | `auto` shows the table and switches to the card list below 896 wide; `table` and `cards` keep one layout at any width (a table wider than its container scrolls). |
42
+ | `layout` | `"table" \| "auto" \| "cards"` | - | Chose between the table and the old mobile card list. The table layout is used at every width now (a table wider than its container scrolls sideways), so this has no effect. |
43
43
  | `loadingRows` | `number` | - | Number of skeleton rows while loading. Defaults to the current page size. |
44
44
  | `onRowClick` | `((row: TData) => void)` | - | Called with the row's original data when a row is clicked or activated with Enter/Space. Makes rows focusable. Clicks on buttons, links, inputs, checkboxes and `[data-no-row-click]` elements inside the row are ignored. |
45
45
  | `size` | `"md" \| "lg"` | `"md"` | `md`: 48 rows, for one-line cells (the default).<br>`lg`: 64 rows, for a primary cell with a subtitle, a date with its time or an avatar. |
@@ -112,14 +112,13 @@ A person: avatar, name and email, 12 apart (.Table cell `avatar`).
112
112
 
113
113
  ## DataGridCellDate
114
114
 
115
- A date with its time under it (.Table cell `date`). On a mobile card the time gets its own line,
116
- labelled "Time", under the date's line.
115
+ A date with its time under it (.Table cell `date`).
117
116
 
118
117
  | Prop | Type | Default | Description |
119
118
  | --- | --- | --- | --- |
120
119
  | `date` (required) | `ReactNode` | - | The date, in Body/Primary. |
121
120
  | `time` | `ReactNode` | - | The time under it, in Body/Secondary. |
122
- | `timeLabel` | `ReactNode` | `"Time" (from the locale)` | The label of the time's own line on a mobile card. |
121
+ | `timeLabel` | `ReactNode` | - | The label of the time's own line on the old mobile card list. |
123
122
 
124
123
  ## DataGridCellPayment
125
124
 
@@ -276,7 +275,7 @@ export default function DataGridApiKeys() {
276
275
  subtitle={row.original.scopes ? row.original.scopes.join(", ") : undefined}
277
276
  />
278
277
  ),
279
- meta: { cellClassName: "min-w-40", card: "title" },
278
+ meta: { cellClassName: "min-w-40" },
280
279
  },
281
280
  {
282
281
  accessorKey: "prefix",
@@ -294,7 +293,6 @@ export default function DataGridApiKeys() {
294
293
  ) : (
295
294
  <Badge tone="neutral">Live</Badge>
296
295
  ),
297
- meta: { card: "badge" },
298
296
  },
299
297
  {
300
298
  accessorKey: "createdAt",
@@ -343,7 +341,6 @@ export default function DataGridApiKeys() {
343
341
  </Menu>
344
342
  </DataGridCellActions>
345
343
  ),
346
- meta: { card: "actions" },
347
344
  },
348
345
  ];
349
346
 
@@ -376,7 +373,6 @@ export default function DataGridApiKeys() {
376
373
  ) : null}
377
374
  <DataGrid
378
375
  table={table}
379
- layout="table"
380
376
  aria-label="API keys"
381
377
  isLoading={loading}
382
378
  loadingRows={3}
@@ -768,7 +764,6 @@ export default function DataGridApiRequests() {
768
764
  {row.original.method}
769
765
  </Button>
770
766
  ),
771
- meta: { card: "title" },
772
767
  },
773
768
  {
774
769
  accessorKey: "path",
@@ -783,7 +778,6 @@ export default function DataGridApiRequests() {
783
778
  accessorKey: "status",
784
779
  header: "Status",
785
780
  cell: ({ row }) => <StatusCode status={row.original.status} />,
786
- meta: { card: "badge" },
787
781
  },
788
782
  {
789
783
  accessorKey: "latencyMs",
@@ -999,7 +993,7 @@ export default function DataGridBasic() {
999
993
  <div className="flex items-center justify-between gap-2">
1000
994
  <p className="text-muted-foreground text-body-primary">{selected} selected</p>
1001
995
  </div>
1002
- <DataGrid table={table} layout="table" aria-label="Payments" />
996
+ <DataGrid table={table} aria-label="Payments" />
1003
997
  <DataGridPagination table={table} />
1004
998
  </div>
1005
999
  );
@@ -1077,7 +1071,6 @@ export default function DataGridBulkActions() {
1077
1071
  <div className="flex w-full min-w-0 flex-col gap-2.5">
1078
1072
  <DataGrid
1079
1073
  table={table}
1080
- layout="table"
1081
1074
  aria-label="Payouts"
1082
1075
  bulkActions={(selection) => (
1083
1076
  <Button
@@ -1169,7 +1162,6 @@ export default function DataGridInvoices() {
1169
1162
  {row.original.number}
1170
1163
  </Button>
1171
1164
  ),
1172
- meta: { card: "title" },
1173
1165
  },
1174
1166
  {
1175
1167
  accessorKey: "issuedAt",
@@ -1187,7 +1179,6 @@ export default function DataGridInvoices() {
1187
1179
  accessorKey: "status",
1188
1180
  header: "Status",
1189
1181
  cell: ({ row }) => <Badge kind="invoice" status={row.original.status} />,
1190
- meta: { card: "badge" },
1191
1182
  },
1192
1183
  {
1193
1184
  id: "download",
@@ -1340,13 +1331,11 @@ export default function DataGridLicenseKeys() {
1340
1331
  />
1341
1332
  </div>
1342
1333
  ),
1343
- meta: { card: "title" },
1344
1334
  },
1345
1335
  {
1346
1336
  accessorKey: "status",
1347
1337
  header: "Status",
1348
1338
  cell: ({ row }) => <Badge kind="license" status={row.original.status} />,
1349
- meta: { card: "badge" },
1350
1339
  },
1351
1340
  {
1352
1341
  id: "activations",
@@ -1692,7 +1681,6 @@ export default function DataGridLoadingEmpty() {
1692
1681
  />
1693
1682
  <DataGrid
1694
1683
  table={table}
1695
- layout="table"
1696
1684
  aria-label="Payouts"
1697
1685
  isLoading={mode === "loading"}
1698
1686
  emptyMessage={
@@ -1753,7 +1741,7 @@ export default function DataGridRowHover() {
1753
1741
 
1754
1742
  return (
1755
1743
  <div className="flex w-full min-w-0 flex-col gap-2.5">
1756
- <DataGrid table={table} layout="table" aria-label="Customers" />
1744
+ <DataGrid table={table} aria-label="Customers" />
1757
1745
  <DataGridPagination table={table} showRowsPerPage={false} />
1758
1746
  </div>
1759
1747
  );
@@ -1830,7 +1818,7 @@ export default function DataGridSortMotion() {
1830
1818
  getSortedRowModel: getSortedRowModel(),
1831
1819
  });
1832
1820
 
1833
- return <DataGrid table={table} layout="table" aria-label="Plans" className="w-full max-w-lg" />;
1821
+ return <DataGrid table={table} aria-label="Plans" className="w-full max-w-lg" />;
1834
1822
  }
1835
1823
  ```
1836
1824
 
@@ -66,7 +66,7 @@ A named shortcut in a range picker's preset list. `range` is evaluated against "
66
66
  | --- | --- | --- | --- |
67
67
  | `label` (required) | `string` | - | Text on the preset button, e.g. "Last 7 days". |
68
68
  | `range` (required) | `(today: Date) => CompleteDateRange` | - | Returns the range for the given day. |
69
- | `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
69
+ | `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "statCardNoChange" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
70
70
 
71
71
  ## Examples
72
72
 
@@ -196,7 +196,7 @@ export default function DetailsPanelRows() {
196
196
  label: "Minimum payout",
197
197
  value: "$50.00",
198
198
  action: (
199
- <Button variant="ghost" size="xs" aria-label="Edit minimum payout">
199
+ <Button variant="link" size="xs" aria-label="Edit minimum payout">
200
200
  Edit
201
201
  </Button>
202
202
  ),
@@ -3,7 +3,9 @@
3
3
  Drop-off through the stages of a flow (visited, started checkout, paid), on the bklit
4
4
  `FunnelChart` primitive. `data` is a list of `{ label, value, displayValue?, color?, gradient? }`,
5
5
  first stage first; each segment is sized as a share of the first stage and shows its value, a
6
- percentage badge and the stage label. Segments grow in with a stagger on mount; hovering one dims
6
+ percentage chip and the stage label, and each boundary shows the step conversion ("→ 54%") from the
7
+ stage before. Segments use the tint look of the other charts (a 20% wash with a solid 2px edge on the
8
+ outer sides); `variant="solid"` draws the full colour as `layers` halo rings. Segments grow in with a stagger on mount; hovering one dims
7
9
  the others. `orientation="vertical"` stacks the stages top to bottom; `grid` adds background bands
8
10
  and divider lines. Height comes from the aspect ratio unless a class sets it. It has no loading
9
11
  state and renders an empty frame when `data` is empty.
@@ -17,7 +19,9 @@ import { FunnelChart } from "@dodopayments/ui/funnel-chart";
17
19
  Drop-off through the stages of a flow (visited, started checkout, paid), on the bklit
18
20
  `FunnelChart` primitive. `data` is a list of `{ label, value, displayValue?, color?, gradient? }`,
19
21
  first stage first; each segment is sized as a share of the first stage and shows its value, a
20
- percentage badge and the stage label. Segments grow in with a stagger on mount; hovering one dims
22
+ percentage chip and the stage label, and each boundary shows the step conversion ("→ 54%") from the
23
+ stage before. Segments use the tint look of the other charts (a 20% wash with a solid 2px edge on the
24
+ outer sides); `variant="solid"` draws the full colour as `layers` halo rings. Segments grow in with a stagger on mount; hovering one dims
21
25
  the others. `orientation="vertical"` stacks the stages top to bottom; `grid` adds background bands
22
26
  and divider lines. Height comes from the aspect ratio unless a class sets it. It has no loading
23
27
  state and renders an empty frame when `data` is empty.
@@ -28,8 +32,10 @@ state and renders an empty frame when `data` is empty.
28
32
  | `label` (required) | `string` | - | Accessible name of the chart, e.g. "Checkout funnel, last 30 days". Set as `aria-label` on the `role="figure"` frame. The stage values, percentages and labels stay in the page as text. |
29
33
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
30
34
  | `color` | `string` | - | |
35
+ | `conversionLabel` | `string` | - | Screen reader text after the step conversion. Default "of the previous stage" |
31
36
  | `edges` | `"curved" \| "straight"` | - | Edge style for the funnel segments. Default "curved" |
32
37
  | `enterTransition` | `Transition` | - | Framer Motion transition for segment enter animation |
38
+ | `formatConversion` | `((pct: number) => string)` | - | Formats the step conversion (0–100). Default: a rounded percentage |
33
39
  | `formatPercentage` | `((pct: number) => string)` | - | |
34
40
  | `formatValue` | `((value: number) => string)` | - | |
35
41
  | `gap` | `number` | - | Gap between segments in pixels. Default 4 |
@@ -38,14 +44,16 @@ state and renders an empty frame when `data` is empty.
38
44
  | `labelAlign` | `"center" \| "end" \| "start"` | - | Where the label group sits within the segment cell. - "center" (default), "start", "end" For horizontal funnel: start=top, end=bottom. For vertical funnel: start=left, end=right. |
39
45
  | `labelLayout` | `"spread" \| "grouped"` | - | Controls how segment labels (value, percentage, stage name) are arranged. - "spread": Value/percentage/label are spread apart (top/center/bottom for horizontal, left/center/right for vertical). This is the default. - "grouped": All label items stack together in a tight group. When "grouped", use `labelOrientation` and `labelAlign` for full control. |
40
46
  | `labelOrientation` | `"vertical" \| "horizontal"` | - | Stack direction of the label group. Only applies when `labelLayout="grouped"`. - "vertical": Items stack top-to-bottom. Default for horizontal funnels. - "horizontal": Items stack left-to-right. Default for vertical funnels. |
41
- | `layers` | `number` | - | |
47
+ | `layers` | `number` | - | Halo rings of the `"solid"` look. Default 3 |
42
48
  | `onHoverChange` | `((index: number \| null) => void)` | - | Callback when hover state changes |
43
49
  | `orientation` | `"vertical" \| "horizontal"` | - | |
44
50
  | `renderPattern` | `((id: string, color: string) => ReactNode)` | - | Render a visx pattern definition. Receives a unique `id` string per segment and the resolved `color`. Return a `<PatternLines>` (or any visx pattern) inside an SVG `<defs>`. The component will use `fill="url(#id)"` on the innermost ring while keeping outer halo rings as solid color. |
51
+ | `showConversion` | `boolean` | - | Show each stage's conversion from the stage before it ("→ 54%") on the boundary between them, in the value row. Hidden when the segments are too narrow to fit it. Default true |
45
52
  | `showLabels` | `boolean` | - | |
46
53
  | `showPercentage` | `boolean` | - | |
47
54
  | `showValues` | `boolean` | - | |
48
55
  | `staggerDelay` | `number` | - | Stagger delay between segments in seconds. Default 0.12 |
56
+ | `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look of the other charts, each segment an opaque 20% wash of its colour (mixed into the card) with a solid 2px edge along its outer sides. `"solid"`: the full colour drawn as `layers` nested halo rings. A `renderPattern` fill stays solid. Default: "tint" |
49
57
 
50
58
  ## Examples
51
59
 
@@ -88,7 +96,7 @@ const payouts: FunnelStage[] = [
88
96
  value: 980,
89
97
  gradient: [
90
98
  { offset: 0, color: "var(--chart-3)" },
91
- { offset: 1, color: "var(--chart-positive)" },
99
+ { offset: 1, color: "var(--chart-5)" },
92
100
  ],
93
101
  },
94
102
  ];
@@ -98,7 +106,6 @@ export default function FunnelChartColors() {
98
106
  <FunnelChart
99
107
  data={payouts}
100
108
  label="Payouts through review, this month"
101
- layers={2}
102
109
  formatValue={(value) => compact.format(value)}
103
110
  formatPercentage={(pct) => `${pct.toFixed(1)}%`}
104
111
  />
@@ -3,7 +3,9 @@
3
3
  One value from 0 to 100 as a row of notches, around an arc (default) or along a horizontal track
4
4
  (`orientation="linear"`), on the bklit `Gauge` primitive. `value` sets how many notches fill.
5
5
  `centerValue` adds an optional animated statistic with a `defaultLabel` caption: in the arc
6
- centre, or above / below the linear track (`labelPlacement`, `labelAlign`). Set `useGradient` for
6
+ centre, or above / below the linear track (`labelPlacement`, `labelAlign`). Filled notches use the
7
+ tint look of the other charts (a 20% wash with a solid 3px outer edge); `variant="solid"` fills
8
+ them with the full colour. Set `useGradient` for
7
9
  a colour ramp across the notches, or pass `PatternLines` / `LinearGradient` children and point
8
10
  `activeFill` / `inactiveFill` at them with `url(#id)`. The plot is a `role="meter"` with
9
11
  `aria-valuenow`. Notches pop in on mount (instant under reduced motion). It has no loading or
@@ -18,7 +20,9 @@ import { GaugeChart } from "@dodopayments/ui/gauge-chart";
18
20
  One value from 0 to 100 as a row of notches, around an arc (default) or along a horizontal track
19
21
  (`orientation="linear"`), on the bklit `Gauge` primitive. `value` sets how many notches fill.
20
22
  `centerValue` adds an optional animated statistic with a `defaultLabel` caption: in the arc
21
- centre, or above / below the linear track (`labelPlacement`, `labelAlign`). Set `useGradient` for
23
+ centre, or above / below the linear track (`labelPlacement`, `labelAlign`). Filled notches use the
24
+ tint look of the other charts (a 20% wash with a solid 3px outer edge); `variant="solid"` fills
25
+ them with the full colour. Set `useGradient` for
22
26
  a colour ramp across the notches, or pass `PatternLines` / `LinearGradient` children and point
23
27
  `activeFill` / `inactiveFill` at them with `url(#id)`. The plot is a `role="meter"` with
24
28
  `aria-valuenow`. Notches pop in on mount (instant under reduced motion). It has no loading or
@@ -59,6 +63,7 @@ empty state.
59
63
  | `totalNotches` | `number` | - | Number of notches |
60
64
  | `uniformWidth` | `boolean` | - | `true` = rectangular notches; `false` = tapered toward center / midline |
61
65
  | `useGradient` | `boolean` | - | |
66
+ | `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look of the other charts, each filled notch an opaque 20% wash of its colour (mixed into the card) with a solid 3px edge on its outer side. `"solid"`: the full colour. A gradient or pattern `activeFill` (`url(#id)`) and the theme palette gradient stay solid. Default: "tint" |
62
67
  | `width` | `number` | - | |
63
68
 
64
69
  ## Examples
@@ -103,7 +108,7 @@ export default function GaugeChartGradient() {
103
108
  defaultLabel="Auth rate"
104
109
  formatOptions={{ style: "percent", maximumFractionDigits: 0 }}
105
110
  useGradient
106
- activeGradient={["var(--chart-2)", "var(--chart-1)"]}
111
+ activeGradient={["var(--chart-2)", "var(--chart-3)"]}
107
112
  inactiveFillOpacity={0.4}
108
113
  minWidth={240}
109
114
  />
@@ -159,7 +164,7 @@ export default function GaugeChartLinear() {
159
164
  totalNotches={50}
160
165
  spacing={0}
161
166
  notchCornerRadius={3}
162
- activeFill="var(--chart-6)"
167
+ activeFill="var(--chart-2)"
163
168
  inactiveFillOpacity={0.4}
164
169
  />
165
170
  </div>
@@ -186,6 +186,7 @@ with the chart, dim while the chart is hovered, and enlarge the hovered point.
186
186
  | `showActiveHighlight` | `boolean` | - | Enlarge the active point while hovering. Default: true |
187
187
  | `stroke` | `string` | - | Outer ring stroke color. Default: same as `fill` |
188
188
  | `strokeWidth` | `number` | - | Outer ring stroke width in px. Default: 2. Set to 0 to disable. |
189
+ | `tint` | `boolean` | - | Paint each marker as an opaque wash of its colour (20%, mixed into the card) inside a solid ring, with no gap: the look of the tint bars. `fill` (or the series colour) is the colour; `stroke` overrides the ring. Default: false |
189
190
 
190
191
  ## SeriesPointMarker
191
192