@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
@@ -5,10 +5,10 @@ band as wide as its value. Use it to show where an amount goes, e.g. gross volum
5
5
  refunds and payouts. Compose it from children: `SankeyLink` (the bands), `SankeyNode` (the bars
6
6
  and their labels) and `SankeyTooltip`. `data` is `{ nodes, links }`: each node has a `name`, each
7
7
  link a `source` and `target` node index and a `value`. Nodes and bands grow in on mount over
8
- `animationDuration`. Nodes and bands use the tint look of the other charts by default (nodes a 20%
9
- wash with a solid edge on their label side, bands a lighter 12% wash in their source node's colour, 24% while
10
- highlighted); set
11
- `variant="solid"` on `SankeyLink` / `SankeyNode` for full colour. The chart is as wide as its container; height comes from `aspectRatio`
8
+ `animationDuration`. Nodes and bands are solid by default: nodes in full colour, each band its source node's
9
+ colour at 35% opacity, so crossing bands blend; set `useGradient` on `SankeyLink` for a source-to-target gradient.
10
+ `variant="tint"` on `SankeyLink` / `SankeyNode` gives the tint look of the other charts (nodes a 20% wash with a
11
+ solid edge on their label side, bands a 12% wash, 24% while highlighted). The chart is as wide as its container; height comes from `aspectRatio`
12
12
  (default `"2 / 1"`). The default `margin` keeps 180px on each side for node labels.
13
13
 
14
14
  ```tsx
@@ -22,10 +22,10 @@ band as wide as its value. Use it to show where an amount goes, e.g. gross volum
22
22
  refunds and payouts. Compose it from children: `SankeyLink` (the bands), `SankeyNode` (the bars
23
23
  and their labels) and `SankeyTooltip`. `data` is `{ nodes, links }`: each node has a `name`, each
24
24
  link a `source` and `target` node index and a `value`. Nodes and bands grow in on mount over
25
- `animationDuration`. Nodes and bands use the tint look of the other charts by default (nodes a 20%
26
- wash with a solid edge on their label side, bands a lighter 12% wash in their source node's colour, 24% while
27
- highlighted); set
28
- `variant="solid"` on `SankeyLink` / `SankeyNode` for full colour. The chart is as wide as its container; height comes from `aspectRatio`
25
+ `animationDuration`. Nodes and bands are solid by default: nodes in full colour, each band its source node's
26
+ colour at 35% opacity, so crossing bands blend; set `useGradient` on `SankeyLink` for a source-to-target gradient.
27
+ `variant="tint"` on `SankeyLink` / `SankeyNode` gives the tint look of the other charts (nodes a 20% wash with a
28
+ solid edge on their label side, bands a 12% wash, 24% while highlighted). The chart is as wide as its container; height comes from `aspectRatio`
29
29
  (default `"2 / 1"`). The default `margin` keeps 180px on each side for node labels.
30
30
 
31
31
  | Prop | Type | Default | Description |
@@ -46,8 +46,8 @@ highlighted); set
46
46
  ## SankeyLink
47
47
 
48
48
  The flow bands of a Sankey diagram, one per link, drawn from left to right on mount. By default
49
- (`variant="tint"`) each band is a soft wash of its source node's colour; `variant="solid"` draws a
50
- gradient from the source colour to the target colour. Hovering a band highlights it and feeds
49
+ (`variant="solid"`) each band is its source node's colour at 35% opacity; `useGradient` runs it
50
+ from the source colour to the target colour, and `variant="tint"` draws an opaque soft wash. Hovering a band highlights it and feeds
51
51
  `SankeyTooltip`.
52
52
 
53
53
  | Prop | Type | Default | Description |
@@ -57,29 +57,29 @@ gradient from the source colour to the target colour. Hovering a band highlights
57
57
  | `getLinkPattern` | `((link: SankeyLink<SankeyNodeDatum, SankeyLinkDatum>, index: number) => string \| null \| undefined)` | - | Return pattern ID for a link, or null/undefined to use gradient/solid color |
58
58
  | `getNodeColor` | `((node: SankeyNode<SankeyNodeDatum, SankeyLinkDatum>, index: number) => string)` | - | Custom function to get node color (for gradient) |
59
59
  | `patterns` | `ReactNode` | - | Pattern definitions to render in defs. Use |
60
- | `stroke` | `string` | - | Stroke color for links (overrides gradient). Default: uses gradient |
61
- | `strokeOpacity` | `number` | - | Stroke opacity of the `"solid"` look. Default: 0.5 |
62
- | `useGradient` | `boolean` | - | Use gradient from source to target color. Default: true |
63
- | `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look of the other charts, each band an opaque 12% wash of one colour (its source node's, or `stroke` / `getLinkColor`), 24% while highlighted, lighter than the 20% nodes so they stand out; no gradient between two hues. `"solid"`: the full colour at `strokeOpacity`, a source-to-target gradient by default. A pattern from `getLinkPattern` stays as it is. Default: "tint" |
60
+ | `stroke` | `string` | - | Stroke color for every link (overrides the source colour and the gradient). |
61
+ | `strokeOpacity` | `number` | - | Stroke opacity of the `"solid"` look. Default: 0.35 |
62
+ | `useGradient` | `boolean` | - | `"solid"` only: a gradient from the source to the target colour instead of the source colour. Default: false |
63
+ | `variant` | `"tint" \| "solid"` | - | `"solid"`: each band its source node's colour (or `stroke` / `getLinkColor`) at `strokeOpacity`, translucent so crossing bands blend, as the bar, pie and ring charts' solid look. `"tint"`: each band an opaque 12% wash of that colour, 24% while highlighted. A pattern from `getLinkPattern` stays as it is. Default: "solid" |
64
64
 
65
65
  ## SankeyNode
66
66
 
67
67
  The node bars of a Sankey diagram, with a name and a value label beside each. Nodes on the left
68
- half label to their left, the others to their right. By default (`variant="tint"`) each node is a
69
- soft wash of its colour with a solid edge on its label side; `variant="solid"` fills it fully. Hovering a node highlights its links and
68
+ half label to their left, the others to their right. By default (`variant="solid"`) each node is
69
+ its full colour; `variant="tint"` draws a soft wash with a solid edge on its label side. Hovering a node highlights its links and
70
70
  feeds `SankeyTooltip`.
71
71
 
72
72
  | Prop | Type | Default | Description |
73
73
  | --- | --- | --- | --- |
74
74
  | `fadedOpacity` | `number` | - | Opacity when another node/link is hovered. Default: 0.4 |
75
- | `fill` | `string` | - | Fill color for nodes. Default: uses theme colors |
75
+ | `fill` | `string` | - | Fill color for every node. Default: `--chart-solid-1` to `--chart-solid-3`, then `--chart-4` and `--chart-5`, by node |
76
76
  | `formatValue` | `((value: number) => string)` | - | Formats the value label under each node name. Default: integer with thousands separators. |
77
77
  | `getNodeColor` | `((node: SankeyNode<SankeyNodeDatum, SankeyLinkDatum>, index: number) => string)` | - | Custom node color function |
78
78
  | `labelOrientation` | `SankeyLabelOrientation` | - | Label reading direction for outside node labels. - "horizontal": labels sit left/right of nodes (default). - "vertical": labels rotate 90° and read along the node edge. |
79
79
  | `lineCap` | `number` | - | Corner radius for nodes. Default: 4 |
80
80
  | `showLabels` | `boolean` | - | Show node labels. Default: true |
81
81
  | `showValueLabels` | `boolean` | - | Show value labels under node names. Default: true |
82
- | `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look of the other charts, each node an opaque 20% wash of its colour with a solid 3px edge on its label side. `"solid"`: the full colour. Default: "tint" |
82
+ | `variant` | `"tint" \| "solid"` | - | `"solid"`: the full colour, as the bar, pie and ring charts. `"tint"`: an opaque 20% wash of the colour with a solid 3px edge on its label side. Default: "solid" |
83
83
 
84
84
  ## SankeyTooltip
85
85
 
@@ -147,8 +147,8 @@ export default function SankeyChartCheckout() {
147
147
  aspectRatio="16 / 9"
148
148
  margin={{ top: 16, right: 96, bottom: 16, left: 96 }}
149
149
  >
150
- <SankeyLink stroke="var(--chart-1)" />
151
- <SankeyNode fill="var(--chart-1)" />
150
+ <SankeyLink stroke="var(--chart-solid-1)" />
151
+ <SankeyNode fill="var(--chart-solid-1)" />
152
152
  <SankeyTooltip nodeValueLabel="Sessions" linkValueLabel="Sessions" />
153
153
  </SankeyChart>
154
154
  );
@@ -192,13 +192,13 @@ const data: SankeyData = {
192
192
  };
193
193
 
194
194
  const COLORS: Record<string, string> = {
195
- "Gross volume": "var(--chart-1)",
195
+ "Gross volume": "var(--chart-solid-1)",
196
196
  "Processing fees": "var(--muted-foreground)",
197
197
  Refunds: "var(--chart-negative)",
198
- "Net volume": "var(--chart-2)",
198
+ "Net volume": "var(--chart-solid-2)",
199
199
  };
200
200
 
201
- const nodeColor = (node: { name: string }) => COLORS[node.name] ?? "var(--chart-3)";
201
+ const nodeColor = (node: { name: string }) => COLORS[node.name] ?? "var(--chart-solid-3)";
202
202
 
203
203
  const usdCompact = new Intl.NumberFormat("en-US", {
204
204
  style: "currency",
@@ -16,8 +16,8 @@ it up. The content stays a live page; put a cover over it when it should not tak
16
16
 
17
17
  | Prop | Type | Default | Description |
18
18
  | --- | --- | --- | --- |
19
- | `height` (required) | `number` | - | The height the content is laid out at, in px. |
20
19
  | `width` (required) | `number` | - | The width the content is laid out at, in px, e.g. 1280 for a desktop page. |
20
+ | `height` | `number` | - | The height the content is laid out at, in px. Leave it out for content that sets its own height, such as a document page that grows with its lines: the frame then follows it, scaled. The height is measured in the browser, so server-rendered HTML has a 0 tall frame until it hydrates. |
21
21
 
22
22
  ## Examples
23
23
 
@@ -1,6 +1,6 @@
1
1
  # Select
2
2
 
3
- The field (Figma `container`) that opens the list: put a `SelectValue` inside. One size, 36; the caret turns up
3
+ The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size="sm"`; the caret turns up
4
4
  while the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant="compact"` is a
5
5
  borderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).
6
6
 
@@ -10,7 +10,7 @@ import { SelectTrigger, Select, SelectContent, SelectGroup, SelectGroupLabel, Se
10
10
 
11
11
  ## SelectTrigger
12
12
 
13
- The field (Figma `container`) that opens the list: put a `SelectValue` inside. One size, 36; the caret turns up
13
+ The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size="sm"`; the caret turns up
14
14
  while the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant="compact"` is a
15
15
  borderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).
16
16
 
@@ -18,6 +18,7 @@ borderless 32 trigger that hugs its value, for a language or currency switcher (
18
18
  | --- | --- | --- | --- |
19
19
  | `className` | `string` | - | With `multiple` the trigger is the chips field (a box, not a button): `ref`, handlers and data props go to it, and `render` / `nativeButton` do not apply. |
20
20
  | `icon` | `ReactNode` | - | An icon before the value (Figma "Show leading icon"), e.g. a Nucleo icon for an integration select, a globe for a language switcher or a `Flag` for a currency (a Flag keeps its 20 × 14). |
21
+ | `size` | `"default" \| "sm"` | `"default"` | `default`: 36 tall (40 below `sm`), as in Figma. The default.<br>`sm`: 28 tall (32 below `sm`): a compact trigger in a dense toolbar or a table filter row, next to an `sm` Input or Button. Not a Figma size. The chips field of `multiple` and the `compact` variant keep their height. |
21
22
  | `variant` | `"default" \| "compact"` | `"default"` | `default`: The field: 36 tall, full width, Border/Primary. The default.<br>`compact`: A borderless trigger that hugs a short value, 32 tall: a flag and "USD", a globe and "EN", for language and currency switchers in a header or footer. Labels/Secondary, a 12px caret, Surface/Hover on hover and while open. |
22
23
 
23
24
  Also accepts Base UI props: `disabled`, `nativeButton`, `render`.
@@ -47,6 +48,7 @@ at most 320 tall, then it scrolls. Holds `SelectItem`, `SelectGroup`, `SelectGro
47
48
  | `alignItemWithTrigger` | `boolean` | `false` | Overlap the selected item with the trigger, as the primitive does. Off by default: the list opens below the field. |
48
49
  | `className` | `string` | - | Classes for the scrolling list. |
49
50
  | `emptyLabel` | `ReactNode` | `"No options"` | The disabled row shown when no option matches. |
51
+ | `mobileSheet` | `boolean` | `false` | Below 640px, open the list as a bottom sheet over a scrim, full width. Off by default: the list stays under the trigger at every width. A `searchable` or `multiple` list always stays under its field, where the software keyboard cannot cover it. |
50
52
  | `portalProps` | `SelectPortalProps` | - | Props of the portal, e.g. `container` to render the list inside an element. |
51
53
  | `positionerProps` | `SelectPositionerOptions` | - | Side, offset, alignment and anchor of the list. Default: below the field, 8 apart, start-aligned. |
52
54
  | `searchPlaceholder` | `string` | `"Search"` | Placeholder and accessible name of the search field (`searchable`). |
@@ -418,3 +420,28 @@ export default function SelectSearchable() {
418
420
  }
419
421
  ```
420
422
 
423
+ ### select/small
424
+
425
+ ```tsx
426
+ "use client";
427
+
428
+ import { Select, SelectContent, SelectTrigger, SelectValue } from "@dodopayments/ui/select";
429
+
430
+ const RANGES = [
431
+ { value: "7d", label: "Last 7 days" },
432
+ { value: "30d", label: "Last 30 days" },
433
+ { value: "90d", label: "Last 90 days" },
434
+ ];
435
+
436
+ export default function SelectSmall() {
437
+ return (
438
+ <Select items={RANGES} defaultValue="30d">
439
+ <SelectTrigger size="sm" aria-label="Date range" className="w-44">
440
+ <SelectValue />
441
+ </SelectTrigger>
442
+ <SelectContent />
443
+ </Select>
444
+ );
445
+ }
446
+ ```
447
+
@@ -142,7 +142,7 @@ export default function SetupGuideMaster() {
142
142
  ];
143
143
 
144
144
  return (
145
- <div className="flex min-h-130 flex-col items-center justify-end gap-2">
145
+ <div className="flex min-h-130 w-full flex-col items-center justify-end gap-2">
146
146
  {open && intro ? <SetupGuideIntro onDismiss={() => setIntro(false)} /> : null}
147
147
  {open ? (
148
148
  <SetupGuide items={items} defaultOpenItem="verify" onClose={() => setOpen(false)} />
@@ -160,8 +160,8 @@ Holds the sidebar state and lays out `Sidebar` next to `SidebarInset` on the gre
160
160
  once. The docked sidebar starts collapsed to the 68px icon rail; below 1024px it becomes a sheet. Cmd/Ctrl+B
161
161
  toggles it.
162
162
 
163
- Replaces the `SidebarProvider` primitive (it switches to the sheet at 800px, always writes a
164
- `cookieStore` cookie and has a fixed shortcut) but feeds the `SidebarContext` primitive, so every primitive
163
+ Replaces the `SidebarProvider` primitive (it always writes a `cookieStore` cookie and has a fixed
164
+ shortcut) but feeds the `SidebarContext` primitive, so every primitive
165
165
  sidebar part reads this state.
166
166
 
167
167
  | Prop | Type | Default | Description |
@@ -3,8 +3,9 @@
3
3
  A static metric (Dodo Nest Stat card): the label on a grey strip, the number in a white panel, and an optional
4
4
  trend chip and comparison under it. Put a `StatCardBreakdown` inside for the parts of the number (Payout balance).
5
5
  `loading` shows Skeleton lines, `empty` shows "-" and a reason, and `error` (with `onRetry`) a retry; what replaces
6
- the loading skeletons fades in. Cards in a CSS grid row (`StatGrid`) stretch to one height. Renders a `<section>`
7
- labelled by the label.
6
+ the loading skeletons fades in. Cards in a CSS grid row (`StatGrid`) stretch to one height. `layout="inline"`
7
+ drops the tray for a bare stat; a grouped `StatGrid` makes every card in it inline. Renders a `<section>` labelled by the
8
+ label.
8
9
 
9
10
  ```tsx
10
11
  import { StatCard, StatCardBreakdown, StatCardBreakdownRow, StatGrid } from "@dodopayments/ui/stat-card";
@@ -15,8 +16,9 @@ import { StatCard, StatCardBreakdown, StatCardBreakdownRow, StatGrid } from "@do
15
16
  A static metric (Dodo Nest Stat card): the label on a grey strip, the number in a white panel, and an optional
16
17
  trend chip and comparison under it. Put a `StatCardBreakdown` inside for the parts of the number (Payout balance).
17
18
  `loading` shows Skeleton lines, `empty` shows "-" and a reason, and `error` (with `onRetry`) a retry; what replaces
18
- the loading skeletons fades in. Cards in a CSS grid row (`StatGrid`) stretch to one height. Renders a `<section>`
19
- labelled by the label.
19
+ the loading skeletons fades in. Cards in a CSS grid row (`StatGrid`) stretch to one height. `layout="inline"`
20
+ drops the tray for a bare stat; a grouped `StatGrid` makes every card in it inline. Renders a `<section>` labelled by the
21
+ label.
20
22
 
21
23
  | Prop | Type | Default | Description |
22
24
  | --- | --- | --- | --- |
@@ -30,6 +32,7 @@ labelled by the label.
30
32
  | `help` | `ReactNode` | - | Explains the metric in a Tooltip on a help icon next to the label. |
31
33
  | `labelAs` | `"h2" \| "h3" \| "h4" \| "p"` | `"h3"` | Element used for the label. |
32
34
  | `labels` | `StatCardLabels` | - | Replaces some or all of the default texts. |
35
+ | `layout` | `"card" \| "inline"` | `"card"` | `card`: The Stat card: the label on a grey strip, the number in a white panel, in its own tray.<br>`inline`: A bare stat: the label (Body/Primary, Content/Secondary) over the number, with no tray or panel. For a grouped StatGrid. |
33
36
  | `loading` | `boolean` | `false` | Replace the value and the comparison with Skeleton lines and mark the card busy. |
34
37
  | `onRetry` | `(() => void)` | - | Shows a retry button in the error state. |
35
38
  | `trend` | `StatCardTrend` | - | The change: a success (up) or error (down) chip before the comparison. Show it only with a comparison. |
@@ -53,12 +56,17 @@ One label / value row of a `StatCardBreakdown`, the value at the end.
53
56
  ## StatGrid
54
57
 
55
58
  A responsive row of `StatCard`s: a `Grid` of 2, 3 or 4 equal columns, 16 apart, that stacks the cards 12 apart
56
- when narrow. Cards in a row stretch to the same height, so their panels line up.
59
+ when narrow. Cards in a row stretch to the same height, so their panels line up. `layout="group"` puts the stats
60
+ in one `Card` instead (the page summary under a page header): its cards turn inline, side by side with dividers
61
+ between them, stacked with dividers between rows when narrow.
57
62
 
58
63
  | Prop | Type | Default | Description |
59
64
  | --- | --- | --- | --- |
60
65
  | `columns` | `"2" \| "3" \| "4"` | `"3"` | `2`: Two cards per row once the grid is 28rem (448px) wide, one below.<br>`3`: Up to three cards per row: two from 28rem (448px), three from 42rem (672px).<br>`4`: Up to four cards per row: two from 28rem (448px), three from 42rem (672px), four from 56rem (896px). |
61
66
  | `gap` | `"sm" \| "md" \| "xl" \| "2xl" \| "none" \| "xs" \| "lg" \| null` | - | |
67
+ | `heading` | `ReactNode` | - | With `layout="group"`: the title on the card's strip, e.g. "Last 30 days". |
68
+ | `help` | `ReactNode` | - | With `layout="group"` and a `heading`: help text behind an info icon after it. |
69
+ | `layout` | `"cards" \| "group"` | `"cards"` | `cards`: Separate Stat cards, 16 apart (12 apart when they stack).<br>`group`: One Card tray (with an optional `heading`) whose panel lines the stats up as inline stats with dividers between them; they stack with dividers between rows when narrow. |
62
70
 
63
71
  Also accepts Base UI props: `render`.
64
72
 
@@ -100,6 +108,25 @@ export default function StatCardBasic() {
100
108
  }
101
109
  ```
102
110
 
111
+ ### stat-card/grouped
112
+
113
+ ```tsx
114
+ "use client";
115
+
116
+ import { StatCard, StatGrid } from "@dodopayments/ui/stat-card";
117
+
118
+ /** The page summary under a page header: one card, three stats side by side. */
119
+ export default function StatCardGrouped() {
120
+ return (
121
+ <StatGrid layout="group" heading="Last 30 days" className="w-full">
122
+ <StatCard label="Successful payments" value="2.2K" />
123
+ <StatCard label="Payment volume" value="$8.4M" />
124
+ <StatCard label="Failed payments" value="154" />
125
+ </StatGrid>
126
+ );
127
+ }
128
+ ```
129
+
103
130
  ### stat-card/master
104
131
 
105
132
  ```tsx
@@ -5,7 +5,8 @@ children: one `SunburstSegment` per arc of `buildArcs(data).arcs`, plus `Sunburs
5
5
  the focused total with `formatValue`, and a click zooms out), `SunburstLabels`, `SunburstBreadcrumb`
6
6
  (drill-down path, above), `SunburstLegend` (branches with value and share, beside the rings) and
7
7
  `SunburstHint` (live hint, below). `data` is a `SunburstNode` tree; leaves carry `value`. Segments are
8
- tinted washes with a solid rim, like the bar and pie charts. Click a segment with children to zoom in.
8
+ solid by default (full colour, fading by ring), like the bar and pie charts; `variant="tint"` on
9
+ `SunburstSegment` gives the wash with a solid rim. Click a segment with children to zoom in.
9
10
  The SVG is decorative and pointer-only: `SunburstLegend` rows zoom in and `SunburstBreadcrumb` buttons
10
11
  zoom out by keyboard, so keep both in the chart when focus can change. Rings reveal on mount;
11
12
  there is no loading or empty state. `size` (default 520) is the largest diameter; the chart never
@@ -22,7 +23,8 @@ children: one `SunburstSegment` per arc of `buildArcs(data).arcs`, plus `Sunburs
22
23
  the focused total with `formatValue`, and a click zooms out), `SunburstLabels`, `SunburstBreadcrumb`
23
24
  (drill-down path, above), `SunburstLegend` (branches with value and share, beside the rings) and
24
25
  `SunburstHint` (live hint, below). `data` is a `SunburstNode` tree; leaves carry `value`. Segments are
25
- tinted washes with a solid rim, like the bar and pie charts. Click a segment with children to zoom in.
26
+ solid by default (full colour, fading by ring), like the bar and pie charts; `variant="tint"` on
27
+ `SunburstSegment` gives the wash with a solid rim. Click a segment with children to zoom in.
26
28
  The SVG is decorative and pointer-only: `SunburstLegend` rows zoom in and `SunburstBreadcrumb` buttons
27
29
  zoom out by keyboard, so keep both in the chart when focus can change. Rings reveal on mount;
28
30
  there is no loading or empty state. `size` (default 520) is the largest diameter; the chart never
@@ -55,7 +57,7 @@ zooms in on click when it has children, and grows outward on hover with its ance
55
57
  | `color` | `string` | - | Optional color override |
56
58
  | `fill` | `string` | - | Optional fill override (patterns/gradients) |
57
59
  | `fillOpacity` | `number` | - | Optional fill opacity override |
58
- | `variant` | `"tint" \| "solid"` | - | `"tint"`: the bar and pie charts' look, the branch colour washed 20% into the card on every ring (35% while hovered) with a solid 3px rim on the outer edge. `"solid"`: the full colour, fading by ring. A gradient or pattern `fill` stays solid. Default: "tint" |
60
+ | `variant` | `"tint" \| "solid"` | - | `"solid"`: the full colour, fading by ring, as the bar, pie and ring charts. `"tint"`: the branch colour washed 20% into the card on every ring (35% while hovered) with a solid 3px rim on the outer edge. A gradient or pattern `fill` stays solid. Default: "solid" |
59
61
 
60
62
  ## SunburstCenter
61
63
 
@@ -83,7 +85,7 @@ hidden for unrelated branches while one is hovered. They fade in after the enter
83
85
 
84
86
  ## SunburstLegend
85
87
 
86
- The branches of a `SunburstChart` as a list beside it: a marker in the ring's tint, the name, the value and its share.
88
+ The branches of a `SunburstChart` as a list beside it: a marker in the branch colour, the name, the value and its share.
87
89
  It follows the drill-down (the focused node's children) and the hover, both ways. A row with children is a button
88
90
  that zooms in, so it is also the keyboard way into the hierarchy. Put it inside `SunburstChart`; the chart places it
89
91
  beside the rings, or under them when there is no room.
@@ -93,6 +95,7 @@ beside the rings, or under them when there is no room.
93
95
  | `className` | `string` | - | Class name of the list. |
94
96
  | `formatValue` | `((value: number) => string)` | - | Formats each row's value. Default: a whole number in the locale. |
95
97
  | `showPercentage` | `boolean` | - | Show each row's share of the focused node. Default: true |
98
+ | `variant` | `"tint" \| "solid"` | - | The marker, to match the segments: `"solid"` fills it with the branch colour; `"tint"` is a 20% wash with a solid 2px top edge. Default: "solid" |
96
99
  | `zoomInLabel` | `string` | - | Ends the accessible name of a row that zooms in ("Subscriptions, $683K, 66%, zoom in"). Default: "zoom in" |
97
100
 
98
101
  ## SunburstHint
@@ -41,6 +41,7 @@ Give it an `aria-label` describing the set of tabs.
41
41
  | --- | --- | --- | --- |
42
42
  | `activateOnFocus` | `boolean` | `true` | Activate a tab as soon as the arrow keys move focus to it, as the dashboard tabs do. Set to `false` to only move focus and activate with Enter or Space. |
43
43
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
44
+ | `size` | `"default" \| "sm"` | `"default"` | `default`: Underline tabs 36 tall, pill tabs 28, as in Figma. The default.<br>`sm`: Underline tabs 32 tall, pill tabs 24: a compact row inside a card header or a dense toolbar. Not a Figma size. Vertical tabs keep 28. |
44
45
  | `variant` | `"underline" \| "pill"` | `"underline"` | `underline`: Full-width bar with a 1px rule under the tabs and a 2px lime indicator under the active tab, fading at both ends; for page sections. Vertical lists (`orientation="vertical"`) get a 1px rail on the start side and the same fading lime bar, 2px wide.<br>`pill`: Grey track with a white active pill, for switching a range or view inside a card (7 / 30 / 90 days). |
45
46
 
46
47
  Also accepts Base UI props: `loopFocus`, `render`.
@@ -107,6 +108,44 @@ export default function TabsBasic() {
107
108
  }
108
109
  ```
109
110
 
111
+ ### tabs/compact
112
+
113
+ ```tsx
114
+ "use client";
115
+
116
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@dodopayments/ui/tabs";
117
+
118
+ export default function TabsCompact() {
119
+ return (
120
+ <div className="flex w-full max-w-md flex-col gap-6">
121
+ <Tabs defaultValue="all">
122
+ <TabsList size="sm" aria-label="Payments">
123
+ <TabsTrigger value="all">All</TabsTrigger>
124
+ <TabsTrigger value="succeeded">Succeeded</TabsTrigger>
125
+ <TabsTrigger value="failed">Failed</TabsTrigger>
126
+ </TabsList>
127
+ <TabsContent value="all" className="text-body-primary text-muted-foreground">
128
+ Every payment.
129
+ </TabsContent>
130
+ <TabsContent value="succeeded" className="text-body-primary text-muted-foreground">
131
+ Payments that went through.
132
+ </TabsContent>
133
+ <TabsContent value="failed" className="text-body-primary text-muted-foreground">
134
+ Payments that failed.
135
+ </TabsContent>
136
+ </Tabs>
137
+ <Tabs defaultValue="7d">
138
+ <TabsList variant="pill" size="sm" aria-label="Period">
139
+ <TabsTrigger value="7d">7 days</TabsTrigger>
140
+ <TabsTrigger value="30d">30 days</TabsTrigger>
141
+ <TabsTrigger value="90d">90 days</TabsTrigger>
142
+ </TabsList>
143
+ </Tabs>
144
+ </div>
145
+ );
146
+ }
147
+ ```
148
+
110
149
  ### tabs/icon-count
111
150
 
112
151
  ```tsx
@@ -37,6 +37,7 @@ tables and detail headers; use `TestModeBanner` for the page-wide notice.
37
37
  | `labels` | `Readonly<Record<string, string \| undefined>>` | - | Labels keyed by raw status, e.g. translations: `{ succeeded: "Erfolgreich" }`. Only with `status`. |
38
38
  | `layout` | `"default" \| "icon" \| null` | - | |
39
39
  | `leadingIcon` | `ReactNode` | - | An icon before the label (Figma "Show leading icon"), 12px, e.g. a clock on a session timer or a card on a payment method chip. Decorative: the label names the badge. Replaces the `dot`. |
40
+ | `size` | `"sm" \| "md" \| null` | - | |
40
41
  | `status` | `"succeeded" \| "failed" \| "cancelled" \| "expired" \| "processing" \| "requires_customer_action" \| "requires_payment_method" \| "requires_merchant_action" \| "requires_confirmation" \| "requires_capture" \| "partially_captured" \| "partially_captured_and_capturable" \| "active" \| "pending" \| "on_hold" \| "paused" \| "scheduled_for_cancellation" \| "review" \| "partial" \| "full" \| "pre_dispute" \| "dispute" \| "pre_arbitration" \| "dispute_opened" \| "dispute_expired" \| "dispute_accepted" \| "dispute_cancelled" \| "dispute_challenged" \| "dispute_won" \| "dispute_lost" \| (string & Record<never, never>) \| null` | - | Raw status from the Dodo Payments API, e.g. `succeeded`, `on_hold` or `partial`. Picks the tone and the label (`children` replaces the label, e.g. with a translation). Unknown statuses render neutral with a readable label; `null`, `""` and a passed `undefined` (`status={row.status}` with no status yet) render "No status". When it changes, the tone crossfades and the new label swaps in. |
41
42
  | `tone` | `"info" \| "success" \| "warning" \| "error" \| "violet" \| "neutral" \| "pink" \| "orange" \| null` | - | |
42
43
  | `trailingIcon` | `"info"` | - | An icon after the label. `info` is a circle-info icon; wrap the badge in a `Tooltip` to explain it. |
@@ -54,13 +55,15 @@ import { TestModeBadge, TestModeBanner } from "@dodopayments/ui/test-mode-banner
54
55
 
55
56
  export default function TestModeBannerBasic() {
56
57
  return (
57
- <div className="w-full overflow-hidden rounded-xl border">
58
+ <div className="w-full overflow-hidden rounded-xl border border-border bg-background">
58
59
  <TestModeBanner
59
60
  onSwitchToLive={() => undefined}
60
61
  learnMoreHref="https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode"
61
62
  />
62
- <div className="flex items-center gap-2 p-4 text-sm">
63
- <span className="font-medium">pay_2IjeQm4hqU6RA4Z4kwDee</span>
63
+ <div className="flex items-center gap-2 p-4">
64
+ <span className="min-w-0 truncate text-label-primary text-foreground">
65
+ pay_2IjeQm4hqU6RA4Z4kwDee
66
+ </span>
64
67
  <TestModeBadge />
65
68
  </div>
66
69
  </div>
@@ -6,7 +6,7 @@ epoch milliseconds. Relative times refresh every 30 seconds. Built on the `Toolt
6
6
  touch (coarse pointer) devices a tap toggles it, since primitive tooltips open on hover and focus only.
7
7
 
8
8
  ```tsx
9
- import { Timestamp } from "@dodopayments/ui/timestamp";
9
+ import { Timestamp, TimeZoneProvider } from "@dodopayments/ui/timestamp";
10
10
  ```
11
11
 
12
12
  ## Timestamp
@@ -21,10 +21,19 @@ touch (coarse pointer) devices a tap toggles it, since primitive tooltips open o
21
21
  | `value` (required) | `string \| number \| Date` | - | The instant to show: an ISO 8601 string, epoch milliseconds or a `Date`. |
22
22
  | `format` | `TimestampFormat` | `"relative"` | How the trigger renders the time. |
23
23
  | `labels` | `TimestampLabels` | - | Labels of the UTC, relative and timestamp rows. |
24
- | `timeZone` | `string` | - | IANA time zone (e.g. "Asia/Kolkata") for the trigger and the first tooltip row. When unset or invalid, the trigger uses UTC and the first row uses the device's zone. |
24
+ | `timeZone` | `string` | - | IANA time zone (e.g. "Asia/Kolkata") for the trigger and the first tooltip row, over the nearest `TimeZoneProvider`'s. When neither is set or valid, the trigger uses UTC and the first row uses the device's zone. |
25
25
 
26
26
  Also accepts Base UI props: `className`, `closeDelay`, `closeOnClick`, `delay`, `disabled`, `handle`, `payload`.
27
27
 
28
+ ## TimeZoneProvider
29
+
30
+ Sets the time zone of every `Timestamp` inside it (and the components built on it, such as the
31
+ Activity timeline), e.g. a business's preferred zone. A `timeZone` prop on a Timestamp still wins.
32
+
33
+ | Prop | Type | Default | Description |
34
+ | --- | --- | --- | --- |
35
+ | `timeZone` (required) | `string` | - | IANA time zone every `Timestamp` inside uses when it has no `timeZone` of its own. |
36
+
28
37
  ## Examples
29
38
 
30
39
  ### timestamp/basic
@@ -35,6 +35,7 @@ field), with the search `ComboboxInput` inside the `ComboboxPopup`.
35
35
  | `placeholder` | `string` | `"Select a time zone"` | Trigger text while nothing is selected. |
36
36
  | `required` | `boolean` | - | |
37
37
  | `searchPlaceholder` | `string` | `"Search time zones"` | Placeholder and accessible name of the search input in the popup. |
38
+ | `size` | `"default" \| "sm"` | `"default"` | Trigger height: 36, or the compact 28 of `SelectTrigger` `size="sm"`. |
38
39
  | `timeZones` | `readonly string[]` | - | IANA identifiers to offer. Defaults to every zone from `Intl.supportedValuesOf("timeZone")`, with `UTC` first. |
39
40
  | `value` | `string \| null` | - | Selected IANA time zone (controlled). `null` clears the selection. A zone missing from the list (for example an alias such as `US/Eastern`) is added to the top of it so it stays visible. |
40
41
 
@@ -115,7 +115,11 @@ for the shape of the other charts (`FunnelStage`, `HeatmapColumn`, `SankeyData`)
115
115
 
116
116
  ### 3. Colour series with the chart tokens, in order
117
117
 
118
- Use `var(--chart-1)` for the first series, `var(--chart-2)` for the second, up to `var(--chart-5)`.
118
+ Bars, lines and areas use `var(--chart-solid-1)` (Pulse 400, the brand lime) for the first series and
119
+ `var(--chart-solid-2)` (Blue 400) for the second and `var(--chart-solid-3)` (Violet 500, 400 in dark) for a third.
120
+ `--chart-solid-1` is their default colour. Bars are solid. Pie slices, rings, sunburst branches, gauge notches, funnel stages and sankey nodes are solid too and default to
121
+ `--chart-solid-1` to `--chart-solid-3`, then `--chart-4` and `--chart-5`.
122
+ Other series and the other charts use `var(--chart-1)`, `var(--chart-2)` and so on, up to `var(--chart-5)`.
119
123
  The tokens switch with the theme and come from the Dodo Nest ramps (`--chart-1` is the brand lime).
120
124
  Use `var(--chart-positive)` and `var(--chart-negative)` only for gain and loss. In JavaScript, `chartCssVars` (from `@dodopayments/ui/chart`) gives the other chart colours
121
125
  (`chartCssVars.grid`, `chartCssVars.crosshair`). Heatmaps and maps use the sequential scale
@@ -123,8 +127,8 @@ Use `var(--chart-positive)` and `var(--chart-negative)` only for gain and loss.
123
127
 
124
128
  ```tsx
125
129
  // Good
126
- <Bar dataKey="gross" fill="var(--chart-1)" />
127
- <Bar dataKey="net" fill="var(--chart-2)" />
130
+ <Bar dataKey="gross" fill="var(--chart-solid-1)" />
131
+ <Bar dataKey="net" fill="var(--chart-solid-2)" />
128
132
  ```
129
133
 
130
134
  ```tsx
@@ -163,8 +167,8 @@ const usd = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD",
163
167
 
164
168
  <ChartTooltip
165
169
  rows={(point) => [
166
- { color: "var(--chart-1)", label: "Gross", value: usd.format(point.gross as number) },
167
- { color: "var(--chart-2)", label: "Net", value: usd.format(point.net as number) },
170
+ { color: "var(--chart-solid-1)", label: "Gross", value: usd.format(point.gross as number) },
171
+ { color: "var(--chart-solid-2)", label: "Net", value: usd.format(point.net as number) },
168
172
  ]}
169
173
  />
170
174
  ```
@@ -279,7 +283,7 @@ Some roots need their own parts:
279
283
  <ComposedChart data={rows} label="Orders and revenue, September 2026">
280
284
  <ChartGrid horizontal />
281
285
  <SeriesBar dataKey="orders" fill="var(--chart-3)" />
282
- <Line dataKey="revenue" stroke="var(--chart-1)" />
286
+ <Line dataKey="revenue" stroke="var(--chart-solid-1)" />
283
287
  <XAxis />
284
288
  </ComposedChart>
285
289
  ```
@@ -315,7 +319,8 @@ tooltip of the marker, not in a paragraph under the chart.
315
319
  - [ ] The chart type matches the question (see "Choose the chart").
316
320
  - [ ] `label` names the metric and the period.
317
321
  - [ ] Each part comes from its subpath and is directly inside the root.
318
- - [ ] Series use `var(--chart-1)` to `var(--chart-5)` in order, with the same colour in the tooltip
322
+ - [ ] Series use `var(--chart-solid-1)` to `var(--chart-solid-3)` on bars, lines and areas, then `var(--chart-1)` to
323
+ `var(--chart-5)` in order, with the same colour in the tooltip
319
324
  and the legend. No literal colours.
320
325
  - [ ] Tooltip rows have human labels and formatted values.
321
326
  - [ ] Axis values are compact, and the y-axis label is not cut off.
@@ -27,7 +27,7 @@ another component library.
27
27
  | You need | Use | Not |
28
28
  | --- | --- | --- |
29
29
  | An action | `Button` | A clickable `<div>` or `<span>` |
30
- | Picking a button size | No `size` (the default, `lg`, 36) for page, form, dialog and card actions; `xs` (24) for card-strip and inline actions; icon-only `icon-lg` / `icon` / `icon-xs` | `default` (32, not a Figma size) without a design reason; `sm`, `xl`, `icon-sm`, `icon-xl` (removed) or a height override |
30
+ | Picking a button size | No `size` (the default, `lg`, 36) for page, form, dialog and card actions; `xs` (24) for card-strip and inline actions; `sm` (28) with `icon-sm` in a dense toolbar or table filter row, next to an `sm` Input or Select; icon-only `icon-lg` / `icon` / `icon-xs` | `default` (32) or `sm` (28), which are not Figma sizes, for page, form or dialog actions; `xl`, `icon-xl` (removed) or a height override |
31
31
  | Navigation that looks like a button | A link styled with `buttonVariants()` | `Button` rendering a link |
32
32
  | A status (paid, failed, pending) | `Badge` with a semantic `variant` | A hand-rolled coloured pill |
33
33
  | A card, wallet, bank or BNPL logo next to a payment method, or a flag next to a currency or country | `PaymentLogo` (`brand`, one 32 × 22 size everywhere, `unknown` when there is no logo, `decorative` beside the method name) and `Flag country="IN"` from `@dodopayments/ui/payment-logos` | Logos drawn or recoloured by hand, a tile or border around a logo, an `<img>` of a logo file, emoji flags |
@@ -83,7 +83,7 @@ another component library.
83
83
  | A record's fields grouped in sections (payment, customer, billing) | `DetailsPanel` | A two-column Data table |
84
84
  | The title row at the top of every page (title, back or breadcrumb, status, up to two buttons) | `PageHeader` with `title`, `description`, `back` (one level up) or `breadcrumb` (2+ levels), `meta` (Badge, Copyable ID), `help` and `actions` (two `Button size="lg"`, one primary at most) | A text back link (‹ Products) above the title, or a Page header for an in-page section heading (use a `Card` header) |
85
85
  | The top of a record page: amount or name, status, IDs, actions | `RecordHeader` (`PageHeader` stays the page title) | A second `h1` with ad hoc badges |
86
- | The bar at the top of every dashboard page: search, Games, Milestones (Setup guide while setting up), Dodo AI, chat, theme, notifications, account | `AppTopBar` (`notifications` fills its lg Popover, `account` its Menu; `showSetupGuide` swaps Milestones for Setup guide; it collapses itself below 672px) | Page actions or a count on the bell in the top bar; a hand-built header row |
86
+ | The bar at the top of every dashboard page: search, Games, Milestones (Setup guide while setting up), Dodo AI, chat, theme, notifications, account | `AppTopBar` (`notifications` fills its lg Popover, `account` its Menu; `showSetupGuide` swaps Milestones for Setup guide; it collapses itself below 672px). The page content starts 32 below it (`pt-8`), and Sentra opens from its Dodo AI button, not from the Sidebar | Page actions or a count on the bell in the top bar; a hand-built header row; a Sentra item in the Sidebar nav |
87
87
  | A formatted description in a form (product, collection) | `RichTextEditor` in a `Field` (markdown value; text style, bold, italic, underline, text colour) | A bare `Input type="textarea"` with markdown hints, or link / code buttons in its toolbar |
88
88
  | Showing a saved description (product, invoice) | `RichTextContent` from `@dodopayments/ui/rich-text-editor` (formatted prose); `RichTextPreview` for one plain-text line in a table cell or card | Raw markdown on screen, or the value through `dangerouslySetInnerHTML` |
89
89
  | A section of a page (a form section, a list, a summary) | `Card`: the grey tray with a `CardHeader` strip (`CardTitle`, optional `help`, `CardDescription`, a small `CardAction`), the white `CardContent` panel and an optional `CardFooter` note, or the header as props (`<Card title description action>`, `layout="full-bleed"` for a list or table); `tone="error"` only for a problem to act on or the Danger zone. Stack cards 24 apart | A white bordered `div`, a card nested in a card, page actions or a page title on the strip, status shown as coloured text instead of a `Badge` |
@@ -97,6 +97,7 @@ another component library.
97
97
  | Cancelling a subscription with explicit timing | A `Sheet` with a `RadioGroup` of card radios (period end by default) and a destructive confirm | An unconfirmed destructive action |
98
98
  | A self-service billing page | Compose the Customer Portal block from `SubscriptionCard`, `PlanPicker`, `ProrationPreview`, `PaymentMethodList` and a cancel `Sheet` | A new monolithic billing component |
99
99
  | A KPI with a trend | `StatCard` (label, value, `trend`, `comparison`) in a `StatGrid` | A `Card` with a coloured arrow, or actions and links inside the card |
100
+ | The page summary under a page header (a few headline numbers) | `StatGrid layout="group"` with a `heading` ("Last 30 days") and `StatCard`s: one card, stats side by side with dividers | A `Card` with a hand-built row of label and value pairs, or separate Stat cards when the numbers belong together |
100
101
  | Top customers by spend (a ranking with a podium) | `Leaderboard items={…}` inside a `Card` titled "Top customers by spend" | Gradient tiles or rank circles drawn by hand, or recoloured medals and glows |
101
102
  | The Milestones page: targets close to done, reached milestones, the shared image | `MilestoneCard state="progress"` for targets and `MilestoneCard` (reached, `onShare`) in `Card` trays; `MilestoneShareCard` inside a Dialog to share; `MilestoneToast` when one is reached; `MilestoneEmpty` before the first; `MilestoneGem` for the gem alone | Gem or card gradients drawn by hand, raw hex colours, a Toast or Empty state standing in for the milestone notice or wall, a Progress bar or percent rebuilt by hand |
102
103
  | The setup checklist of a new business (from the top bar's Setup guide button) | `SetupGuide items={…}`: groups with `tasks` and their states, link rows, a `locked` Go live row; pin it to the bottom-right; collapse it when a task is picked | A hand-built checklist panel, status shown only by colour, a second progress number that disagrees with the top bar's ring |
@@ -118,7 +119,9 @@ another component library.
118
119
  | A component whose registry `status` is `deprecated` (docs badge, dev console warning) | Its `deprecated.replacement` | The deprecated component in new code |
119
120
  | A page title, heading, caption or big number in new UI | A text style: `font-heading text-heading-secondary` (page title), `text-heading-tertiary` (section title), `text-body-secondary` (caption), `font-heading text-heading-primary` (key figure), plus `text-numeric` for amounts | `text-2xl font-semibold tracking-tight` assembled by hand |
120
121
  | Lift on a raised surface or a control's 1px edge | `shadow-xs/5` (resting), `shadow-lg/5` (floating), `before:shadow-highlight` (edge) | `shadow-[...]` |
121
- | A denser table, toolbar or settings panel | `data-density="compact"` on the area (`comfortable` restores) | `size="sm"` on every control, or `h-7` overrides |
122
+ | A denser table, toolbar or settings panel | `data-density="compact"` on the area (`comfortable` restores); `size="sm"` on Button, Input, `SelectTrigger`, `TabsList` and Badge for one compact row in a regular page | `size="sm"` on every control of a whole area, or `h-7` overrides |
123
+ | A short task on a phone that keeps the page in view (a confirm, a few fields, a list to pick from) | `Drawer` (`DrawerContent` with `DrawerHeader`, `DrawerPanel`, `DrawerFooter`): a bottom panel that closes with a swipe down, the scrim, Escape or its close button; `snapPoints` for a list that can grow | A `Drawer` on a wide screen (use a `Dialog` or a `Sheet`), or a swipe as the only way to close |
124
+ | A menu, a list of options or a small panel on a phone | Nothing extra: they stay popups on their trigger. For a bottom sheet below 640px, add `mobileSheet` to `MenuContent`, a plain `SelectContent` or a `PopoverContent` without text fields | A hand-built bottom sheet, or `mobileSheet` on a popover that holds a form (the keyboard covers it; use a `Dialog` or `Drawer`) |
122
125
  | A custom control that sits next to buttons and inputs | `h-(--control-height-md)` (`-sm`, `-lg`) | A fixed `h-8` that ignores density |
123
126
  | An in-app high-contrast setting | `.high-contrast` on `<html>` or a subtree; `high-contrast:` for extra styles | `contrast-more:` alone (misses the in-app setting) |
124
127
  | A chart of change against a baseline, or up/down deltas | `--chart-diverging-neg-3` … `pos-3`, `--chart-positive` / `--chart-negative` | `--chart-1` / `--chart-2` picked for their hue |
@@ -325,8 +328,9 @@ through `role="status"`. Use `lg` (the default) for a section and `xl` for a ful
325
328
  ### 9. Dialogs: a real title, footer actions, cancel first
326
329
 
327
330
  `DialogTitle` is the required accessible name (an `<h2>`). `DialogHeader` and `DialogPanel` make the
328
- white panel; `DialogFooter` is the strip under it, with the actions end-aligned (they stay in a row on
329
- phones). Put the cancel action first and the primary action last, both `size="lg"`. Use `size="md"`
331
+ white panel; `DialogFooter` is the strip under it, with the actions end-aligned. A `Dialog` is centred at
332
+ every width; `mobileSheet` makes it a bottom drawer below 640px with the same parts (swipe down to close, the
333
+ actions share the row), but not when its body has its own drag gesture or for an alert dialog, which stays centred. Put the cancel action first and the primary action last, both `size="lg"`. Use `size="md"`
330
334
  (480) for confirms and short forms and `size="lg"` (960) for bigger forms. A confirm starts its header
331
335
  with a `DialogIcon` and is an alert dialog, `<Dialog alert>` (`role="alertdialog"`, no close button, no
332
336
  dismiss on the scrim); `ConfirmDialog` is a ready-made one with async loading. Use `tone="error"` and a
@@ -460,8 +464,8 @@ const currencies = [
460
464
  Use a visible `<label htmlFor>`. If the UI around the control already labels it visually (a table
461
465
  filter), use `aria-label`. A placeholder is not a label.
462
466
  `aria-invalid` changes the border and focus halo to the error colour, so never add error classes.
463
- `Input` has one size (Dodo Nest Input): 36px, in forms, sheets, toolbars and popovers. Do not pass `size="md"`;
464
- it was removed.
467
+ `Input` is 36px (Dodo Nest Input) in forms, sheets and popovers. A one-line Input also takes `size="sm"` (28px, 32px
468
+ on a phone) for a dense toolbar or a table filter row. Do not pass `size="md"`; it was removed.
465
469
 
466
470
  Use `prefix` / `suffix` for `$` and `%`, `addon` only for long fixed prefixes (a store URL), and
467
471
  `type="textarea"` / `type="chips"` for multi-line text and tags. For an autocomplete,
@@ -541,6 +545,12 @@ layouts that change at different widths. Do not hide actions on small screens. S
541
545
  tables scroll inside an `overflow-x-auto` wrapper. Hover-only affordances must also work on tap or
542
546
  focus.
543
547
 
548
+ On a phone a `DataGrid` scrolls sideways with every column, which is the default and is fine. Only when a
549
+ design asks for it, hide the columns that matter less with `meta: { priority: 2 }` (hidden while the table
550
+ is under 448px wide) or `3` (under 672px), and set `pinFirstColumn` so each row stays identifiable. A
551
+ `Dialog`, `Menu`, `Select` and `Popover` look the same on a phone as on a desktop unless `mobileSheet` is
552
+ set. Check a new screen at 320px as well as 390px.
553
+
544
554
  ```tsx
545
555
  // Good
546
556
  <div className="@container">