@dodopayments/ui 1.5.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 (340) hide show
  1. package/ai/component-registry.json +912 -52
  2. package/ai/component-registry.md +4 -1
  3. package/ai/components/badge.md +24 -0
  4. package/ai/components/brand-logos.md +1 -1
  5. package/ai/components/button.md +24 -1
  6. package/ai/components/collapsible.md +1 -1
  7. package/ai/components/color-input.md +1 -1
  8. package/ai/components/country-select.md +1 -0
  9. package/ai/components/currency-select.md +1 -0
  10. package/ai/components/data-grid.md +92 -2
  11. package/ai/components/date-picker.md +1 -1
  12. package/ai/components/dialog.md +4 -2
  13. package/ai/components/drawer.md +292 -0
  14. package/ai/components/featured-icon.md +1 -0
  15. package/ai/components/field.md +1 -1
  16. package/ai/components/file-upload.md +1 -1
  17. package/ai/components/icon-morph.md +1 -1
  18. package/ai/components/image-crop.md +89 -0
  19. package/ai/components/input-group.md +1 -1
  20. package/ai/components/input.md +43 -2
  21. package/ai/components/invoice-document.md +182 -0
  22. package/ai/components/load-more.md +1 -1
  23. package/ai/components/logo.md +1 -1
  24. package/ai/components/menu.md +10 -9
  25. package/ai/components/milestone.md +1 -1
  26. package/ai/components/new-items-pill.md +1 -1
  27. package/ai/components/payment-logos.md +1 -1
  28. package/ai/components/popover.md +2 -1
  29. package/ai/components/reorder-list.md +45 -0
  30. package/ai/components/scaled-frame.md +1 -1
  31. package/ai/components/select.md +29 -2
  32. package/ai/components/setup-guide.md +1 -1
  33. package/ai/components/sidebar.md +2 -2
  34. package/ai/components/tabs.md +39 -0
  35. package/ai/components/test-mode-banner.md +4 -1
  36. package/ai/components/timestamp.md +11 -2
  37. package/ai/components/timezone-select.md +1 -0
  38. package/ai/skills/dodo-design/SKILL.md +15 -6
  39. package/dist/components/badge/badge.d.ts +12 -0
  40. package/dist/components/badge/badge.d.ts.map +1 -1
  41. package/dist/components/badge/badge.js +23 -4
  42. package/dist/components/badge/badge.js.map +1 -1
  43. package/dist/components/brand-logos/brand-artwork.d.ts +30 -1
  44. package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
  45. package/dist/components/brand-logos/brand-artwork.js +30 -1
  46. package/dist/components/brand-logos/brand-artwork.js.map +1 -1
  47. package/dist/components/brand-logos/brand-logos.d.ts +2 -2
  48. package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
  49. package/dist/components/brand-logos/brand-logos.js +11 -1
  50. package/dist/components/brand-logos/brand-logos.js.map +1 -1
  51. package/dist/components/button/button.d.ts +12 -0
  52. package/dist/components/button/button.d.ts.map +1 -1
  53. package/dist/components/button/button.js +8 -0
  54. package/dist/components/button/button.js.map +1 -1
  55. package/dist/components/card/card-notice.d.ts.map +1 -1
  56. package/dist/components/card/card-notice.js +1 -1
  57. package/dist/components/card/card-notice.js.map +1 -1
  58. package/dist/components/code-block/code-block.d.ts.map +1 -1
  59. package/dist/components/code-block/code-block.js +3 -1
  60. package/dist/components/code-block/code-block.js.map +1 -1
  61. package/dist/components/comparison-bars/comparison-bars.js +2 -2
  62. package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
  63. package/dist/components/country-select/country-select.d.ts +6 -1
  64. package/dist/components/country-select/country-select.d.ts.map +1 -1
  65. package/dist/components/country-select/country-select.js +2 -2
  66. package/dist/components/country-select/country-select.js.map +1 -1
  67. package/dist/components/currency-select/currency-select.d.ts +6 -1
  68. package/dist/components/currency-select/currency-select.d.ts.map +1 -1
  69. package/dist/components/currency-select/currency-select.js +2 -2
  70. package/dist/components/currency-select/currency-select.js.map +1 -1
  71. package/dist/components/data-grid/bulk-actions.js +2 -2
  72. package/dist/components/data-grid/bulk-actions.js.map +1 -1
  73. package/dist/components/data-grid/data-grid.d.ts +17 -2
  74. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  75. package/dist/components/data-grid/data-grid.js +101 -11
  76. package/dist/components/data-grid/data-grid.js.map +1 -1
  77. package/dist/components/date-picker/date-picker.js +2 -2
  78. package/dist/components/date-picker/date-picker.js.map +1 -1
  79. package/dist/components/dialog/dialog.d.ts +12 -4
  80. package/dist/components/dialog/dialog.d.ts.map +1 -1
  81. package/dist/components/dialog/dialog.js +46 -7
  82. package/dist/components/dialog/dialog.js.map +1 -1
  83. package/dist/components/drawer/drawer.d.ts +73 -0
  84. package/dist/components/drawer/drawer.d.ts.map +1 -0
  85. package/dist/components/drawer/drawer.js +56 -0
  86. package/dist/components/drawer/drawer.js.map +1 -0
  87. package/dist/components/drawer/index.d.ts +2 -0
  88. package/dist/components/drawer/index.d.ts.map +1 -0
  89. package/dist/components/drawer/index.js +2 -0
  90. package/dist/components/drawer/index.js.map +1 -0
  91. package/dist/components/featured-icon/featured-icon.d.ts +103 -1
  92. package/dist/components/featured-icon/featured-icon.d.ts.map +1 -1
  93. package/dist/components/featured-icon/featured-icon.js +61 -3
  94. package/dist/components/featured-icon/featured-icon.js.map +1 -1
  95. package/dist/components/featured-icon/index.d.ts +1 -1
  96. package/dist/components/featured-icon/index.d.ts.map +1 -1
  97. package/dist/components/featured-icon/index.js +1 -1
  98. package/dist/components/featured-icon/index.js.map +1 -1
  99. package/dist/components/featured-icon/sphere.d.ts +7 -0
  100. package/dist/components/featured-icon/sphere.d.ts.map +1 -0
  101. package/dist/components/featured-icon/sphere.js +29 -0
  102. package/dist/components/featured-icon/sphere.js.map +1 -0
  103. package/dist/components/file-upload/file-upload.js +1 -1
  104. package/dist/components/file-upload/file-upload.js.map +1 -1
  105. package/dist/components/image-crop/crop-math.d.ts +28 -0
  106. package/dist/components/image-crop/crop-math.d.ts.map +1 -0
  107. package/dist/components/image-crop/crop-math.js +53 -0
  108. package/dist/components/image-crop/crop-math.js.map +1 -0
  109. package/dist/components/image-crop/image-crop.d.ts +31 -0
  110. package/dist/components/image-crop/image-crop.d.ts.map +1 -0
  111. package/dist/components/image-crop/image-crop.js +165 -0
  112. package/dist/components/image-crop/image-crop.js.map +1 -0
  113. package/dist/components/image-crop/index.d.ts +2 -0
  114. package/dist/components/image-crop/index.d.ts.map +1 -0
  115. package/dist/components/image-crop/index.js +2 -0
  116. package/dist/components/image-crop/index.js.map +1 -0
  117. package/dist/components/input/input.d.ts +8 -2
  118. package/dist/components/input/input.d.ts.map +1 -1
  119. package/dist/components/input/input.js +12 -3
  120. package/dist/components/input/input.js.map +1 -1
  121. package/dist/components/input-group/input-group.d.ts +1 -1
  122. package/dist/components/input-group/input-group.js +1 -1
  123. package/dist/components/input-group/input-group.js.map +1 -1
  124. package/dist/components/invoice-document/index.d.ts +2 -0
  125. package/dist/components/invoice-document/index.d.ts.map +1 -0
  126. package/dist/components/invoice-document/index.js +2 -0
  127. package/dist/components/invoice-document/index.js.map +1 -0
  128. package/dist/components/invoice-document/invoice-document.d.ts +180 -0
  129. package/dist/components/invoice-document/invoice-document.d.ts.map +1 -0
  130. package/dist/components/invoice-document/invoice-document.js +58 -0
  131. package/dist/components/invoice-document/invoice-document.js.map +1 -0
  132. package/dist/components/list-item/list-item.d.ts +2 -2
  133. package/dist/components/list-item/list-item.d.ts.map +1 -1
  134. package/dist/components/list-item/list-item.js +3 -3
  135. package/dist/components/list-item/list-item.js.map +1 -1
  136. package/dist/components/list-toolbar/list-toolbar-date-range.js +1 -1
  137. package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
  138. package/dist/components/logo/logo.d.ts +5 -1
  139. package/dist/components/logo/logo.d.ts.map +1 -1
  140. package/dist/components/logo/logo.js +7 -3
  141. package/dist/components/logo/logo.js.map +1 -1
  142. package/dist/components/menu/menu.d.ts +10 -9
  143. package/dist/components/menu/menu.d.ts.map +1 -1
  144. package/dist/components/menu/menu.js +5 -4
  145. package/dist/components/menu/menu.js.map +1 -1
  146. package/dist/components/page-header/page-header.d.ts.map +1 -1
  147. package/dist/components/page-header/page-header.js +6 -7
  148. package/dist/components/page-header/page-header.js.map +1 -1
  149. package/dist/components/pagination/pagination.d.ts.map +1 -1
  150. package/dist/components/pagination/pagination.js +4 -2
  151. package/dist/components/pagination/pagination.js.map +1 -1
  152. package/dist/components/payment-logos/artwork/link.d.ts +2 -0
  153. package/dist/components/payment-logos/artwork/link.d.ts.map +1 -0
  154. package/dist/components/payment-logos/artwork/link.js +5 -0
  155. package/dist/components/payment-logos/artwork/link.js.map +1 -0
  156. package/dist/components/payment-logos/payment-logos.d.ts +1 -1
  157. package/dist/components/payment-logos/payment-logos.d.ts.map +1 -1
  158. package/dist/components/payment-logos/payment-logos.js +3 -0
  159. package/dist/components/payment-logos/payment-logos.js.map +1 -1
  160. package/dist/components/popover/popover.d.ts +7 -0
  161. package/dist/components/popover/popover.d.ts.map +1 -1
  162. package/dist/components/popover/popover.js.map +1 -1
  163. package/dist/components/quantity-stepper/quantity-stepper.js +1 -1
  164. package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
  165. package/dist/components/radio-group/radio-group.js +2 -2
  166. package/dist/components/radio-group/radio-group.js.map +1 -1
  167. package/dist/components/reorder-list/reorder-list.d.ts +11 -2
  168. package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
  169. package/dist/components/reorder-list/reorder-list.js +39 -16
  170. package/dist/components/reorder-list/reorder-list.js.map +1 -1
  171. package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
  172. package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
  173. package/dist/components/scaled-frame/scaled-frame.d.ts +6 -2
  174. package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
  175. package/dist/components/scaled-frame/scaled-frame.js +20 -1
  176. package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
  177. package/dist/components/segmented-control/segmented-control.d.ts +2 -2
  178. package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
  179. package/dist/components/segmented-control/segmented-control.js +10 -2
  180. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  181. package/dist/components/select/select.d.ts +21 -3
  182. package/dist/components/select/select.d.ts.map +1 -1
  183. package/dist/components/select/select.js +24 -9
  184. package/dist/components/select/select.js.map +1 -1
  185. package/dist/components/sidebar/sidebar.d.ts +2 -2
  186. package/dist/components/sidebar/sidebar.js +2 -2
  187. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  188. package/dist/components/skeleton/skeleton.js +7 -7
  189. package/dist/components/skeleton/skeleton.js.map +1 -1
  190. package/dist/components/subscription-card/subscription-card.js +1 -1
  191. package/dist/components/subscription-card/subscription-card.js.map +1 -1
  192. package/dist/components/tabs/tabs.d.ts +30 -1
  193. package/dist/components/tabs/tabs.d.ts.map +1 -1
  194. package/dist/components/tabs/tabs.js +14 -4
  195. package/dist/components/tabs/tabs.js.map +1 -1
  196. package/dist/components/test-mode-banner/test-mode-banner.d.ts.map +1 -1
  197. package/dist/components/test-mode-banner/test-mode-banner.js +3 -2
  198. package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
  199. package/dist/components/timestamp/index.d.ts +1 -1
  200. package/dist/components/timestamp/index.d.ts.map +1 -1
  201. package/dist/components/timestamp/index.js +1 -1
  202. package/dist/components/timestamp/index.js.map +1 -1
  203. package/dist/components/timestamp/timestamp.d.ts +12 -2
  204. package/dist/components/timestamp/timestamp.d.ts.map +1 -1
  205. package/dist/components/timestamp/timestamp.js +11 -1
  206. package/dist/components/timestamp/timestamp.js.map +1 -1
  207. package/dist/components/timezone-select/timezone-select.d.ts +6 -1
  208. package/dist/components/timezone-select/timezone-select.d.ts.map +1 -1
  209. package/dist/components/timezone-select/timezone-select.js +2 -2
  210. package/dist/components/timezone-select/timezone-select.js.map +1 -1
  211. package/dist/components/tooltip/tooltip.js +1 -1
  212. package/dist/components/tooltip/tooltip.js.map +1 -1
  213. package/dist/icons/index.d.ts +9 -0
  214. package/dist/icons/index.js +9 -0
  215. package/dist/icons/ui/arrow-turn-right.d.ts +3 -0
  216. package/dist/icons/ui/arrow-turn-right.d.ts.map +1 -0
  217. package/dist/icons/ui/arrow-turn-right.js +5 -0
  218. package/dist/icons/ui/arrow-turn-right.js.map +1 -0
  219. package/dist/icons/ui/box-glyph.d.ts +3 -0
  220. package/dist/icons/ui/box-glyph.js +5 -0
  221. package/dist/icons/ui/circle-check-glyph.d.ts +3 -0
  222. package/dist/icons/ui/circle-check-glyph.js +5 -0
  223. package/dist/icons/ui/crop.d.ts +3 -0
  224. package/dist/icons/ui/crop.d.ts.map +1 -0
  225. package/dist/icons/ui/crop.js +5 -0
  226. package/dist/icons/ui/crop.js.map +1 -0
  227. package/dist/icons/ui/greek-temple-glyph.d.ts +3 -0
  228. package/dist/icons/ui/greek-temple-glyph.js +5 -0
  229. package/dist/icons/ui/hourglass-glyph.d.ts +3 -0
  230. package/dist/icons/ui/hourglass-glyph.js +5 -0
  231. package/dist/icons/ui/shop-glyph.d.ts +3 -0
  232. package/dist/icons/ui/shop-glyph.js +5 -0
  233. package/dist/icons/ui/triangle-warning-glyph.d.ts +3 -0
  234. package/dist/icons/ui/triangle-warning-glyph.js +5 -0
  235. package/dist/icons/ui/user-glyph.d.ts +3 -0
  236. package/dist/icons/ui/user-glyph.js +5 -0
  237. package/dist/index.d.ts +3 -0
  238. package/dist/index.d.ts.map +1 -1
  239. package/dist/index.js +3 -0
  240. package/dist/index.js.map +1 -1
  241. package/dist/lib/locale-messages.d.ts +8 -0
  242. package/dist/lib/locale-messages.d.ts.map +1 -1
  243. package/dist/lib/locale-messages.js +9 -0
  244. package/dist/lib/locale-messages.js.map +1 -1
  245. package/dist/locales/ar.d.ts.map +1 -1
  246. package/dist/locales/ar.js +6 -0
  247. package/dist/locales/ar.js.map +1 -1
  248. package/dist/locales/de.d.ts.map +1 -1
  249. package/dist/locales/de.js +6 -0
  250. package/dist/locales/de.js.map +1 -1
  251. package/dist/locales/es.d.ts.map +1 -1
  252. package/dist/locales/es.js +6 -0
  253. package/dist/locales/es.js.map +1 -1
  254. package/dist/locales/fr.d.ts.map +1 -1
  255. package/dist/locales/fr.js +6 -0
  256. package/dist/locales/fr.js.map +1 -1
  257. package/dist/locales/he.d.ts.map +1 -1
  258. package/dist/locales/he.js +6 -0
  259. package/dist/locales/he.js.map +1 -1
  260. package/dist/locales/hi.d.ts.map +1 -1
  261. package/dist/locales/hi.js +6 -0
  262. package/dist/locales/hi.js.map +1 -1
  263. package/dist/locales/ja.d.ts.map +1 -1
  264. package/dist/locales/ja.js +6 -0
  265. package/dist/locales/ja.js.map +1 -1
  266. package/dist/locales/pt-BR.d.ts.map +1 -1
  267. package/dist/locales/pt-BR.js +6 -0
  268. package/dist/locales/pt-BR.js.map +1 -1
  269. package/dist/locales/zh-CN.d.ts.map +1 -1
  270. package/dist/locales/zh-CN.js +6 -0
  271. package/dist/locales/zh-CN.js.map +1 -1
  272. package/dist/primitives/charts/gauge.js +1 -1
  273. package/dist/primitives/hooks/use-media-query.d.ts +1 -1
  274. package/dist/primitives/hooks/use-media-query.js +1 -1
  275. package/dist/primitives/lib/mobile-sheet.d.ts +25 -0
  276. package/dist/primitives/lib/mobile-sheet.d.ts.map +1 -0
  277. package/dist/primitives/lib/mobile-sheet.js +28 -0
  278. package/dist/primitives/lib/mobile-sheet.js.map +1 -0
  279. package/dist/primitives/lib/segmented-control.d.ts +8 -2
  280. package/dist/primitives/lib/segmented-control.d.ts.map +1 -1
  281. package/dist/primitives/lib/segmented-control.js +8 -2
  282. package/dist/primitives/lib/segmented-control.js.map +1 -1
  283. package/dist/primitives/ui/button.d.ts +1 -1
  284. package/dist/primitives/ui/button.d.ts.map +1 -1
  285. package/dist/primitives/ui/button.js +3 -1
  286. package/dist/primitives/ui/button.js.map +1 -1
  287. package/dist/primitives/ui/calendar.d.ts.map +1 -1
  288. package/dist/primitives/ui/calendar.js +4 -2
  289. package/dist/primitives/ui/calendar.js.map +1 -1
  290. package/dist/primitives/ui/checkbox.d.ts.map +1 -1
  291. package/dist/primitives/ui/checkbox.js +3 -1
  292. package/dist/primitives/ui/checkbox.js.map +1 -1
  293. package/dist/primitives/ui/combobox.js +2 -2
  294. package/dist/primitives/ui/combobox.js.map +1 -1
  295. package/dist/primitives/ui/dialog.d.ts +7 -0
  296. package/dist/primitives/ui/dialog.d.ts.map +1 -1
  297. package/dist/primitives/ui/dialog.js +11 -0
  298. package/dist/primitives/ui/dialog.js.map +1 -1
  299. package/dist/primitives/ui/drawer.d.ts +1 -2
  300. package/dist/primitives/ui/drawer.d.ts.map +1 -1
  301. package/dist/primitives/ui/drawer.js +30 -14
  302. package/dist/primitives/ui/drawer.js.map +1 -1
  303. package/dist/primitives/ui/input-group.d.ts.map +1 -1
  304. package/dist/primitives/ui/input-group.js +4 -1
  305. package/dist/primitives/ui/input-group.js.map +1 -1
  306. package/dist/primitives/ui/input.js +1 -1
  307. package/dist/primitives/ui/input.js.map +1 -1
  308. package/dist/primitives/ui/menu.d.ts.map +1 -1
  309. package/dist/primitives/ui/menu.js +15 -16
  310. package/dist/primitives/ui/menu.js.map +1 -1
  311. package/dist/primitives/ui/number-field.js +1 -1
  312. package/dist/primitives/ui/number-field.js.map +1 -1
  313. package/dist/primitives/ui/otp-field.js +2 -2
  314. package/dist/primitives/ui/otp-field.js.map +1 -1
  315. package/dist/primitives/ui/popover.d.ts +3 -1
  316. package/dist/primitives/ui/popover.d.ts.map +1 -1
  317. package/dist/primitives/ui/popover.js +11 -5
  318. package/dist/primitives/ui/popover.js.map +1 -1
  319. package/dist/primitives/ui/radio-group.js +1 -1
  320. package/dist/primitives/ui/radio-group.js.map +1 -1
  321. package/dist/primitives/ui/select.d.ts +7 -3
  322. package/dist/primitives/ui/select.d.ts.map +1 -1
  323. package/dist/primitives/ui/select.js +14 -5
  324. package/dist/primitives/ui/select.js.map +1 -1
  325. package/dist/primitives/ui/sheet.d.ts.map +1 -1
  326. package/dist/primitives/ui/sheet.js +4 -3
  327. package/dist/primitives/ui/sheet.js.map +1 -1
  328. package/dist/primitives/ui/sidebar.js +1 -1
  329. package/dist/primitives/ui/tabs.d.ts.map +1 -1
  330. package/dist/primitives/ui/tabs.js +1 -1
  331. package/dist/primitives/ui/tabs.js.map +1 -1
  332. package/dist/primitives/ui/textarea.js +1 -1
  333. package/dist/primitives/ui/textarea.js.map +1 -1
  334. package/dist/styles/motion.test.tsx +15 -0
  335. package/dist/styles/theme.css +4 -0
  336. package/dist/styles/tokens.css +56 -13
  337. package/dist/styles/tokens.test.tsx +137 -4
  338. package/dist/theme/css.js +4 -4
  339. package/dist/theme/css.js.map +1 -1
  340. package/package.json +1 -1
@@ -66,7 +66,7 @@ Accepts Base UI's `render` prop to swap the rendered element.
66
66
  | `prefix` | `ReactNode` | - | Inline text before the value in Content/Primary, e.g. `$`. |
67
67
  | `prefixSelect` | `ReactNode` | - | A chrome-less select at the start, e.g. the phone country code: pass a `Select` with its `SelectTrigger`. |
68
68
  | `shortcut` | `string` | - | A keyboard shortcut shown at the end in a `Kbd`, e.g. `/` on a search field. |
69
- | `size` | `"lg" \| null` | - | |
69
+ | `size` | `"sm" \| "lg" \| null` | - | |
70
70
  | `suffix` | `ReactNode` | - | Inline text after the value in Content/Secondary, e.g. `%`. |
71
71
  | `suffixSelect` | `ReactNode` | - | A chrome-less select at the end, e.g. the currency: pass a `Select` with its `SelectTrigger`. |
72
72
  | `suggestions` | `readonly InputSuggestion[] \| readonly InputSuggestionGroup[]` | - | Suggestions shown in a list under the field while the user types: strings, `{ value, label }` items, or groups (`{ label, items }`). Pass an array (it may be empty, e.g. while async results load) to turn them on. |
@@ -57,7 +57,7 @@ where the dropzone is too large. Picked files are checked as `FileUpload` checks
57
57
  | `onFilesRejected` | `((rejections: FileUploadRejection[]) => void)` | - | Called with the refused files of each pick and the reason for each. |
58
58
  | `progress` | `number \| null` | - | Determinate progress (0-100). A fill sweeps across the button and the percentage is shown next to `loadingText`. `null`/`undefined` falls back to `loading`. |
59
59
  | `result` | `"success" \| "error" \| null` | - | Outcome of the last action, after interior.dev's loading button. `"success"` swaps the label for a check and `successText`, `"error"` for a warning icon and `errorText`; `null` shows the label. The outcome is announced through a polite live region. Pass it (even `null`) on buttons that report an outcome, so every face shares one cell from the first render. Clear it yourself, e.g. after 1.4s. With `result`, `Button` renders the button and a sibling status element, so do not pass a `Button` with `result` as the `render` element of another component. |
60
- | `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
60
+ | `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
61
61
  | `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
62
62
  | `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
63
63
 
@@ -33,7 +33,7 @@ springs each `d` attribute, so one shape turns into the next. Composes `Button`
33
33
  | `semantics` | `IconMorphSemantics` | `"label"` | `"label"` names the button after the shown state. `"pressed"` and `"expanded"` also set `aria-pressed` / `aria-expanded` while state 1 shows; pass a fixed `aria-label` with them. |
34
34
  | `shapes` | `readonly IconMorphShape[]` | - | Custom states (two or more) on a 24 x 24 grid. Give matching paths the same commands so they interpolate. |
35
35
  | `showLabel` | `boolean` | `false` | Shows the state's label beside the icon. The label cross-fades with the icon. |
36
- | `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
36
+ | `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
37
37
  | `strokeWidth` | `number` | `2` | Stroke width on the 24 x 24 grid. 2 renders as 1.5px at the 18px icon size, like Nucleo outline icons. |
38
38
  | `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
39
39
  | `value` | `number \| boolean` | - | The shown state. A boolean maps to 0 / 1. Pass it to control the morph. |
@@ -0,0 +1,89 @@
1
+ # Image Crop
2
+
3
+ Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the
4
+ whole image with a box of `aspect` over it, 90% of the image and centred to start. Drag the box to move it,
5
+ a corner to resize it, or move it with the arrow keys. Crop draws the boxed area to a canvas, shrinks it so
6
+ its longer side is at most `maxDimension`, and calls `onCrop` with the new file. Put it beside a
7
+ `FileUpload`: open it with the picked file, and upload what `onCrop` returns. It stays mounted and toggles
8
+ `open`; its state starts fresh for every file.
9
+
10
+ ```tsx
11
+ import { ImageCropDialog } from "@dodopayments/ui/image-crop";
12
+ ```
13
+
14
+ ## ImageCropDialog
15
+
16
+ Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the
17
+ whole image with a box of `aspect` over it, 90% of the image and centred to start. Drag the box to move it,
18
+ a corner to resize it, or move it with the arrow keys. Crop draws the boxed area to a canvas, shrinks it so
19
+ its longer side is at most `maxDimension`, and calls `onCrop` with the new file. Put it beside a
20
+ `FileUpload`: open it with the picked file, and upload what `onCrop` returns. It stays mounted and toggles
21
+ `open`; its state starts fresh for every file.
22
+
23
+ | Prop | Type | Default | Description |
24
+ | --- | --- | --- | --- |
25
+ | `file` (required) | `File \| null` | - | The picked image. The dialog shows it while `open`. |
26
+ | `onCrop` (required) | `(file: File) => void` | - | Called with the cropped image: the same name, and the same type when it is JPEG, PNG or WebP (else PNG). |
27
+ | `onOpenChange` (required) | `(open: boolean) => void` | - | |
28
+ | `open` (required) | `boolean` | - | |
29
+ | `aspect` | `number` | `1` | Width over height of the crop, e.g. `1` for a product image or `16 / 9` for a banner. |
30
+ | `maxDimension` | `number` | `1920` | The longest side of the output in pixels; a larger crop is shrunk to it, a smaller one kept. |
31
+ | `title` | `string` | `the locale's `imageCropTitle` ("Crop image")` | Accessible title. |
32
+
33
+ ## Examples
34
+
35
+ ### image-crop/master
36
+
37
+ ```tsx
38
+ "use client";
39
+
40
+ import { FileUpload } from "@dodopayments/ui/file-upload";
41
+ import { ImageCropDialog } from "@dodopayments/ui/image-crop";
42
+ import { useEffect, useState } from "react";
43
+
44
+ export default function ImageCropMaster() {
45
+ const [picked, setPicked] = useState<File | null>(null);
46
+ const [open, setOpen] = useState(false);
47
+ const [preview, setPreview] = useState<string | null>(null);
48
+
49
+ useEffect(
50
+ () => () => {
51
+ if (preview) URL.revokeObjectURL(preview);
52
+ },
53
+ [preview],
54
+ );
55
+
56
+ return (
57
+ <div className="flex w-full max-w-120 flex-col gap-4">
58
+ <FileUpload
59
+ accept="image/png,image/jpeg,image/webp"
60
+ description="PNG, JPG or WebP, up to 3 MB. Cropped to a square."
61
+ maxSize={3 * 1024 * 1024}
62
+ onFilesAdded={([file]) => {
63
+ if (!file) return;
64
+ setPicked(file);
65
+ setOpen(true);
66
+ }}
67
+ />
68
+ {preview ? (
69
+ // biome-ignore lint/performance/noImgElement: a local object URL in a demo.
70
+ <img
71
+ alt="Cropped"
72
+ className="size-24 rounded-lg border border-border object-cover"
73
+ src={preview}
74
+ />
75
+ ) : null}
76
+ <ImageCropDialog
77
+ file={picked}
78
+ open={open}
79
+ onOpenChange={setOpen}
80
+ onCrop={(file: File) => {
81
+ setPreview(URL.createObjectURL(file));
82
+ setOpen(false);
83
+ }}
84
+ />
85
+ </div>
86
+ );
87
+ }
88
+ ```
89
+
@@ -51,7 +51,7 @@ several in one group for joined inputs; they share the width equally, and `style
51
51
  | --- | --- | --- | --- |
52
52
  | `className` | `string` | - | Classes for the input's control wrapper (rendered `display: contents` inside the group). |
53
53
  | `nativeInput` | `boolean` | - | |
54
- | `size` | `"lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`): one size, `lg` 36. |
54
+ | `size` | `"sm" \| "lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`): `lg` 36 or the compact `sm` 28. |
55
55
  | `unstyled` | `boolean` | - | |
56
56
 
57
57
  Also accepts Base UI props: `defaultValue`, `onValueChange`, `render`, `value`.
@@ -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
+
@@ -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}
@@ -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
@@ -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
@@ -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
+
@@ -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
+