@dodopayments/ui 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. package/ai/component-registry.json +1258 -257
  2. package/ai/component-registry.md +5 -1
  3. package/ai/components/area-chart.md +4 -4
  4. package/ai/components/avatar.md +1 -1
  5. package/ai/components/badge.md +24 -0
  6. package/ai/components/bar-chart.md +18 -18
  7. package/ai/components/brand-logos.md +1 -1
  8. package/ai/components/button.md +24 -1
  9. package/ai/components/chart-tooltip.md +3 -3
  10. package/ai/components/chart.md +6 -6
  11. package/ai/components/checkout-page.md +1 -1
  12. package/ai/components/collapsible.md +1 -1
  13. package/ai/components/color-input.md +1 -1
  14. package/ai/components/composed-chart.md +7 -7
  15. package/ai/components/copyable-id.md +1 -0
  16. package/ai/components/country-select.md +1 -0
  17. package/ai/components/currency-select.md +1 -0
  18. package/ai/components/data-grid.md +92 -2
  19. package/ai/components/date-picker.md +1 -1
  20. package/ai/components/dialog.md +4 -2
  21. package/ai/components/drawer.md +292 -0
  22. package/ai/components/featured-icon.md +1 -0
  23. package/ai/components/field.md +1 -1
  24. package/ai/components/file-upload.md +1 -1
  25. package/ai/components/filter-grid.md +4 -7
  26. package/ai/components/funnel-chart.md +14 -12
  27. package/ai/components/gauge-chart.md +9 -11
  28. package/ai/components/icon-morph.md +1 -1
  29. package/ai/components/image-crop.md +89 -0
  30. package/ai/components/input-group.md +1 -1
  31. package/ai/components/input.md +43 -2
  32. package/ai/components/invoice-document.md +182 -0
  33. package/ai/components/line-chart.md +2 -2
  34. package/ai/components/load-more.md +1 -1
  35. package/ai/components/logo.md +1 -1
  36. package/ai/components/menu.md +10 -9
  37. package/ai/components/milestone.md +1 -1
  38. package/ai/components/money.md +3 -3
  39. package/ai/components/new-items-pill.md +1 -1
  40. package/ai/components/payment-logos.md +1 -1
  41. package/ai/components/pie-chart.md +11 -2
  42. package/ai/components/popover.md +2 -1
  43. package/ai/components/reorder-list.md +46 -1
  44. package/ai/components/ring-chart.md +17 -8
  45. package/ai/components/sale-share-card.md +48 -0
  46. package/ai/components/sankey-chart.md +23 -23
  47. package/ai/components/scaled-frame.md +1 -1
  48. package/ai/components/select.md +29 -2
  49. package/ai/components/setup-guide.md +1 -1
  50. package/ai/components/sidebar.md +2 -2
  51. package/ai/components/stat-card.md +32 -5
  52. package/ai/components/sunburst-chart.md +7 -4
  53. package/ai/components/tabs.md +39 -0
  54. package/ai/components/test-mode-banner.md +6 -3
  55. package/ai/components/timestamp.md +11 -2
  56. package/ai/components/timezone-select.md +1 -0
  57. package/ai/skills/dodo-charts/SKILL.md +12 -7
  58. package/ai/skills/dodo-design/SKILL.md +17 -7
  59. package/dist/components/avatar/avatar.d.ts +9 -7
  60. package/dist/components/avatar/avatar.d.ts.map +1 -1
  61. package/dist/components/avatar/avatar.js +9 -7
  62. package/dist/components/avatar/avatar.js.map +1 -1
  63. package/dist/components/badge/badge.d.ts +12 -0
  64. package/dist/components/badge/badge.d.ts.map +1 -1
  65. package/dist/components/badge/badge.js +23 -4
  66. package/dist/components/badge/badge.js.map +1 -1
  67. package/dist/components/brand-logos/brand-artwork.d.ts +30 -1
  68. package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
  69. package/dist/components/brand-logos/brand-artwork.js +30 -1
  70. package/dist/components/brand-logos/brand-artwork.js.map +1 -1
  71. package/dist/components/brand-logos/brand-logos.d.ts +2 -2
  72. package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
  73. package/dist/components/brand-logos/brand-logos.js +11 -1
  74. package/dist/components/brand-logos/brand-logos.js.map +1 -1
  75. package/dist/components/button/button.d.ts +12 -0
  76. package/dist/components/button/button.d.ts.map +1 -1
  77. package/dist/components/button/button.js +8 -0
  78. package/dist/components/button/button.js.map +1 -1
  79. package/dist/components/card/card-notice.d.ts.map +1 -1
  80. package/dist/components/card/card-notice.js +1 -1
  81. package/dist/components/card/card-notice.js.map +1 -1
  82. package/dist/components/code-block/code-block.d.ts.map +1 -1
  83. package/dist/components/code-block/code-block.js +3 -1
  84. package/dist/components/code-block/code-block.js.map +1 -1
  85. package/dist/components/comparison-bars/comparison-bars.js +2 -2
  86. package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
  87. package/dist/components/copyable-id/copyable-id.d.ts +7 -1
  88. package/dist/components/copyable-id/copyable-id.d.ts.map +1 -1
  89. package/dist/components/copyable-id/copyable-id.js +21 -3
  90. package/dist/components/copyable-id/copyable-id.js.map +1 -1
  91. package/dist/components/country-select/country-select.d.ts +6 -1
  92. package/dist/components/country-select/country-select.d.ts.map +1 -1
  93. package/dist/components/country-select/country-select.js +2 -2
  94. package/dist/components/country-select/country-select.js.map +1 -1
  95. package/dist/components/currency-select/currency-select.d.ts +6 -1
  96. package/dist/components/currency-select/currency-select.d.ts.map +1 -1
  97. package/dist/components/currency-select/currency-select.js +2 -2
  98. package/dist/components/currency-select/currency-select.js.map +1 -1
  99. package/dist/components/data-grid/bulk-actions.js +2 -2
  100. package/dist/components/data-grid/bulk-actions.js.map +1 -1
  101. package/dist/components/data-grid/data-grid.d.ts +17 -2
  102. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  103. package/dist/components/data-grid/data-grid.js +111 -9
  104. package/dist/components/data-grid/data-grid.js.map +1 -1
  105. package/dist/components/data-grid/table.d.ts.map +1 -1
  106. package/dist/components/data-grid/table.js +5 -0
  107. package/dist/components/data-grid/table.js.map +1 -1
  108. package/dist/components/date-picker/date-picker.js +2 -2
  109. package/dist/components/date-picker/date-picker.js.map +1 -1
  110. package/dist/components/dialog/dialog.d.ts +12 -4
  111. package/dist/components/dialog/dialog.d.ts.map +1 -1
  112. package/dist/components/dialog/dialog.js +46 -7
  113. package/dist/components/dialog/dialog.js.map +1 -1
  114. package/dist/components/drawer/drawer.d.ts +73 -0
  115. package/dist/components/drawer/drawer.d.ts.map +1 -0
  116. package/dist/components/drawer/drawer.js +56 -0
  117. package/dist/components/drawer/drawer.js.map +1 -0
  118. package/dist/components/drawer/index.d.ts +2 -0
  119. package/dist/components/drawer/index.d.ts.map +1 -0
  120. package/dist/components/drawer/index.js +2 -0
  121. package/dist/components/drawer/index.js.map +1 -0
  122. package/dist/components/featured-icon/featured-icon.d.ts +103 -1
  123. package/dist/components/featured-icon/featured-icon.d.ts.map +1 -1
  124. package/dist/components/featured-icon/featured-icon.js +61 -3
  125. package/dist/components/featured-icon/featured-icon.js.map +1 -1
  126. package/dist/components/featured-icon/index.d.ts +1 -1
  127. package/dist/components/featured-icon/index.d.ts.map +1 -1
  128. package/dist/components/featured-icon/index.js +1 -1
  129. package/dist/components/featured-icon/index.js.map +1 -1
  130. package/dist/components/featured-icon/sphere.d.ts +7 -0
  131. package/dist/components/featured-icon/sphere.d.ts.map +1 -0
  132. package/dist/components/featured-icon/sphere.js +29 -0
  133. package/dist/components/featured-icon/sphere.js.map +1 -0
  134. package/dist/components/file-upload/file-upload.js +1 -1
  135. package/dist/components/file-upload/file-upload.js.map +1 -1
  136. package/dist/components/filter-grid/filter-grid.d.ts +7 -2
  137. package/dist/components/filter-grid/filter-grid.d.ts.map +1 -1
  138. package/dist/components/filter-grid/filter-grid.js +3 -2
  139. package/dist/components/filter-grid/filter-grid.js.map +1 -1
  140. package/dist/components/funnel-chart/funnel-chart.d.ts +3 -2
  141. package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -1
  142. package/dist/components/funnel-chart/funnel-chart.js +3 -2
  143. package/dist/components/funnel-chart/funnel-chart.js.map +1 -1
  144. package/dist/components/gauge-chart/gauge-chart.d.ts +3 -4
  145. package/dist/components/gauge-chart/gauge-chart.d.ts.map +1 -1
  146. package/dist/components/gauge-chart/gauge-chart.js +3 -4
  147. package/dist/components/gauge-chart/gauge-chart.js.map +1 -1
  148. package/dist/components/image-crop/crop-math.d.ts +28 -0
  149. package/dist/components/image-crop/crop-math.d.ts.map +1 -0
  150. package/dist/components/image-crop/crop-math.js +53 -0
  151. package/dist/components/image-crop/crop-math.js.map +1 -0
  152. package/dist/components/image-crop/image-crop.d.ts +31 -0
  153. package/dist/components/image-crop/image-crop.d.ts.map +1 -0
  154. package/dist/components/image-crop/image-crop.js +165 -0
  155. package/dist/components/image-crop/image-crop.js.map +1 -0
  156. package/dist/components/image-crop/index.d.ts +2 -0
  157. package/dist/components/image-crop/index.d.ts.map +1 -0
  158. package/dist/components/image-crop/index.js +2 -0
  159. package/dist/components/image-crop/index.js.map +1 -0
  160. package/dist/components/input/input.d.ts +8 -2
  161. package/dist/components/input/input.d.ts.map +1 -1
  162. package/dist/components/input/input.js +12 -3
  163. package/dist/components/input/input.js.map +1 -1
  164. package/dist/components/input-group/input-group.d.ts +1 -1
  165. package/dist/components/input-group/input-group.js +1 -1
  166. package/dist/components/input-group/input-group.js.map +1 -1
  167. package/dist/components/invoice-document/index.d.ts +2 -0
  168. package/dist/components/invoice-document/index.d.ts.map +1 -0
  169. package/dist/components/invoice-document/index.js +2 -0
  170. package/dist/components/invoice-document/index.js.map +1 -0
  171. package/dist/components/invoice-document/invoice-document.d.ts +180 -0
  172. package/dist/components/invoice-document/invoice-document.d.ts.map +1 -0
  173. package/dist/components/invoice-document/invoice-document.js +58 -0
  174. package/dist/components/invoice-document/invoice-document.js.map +1 -0
  175. package/dist/components/list-item/list-item.d.ts +2 -2
  176. package/dist/components/list-item/list-item.d.ts.map +1 -1
  177. package/dist/components/list-item/list-item.js +3 -3
  178. package/dist/components/list-item/list-item.js.map +1 -1
  179. package/dist/components/list-toolbar/list-toolbar-date-range.js +1 -1
  180. package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
  181. package/dist/components/live-activity/live-activity.d.ts.map +1 -1
  182. package/dist/components/live-activity/live-activity.js +8 -3
  183. package/dist/components/live-activity/live-activity.js.map +1 -1
  184. package/dist/components/logo/logo.d.ts +5 -1
  185. package/dist/components/logo/logo.d.ts.map +1 -1
  186. package/dist/components/logo/logo.js +7 -3
  187. package/dist/components/logo/logo.js.map +1 -1
  188. package/dist/components/menu/menu.d.ts +10 -9
  189. package/dist/components/menu/menu.d.ts.map +1 -1
  190. package/dist/components/menu/menu.js +5 -4
  191. package/dist/components/menu/menu.js.map +1 -1
  192. package/dist/components/page-header/page-header.d.ts.map +1 -1
  193. package/dist/components/page-header/page-header.js +6 -6
  194. package/dist/components/page-header/page-header.js.map +1 -1
  195. package/dist/components/pagination/pagination.d.ts.map +1 -1
  196. package/dist/components/pagination/pagination.js +4 -2
  197. package/dist/components/pagination/pagination.js.map +1 -1
  198. package/dist/components/payment-logos/artwork/link.d.ts +2 -0
  199. package/dist/components/payment-logos/artwork/link.d.ts.map +1 -0
  200. package/dist/components/payment-logos/artwork/link.js +5 -0
  201. package/dist/components/payment-logos/artwork/link.js.map +1 -0
  202. package/dist/components/payment-logos/payment-logos.d.ts +1 -1
  203. package/dist/components/payment-logos/payment-logos.d.ts.map +1 -1
  204. package/dist/components/payment-logos/payment-logos.js +3 -0
  205. package/dist/components/payment-logos/payment-logos.js.map +1 -1
  206. package/dist/components/payment-method-list/payment-method-list.d.ts.map +1 -1
  207. package/dist/components/payment-method-list/payment-method-list.js +4 -1
  208. package/dist/components/payment-method-list/payment-method-list.js.map +1 -1
  209. package/dist/components/popover/popover.d.ts +7 -0
  210. package/dist/components/popover/popover.d.ts.map +1 -1
  211. package/dist/components/popover/popover.js.map +1 -1
  212. package/dist/components/quantity-stepper/quantity-stepper.js +1 -1
  213. package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
  214. package/dist/components/radio-group/radio-group.js +2 -2
  215. package/dist/components/radio-group/radio-group.js.map +1 -1
  216. package/dist/components/reorder-list/reorder-list.d.ts +11 -2
  217. package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
  218. package/dist/components/reorder-list/reorder-list.js +39 -16
  219. package/dist/components/reorder-list/reorder-list.js.map +1 -1
  220. package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
  221. package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
  222. package/dist/components/sale-share-card/index.d.ts +2 -0
  223. package/dist/components/sale-share-card/index.d.ts.map +1 -0
  224. package/dist/components/sale-share-card/index.js +2 -0
  225. package/dist/components/sale-share-card/index.js.map +1 -0
  226. package/dist/components/sale-share-card/sale-share-card.d.ts +27 -0
  227. package/dist/components/sale-share-card/sale-share-card.d.ts.map +1 -0
  228. package/dist/components/sale-share-card/sale-share-card.js +46 -0
  229. package/dist/components/sale-share-card/sale-share-card.js.map +1 -0
  230. package/dist/components/sankey-chart/sankey-chart.d.ts +4 -4
  231. package/dist/components/sankey-chart/sankey-chart.js +4 -4
  232. package/dist/components/scaled-frame/scaled-frame.d.ts +6 -2
  233. package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
  234. package/dist/components/scaled-frame/scaled-frame.js +20 -1
  235. package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
  236. package/dist/components/segmented-control/segmented-control.d.ts +2 -2
  237. package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
  238. package/dist/components/segmented-control/segmented-control.js +10 -2
  239. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  240. package/dist/components/select/select.d.ts +21 -3
  241. package/dist/components/select/select.d.ts.map +1 -1
  242. package/dist/components/select/select.js +24 -9
  243. package/dist/components/select/select.js.map +1 -1
  244. package/dist/components/sidebar/sidebar.d.ts +2 -2
  245. package/dist/components/sidebar/sidebar.js +2 -2
  246. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  247. package/dist/components/skeleton/skeleton.js +7 -7
  248. package/dist/components/skeleton/skeleton.js.map +1 -1
  249. package/dist/components/slider/slider-thumb.d.ts +2 -2
  250. package/dist/components/slider/slider-thumb.d.ts.map +1 -1
  251. package/dist/components/slider/slider-thumb.js +2 -2
  252. package/dist/components/slider/slider-thumb.js.map +1 -1
  253. package/dist/components/slider/slider.js +1 -1
  254. package/dist/components/slider/slider.js.map +1 -1
  255. package/dist/components/stat-card/index.d.ts +1 -1
  256. package/dist/components/stat-card/index.d.ts.map +1 -1
  257. package/dist/components/stat-card/index.js +1 -1
  258. package/dist/components/stat-card/index.js.map +1 -1
  259. package/dist/components/stat-card/stat-card.d.ts +47 -7
  260. package/dist/components/stat-card/stat-card.d.ts.map +1 -1
  261. package/dist/components/stat-card/stat-card.js +72 -12
  262. package/dist/components/stat-card/stat-card.js.map +1 -1
  263. package/dist/components/subscription-card/subscription-card.js +1 -1
  264. package/dist/components/subscription-card/subscription-card.js.map +1 -1
  265. package/dist/components/sunburst-chart/sunburst-chart.d.ts +2 -1
  266. package/dist/components/sunburst-chart/sunburst-chart.d.ts.map +1 -1
  267. package/dist/components/sunburst-chart/sunburst-chart.js +2 -1
  268. package/dist/components/sunburst-chart/sunburst-chart.js.map +1 -1
  269. package/dist/components/tabs/tabs.d.ts +30 -1
  270. package/dist/components/tabs/tabs.d.ts.map +1 -1
  271. package/dist/components/tabs/tabs.js +14 -4
  272. package/dist/components/tabs/tabs.js.map +1 -1
  273. package/dist/components/test-mode-banner/test-mode-banner.d.ts.map +1 -1
  274. package/dist/components/test-mode-banner/test-mode-banner.js +3 -2
  275. package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
  276. package/dist/components/timestamp/index.d.ts +1 -1
  277. package/dist/components/timestamp/index.d.ts.map +1 -1
  278. package/dist/components/timestamp/index.js +1 -1
  279. package/dist/components/timestamp/index.js.map +1 -1
  280. package/dist/components/timestamp/timestamp.d.ts +12 -2
  281. package/dist/components/timestamp/timestamp.d.ts.map +1 -1
  282. package/dist/components/timestamp/timestamp.js +12 -2
  283. package/dist/components/timestamp/timestamp.js.map +1 -1
  284. package/dist/components/timezone-select/timezone-select.d.ts +6 -1
  285. package/dist/components/timezone-select/timezone-select.d.ts.map +1 -1
  286. package/dist/components/timezone-select/timezone-select.js +2 -2
  287. package/dist/components/timezone-select/timezone-select.js.map +1 -1
  288. package/dist/components/tooltip/tooltip.js +1 -1
  289. package/dist/components/tooltip/tooltip.js.map +1 -1
  290. package/dist/icons/index.d.ts +9 -0
  291. package/dist/icons/index.js +9 -0
  292. package/dist/icons/ui/arrow-turn-right.d.ts +3 -0
  293. package/dist/icons/ui/arrow-turn-right.d.ts.map +1 -0
  294. package/dist/icons/ui/arrow-turn-right.js +5 -0
  295. package/dist/icons/ui/arrow-turn-right.js.map +1 -0
  296. package/dist/icons/ui/box-glyph.d.ts +3 -0
  297. package/dist/icons/ui/box-glyph.js +5 -0
  298. package/dist/icons/ui/circle-check-glyph.d.ts +3 -0
  299. package/dist/icons/ui/circle-check-glyph.js +5 -0
  300. package/dist/icons/ui/crop.d.ts +3 -0
  301. package/dist/icons/ui/crop.d.ts.map +1 -0
  302. package/dist/icons/ui/crop.js +5 -0
  303. package/dist/icons/ui/crop.js.map +1 -0
  304. package/dist/icons/ui/greek-temple-glyph.d.ts +3 -0
  305. package/dist/icons/ui/greek-temple-glyph.js +5 -0
  306. package/dist/icons/ui/hourglass-glyph.d.ts +3 -0
  307. package/dist/icons/ui/hourglass-glyph.js +5 -0
  308. package/dist/icons/ui/shop-glyph.d.ts +3 -0
  309. package/dist/icons/ui/shop-glyph.js +5 -0
  310. package/dist/icons/ui/triangle-warning-glyph.d.ts +3 -0
  311. package/dist/icons/ui/triangle-warning-glyph.js +5 -0
  312. package/dist/icons/ui/user-glyph.d.ts +3 -0
  313. package/dist/icons/ui/user-glyph.js +5 -0
  314. package/dist/index.d.ts +3 -0
  315. package/dist/index.d.ts.map +1 -1
  316. package/dist/index.js +3 -0
  317. package/dist/index.js.map +1 -1
  318. package/dist/lib/cn-tables.js +5 -5
  319. package/dist/lib/cn-tables.js.map +1 -1
  320. package/dist/lib/locale-messages.d.ts +8 -0
  321. package/dist/lib/locale-messages.d.ts.map +1 -1
  322. package/dist/lib/locale-messages.js +9 -0
  323. package/dist/lib/locale-messages.js.map +1 -1
  324. package/dist/locales/ar.d.ts.map +1 -1
  325. package/dist/locales/ar.js +6 -0
  326. package/dist/locales/ar.js.map +1 -1
  327. package/dist/locales/de.d.ts.map +1 -1
  328. package/dist/locales/de.js +6 -0
  329. package/dist/locales/de.js.map +1 -1
  330. package/dist/locales/es.d.ts.map +1 -1
  331. package/dist/locales/es.js +6 -0
  332. package/dist/locales/es.js.map +1 -1
  333. package/dist/locales/fr.d.ts.map +1 -1
  334. package/dist/locales/fr.js +6 -0
  335. package/dist/locales/fr.js.map +1 -1
  336. package/dist/locales/he.d.ts.map +1 -1
  337. package/dist/locales/he.js +6 -0
  338. package/dist/locales/he.js.map +1 -1
  339. package/dist/locales/hi.d.ts.map +1 -1
  340. package/dist/locales/hi.js +6 -0
  341. package/dist/locales/hi.js.map +1 -1
  342. package/dist/locales/ja.d.ts.map +1 -1
  343. package/dist/locales/ja.js +6 -0
  344. package/dist/locales/ja.js.map +1 -1
  345. package/dist/locales/pt-BR.d.ts.map +1 -1
  346. package/dist/locales/pt-BR.js +6 -0
  347. package/dist/locales/pt-BR.js.map +1 -1
  348. package/dist/locales/zh-CN.d.ts.map +1 -1
  349. package/dist/locales/zh-CN.js +6 -0
  350. package/dist/locales/zh-CN.js.map +1 -1
  351. package/dist/primitives/charts/area-chart.js +1 -1
  352. package/dist/primitives/charts/area-chart.js.map +1 -1
  353. package/dist/primitives/charts/area.d.ts +1 -1
  354. package/dist/primitives/charts/area.d.ts.map +1 -1
  355. package/dist/primitives/charts/bar-chart.js +1 -1
  356. package/dist/primitives/charts/bar-chart.js.map +1 -1
  357. package/dist/primitives/charts/bar-squares.d.ts +1 -1
  358. package/dist/primitives/charts/bar-squares.d.ts.map +1 -1
  359. package/dist/primitives/charts/bar.d.ts +6 -5
  360. package/dist/primitives/charts/bar.d.ts.map +1 -1
  361. package/dist/primitives/charts/bar.js +1 -1
  362. package/dist/primitives/charts/bar.js.map +1 -1
  363. package/dist/primitives/charts/chart-context.js +2 -2
  364. package/dist/primitives/charts/chart-context.js.map +1 -1
  365. package/dist/primitives/charts/composed-chart.js +3 -3
  366. package/dist/primitives/charts/composed-chart.js.map +1 -1
  367. package/dist/primitives/charts/funnel-chart.d.ts +12 -8
  368. package/dist/primitives/charts/funnel-chart.d.ts.map +1 -1
  369. package/dist/primitives/charts/funnel-chart.js +38 -9
  370. package/dist/primitives/charts/funnel-chart.js.map +1 -1
  371. package/dist/primitives/charts/gauge.d.ts +4 -4
  372. package/dist/primitives/charts/gauge.js +8 -8
  373. package/dist/primitives/charts/gauge.js.map +1 -1
  374. package/dist/primitives/charts/line-chart.js +1 -1
  375. package/dist/primitives/charts/line-chart.js.map +1 -1
  376. package/dist/primitives/charts/line-series-terminal-marker.d.ts.map +1 -1
  377. package/dist/primitives/charts/line-series-terminal-marker.js +1 -1
  378. package/dist/primitives/charts/line-series-terminal-marker.js.map +1 -1
  379. package/dist/primitives/charts/line.d.ts +1 -1
  380. package/dist/primitives/charts/line.d.ts.map +1 -1
  381. package/dist/primitives/charts/notch-gauge-shared.d.ts.map +1 -1
  382. package/dist/primitives/charts/notch-gauge-shared.js +4 -3
  383. package/dist/primitives/charts/notch-gauge-shared.js.map +1 -1
  384. package/dist/primitives/charts/pie-context.d.ts +3 -2
  385. package/dist/primitives/charts/pie-context.d.ts.map +1 -1
  386. package/dist/primitives/charts/pie-context.js +7 -6
  387. package/dist/primitives/charts/pie-context.js.map +1 -1
  388. package/dist/primitives/charts/pie-slice.d.ts +2 -2
  389. package/dist/primitives/charts/pie-slice.js +1 -1
  390. package/dist/primitives/charts/pie-slice.js.map +1 -1
  391. package/dist/primitives/charts/ring-context.d.ts +4 -2
  392. package/dist/primitives/charts/ring-context.d.ts.map +1 -1
  393. package/dist/primitives/charts/ring-context.js +8 -6
  394. package/dist/primitives/charts/ring-context.js.map +1 -1
  395. package/dist/primitives/charts/ring.d.ts +8 -8
  396. package/dist/primitives/charts/ring.d.ts.map +1 -1
  397. package/dist/primitives/charts/ring.js +4 -4
  398. package/dist/primitives/charts/ring.js.map +1 -1
  399. package/dist/primitives/charts/sankey/sankey-link.d.ts +9 -10
  400. package/dist/primitives/charts/sankey/sankey-link.d.ts.map +1 -1
  401. package/dist/primitives/charts/sankey/sankey-link.js +14 -9
  402. package/dist/primitives/charts/sankey/sankey-link.js.map +1 -1
  403. package/dist/primitives/charts/sankey/sankey-node.d.ts +5 -5
  404. package/dist/primitives/charts/sankey/sankey-node.d.ts.map +1 -1
  405. package/dist/primitives/charts/sankey/sankey-node.js +6 -6
  406. package/dist/primitives/charts/sankey/sankey-node.js.map +1 -1
  407. package/dist/primitives/charts/series-bar.d.ts +4 -4
  408. package/dist/primitives/charts/series-bar.d.ts.map +1 -1
  409. package/dist/primitives/charts/series-bar.js +1 -1
  410. package/dist/primitives/charts/series-bar.js.map +1 -1
  411. package/dist/primitives/charts/sunburst-context.d.ts +3 -2
  412. package/dist/primitives/charts/sunburst-context.d.ts.map +1 -1
  413. package/dist/primitives/charts/sunburst-context.js +6 -5
  414. package/dist/primitives/charts/sunburst-context.js.map +1 -1
  415. package/dist/primitives/charts/sunburst-legend.d.ts +7 -2
  416. package/dist/primitives/charts/sunburst-legend.d.ts.map +1 -1
  417. package/dist/primitives/charts/sunburst-legend.js +8 -6
  418. package/dist/primitives/charts/sunburst-legend.js.map +1 -1
  419. package/dist/primitives/charts/sunburst-segment.d.ts +3 -3
  420. package/dist/primitives/charts/sunburst-segment.js +2 -2
  421. package/dist/primitives/charts/sunburst-segment.js.map +1 -1
  422. package/dist/primitives/charts/tooltip/date-ticker.js +2 -2
  423. package/dist/primitives/charts/tooltip/date-ticker.js.map +1 -1
  424. package/dist/primitives/charts/tooltip/tooltip-box.js +1 -1
  425. package/dist/primitives/charts/tooltip/tooltip-box.js.map +1 -1
  426. package/dist/primitives/hooks/use-media-query.d.ts +1 -1
  427. package/dist/primitives/hooks/use-media-query.js +1 -1
  428. package/dist/primitives/lib/mobile-sheet.d.ts +25 -0
  429. package/dist/primitives/lib/mobile-sheet.d.ts.map +1 -0
  430. package/dist/primitives/lib/mobile-sheet.js +28 -0
  431. package/dist/primitives/lib/mobile-sheet.js.map +1 -0
  432. package/dist/primitives/lib/segmented-control.d.ts +8 -2
  433. package/dist/primitives/lib/segmented-control.d.ts.map +1 -1
  434. package/dist/primitives/lib/segmented-control.js +8 -2
  435. package/dist/primitives/lib/segmented-control.js.map +1 -1
  436. package/dist/primitives/ui/alert-dialog.js +1 -1
  437. package/dist/primitives/ui/alert-dialog.js.map +1 -1
  438. package/dist/primitives/ui/autocomplete.js +1 -1
  439. package/dist/primitives/ui/autocomplete.js.map +1 -1
  440. package/dist/primitives/ui/button.d.ts +1 -1
  441. package/dist/primitives/ui/button.d.ts.map +1 -1
  442. package/dist/primitives/ui/button.js +3 -1
  443. package/dist/primitives/ui/button.js.map +1 -1
  444. package/dist/primitives/ui/calendar.d.ts.map +1 -1
  445. package/dist/primitives/ui/calendar.js +4 -2
  446. package/dist/primitives/ui/calendar.js.map +1 -1
  447. package/dist/primitives/ui/checkbox.d.ts.map +1 -1
  448. package/dist/primitives/ui/checkbox.js +3 -1
  449. package/dist/primitives/ui/checkbox.js.map +1 -1
  450. package/dist/primitives/ui/combobox.js +2 -2
  451. package/dist/primitives/ui/combobox.js.map +1 -1
  452. package/dist/primitives/ui/dialog.d.ts +7 -0
  453. package/dist/primitives/ui/dialog.d.ts.map +1 -1
  454. package/dist/primitives/ui/dialog.js +12 -1
  455. package/dist/primitives/ui/dialog.js.map +1 -1
  456. package/dist/primitives/ui/drawer.d.ts +1 -2
  457. package/dist/primitives/ui/drawer.d.ts.map +1 -1
  458. package/dist/primitives/ui/drawer.js +30 -14
  459. package/dist/primitives/ui/drawer.js.map +1 -1
  460. package/dist/primitives/ui/input-group.d.ts.map +1 -1
  461. package/dist/primitives/ui/input-group.js +4 -1
  462. package/dist/primitives/ui/input-group.js.map +1 -1
  463. package/dist/primitives/ui/input.js +1 -1
  464. package/dist/primitives/ui/input.js.map +1 -1
  465. package/dist/primitives/ui/menu.d.ts.map +1 -1
  466. package/dist/primitives/ui/menu.js +15 -16
  467. package/dist/primitives/ui/menu.js.map +1 -1
  468. package/dist/primitives/ui/number-field.js +1 -1
  469. package/dist/primitives/ui/number-field.js.map +1 -1
  470. package/dist/primitives/ui/otp-field.js +2 -2
  471. package/dist/primitives/ui/otp-field.js.map +1 -1
  472. package/dist/primitives/ui/popover.d.ts +3 -1
  473. package/dist/primitives/ui/popover.d.ts.map +1 -1
  474. package/dist/primitives/ui/popover.js +11 -5
  475. package/dist/primitives/ui/popover.js.map +1 -1
  476. package/dist/primitives/ui/preview-card.js +1 -1
  477. package/dist/primitives/ui/preview-card.js.map +1 -1
  478. package/dist/primitives/ui/radio-group.js +1 -1
  479. package/dist/primitives/ui/radio-group.js.map +1 -1
  480. package/dist/primitives/ui/select.d.ts +7 -3
  481. package/dist/primitives/ui/select.d.ts.map +1 -1
  482. package/dist/primitives/ui/select.js +14 -5
  483. package/dist/primitives/ui/select.js.map +1 -1
  484. package/dist/primitives/ui/sheet.d.ts.map +1 -1
  485. package/dist/primitives/ui/sheet.js +5 -4
  486. package/dist/primitives/ui/sheet.js.map +1 -1
  487. package/dist/primitives/ui/sidebar.js +1 -1
  488. package/dist/primitives/ui/slider.js +1 -1
  489. package/dist/primitives/ui/slider.js.map +1 -1
  490. package/dist/primitives/ui/switch.d.ts +1 -1
  491. package/dist/primitives/ui/switch.d.ts.map +1 -1
  492. package/dist/primitives/ui/switch.js +1 -1
  493. package/dist/primitives/ui/switch.js.map +1 -1
  494. package/dist/primitives/ui/tabs.d.ts.map +1 -1
  495. package/dist/primitives/ui/tabs.js +1 -1
  496. package/dist/primitives/ui/tabs.js.map +1 -1
  497. package/dist/primitives/ui/textarea.js +1 -1
  498. package/dist/primitives/ui/textarea.js.map +1 -1
  499. package/dist/primitives/ui/toast.js +2 -2
  500. package/dist/primitives/ui/toast.js.map +1 -1
  501. package/dist/primitives/ui/tooltip.js +1 -1
  502. package/dist/primitives/ui/tooltip.js.map +1 -1
  503. package/dist/styles/motion.test.tsx +15 -0
  504. package/dist/styles/theme.css +13 -0
  505. package/dist/styles/tokens.css +142 -39
  506. package/dist/styles/tokens.test.tsx +154 -3
  507. package/dist/theme/color.d.ts +5 -0
  508. package/dist/theme/color.d.ts.map +1 -1
  509. package/dist/theme/color.js +22 -0
  510. package/dist/theme/color.js.map +1 -1
  511. package/dist/theme/css.d.ts +3 -3
  512. package/dist/theme/css.d.ts.map +1 -1
  513. package/dist/theme/css.js +33 -15
  514. package/dist/theme/css.js.map +1 -1
  515. package/package.json +1 -1
@@ -4,7 +4,7 @@ The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URL
4
4
  (`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
5
5
  units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
6
6
  a brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input
7
- is 36 tall (one size). A one-line input takes icons, an inline `prefix` / `suffix`,
7
+ is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
8
8
  a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With
9
9
  `suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
10
10
  a `Field` it picks up the label, description and validation state.
@@ -19,7 +19,7 @@ The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URL
19
19
  (`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
20
20
  units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
21
21
  a brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input
22
- is 36 tall (one size). A one-line input takes icons, an inline `prefix` / `suffix`,
22
+ is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
23
23
  a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With
24
24
  `suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
25
25
  a `Field` it picks up the label, description and validation state.
@@ -219,6 +219,47 @@ export default function InputAsyncSuggestions() {
219
219
  }
220
220
  ```
221
221
 
222
+ ### input/compact
223
+
224
+ ```tsx
225
+ "use client";
226
+
227
+ import { Button } from "@dodopayments/ui/button";
228
+ import { MagnifierIcon } from "@dodopayments/ui/icons";
229
+ import { Input } from "@dodopayments/ui/input";
230
+ import { Select, SelectContent, SelectTrigger, SelectValue } from "@dodopayments/ui/select";
231
+
232
+ const STATUSES = [
233
+ { value: "all", label: "All statuses" },
234
+ { value: "succeeded", label: "Succeeded" },
235
+ { value: "failed", label: "Failed" },
236
+ ];
237
+
238
+ export default function InputCompact() {
239
+ return (
240
+ <div className="flex w-full max-w-xl flex-wrap items-center gap-2">
241
+ <Input
242
+ size="sm"
243
+ type="search"
244
+ aria-label="Search payments"
245
+ placeholder="Search payments"
246
+ leadingIcon={<MagnifierIcon />}
247
+ className="min-w-40 flex-1"
248
+ />
249
+ <Select items={STATUSES} defaultValue="all">
250
+ <SelectTrigger size="sm" aria-label="Status" className="w-40">
251
+ <SelectValue />
252
+ </SelectTrigger>
253
+ <SelectContent />
254
+ </Select>
255
+ <Button size="sm" variant="secondary">
256
+ Reset
257
+ </Button>
258
+ </div>
259
+ );
260
+ }
261
+ ```
262
+
222
263
  ### input/country-lookup
223
264
 
224
265
  ```tsx
@@ -0,0 +1,182 @@
1
+ # Invoice Document
2
+
3
+ An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,
4
+ at least 842 tall) with the title, status and merchant on a grey strip, the parties, the amount due,
5
+ the details, the lines and the totals, then Dodo's footer. It always draws light, as the PDF does.
6
+ Put it in a `ScaledFrame` with `width={595}` to fit it to a column.
7
+
8
+ ```tsx
9
+ import { InvoiceDocument, InvoiceOnlinePage } from "@dodopayments/ui/invoice-document";
10
+ ```
11
+
12
+ ## InvoiceDocument
13
+
14
+ An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,
15
+ at least 842 tall) with the title, status and merchant on a grey strip, the parties, the amount due,
16
+ the details, the lines and the totals, then Dodo's footer. It always draws light, as the PDF does.
17
+ Put it in a `ScaledFrame` with `width={595}` to fit it to a column.
18
+
19
+ | Prop | Type | Default | Description |
20
+ | --- | --- | --- | --- |
21
+ | `customer` (required) | `InvoiceDocumentCustomer` | - | |
22
+ | `details` (required) | `readonly [readonly InvoiceDocumentFact[], readonly InvoiceDocumentFact[]]` | - | Invoice details in two columns: the number (and payment), then the date and currency. |
23
+ | `footer` (required) | `{ disclaimer: ReactNode; copyright: ReactNode; }` | - | The disclaimer and copyright in the footer. |
24
+ | `headline` (required) | `ReactNode` | - | The amount line above the details, e.g. "$40.00 due on Nov 26, 2026". |
25
+ | `issuer` (required) | `InvoiceDocumentIssuer` | - | |
26
+ | `merchant` (required) | `InvoiceDocumentMerchant` | - | |
27
+ | `rows` (required) | `readonly InvoiceDocumentRow[]` | - | |
28
+ | `status` (required) | `{ label: ReactNode; tone: "success" \| "error" \| "neutral"; }` | - | The status pill beside the title, e.g. Unpaid in red or Paid in green. |
29
+ | `totals` (required) | `readonly InvoiceDocumentTotal[]` | - | |
30
+ | `discount` | `{ label: ReactNode; amount: ReactNode; }` | - | The discount row under the lines, e.g. "Discounts Applied “WELCOME10”" and its amount. |
31
+ | `labels` | `Partial<InvoiceDocumentLabels>` | - | |
32
+ | `payOnline` | `ReactNode` | - | The "Pay Online" link text under the headline. Leave it out on a paid invoice. |
33
+
34
+ ## InvoiceOnlinePage
35
+
36
+ The invoice email or the hosted invoice page, ported from the dashboard's invoice preview: the
37
+ merchant over a 480-wide card with the amount due, the customer (email) or the parties (hosted), a
38
+ Pay button, the order summary and the contact line. It always draws light. Put it in a
39
+ `ScaledFrame` with `width={480}` to fit it to a column.
40
+
41
+ | Prop | Type | Default | Description |
42
+ | --- | --- | --- | --- |
43
+ | `amount` (required) | `ReactNode` | - | The amount due, large. |
44
+ | `due` (required) | `ReactNode` | - | The line under the amount, e.g. "Due Nov 26, 2026". |
45
+ | `merchant` (required) | `InvoiceDocumentMerchant` | - | |
46
+ | `rows` (required) | `readonly InvoiceOnlineRow[]` | - | |
47
+ | `supportEmail` (required) | `ReactNode` | - | The address after `labels.contact`. |
48
+ | `total` (required) | `{ label: ReactNode; value: ReactNode; }` | - | The last line of the summary, e.g. "Total Due" and its amount. |
49
+ | `variant` (required) | `"email" \| "hosted"` | - | `email` is the email the customer gets; `hosted` the page where they pay. |
50
+ | `customer` | `InvoiceDocumentCustomer` | - | Email only: the customer block, as on the PDF. |
51
+ | `discount` | `{ label: ReactNode; amount: ReactNode; }` | - | |
52
+ | `facts` | `readonly InvoiceDocumentFact[]` | - | Hosted page only: label / value lines such as "Invoice to :" and "From :". |
53
+ | `from` | `ReactNode` | - | The email's line above the amount, e.g. "Invoice from Acme". Email only. |
54
+ | `labels` | `Partial<InvoiceOnlineLabels>` | - | |
55
+
56
+ ## Examples
57
+
58
+ ### invoice-document/online
59
+
60
+ ```tsx
61
+ "use client";
62
+
63
+ import { InvoiceOnlinePage } from "@dodopayments/ui/invoice-document";
64
+ import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
65
+
66
+ const rows = [
67
+ { amount: "$100.00 / mo", id: "plan", name: "Growth plan", quantity: "Qty : 1" },
68
+ { amount: "$25.00", id: "seat", name: "Extra seat", quantity: "Qty : 1" },
69
+ ];
70
+
71
+ export default function InvoiceDocumentOnline() {
72
+ return (
73
+ <div className="light grid w-full max-w-3xl gap-4 rounded-xl bg-muted px-4 py-8 sm:grid-cols-2">
74
+ <ScaledFrame width={480}>
75
+ <InvoiceOnlinePage
76
+ amount="$125.00"
77
+ customer={{ address: ["Berlin", "DE"], email: "ada@example.com", name: "Ada Lovelace" }}
78
+ due="Due Nov 16, 2026"
79
+ from="Invoice from Acme Labs"
80
+ merchant={{ name: "Acme Labs" }}
81
+ rows={rows}
82
+ supportEmail="support@dodopayments.com"
83
+ total={{ label: "Total Due", value: "$125.00" }}
84
+ variant="email"
85
+ />
86
+ </ScaledFrame>
87
+ <ScaledFrame width={480}>
88
+ <InvoiceOnlinePage
89
+ amount="$125.00"
90
+ due="Due Nov 16, 2026"
91
+ facts={[
92
+ { label: "Invoice to :", value: "Ada Lovelace" },
93
+ { label: "From :", value: "Acme Labs" },
94
+ { label: "Invoice Number :", value: "inv_0NrmhsTUbGRG" },
95
+ ]}
96
+ merchant={{ name: "Acme Labs" }}
97
+ rows={rows}
98
+ supportEmail="support@dodopayments.com"
99
+ total={{ label: "Total Due", value: "$125.00" }}
100
+ variant="hosted"
101
+ />
102
+ </ScaledFrame>
103
+ </div>
104
+ );
105
+ }
106
+ ```
107
+
108
+ ### invoice-document/pdf
109
+
110
+ ```tsx
111
+ "use client";
112
+
113
+ import { InvoiceDocument } from "@dodopayments/ui/invoice-document";
114
+ import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
115
+
116
+ export default function InvoiceDocumentPdf() {
117
+ return (
118
+ <div className="w-full max-w-xl">
119
+ <ScaledFrame width={595}>
120
+ <InvoiceDocument
121
+ customer={{
122
+ address: ["Main St 1, Berlin, 10115", "DE"],
123
+ email: "ada@example.com",
124
+ name: "Ada Lovelace",
125
+ }}
126
+ details={[
127
+ [{ label: "Invoice Number :", value: "inv_0NrmhsTUbGRG" }],
128
+ [
129
+ { label: "Invoice Date :", value: "Nov 2, 2026" },
130
+ { label: "Currency Code :", value: "USD" },
131
+ ],
132
+ ]}
133
+ discount={{ amount: "$10.00", label: "Discounts Applied “WELCOME10”" }}
134
+ footer={{
135
+ copyright: "© 2026 Dodo Payments Inc. All rights reserved.",
136
+ disclaimer:
137
+ "If you have a problem with your order (example: don’t recognize the charge, suspect a fraudulent transaction, etc,) please visit dodopayments.com",
138
+ }}
139
+ headline="$115.00 due on Nov 16, 2026"
140
+ issuer={{
141
+ address: "8 The Green, STE A, Dover, Country of Kent, Delaware, 19901 United States",
142
+ name: "Dodo Payments Inc",
143
+ taxId: "993486577",
144
+ }}
145
+ merchant={{ name: "Acme Labs" }}
146
+ payOnline="Pay Online"
147
+ rows={[
148
+ {
149
+ amount: "$100.00",
150
+ details: ["Nov 2 - Dec 2, 2026"],
151
+ id: "plan",
152
+ name: "Growth plan",
153
+ quantity: 1,
154
+ tax: "$0.00",
155
+ taxPercent: "-",
156
+ unitPrice: "$100.00 / mo",
157
+ },
158
+ {
159
+ addOn: true,
160
+ amount: "$25.00",
161
+ id: "seat",
162
+ name: "Extra seat",
163
+ quantity: 1,
164
+ tax: "$0.00",
165
+ taxPercent: "-",
166
+ unitPrice: "$25.00",
167
+ },
168
+ ]}
169
+ status={{ label: "Unpaid", tone: "error" }}
170
+ totals={[
171
+ { label: "Subtotal", value: "$115.00" },
172
+ { label: "Total Tax", value: "$0.00" },
173
+ { label: "Total", value: "$115.00" },
174
+ { label: "Amount Due", strong: true, value: "$115.00" },
175
+ ]}
176
+ />
177
+ </ScaledFrame>
178
+ </div>
179
+ );
180
+ }
181
+ ```
182
+
@@ -71,7 +71,7 @@ the chart loads it draws the loading pulse or sweep.
71
71
  | `onLoadingPulseCycleComplete` | `(() => void)` | - | Called when a loop-mode pulse cycle completes. |
72
72
  | `showHighlight` | `boolean` | - | Whether to show highlight segment on hover. Default: true, false for `variant="comparison"` |
73
73
  | `showMarkers` | `boolean` | - | Render scatter-style circle markers at each data point. Default: false |
74
- | `stroke` | `string` | - | Stroke color. Default: var(--chart-1), or var(--chart-comparison) for `variant="comparison"` |
74
+ | `stroke` | `string` | - | Stroke color. Default: var(--chart-solid-1), or var(--chart-comparison) for `variant="comparison"` |
75
75
  | `strokeWidth` | `number` | - | Stroke width. Default: 2 |
76
76
  | `variant` | `"default" \| "comparison"` | - | `"default"` draws the metric as a solid line. `"comparison"` draws the period it is compared with (the previous period) as a dashed `--chart-comparison` line with no hover highlight, as the dashboard does. Default: `"default"`. |
77
77
  | `yAxisId` | `string \| number` | - | Y-scale group id (Recharts `yAxisId`). Default: `"left"`. |
@@ -381,7 +381,7 @@ export default function LineChartDefault() {
381
381
  title="Gross volume"
382
382
  rows={(point) => [
383
383
  {
384
- color: "var(--chart-1)",
384
+ color: "var(--chart-solid-1)",
385
385
  label: shortDate.format(point.date as Date),
386
386
  value: money.format(point.current as number),
387
387
  },
@@ -31,7 +31,7 @@ without animation.
31
31
  | `onError` | `((error: unknown) => void)` | - | Called with the error when `onLoad` fails. |
32
32
  | `rootMargin` | `string` | `"600px 0px"` | How far ahead of the viewport an automatic load starts (IntersectionObserver `rootMargin`). |
33
33
  | `rootRef` | `RefObject<Element \| null>` | - | The scroll container to observe. Defaults to the viewport. |
34
- | `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
34
+ | `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
35
35
  | `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
36
36
 
37
37
  ## useLoadMore
@@ -19,7 +19,7 @@ image named "Dodo Payments" unless `decorative` hides it from assistive technolo
19
19
  | `aria-label` | `string` | `"Dodo Payments"` | Accessible name. An empty or whitespace-only value falls back to the default. |
20
20
  | `className` | `string` | - | Layout utilities only: margin, position, inset and translate, z-index, display (`hidden`, `block`, `flex`, `inline-block`, `inline-flex`), visibility, order, self-alignment and grid placement, with any responsive or state variant. Every other class (padding, colour, size, opacity, filters) is dropped, and so is any class behind a `*:`, `**:` or arbitrary `[...]:` variant, so the clear space, colours and artwork size stay intact. |
21
21
  | `decorative` | `boolean` | `false` | Hides the logo from assistive technology. Use it when visible text next to the logo already says "Dodo Payments". Cannot be combined with `aria-label`. |
22
- | `size` | `"xs" \| "sm" \| "md" \| "lg"` | `"md"` | `xs`: 16px tall artwork with 4px clear space on every side. The smallest size, for a line of small text such as "Secure checkout by".<br>`sm`: 24px tall artwork with 6px clear space on every side.<br>`md`: 32px tall artwork with 8px clear space on every side.<br>`lg`: 48px tall artwork with 12px clear space on every side. |
22
+ | `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg"` | `"md"` | `2xs`: 12px tall artwork with 2px clear space on every side. Only for print-sized text, such as an invoice footer.<br>`xs`: 16px tall artwork with 4px clear space on every side. For a line of small text such as "Secure checkout by".<br>`sm`: 24px tall artwork with 6px clear space on every side.<br>`md`: 32px tall artwork with 8px clear space on every side.<br>`lg`: 48px tall artwork with 12px clear space on every side. |
23
23
  | `tone` | `"auto" \| "light" \| "dark"` | `"auto"` | `auto`: Follows the theme: near-black wordmark in light mode, white under `.dark`.<br>`light`: Near-black wordmark in every theme, for surfaces that stay light (a white card, a light photo).<br>`dark`: White wordmark in every theme, for surfaces that stay dark (a black share card, a dark photo). |
24
24
  | `variant` | `"lockup" \| "mark" \| "wordmark"` | `"lockup"` | `lockup`: Mark and wordmark side by side. The default for headers, sign-in screens and footers.<br>`mark`: The lime disc with the dodo on its own, for tight spaces such as a collapsed sidebar or an avatar.<br>`wordmark`: The "Dodo Payments" lettering without the mark. Use it only when the mark is already visible nearby. |
25
25
 
@@ -1,8 +1,8 @@
1
1
  # Menu
2
2
 
3
3
  The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,
4
- Radius/Large, 160 to 320 wide, scrolls past 320 tall. Below 640px it opens as a bottom sheet over a scrim,
5
- full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,
4
+ Radius/Large, 160 to 320 wide, scrolls past 320 tall. With `mobileSheet` it opens below 640px as a bottom sheet
5
+ over a scrim, full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,
6
6
  `MenuGroup`, `MenuSeparator` and `MenuSub`.
7
7
 
8
8
  ```tsx
@@ -12,8 +12,8 @@ import { MenuContent, Menu, MenuCheckboxItem, MenuGroup, MenuGroupLabel, MenuIte
12
12
  ## MenuContent
13
13
 
14
14
  The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,
15
- Radius/Large, 160 to 320 wide, scrolls past 320 tall. Below 640px it opens as a bottom sheet over a scrim,
16
- full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,
15
+ Radius/Large, 160 to 320 wide, scrolls past 320 tall. With `mobileSheet` it opens below 640px as a bottom sheet
16
+ over a scrim, full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,
17
17
  `MenuGroup`, `MenuSeparator` and `MenuSub`.
18
18
 
19
19
  | Prop | Type | Default | Description |
@@ -23,7 +23,7 @@ full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckbox
23
23
  | `anchor` | `Element \| VirtualElement \| RefObject<Element \| null> \| (() => Element \| VirtualElement \| null) \| null` | - | Element to position against instead of the trigger. |
24
24
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
25
25
  | `collisionAvoidance` | `CollisionAvoidance` | - | How the menu avoids the viewport edges (flip, shift); `{ side: "none", align: "none" }` keeps it in place. |
26
- | `mobileSheet` | `boolean` | `true` | Below 640px the menu opens as a bottom sheet (Figma Menu › Responsive). Set `false` to keep the popover, e.g. for a menu inside a sheet. |
26
+ | `mobileSheet` | `boolean` | `false` | Below 640px, open the menu as a bottom sheet over a scrim, full width (Figma Menu › Responsive). Off by default: the menu stays a popover on its trigger at every width. |
27
27
  | `portalProps` | `MenuPortalProps` | - | Props of the portal, e.g. `container` to render the menu inside an element. |
28
28
  | `positionMethod` | `"fixed" \| "absolute"` | - | How the popup is positioned: `fixed` to the viewport (default) or `absolute` inside its portal container. |
29
29
  | `positionerStyle` | `CSSProperties` | - | Style of the positioner, applied over the computed position: e.g. `{ position: "relative", transform: "none" }` lays a menu that is always open into the page flow (as the docs show one). |
@@ -142,18 +142,19 @@ Also accepts Base UI props: `actionsRef`, `closeParentOnEsc`, `defaultOpen`, `di
142
142
 
143
143
  ## MenuSubContent
144
144
 
145
- The nested list. Opens beside its `MenuSubTrigger`, aligned with the trigger row. Below 640px it opens as a bottom
146
- sheet over its parent, with a Back row (`backLabel`) that closes only the submenu.
145
+ The nested list. Opens beside its `MenuSubTrigger`, aligned with the trigger row. With `mobileSheet` (set it on the
146
+ parent `MenuContent` too) it opens below 640px as a bottom sheet over its parent, with a Back row (`backLabel`)
147
+ that closes only the submenu.
147
148
 
148
149
  | Prop | Type | Default | Description |
149
150
  | --- | --- | --- | --- |
150
151
  | `align` | `Align` | `"center" (submenus `"start"`)` | Alignment against the trigger. |
151
152
  | `alignOffset` | `number` | - | Offset along the alignment axis in px. |
152
153
  | `anchor` | `Element \| VirtualElement \| RefObject<Element \| null> \| (() => Element \| VirtualElement \| null) \| null` | - | Element to position against instead of the trigger. |
153
- | `backLabel` | `string` | - | Text of the row that returns to the parent menu. Below 640px the submenu opens as a bottom sheet over its parent and starts with this row. Defaults to the `back` message of the `LocaleProvider` ("Back" in English). |
154
+ | `backLabel` | `string` | - | Text of the row that returns to the parent menu. With `mobileSheet`, the submenu opens below 640px as a bottom sheet over its parent and starts with this row. Defaults to the `back` message of the `LocaleProvider` ("Back" in English). |
154
155
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
155
156
  | `collisionAvoidance` | `CollisionAvoidance` | - | How the menu avoids the viewport edges (flip, shift); `{ side: "none", align: "none" }` keeps it in place. |
156
- | `mobileSheet` | `boolean` | `true` | Below 640px the menu opens as a bottom sheet (Figma Menu › Responsive). Set `false` to keep the popover, e.g. for a menu inside a sheet. |
157
+ | `mobileSheet` | `boolean` | `false` | Below 640px, open the menu as a bottom sheet over a scrim, full width (Figma Menu › Responsive). Off by default: the menu stays a popover on its trigger at every width. |
157
158
  | `portalProps` | `MenuPortalProps` | - | Props of the portal, e.g. `container` to render the menu inside an element. |
158
159
  | `positionMethod` | `"fixed" \| "absolute"` | - | How the popup is positioned: `fixed` to the viewport (default) or `absolute` inside its portal container. |
159
160
  | `positionerStyle` | `CSSProperties` | - | Style of the positioner, applied over the computed position: e.g. `{ position: "relative", transform: "none" }` lays a menu that is always open into the page flow (as the docs show one). |
@@ -122,7 +122,7 @@ export default function MilestoneCelebration() {
122
122
  const [open, setOpen] = useState(true);
123
123
 
124
124
  return (
125
- <div className="flex flex-col items-center gap-6">
125
+ <div className="flex w-full flex-col items-center gap-6">
126
126
  <SegmentedControl
127
127
  aria-label="Milestone category"
128
128
  value={category}
@@ -59,7 +59,7 @@ const rows = [
59
59
 
60
60
  export default function MoneyBasic() {
61
61
  return (
62
- <ul className="flex w-full max-w-sm flex-col divide-y divide-border text-sm">
62
+ <ul className="flex w-full max-w-sm flex-col divide-y divide-border text-body-primary">
63
63
  {rows.map((row) => (
64
64
  <li key={row.label} className="flex items-baseline justify-between gap-4 py-2">
65
65
  <span className="text-muted-foreground">{row.label}</span>
@@ -68,13 +68,13 @@ export default function MoneyBasic() {
68
68
  currency={row.currency}
69
69
  locale={"locale" in row ? row.locale : undefined}
70
70
  display={"display" in row ? row.display : undefined}
71
- className="font-medium"
71
+ className="text-label-primary"
72
72
  />
73
73
  </li>
74
74
  ))}
75
75
  <li className="flex items-baseline justify-between gap-4 py-2">
76
76
  <span className="text-muted-foreground">Failed charge</span>
77
- <Money minor={8900} currency="USD" status="failed" className="font-medium" />
77
+ <Money minor={8900} currency="USD" status="failed" className="text-label-primary" />
78
78
  </li>
79
79
  </ul>
80
80
  );
@@ -26,7 +26,7 @@ With reduced motion it only fades.
26
26
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
27
27
  | `formatLabel` | `((count: number) => string)` | `(count) => `${count} new items`` | Builds the text from the count. |
28
28
  | `max` | `number` | `99` | Counts above this show as `${max}+`. |
29
- | `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
29
+ | `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
30
30
  | `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
31
31
 
32
32
  ## useNewItems
@@ -18,7 +18,7 @@ after the brand unless `decorative`. Each logo loads on first use; until then it
18
18
 
19
19
  | Prop | Type | Default | Description |
20
20
  | --- | --- | --- | --- |
21
- | `brand` (required) | `"card" \| "visa" \| "mastercard" \| "amex" \| "discover" \| "diners" \| "jcb" \| "unionpay" \| "maestro" \| "rupay" \| "cartes-bancaires" \| "apple-pay" \| "gpay" \| "amazon-pay" \| "cash-app" \| "paypal" \| "revolut-pay" \| "satispay" \| "wechat-pay" \| "alipay-hk" \| "kakao-pay" \| "naver-pay" \| "payco" \| "gcash" \| "touch-n-go" \| "twint" \| "bizum" \| "upi" \| "ideal" \| "bancontact" \| "eps" \| "multibanco" \| "pix" \| "blik" \| "przelewy24" \| "fps" \| "ach" \| "sepa" \| "bacs" \| "klarna" \| "afterpay" \| "affirm" \| "zip" \| "billie" \| "stablecoins" \| "unknown"` | - | The payment method. `unknown` draws a credit card icon for methods without artwork. |
21
+ | `brand` (required) | `"link" \| "card" \| "visa" \| "mastercard" \| "amex" \| "discover" \| "diners" \| "jcb" \| "unionpay" \| "maestro" \| "rupay" \| "cartes-bancaires" \| "apple-pay" \| "gpay" \| "amazon-pay" \| "cash-app" \| "paypal" \| "revolut-pay" \| "satispay" \| "wechat-pay" \| "alipay-hk" \| "kakao-pay" \| "naver-pay" \| "payco" \| "gcash" \| "touch-n-go" \| "twint" \| "bizum" \| "upi" \| "ideal" \| "bancontact" \| "eps" \| "multibanco" \| "pix" \| "blik" \| "przelewy24" \| "fps" \| "ach" \| "sepa" \| "bacs" \| "klarna" \| "afterpay" \| "affirm" \| "zip" \| "billie" \| "stablecoins" \| "unknown"` | - | The payment method. `unknown` draws a credit card icon for methods without artwork. |
22
22
  | `decorative` | `boolean` | - | Hide from assistive technology when the text next to it already names the method. |
23
23
 
24
24
  ## Flag
@@ -56,7 +56,7 @@ fade. The hover index drives `PieCenter` and a linked `Legend`.
56
56
  | `hoverEffect` | `PieSliceHoverEffect` | - | Hover effect type. Default: "translate" - "translate": Slice moves outward along its radial axis - "grow": Slice extends its outer radius (gets longer) - "none": No hover animation |
57
57
  | `hoverOffset` | `number` | - | Distance in pixels for hover effect (translate distance or grow amount). Defaults to PieChart's hoverOffset |
58
58
  | `showGlow` | `boolean` | - | Show glow effect on hover. Default: true |
59
- | `variant` | `"tint" \| "solid"` | - | `"tint"`: the bar charts' look, an opaque 20% wash of the colour (mixed into the card) with a solid 3px arc on the outer rim. `"solid"`: the full colour. A gradient or pattern `fill` stays solid. Default: "tint" |
59
+ | `variant` | `"tint" \| "solid"` | - | `"solid"`: the full colour, as the bars. `"tint"`: an opaque 20% wash of the colour (mixed into the card) with a solid 3px arc on the outer rim. A gradient or pattern `fill` stays solid. Default: "solid" |
60
60
 
61
61
  ## PieCenter
62
62
 
@@ -193,11 +193,20 @@ const revenue: PieData[] = [
193
193
  const total = revenue.reduce((sum, row) => sum + row.value, 0);
194
194
  const usd = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", maximumFractionDigits: 0 });
195
195
 
196
+ // The pie's default slice colours, in order: the bars' solid series, then the chart palette.
197
+ const sliceColors = [
198
+ "var(--chart-solid-1)",
199
+ "var(--chart-solid-2)",
200
+ "var(--chart-solid-3)",
201
+ "var(--chart-4)",
202
+ "var(--chart-5)",
203
+ ];
204
+
196
205
  const legendItems: LegendItemData[] = revenue.map((row, index) => ({
197
206
  label: row.label,
198
207
  value: row.value,
199
208
  maxValue: total,
200
- color: `var(--chart-${index + 1})`,
209
+ color: sliceColors[index % sliceColors.length] ?? "var(--chart-solid-1)",
201
210
  }));
202
211
 
203
212
  export default function PieChartDonut() {
@@ -24,6 +24,7 @@ name. It rises from the trigger side as it opens.
24
24
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
25
25
  | `collisionAvoidance` | `CollisionAvoidance` | - | How the popover avoids the viewport edges (Base UI). Pass `{ side: "none" }` to never flip. |
26
26
  | `collisionPadding` | `Padding` | `5` | Space in px to keep between the popover and the edges of the viewport. When the popover does not fit on `side`, it flips to the opposite side and then shifts along the edge. |
27
+ | `mobileSheet` | `boolean` | `false` | Below 640px, open as a bottom sheet over a scrim, full width, as Menu and Select can. Off by default: turn it on for a panel without text fields (notifications, a list of choices). A sheet sits at the bottom edge, where the software keyboard would cover a field; for a form on a phone, use a `Dialog` or a `Drawer`. |
27
28
  | `portalProps` | `PopoverPortalProps` | - | Props of the portal, e.g. `container` to render the popover inside an element. |
28
29
  | `positionMethod` | `"fixed" \| "absolute"` | - | How the popover is positioned: `absolute` (default) or `fixed` (Base UI). |
29
30
  | `side` | `Side` | `"bottom"` | |
@@ -253,7 +254,7 @@ export default function PopoverNotifications() {
253
254
  >
254
255
  <BellIcon aria-hidden="true" />
255
256
  </PopoverTrigger>
256
- <PopoverContent size="lg">
257
+ <PopoverContent size="lg" mobileSheet>
257
258
  <PopoverHeader
258
259
  actions={
259
260
  <>
@@ -29,6 +29,7 @@ move without animation.
29
29
  | `value` (required) | `readonly T[]` | - | The items in their current order. |
30
30
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
31
31
  | `disabled` | `boolean` | - | Turns off dragging and keyboard moves. |
32
+ | `interactive` | `boolean` | - | Rows hold their own controls, such as a switch or a menu. Their content stays readable by assistive technology, a key pressed on a control does not grab the row, and a row drags only from its handle, so a click on a control never starts a drag. |
32
33
  | `onValueCommitted` | `((next: T[]) => void)` | - | Called with the final order when a drag or a keyboard move ends. |
33
34
 
34
35
  ## useReorderList
@@ -90,7 +91,7 @@ export default function ReorderListBasic() {
90
91
  >
91
92
  {(m) => (
92
93
  <div className="flex items-center justify-between gap-3">
93
- <span className="font-medium">{m.name}</span>
94
+ <span className="text-label-primary">{m.name}</span>
94
95
  <span className="truncate text-body-secondary text-muted-foreground">{m.detail}</span>
95
96
  </div>
96
97
  )}
@@ -144,3 +145,47 @@ export default function ReorderListCommit() {
144
145
  }
145
146
  ```
146
147
 
148
+ ### reorder-list/interactive
149
+
150
+ ```tsx
151
+ "use client";
152
+
153
+ import { ReorderList } from "@dodopayments/ui/reorder-list";
154
+ import { Switch } from "@dodopayments/ui/switch";
155
+ import { useState } from "react";
156
+
157
+ const PLANS = [
158
+ { id: "monthly", name: "Pro monthly", on: true },
159
+ { id: "annual", name: "Pro annual", on: true },
160
+ { id: "lifetime", name: "Lifetime", on: false },
161
+ ];
162
+
163
+ export default function ReorderListInteractive() {
164
+ const [plans, setPlans] = useState(PLANS);
165
+
166
+ return (
167
+ <ReorderList
168
+ aria-label="Plans at checkout"
169
+ className="max-w-sm"
170
+ interactive
171
+ value={plans}
172
+ getKey={(p) => p.id}
173
+ getLabel={(p) => p.name}
174
+ onValueChange={setPlans}
175
+ >
176
+ {(p) => (
177
+ <label className="flex items-center justify-between gap-3">
178
+ <span className="text-label-primary">{p.name}</span>
179
+ <Switch
180
+ checked={p.on}
181
+ onCheckedChange={(on) => {
182
+ setPlans((all) => all.map((x) => (x.id === p.id ? { ...x, on } : x)));
183
+ }}
184
+ />
185
+ </label>
186
+ )}
187
+ </ReorderList>
188
+ );
189
+ }
190
+ ```
191
+
@@ -42,9 +42,9 @@ loads. Without `size` the chart is a square as wide as its container. Link a `Le
42
42
 
43
43
  ## Ring
44
44
 
45
- One ring of a `RingChart`: a grey track and a progress arc for the data row at `index` (by default a light `--muted`
46
- track and a 25% wash of the ring's colour with a solid end cap; `variant="solid"` for a `--border` track and a solid
47
- arc). The
45
+ One ring of a `RingChart`: a grey track and a progress arc for the data row at `index` (by default a `--border`
46
+ track and a solid arc, as the bars; `variant="tint"` for a light `--muted` track and a 25% wash of the ring's colour
47
+ with a solid end cap). The
48
48
  track scales in, then the arc fills. On hover the ring grows a little, the outer rings move out and
49
49
  the other rings fade; the hover index drives `RingCenter` and a linked `Legend`.
50
50
 
@@ -52,10 +52,10 @@ the other rings fade; the hover index drives `RingCenter` and a linked `Legend`.
52
52
  | --- | --- | --- | --- |
53
53
  | `index` (required) | `number` | - | Index of the ring in the `RingChart` data, 0 = innermost. |
54
54
  | `animate` | `boolean` | - | Animate the ring on mount. Default: true |
55
- | `color` | `string` | - | Color override. Falls back to the row's `color`, then to `--chart-1..5`. |
55
+ | `color` | `string` | - | Color override. Falls back to the row's `color`, then to `--chart-solid-1..3` and `--chart-4..5`. |
56
56
  | `lineCap` | `RingLineCap` | - | End cap of the progress arc (`variant="solid"`). Default: "round" |
57
57
  | `showGlow` | `boolean` | - | Show a glow in the ring color on hover. Default: true |
58
- | `variant` | `"tint" \| "solid"` | - | `"tint"`: the toned-down look of the other charts, a light grey `--muted` track for what is not covered yet, the progress as a 25% wash of the ring's colour (mixed into the card) and a solid 3px cap where it ends. `"solid"`: a `--border` track and a solid arc. Default: "tint" |
58
+ | `variant` | `"tint" \| "solid"` | - | `"solid"`: a `--border` track and a solid arc, as the bars. `"tint"`: a light grey `--muted` track for what is not covered yet, the progress as a 25% wash of the ring's colour (mixed into the card) and a solid 3px cap where it ends. Default: "solid" |
59
59
 
60
60
  ## RingCenter
61
61
 
@@ -191,11 +191,20 @@ const countries: RingData[] = [
191
191
 
192
192
  const usd = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", notation: "compact" });
193
193
 
194
+ // The ring's default colours, in order: the bars' solid series, then the chart palette.
195
+ const ringColors = [
196
+ "var(--chart-solid-1)",
197
+ "var(--chart-solid-2)",
198
+ "var(--chart-solid-3)",
199
+ "var(--chart-4)",
200
+ "var(--chart-5)",
201
+ ];
202
+
194
203
  const legendItems: LegendItemData[] = countries.map((row, index) => ({
195
204
  label: row.label,
196
205
  value: row.value,
197
206
  maxValue: row.maxValue,
198
- color: `var(--chart-${index + 1})`,
207
+ color: ringColors[index % ringColors.length] ?? "var(--chart-solid-1)",
199
208
  }));
200
209
 
201
210
  export default function RingChartLegend() {
@@ -224,11 +233,11 @@ export default function RingChartLegend() {
224
233
  className="w-full max-w-64"
225
234
  >
226
235
  <LegendItem className="grid grid-cols-[auto_1fr_auto] items-center gap-x-3 gap-y-1">
227
- <LegendMarker variant="bar" />
236
+ <LegendMarker />
228
237
  <LegendLabel />
229
238
  <LegendValue formatValue={(value) => usd.format(value)} showPercentage />
230
239
  <div className="col-span-full">
231
- <LegendProgress variant="tint" />
240
+ <LegendProgress />
232
241
  </div>
233
242
  </LegendItem>
234
243
  </Legend>
@@ -0,0 +1,48 @@
1
+ # Sale share card
2
+
3
+ A new sale as an image to share (the dashboard's payments list, Share): 720 by 400, the artwork behind, the
4
+ business chip, a headline and the amount in the brand lime with a dark outline. Always light, whatever the theme,
5
+ so the saved picture looks the same. Capture this element at its own size, and preview it in a `ScaledFrame`.
6
+
7
+ ```tsx
8
+ import { SaleShareCard } from "@dodopayments/ui/sale-share-card";
9
+ ```
10
+
11
+ ## SaleShareCard
12
+
13
+ A new sale as an image to share (the dashboard's payments list, Share): 720 by 400, the artwork behind, the
14
+ business chip, a headline and the amount in the brand lime with a dark outline. Always light, whatever the theme,
15
+ so the saved picture looks the same. Capture this element at its own size, and preview it in a `ScaledFrame`.
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `amount` (required) | `string` | - | The sale, formatted, e.g. "$1,234.56". It shrinks to fit the card. |
20
+ | `background` (required) | `string` | - | The artwork behind the card, an image URL. Decorative. |
21
+ | `headline` (required) | `ReactNode` | - | The line above the amount, e.g. "Cha-ching! A new sale is in". |
22
+ | `business` | `SaleShareBusiness` | - | The business chip at the top. Leave it out when the merchant turns off "Include business and logo"; the card keeps its size so the shared image is always 720 by 400. |
23
+ | `className` | `string` | - | Additional Tailwind classes, merged last. |
24
+
25
+ ## Examples
26
+
27
+ ### sale-share-card/master
28
+
29
+ ```tsx
30
+ "use client";
31
+
32
+ import { SaleShareCard } from "@dodopayments/ui/sale-share-card";
33
+ import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
34
+
35
+ export default function SaleShareCardDemo() {
36
+ return (
37
+ <ScaledFrame width={720} height={400} className="max-w-180">
38
+ <SaleShareCard
39
+ amount="$1,234.56"
40
+ headline="Cha-ching! A new sale is in"
41
+ background="/samples/sale-share-lagoon.webp"
42
+ business={{ name: "Incubix" }}
43
+ />
44
+ </ScaledFrame>
45
+ );
46
+ }
47
+ ```
48
+