@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://dodo-ui.dev/schema/component-registry.json",
3
3
  "name": "@dodopayments/ui",
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "components": [
6
6
  {
7
7
  "slug": "alert",
@@ -1014,6 +1014,24 @@
1014
1014
  "description": "An icon before the label (Figma \"Show leading icon\"), 12px, e.g. a clock on a session timer or a card on a\npayment method chip. Decorative: the label names the badge. Replaces the `dot`.",
1015
1015
  "source": "dodo"
1016
1016
  },
1017
+ {
1018
+ "name": "size",
1019
+ "type": "\"md\" | \"sm\"",
1020
+ "required": false,
1021
+ "description": "",
1022
+ "source": "dodo",
1023
+ "values": [
1024
+ {
1025
+ "value": "md",
1026
+ "description": "22px tall, as in Figma. The default."
1027
+ },
1028
+ {
1029
+ "value": "sm",
1030
+ "description": "18px tall with 6px inline padding: a compact pill for a dense table row or next to `sm` controls. Not a Figma size."
1031
+ }
1032
+ ],
1033
+ "default": "\"md\""
1034
+ },
1017
1035
  {
1018
1036
  "name": "status",
1019
1037
  "type": "\"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",
@@ -1123,6 +1141,10 @@
1123
1141
  }
1124
1142
  ],
1125
1143
  "examples": [
1144
+ {
1145
+ "name": "badge/compact",
1146
+ "code": "\"use client\";\n\nimport { Badge } from \"@dodopayments/ui/badge\";\n\nexport default function BadgeCompact() {\n return (\n <>\n <Badge size=\"sm\" tone=\"success\">\n Active\n </Badge>\n <Badge size=\"sm\" tone=\"warning\" dot>\n Past due\n </Badge>\n <Badge size=\"sm\">Test mode</Badge>\n <Badge tone=\"success\">Active</Badge>\n </>\n );\n}"
1147
+ },
1126
1148
  {
1127
1149
  "name": "badge/icon",
1128
1150
  "code": "\"use client\";\n\nimport { Badge } from \"@dodopayments/ui/badge\";\nimport { CircleCheckIcon } from \"@dodopayments/ui/icons\";\n\nexport default function BadgeIcon() {\n return (\n <Badge layout=\"icon\" tone=\"success\">\n <CircleCheckIcon aria-hidden />\n <span className=\"sr-only\">Paid</span>\n </Badge>\n );\n}"
@@ -1151,9 +1173,11 @@
1151
1173
  "importPath": "@dodopayments/ui/featured-icon",
1152
1174
  "exports": [
1153
1175
  "DODO_FEATURED_ICON_DEFAULT_VARIANTS",
1176
+ "DODO_FEATURED_ICON_SPHERE_VARIANTS",
1154
1177
  "DODO_FEATURED_ICON_VARIANTS",
1155
1178
  "FeaturedIcon",
1156
1179
  "FeaturedIconProps",
1180
+ "featuredIconSphereVariants",
1157
1181
  "featuredIconVariants"
1158
1182
  ],
1159
1183
  "parts": [
@@ -1168,6 +1192,13 @@
1168
1192
  "description": "The icon in the tile, a Nucleo icon (16px at `md`, 12px at `sm`): `<FeaturedIcon icon={<KeyIcon />} />`.",
1169
1193
  "source": "dodo"
1170
1194
  },
1195
+ {
1196
+ "name": "look",
1197
+ "type": "\"tile\" | \"sphere\"",
1198
+ "required": false,
1199
+ "description": "`tile`: The rounded square with a soft fill and two borders (the default).\n`sphere`: The dashboard's glossy round badge in the tone, a white icon on it (44px at `md`, 28px at `sm`), as the\nverification checklist shows each step.",
1200
+ "source": "dodo"
1201
+ },
1171
1202
  {
1172
1203
  "name": "size",
1173
1204
  "type": "\"md\" | \"sm\"",
@@ -7211,7 +7242,7 @@
7211
7242
  },
7212
7243
  {
7213
7244
  "name": "size",
7214
- "type": "\"xs\" | \"default\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-lg\"",
7245
+ "type": "\"xs\" | \"sm\" | \"default\" | \"lg\" | \"icon\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\"",
7215
7246
  "required": false,
7216
7247
  "description": "",
7217
7248
  "source": "dodo",
@@ -7220,6 +7251,10 @@
7220
7251
  "value": "xs",
7221
7252
  "description": "28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions."
7222
7253
  },
7254
+ {
7255
+ "value": "sm",
7256
+ "description": "32px tall (28px from `sm`): a compact action in a dense toolbar, a table filter row or next to an `sm` Input. Not a Figma size."
7257
+ },
7223
7258
  {
7224
7259
  "value": "default",
7225
7260
  "description": "36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`."
@@ -7232,6 +7267,10 @@
7232
7267
  "value": "icon",
7233
7268
  "description": "Square icon-only button at the default height. Requires `aria-label`."
7234
7269
  },
7270
+ {
7271
+ "value": "icon-sm",
7272
+ "description": "Square icon-only button at `sm` height. Requires `aria-label`."
7273
+ },
7235
7274
  {
7236
7275
  "value": "icon-xs",
7237
7276
  "description": "Square icon-only button at `xs` height. Requires `aria-label`."
@@ -7324,6 +7363,10 @@
7324
7363
  "name": "button/as-link",
7325
7364
  "code": "\"use client\";\n\nimport { buttonVariants } from \"@dodopayments/ui/button\";\nimport Link from \"next/link\";\n\nexport default function ButtonAsLink() {\n return (\n <Link href=\"#as-link\" className={buttonVariants({ variant: \"secondary\" })}>\n Styled Next.js link\n </Link>\n );\n}"
7326
7365
  },
7366
+ {
7367
+ "name": "button/compact",
7368
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { FilterIcon, PlusIcon } from \"@dodopayments/ui/icons\";\n\nexport default function ButtonCompact() {\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button size=\"sm\" variant=\"secondary\" icon={<FilterIcon aria-hidden />} iconPlacement=\"left\">\n Filter\n </Button>\n <Button size=\"sm\">Export</Button>\n <Button size=\"icon-sm\" variant=\"secondary\" aria-label=\"Add a column\">\n <PlusIcon />\n </Button>\n </div>\n );\n}"
7369
+ },
7327
7370
  {
7328
7371
  "name": "button/copy-with-text",
7329
7372
  "code": "\"use client\";\n\nimport { CopyButton } from \"@dodopayments/ui/copy-button\";\n\nexport default function CopyButtonWithText() {\n return (\n <>\n <CopyButton variant=\"secondary\" content=\"https://checkout.dodopayments.com/buy/pdt_2ZsQh0r6\">\n Copy link\n </CopyButton>\n <CopyButton variant=\"secondary\" size=\"sm\" content=\"sk_live_2ZsQh0r6UVSjAhEGg4Wq3\">\n Copy key\n </CopyButton>\n </>\n );\n}"
@@ -9817,7 +9860,7 @@
9817
9860
  },
9818
9861
  {
9819
9862
  "name": "messageKey",
9820
- "type": "\"search\" | \"clear\" | \"loading\" | \"next\" | \"cardFieldLabel\" | \"cardFieldNumber\" | \"cardFieldExpiry\" | \"cardFieldCvc\" | \"cardFieldName\" | \"cardFieldNumberError\" | \"cardFieldExpiryError\" | \"cardFieldCvcError\" | \"cardFieldNameError\" | \"billingActionFailed\" | \"close\" | \"dismiss\" | \"spinnerLabel\" | \"remove\" | \"removeItem\" | \"confirm\" | \"cancel\" | \"retry\" | \"tryAgain\" | \"back\" | \"more\" | \"showMore\" | \"showLess\" | \"selectEmpty\" | \"copied\" | \"copyFailed\" | \"copyToClipboard\" | \"loadMoreError\" | \"activityTimelineLoading\" | \"activityTimelineEmptyTitle\" | \"activityTimelineEmptyDescription\" | \"activityTimelineErrorTitle\" | \"activityTimelineErrorDescription\" | \"activityTimelineEnd\" | \"autocompleteShowSuggestions\" | \"comboboxShowOptions\" | \"breadcrumbLabel\" | \"codeBlockCopy\" | \"codeBlockLabel\" | \"dataGridSelectRow\" | \"dataGridSelectAll\" | \"dataGridSortBy\" | \"dataGridSortAscending\" | \"dataGridSortDescending\" | \"dataGridTime\" | \"datePresetToday\" | \"datePresetYesterday\" | \"datePresetLast7Days\" | \"datePresetLast30Days\" | \"datePresetThisWeek\" | \"datePresetThisMonth\" | \"datePresetLastMonth\" | \"datePresetMonthToDate\" | \"datePresetYearToDate\" | \"datePresetLastYear\" | \"dateRangeTitle\" | \"dateRangePresets\" | \"datePickerTitle\" | \"datePickerReset\" | \"datePickerApply\" | \"datePickerStartDate\" | \"datePickerEndDate\" | \"dateFilterPlaceholder\" | \"dateFilterClear\" | \"loadMore\" | \"loadMoreEnd\" | \"paginationLabel\" | \"paginationPrevious\" | \"paginationNext\" | \"paginationFirst\" | \"paginationLast\" | \"paginationPage\" | \"tablePaginationRowsPerPage\" | \"tablePaginationViewing\" | \"secretFieldReveal\" | \"secretFieldCopy\" | \"secretFieldRemasked\" | \"showMoreLabel\" | \"sidebarTitle\" | \"sidebarToggle\" | \"sidebarCollapse\" | \"sidebarExpand\" | \"sidebarMode\" | \"sidebarModeTest\" | \"sidebarModeLive\" | \"sidebarSwitchToLive\" | \"sidebarSwitchToTest\" | \"inputCopy\" | \"sheetProgress\" | \"statCardIncreased\" | \"statCardDecreased\" | \"statCardInfo\" | \"statCardError\" | \"statCardEmpty\" | \"statCardNoChange\" | \"timestampUtc\" | \"timestampRelative\" | \"timestampTimestamp\" | \"wizardStepsLabel\" | \"wizardStepsPosition\" | \"progressStep\" | \"wizardStepsFinish\" | \"wizardStepsComplete\" | \"wizardStepsCompleteHint\" | \"prorationPreviewLabel\" | \"prorationPreviewCurrentPlan\" | \"prorationPreviewNewPlan\" | \"prorationPreviewCredit\" | \"prorationPreviewCharge\" | \"prorationPreviewDueToday\" | \"prorationPreviewNextInvoice\" | \"prorationPreviewEffectiveNow\" | \"prorationPreviewEffectivePeriodEnd\" | \"codeTabsLabel\" | \"walletButtonsPayWith\" | \"walletButtonsDivider\"",
9863
+ "type": "\"search\" | \"clear\" | \"loading\" | \"next\" | \"cardFieldLabel\" | \"cardFieldNumber\" | \"cardFieldExpiry\" | \"cardFieldCvc\" | \"cardFieldName\" | \"cardFieldNumberError\" | \"cardFieldExpiryError\" | \"cardFieldCvcError\" | \"cardFieldNameError\" | \"billingActionFailed\" | \"close\" | \"dismiss\" | \"spinnerLabel\" | \"remove\" | \"removeItem\" | \"confirm\" | \"cancel\" | \"retry\" | \"tryAgain\" | \"back\" | \"more\" | \"showMore\" | \"showLess\" | \"selectEmpty\" | \"copied\" | \"copyFailed\" | \"copyToClipboard\" | \"loadMoreError\" | \"activityTimelineLoading\" | \"activityTimelineEmptyTitle\" | \"activityTimelineEmptyDescription\" | \"activityTimelineErrorTitle\" | \"activityTimelineErrorDescription\" | \"activityTimelineEnd\" | \"autocompleteShowSuggestions\" | \"comboboxShowOptions\" | \"breadcrumbLabel\" | \"codeBlockCopy\" | \"codeBlockLabel\" | \"dataGridSelectRow\" | \"dataGridSelectAll\" | \"dataGridSortBy\" | \"dataGridSortAscending\" | \"dataGridSortDescending\" | \"dataGridTime\" | \"datePresetToday\" | \"datePresetYesterday\" | \"datePresetLast7Days\" | \"datePresetLast30Days\" | \"datePresetThisWeek\" | \"datePresetThisMonth\" | \"datePresetLastMonth\" | \"datePresetMonthToDate\" | \"datePresetYearToDate\" | \"datePresetLastYear\" | \"dateRangeTitle\" | \"dateRangePresets\" | \"datePickerTitle\" | \"datePickerReset\" | \"datePickerApply\" | \"datePickerStartDate\" | \"datePickerEndDate\" | \"dateFilterPlaceholder\" | \"dateFilterClear\" | \"loadMore\" | \"loadMoreEnd\" | \"paginationLabel\" | \"paginationPrevious\" | \"paginationNext\" | \"paginationFirst\" | \"paginationLast\" | \"paginationPage\" | \"tablePaginationRowsPerPage\" | \"tablePaginationViewing\" | \"secretFieldReveal\" | \"secretFieldCopy\" | \"secretFieldRemasked\" | \"showMoreLabel\" | \"sidebarTitle\" | \"sidebarToggle\" | \"sidebarCollapse\" | \"sidebarExpand\" | \"sidebarMode\" | \"sidebarModeTest\" | \"sidebarModeLive\" | \"sidebarSwitchToLive\" | \"sidebarSwitchToTest\" | \"imageCropTitle\" | \"imageCropArea\" | \"imageCropApply\" | \"imageCropKeyboardHint\" | \"imageCropFailed\" | \"imageCropUnreadable\" | \"inputCopy\" | \"sheetProgress\" | \"statCardIncreased\" | \"statCardDecreased\" | \"statCardInfo\" | \"statCardError\" | \"statCardEmpty\" | \"statCardNoChange\" | \"timestampUtc\" | \"timestampRelative\" | \"timestampTimestamp\" | \"wizardStepsLabel\" | \"wizardStepsPosition\" | \"progressStep\" | \"wizardStepsFinish\" | \"wizardStepsComplete\" | \"wizardStepsCompleteHint\" | \"prorationPreviewLabel\" | \"prorationPreviewCurrentPlan\" | \"prorationPreviewNewPlan\" | \"prorationPreviewCredit\" | \"prorationPreviewCharge\" | \"prorationPreviewDueToday\" | \"prorationPreviewNextInvoice\" | \"prorationPreviewEffectiveNow\" | \"prorationPreviewEffectivePeriodEnd\" | \"codeTabsLabel\" | \"walletButtonsPayWith\" | \"walletButtonsDivider\"",
9821
9864
  "required": false,
9822
9865
  "description": "Built-in message that translates `label` under a `LocaleProvider` while `label` is still that\nmessage's English default. Custom presets leave it out and show `label` as given; a built-in\npreset you relabel (`{ ...preset, label: \"Past week\" }`) shows its new `label` too.",
9823
9866
  "source": "dodo"
@@ -10207,7 +10250,7 @@
10207
10250
  "title": "Data table",
10208
10251
  "category": "Data display",
10209
10252
  "status": "stable",
10210
- "description": "The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,\nthe rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and\n`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:\na table wider than its container scrolls sideways (the container is then a tab stop). It sets\n`aria-sort` on sortable headers and marks selected rows `data-state=\"selected\"`, tinted\nSurface/Secondary as on hover. Sorting, selection and pagination stay in the table\ninstance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`\n(16 below). After a sort change, the rows glide to their new positions (`animateSort`) and a polite\nlive region announces the new sort. `bulkActions` adds a sticky \"N selected\" bar with actions for\nthe selected rows.",
10253
+ "description": "The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,\nthe rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and\n`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:\na table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the\nless important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`\nto keep the first column in view. It sets\n`aria-sort` on sortable headers and marks selected rows `data-state=\"selected\"`, tinted\nSurface/Secondary as on hover. Sorting, selection and pagination stay in the table\ninstance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`\n(16 below). After a sort change, the rows glide to their new positions (`animateSort`) and a polite\nlive region announces the new sort. `bulkActions` adds a sticky \"N selected\" bar with actions for\nthe selected rows.",
10211
10254
  "importPath": "@dodopayments/ui/data-grid",
10212
10255
  "exports": [
10213
10256
  "DEFAULT_DATA_GRID_BULK_ACTION_LABELS",
@@ -10241,7 +10284,7 @@
10241
10284
  "parts": [
10242
10285
  {
10243
10286
  "name": "DataGrid",
10244
- "description": "The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,\nthe rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and\n`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:\na table wider than its container scrolls sideways (the container is then a tab stop). It sets\n`aria-sort` on sortable headers and marks selected rows `data-state=\"selected\"`, tinted\nSurface/Secondary as on hover. Sorting, selection and pagination stay in the table\ninstance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`\n(16 below). After a sort change, the rows glide to their new positions (`animateSort`) and a polite\nlive region announces the new sort. `bulkActions` adds a sticky \"N selected\" bar with actions for\nthe selected rows.",
10287
+ "description": "The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,\nthe rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and\n`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:\na table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the\nless important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`\nto keep the first column in view. It sets\n`aria-sort` on sortable headers and marks selected rows `data-state=\"selected\"`, tinted\nSurface/Secondary as on hover. Sorting, selection and pagination stay in the table\ninstance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`\n(16 below). After a sort change, the rows glide to their new positions (`animateSort`) and a polite\nlive region announces the new sort. `bulkActions` adds a sticky \"N selected\" bar with actions for\nthe selected rows.",
10245
10288
  "props": [
10246
10289
  {
10247
10290
  "name": "table",
@@ -10347,6 +10390,14 @@
10347
10390
  "description": "Follows a row's link in the same tab, e.g. `(href) => router.push(href)` for client-side routing.",
10348
10391
  "source": "dodo"
10349
10392
  },
10393
+ {
10394
+ "name": "pinFirstColumn",
10395
+ "type": "boolean",
10396
+ "required": false,
10397
+ "default": "false",
10398
+ "description": "Keep the first data column in view while a wide table scrolls sideways, next to the checkboxes if there are\nany, so each row stays identifiable on a phone. The columns passing under it fade.",
10399
+ "source": "dodo"
10400
+ },
10350
10401
  {
10351
10402
  "name": "size",
10352
10403
  "type": "\"md\" | \"lg\"",
@@ -10629,6 +10680,10 @@
10629
10680
  "name": "data-grid/loading-empty",
10630
10681
  "code": "\"use client\";\n\nimport { DataGrid, DataGridColumnHeader } from \"@dodopayments/ui/data-grid\";\nimport { Empty } from \"@dodopayments/ui/empty\";\nimport { ReceiptIcon } from \"@dodopayments/ui/icons\";\nimport { SegmentedControl } from \"@dodopayments/ui/segmented-control\";\nimport { type ColumnDef, getCoreRowModel, useReactTable } from \"@tanstack/react-table\";\nimport { useState } from \"react\";\n\ninterface Payout {\n id: string;\n date: string;\n amount: string;\n}\n\nconst columns: ColumnDef<Payout>[] = [\n {\n accessorKey: \"id\",\n header: ({ column }) => <DataGridColumnHeader column={column} title=\"Payout ID\" />,\n enableSorting: false,\n meta: { cellClassName: \"font-mono\" },\n },\n { accessorKey: \"date\", header: \"Date\" },\n { accessorKey: \"amount\", header: \"Amount\", meta: { cellClassName: \"tabular-nums\" } },\n];\n\ntype Mode = \"loading\" | \"empty\";\n\n// One array for every render: a new `[]` each time would make TanStack reset the page on every render.\nconst NO_PAYOUTS: Payout[] = [];\n\nexport default function DataGridLoadingEmpty() {\n const [mode, setMode] = useState<Mode>(\"loading\");\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table returns a mutable instance by design.\n const table = useReactTable({\n data: NO_PAYOUTS,\n columns,\n getCoreRowModel: getCoreRowModel(),\n initialState: { pagination: { pageIndex: 0, pageSize: 4 } },\n });\n\n return (\n <div className=\"flex w-full min-w-0 flex-col gap-2.5\">\n <SegmentedControl\n aria-label=\"Table state\"\n className=\"self-start\"\n value={mode}\n onValueChange={(value) => setMode(value as Mode)}\n items={[\n { value: \"loading\", label: \"Loading\" },\n { value: \"empty\", label: \"Empty\" },\n ]}\n />\n <DataGrid\n table={table}\n aria-label=\"Payouts\"\n isLoading={mode === \"loading\"}\n emptyMessage={\n <Empty\n className=\"py-10\"\n icon={<ReceiptIcon />}\n title=\"No payouts yet\"\n description=\"Payouts appear here once your balance is settled.\"\n />\n }\n />\n </div>\n );\n}"
10631
10682
  },
10683
+ {
10684
+ "name": "data-grid/phone",
10685
+ "code": "\"use client\";\n\nimport { Badge } from \"@dodopayments/ui/badge\";\nimport { DataGrid } from \"@dodopayments/ui/data-grid\";\nimport { type ColumnDef, getCoreRowModel, useReactTable } from \"@tanstack/react-table\";\n\ninterface Payment {\n id: string;\n customer: string;\n method: string;\n created: string;\n status: \"succeeded\" | \"failed\" | \"processing\";\n amount: string;\n}\n\nconst payments: Payment[] = [\n {\n id: \"pay_8Hq2Xa\",\n customer: \"ada@lovelace.dev\",\n method: \"Visa •••• 4242\",\n created: \"Nov 26, 09:14\",\n status: \"succeeded\",\n amount: \"$49.00\",\n },\n {\n id: \"pay_3Kd9Pm\",\n customer: \"grace@hopper.io\",\n method: \"UPI\",\n created: \"Nov 26, 08:51\",\n status: \"processing\",\n amount: \"$120.00\",\n },\n {\n id: \"pay_7Tn4Ws\",\n customer: \"alan@turing.org\",\n method: \"Mastercard •••• 4444\",\n created: \"Nov 25, 22:07\",\n status: \"failed\",\n amount: \"$19.00\",\n },\n {\n id: \"pay_1Bz6Lc\",\n customer: \"katherine@johnson.space\",\n method: \"Apple Pay\",\n created: \"Nov 25, 18:30\",\n status: \"succeeded\",\n amount: \"$240.00\",\n },\n];\n\nconst columns: ColumnDef<Payment>[] = [\n { accessorKey: \"id\", header: \"Payment\", meta: { cellClassName: \"font-mono\" } },\n {\n accessorKey: \"status\",\n header: \"Status\",\n cell: ({ row }) => <Badge status={row.original.status} kind=\"payment\" />,\n },\n { accessorKey: \"amount\", header: \"Amount\", meta: { cellClassName: \"tabular-nums\" } },\n // Hidden while the table is under 448px wide: a phone.\n { accessorKey: \"customer\", header: \"Customer\", meta: { priority: 2 } },\n // Hidden while it is under 672px wide: a phone or a narrow panel.\n { accessorKey: \"method\", header: \"Method\", meta: { priority: 3 } },\n { accessorKey: \"created\", header: \"Created\", meta: { priority: 3 } },\n];\n\nexport default function DataGridPhone() {\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table returns a mutable instance by design.\n const table = useReactTable({\n data: payments,\n columns,\n getRowId: (row) => row.id,\n getCoreRowModel: getCoreRowModel(),\n });\n\n return (\n <div className=\"w-full min-w-0\">\n <DataGrid table={table} aria-label=\"Payments\" pinFirstColumn />\n </div>\n );\n}"
10686
+ },
10632
10687
  {
10633
10688
  "name": "data-grid/row-hover",
10634
10689
  "code": "\"use client\";\n\nimport { DataGrid, DataGridPagination } from \"@dodopayments/ui/data-grid\";\nimport {\n type ColumnDef,\n getCoreRowModel,\n getPaginationRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\n\ninterface Customer {\n id: string;\n name: string;\n email: string;\n}\n\nconst customers: Customer[] = Array.from({ length: 14 }, (_, i) => ({\n id: `cus_${(9100 + i * 13).toString(36)}`,\n name: `Customer ${i + 1}`,\n email: `customer${i + 1}@example.com`,\n}));\n\nconst columns: ColumnDef<Customer>[] = [\n { accessorKey: \"name\", header: \"Name\" },\n { accessorKey: \"email\", header: \"Email\" },\n { accessorKey: \"id\", header: \"Customer ID\", meta: { cellClassName: \"font-mono\" } },\n];\n\nexport default function DataGridRowHover() {\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table returns a mutable instance by design.\n const table = useReactTable({\n data: customers,\n columns,\n getRowId: (row) => row.id,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: { pagination: { pageIndex: 0, pageSize: 5 } },\n });\n\n return (\n <div className=\"flex w-full min-w-0 flex-col gap-2.5\">\n <DataGrid table={table} aria-label=\"Customers\" />\n <DataGridPagination table={table} showRowsPerPage={false} />\n </div>\n );\n}"
@@ -11072,6 +11127,14 @@
11072
11127
  "description": "Placeholder and accessible name of the search input in the popup.",
11073
11128
  "source": "dodo"
11074
11129
  },
11130
+ {
11131
+ "name": "size",
11132
+ "type": "\"default\" | \"sm\"",
11133
+ "required": false,
11134
+ "default": "\"default\"",
11135
+ "description": "Trigger height: 36, or the compact 28 of `SelectTrigger` `size=\"sm\"`.",
11136
+ "source": "dodo"
11137
+ },
11075
11138
  {
11076
11139
  "name": "value",
11077
11140
  "type": "string | null",
@@ -11248,6 +11311,14 @@
11248
11311
  "description": "Placeholder and accessible name of the search input in the popup.",
11249
11312
  "source": "dodo"
11250
11313
  },
11314
+ {
11315
+ "name": "size",
11316
+ "type": "\"default\" | \"sm\"",
11317
+ "required": false,
11318
+ "default": "\"default\"",
11319
+ "description": "Trigger height: 36, or the compact 28 of `SelectTrigger` `size=\"sm\"`.",
11320
+ "source": "dodo"
11321
+ },
11251
11322
  {
11252
11323
  "name": "value",
11253
11324
  "type": "string | null",
@@ -11321,10 +11392,10 @@
11321
11392
  },
11322
11393
  {
11323
11394
  "name": "size",
11324
- "type": "\"lg\"",
11395
+ "type": "\"sm\" | \"lg\"",
11325
11396
  "required": false,
11326
11397
  "default": "\"lg\"",
11327
- "description": "Input height, as `Input` (`DODO_INPUT_VARIANTS`): one size, `lg` 36.",
11398
+ "description": "Input height, as `Input` (`DODO_INPUT_VARIANTS`): `lg` 36 or the compact `sm` 28.",
11328
11399
  "source": "dodo"
11329
11400
  },
11330
11401
  {
@@ -11477,6 +11548,14 @@
11477
11548
  "description": "Placeholder and accessible name of the search input in the popup.",
11478
11549
  "source": "dodo"
11479
11550
  },
11551
+ {
11552
+ "name": "size",
11553
+ "type": "\"default\" | \"sm\"",
11554
+ "required": false,
11555
+ "default": "\"default\"",
11556
+ "description": "Trigger height: 36, or the compact 28 of `SelectTrigger` `size=\"sm\"`.",
11557
+ "source": "dodo"
11558
+ },
11480
11559
  {
11481
11560
  "name": "timeZones",
11482
11561
  "type": "readonly string[]",
@@ -11758,7 +11837,7 @@
11758
11837
  },
11759
11838
  {
11760
11839
  "name": "size",
11761
- "type": "\"default\" | \"icon\" | \"xs\" | \"lg\" | \"icon-xs\" | \"icon-lg\" | null",
11840
+ "type": "\"default\" | \"sm\" | \"icon\" | \"xs\" | \"lg\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\" | null",
11762
11841
  "required": false,
11763
11842
  "description": "",
11764
11843
  "source": "dodo"
@@ -11872,17 +11951,17 @@
11872
11951
  "description": "Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout\npage in an `iframe` beside its settings. The frame keeps the content's aspect ratio and never scales\nit up. The content stays a live page; put a cover over it when it should not take clicks.",
11873
11952
  "props": [
11874
11953
  {
11875
- "name": "height",
11954
+ "name": "width",
11876
11955
  "type": "number",
11877
11956
  "required": true,
11878
- "description": "The height the content is laid out at, in px.",
11957
+ "description": "The width the content is laid out at, in px, e.g. 1280 for a desktop page.",
11879
11958
  "source": "dodo"
11880
11959
  },
11881
11960
  {
11882
- "name": "width",
11961
+ "name": "height",
11883
11962
  "type": "number",
11884
- "required": true,
11885
- "description": "The width the content is laid out at, in px, e.g. 1280 for a desktop page.",
11963
+ "required": false,
11964
+ "description": "The height the content is laid out at, in px. Leave it out for content that sets its own height,\nsuch as a document page that grows with its lines: the frame then follows it, scaled. The height\nis measured in the browser, so server-rendered HTML has a 0 tall frame until it hydrates.",
11886
11965
  "source": "dodo"
11887
11966
  }
11888
11967
  ]
@@ -11995,7 +12074,7 @@
11995
12074
  },
11996
12075
  {
11997
12076
  "name": "Dialog",
11998
- "description": "Root of a modal dialog, centred on the screen. Controls open state (`open`/`onOpenChange` or `defaultOpen`).\n`alert` makes it an alert dialog for confirmations.",
12077
+ "description": "Root of a modal dialog, centred on the screen; with `mobileSheet` it is a bottom drawer on a phone. Controls open\nstate (`open`/`onOpenChange` or `defaultOpen`). `alert` makes it an alert dialog for confirmations.",
11999
12078
  "props": [
12000
12079
  {
12001
12080
  "name": "alert",
@@ -12005,6 +12084,14 @@
12005
12084
  "description": "An alert dialog: it interrupts to confirm or acknowledge something (`role=\"alertdialog\"`). Clicking the backdrop\ndoes not close it and `DialogContent` has no close button, so always offer an explicit Cancel in the footer.\nEscape still closes it. `ConfirmDialog` is a ready-made one.",
12006
12085
  "source": "dodo"
12007
12086
  },
12087
+ {
12088
+ "name": "mobileSheet",
12089
+ "type": "boolean",
12090
+ "required": false,
12091
+ "default": "false",
12092
+ "description": "Below 640px, show the dialog as a bottom drawer: docked to the bottom edge at full width, closed with a swipe\ndown as well as the scrim, Escape and the close button, with the actions sharing the footer row. Off by default:\nthe dialog stays centred at every width. Do not set it when the body has its own drag gesture. An alert dialog\nis always centred.",
12093
+ "source": "dodo"
12094
+ },
12008
12095
  {
12009
12096
  "name": "actionsRef",
12010
12097
  "type": "RefObject<DialogRootActions | null>",
@@ -12165,6 +12252,13 @@
12165
12252
  "description": "The icon in the tile, a Nucleo icon (16px at `md`, 12px at `sm`): `<FeaturedIcon icon={<KeyIcon />} />`.",
12166
12253
  "source": "dodo"
12167
12254
  },
12255
+ {
12256
+ "name": "look",
12257
+ "type": "\"tile\" | \"sphere\"",
12258
+ "required": false,
12259
+ "description": "`tile`: The rounded square with a soft fill and two borders (the default).\n`sphere`: The dashboard's glossy round badge in the tone, a white icon on it (44px at `md`, 28px at `sm`), as the\nverification checklist shows each step.",
12260
+ "source": "dodo"
12261
+ },
12168
12262
  {
12169
12263
  "name": "size",
12170
12264
  "type": "\"sm\" | \"md\" | null",
@@ -12489,6 +12583,376 @@
12489
12583
  ],
12490
12584
  "docsUrl": "/components/dialog"
12491
12585
  },
12586
+ {
12587
+ "slug": "drawer",
12588
+ "title": "Drawer",
12589
+ "category": "Overlays",
12590
+ "status": "stable",
12591
+ "description": "The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray\nwith rounded top corners, like Dialog: the title and body in a white panel, the actions on the grey strip. It is\nas tall as its content, up to the screen minus 48, and pads the bottom safe area; a focused field stays above the\nsoftware keyboard. Always include a `DrawerTitle`; lay it out as `DrawerHeader`, `DrawerPanel` and `DrawerFooter`.",
12592
+ "importPath": "@dodopayments/ui/drawer",
12593
+ "exports": [
12594
+ "Drawer",
12595
+ "DrawerClose",
12596
+ "DrawerCloseProps",
12597
+ "DrawerContent",
12598
+ "DrawerContentProps",
12599
+ "DrawerDescription",
12600
+ "DrawerDescriptionProps",
12601
+ "DrawerFooter",
12602
+ "DrawerFooterProps",
12603
+ "DrawerHeader",
12604
+ "DrawerHeaderProps",
12605
+ "DrawerPanel",
12606
+ "DrawerPanelProps",
12607
+ "DrawerProps",
12608
+ "DrawerTitle",
12609
+ "DrawerTitleProps",
12610
+ "DrawerTrigger",
12611
+ "DrawerTriggerProps"
12612
+ ],
12613
+ "parts": [
12614
+ {
12615
+ "name": "DrawerContent",
12616
+ "description": "The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray\nwith rounded top corners, like Dialog: the title and body in a white panel, the actions on the grey strip. It is\nas tall as its content, up to the screen minus 48, and pads the bottom safe area; a focused field stays above the\nsoftware keyboard. Always include a `DrawerTitle`; lay it out as `DrawerHeader`, `DrawerPanel` and `DrawerFooter`.",
12617
+ "props": [
12618
+ {
12619
+ "name": "className",
12620
+ "type": "string",
12621
+ "required": false,
12622
+ "description": "Additional Tailwind classes, merged last.",
12623
+ "source": "dodo"
12624
+ },
12625
+ {
12626
+ "name": "closeLabel",
12627
+ "type": "string",
12628
+ "required": false,
12629
+ "default": "\"Close\"",
12630
+ "description": "Accessible label for the close button.",
12631
+ "source": "dodo"
12632
+ },
12633
+ {
12634
+ "name": "hideCloseButton",
12635
+ "type": "boolean",
12636
+ "required": false,
12637
+ "default": "false",
12638
+ "description": "Hide the close button. The scrim, Escape and a swipe down still close the drawer.",
12639
+ "source": "dodo"
12640
+ },
12641
+ {
12642
+ "name": "hideHandle",
12643
+ "type": "boolean",
12644
+ "required": false,
12645
+ "default": "false",
12646
+ "description": "Hide the drag handle on top. The drawer still closes with a swipe down.",
12647
+ "source": "dodo"
12648
+ },
12649
+ {
12650
+ "name": "portalProps",
12651
+ "type": "DrawerPortalProps",
12652
+ "required": false,
12653
+ "description": "Props for the portal, e.g. a `container` to render the drawer into instead of `document.body`.",
12654
+ "source": "dodo"
12655
+ },
12656
+ {
12657
+ "name": "finalFocus",
12658
+ "type": "boolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | void | HTMLElement | null)",
12659
+ "required": false,
12660
+ "description": "Determines the element to focus when the drawer is closed.\n\n- `false`: Do not move focus.\n- `true`: Move focus based on the default behavior (trigger or previously focused element).\n- `RefObject`: Move focus to the ref element.\n- `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).\n Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.",
12661
+ "source": "base-ui"
12662
+ },
12663
+ {
12664
+ "name": "initialFocus",
12665
+ "type": "boolean | RefObject<HTMLElement | null> | ((openType: InteractionType) => boolean | void | HTMLElement | null)",
12666
+ "required": false,
12667
+ "description": "Determines the element to focus when the drawer is opened.\n\n- `false`: Do not move focus.\n- `true`: Move focus based on the default behavior (first tabbable element or popup).\n- `RefObject`: Move focus to the ref element.\n- `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).\n Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.",
12668
+ "source": "base-ui"
12669
+ },
12670
+ {
12671
+ "name": "render",
12672
+ "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, DrawerPopupState>",
12673
+ "required": false,
12674
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
12675
+ "source": "base-ui"
12676
+ }
12677
+ ]
12678
+ },
12679
+ {
12680
+ "name": "Drawer",
12681
+ "description": "Root of a drawer: a modal panel that slides up from the bottom edge and closes with a swipe down, a tap on the\nscrim or Escape (the `Drawer` primitive on Base UI Drawer). Controls open state (`open` / `onOpenChange` or\n`defaultOpen`). `snapPoints` (fractions of the viewport, or px / rem lengths) let it rest at several heights.\nBuilt for phones: on wide screens use a `Dialog` or a `Sheet`.",
12682
+ "props": [
12683
+ {
12684
+ "name": "actionsRef",
12685
+ "type": "RefObject<DrawerRootActions | null>",
12686
+ "required": false,
12687
+ "description": "A ref to imperative actions.\n- `unmount`: Manually unmounts the drawer.\nCall this after any externally controlled closing animation finishes.\n- `close`: Closes the drawer imperatively when called.",
12688
+ "source": "base-ui"
12689
+ },
12690
+ {
12691
+ "name": "defaultOpen",
12692
+ "type": "boolean",
12693
+ "required": false,
12694
+ "default": "false",
12695
+ "description": "Whether the drawer is initially open.\n\nTo render a controlled drawer, use the `open` prop instead.",
12696
+ "source": "base-ui"
12697
+ },
12698
+ {
12699
+ "name": "defaultSnapPoint",
12700
+ "type": "DrawerSnapPoint | null",
12701
+ "required": false,
12702
+ "description": "The initial snap point value when uncontrolled.",
12703
+ "source": "base-ui"
12704
+ },
12705
+ {
12706
+ "name": "defaultTriggerId",
12707
+ "type": "string | null",
12708
+ "required": false,
12709
+ "description": "ID of the trigger that the drawer is associated with.\nThis is useful in conjunction with the `defaultOpen` prop to create an initially open drawer.",
12710
+ "source": "base-ui"
12711
+ },
12712
+ {
12713
+ "name": "disablePointerDismissal",
12714
+ "type": "boolean",
12715
+ "required": false,
12716
+ "default": "false",
12717
+ "description": "Whether to prevent the drawer from closing on outside presses.\nFor non-modal drawers, this also prevents the drawer from closing when focus moves outside of it.",
12718
+ "source": "base-ui"
12719
+ },
12720
+ {
12721
+ "name": "handle",
12722
+ "type": "DrawerHandle<unknown>",
12723
+ "required": false,
12724
+ "description": "A handle to associate the drawer with a trigger.\nIf specified, allows detached triggers to control the drawer's open state.\nCan be created with the Drawer.createHandle() method.",
12725
+ "source": "base-ui"
12726
+ },
12727
+ {
12728
+ "name": "modal",
12729
+ "type": "boolean | \"trap-focus\"",
12730
+ "required": false,
12731
+ "default": "true",
12732
+ "description": "Determines if the drawer enters a modal state when open.\n- `true`: user interaction is limited to just the drawer: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.\n- `false`: user interaction with the rest of the document is allowed.\n- `'trap-focus'`: focus is trapped inside the drawer, but document page scroll is not locked and pointer interactions outside of it remain enabled.",
12733
+ "source": "base-ui"
12734
+ },
12735
+ {
12736
+ "name": "onOpenChange",
12737
+ "type": "((open: boolean, eventDetails: DrawerRootChangeEventDetails) => void)",
12738
+ "required": false,
12739
+ "description": "Event handler called when the drawer is opened or closed.",
12740
+ "source": "base-ui"
12741
+ },
12742
+ {
12743
+ "name": "onOpenChangeComplete",
12744
+ "type": "((open: boolean) => void)",
12745
+ "required": false,
12746
+ "description": "Event handler called after any animations complete when the drawer is opened or closed.",
12747
+ "source": "base-ui"
12748
+ },
12749
+ {
12750
+ "name": "onSnapPointChange",
12751
+ "type": "((snapPoint: DrawerSnapPoint | null, eventDetails: DrawerRootSnapPointChangeEventDetails) => void)",
12752
+ "required": false,
12753
+ "description": "Callback fired when the snap point changes.",
12754
+ "source": "base-ui"
12755
+ },
12756
+ {
12757
+ "name": "open",
12758
+ "type": "boolean",
12759
+ "required": false,
12760
+ "description": "Whether the drawer is currently open.",
12761
+ "source": "base-ui"
12762
+ },
12763
+ {
12764
+ "name": "snapPoint",
12765
+ "type": "DrawerSnapPoint | null",
12766
+ "required": false,
12767
+ "description": "The currently active snap point. Use with `onSnapPointChange` to control the snap point.",
12768
+ "source": "base-ui"
12769
+ },
12770
+ {
12771
+ "name": "snapPoints",
12772
+ "type": "DrawerSnapPoint[]",
12773
+ "required": false,
12774
+ "description": "Snap points used to position the drawer.\nUse numbers between 0 and 1 to represent fractions of the viewport height,\nnumbers greater than 1 as pixel values, or strings in `px`/`rem` units\n(for example, `'148px'` or `'30rem'`).",
12775
+ "source": "base-ui"
12776
+ },
12777
+ {
12778
+ "name": "snapToSequentialPoints",
12779
+ "type": "boolean",
12780
+ "required": false,
12781
+ "default": "false",
12782
+ "description": "Disables velocity-based snap skipping so drag distance determines the next snap point.",
12783
+ "source": "base-ui"
12784
+ },
12785
+ {
12786
+ "name": "triggerId",
12787
+ "type": "string | null",
12788
+ "required": false,
12789
+ "description": "ID of the trigger that the drawer is associated with.\nThis is useful in conjunction with the `open` prop to create a controlled drawer.\nThere's no need to specify this prop when the drawer is uncontrolled (that is, when the `open` prop is not set).",
12790
+ "source": "base-ui"
12791
+ }
12792
+ ]
12793
+ },
12794
+ {
12795
+ "name": "DrawerClose",
12796
+ "description": "Closes the drawer. Use `render={<Button variant=\"secondary\" />}` for a footer action.",
12797
+ "props": [
12798
+ {
12799
+ "name": "className",
12800
+ "type": "string",
12801
+ "required": false,
12802
+ "description": "Additional Tailwind classes, merged last.",
12803
+ "source": "dodo"
12804
+ },
12805
+ {
12806
+ "name": "nativeButton",
12807
+ "type": "boolean",
12808
+ "required": false,
12809
+ "default": "true",
12810
+ "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`).",
12811
+ "source": "base-ui"
12812
+ },
12813
+ {
12814
+ "name": "render",
12815
+ "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, DrawerCloseState>",
12816
+ "required": false,
12817
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
12818
+ "source": "base-ui"
12819
+ }
12820
+ ]
12821
+ },
12822
+ {
12823
+ "name": "DrawerDescription",
12824
+ "description": "One or two lines under the title; becomes the drawer's accessible description.",
12825
+ "props": [
12826
+ {
12827
+ "name": "className",
12828
+ "type": "string",
12829
+ "required": false,
12830
+ "description": "Additional Tailwind classes, merged last.",
12831
+ "source": "dodo"
12832
+ },
12833
+ {
12834
+ "name": "render",
12835
+ "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, DrawerDescriptionState>",
12836
+ "required": false,
12837
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
12838
+ "source": "base-ui"
12839
+ }
12840
+ ]
12841
+ },
12842
+ {
12843
+ "name": "DrawerFooter",
12844
+ "description": "The actions, on the grey strip under the panel. They share the row: cancel first, the primary action last.",
12845
+ "props": []
12846
+ },
12847
+ {
12848
+ "name": "DrawerHeader",
12849
+ "description": "The top of the white panel: `DrawerTitle` and an optional `DrawerDescription`.",
12850
+ "props": []
12851
+ },
12852
+ {
12853
+ "name": "DrawerPanel",
12854
+ "description": "The body of the white panel. It scrolls inside the drawer, under the header and above the footer.",
12855
+ "props": [
12856
+ {
12857
+ "name": "scrollFade",
12858
+ "type": "boolean",
12859
+ "required": false,
12860
+ "default": "true",
12861
+ "description": "Fade the content at the edges it scrolls under.",
12862
+ "source": "dodo"
12863
+ }
12864
+ ]
12865
+ },
12866
+ {
12867
+ "name": "DrawerTitle",
12868
+ "description": "The drawer's accessible name. Required.",
12869
+ "props": [
12870
+ {
12871
+ "name": "className",
12872
+ "type": "string",
12873
+ "required": false,
12874
+ "description": "Additional Tailwind classes, merged last.",
12875
+ "source": "dodo"
12876
+ },
12877
+ {
12878
+ "name": "render",
12879
+ "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, DrawerTitleState>",
12880
+ "required": false,
12881
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
12882
+ "source": "base-ui"
12883
+ }
12884
+ ]
12885
+ },
12886
+ {
12887
+ "name": "DrawerTrigger",
12888
+ "description": "Opens the drawer. Use `render={<Button />}` to style it as a Dodo button.",
12889
+ "props": [
12890
+ {
12891
+ "name": "className",
12892
+ "type": "string",
12893
+ "required": false,
12894
+ "description": "Additional Tailwind classes, merged last.",
12895
+ "source": "dodo"
12896
+ },
12897
+ {
12898
+ "name": "handle",
12899
+ "type": "DrawerHandle<unknown>",
12900
+ "required": false,
12901
+ "description": "A handle to associate the trigger with a drawer.\nCan be created with the Drawer.createHandle() method.",
12902
+ "source": "base-ui"
12903
+ },
12904
+ {
12905
+ "name": "id",
12906
+ "type": "string",
12907
+ "required": false,
12908
+ "description": "ID of the trigger. In addition to being forwarded to the rendered element,\nit is also used to specify the active trigger for drawers in controlled mode (with the Drawer.Root `triggerId` prop).",
12909
+ "source": "base-ui"
12910
+ },
12911
+ {
12912
+ "name": "nativeButton",
12913
+ "type": "boolean",
12914
+ "required": false,
12915
+ "default": "true",
12916
+ "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`).",
12917
+ "source": "base-ui"
12918
+ },
12919
+ {
12920
+ "name": "payload",
12921
+ "type": "unknown",
12922
+ "required": false,
12923
+ "description": "A payload to pass to the drawer when it is opened.",
12924
+ "source": "base-ui"
12925
+ },
12926
+ {
12927
+ "name": "render",
12928
+ "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, DrawerTriggerState>",
12929
+ "required": false,
12930
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
12931
+ "source": "base-ui"
12932
+ }
12933
+ ]
12934
+ }
12935
+ ],
12936
+ "examples": [
12937
+ {
12938
+ "name": "drawer/basic",
12939
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerPanel,\n DrawerTitle,\n DrawerTrigger,\n} from \"@dodopayments/ui/drawer\";\nimport { Field, FieldDescription, FieldLabel } from \"@dodopayments/ui/field\";\nimport { Input } from \"@dodopayments/ui/input\";\n\nexport default function DrawerBasic() {\n return (\n <Drawer>\n <DrawerTrigger render={<Button variant=\"secondary\" />}>Initiate refund</DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Initiate refund</DrawerTitle>\n <DrawerDescription>Payment pay_7Hq2Xa…Lm3d · $49.00 · Visa •••• 4242</DrawerDescription>\n </DrawerHeader>\n <DrawerPanel>\n <div className=\"flex flex-col gap-4\">\n <Field>\n <FieldLabel>Amount</FieldLabel>\n <Input type=\"money\" currency=\"USD\" defaultValue={4900} />\n </Field>\n <Field>\n <FieldLabel>Reason</FieldLabel>\n <FieldDescription>Shown to the customer on the refund receipt.</FieldDescription>\n <Input placeholder=\"Duplicate charge\" />\n </Field>\n </div>\n </DrawerPanel>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"secondary\" />}>Cancel</DrawerClose>\n <DrawerClose render={<Button />}>Refund $49.00</DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}"
12940
+ },
12941
+ {
12942
+ "name": "drawer/master",
12943
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from \"@dodopayments/ui/drawer\";\n\nexport default function DrawerMaster() {\n return (\n <Drawer>\n <DrawerTrigger render={<Button variant=\"secondary\" />}>Open drawer</DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Pause subscription?</DrawerTitle>\n <DrawerDescription>\n Billing stops today. The customer keeps access until 14 December.\n </DrawerDescription>\n </DrawerHeader>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"secondary\" />}>Cancel</DrawerClose>\n <DrawerClose render={<Button variant=\"warning\" />}>Pause</DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}"
12944
+ },
12945
+ {
12946
+ "name": "drawer/nested",
12947
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from \"@dodopayments/ui/drawer\";\n\nexport default function DrawerNested() {\n return (\n <Drawer>\n <DrawerTrigger render={<Button variant=\"secondary\" />}>Cancel subscription</DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Cancel subscription</DrawerTitle>\n <DrawerDescription>\n Pro plan · $49.00 a month. The customer keeps access until 14 December.\n </DrawerDescription>\n </DrawerHeader>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"secondary\" />}>Keep it</DrawerClose>\n <Drawer>\n <DrawerTrigger render={<Button variant=\"destructive\" />}>Cancel now</DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Cancel right away?</DrawerTitle>\n <DrawerDescription>\n Access ends now and the unused days are not refunded.\n </DrawerDescription>\n </DrawerHeader>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"secondary\" />}>Back</DrawerClose>\n <DrawerClose render={<Button variant=\"destructive\" />}>Cancel now</DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}"
12948
+ },
12949
+ {
12950
+ "name": "drawer/snap-points",
12951
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n Drawer,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerPanel,\n DrawerTitle,\n DrawerTrigger,\n} from \"@dodopayments/ui/drawer\";\n\nconst EVENTS = [\n \"payment.succeeded\",\n \"payment.failed\",\n \"refund.succeeded\",\n \"subscription.active\",\n \"subscription.on_hold\",\n \"subscription.renewed\",\n \"subscription.cancelled\",\n \"dispute.opened\",\n \"dispute.won\",\n \"dispute.lost\",\n \"license_key.created\",\n \"payout.succeeded\",\n];\n\nexport default function DrawerSnapPoints() {\n return (\n <Drawer snapPoints={[0.5, 1]}>\n <DrawerTrigger render={<Button variant=\"secondary\" />}>Webhook events</DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Webhook events</DrawerTitle>\n <DrawerDescription>Drag up to see the full list.</DrawerDescription>\n </DrawerHeader>\n <DrawerPanel>\n <ul className=\"flex flex-col gap-3\">\n {EVENTS.map((event) => (\n <li key={event} className=\"text-mono-primary text-foreground\">\n {event}\n </li>\n ))}\n </ul>\n </DrawerPanel>\n </DrawerContent>\n </Drawer>\n );\n}"
12952
+ }
12953
+ ],
12954
+ "docsUrl": "/components/drawer"
12955
+ },
12492
12956
  {
12493
12957
  "slug": "direction-provider",
12494
12958
  "title": "Direction Provider",
@@ -12931,7 +13395,7 @@
12931
13395
  },
12932
13396
  {
12933
13397
  "name": "size",
12934
- "type": "\"lg\" | null",
13398
+ "type": "\"sm\" | \"lg\" | null",
12935
13399
  "required": false,
12936
13400
  "description": "",
12937
13401
  "source": "dodo"
@@ -13508,7 +13972,7 @@
13508
13972
  },
13509
13973
  {
13510
13974
  "name": "size",
13511
- "type": "\"default\" | \"icon\" | \"xs\" | \"lg\" | \"icon-xs\" | \"icon-lg\" | null",
13975
+ "type": "\"default\" | \"sm\" | \"icon\" | \"xs\" | \"lg\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\" | null",
13512
13976
  "required": false,
13513
13977
  "description": "",
13514
13978
  "source": "dodo"
@@ -13722,23 +14186,102 @@
13722
14186
  "description": "Format a byte count for display: \"0 B\", \"512 B\", \"1.5 KB\", \"10 MB\".",
13723
14187
  "members": [
13724
14188
  {
13725
- "signature": "formatFileSize(bytes: number): string",
13726
- "description": "Format a byte count for display: \"0 B\", \"512 B\", \"1.5 KB\", \"10 MB\"."
14189
+ "signature": "formatFileSize(bytes: number): string",
14190
+ "description": "Format a byte count for display: \"0 B\", \"512 B\", \"1.5 KB\", \"10 MB\"."
14191
+ }
14192
+ ]
14193
+ }
14194
+ ],
14195
+ "examples": [
14196
+ {
14197
+ "name": "file-upload/master",
14198
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n FileUpload,\n FileUploadFooter,\n FileUploadItem,\n FileUploadList,\n FileUploadTray,\n formatFileSize,\n} from \"@dodopayments/ui/file-upload\";\nimport { useEffect, useRef, useState } from \"react\";\n\nconst MAX_SIZE = 20 * 1024 * 1024;\nconst MB = 1024 * 1024;\n\ninterface Upload {\n id: number;\n name: string;\n size: number;\n type: string;\n progress: number;\n error?: string;\n}\n\nexport default function FileUploadMaster() {\n const [uploads, setUploads] = useState<Upload[]>([]);\n const nextId = useRef(0);\n const uploading = uploads.some((upload) => !upload.error && upload.progress < 100);\n\n const add = (files: { name: string; size: number; type: string }[]) => {\n setUploads((current) => [\n ...current,\n ...files.map((file) => {\n nextId.current += 1;\n return {\n id: nextId.current,\n ...file,\n progress: 0,\n error:\n file.size > MAX_SIZE\n ? `${formatFileSize(file.size)} · Over the 20 MB limit`\n : undefined,\n };\n }),\n ]);\n };\n\n // Simulated upload: small files finish first.\n useEffect(() => {\n if (!uploading) return undefined;\n const timer = setInterval(() => {\n setUploads((current) =>\n current.map((upload) =>\n upload.error || upload.progress >= 100\n ? upload\n : { ...upload, progress: Math.min(100, upload.progress + (40 * MB) / upload.size) },\n ),\n );\n }, 120);\n return () => clearInterval(timer);\n }, [uploading]);\n\n const done = uploads.filter((upload) => !upload.error && upload.progress >= 100).length;\n const failed = uploads.filter((upload) => upload.error).length;\n\n return (\n <div className=\"flex w-full max-w-120 flex-col gap-1 rounded-2xl border border-border bg-muted p-1 shadow-lg/5\">\n <div className=\"flex flex-col gap-4 rounded-xl bg-background p-5 shadow-xs/5\">\n <span className=\"font-heading text-heading-tertiary text-foreground\">Upload files</span>\n <FileUploadTray>\n <FileUpload\n multiple\n description=\"PDF, DOCX, FIG or images (max 20MB each)\"\n onFilesAdded={add}\n onFilesRejected={(rejections) => add(rejections.map((rejection) => rejection.file))}\n maxSize={MAX_SIZE}\n />\n <FileUploadList aria-label=\"Uploads\">\n {uploads.map((upload) => (\n <FileUploadItem\n key={upload.id}\n name={upload.name}\n size={upload.size}\n type={upload.type}\n progress={upload.error ? undefined : upload.progress}\n error={upload.error}\n onRemove={() =>\n setUploads((current) => current.filter((item) => item.id !== upload.id))\n }\n onReplace={() =>\n setUploads((current) =>\n current.map((item) =>\n item.id === upload.id ? { ...item, progress: 0 } : item,\n ),\n )\n }\n />\n ))}\n </FileUploadList>\n {uploads.length > 0 ? (\n <FileUploadFooter\n summary={`${String(done)} of ${String(uploads.length)} uploaded${failed ? ` · ${String(failed)} failed` : \"\"}`}\n onRemoveAll={() => setUploads([])}\n />\n ) : null}\n </FileUploadTray>\n </div>\n <div className=\"flex justify-end gap-2 p-1 ps-0\">\n <Button variant=\"secondary\" onClick={() => setUploads([])}>\n Cancel\n </Button>\n {/* The tray shows the upload progress, so Done just waits for it. */}\n <Button disabled={uploading}>Done</Button>\n </div>\n </div>\n );\n}"
14199
+ },
14200
+ {
14201
+ "name": "file-upload/single",
14202
+ "code": "\"use client\";\n\nimport { FileUpload, FileUploadItem, FileUploadList } from \"@dodopayments/ui/file-upload\";\nimport { useEffect, useState } from \"react\";\n\nconst MAX_SIZE = 5 * 1024 * 1024;\n\nexport default function FileUploadSingle() {\n const [file, setFile] = useState<{\n name: string;\n size: number;\n type: string;\n preview: string;\n } | null>(null);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | undefined>();\n\n useEffect(() => {\n if (!file || progress >= 100) return undefined;\n const timer = setTimeout(() => setProgress((value) => Math.min(100, value + 12)), 150);\n return () => clearTimeout(timer);\n }, [file, progress]);\n\n useEffect(\n () => () => {\n if (file) URL.revokeObjectURL(file.preview);\n },\n [file],\n );\n\n return (\n <div className=\"w-full max-w-120\">\n {file ? (\n <FileUploadList aria-label=\"Product image\">\n <FileUploadItem\n key={file.preview}\n name={file.name}\n size={file.size}\n type={file.type}\n preview={file.preview}\n progress={progress}\n onRemove={() => setFile(null)}\n onReplace={() => setFile(null)}\n />\n </FileUploadList>\n ) : (\n <FileUpload\n accept=\"image/png,image/jpeg\"\n maxSize={MAX_SIZE}\n description=\"PNG or JPG (max 5MB). Recommended aspect ratio 1:1\"\n error={error}\n onFilesAdded={([picked]) => {\n if (!picked) return;\n setError(undefined);\n setProgress(0);\n setFile({\n name: picked.name,\n size: picked.size,\n type: picked.type,\n preview: URL.createObjectURL(picked),\n });\n }}\n onFilesRejected={([rejection]) => {\n setError(\n rejection?.reason === \"file-too-large\"\n ? \"File is larger than 5MB. Choose a smaller file.\"\n : \"Choose a PNG or JPG image.\",\n );\n }}\n />\n )}\n </div>\n );\n}"
14203
+ }
14204
+ ],
14205
+ "docsUrl": "/components/file-upload"
14206
+ },
14207
+ {
14208
+ "slug": "image-crop",
14209
+ "title": "Image Crop",
14210
+ "category": "Forms",
14211
+ "status": "stable",
14212
+ "description": "Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the\nwhole image with a box of `aspect` over it, 90% of the image and centred to start. Drag the box to move it,\na corner to resize it, or move it with the arrow keys. Crop draws the boxed area to a canvas, shrinks it so\nits longer side is at most `maxDimension`, and calls `onCrop` with the new file. Put it beside a\n`FileUpload`: open it with the picked file, and upload what `onCrop` returns. It stays mounted and toggles\n`open`; its state starts fresh for every file.",
14213
+ "importPath": "@dodopayments/ui/image-crop",
14214
+ "exports": [
14215
+ "ImageCropDialog",
14216
+ "ImageCropDialogProps"
14217
+ ],
14218
+ "parts": [
14219
+ {
14220
+ "name": "ImageCropDialog",
14221
+ "description": "Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the\nwhole image with a box of `aspect` over it, 90% of the image and centred to start. Drag the box to move it,\na corner to resize it, or move it with the arrow keys. Crop draws the boxed area to a canvas, shrinks it so\nits longer side is at most `maxDimension`, and calls `onCrop` with the new file. Put it beside a\n`FileUpload`: open it with the picked file, and upload what `onCrop` returns. It stays mounted and toggles\n`open`; its state starts fresh for every file.",
14222
+ "props": [
14223
+ {
14224
+ "name": "file",
14225
+ "type": "File | null",
14226
+ "required": true,
14227
+ "description": "The picked image. The dialog shows it while `open`.",
14228
+ "source": "dodo"
14229
+ },
14230
+ {
14231
+ "name": "onCrop",
14232
+ "type": "(file: File) => void",
14233
+ "required": true,
14234
+ "description": "Called with the cropped image: the same name, and the same type when it is JPEG, PNG or WebP (else PNG).",
14235
+ "source": "dodo"
14236
+ },
14237
+ {
14238
+ "name": "onOpenChange",
14239
+ "type": "(open: boolean) => void",
14240
+ "required": true,
14241
+ "description": "",
14242
+ "source": "dodo"
14243
+ },
14244
+ {
14245
+ "name": "open",
14246
+ "type": "boolean",
14247
+ "required": true,
14248
+ "description": "",
14249
+ "source": "dodo"
14250
+ },
14251
+ {
14252
+ "name": "aspect",
14253
+ "type": "number",
14254
+ "required": false,
14255
+ "default": "1",
14256
+ "description": "Width over height of the crop, e.g. `1` for a product image or `16 / 9` for a banner.",
14257
+ "source": "dodo"
14258
+ },
14259
+ {
14260
+ "name": "maxDimension",
14261
+ "type": "number",
14262
+ "required": false,
14263
+ "default": "1920",
14264
+ "description": "The longest side of the output in pixels; a larger crop is shrunk to it, a smaller one kept.",
14265
+ "source": "dodo"
14266
+ },
14267
+ {
14268
+ "name": "title",
14269
+ "type": "string",
14270
+ "required": false,
14271
+ "default": "the locale's `imageCropTitle` (\"Crop image\")",
14272
+ "description": "Accessible title.",
14273
+ "source": "dodo"
13727
14274
  }
13728
14275
  ]
13729
14276
  }
13730
14277
  ],
13731
14278
  "examples": [
13732
14279
  {
13733
- "name": "file-upload/master",
13734
- "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n FileUpload,\n FileUploadFooter,\n FileUploadItem,\n FileUploadList,\n FileUploadTray,\n formatFileSize,\n} from \"@dodopayments/ui/file-upload\";\nimport { useEffect, useRef, useState } from \"react\";\n\nconst MAX_SIZE = 20 * 1024 * 1024;\nconst MB = 1024 * 1024;\n\ninterface Upload {\n id: number;\n name: string;\n size: number;\n type: string;\n progress: number;\n error?: string;\n}\n\nexport default function FileUploadMaster() {\n const [uploads, setUploads] = useState<Upload[]>([]);\n const nextId = useRef(0);\n const uploading = uploads.some((upload) => !upload.error && upload.progress < 100);\n\n const add = (files: { name: string; size: number; type: string }[]) => {\n setUploads((current) => [\n ...current,\n ...files.map((file) => {\n nextId.current += 1;\n return {\n id: nextId.current,\n ...file,\n progress: 0,\n error:\n file.size > MAX_SIZE\n ? `${formatFileSize(file.size)} · Over the 20 MB limit`\n : undefined,\n };\n }),\n ]);\n };\n\n // Simulated upload: small files finish first.\n useEffect(() => {\n if (!uploading) return undefined;\n const timer = setInterval(() => {\n setUploads((current) =>\n current.map((upload) =>\n upload.error || upload.progress >= 100\n ? upload\n : { ...upload, progress: Math.min(100, upload.progress + (40 * MB) / upload.size) },\n ),\n );\n }, 120);\n return () => clearInterval(timer);\n }, [uploading]);\n\n const done = uploads.filter((upload) => !upload.error && upload.progress >= 100).length;\n const failed = uploads.filter((upload) => upload.error).length;\n\n return (\n <div className=\"flex w-full max-w-120 flex-col gap-1 rounded-2xl border border-border bg-muted p-1 shadow-lg/5\">\n <div className=\"flex flex-col gap-4 rounded-xl bg-background p-5 shadow-xs/5\">\n <span className=\"font-heading text-heading-tertiary text-foreground\">Upload files</span>\n <FileUploadTray>\n <FileUpload\n multiple\n description=\"PDF, DOCX, FIG or images (max 20MB each)\"\n onFilesAdded={add}\n onFilesRejected={(rejections) => add(rejections.map((rejection) => rejection.file))}\n maxSize={MAX_SIZE}\n />\n <FileUploadList aria-label=\"Uploads\">\n {uploads.map((upload) => (\n <FileUploadItem\n key={upload.id}\n name={upload.name}\n size={upload.size}\n type={upload.type}\n progress={upload.error ? undefined : upload.progress}\n error={upload.error}\n onRemove={() =>\n setUploads((current) => current.filter((item) => item.id !== upload.id))\n }\n onReplace={() =>\n setUploads((current) =>\n current.map((item) =>\n item.id === upload.id ? { ...item, progress: 0 } : item,\n ),\n )\n }\n />\n ))}\n </FileUploadList>\n {uploads.length > 0 ? (\n <FileUploadFooter\n summary={`${String(done)} of ${String(uploads.length)} uploaded${failed ? ` · ${String(failed)} failed` : \"\"}`}\n onRemoveAll={() => setUploads([])}\n />\n ) : null}\n </FileUploadTray>\n </div>\n <div className=\"flex justify-end gap-2 p-1 ps-0\">\n <Button variant=\"secondary\" onClick={() => setUploads([])}>\n Cancel\n </Button>\n {/* The tray shows the upload progress, so Done just waits for it. */}\n <Button disabled={uploading}>Done</Button>\n </div>\n </div>\n );\n}"
13735
- },
13736
- {
13737
- "name": "file-upload/single",
13738
- "code": "\"use client\";\n\nimport { FileUpload, FileUploadItem, FileUploadList } from \"@dodopayments/ui/file-upload\";\nimport { useEffect, useState } from \"react\";\n\nconst MAX_SIZE = 5 * 1024 * 1024;\n\nexport default function FileUploadSingle() {\n const [file, setFile] = useState<{\n name: string;\n size: number;\n type: string;\n preview: string;\n } | null>(null);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | undefined>();\n\n useEffect(() => {\n if (!file || progress >= 100) return undefined;\n const timer = setTimeout(() => setProgress((value) => Math.min(100, value + 12)), 150);\n return () => clearTimeout(timer);\n }, [file, progress]);\n\n useEffect(\n () => () => {\n if (file) URL.revokeObjectURL(file.preview);\n },\n [file],\n );\n\n return (\n <div className=\"w-full max-w-120\">\n {file ? (\n <FileUploadList aria-label=\"Product image\">\n <FileUploadItem\n key={file.preview}\n name={file.name}\n size={file.size}\n type={file.type}\n preview={file.preview}\n progress={progress}\n onRemove={() => setFile(null)}\n onReplace={() => setFile(null)}\n />\n </FileUploadList>\n ) : (\n <FileUpload\n accept=\"image/png,image/jpeg\"\n maxSize={MAX_SIZE}\n description=\"PNG or JPG (max 5MB). Recommended aspect ratio 1:1\"\n error={error}\n onFilesAdded={([picked]) => {\n if (!picked) return;\n setError(undefined);\n setProgress(0);\n setFile({\n name: picked.name,\n size: picked.size,\n type: picked.type,\n preview: URL.createObjectURL(picked),\n });\n }}\n onFilesRejected={([rejection]) => {\n setError(\n rejection?.reason === \"file-too-large\"\n ? \"File is larger than 5MB. Choose a smaller file.\"\n : \"Choose a PNG or JPG image.\",\n );\n }}\n />\n )}\n </div>\n );\n}"
14280
+ "name": "image-crop/master",
14281
+ "code": "\"use client\";\n\nimport { FileUpload } from \"@dodopayments/ui/file-upload\";\nimport { ImageCropDialog } from \"@dodopayments/ui/image-crop\";\nimport { useEffect, useState } from \"react\";\n\nexport default function ImageCropMaster() {\n const [picked, setPicked] = useState<File | null>(null);\n const [open, setOpen] = useState(false);\n const [preview, setPreview] = useState<string | null>(null);\n\n useEffect(\n () => () => {\n if (preview) URL.revokeObjectURL(preview);\n },\n [preview],\n );\n\n return (\n <div className=\"flex w-full max-w-120 flex-col gap-4\">\n <FileUpload\n accept=\"image/png,image/jpeg,image/webp\"\n description=\"PNG, JPG or WebP, up to 3 MB. Cropped to a square.\"\n maxSize={3 * 1024 * 1024}\n onFilesAdded={([file]) => {\n if (!file) return;\n setPicked(file);\n setOpen(true);\n }}\n />\n {preview ? (\n // biome-ignore lint/performance/noImgElement: a local object URL in a demo.\n <img\n alt=\"Cropped\"\n className=\"size-24 rounded-lg border border-border object-cover\"\n src={preview}\n />\n ) : null}\n <ImageCropDialog\n file={picked}\n open={open}\n onOpenChange={setOpen}\n onCrop={(file: File) => {\n setPreview(URL.createObjectURL(file));\n setOpen(false);\n }}\n />\n </div>\n );\n}"
13739
14282
  }
13740
14283
  ],
13741
- "docsUrl": "/components/file-upload"
14284
+ "docsUrl": "/components/image-crop"
13742
14285
  },
13743
14286
  {
13744
14287
  "slug": "grid",
@@ -14208,7 +14751,7 @@
14208
14751
  "title": "Input",
14209
14752
  "category": "Forms",
14210
14753
  "status": "stable",
14211
- "description": "The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines\n(`type=\"textarea\"`), a list of chips (`type=\"chips\"`, typed, or picked from `suggestions`), an amount in minor\nunits (`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,\na brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input\nis 36 tall (one size). A one-line input takes icons, an inline `prefix` / `suffix`,\na boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With\n`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside\na `Field` it picks up the label, description and validation state.",
14754
+ "description": "The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines\n(`type=\"textarea\"`), a list of chips (`type=\"chips\"`, typed, or picked from `suggestions`), an amount in minor\nunits (`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,\na brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input\nis 36 tall; a one-line input can be the compact `size=\"sm\"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,\na boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With\n`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside\na `Field` it picks up the label, description and validation state.",
14212
14755
  "importPath": "@dodopayments/ui/input",
14213
14756
  "exports": [
14214
14757
  "DODO_INPUT_DEFAULT_VARIANTS",
@@ -14241,7 +14784,7 @@
14241
14784
  "parts": [
14242
14785
  {
14243
14786
  "name": "Input",
14244
- "description": "The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines\n(`type=\"textarea\"`), a list of chips (`type=\"chips\"`, typed, or picked from `suggestions`), an amount in minor\nunits (`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,\na brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input\nis 36 tall (one size). A one-line input takes icons, an inline `prefix` / `suffix`,\na boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With\n`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside\na `Field` it picks up the label, description and validation state.",
14787
+ "description": "The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines\n(`type=\"textarea\"`), a list of chips (`type=\"chips\"`, typed, or picked from `suggestions`), an amount in minor\nunits (`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,\na brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input\nis 36 tall; a one-line input can be the compact `size=\"sm\"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,\na boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With\n`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside\na `Field` it picks up the label, description and validation state.",
14245
14788
  "props": [
14246
14789
  {
14247
14790
  "name": "aria-label",
@@ -14374,6 +14917,10 @@
14374
14917
  "name": "input/async-suggestions",
14375
14918
  "code": "\"use client\";\n\nimport { Field } from \"@dodopayments/ui/field\";\nimport { Input, type InputSuggestionItem } from \"@dodopayments/ui/input\";\nimport { useEffect, useRef, useState } from \"react\";\n\nconst products = [\n { value: \"pdt_01\", label: \"Framer Template\", description: \"One-time · $49.00\" },\n { value: \"pdt_02\", label: \"Pro plan\", description: \"Subscription · $29.00 / month\" },\n { value: \"pdt_03\", label: \"Team plan\", description: \"Subscription · $99.00 / month\" },\n { value: \"pdt_04\", label: \"Icon pack\", description: \"One-time · $19.00\" },\n { value: \"pdt_05\", label: \"API credits\", description: \"Usage based · $0.002 / call\" },\n] satisfies InputSuggestionItem[];\n\n/** Stands in for a product search request: answers after 600 ms. */\nfunction searchProducts(query: string, signal: AbortSignal): Promise<InputSuggestionItem[]> {\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n const needle = query.trim().toLowerCase();\n resolve(\n products.filter((product) =>\n `${product.label} ${product.description}`.toLowerCase().includes(needle),\n ),\n );\n }, 600);\n signal.addEventListener(\"abort\", () => {\n clearTimeout(timer);\n reject(new Error(\"Search cancelled\"));\n });\n });\n}\n\nexport default function InputAsyncSuggestions() {\n const [query, setQuery] = useState(\"\");\n const [results, setResults] = useState<InputSuggestionItem[]>([]);\n const [loading, setLoading] = useState(false);\n const request = useRef<AbortController | null>(null);\n useEffect(() => () => request.current?.abort(), []);\n\n const search = (next: string) => {\n setQuery(next);\n request.current?.abort();\n if (next.trim() === \"\") {\n setResults([]);\n setLoading(false);\n return;\n }\n const controller = new AbortController();\n request.current = controller;\n setLoading(true);\n searchProducts(next, controller.signal)\n .then((found) => {\n setResults(found);\n setLoading(false);\n })\n .catch(() => undefined);\n };\n\n return (\n <Field\n label=\"Product\"\n description=\"Results come from the server as you type.\"\n className=\"w-full max-w-sm\"\n >\n <Input\n placeholder=\"Search products\"\n value={query}\n onValueChange={search}\n // The server already matched these, so the Input shows them as they are.\n suggestions={loading ? [] : results}\n filterSuggestions={false}\n suggestionsLoading={loading}\n suggestionsLoadingText=\"Searching products\"\n suggestionsEmpty={query.trim() === \"\" ? undefined : \"No products found.\"}\n clearable\n />\n </Field>\n );\n}"
14376
14919
  },
14920
+ {
14921
+ "name": "input/compact",
14922
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { MagnifierIcon } from \"@dodopayments/ui/icons\";\nimport { Input } from \"@dodopayments/ui/input\";\nimport { Select, SelectContent, SelectTrigger, SelectValue } from \"@dodopayments/ui/select\";\n\nconst STATUSES = [\n { value: \"all\", label: \"All statuses\" },\n { value: \"succeeded\", label: \"Succeeded\" },\n { value: \"failed\", label: \"Failed\" },\n];\n\nexport default function InputCompact() {\n return (\n <div className=\"flex w-full max-w-xl flex-wrap items-center gap-2\">\n <Input\n size=\"sm\"\n type=\"search\"\n aria-label=\"Search payments\"\n placeholder=\"Search payments\"\n leadingIcon={<MagnifierIcon />}\n className=\"min-w-40 flex-1\"\n />\n <Select items={STATUSES} defaultValue=\"all\">\n <SelectTrigger size=\"sm\" aria-label=\"Status\" className=\"w-40\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent />\n </Select>\n <Button size=\"sm\" variant=\"secondary\">\n Reset\n </Button>\n </div>\n );\n}"
14923
+ },
14377
14924
  {
14378
14925
  "name": "input/country-lookup",
14379
14926
  "code": "\"use client\";\n\nimport { Field } from \"@dodopayments/ui/field\";\nimport { Flag } from \"@dodopayments/ui/payment-logos\";\nimport { Input, type InputSuggestion } from \"@dodopayments/ui/input\";\n\nconst countries = [\n { value: \"IN\", label: \"India\", description: \"INR · Indian rupee\", icon: <Flag country=\"IN\" /> },\n {\n value: \"US\",\n label: \"United States\",\n description: \"USD · US dollar\",\n icon: <Flag country=\"US\" />,\n },\n {\n value: \"GB\",\n label: \"United Kingdom\",\n description: \"GBP · Pound sterling\",\n icon: <Flag country=\"GB\" />,\n },\n { value: \"DE\", label: \"Germany\", description: \"EUR · Euro\", icon: <Flag country=\"DE\" /> },\n { value: \"FR\", label: \"France\", description: \"EUR · Euro\", icon: <Flag country=\"FR\" /> },\n { value: \"JP\", label: \"Japan\", description: \"JPY · Japanese yen\", icon: <Flag country=\"JP\" /> },\n {\n value: \"SG\",\n label: \"Singapore\",\n description: \"SGD · Singapore dollar\",\n icon: <Flag country=\"SG\" />,\n },\n {\n value: \"AU\",\n label: \"Australia\",\n description: \"AUD · Australian dollar\",\n icon: <Flag country=\"AU\" />,\n },\n {\n value: \"CA\",\n label: \"Canada\",\n description: \"CAD · Canadian dollar\",\n icon: <Flag country=\"CA\" />,\n },\n {\n value: \"BR\",\n label: \"Brazil\",\n description: \"BRL · Brazilian real\",\n icon: <Flag country=\"BR\" />,\n },\n];\n\n/** Matches the country name, its ISO code or its currency code, so \"eur\" finds Germany and France. */\nfunction matchCountry(suggestion: InputSuggestion, query: string) {\n if (typeof suggestion === \"string\") return false;\n const country = countries.find((item) => item.value === suggestion.value);\n const text = `${suggestion.label} ${suggestion.value} ${country?.description ?? \"\"}`;\n return text.toLowerCase().includes(query.trim().toLowerCase());\n}\n\nexport default function InputCountryLookup() {\n return (\n <Field\n label=\"Country or currency\"\n description=\"Type a name, an ISO code (IN) or a currency (EUR).\"\n className=\"w-full max-w-sm\"\n >\n <Input\n placeholder=\"e.g. India or EUR\"\n suggestions={countries}\n filterSuggestions={matchCountry}\n suggestionsEmpty=\"No country or currency matches.\"\n openSuggestionsOnClick\n suggestionsTrigger\n />\n </Field>\n );\n}"
@@ -14560,10 +15107,10 @@
14560
15107
  },
14561
15108
  {
14562
15109
  "name": "size",
14563
- "type": "\"lg\"",
15110
+ "type": "\"sm\" | \"lg\"",
14564
15111
  "required": false,
14565
15112
  "default": "\"lg\"",
14566
- "description": "Input height, as `Input` (`DODO_INPUT_VARIANTS`): one size, `lg` 36.",
15113
+ "description": "Input height, as `Input` (`DODO_INPUT_VARIANTS`): `lg` 36 or the compact `sm` 28.",
14567
15114
  "source": "dodo"
14568
15115
  },
14569
15116
  {
@@ -14670,7 +15217,7 @@
14670
15217
  "title": "Menu",
14671
15218
  "category": "Overlays",
14672
15219
  "status": "stable",
14673
- "description": "The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,\nRadius/Large, 160 to 320 wide, scrolls past 320 tall. Below 640px it opens as a bottom sheet over a scrim,\nfull width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,\n`MenuGroup`, `MenuSeparator` and `MenuSub`.",
15220
+ "description": "The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,\nRadius/Large, 160 to 320 wide, scrolls past 320 tall. With `mobileSheet` it opens below 640px as a bottom sheet\nover a scrim, full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,\n`MenuGroup`, `MenuSeparator` and `MenuSub`.",
14674
15221
  "importPath": "@dodopayments/ui/menu",
14675
15222
  "exports": [
14676
15223
  "Menu",
@@ -14706,7 +15253,7 @@
14706
15253
  "parts": [
14707
15254
  {
14708
15255
  "name": "MenuContent",
14709
- "description": "The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,\nRadius/Large, 160 to 320 wide, scrolls past 320 tall. Below 640px it opens as a bottom sheet over a scrim,\nfull width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,\n`MenuGroup`, `MenuSeparator` and `MenuSub`.",
15256
+ "description": "The floating list of actions (the `MenuPopup` primitive: portal + positioner + popup): Surface/Overlay,\nRadius/Large, 160 to 320 wide, scrolls past 320 tall. With `mobileSheet` it opens below 640px as a bottom sheet\nover a scrim, full width, with the same items. Holds `MenuItem`, `MenuLinkItem`, `MenuCheckboxItem`, `MenuRadioGroup`,\n`MenuGroup`, `MenuSeparator` and `MenuSub`.",
14710
15257
  "props": [
14711
15258
  {
14712
15259
  "name": "align",
@@ -14748,8 +15295,8 @@
14748
15295
  "name": "mobileSheet",
14749
15296
  "type": "boolean",
14750
15297
  "required": false,
14751
- "default": "true",
14752
- "description": "Below 640px the menu opens as a bottom sheet (Figma Menu › Responsive). Set `false` to keep the popover,\ne.g. for a menu inside a sheet.",
15298
+ "default": "false",
15299
+ "description": "Below 640px, open the menu as a bottom sheet over a scrim, full width (Figma Menu › Responsive). Off by\ndefault: the menu stays a popover on its trigger at every width.",
14753
15300
  "source": "dodo"
14754
15301
  },
14755
15302
  {
@@ -15442,7 +15989,7 @@
15442
15989
  },
15443
15990
  {
15444
15991
  "name": "MenuSubContent",
15445
- "description": "The nested list. Opens beside its `MenuSubTrigger`, aligned with the trigger row. Below 640px it opens as a bottom\nsheet over its parent, with a Back row (`backLabel`) that closes only the submenu.",
15992
+ "description": "The nested list. Opens beside its `MenuSubTrigger`, aligned with the trigger row. With `mobileSheet` (set it on the\nparent `MenuContent` too) it opens below 640px as a bottom sheet over its parent, with a Back row (`backLabel`)\nthat closes only the submenu.",
15446
15993
  "props": [
15447
15994
  {
15448
15995
  "name": "align",
@@ -15470,7 +16017,7 @@
15470
16017
  "name": "backLabel",
15471
16018
  "type": "string",
15472
16019
  "required": false,
15473
- "description": "Text of the row that returns to the parent menu. Below 640px the submenu opens as a bottom sheet over its parent\nand starts with this row. Defaults to the `back` message of the `LocaleProvider` (\"Back\" in English).",
16020
+ "description": "Text of the row that returns to the parent menu. With `mobileSheet`, the submenu opens below 640px as a bottom\nsheet over its parent and starts with this row. Defaults to the `back` message of the `LocaleProvider` (\"Back\" in English).",
15474
16021
  "source": "dodo"
15475
16022
  },
15476
16023
  {
@@ -15491,8 +16038,8 @@
15491
16038
  "name": "mobileSheet",
15492
16039
  "type": "boolean",
15493
16040
  "required": false,
15494
- "default": "true",
15495
- "description": "Below 640px the menu opens as a bottom sheet (Figma Menu › Responsive). Set `false` to keep the popover,\ne.g. for a menu inside a sheet.",
16041
+ "default": "false",
16042
+ "description": "Below 640px, open the menu as a bottom sheet over a scrim, full width (Figma Menu › Responsive). Off by\ndefault: the menu stays a popover on its trigger at every width.",
15496
16043
  "source": "dodo"
15497
16044
  },
15498
16045
  {
@@ -16082,6 +16629,14 @@
16082
16629
  "description": "Space in px to keep between the popover and the edges of the viewport. When the popover does\nnot fit on `side`, it flips to the opposite side and then shifts along the edge.",
16083
16630
  "source": "dodo"
16084
16631
  },
16632
+ {
16633
+ "name": "mobileSheet",
16634
+ "type": "boolean",
16635
+ "required": false,
16636
+ "default": "false",
16637
+ "description": "Below 640px, open as a bottom sheet over a scrim, full width, as Menu and Select can. Off by default: turn it\non for a panel without text fields (notifications, a list of choices). A sheet sits at the bottom edge, where\nthe software keyboard would cover a field; for a form on a phone, use a `Dialog` or a `Drawer`.",
16638
+ "source": "dodo"
16639
+ },
16085
16640
  {
16086
16641
  "name": "portalProps",
16087
16642
  "type": "PopoverPortalProps",
@@ -16496,7 +17051,7 @@
16496
17051
  },
16497
17052
  {
16498
17053
  "name": "popover/notifications",
16499
- "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { BellIcon, CreditCardIcon, DotsIcon, GearIcon, UserIcon } from \"@dodopayments/ui/icons\";\nimport {\n Popover,\n PopoverContent,\n PopoverHeader,\n PopoverNotificationItem,\n PopoverPanel,\n PopoverTitle,\n PopoverTrigger,\n} from \"@dodopayments/ui/popover\";\nimport { Tabs, TabsList, TabsTrigger } from \"@dodopayments/ui/tabs\";\n\nconst NOTIFICATIONS = [\n { title: \"Payment succeeded\", id: \"pay_0NlZbY…k09c\", time: \"2 min ago\", unread: true },\n { title: \"Refund processed\", id: \"rfd_0NmQ8x…T2aP\", time: \"1 hr ago\", unread: true },\n { title: \"Dispute opened\", id: \"dsp_0NkR4c…9WqL\", time: \"Yesterday\", unread: false },\n];\n\nexport default function PopoverNotifications() {\n return (\n <Popover>\n <PopoverTrigger\n render={<Button variant=\"secondary\" size=\"icon-lg\" aria-label=\"Notifications\" />}\n >\n <BellIcon aria-hidden=\"true\" />\n </PopoverTrigger>\n <PopoverContent size=\"lg\">\n <PopoverHeader\n actions={\n <>\n <Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"Notification settings\">\n <GearIcon aria-hidden=\"true\" />\n </Button>\n <Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"More\">\n <DotsIcon aria-hidden=\"true\" />\n </Button>\n </>\n }\n >\n <PopoverTitle>Notifications</PopoverTitle>\n </PopoverHeader>\n <PopoverPanel>\n <Tabs defaultValue=\"all\">\n <TabsList aria-label=\"Notification type\" className=\"px-1\">\n <TabsTrigger value=\"all\" icon={<BellIcon aria-hidden=\"true\" />} count={19}>\n All\n </TabsTrigger>\n <TabsTrigger\n value=\"transactions\"\n icon={<CreditCardIcon aria-hidden=\"true\" />}\n count={19}\n >\n Transactions\n </TabsTrigger>\n <TabsTrigger value=\"business\" icon={<UserIcon aria-hidden=\"true\" />}>\n Business\n </TabsTrigger>\n </TabsList>\n </Tabs>\n {NOTIFICATIONS.map((item) => (\n <PopoverNotificationItem\n key={item.id}\n icon={<CreditCardIcon />}\n title={item.title}\n id={item.id}\n time={item.time}\n unread={item.unread}\n />\n ))}\n </PopoverPanel>\n </PopoverContent>\n </Popover>\n );\n}"
17054
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { BellIcon, CreditCardIcon, DotsIcon, GearIcon, UserIcon } from \"@dodopayments/ui/icons\";\nimport {\n Popover,\n PopoverContent,\n PopoverHeader,\n PopoverNotificationItem,\n PopoverPanel,\n PopoverTitle,\n PopoverTrigger,\n} from \"@dodopayments/ui/popover\";\nimport { Tabs, TabsList, TabsTrigger } from \"@dodopayments/ui/tabs\";\n\nconst NOTIFICATIONS = [\n { title: \"Payment succeeded\", id: \"pay_0NlZbY…k09c\", time: \"2 min ago\", unread: true },\n { title: \"Refund processed\", id: \"rfd_0NmQ8x…T2aP\", time: \"1 hr ago\", unread: true },\n { title: \"Dispute opened\", id: \"dsp_0NkR4c…9WqL\", time: \"Yesterday\", unread: false },\n];\n\nexport default function PopoverNotifications() {\n return (\n <Popover>\n <PopoverTrigger\n render={<Button variant=\"secondary\" size=\"icon-lg\" aria-label=\"Notifications\" />}\n >\n <BellIcon aria-hidden=\"true\" />\n </PopoverTrigger>\n <PopoverContent size=\"lg\" mobileSheet>\n <PopoverHeader\n actions={\n <>\n <Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"Notification settings\">\n <GearIcon aria-hidden=\"true\" />\n </Button>\n <Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"More\">\n <DotsIcon aria-hidden=\"true\" />\n </Button>\n </>\n }\n >\n <PopoverTitle>Notifications</PopoverTitle>\n </PopoverHeader>\n <PopoverPanel>\n <Tabs defaultValue=\"all\">\n <TabsList aria-label=\"Notification type\" className=\"px-1\">\n <TabsTrigger value=\"all\" icon={<BellIcon aria-hidden=\"true\" />} count={19}>\n All\n </TabsTrigger>\n <TabsTrigger\n value=\"transactions\"\n icon={<CreditCardIcon aria-hidden=\"true\" />}\n count={19}\n >\n Transactions\n </TabsTrigger>\n <TabsTrigger value=\"business\" icon={<UserIcon aria-hidden=\"true\" />}>\n Business\n </TabsTrigger>\n </TabsList>\n </Tabs>\n {NOTIFICATIONS.map((item) => (\n <PopoverNotificationItem\n key={item.id}\n icon={<CreditCardIcon />}\n title={item.title}\n id={item.id}\n time={item.time}\n unread={item.unread}\n />\n ))}\n </PopoverPanel>\n </PopoverContent>\n </Popover>\n );\n}"
16500
17055
  }
16501
17056
  ],
16502
17057
  "docsUrl": "/components/popover"
@@ -17067,14 +17622,18 @@
17067
17622
  },
17068
17623
  {
17069
17624
  "name": "size",
17070
- "type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
17625
+ "type": "\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\"",
17071
17626
  "required": false,
17072
17627
  "description": "",
17073
17628
  "source": "dodo",
17074
17629
  "values": [
17630
+ {
17631
+ "value": "2xs",
17632
+ "description": "12px tall artwork with 2px clear space on every side. Only for print-sized text, such as an invoice footer."
17633
+ },
17075
17634
  {
17076
17635
  "value": "xs",
17077
- "description": "16px tall artwork with 4px clear space on every side. The smallest size, for a line of small text such as \"Secure checkout by\"."
17636
+ "description": "16px tall artwork with 4px clear space on every side. For a line of small text such as \"Secure checkout by\"."
17078
17637
  },
17079
17638
  {
17080
17639
  "value": "sm",
@@ -18100,7 +18659,7 @@
18100
18659
  "title": "Select",
18101
18660
  "category": "Forms",
18102
18661
  "status": "stable",
18103
- "description": "The field (Figma `container`) that opens the list: put a `SelectValue` inside. One size, 36; the caret turns up\nwhile the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant=\"compact\"` is a\nborderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).",
18662
+ "description": "The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size=\"sm\"`; the caret turns up\nwhile the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant=\"compact\"` is a\nborderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).",
18104
18663
  "importPath": "@dodopayments/ui/select",
18105
18664
  "exports": [
18106
18665
  "DODO_SELECT_TRIGGER_DEFAULT_VARIANTS",
@@ -18127,7 +18686,7 @@
18127
18686
  "parts": [
18128
18687
  {
18129
18688
  "name": "SelectTrigger",
18130
- "description": "The field (Figma `container`) that opens the list: put a `SelectValue` inside. One size, 36; the caret turns up\nwhile the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant=\"compact\"` is a\nborderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).",
18689
+ "description": "The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size=\"sm\"`; the caret turns up\nwhile the list is open; `aria-invalid` (or an invalid `Field`) shows the error border. `variant=\"compact\"` is a\nborderless 32 trigger that hugs its value, for a language or currency switcher (with an `icon` or a flag).",
18131
18690
  "props": [
18132
18691
  {
18133
18692
  "name": "className",
@@ -18143,6 +18702,24 @@
18143
18702
  "description": "An icon before the value (Figma \"Show leading icon\"), e.g. a Nucleo icon for an integration select, a globe for a\nlanguage switcher or a `Flag` for a currency (a Flag keeps its 20 × 14).",
18144
18703
  "source": "dodo"
18145
18704
  },
18705
+ {
18706
+ "name": "size",
18707
+ "type": "\"default\" | \"sm\"",
18708
+ "required": false,
18709
+ "description": "",
18710
+ "source": "dodo",
18711
+ "values": [
18712
+ {
18713
+ "value": "default",
18714
+ "description": "36 tall (40 below `sm`), as in Figma. The default."
18715
+ },
18716
+ {
18717
+ "value": "sm",
18718
+ "description": "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."
18719
+ }
18720
+ ],
18721
+ "default": "\"default\""
18722
+ },
18146
18723
  {
18147
18724
  "name": "variant",
18148
18725
  "type": "\"default\" | \"compact\"",
@@ -18402,6 +18979,14 @@
18402
18979
  "description": "The disabled row shown when no option matches.",
18403
18980
  "source": "dodo"
18404
18981
  },
18982
+ {
18983
+ "name": "mobileSheet",
18984
+ "type": "boolean",
18985
+ "required": false,
18986
+ "default": "false",
18987
+ "description": "Below 640px, open the list as a bottom sheet over a scrim, full width. Off by default: the list stays under\nthe trigger at every width. A `searchable` or `multiple` list always stays under its field, where the software\nkeyboard cannot cover it.",
18988
+ "source": "dodo"
18989
+ },
18405
18990
  {
18406
18991
  "name": "portalProps",
18407
18992
  "type": "SelectPortalProps",
@@ -18638,6 +19223,10 @@
18638
19223
  {
18639
19224
  "name": "select/searchable",
18640
19225
  "code": "\"use client\";\n\nimport { Field } from \"@dodopayments/ui/field\";\nimport { Select, SelectContent, SelectTrigger, SelectValue } from \"@dodopayments/ui/select\";\n\nconst brands = [\n \"Dodo Payments\",\n \"Acme Studio\",\n \"Northwind Labs\",\n \"Orbit Labs\",\n \"Globex\",\n \"Initech\",\n \"Umbrella\",\n \"Hooli\",\n \"Pied Piper\",\n \"Stark Industries\",\n].map((name) => ({ value: name.toLowerCase().replaceAll(\" \", \"-\"), label: name }));\n\n/** A long list: `searchable` puts a search field on top of the list. */\nexport default function SelectSearchable() {\n return (\n <Field\n label=\"Brand\"\n description=\"Select the brand that will be associated with your product.\"\n className=\"w-full max-w-sm\"\n >\n <Select items={brands} searchable>\n <SelectTrigger>\n <SelectValue placeholder=\"Select a brand\" />\n </SelectTrigger>\n <SelectContent />\n </Select>\n </Field>\n );\n}"
19226
+ },
19227
+ {
19228
+ "name": "select/small",
19229
+ "code": "\"use client\";\n\nimport { Select, SelectContent, SelectTrigger, SelectValue } from \"@dodopayments/ui/select\";\n\nconst RANGES = [\n { value: \"7d\", label: \"Last 7 days\" },\n { value: \"30d\", label: \"Last 30 days\" },\n { value: \"90d\", label: \"Last 90 days\" },\n];\n\nexport default function SelectSmall() {\n return (\n <Select items={RANGES} defaultValue=\"30d\">\n <SelectTrigger size=\"sm\" aria-label=\"Date range\" className=\"w-44\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent />\n </Select>\n );\n}"
18641
19230
  }
18642
19231
  ],
18643
19232
  "docsUrl": "/components/select"
@@ -19470,7 +20059,7 @@
19470
20059
  },
19471
20060
  {
19472
20061
  "name": "SidebarProvider",
19473
- "description": "Holds the sidebar state and lays out `Sidebar` next to `SidebarInset` on the grey app shell. Wrap the app shell\nonce. The docked sidebar starts collapsed to the 68px icon rail; below 1024px it becomes a sheet. Cmd/Ctrl+B\ntoggles it.\n\nReplaces the `SidebarProvider` primitive (it switches to the sheet at 800px, always writes a\n`cookieStore` cookie and has a fixed shortcut) but feeds the `SidebarContext` primitive, so every primitive\nsidebar part reads this state.",
20062
+ "description": "Holds the sidebar state and lays out `Sidebar` next to `SidebarInset` on the grey app shell. Wrap the app shell\nonce. The docked sidebar starts collapsed to the 68px icon rail; below 1024px it becomes a sheet. Cmd/Ctrl+B\ntoggles it.\n\nReplaces the `SidebarProvider` primitive (it always writes a `cookieStore` cookie and has a fixed\nshortcut) but feeds the `SidebarContext` primitive, so every primitive\nsidebar part reads this state.",
19474
20063
  "props": [
19475
20064
  {
19476
20065
  "name": "defaultOpen",
@@ -21401,6 +21990,24 @@
21401
21990
  "description": "Additional Tailwind classes, merged last.",
21402
21991
  "source": "dodo"
21403
21992
  },
21993
+ {
21994
+ "name": "size",
21995
+ "type": "\"default\" | \"sm\"",
21996
+ "required": false,
21997
+ "description": "",
21998
+ "source": "dodo",
21999
+ "values": [
22000
+ {
22001
+ "value": "default",
22002
+ "description": "Underline tabs 36 tall, pill tabs 28, as in Figma. The default."
22003
+ },
22004
+ {
22005
+ "value": "sm",
22006
+ "description": "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."
22007
+ }
22008
+ ],
22009
+ "default": "\"default\""
22010
+ },
21404
22011
  {
21405
22012
  "name": "variant",
21406
22013
  "type": "\"underline\" | \"pill\"",
@@ -21498,6 +22105,10 @@
21498
22105
  "name": "tabs/basic",
21499
22106
  "code": "\"use client\";\n\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@dodopayments/ui/tabs\";\n\nconst SECTIONS = [\n { value: \"overview\", label: \"Overview\", body: \"Lifetime value, last payment and open invoices.\" },\n {\n value: \"payments\",\n label: \"Payments\",\n body: \"Every payment this customer has made, newest first.\",\n },\n {\n value: \"subscriptions\",\n label: \"Subscriptions\",\n body: \"Active plans, renewals and cancellations.\",\n },\n { value: \"refunds\", label: \"Refunds\", body: \"Refunds issued and their current status.\" },\n { value: \"entitlements\", label: \"Entitlements\", body: \"License keys and digital deliveries.\" },\n] as const;\n\nexport default function TabsBasic() {\n return (\n <Tabs defaultValue=\"overview\" className=\"max-w-2xl\">\n <TabsList aria-label=\"Customer sections\">\n {SECTIONS.map((section) => (\n <TabsTrigger key={section.value} value={section.value}>\n {section.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {SECTIONS.map((section) => (\n <TabsContent\n key={section.value}\n value={section.value}\n className=\"p-1 text-body-primary text-muted-foreground\"\n >\n {section.body}\n </TabsContent>\n ))}\n </Tabs>\n );\n}"
21500
22107
  },
22108
+ {
22109
+ "name": "tabs/compact",
22110
+ "code": "\"use client\";\n\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@dodopayments/ui/tabs\";\n\nexport default function TabsCompact() {\n return (\n <div className=\"flex w-full max-w-md flex-col gap-6\">\n <Tabs defaultValue=\"all\">\n <TabsList size=\"sm\" aria-label=\"Payments\">\n <TabsTrigger value=\"all\">All</TabsTrigger>\n <TabsTrigger value=\"succeeded\">Succeeded</TabsTrigger>\n <TabsTrigger value=\"failed\">Failed</TabsTrigger>\n </TabsList>\n <TabsContent value=\"all\" className=\"text-body-primary text-muted-foreground\">\n Every payment.\n </TabsContent>\n <TabsContent value=\"succeeded\" className=\"text-body-primary text-muted-foreground\">\n Payments that went through.\n </TabsContent>\n <TabsContent value=\"failed\" className=\"text-body-primary text-muted-foreground\">\n Payments that failed.\n </TabsContent>\n </Tabs>\n <Tabs defaultValue=\"7d\">\n <TabsList variant=\"pill\" size=\"sm\" aria-label=\"Period\">\n <TabsTrigger value=\"7d\">7 days</TabsTrigger>\n <TabsTrigger value=\"30d\">30 days</TabsTrigger>\n <TabsTrigger value=\"90d\">90 days</TabsTrigger>\n </TabsList>\n </Tabs>\n </div>\n );\n}"
22111
+ },
21501
22112
  {
21502
22113
  "name": "tabs/icon-count",
21503
22114
  "code": "\"use client\";\n\nimport { BellIcon, CreditCardIcon, UserIcon } from \"@dodopayments/ui/icons\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@dodopayments/ui/tabs\";\n\nexport default function TabsIconCount() {\n return (\n <Tabs defaultValue=\"all\" className=\"max-w-md\">\n <TabsList aria-label=\"Notifications\">\n <TabsTrigger value=\"all\" icon={<BellIcon aria-hidden=\"true\" />} count={19}>\n All\n </TabsTrigger>\n <TabsTrigger value=\"transactions\" icon={<CreditCardIcon aria-hidden=\"true\" />} count={4}>\n Transactions\n </TabsTrigger>\n <TabsTrigger value=\"business\" icon={<UserIcon aria-hidden=\"true\" />}>\n Business\n </TabsTrigger>\n </TabsList>\n <TabsContent value=\"all\" className=\"pt-3 text-body-secondary text-muted-foreground\">\n 19 unread notifications.\n </TabsContent>\n <TabsContent value=\"transactions\" className=\"pt-3 text-body-secondary text-muted-foreground\">\n 4 payments need a look.\n </TabsContent>\n <TabsContent value=\"business\" className=\"pt-3 text-body-secondary text-muted-foreground\">\n No new notifications.\n </TabsContent>\n </Tabs>\n );\n}"
@@ -21607,6 +22218,13 @@
21607
22218
  "description": "An icon before the label (Figma \"Show leading icon\"), 12px, e.g. a clock on a session timer or a card on a\npayment method chip. Decorative: the label names the badge. Replaces the `dot`.",
21608
22219
  "source": "dodo"
21609
22220
  },
22221
+ {
22222
+ "name": "size",
22223
+ "type": "\"sm\" | \"md\" | null",
22224
+ "required": false,
22225
+ "description": "",
22226
+ "source": "dodo"
22227
+ },
21610
22228
  {
21611
22229
  "name": "status",
21612
22230
  "type": "\"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",
@@ -21641,7 +22259,7 @@
21641
22259
  "examples": [
21642
22260
  {
21643
22261
  "name": "test-mode-banner/basic",
21644
- "code": "\"use client\";\n\nimport { TestModeBadge, TestModeBanner } from \"@dodopayments/ui/test-mode-banner\";\n\nexport default function TestModeBannerBasic() {\n return (\n <div className=\"w-full overflow-hidden rounded-xl border border-border bg-background\">\n <TestModeBanner\n onSwitchToLive={() => undefined}\n learnMoreHref=\"https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode\"\n />\n <div className=\"flex items-center gap-2 p-4\">\n <span className=\"text-label-primary text-foreground\">pay_2IjeQm4hqU6RA4Z4kwDee</span>\n <TestModeBadge />\n </div>\n </div>\n );\n}"
22262
+ "code": "\"use client\";\n\nimport { TestModeBadge, TestModeBanner } from \"@dodopayments/ui/test-mode-banner\";\n\nexport default function TestModeBannerBasic() {\n return (\n <div className=\"w-full overflow-hidden rounded-xl border border-border bg-background\">\n <TestModeBanner\n onSwitchToLive={() => undefined}\n learnMoreHref=\"https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode\"\n />\n <div className=\"flex items-center gap-2 p-4\">\n <span className=\"min-w-0 truncate text-label-primary text-foreground\">\n pay_2IjeQm4hqU6RA4Z4kwDee\n </span>\n <TestModeBadge />\n </div>\n </div>\n );\n}"
21645
22263
  }
21646
22264
  ],
21647
22265
  "docsUrl": "/components/test-mode-banner"
@@ -21751,7 +22369,7 @@
21751
22369
  },
21752
22370
  {
21753
22371
  "name": "size",
21754
- "type": "\"default\" | \"icon\" | \"xs\" | \"lg\" | \"icon-xs\" | \"icon-lg\" | null",
22372
+ "type": "\"default\" | \"sm\" | \"icon\" | \"xs\" | \"lg\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\" | null",
21755
22373
  "required": false,
21756
22374
  "description": "",
21757
22375
  "source": "dodo"
@@ -23932,7 +24550,7 @@
23932
24550
  "examples": [
23933
24551
  {
23934
24552
  "name": "milestone/celebration",
23935
- "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { type MilestoneCategory, MilestoneToast } from \"@dodopayments/ui/milestone\";\nimport { SegmentedControl } from \"@dodopayments/ui/segmented-control\";\nimport { useState } from \"react\";\n\nconst NOTICES: Record<MilestoneCategory, { title: string; description: string }> = {\n customers: {\n title: \"100 customers, and counting\",\n description: \"You've officially got product-market fit. Let the world know.\",\n },\n geography: {\n title: \"Your business has no borders\",\n description: \"You've made sales in 23 countries. Most founders never leave their home market.\",\n },\n revenue: {\n title: \"Crossed $10,000\",\n description:\n \"From zero to $10,000 that's real money, from people who believed in what you built.\",\n },\n growth: {\n title: \"3x growth this month\",\n description: \"Month over month, you didn't just grow, you multiplied.\",\n },\n};\n\nexport default function MilestoneCelebration() {\n const [category, setCategory] = useState<MilestoneCategory>(\"customers\");\n const [open, setOpen] = useState(true);\n\n return (\n <div className=\"flex flex-col items-center gap-6\">\n <SegmentedControl\n aria-label=\"Milestone category\"\n value={category}\n onValueChange={(value) => {\n setCategory(value as MilestoneCategory);\n setOpen(true);\n }}\n items={[\n { value: \"customers\", label: \"Customers\" },\n { value: \"geography\", label: \"Geography\" },\n { value: \"revenue\", label: \"Revenue\" },\n { value: \"growth\", label: \"Growth\" },\n ]}\n />\n {open ? (\n <MilestoneToast\n category={category}\n {...NOTICES[category]}\n onShare={() => setOpen(false)}\n onDismiss={() => setOpen(false)}\n />\n ) : (\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n Show the notice again\n </Button>\n )}\n </div>\n );\n}"
24553
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport { type MilestoneCategory, MilestoneToast } from \"@dodopayments/ui/milestone\";\nimport { SegmentedControl } from \"@dodopayments/ui/segmented-control\";\nimport { useState } from \"react\";\n\nconst NOTICES: Record<MilestoneCategory, { title: string; description: string }> = {\n customers: {\n title: \"100 customers, and counting\",\n description: \"You've officially got product-market fit. Let the world know.\",\n },\n geography: {\n title: \"Your business has no borders\",\n description: \"You've made sales in 23 countries. Most founders never leave their home market.\",\n },\n revenue: {\n title: \"Crossed $10,000\",\n description:\n \"From zero to $10,000 that's real money, from people who believed in what you built.\",\n },\n growth: {\n title: \"3x growth this month\",\n description: \"Month over month, you didn't just grow, you multiplied.\",\n },\n};\n\nexport default function MilestoneCelebration() {\n const [category, setCategory] = useState<MilestoneCategory>(\"customers\");\n const [open, setOpen] = useState(true);\n\n return (\n <div className=\"flex w-full flex-col items-center gap-6\">\n <SegmentedControl\n aria-label=\"Milestone category\"\n value={category}\n onValueChange={(value) => {\n setCategory(value as MilestoneCategory);\n setOpen(true);\n }}\n items={[\n { value: \"customers\", label: \"Customers\" },\n { value: \"geography\", label: \"Geography\" },\n { value: \"revenue\", label: \"Revenue\" },\n { value: \"growth\", label: \"Growth\" },\n ]}\n />\n {open ? (\n <MilestoneToast\n category={category}\n {...NOTICES[category]}\n onShare={() => setOpen(false)}\n onDismiss={() => setOpen(false)}\n />\n ) : (\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n Show the notice again\n </Button>\n )}\n </div>\n );\n}"
23936
24554
  },
23937
24555
  {
23938
24556
  "name": "milestone/empty",
@@ -24158,7 +24776,7 @@
24158
24776
  "examples": [
24159
24777
  {
24160
24778
  "name": "setup-guide/master",
24161
- "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n SetupGuide,\n SetupGuideIntro,\n type SetupGuideItem,\n type SetupGuideTaskState,\n} from \"@dodopayments/ui/setup-guide\";\nimport { useState } from \"react\";\n\nconst VERIFY = [\n [\"product\", \"Product Verification\"],\n [\"identity\", \"Personal identity\"],\n [\"business\", \"Business Information\"],\n [\"bank\", \"Bank Details\"],\n] as const;\nconst TEST = [\n [\"test-product\", \"Create a product\"],\n [\"test-integrate\", \"Integrate\"],\n [\"test-payment\", \"Make first test payment\"],\n] as const;\nconst LIVE = [\n [\"live-products\", \"Create products in Live mode\", false],\n [\"live-integrate\", \"Integrate (live)\", true],\n [\"branding\", \"Set up branding\", true],\n [\"zero-payment\", \"Make a $0 payment\", false],\n] as const;\n\ntype TaskId = (typeof VERIFY)[number][0] | (typeof TEST)[number][0] | (typeof LIVE)[number][0];\n\nconst INITIAL = Object.fromEntries(\n [...VERIFY, ...TEST, ...LIVE].map(([id]) => [id, \"pending\"]),\n) as Record<TaskId, SetupGuideTaskState>;\n\n/**\n * The Setup guide with the Design File's content: press a verification task to submit it (In review), press a test\n * or live task to finish it or use Mark as done, open the steps, collapse the guide, dismiss the intro, and close and\n * reopen the guide.\n */\nexport default function SetupGuideMaster() {\n const [states, setStates] = useState(INITIAL);\n const [intro, setIntro] = useState(true);\n const [open, setOpen] = useState(true);\n const set = (id: TaskId, state: SetupGuideTaskState) =>\n setStates((current) => ({ ...current, [id]: state }));\n\n const items: SetupGuideItem[] = [\n {\n id: \"verify\",\n title: \"Verify your account\",\n tasks: VERIFY.map(([id, label]) => ({\n id,\n label,\n state: states[id],\n // A pending form opens; submitting it puts it in review.\n onSelect: states[id] === \"pending\" ? () => set(id, \"in-review\") : undefined,\n })),\n },\n {\n id: \"test\",\n title: \"Test mode integration\",\n tasks: TEST.map(([id, label]) => ({\n id,\n label,\n state: states[id],\n onSelect: states[id] === \"done\" ? undefined : () => set(id, \"done\"),\n })),\n },\n {\n id: \"live\",\n title: \"Live mode integration\",\n tasks: LIVE.map(([id, label, manual]) => ({\n id,\n label,\n state: states[id],\n onSelect: manual || states[id] === \"done\" ? undefined : () => set(id, \"done\"),\n onMarkDone: manual ? () => set(id, \"done\") : undefined,\n })),\n },\n {\n id: \"go-live\",\n title: \"Go live\",\n hint: \"Unlocks once verification is approved\",\n locked: true,\n },\n ];\n\n return (\n <div className=\"flex min-h-130 flex-col items-center justify-end gap-2\">\n {open && intro ? <SetupGuideIntro onDismiss={() => setIntro(false)} /> : null}\n {open ? (\n <SetupGuide items={items} defaultOpenItem=\"verify\" onClose={() => setOpen(false)} />\n ) : (\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n Open the setup guide\n </Button>\n )}\n </div>\n );\n}"
24779
+ "code": "\"use client\";\n\nimport { Button } from \"@dodopayments/ui/button\";\nimport {\n SetupGuide,\n SetupGuideIntro,\n type SetupGuideItem,\n type SetupGuideTaskState,\n} from \"@dodopayments/ui/setup-guide\";\nimport { useState } from \"react\";\n\nconst VERIFY = [\n [\"product\", \"Product Verification\"],\n [\"identity\", \"Personal identity\"],\n [\"business\", \"Business Information\"],\n [\"bank\", \"Bank Details\"],\n] as const;\nconst TEST = [\n [\"test-product\", \"Create a product\"],\n [\"test-integrate\", \"Integrate\"],\n [\"test-payment\", \"Make first test payment\"],\n] as const;\nconst LIVE = [\n [\"live-products\", \"Create products in Live mode\", false],\n [\"live-integrate\", \"Integrate (live)\", true],\n [\"branding\", \"Set up branding\", true],\n [\"zero-payment\", \"Make a $0 payment\", false],\n] as const;\n\ntype TaskId = (typeof VERIFY)[number][0] | (typeof TEST)[number][0] | (typeof LIVE)[number][0];\n\nconst INITIAL = Object.fromEntries(\n [...VERIFY, ...TEST, ...LIVE].map(([id]) => [id, \"pending\"]),\n) as Record<TaskId, SetupGuideTaskState>;\n\n/**\n * The Setup guide with the Design File's content: press a verification task to submit it (In review), press a test\n * or live task to finish it or use Mark as done, open the steps, collapse the guide, dismiss the intro, and close and\n * reopen the guide.\n */\nexport default function SetupGuideMaster() {\n const [states, setStates] = useState(INITIAL);\n const [intro, setIntro] = useState(true);\n const [open, setOpen] = useState(true);\n const set = (id: TaskId, state: SetupGuideTaskState) =>\n setStates((current) => ({ ...current, [id]: state }));\n\n const items: SetupGuideItem[] = [\n {\n id: \"verify\",\n title: \"Verify your account\",\n tasks: VERIFY.map(([id, label]) => ({\n id,\n label,\n state: states[id],\n // A pending form opens; submitting it puts it in review.\n onSelect: states[id] === \"pending\" ? () => set(id, \"in-review\") : undefined,\n })),\n },\n {\n id: \"test\",\n title: \"Test mode integration\",\n tasks: TEST.map(([id, label]) => ({\n id,\n label,\n state: states[id],\n onSelect: states[id] === \"done\" ? undefined : () => set(id, \"done\"),\n })),\n },\n {\n id: \"live\",\n title: \"Live mode integration\",\n tasks: LIVE.map(([id, label, manual]) => ({\n id,\n label,\n state: states[id],\n onSelect: manual || states[id] === \"done\" ? undefined : () => set(id, \"done\"),\n onMarkDone: manual ? () => set(id, \"done\") : undefined,\n })),\n },\n {\n id: \"go-live\",\n title: \"Go live\",\n hint: \"Unlocks once verification is approved\",\n locked: true,\n },\n ];\n\n return (\n <div className=\"flex min-h-130 w-full flex-col items-center justify-end gap-2\">\n {open && intro ? <SetupGuideIntro onDismiss={() => setIntro(false)} /> : null}\n {open ? (\n <SetupGuide items={items} defaultOpenItem=\"verify\" onClose={() => setOpen(false)} />\n ) : (\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n Open the setup guide\n </Button>\n )}\n </div>\n );\n}"
24162
24780
  },
24163
24781
  {
24164
24782
  "name": "setup-guide/with-top-bar",
@@ -24562,7 +25180,7 @@
24562
25180
  },
24563
25181
  {
24564
25182
  "name": "size",
24565
- "type": "\"default\" | \"icon\" | \"xs\" | \"lg\" | \"icon-xs\" | \"icon-lg\" | null",
25183
+ "type": "\"default\" | \"sm\" | \"icon\" | \"xs\" | \"lg\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\" | null",
24566
25184
  "required": false,
24567
25185
  "description": "",
24568
25186
  "source": "dodo"
@@ -24733,7 +25351,7 @@
24733
25351
  },
24734
25352
  {
24735
25353
  "name": "size",
24736
- "type": "\"default\" | \"icon\" | \"xs\" | \"lg\" | \"icon-xs\" | \"icon-lg\" | null",
25354
+ "type": "\"default\" | \"sm\" | \"icon\" | \"xs\" | \"lg\" | \"icon-sm\" | \"icon-xs\" | \"icon-lg\" | null",
24737
25355
  "required": false,
24738
25356
  "description": "",
24739
25357
  "source": "dodo"
@@ -25014,6 +25632,13 @@
25014
25632
  "description": "Turns off dragging and keyboard moves.",
25015
25633
  "source": "dodo"
25016
25634
  },
25635
+ {
25636
+ "name": "interactive",
25637
+ "type": "boolean",
25638
+ "required": false,
25639
+ "description": "Rows hold their own controls, such as a switch or a menu. Their content stays readable by assistive\ntechnology, a key pressed on a control does not grab the row, and a row drags only from its handle, so a\nclick on a control never starts a drag.",
25640
+ "source": "dodo"
25641
+ },
25017
25642
  {
25018
25643
  "name": "onValueCommitted",
25019
25644
  "type": "((next: T[]) => void)",
@@ -25094,6 +25719,10 @@
25094
25719
  {
25095
25720
  "name": "reorder-list/commit",
25096
25721
  "code": "\"use client\";\n\nimport { ReorderList } from \"@dodopayments/ui/reorder-list\";\nimport { useState } from \"react\";\n\nconst STEPS = [\n \"Verify email\",\n \"Add a payment method\",\n \"Create a product\",\n \"Share the checkout link\",\n];\n\nexport default function ReorderListCommit() {\n const [steps, setSteps] = useState(STEPS);\n const [saved, setSaved] = useState(0);\n\n return (\n <div className=\"flex w-full max-w-sm flex-col gap-3\">\n <ReorderList\n aria-label=\"Onboarding steps\"\n value={steps}\n getKey={(s) => s}\n getLabel={(s) => s}\n onValueChange={setSteps}\n onValueCommitted={() => {\n setSaved((n) => n + 1);\n }}\n >\n {(s) => s}\n </ReorderList>\n <p className=\"text-body-primary text-muted-foreground\">\n Saved {saved} times. A save runs once per drop.\n </p>\n </div>\n );\n}"
25722
+ },
25723
+ {
25724
+ "name": "reorder-list/interactive",
25725
+ "code": "\"use client\";\n\nimport { ReorderList } from \"@dodopayments/ui/reorder-list\";\nimport { Switch } from \"@dodopayments/ui/switch\";\nimport { useState } from \"react\";\n\nconst PLANS = [\n { id: \"monthly\", name: \"Pro monthly\", on: true },\n { id: \"annual\", name: \"Pro annual\", on: true },\n { id: \"lifetime\", name: \"Lifetime\", on: false },\n];\n\nexport default function ReorderListInteractive() {\n const [plans, setPlans] = useState(PLANS);\n\n return (\n <ReorderList\n aria-label=\"Plans at checkout\"\n className=\"max-w-sm\"\n interactive\n value={plans}\n getKey={(p) => p.id}\n getLabel={(p) => p.name}\n onValueChange={setPlans}\n >\n {(p) => (\n <label className=\"flex items-center justify-between gap-3\">\n <span className=\"text-label-primary\">{p.name}</span>\n <Switch\n checked={p.on}\n onCheckedChange={(on) => {\n setPlans((all) => all.map((x) => (x.id === p.id ? { ...x, on } : x)));\n }}\n />\n </label>\n )}\n </ReorderList>\n );\n}"
25097
25726
  }
25098
25727
  ],
25099
25728
  "docsUrl": "/components/reorder-list"
@@ -25732,6 +26361,8 @@
25732
26361
  "description": "A timestamp that reveals the exact time on hover, focus or tap: the trigger shows the time in\n`format`, the tooltip lists it in the preferred (or device) zone, in UTC, relative to now and as\nepoch milliseconds. Relative times refresh every 30 seconds. Built on the `Tooltip` primitive; on\ntouch (coarse pointer) devices a tap toggles it, since primitive tooltips open on hover and focus only.",
25733
26362
  "importPath": "@dodopayments/ui/timestamp",
25734
26363
  "exports": [
26364
+ "TimeZoneProvider",
26365
+ "TimeZoneProviderProps",
25735
26366
  "Timestamp",
25736
26367
  "TimestampFormat",
25737
26368
  "TimestampLabels",
@@ -25768,7 +26399,7 @@
25768
26399
  "name": "timeZone",
25769
26400
  "type": "string",
25770
26401
  "required": false,
25771
- "description": "IANA time zone (e.g. \"Asia/Kolkata\") for the trigger and the first tooltip row. When unset or\ninvalid, the trigger uses UTC and the first row uses the device's zone.",
26402
+ "description": "IANA time zone (e.g. \"Asia/Kolkata\") for the trigger and the first tooltip row, over the\nnearest `TimeZoneProvider`'s. When neither is set or valid, the trigger uses UTC and the first row uses the device's zone.",
25772
26403
  "source": "dodo"
25773
26404
  },
25774
26405
  {
@@ -25825,6 +26456,19 @@
25825
26456
  "source": "base-ui"
25826
26457
  }
25827
26458
  ]
26459
+ },
26460
+ {
26461
+ "name": "TimeZoneProvider",
26462
+ "description": "Sets the time zone of every `Timestamp` inside it (and the components built on it, such as the\nActivity timeline), e.g. a business's preferred zone. A `timeZone` prop on a Timestamp still wins.",
26463
+ "props": [
26464
+ {
26465
+ "name": "timeZone",
26466
+ "type": "string",
26467
+ "required": true,
26468
+ "description": "IANA time zone every `Timestamp` inside uses when it has no `timeZone` of its own.",
26469
+ "source": "dodo"
26470
+ }
26471
+ ]
25828
26472
  }
25829
26473
  ],
25830
26474
  "examples": [
@@ -26898,6 +27542,222 @@
26898
27542
  ],
26899
27543
  "docsUrl": "/blocks/details-panel"
26900
27544
  },
27545
+ {
27546
+ "slug": "invoice-document",
27547
+ "title": "Invoice Document",
27548
+ "category": "Blocks",
27549
+ "status": "stable",
27550
+ "description": "An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,\nat least 842 tall) with the title, status and merchant on a grey strip, the parties, the amount due,\nthe details, the lines and the totals, then Dodo's footer. It always draws light, as the PDF does.\nPut it in a `ScaledFrame` with `width={595}` to fit it to a column.",
27551
+ "importPath": "@dodopayments/ui/invoice-document",
27552
+ "exports": [
27553
+ "InvoiceDocument",
27554
+ "InvoiceDocumentCustomer",
27555
+ "InvoiceDocumentFact",
27556
+ "InvoiceDocumentIssuer",
27557
+ "InvoiceDocumentLabels",
27558
+ "InvoiceDocumentMerchant",
27559
+ "InvoiceDocumentProps",
27560
+ "InvoiceDocumentRow",
27561
+ "InvoiceDocumentTotal",
27562
+ "InvoiceOnlineLabels",
27563
+ "InvoiceOnlinePage",
27564
+ "InvoiceOnlinePageProps",
27565
+ "InvoiceOnlineRow"
27566
+ ],
27567
+ "parts": [
27568
+ {
27569
+ "name": "InvoiceDocument",
27570
+ "description": "An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,\nat least 842 tall) with the title, status and merchant on a grey strip, the parties, the amount due,\nthe details, the lines and the totals, then Dodo's footer. It always draws light, as the PDF does.\nPut it in a `ScaledFrame` with `width={595}` to fit it to a column.",
27571
+ "props": [
27572
+ {
27573
+ "name": "customer",
27574
+ "type": "InvoiceDocumentCustomer",
27575
+ "required": true,
27576
+ "description": "",
27577
+ "source": "dodo"
27578
+ },
27579
+ {
27580
+ "name": "details",
27581
+ "type": "readonly [readonly InvoiceDocumentFact[], readonly InvoiceDocumentFact[]]",
27582
+ "required": true,
27583
+ "description": "Invoice details in two columns: the number (and payment), then the date and currency.",
27584
+ "source": "dodo"
27585
+ },
27586
+ {
27587
+ "name": "footer",
27588
+ "type": "{ disclaimer: ReactNode; copyright: ReactNode; }",
27589
+ "required": true,
27590
+ "description": "The disclaimer and copyright in the footer.",
27591
+ "source": "dodo"
27592
+ },
27593
+ {
27594
+ "name": "headline",
27595
+ "type": "ReactNode",
27596
+ "required": true,
27597
+ "description": "The amount line above the details, e.g. \"$40.00 due on Nov 26, 2026\".",
27598
+ "source": "dodo"
27599
+ },
27600
+ {
27601
+ "name": "issuer",
27602
+ "type": "InvoiceDocumentIssuer",
27603
+ "required": true,
27604
+ "description": "",
27605
+ "source": "dodo"
27606
+ },
27607
+ {
27608
+ "name": "merchant",
27609
+ "type": "InvoiceDocumentMerchant",
27610
+ "required": true,
27611
+ "description": "",
27612
+ "source": "dodo"
27613
+ },
27614
+ {
27615
+ "name": "rows",
27616
+ "type": "readonly InvoiceDocumentRow[]",
27617
+ "required": true,
27618
+ "description": "",
27619
+ "source": "dodo"
27620
+ },
27621
+ {
27622
+ "name": "status",
27623
+ "type": "{ label: ReactNode; tone: \"success\" | \"error\" | \"neutral\"; }",
27624
+ "required": true,
27625
+ "description": "The status pill beside the title, e.g. Unpaid in red or Paid in green.",
27626
+ "source": "dodo"
27627
+ },
27628
+ {
27629
+ "name": "totals",
27630
+ "type": "readonly InvoiceDocumentTotal[]",
27631
+ "required": true,
27632
+ "description": "",
27633
+ "source": "dodo"
27634
+ },
27635
+ {
27636
+ "name": "discount",
27637
+ "type": "{ label: ReactNode; amount: ReactNode; }",
27638
+ "required": false,
27639
+ "description": "The discount row under the lines, e.g. \"Discounts Applied “WELCOME10”\" and its amount.",
27640
+ "source": "dodo"
27641
+ },
27642
+ {
27643
+ "name": "labels",
27644
+ "type": "Partial<InvoiceDocumentLabels>",
27645
+ "required": false,
27646
+ "description": "",
27647
+ "source": "dodo"
27648
+ },
27649
+ {
27650
+ "name": "payOnline",
27651
+ "type": "ReactNode",
27652
+ "required": false,
27653
+ "description": "The \"Pay Online\" link text under the headline. Leave it out on a paid invoice.",
27654
+ "source": "dodo"
27655
+ }
27656
+ ]
27657
+ },
27658
+ {
27659
+ "name": "InvoiceOnlinePage",
27660
+ "description": "The invoice email or the hosted invoice page, ported from the dashboard's invoice preview: the\nmerchant over a 480-wide card with the amount due, the customer (email) or the parties (hosted), a\nPay button, the order summary and the contact line. It always draws light. Put it in a\n`ScaledFrame` with `width={480}` to fit it to a column.",
27661
+ "props": [
27662
+ {
27663
+ "name": "amount",
27664
+ "type": "ReactNode",
27665
+ "required": true,
27666
+ "description": "The amount due, large.",
27667
+ "source": "dodo"
27668
+ },
27669
+ {
27670
+ "name": "due",
27671
+ "type": "ReactNode",
27672
+ "required": true,
27673
+ "description": "The line under the amount, e.g. \"Due Nov 26, 2026\".",
27674
+ "source": "dodo"
27675
+ },
27676
+ {
27677
+ "name": "merchant",
27678
+ "type": "InvoiceDocumentMerchant",
27679
+ "required": true,
27680
+ "description": "",
27681
+ "source": "dodo"
27682
+ },
27683
+ {
27684
+ "name": "rows",
27685
+ "type": "readonly InvoiceOnlineRow[]",
27686
+ "required": true,
27687
+ "description": "",
27688
+ "source": "dodo"
27689
+ },
27690
+ {
27691
+ "name": "supportEmail",
27692
+ "type": "ReactNode",
27693
+ "required": true,
27694
+ "description": "The address after `labels.contact`.",
27695
+ "source": "dodo"
27696
+ },
27697
+ {
27698
+ "name": "total",
27699
+ "type": "{ label: ReactNode; value: ReactNode; }",
27700
+ "required": true,
27701
+ "description": "The last line of the summary, e.g. \"Total Due\" and its amount.",
27702
+ "source": "dodo"
27703
+ },
27704
+ {
27705
+ "name": "variant",
27706
+ "type": "\"email\" | \"hosted\"",
27707
+ "required": true,
27708
+ "description": "`email` is the email the customer gets; `hosted` the page where they pay.",
27709
+ "source": "dodo"
27710
+ },
27711
+ {
27712
+ "name": "customer",
27713
+ "type": "InvoiceDocumentCustomer",
27714
+ "required": false,
27715
+ "description": "Email only: the customer block, as on the PDF.",
27716
+ "source": "dodo"
27717
+ },
27718
+ {
27719
+ "name": "discount",
27720
+ "type": "{ label: ReactNode; amount: ReactNode; }",
27721
+ "required": false,
27722
+ "description": "",
27723
+ "source": "dodo"
27724
+ },
27725
+ {
27726
+ "name": "facts",
27727
+ "type": "readonly InvoiceDocumentFact[]",
27728
+ "required": false,
27729
+ "description": "Hosted page only: label / value lines such as \"Invoice to :\" and \"From :\".",
27730
+ "source": "dodo"
27731
+ },
27732
+ {
27733
+ "name": "from",
27734
+ "type": "ReactNode",
27735
+ "required": false,
27736
+ "description": "The email's line above the amount, e.g. \"Invoice from Acme\". Email only.",
27737
+ "source": "dodo"
27738
+ },
27739
+ {
27740
+ "name": "labels",
27741
+ "type": "Partial<InvoiceOnlineLabels>",
27742
+ "required": false,
27743
+ "description": "",
27744
+ "source": "dodo"
27745
+ }
27746
+ ]
27747
+ }
27748
+ ],
27749
+ "examples": [
27750
+ {
27751
+ "name": "invoice-document/online",
27752
+ "code": "\"use client\";\n\nimport { InvoiceOnlinePage } from \"@dodopayments/ui/invoice-document\";\nimport { ScaledFrame } from \"@dodopayments/ui/scaled-frame\";\n\nconst rows = [\n { amount: \"$100.00 / mo\", id: \"plan\", name: \"Growth plan\", quantity: \"Qty : 1\" },\n { amount: \"$25.00\", id: \"seat\", name: \"Extra seat\", quantity: \"Qty : 1\" },\n];\n\nexport default function InvoiceDocumentOnline() {\n return (\n <div className=\"light grid w-full max-w-3xl gap-4 rounded-xl bg-muted px-4 py-8 sm:grid-cols-2\">\n <ScaledFrame width={480}>\n <InvoiceOnlinePage\n amount=\"$125.00\"\n customer={{ address: [\"Berlin\", \"DE\"], email: \"ada@example.com\", name: \"Ada Lovelace\" }}\n due=\"Due Nov 16, 2026\"\n from=\"Invoice from Acme Labs\"\n merchant={{ name: \"Acme Labs\" }}\n rows={rows}\n supportEmail=\"support@dodopayments.com\"\n total={{ label: \"Total Due\", value: \"$125.00\" }}\n variant=\"email\"\n />\n </ScaledFrame>\n <ScaledFrame width={480}>\n <InvoiceOnlinePage\n amount=\"$125.00\"\n due=\"Due Nov 16, 2026\"\n facts={[\n { label: \"Invoice to :\", value: \"Ada Lovelace\" },\n { label: \"From :\", value: \"Acme Labs\" },\n { label: \"Invoice Number :\", value: \"inv_0NrmhsTUbGRG\" },\n ]}\n merchant={{ name: \"Acme Labs\" }}\n rows={rows}\n supportEmail=\"support@dodopayments.com\"\n total={{ label: \"Total Due\", value: \"$125.00\" }}\n variant=\"hosted\"\n />\n </ScaledFrame>\n </div>\n );\n}"
27753
+ },
27754
+ {
27755
+ "name": "invoice-document/pdf",
27756
+ "code": "\"use client\";\n\nimport { InvoiceDocument } from \"@dodopayments/ui/invoice-document\";\nimport { ScaledFrame } from \"@dodopayments/ui/scaled-frame\";\n\nexport default function InvoiceDocumentPdf() {\n return (\n <div className=\"w-full max-w-xl\">\n <ScaledFrame width={595}>\n <InvoiceDocument\n customer={{\n address: [\"Main St 1, Berlin, 10115\", \"DE\"],\n email: \"ada@example.com\",\n name: \"Ada Lovelace\",\n }}\n details={[\n [{ label: \"Invoice Number :\", value: \"inv_0NrmhsTUbGRG\" }],\n [\n { label: \"Invoice Date :\", value: \"Nov 2, 2026\" },\n { label: \"Currency Code :\", value: \"USD\" },\n ],\n ]}\n discount={{ amount: \"$10.00\", label: \"Discounts Applied “WELCOME10”\" }}\n footer={{\n copyright: \"© 2026 Dodo Payments Inc. All rights reserved.\",\n disclaimer:\n \"If you have a problem with your order (example: don’t recognize the charge, suspect a fraudulent transaction, etc,) please visit dodopayments.com\",\n }}\n headline=\"$115.00 due on Nov 16, 2026\"\n issuer={{\n address: \"8 The Green, STE A, Dover, Country of Kent, Delaware, 19901 United States\",\n name: \"Dodo Payments Inc\",\n taxId: \"993486577\",\n }}\n merchant={{ name: \"Acme Labs\" }}\n payOnline=\"Pay Online\"\n rows={[\n {\n amount: \"$100.00\",\n details: [\"Nov 2 - Dec 2, 2026\"],\n id: \"plan\",\n name: \"Growth plan\",\n quantity: 1,\n tax: \"$0.00\",\n taxPercent: \"-\",\n unitPrice: \"$100.00 / mo\",\n },\n {\n addOn: true,\n amount: \"$25.00\",\n id: \"seat\",\n name: \"Extra seat\",\n quantity: 1,\n tax: \"$0.00\",\n taxPercent: \"-\",\n unitPrice: \"$25.00\",\n },\n ]}\n status={{ label: \"Unpaid\", tone: \"error\" }}\n totals={[\n { label: \"Subtotal\", value: \"$115.00\" },\n { label: \"Total Tax\", value: \"$0.00\" },\n { label: \"Total\", value: \"$115.00\" },\n { label: \"Amount Due\", strong: true, value: \"$115.00\" },\n ]}\n />\n </ScaledFrame>\n </div>\n );\n}"
27757
+ }
27758
+ ],
27759
+ "docsUrl": "/blocks/invoice-document"
27760
+ },
26901
27761
  {
26902
27762
  "slug": "payment-result",
26903
27763
  "title": "Payment Result",
@@ -29443,7 +30303,7 @@
29443
30303
  "props": [
29444
30304
  {
29445
30305
  "name": "brand",
29446
- "type": "\"meta\" | \"github\" | \"gitlab\" | \"terraform\" | \"vercel\" | \"google-cloud\" | \"aws\" | \"kubernetes\" | \"google-analytics\" | \"google-tag-manager\" | \"stripe\" | \"adyen\" | \"dodo-payments\"",
30306
+ "type": "\"meta\" | \"github\" | \"gitlab\" | \"terraform\" | \"vercel\" | \"google-cloud\" | \"aws\" | \"kubernetes\" | \"google-analytics\" | \"google-tag-manager\" | \"stripe\" | \"adyen\" | \"dodo-payments\" | \"discord\" | \"telegram\" | \"notion\" | \"framer\" | \"figma\"",
29447
30307
  "required": true,
29448
30308
  "description": "Which brand's mark to draw.",
29449
30309
  "source": "dodo"
@@ -29495,7 +30355,7 @@
29495
30355
  "props": [
29496
30356
  {
29497
30357
  "name": "brand",
29498
- "type": "\"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\"",
30358
+ "type": "\"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\"",
29499
30359
  "required": true,
29500
30360
  "description": "The payment method. `unknown` draws a credit card icon for methods without artwork.",
29501
30361
  "source": "dodo"