@dodopayments/ui 1.6.0 → 1.7.1

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 (496) hide show
  1. package/ai/component-registry.json +766 -67
  2. package/ai/component-registry.md +3 -0
  3. package/ai/components/activity-timeline.md +1 -1
  4. package/ai/components/alert.md +1 -1
  5. package/ai/components/app-top-bar.md +53 -3
  6. package/ai/components/auth-card.md +2 -0
  7. package/ai/components/bar-chart.md +4 -2
  8. package/ai/components/brand-logos.md +1 -1
  9. package/ai/components/button.md +86 -11
  10. package/ai/components/card.md +6 -3
  11. package/ai/components/celebration-dialog.md +66 -0
  12. package/ai/components/chart-share-card.md +25 -0
  13. package/ai/components/chart.md +27 -1
  14. package/ai/components/code-block.md +2 -1
  15. package/ai/components/collapsible.md +2 -2
  16. package/ai/components/command.md +4 -1
  17. package/ai/components/comparison-bars.md +1 -0
  18. package/ai/components/data-grid.md +2 -1
  19. package/ai/components/details-panel.md +5 -3
  20. package/ai/components/dialog.md +1 -0
  21. package/ai/components/empty.md +1 -1
  22. package/ai/components/field.md +15 -5
  23. package/ai/components/input.md +31 -6
  24. package/ai/components/leaderboard.md +5 -2
  25. package/ai/components/link.md +1 -1
  26. package/ai/components/list-item.md +5 -4
  27. package/ai/components/navigation-progress.md +55 -0
  28. package/ai/components/page-header.md +4 -4
  29. package/ai/components/popover.md +2 -0
  30. package/ai/components/quantity-stepper.md +3 -3
  31. package/ai/components/record-header.md +5 -5
  32. package/ai/components/rich-text-editor.md +2 -0
  33. package/ai/components/scaled-frame.md +4 -2
  34. package/ai/components/select.md +5 -2
  35. package/ai/components/settings-section.md +3 -0
  36. package/ai/components/sheet.md +10 -10
  37. package/ai/components/sidebar.md +21 -6
  38. package/ai/components/stat-card.md +7 -6
  39. package/ai/components/tabs.md +15 -4
  40. package/dist/components/activity-timeline/activity-timeline.d.ts +1 -1
  41. package/dist/components/activity-timeline/activity-timeline.js +2 -2
  42. package/dist/components/activity-timeline/activity-timeline.js.map +1 -1
  43. package/dist/components/alert/alert.d.ts +2 -1
  44. package/dist/components/alert/alert.d.ts.map +1 -1
  45. package/dist/components/alert/alert.js +1 -1
  46. package/dist/components/alert/alert.js.map +1 -1
  47. package/dist/components/app-top-bar/app-top-bar.d.ts +29 -3
  48. package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
  49. package/dist/components/app-top-bar/app-top-bar.js +38 -12
  50. package/dist/components/app-top-bar/app-top-bar.js.map +1 -1
  51. package/dist/components/app-top-bar/index.d.ts +1 -1
  52. package/dist/components/app-top-bar/index.d.ts.map +1 -1
  53. package/dist/components/app-top-bar/index.js +1 -1
  54. package/dist/components/app-top-bar/index.js.map +1 -1
  55. package/dist/components/auth-card/auth-card.d.ts +13 -1
  56. package/dist/components/auth-card/auth-card.d.ts.map +1 -1
  57. package/dist/components/auth-card/auth-card.js +5 -5
  58. package/dist/components/auth-card/auth-card.js.map +1 -1
  59. package/dist/components/badge/badge-status.d.ts +3 -3
  60. package/dist/components/badge/badge-status.js +3 -3
  61. package/dist/components/badge/badge-status.js.map +1 -1
  62. package/dist/components/bar-chart/bar-chart.d.ts +2 -1
  63. package/dist/components/bar-chart/bar-chart.d.ts.map +1 -1
  64. package/dist/components/bar-chart/bar-chart.js +2 -1
  65. package/dist/components/bar-chart/bar-chart.js.map +1 -1
  66. package/dist/components/brand-logos/brand-artwork.d.ts +99 -3
  67. package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
  68. package/dist/components/brand-logos/brand-artwork.js +99 -3
  69. package/dist/components/brand-logos/brand-artwork.js.map +1 -1
  70. package/dist/components/brand-logos/brand-logos.d.ts +5 -2
  71. package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
  72. package/dist/components/brand-logos/brand-logos.js +46 -2
  73. package/dist/components/brand-logos/brand-logos.js.map +1 -1
  74. package/dist/components/button/button-narrow-label.d.ts +11 -0
  75. package/dist/components/button/button-narrow-label.d.ts.map +1 -0
  76. package/dist/components/button/button-narrow-label.js +22 -0
  77. package/dist/components/button/button-narrow-label.js.map +1 -0
  78. package/dist/components/button/button.d.ts +29 -6
  79. package/dist/components/button/button.d.ts.map +1 -1
  80. package/dist/components/button/button.js +71 -14
  81. package/dist/components/button/button.js.map +1 -1
  82. package/dist/components/button/index.d.ts +1 -1
  83. package/dist/components/button/index.d.ts.map +1 -1
  84. package/dist/components/button/index.js +1 -1
  85. package/dist/components/button/index.js.map +1 -1
  86. package/dist/components/card/card.d.ts +16 -5
  87. package/dist/components/card/card.d.ts.map +1 -1
  88. package/dist/components/card/card.js +13 -4
  89. package/dist/components/card/card.js.map +1 -1
  90. package/dist/components/celebration-dialog/celebration-dialog.d.ts +23 -0
  91. package/dist/components/celebration-dialog/celebration-dialog.d.ts.map +1 -0
  92. package/dist/components/celebration-dialog/celebration-dialog.js +158 -0
  93. package/dist/components/celebration-dialog/celebration-dialog.js.map +1 -0
  94. package/dist/components/celebration-dialog/index.d.ts +2 -0
  95. package/dist/components/celebration-dialog/index.d.ts.map +1 -0
  96. package/dist/components/celebration-dialog/index.js +2 -0
  97. package/dist/components/celebration-dialog/index.js.map +1 -0
  98. package/dist/components/chart-share-card/chart-share-card.d.ts +31 -0
  99. package/dist/components/chart-share-card/chart-share-card.d.ts.map +1 -0
  100. package/dist/components/chart-share-card/chart-share-card.js +15 -0
  101. package/dist/components/chart-share-card/chart-share-card.js.map +1 -0
  102. package/dist/components/chart-share-card/index.d.ts +2 -0
  103. package/dist/components/chart-share-card/index.d.ts.map +1 -0
  104. package/dist/components/chart-share-card/index.js +2 -0
  105. package/dist/components/chart-share-card/index.js.map +1 -0
  106. package/dist/components/code-block/code-block.d.ts +7 -2
  107. package/dist/components/code-block/code-block.d.ts.map +1 -1
  108. package/dist/components/code-block/code-block.js +49 -6
  109. package/dist/components/code-block/code-block.js.map +1 -1
  110. package/dist/components/code-block/highlight-code.d.ts +10 -0
  111. package/dist/components/code-block/highlight-code.d.ts.map +1 -0
  112. package/dist/components/code-block/highlight-code.js +45 -0
  113. package/dist/components/code-block/highlight-code.js.map +1 -0
  114. package/dist/components/code-block/highlight-shell.d.ts +9 -0
  115. package/dist/components/code-block/highlight-shell.d.ts.map +1 -0
  116. package/dist/components/code-block/highlight-shell.js +53 -0
  117. package/dist/components/code-block/highlight-shell.js.map +1 -0
  118. package/dist/components/collapsible/collapsible.d.ts +2 -2
  119. package/dist/components/collapsible/collapsible.js +4 -4
  120. package/dist/components/collapsible/collapsible.js.map +1 -1
  121. package/dist/components/command/command-palette.d.ts +15 -2
  122. package/dist/components/command/command-palette.d.ts.map +1 -1
  123. package/dist/components/command/command-palette.js +8 -5
  124. package/dist/components/command/command-palette.js.map +1 -1
  125. package/dist/components/comparison-bars/comparison-bars.d.ts +13 -2
  126. package/dist/components/comparison-bars/comparison-bars.d.ts.map +1 -1
  127. package/dist/components/comparison-bars/comparison-bars.js +3 -3
  128. package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
  129. package/dist/components/data-grid/data-grid.d.ts +16 -1
  130. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  131. package/dist/components/data-grid/data-grid.js +94 -4
  132. package/dist/components/data-grid/data-grid.js.map +1 -1
  133. package/dist/components/date-picker/date-picker.d.ts +5 -0
  134. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  135. package/dist/components/date-picker/date-picker.js +2 -2
  136. package/dist/components/date-picker/date-picker.js.map +1 -1
  137. package/dist/components/details-panel/details-panel.d.ts +11 -4
  138. package/dist/components/details-panel/details-panel.d.ts.map +1 -1
  139. package/dist/components/details-panel/details-panel.js +13 -12
  140. package/dist/components/details-panel/details-panel.js.map +1 -1
  141. package/dist/components/empty/empty.d.ts +3 -2
  142. package/dist/components/empty/empty.d.ts.map +1 -1
  143. package/dist/components/empty/empty.js.map +1 -1
  144. package/dist/components/field/field.d.ts +8 -6
  145. package/dist/components/field/field.d.ts.map +1 -1
  146. package/dist/components/field/field.js +15 -7
  147. package/dist/components/field/field.js.map +1 -1
  148. package/dist/components/field/index.d.ts +1 -0
  149. package/dist/components/field/index.d.ts.map +1 -1
  150. package/dist/components/field/index.js +1 -0
  151. package/dist/components/field/index.js.map +1 -1
  152. package/dist/components/field/label.d.ts +2 -1
  153. package/dist/components/field/label.d.ts.map +1 -1
  154. package/dist/components/field/label.js +2 -1
  155. package/dist/components/field/label.js.map +1 -1
  156. package/dist/components/file-upload/file-upload.d.ts +1 -1
  157. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  158. package/dist/components/icon-morph/icon-morph.d.ts +1 -1
  159. package/dist/components/icon-morph/icon-morph.d.ts.map +1 -1
  160. package/dist/components/icon-morph/icon-morph.js.map +1 -1
  161. package/dist/components/input/input-suggestions.d.ts +1 -1
  162. package/dist/components/input/input-suggestions.d.ts.map +1 -1
  163. package/dist/components/input/input-suggestions.js +21 -4
  164. package/dist/components/input/input-suggestions.js.map +1 -1
  165. package/dist/components/input/input.d.ts +21 -8
  166. package/dist/components/input/input.d.ts.map +1 -1
  167. package/dist/components/input/input.js +18 -8
  168. package/dist/components/input/input.js.map +1 -1
  169. package/dist/components/input-group/input-group.d.ts +1 -1
  170. package/dist/components/input-group/input-group.d.ts.map +1 -1
  171. package/dist/components/leaderboard/leaderboard.d.ts +3 -1
  172. package/dist/components/leaderboard/leaderboard.d.ts.map +1 -1
  173. package/dist/components/leaderboard/leaderboard.js +7 -5
  174. package/dist/components/leaderboard/leaderboard.js.map +1 -1
  175. package/dist/components/link/link.d.ts +4 -3
  176. package/dist/components/link/link.d.ts.map +1 -1
  177. package/dist/components/link/link.js +21 -2
  178. package/dist/components/link/link.js.map +1 -1
  179. package/dist/components/list-item/list-item.d.ts +10 -4
  180. package/dist/components/list-item/list-item.d.ts.map +1 -1
  181. package/dist/components/list-item/list-item.js +4 -4
  182. package/dist/components/list-item/list-item.js.map +1 -1
  183. package/dist/components/list-toolbar/list-toolbar.js +1 -1
  184. package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
  185. package/dist/components/milestone/milestone.js +1 -1
  186. package/dist/components/milestone/milestone.js.map +1 -1
  187. package/dist/components/money/money.d.ts.map +1 -1
  188. package/dist/components/money/money.js +3 -3
  189. package/dist/components/money/money.js.map +1 -1
  190. package/dist/components/navigation-progress/index.d.ts +2 -0
  191. package/dist/components/navigation-progress/index.d.ts.map +1 -0
  192. package/dist/components/navigation-progress/index.js +2 -0
  193. package/dist/components/navigation-progress/index.js.map +1 -0
  194. package/dist/components/navigation-progress/navigation-progress.d.ts +23 -0
  195. package/dist/components/navigation-progress/navigation-progress.d.ts.map +1 -0
  196. package/dist/components/navigation-progress/navigation-progress.js +53 -0
  197. package/dist/components/navigation-progress/navigation-progress.js.map +1 -0
  198. package/dist/components/page-header/page-header.d.ts +3 -3
  199. package/dist/components/page-header/page-header.d.ts.map +1 -1
  200. package/dist/components/page-header/page-header.js +5 -8
  201. package/dist/components/page-header/page-header.js.map +1 -1
  202. package/dist/components/popover/popover.d.ts +5 -1
  203. package/dist/components/popover/popover.d.ts.map +1 -1
  204. package/dist/components/popover/popover.js +4 -2
  205. package/dist/components/popover/popover.js.map +1 -1
  206. package/dist/components/quantity-stepper/quantity-stepper.d.ts +3 -3
  207. package/dist/components/quantity-stepper/quantity-stepper.js +2 -2
  208. package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
  209. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  210. package/dist/components/radio-group/radio-group.js +6 -4
  211. package/dist/components/radio-group/radio-group.js.map +1 -1
  212. package/dist/components/record-header/record-header.d.ts +7 -3
  213. package/dist/components/record-header/record-header.d.ts.map +1 -1
  214. package/dist/components/record-header/record-header.js +11 -3
  215. package/dist/components/record-header/record-header.js.map +1 -1
  216. package/dist/components/rich-text-editor/rich-text-editor.d.ts +13 -1
  217. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  218. package/dist/components/rich-text-editor/rich-text-editor.js +17 -9
  219. package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
  220. package/dist/components/rich-text-editor/rich-text-extensions.d.ts +5 -2
  221. package/dist/components/rich-text-editor/rich-text-extensions.d.ts.map +1 -1
  222. package/dist/components/rich-text-editor/rich-text-extensions.js +43 -5
  223. package/dist/components/rich-text-editor/rich-text-extensions.js.map +1 -1
  224. package/dist/components/rich-text-editor/rich-text-markdown.d.ts +9 -3
  225. package/dist/components/rich-text-editor/rich-text-markdown.d.ts.map +1 -1
  226. package/dist/components/rich-text-editor/rich-text-markdown.js +134 -44
  227. package/dist/components/rich-text-editor/rich-text-markdown.js.map +1 -1
  228. package/dist/components/scaled-frame/scaled-frame.d.ts +2 -1
  229. package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
  230. package/dist/components/scaled-frame/scaled-frame.js +8 -2
  231. package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
  232. package/dist/components/select/select.d.ts +6 -3
  233. package/dist/components/select/select.d.ts.map +1 -1
  234. package/dist/components/select/select.js +12 -7
  235. package/dist/components/select/select.js.map +1 -1
  236. package/dist/components/settings-section/settings-section.d.ts +8 -1
  237. package/dist/components/settings-section/settings-section.d.ts.map +1 -1
  238. package/dist/components/settings-section/settings-section.js +8 -8
  239. package/dist/components/settings-section/settings-section.js.map +1 -1
  240. package/dist/components/setup-guide/setup-guide.d.ts +2 -2
  241. package/dist/components/setup-guide/setup-guide.js +2 -2
  242. package/dist/components/setup-guide/setup-guide.js.map +1 -1
  243. package/dist/components/sheet/sheet.d.ts +16 -5
  244. package/dist/components/sheet/sheet.d.ts.map +1 -1
  245. package/dist/components/sheet/sheet.js +9 -5
  246. package/dist/components/sheet/sheet.js.map +1 -1
  247. package/dist/components/sidebar/index.d.ts +1 -1
  248. package/dist/components/sidebar/index.d.ts.map +1 -1
  249. package/dist/components/sidebar/index.js +1 -1
  250. package/dist/components/sidebar/index.js.map +1 -1
  251. package/dist/components/sidebar/sidebar.d.ts +37 -10
  252. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  253. package/dist/components/sidebar/sidebar.js +75 -27
  254. package/dist/components/sidebar/sidebar.js.map +1 -1
  255. package/dist/components/skeleton/page-skeleton.js +1 -1
  256. package/dist/components/skeleton/page-skeleton.js.map +1 -1
  257. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  258. package/dist/components/skeleton/skeleton.js +1 -1
  259. package/dist/components/skeleton/skeleton.js.map +1 -1
  260. package/dist/components/stat-card/stat-card.d.ts +24 -10
  261. package/dist/components/stat-card/stat-card.d.ts.map +1 -1
  262. package/dist/components/stat-card/stat-card.js +27 -18
  263. package/dist/components/stat-card/stat-card.js.map +1 -1
  264. package/dist/components/tabs/index.d.ts +1 -1
  265. package/dist/components/tabs/index.d.ts.map +1 -1
  266. package/dist/components/tabs/index.js +1 -1
  267. package/dist/components/tabs/index.js.map +1 -1
  268. package/dist/components/tabs/tabs.d.ts +18 -6
  269. package/dist/components/tabs/tabs.d.ts.map +1 -1
  270. package/dist/components/tabs/tabs.js +96 -7
  271. package/dist/components/tabs/tabs.js.map +1 -1
  272. package/dist/icons/flags/basque.d.ts.map +1 -0
  273. package/dist/icons/flags/basque.js.map +1 -0
  274. package/dist/icons/flags/canary-islands.d.ts.map +1 -0
  275. package/dist/icons/flags/canary-islands.js.map +1 -0
  276. package/dist/icons/flags/england.d.ts.map +1 -0
  277. package/dist/icons/flags/england.js.map +1 -0
  278. package/dist/icons/flags/hawaii.d.ts.map +1 -0
  279. package/dist/icons/flags/hawaii.js.map +1 -0
  280. package/dist/icons/flags/kurdistan.d.ts.map +1 -0
  281. package/dist/icons/flags/kurdistan.js.map +1 -0
  282. package/dist/icons/flags/netherlands-antilles.d.ts.map +1 -0
  283. package/dist/icons/flags/netherlands-antilles.js.map +1 -0
  284. package/dist/icons/flags/northen-ireland.d.ts.map +1 -0
  285. package/dist/icons/flags/northen-ireland.js.map +1 -0
  286. package/dist/icons/flags/scotland.d.ts.map +1 -0
  287. package/dist/icons/flags/scotland.js.map +1 -0
  288. package/dist/icons/flags/wales.d.ts.map +1 -0
  289. package/dist/icons/flags/wales.js.map +1 -0
  290. package/dist/icons/index.d.ts +12 -0
  291. package/dist/icons/index.d.ts.map +1 -0
  292. package/dist/icons/index.js +12 -0
  293. package/dist/icons/index.js.map +1 -0
  294. package/dist/icons/ui/ai-agents.d.ts +3 -0
  295. package/dist/icons/ui/ai-agents.d.ts.map +1 -0
  296. package/dist/icons/ui/ai-agents.js +5 -0
  297. package/dist/icons/ui/ai-agents.js.map +1 -0
  298. package/dist/icons/ui/archive.d.ts.map +1 -0
  299. package/dist/icons/ui/archive.js.map +1 -0
  300. package/dist/icons/ui/arrow-door-out-3.d.ts.map +1 -0
  301. package/dist/icons/ui/arrow-door-out-3.js.map +1 -0
  302. package/dist/icons/ui/arrow-door-out.d.ts.map +1 -0
  303. package/dist/icons/ui/arrow-door-out.js.map +1 -0
  304. package/dist/icons/ui/arrow-left.d.ts.map +1 -0
  305. package/dist/icons/ui/arrow-left.js.map +1 -0
  306. package/dist/icons/ui/arrows-transaction.d.ts.map +1 -0
  307. package/dist/icons/ui/arrows-transaction.js.map +1 -0
  308. package/dist/icons/ui/bell-outline-duo.d.ts.map +1 -0
  309. package/dist/icons/ui/bell-outline-duo.js.map +1 -0
  310. package/dist/icons/ui/bolt.d.ts.map +1 -0
  311. package/dist/icons/ui/bolt.js.map +1 -0
  312. package/dist/icons/ui/book-open.d.ts +3 -0
  313. package/dist/icons/ui/book-open.d.ts.map +1 -0
  314. package/dist/icons/ui/book-open.js +5 -0
  315. package/dist/icons/ui/book-open.js.map +1 -0
  316. package/dist/icons/ui/box-glyph.d.ts.map +1 -0
  317. package/dist/icons/ui/box-glyph.js.map +1 -0
  318. package/dist/icons/ui/box-plus.d.ts.map +1 -0
  319. package/dist/icons/ui/box-plus.js.map +1 -0
  320. package/dist/icons/ui/chart-pie.d.ts.map +1 -0
  321. package/dist/icons/ui/chart-pie.js.map +1 -0
  322. package/dist/icons/ui/chat-bubble-writing.d.ts +3 -0
  323. package/dist/icons/ui/chat-bubble-writing.d.ts.map +1 -0
  324. package/dist/icons/ui/chat-bubble-writing.js +5 -0
  325. package/dist/icons/ui/chat-bubble-writing.js.map +1 -0
  326. package/dist/icons/ui/check-glyph-12.d.ts.map +1 -0
  327. package/dist/icons/ui/check-glyph-12.js.map +1 -0
  328. package/dist/icons/ui/circle-check-glyph.d.ts.map +1 -0
  329. package/dist/icons/ui/circle-check-glyph.js.map +1 -0
  330. package/dist/icons/ui/circle-user-check.d.ts.map +1 -0
  331. package/dist/icons/ui/circle-user-check.js.map +1 -0
  332. package/dist/icons/ui/coins.d.ts.map +1 -0
  333. package/dist/icons/ui/coins.js.map +1 -0
  334. package/dist/icons/ui/dots-vertical.d.ts.map +1 -0
  335. package/dist/icons/ui/dots-vertical.js.map +1 -0
  336. package/dist/icons/ui/fingerprint.d.ts.map +1 -0
  337. package/dist/icons/ui/fingerprint.js.map +1 -0
  338. package/dist/icons/ui/flask.d.ts.map +1 -0
  339. package/dist/icons/ui/flask.js.map +1 -0
  340. package/dist/icons/ui/gear.d.ts.map +1 -0
  341. package/dist/icons/ui/gear.js.map +1 -0
  342. package/dist/icons/ui/greek-temple-glyph.d.ts.map +1 -0
  343. package/dist/icons/ui/greek-temple-glyph.js.map +1 -0
  344. package/dist/icons/ui/greek-temple.d.ts.map +1 -0
  345. package/dist/icons/ui/greek-temple.js.map +1 -0
  346. package/dist/icons/ui/grid.d.ts +3 -0
  347. package/dist/icons/ui/grid.d.ts.map +1 -0
  348. package/dist/icons/ui/grid.js +5 -0
  349. package/dist/icons/ui/grid.js.map +1 -0
  350. package/dist/icons/ui/heart-glyph.d.ts.map +1 -0
  351. package/dist/icons/ui/heart-glyph.js.map +1 -0
  352. package/dist/icons/ui/heart.d.ts.map +1 -0
  353. package/dist/icons/ui/heart.js.map +1 -0
  354. package/dist/icons/ui/hourglass-glyph.d.ts.map +1 -0
  355. package/dist/icons/ui/hourglass-glyph.js.map +1 -0
  356. package/dist/icons/ui/house.d.ts.map +1 -0
  357. package/dist/icons/ui/house.js.map +1 -0
  358. package/dist/icons/ui/key.d.ts.map +1 -0
  359. package/dist/icons/ui/key.js.map +1 -0
  360. package/dist/icons/ui/lightbulb.d.ts +3 -0
  361. package/dist/icons/ui/lightbulb.d.ts.map +1 -0
  362. package/dist/icons/ui/lightbulb.js +5 -0
  363. package/dist/icons/ui/lightbulb.js.map +1 -0
  364. package/dist/icons/ui/link.d.ts +3 -0
  365. package/dist/icons/ui/link.d.ts.map +1 -0
  366. package/dist/icons/ui/link.js +5 -0
  367. package/dist/icons/ui/link.js.map +1 -0
  368. package/dist/icons/ui/media-pause.d.ts +3 -0
  369. package/dist/icons/ui/media-pause.d.ts.map +1 -0
  370. package/dist/icons/ui/media-pause.js +5 -0
  371. package/dist/icons/ui/media-pause.js.map +1 -0
  372. package/dist/icons/ui/media-play.d.ts +3 -0
  373. package/dist/icons/ui/media-play.d.ts.map +1 -0
  374. package/dist/icons/ui/media-play.js +5 -0
  375. package/dist/icons/ui/media-play.js.map +1 -0
  376. package/dist/icons/ui/money-bill.d.ts.map +1 -0
  377. package/dist/icons/ui/money-bill.js.map +1 -0
  378. package/dist/icons/ui/money-bills.d.ts.map +1 -0
  379. package/dist/icons/ui/money-bills.js.map +1 -0
  380. package/dist/icons/ui/money-refund.d.ts.map +1 -0
  381. package/dist/icons/ui/money-refund.js.map +1 -0
  382. package/dist/icons/ui/monitor.d.ts.map +1 -0
  383. package/dist/icons/ui/monitor.js.map +1 -0
  384. package/dist/icons/ui/moon.d.ts.map +1 -0
  385. package/dist/icons/ui/moon.js.map +1 -0
  386. package/dist/icons/ui/paper-plane.d.ts +3 -0
  387. package/dist/icons/ui/paper-plane.d.ts.map +1 -0
  388. package/dist/icons/ui/paper-plane.js +5 -0
  389. package/dist/icons/ui/paper-plane.js.map +1 -0
  390. package/dist/icons/ui/pencil.d.ts.map +1 -0
  391. package/dist/icons/ui/pencil.js.map +1 -0
  392. package/dist/icons/ui/print.d.ts +3 -0
  393. package/dist/icons/ui/print.d.ts.map +1 -0
  394. package/dist/icons/ui/print.js +5 -0
  395. package/dist/icons/ui/print.js.map +1 -0
  396. package/dist/icons/ui/refresh-clockwise.d.ts.map +1 -0
  397. package/dist/icons/ui/refresh-clockwise.js.map +1 -0
  398. package/dist/icons/ui/report.d.ts.map +1 -0
  399. package/dist/icons/ui/report.js.map +1 -0
  400. package/dist/icons/ui/shield-check.d.ts.map +1 -0
  401. package/dist/icons/ui/shield-check.js.map +1 -0
  402. package/dist/icons/ui/shop-glyph.d.ts.map +1 -0
  403. package/dist/icons/ui/shop-glyph.js.map +1 -0
  404. package/dist/icons/ui/sliders.d.ts.map +1 -0
  405. package/dist/icons/ui/sliders.js.map +1 -0
  406. package/dist/icons/ui/star-glyph-duo.d.ts.map +1 -0
  407. package/dist/icons/ui/star-glyph-duo.js.map +1 -0
  408. package/dist/icons/ui/star-glyph.d.ts.map +1 -0
  409. package/dist/icons/ui/star-glyph.js.map +1 -0
  410. package/dist/icons/ui/star-outline-duo.d.ts.map +1 -0
  411. package/dist/icons/ui/star-outline-duo.js.map +1 -0
  412. package/dist/icons/ui/star.d.ts.map +1 -0
  413. package/dist/icons/ui/star.js.map +1 -0
  414. package/dist/icons/ui/sun.d.ts.map +1 -0
  415. package/dist/icons/ui/sun.js.map +1 -0
  416. package/dist/icons/ui/terminal.d.ts.map +1 -0
  417. package/dist/icons/ui/terminal.js.map +1 -0
  418. package/dist/icons/ui/text-align-center.d.ts.map +1 -0
  419. package/dist/icons/ui/text-align-center.js.map +1 -0
  420. package/dist/icons/ui/text-align-left.d.ts.map +1 -0
  421. package/dist/icons/ui/text-align-left.js.map +1 -0
  422. package/dist/icons/ui/text-align-right.d.ts.map +1 -0
  423. package/dist/icons/ui/text-align-right.js.map +1 -0
  424. package/dist/icons/ui/ticket.d.ts.map +1 -0
  425. package/dist/icons/ui/ticket.js.map +1 -0
  426. package/dist/icons/ui/trash-2.d.ts.map +1 -0
  427. package/dist/icons/ui/trash-2.js.map +1 -0
  428. package/dist/icons/ui/triangle-warning-glyph.d.ts.map +1 -0
  429. package/dist/icons/ui/triangle-warning-glyph.js.map +1 -0
  430. package/dist/icons/ui/user-glyph.d.ts.map +1 -0
  431. package/dist/icons/ui/user-glyph.js.map +1 -0
  432. package/dist/icons/ui/user-plus.d.ts +3 -0
  433. package/dist/icons/ui/user-plus.d.ts.map +1 -0
  434. package/dist/icons/ui/user-plus.js +5 -0
  435. package/dist/icons/ui/user-plus.js.map +1 -0
  436. package/dist/icons/ui/users.d.ts.map +1 -0
  437. package/dist/icons/ui/users.js.map +1 -0
  438. package/dist/icons/ui/wallet-outline-duo.d.ts.map +1 -0
  439. package/dist/icons/ui/wallet-outline-duo.js.map +1 -0
  440. package/dist/icons/ui/wallet.d.ts.map +1 -0
  441. package/dist/icons/ui/wallet.js.map +1 -0
  442. package/dist/icons/ui/wand-sparkle.d.ts.map +1 -0
  443. package/dist/icons/ui/wand-sparkle.js.map +1 -0
  444. package/dist/icons/ui/wifi-off.d.ts +3 -0
  445. package/dist/icons/ui/wifi-off.d.ts.map +1 -0
  446. package/dist/icons/ui/wifi-off.js +5 -0
  447. package/dist/icons/ui/wifi-off.js.map +1 -0
  448. package/dist/index.d.ts +2 -0
  449. package/dist/index.d.ts.map +1 -1
  450. package/dist/index.js +2 -0
  451. package/dist/index.js.map +1 -1
  452. package/dist/primitives/charts/bar-chart.d.ts.map +1 -1
  453. package/dist/primitives/charts/bar-chart.js +33 -3
  454. package/dist/primitives/charts/bar-chart.js.map +1 -1
  455. package/dist/primitives/charts/line.d.ts.map +1 -1
  456. package/dist/primitives/charts/line.js +14 -11
  457. package/dist/primitives/charts/line.js.map +1 -1
  458. package/dist/primitives/charts/x-axis.d.ts +12 -1
  459. package/dist/primitives/charts/x-axis.d.ts.map +1 -1
  460. package/dist/primitives/charts/x-axis.js +96 -20
  461. package/dist/primitives/charts/x-axis.js.map +1 -1
  462. package/dist/primitives/charts/y-axis-scales.d.ts +3 -1
  463. package/dist/primitives/charts/y-axis-scales.d.ts.map +1 -1
  464. package/dist/primitives/charts/y-axis-scales.js +2 -2
  465. package/dist/primitives/charts/y-axis-scales.js.map +1 -1
  466. package/dist/primitives/charts/y-axis.d.ts +5 -0
  467. package/dist/primitives/charts/y-axis.d.ts.map +1 -1
  468. package/dist/primitives/charts/y-axis.js +6 -2
  469. package/dist/primitives/charts/y-axis.js.map +1 -1
  470. package/dist/primitives/ui/alert-dialog.js +1 -1
  471. package/dist/primitives/ui/alert-dialog.js.map +1 -1
  472. package/dist/primitives/ui/button.d.ts.map +1 -1
  473. package/dist/primitives/ui/button.js +4 -2
  474. package/dist/primitives/ui/button.js.map +1 -1
  475. package/dist/primitives/ui/card.d.ts.map +1 -1
  476. package/dist/primitives/ui/card.js +9 -7
  477. package/dist/primitives/ui/card.js.map +1 -1
  478. package/dist/primitives/ui/dialog.d.ts +3 -1
  479. package/dist/primitives/ui/dialog.d.ts.map +1 -1
  480. package/dist/primitives/ui/dialog.js +5 -4
  481. package/dist/primitives/ui/dialog.js.map +1 -1
  482. package/dist/primitives/ui/input.js +1 -1
  483. package/dist/primitives/ui/input.js.map +1 -1
  484. package/dist/primitives/ui/select.js +3 -3
  485. package/dist/primitives/ui/select.js.map +1 -1
  486. package/dist/primitives/ui/switch.d.ts +2 -2
  487. package/dist/primitives/ui/switch.d.ts.map +1 -1
  488. package/dist/primitives/ui/switch.js +2 -2
  489. package/dist/primitives/ui/switch.js.map +1 -1
  490. package/dist/primitives/ui/textarea.js +1 -1
  491. package/dist/primitives/ui/textarea.js.map +1 -1
  492. package/dist/styles/extensions.css +9 -0
  493. package/dist/styles/theme.css +1 -1
  494. package/dist/styles/tokens.css +16 -26
  495. package/dist/styles/tokens.test.tsx +0 -3
  496. package/package.json +1 -1
@@ -23,7 +23,7 @@ The title, description and action rise in one after the other.
23
23
  | `description` | `ReactNode` | - | What will appear and how to get it, e.g. "Add a bank account to start receiving payouts." |
24
24
  | `icon` | `ReactNode` | - | Glyph of the Featured icon above the title, e.g. one from `@dodopayments/ui/icons`. Omit for no icon. |
25
25
  | `iconTone` | `"info" \| "success" \| "warning" \| "error" \| "violet" \| "neutral" \| "pink" \| "orange" \| null` | `"neutral"` | Tone of the Featured icon. Keep `neutral` for empty states; use `error` when the content failed to load. |
26
- | `titleAs` | `"h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page, or use `"p"` when it must not be a heading. |
26
+ | `titleAs` | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page (`"h1"` when the empty state is the whole page, e.g. a lost connection), or use `"p"` when it must not be a heading. |
27
27
 
28
28
  Also accepts Base UI props: `render`.
29
29
 
@@ -13,7 +13,7 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
13
13
  `children` is then the control. Without `label`, compose the parts as children.
14
14
 
15
15
  ```tsx
16
- import { Field, FieldControl, FieldDescription, FieldError, FieldLabel } from "@dodopayments/ui/field";
16
+ import { Field, FieldControl, FieldDescription, FieldError, FieldLabel, LabelRequiredIndicator } from "@dodopayments/ui/field";
17
17
  ```
18
18
 
19
19
  ## Field
@@ -36,11 +36,11 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
36
36
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
37
37
  | `description` | `ReactNode` | - | Helper text under the label (Body/Secondary, Content/Secondary), 2 below it. |
38
38
  | `error` | `ReactNode` | - | Error message (Body/Secondary, Content/Error). Setting it marks the field invalid, so the control shows its own error ring. Under the control (vertical); under the text (horizontal), or 8 under the `expanded` content when there is some. Without it, the field still shows the browser's or `validate`'s message. |
39
- | `expanded` | `ReactNode` | - | Content under the description in the horizontal layout, 12 below it, in a row 8 apart: what a switch reveals when it is on (an Input and an Edit button), or a row with no switch that edits a value. With a row control (`children`), the expanded controls get their own Field, so give them an `aria-label`; without one, the expanded control is the field's control. Horizontal layout only. |
39
+ | `expanded` | `ReactNode` | - | Content in the horizontal layout, 12 below the text, in a row 8 apart: what a switch reveals when it is on (an Input and an Edit button), or a row with no switch that edits a value. With a row control (`children`), it spans the whole row under the text and the control (under the control on a phone), and the expanded controls get their own Field, so give them an `aria-label`; without one, it sits under the description and the expanded control is the field's control. Horizontal layout only. |
40
40
  | `help` | `ReactNode` | - | Extra detail in a Tooltip on a 12px info icon after the label. Put the explanation in `description`. |
41
41
  | `helpLabel` | `string` | `"More information"` | Accessible name of the help icon. |
42
42
  | `label` | `ReactNode` | - | The label (Labels/Primary). With it, `Field` draws the Figma layout itself and `children` is the control. Without it, compose the parts (`FieldLabel`, `FieldDescription`, `FieldError`) as children. |
43
- | `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description, expanded content, error) on the leading side, the control on the trailing side, 16 apart. For settings that apply on their own. Stacks below 640px. |
43
+ | `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description, error) on the leading side, the control on the trailing side, 16 apart; expanded content under them, across the row. For settings that apply on their own. Stacks below 640px. |
44
44
  | `required` | `boolean` | `false` | Shows a red asterisk after the label. It is decorative, so also set `required` on the control. |
45
45
 
46
46
  Also accepts Base UI props: `actionsRef`, `dirty`, `disabled`, `invalid`, `name`, `render`, `touched`, `validate`, `validationDebounceTime`, `validationMode`.
@@ -66,11 +66,11 @@ Accepts Base UI's `render` prop to swap the rendered element.
66
66
  | `prefix` | `ReactNode` | - | Inline text before the value in Content/Primary, e.g. `$`. |
67
67
  | `prefixSelect` | `ReactNode` | - | A chrome-less select at the start, e.g. the phone country code: pass a `Select` with its `SelectTrigger`. |
68
68
  | `shortcut` | `string` | - | A keyboard shortcut shown at the end in a `Kbd`, e.g. `/` on a search field. |
69
- | `size` | `"sm" \| "lg" \| null` | - | |
69
+ | `size` | `"code" \| "sm" \| "lg" \| null` | - | |
70
70
  | `suffix` | `ReactNode` | - | Inline text after the value in Content/Secondary, e.g. `%`. |
71
71
  | `suffixSelect` | `ReactNode` | - | A chrome-less select at the end, e.g. the currency: pass a `Select` with its `SelectTrigger`. |
72
72
  | `suggestions` | `readonly InputSuggestion[] \| readonly InputSuggestionGroup[]` | - | Suggestions shown in a list under the field while the user types: strings, `{ value, label }` items, or groups (`{ label, items }`). Pass an array (it may be empty, e.g. while async results load) to turn them on. |
73
- | `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list hides instead. |
73
+ | `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list closes instead. |
74
74
  | `suggestionsLoading` | `boolean` | `false` | Shows a spinner and `suggestionsLoadingText` in the list, e.g. while async suggestions load. |
75
75
  | `suggestionsLoadingText` | `ReactNode` | `"Loading"` | Text next to the loading spinner. |
76
76
  | `suggestionsTrigger` | `boolean` | `false` | With `suggestions`, shows a caret button at the end that opens and closes the list. |
@@ -117,6 +117,16 @@ Label for the field's control (primitive `FieldLabel`); `htmlFor` is set automat
117
117
 
118
118
  Also accepts Base UI props: `nativeLabel`, `render`.
119
119
 
120
+ ## LabelRequiredIndicator
121
+
122
+ Decorative required marker shared by `Label` and `FieldLabel`. Hidden from assistive
123
+ technology: the control's own `required` attribute is what gets announced. Exported for a
124
+ heading over a required group of fields; give it `className="ms-1"` there.
125
+
126
+ | Prop | Type | Default | Description |
127
+ | --- | --- | --- | --- |
128
+ | `className` | `string` | - | Additional Tailwind classes, merged last. |
129
+
120
130
  ## Examples
121
131
 
122
132
  ### field/basic
@@ -3,9 +3,10 @@
3
3
  The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines
4
4
  (`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
5
5
  units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
6
- a brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input
7
- is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
8
- a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With
6
+ a brand ring on focus, a red ring when invalid (the placeholder stays muted), grey (Surface/Secondary) when read-only. Every Input
7
+ is 36 tall; a one-line input can be the compact `size="sm"` (28), or `size="code"` (56, large centred monospace) for one code read off another screen. A one-line input takes icons, an inline `prefix` / `suffix`,
8
+ a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button (`copyable={false}` hides it,
9
+ when the page already offers its own copy action). With
9
10
  `suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
10
11
  a `Field` it picks up the label, description and validation state.
11
12
 
@@ -18,9 +19,10 @@ import { Input, formatTaxId, isValidAbn, isValidGstin, isValidTaxId, normalizeTa
18
19
  The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines
19
20
  (`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
20
21
  units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
21
- a brand ring on focus, a red ring and placeholder when invalid, grey (Surface/Secondary) when read-only. Every Input
22
- is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
23
- a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button. With
22
+ a brand ring on focus, a red ring when invalid (the placeholder stays muted), grey (Surface/Secondary) when read-only. Every Input
23
+ is 36 tall; a one-line input can be the compact `size="sm"` (28), or `size="code"` (56, large centred monospace) for one code read off another screen. A one-line input takes icons, an inline `prefix` / `suffix`,
24
+ a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button (`copyable={false}` hides it,
25
+ when the page already offers its own copy action). With
24
26
  `suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
25
27
  a `Field` it picks up the label, description and validation state.
26
28
 
@@ -219,6 +221,29 @@ export default function InputAsyncSuggestions() {
219
221
  }
220
222
  ```
221
223
 
224
+ ### input/code
225
+
226
+ ```tsx
227
+ "use client";
228
+
229
+ import { Input } from "@dodopayments/ui/input";
230
+
231
+ export default function InputCode() {
232
+ return (
233
+ <div className="w-full max-w-sm">
234
+ <Input
235
+ size="code"
236
+ aria-label="Device code"
237
+ placeholder="XXXX-XXXX"
238
+ autoCapitalize="characters"
239
+ autoComplete="off"
240
+ spellCheck={false}
241
+ />
242
+ </div>
243
+ );
244
+ }
245
+ ```
246
+
222
247
  ### input/compact
223
248
 
224
249
  ```tsx
@@ -2,7 +2,8 @@
2
2
 
3
3
  Top customers by spend (Dodo Nest Leaderboard): a podium of the top three (one joined block of white cells
4
4
  with a gold, silver or bronze glow and a ribbon medal, in rank order 1 · 2 · 3), then a ranked list from 4
5
- down, 12 below. With two customers the third cell is hidden and there is no list; with none it shows the
5
+ down, 12 below. Under 24rem (384px) wide the podium stacks, each place a row with its medal beside the text, so
6
+ the amounts and names read whole. With two customers the third cell is hidden and there is no list; with none it shows the
6
7
  empty state; `loading` shows the skeleton. Put it in a `Card`. Compose `LeaderboardPodium`,
7
8
  `LeaderboardPodiumCell`, `LeaderboardList` and `LeaderboardRow` for a custom layout.
8
9
 
@@ -14,7 +15,8 @@ import { Leaderboard, LeaderboardList, LeaderboardMedal, LeaderboardPodium, Lead
14
15
 
15
16
  Top customers by spend (Dodo Nest Leaderboard): a podium of the top three (one joined block of white cells
16
17
  with a gold, silver or bronze glow and a ribbon medal, in rank order 1 · 2 · 3), then a ranked list from 4
17
- down, 12 below. With two customers the third cell is hidden and there is no list; with none it shows the
18
+ down, 12 below. Under 24rem (384px) wide the podium stacks, each place a row with its medal beside the text, so
19
+ the amounts and names read whole. With two customers the third cell is hidden and there is no list; with none it shows the
18
20
  empty state; `loading` shows the skeleton. Put it in a `Card`. Compose `LeaderboardPodium`,
19
21
  `LeaderboardPodiumCell`, `LeaderboardList` and `LeaderboardRow` for a custom layout.
20
22
 
@@ -43,6 +45,7 @@ fixed colours in both modes. Decorative (`alt=""`) unless you pass an `alt`.
43
45
 
44
46
  The podium block: one `<ol>` with a 1px Border/Primary ring and Radius/Large that clips its
45
47
  `LeaderboardPodiumCell`s, equal width, with 1px dividers between them. Put two or three cells in rank order.
48
+ In a `Leaderboard` under 24rem (384px) wide the cells stack, each a row with its medal beside the text.
46
49
 
47
50
  ## LeaderboardPodiumCell
48
51
 
@@ -24,7 +24,7 @@ keep client-side navigation.
24
24
 
25
25
  | Prop | Type | Default | Description |
26
26
  | --- | --- | --- | --- |
27
- | `external` | `boolean` | `false` | Open the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`), end it with an up-right arrow (it replaces the entity arrow) and append `externalLabel` for screen readers (also appended to `aria-label` when set). |
27
+ | `external` | `boolean` | `false` | Open the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`), end it with an up-right arrow (it replaces the entity arrow; in running text it wraps with the last word, never alone) and append `externalLabel` for screen readers (also appended to `aria-label` when set). |
28
28
  | `externalLabel` | `string` | `"(opens in a new tab)"` | Visually hidden text appended to external links. |
29
29
  | `tone` | `"accent" \| "error"` | `"accent"` | `accent`: Content/Accent (Blue 600, Blue 400 in dark). The default.<br>`error`: Content/Error (Red 600, Red 400 in dark), only next to a destructive or warning message. |
30
30
  | `variant` | `"inline" \| "entity"` | `"inline"` | `inline`: Underlined words inside a sentence. Takes the sentence's size and line height (Link/Primary in 14, Link/Secondary in 12) and wraps with it. The underline is the link colour at 40% and turns solid on hover.<br>`entity`: Labels/Primary (14) and a 16 trailing arrow, for “View all” and IDs that open a page. No underline until hover, when it fades in under the label. Keeps one line and truncates. |
@@ -1,7 +1,7 @@
1
1
  # List item
2
2
 
3
3
  One line of a list or one small card (Dodo Nest List item): a leading part, the title and description (one line
4
- each, with an ellipsis) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
4
+ each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
5
5
  payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
6
6
  apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
7
7
  `render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. It has no hover or
@@ -14,7 +14,7 @@ import { ListItem, ListItemPrice, ListItemThumbnail } from "@dodopayments/ui/lis
14
14
  ## ListItem
15
15
 
16
16
  One line of a list or one small card (Dodo Nest List item): a leading part, the title and description (one line
17
- each, with an ellipsis) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
17
+ each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
18
18
  payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
19
19
  apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
20
20
  `render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. It has no hover or
@@ -22,15 +22,16 @@ selected state: for a choice, use a Radio card.
22
22
 
23
23
  | Prop | Type | Default | Description |
24
24
  | --- | --- | --- | --- |
25
- | `title` (required) | `ReactNode` | - | The title, one line with an ellipsis (Labels/Primary). With `layout="add"`, the tile's label. |
25
+ | `title` (required) | `ReactNode` | - | The title, one line with an ellipsis (Labels/Primary), or whole with `wrap`. With `layout="add"`, the tile's label. |
26
26
  | `corner` | `ReactNode` | - | Card only: a `Badge` or a small `Button` at the top right, opposite the leading part. |
27
- | `description` | `ReactNode` | - | One line under the title with an ellipsis (Body/Secondary, Content/Secondary). |
27
+ | `description` | `ReactNode` | - | One line under the title with an ellipsis (Body/Secondary, Content/Secondary), or whole with `wrap`. |
28
28
  | `disabled` | `boolean` | `false` | Tile only: drop the link and the chevron and render a plain `<div>` tile, e.g. for a page that is not available yet. Say why in the description. |
29
29
  | `divider` | `boolean` | `true` | Row only: the 1px Border/Primary line under the row. It is always hidden on the last row of its list. |
30
30
  | `href` | `string` | - | Tile only: where the tile links to; renders an `<a href>` and adds the chevron. Pass `render` instead for a router link (on a tile, `render` is always the link). |
31
31
  | `layout` | `"row" \| "card" \| "tile" \| "add"` | `"row"` | `row`: One line of a list inside a panel or order card: leading · title and description · trailing, padding 12 top and bottom, a divider under it (off on the last row, also when the row sits inside the last `<li>`, e.g. a link row).<br>`card`: A small card for side-by-side portal cards (add-on, saved payment method, offer): leading and corner on top, the text, then the trailing part spread across the bottom.<br>`tile`: A bordered tile laid out as a row: leading · title and description · trailing (add-ons with a quantity). With `href` or `render` the whole tile is one link and ends with a chevron (a settings index); with `disabled` it stays a plain tile.<br>`add`: A dashed “Add …” tile next to cards: a plus icon over the label, the whole tile a button. |
32
32
  | `leading` | `ReactNode` | - | The leading part: a `ListItemThumbnail`, a `FeaturedIcon`, an `Avatar` or a payment logo. In a card it sits top left. |
33
33
  | `trailing` | `ReactNode` | - | The trailing part: a `ListItemPrice`, a quantity stepper, a `Badge`, a `Button` or a chevron, 8 apart. In a card it spreads across the bottom (e.g. the price and an Add button). |
34
+ | `wrap` | `boolean` | `false` | Wrap the title and description to more lines instead of cutting them with an ellipsis, for text that must read whole (a settings index or a report tile). |
34
35
 
35
36
  Also accepts Base UI props: `render`.
36
37
 
@@ -0,0 +1,55 @@
1
+ # Navigation progress
2
+
3
+ Navigation progress: a 2px bar in the brand green (Content/Brand-primary) fixed across the very top
4
+ of the viewport, above the sidebar, the top bar and any overlay, that tells the user a page is on its
5
+ way. Mount it once in the app shell and drive `active` from the router. It shows only after `delay`,
6
+ creeps towards the end while the page loads, then fills the track and fades out. It is decorative
7
+ (`aria-hidden`), takes no pointer events and never takes focus; under reduced motion it is a still,
8
+ full-width bar.
9
+
10
+ ```tsx
11
+ import { NavigationProgress } from "@dodopayments/ui/navigation-progress";
12
+ ```
13
+
14
+ ## NavigationProgress
15
+
16
+ Navigation progress: a 2px bar in the brand green (Content/Brand-primary) fixed across the very top
17
+ of the viewport, above the sidebar, the top bar and any overlay, that tells the user a page is on its
18
+ way. Mount it once in the app shell and drive `active` from the router. It shows only after `delay`,
19
+ creeps towards the end while the page loads, then fills the track and fades out. It is decorative
20
+ (`aria-hidden`), takes no pointer events and never takes focus; under reduced motion it is a still,
21
+ full-width bar.
22
+
23
+ | Prop | Type | Default | Description |
24
+ | --- | --- | --- | --- |
25
+ | `active` (required) | `boolean` | - | A navigation is in flight. Set it when one starts (a link click, a router push, back or forward) and clear it when the new page has rendered. |
26
+ | `delay` | `number` | `150` | Milliseconds a navigation must run before the bar shows, so an instant one never flashes. |
27
+
28
+ ## Examples
29
+
30
+ ### navigation-progress/basic
31
+
32
+ ```tsx
33
+ "use client";
34
+
35
+ import { Button } from "@dodopayments/ui/button";
36
+ import { NavigationProgress } from "@dodopayments/ui/navigation-progress";
37
+ import { useState } from "react";
38
+
39
+ /** Start a navigation to see the bar at the top of the window; finish it to see it fill and fade. */
40
+ export default function NavigationProgressBasic() {
41
+ const [active, setActive] = useState(false);
42
+ return (
43
+ <div className="flex flex-wrap gap-2">
44
+ <NavigationProgress active={active} />
45
+ <Button variant="secondary" disabled={active} onClick={() => setActive(true)}>
46
+ Start navigation
47
+ </Button>
48
+ <Button variant="secondary" disabled={!active} onClick={() => setActive(false)}>
49
+ Finish navigation
50
+ </Button>
51
+ </div>
52
+ );
53
+ }
54
+ ```
55
+
@@ -5,8 +5,8 @@ raises the description for list and settings pages. Navigation is none (top-leve
5
5
  `back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
6
6
  the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
7
7
  Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
8
- indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button gets
9
- its own row, the title the full width, and the actions move 8 below the description. No fill: put it first on the
8
+ indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
9
+ beside the title and the actions move 8 below the description. No fill: put it first on the
10
10
  main panel, 24 above the first section.
11
11
 
12
12
  ```tsx
@@ -20,8 +20,8 @@ raises the description for list and settings pages. Navigation is none (top-leve
20
20
  `back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
21
21
  the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
22
22
  Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
23
- indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button gets
24
- its own row, the title the full width, and the actions move 8 below the description. No fill: put it first on the
23
+ indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
24
+ beside the title and the actions move 8 below the description. No fill: put it first on the
25
25
  main panel, 24 above the first section.
26
26
 
27
27
  | Prop | Type | Default | Description |
@@ -88,8 +88,10 @@ time, and an unread dot (Surface/Accent-primary). Rows are divided by Border/Pri
88
88
  | --- | --- | --- | --- |
89
89
  | `title` (required) | `ReactNode` | - | What happened (Labels/Primary). |
90
90
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
91
+ | `description` | `ReactNode` | - | The notice's body under the title, up to two lines (Body/Secondary). |
91
92
  | `icon` | `ReactNode` | - | Leading 16px Nucleo icon in Content/Secondary. |
92
93
  | `id` | `ReactNode` | - | The object ID (Mono/Primary). |
94
+ | `onClick` | `(() => void)` | - | Makes the whole row a button, e.g. to open what the notice is about. |
93
95
  | `time` | `ReactNode` | - | When it happened (Body/Secondary). |
94
96
  | `unread` | `boolean` | `false` | Shows the blue unread dot. |
95
97
  | `unreadLabel` | `string` | `"Unread"` | Accessible text for the unread dot. |
@@ -1,7 +1,7 @@
1
1
  # Quantity stepper
2
2
 
3
3
  A whole number between − and + buttons for picking how many of something (Figma: Quantity stepper).
4
- Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36, 40 below `sm`,
4
+ Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
5
5
  shorter in compact density) for a row with a lg button. The value hugs its digits, and at 0 it shows 0.
6
6
  Built on the Base UI `NumberField` parts: the value is a number input (`aria-roledescription`
7
7
  "Number field") and the single tab stop. ArrowUp / ArrowDown step by `step`, Home / End jump to
@@ -19,7 +19,7 @@ import { QuantityStepper } from "@dodopayments/ui/quantity-stepper";
19
19
  ## QuantityStepper
20
20
 
21
21
  A whole number between − and + buttons for picking how many of something (Figma: Quantity stepper).
22
- Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36, 40 below `sm`,
22
+ Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
23
23
  shorter in compact density) for a row with a lg button. The value hugs its digits, and at 0 it shows 0.
24
24
  Built on the Base UI `NumberField` parts: the value is a number input (`aria-roledescription`
25
25
  "Number field") and the single tab stop. ArrowUp / ArrowDown step by `step`, Home / End jump to
@@ -40,7 +40,7 @@ input shows instead, so typing and arrow-key steps never animate. The animated c
40
40
  | `incrementLabel` | `string` | `"Increase"` | Accessible name of the + button. |
41
41
  | `max` | `number` | - | Largest quantity; the + button is disabled at it. |
42
42
  | `min` | `number` | `0` | Smallest quantity; the − button is disabled at it. |
43
- | `size` | `"default" \| "lg"` | `"default"` | `default`: 24 high (28 below `sm`), like Button xs: buttons 20 (24), value Labels/Secondary. Carts, line items, plan pickers.<br>`lg`: The height of Button lg (`--control-height-lg`: 36, 40 below `sm`, less in compact density), with Button icon (`--control-height-md`) − and + 2px inside, Button icon sizes and the value in Labels/Primary. Next to a lg button, such as Buy now on a Product card. |
43
+ | `size` | `"default" \| "lg"` | `"default"` | `default`: 24 high (28 below `sm`), like Button xs: buttons 20 (24), value Labels/Secondary. Carts, line items, plan pickers.<br>`lg`: The height of Button lg (`--control-height-lg`: 36, less in compact density), with Button icon (`--control-height-md`) − and + 2px inside, Button icon sizes and the value in Labels/Primary. Next to a lg button, such as Buy now on a Product card. |
44
44
  | `step` | `number` | `1` | Amount each − / + press or ArrowUp / ArrowDown adds or removes. |
45
45
 
46
46
  Also accepts Base UI props: `allowOutOfRange`, `allowWheelScrub`, `defaultValue`, `disabled`, `form`, `id`, `inputRef`, `largeStep`, `name`, `onValueChange`, `onValueCommitted`, `readOnly`, `required`, `value`.
@@ -4,8 +4,8 @@ Hero of a record's detail page (a payment, customer or subscription), not the pa
4
4
  `<section>` labelled by the title around a `Card`. It shows optional media, the title (an
5
5
  amount or a name) with its status and a subtitle, icon + text facts (`meta`), labelled `chips`
6
6
  such as a `CopyableId` and a `Timestamp`, and a `notice` (`CardNotice`) tucked under the card. The actions sit
7
- beside the heading once the card is at least 32rem wide and wrap under it in narrower containers. The media lines up
8
- with the title row.
7
+ beside the heading while the heading keeps its own width up to 12rem, even in a narrow pane, and wrap under it when
8
+ they do not fit. The media lines up with the title row.
9
9
 
10
10
  ```tsx
11
11
  import { RecordHeader } from "@dodopayments/ui/record-header";
@@ -17,13 +17,13 @@ Hero of a record's detail page (a payment, customer or subscription), not the pa
17
17
  `<section>` labelled by the title around a `Card`. It shows optional media, the title (an
18
18
  amount or a name) with its status and a subtitle, icon + text facts (`meta`), labelled `chips`
19
19
  such as a `CopyableId` and a `Timestamp`, and a `notice` (`CardNotice`) tucked under the card. The actions sit
20
- beside the heading once the card is at least 32rem wide and wrap under it in narrower containers. The media lines up
21
- with the title row.
20
+ beside the heading while the heading keeps its own width up to 12rem, even in a narrow pane, and wrap under it when
21
+ they do not fit. The media lines up with the title row.
22
22
 
23
23
  | Prop | Type | Default | Description |
24
24
  | --- | --- | --- | --- |
25
25
  | `title` (required) | `ReactNode` | - | Name of the record, preformatted: the amount of a payment ("$1,240.00") or the name of a customer or product. Also labels the section. |
26
- | `actions` | `ReactNode` | - | Record actions on the trailing side, e.g. "Invoice" and "Refund" `Button`s. |
26
+ | `actions` | `ReactNode` | - | Record actions on the trailing side, e.g. "Invoice" and "Refund" `Button`s. The header is a size container, so a `Button` with `labelHidden="narrow"` shows only its icon below 24rem of the header (a phone), its label in a tooltip. Beside a detail page's panel on a desktop it keeps its label. |
27
27
  | `chips` | `readonly RecordHeaderChipEntry[]` | - | Labelled pills under the facts, e.g. `{ label: "Payment ID", value: <CopyableId value="pay_…" /> }` and a `Timestamp`. `false`, `null` and `undefined` entries are skipped. |
28
28
  | `media` | `ReactNode` | - | Leading visual before the title, e.g. an `Avatar` or a product image. |
29
29
  | `meta` | `readonly RecordHeaderMetaEntry[]` | - | Short icon + text facts under the heading, e.g. the payment method and the country. `false`, `null` and `undefined` entries are skipped. |
@@ -34,7 +34,9 @@ renders it. Put it in a `Field`: the label focuses it and the description and er
34
34
  | `className` | `string` | - | Class names for the frame. |
35
35
  | `defaultValue` | `string` | - | Initial markdown when uncontrolled. |
36
36
  | `disabled` | `boolean` | - | Turns editing and the toolbar off and dims the editor to 64%. |
37
+ | `hiddenTools` | `readonly RichTextEditorTool[]` | - | Tools to leave out of the strip, e.g. `["strikethrough"]` when the text is shown where strikethrough is not. |
37
38
  | `id` | `string` | - | The textbox id. Inside a `Field` the field sets it, so its label focuses the editor. |
39
+ | `input` | `"editor" \| "markdown"` | `"editor"` | What `value` is written in. `"editor"` is markdown with the editor's inline HTML for underline and text colour, which `RichTextContent` renders. `"markdown"` is plain markdown, for a renderer that shows no HTML (an app description): the strip has no underline or colour, inline HTML stays literal text, and inline code, fenced code blocks and single line breaks are kept as written. Read when the editor mounts. |
38
40
  | `labels` | `Partial<RichTextEditorLabels>` | - | Override any of the built-in English labels. |
39
41
  | `name` | `string` | - | Submits the markdown with a form, through a hidden input of this name. |
40
42
  | `onBlur` | `FocusEventHandler<HTMLDivElement>` | - | Focus left the body. The event's `currentTarget` is the body wrapper (`rich-text-editor-content`). |
@@ -2,7 +2,8 @@
2
2
 
3
3
  Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
4
4
  page in an `iframe` beside its settings. The frame keeps the content's aspect ratio and never scales
5
- it up. The content stays a live page; put a cover over it when it should not take clicks.
5
+ it up: content narrower than the frame sits in its middle. The content stays a live page; put a
6
+ cover over it when it should not take clicks.
6
7
 
7
8
  ```tsx
8
9
  import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
@@ -12,7 +13,8 @@ import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
12
13
 
13
14
  Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
14
15
  page in an `iframe` beside its settings. The frame keeps the content's aspect ratio and never scales
15
- it up. The content stays a live page; put a cover over it when it should not take clicks.
16
+ it up: content narrower than the frame sits in its middle. The content stays a live page; put a
17
+ cover over it when it should not take clicks.
16
18
 
17
19
  | Prop | Type | Default | Description |
18
20
  | --- | --- | --- | --- |
@@ -18,7 +18,7 @@ borderless 32 trigger that hugs its value, for a language or currency switcher (
18
18
  | --- | --- | --- | --- |
19
19
  | `className` | `string` | - | With `multiple` the trigger is the chips field (a box, not a button): `ref`, handlers and data props go to it, and `render` / `nativeButton` do not apply. |
20
20
  | `icon` | `ReactNode` | - | An icon before the value (Figma "Show leading icon"), e.g. a Nucleo icon for an integration select, a globe for a language switcher or a `Flag` for a currency (a Flag keeps its 20 × 14). |
21
- | `size` | `"default" \| "sm"` | `"default"` | `default`: 36 tall (40 below `sm`), as in Figma. The default.<br>`sm`: 28 tall (32 below `sm`): a compact trigger in a dense toolbar or a table filter row, next to an `sm` Input or Button. Not a Figma size. The chips field of `multiple` and the `compact` variant keep their height. |
21
+ | `size` | `"default" \| "sm"` | `"default"` | `default`: 36 tall, as in Figma. The default.<br>`sm`: 28 tall: 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. |
22
22
  | `variant` | `"default" \| "compact"` | `"default"` | `default`: The field: 36 tall, full width, Border/Primary. The default.<br>`compact`: A borderless trigger that hugs a short value, 32 tall: a flag and "USD", a globe and "EN", for language and currency switchers in a header or footer. Labels/Secondary, a 12px caret, Surface/Hover on hover and while open. |
23
23
 
24
24
  Also accepts Base UI props: `disabled`, `nativeButton`, `render`.
@@ -29,6 +29,8 @@ The Dodo Nest Select (Figma ↳ Select): one field, 36 tall, that opens a list i
29
29
  value, or several with `multiple` (chips in the field, extras as "+N"); `searchable` adds a search field to the
30
30
  list. Pass `items` (`{ value, label }[]`) so `SelectValue` shows the label. A plain Select renders the primitives /
31
31
  Base UI `Select`; `searchable` or `multiple` run the Combobox under the same parts, with the same string values.
32
+ A `multiple` field sizes its chips to its own width, so give it a definite width (the default full width, or a
33
+ fixed one); sized to its content (`w-fit`) it would collapse.
32
34
 
33
35
  | Prop | Type | Default | Description |
34
36
  | --- | --- | --- | --- |
@@ -106,7 +108,8 @@ Also accepts Base UI props: `orientation`, `render`.
106
108
  ## SelectValue
107
109
 
108
110
  Shows the selected item's label, or `placeholder` (Content/Tertiary) when empty. With `multiple` it shows the
109
- chosen options as chips (`.Chip`, with a remove button each) and the rest as "+N".
111
+ chosen options as chips (`.Chip`, with a remove button each) and the rest as "+N", on one line, or wrapped to more
112
+ rows in a field under 18rem.
110
113
 
111
114
  | Prop | Type | Default | Description |
112
115
  | --- | --- | --- | --- |
@@ -20,6 +20,8 @@ dividers, and an optional footer. Renders a `<section>` labelled by its heading.
20
20
  | `action` | `ReactNode` | - | Control at the top-right of the header, e.g. an "Edit" `Button`. |
21
21
  | `description` | `ReactNode` | - | One line under the heading explaining what the section configures. |
22
22
  | `footer` | `ReactNode` | - | Row under the settings, e.g. a "Save changes" `Button` for a section that holds a form. |
23
+ | `help` | `ReactNode` | - | A secondary description in a Tooltip on an info icon after the heading, instead of a line under it. See `CardTitle`'s `help`. |
24
+ | `helpLabel` | `string` | `"More information"` | With `help`: accessible name of the info icon button. |
23
25
  | `titleAs` | `"h2" \| "h3" \| "h4"` | `"h2"` | Element used for the heading. |
24
26
  | `tone` | `"error" \| "neutral" \| null` | - | |
25
27
 
@@ -50,6 +52,7 @@ A navigation tile for a settings index page: an icon tile, a title and a descrip
50
52
  | `disabled` | `boolean` | `false` | Render a non-interactive tile without the chevron, e.g. for a page that is not available yet. |
51
53
  | `href` | `string` | - | Where the card links to: renders an `<a href>`. Pass `render` instead for a router link. |
52
54
  | `icon` | `ReactNode` | - | Icon in a tile before the title, e.g. a `WalletIcon` from `@dodopayments/ui/icons`. |
55
+ | `wrap` | `boolean` | `false` | Wrap the title and description to more lines instead of cutting them with an ellipsis, for text that must read whole (a settings index or a report tile). |
53
56
 
54
57
  Also accepts Base UI props: `render`.
55
58
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
4
4
  direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
5
- 560), with the title and close on the grey chin, the body in a white panel that scrolls, and the actions on the grey
6
- strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen. Always include a
7
- `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over a sheet, and use
8
- a Dialog for a yes / no confirm.
5
+ 560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
6
+ actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
7
+ Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
8
+ a sheet, and use a Dialog for a yes / no confirm.
9
9
 
10
10
  ```tsx
11
11
  import { SheetContent, Sheet, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPanel, SheetPortal, SheetTitle, SheetTrigger } from "@dodopayments/ui/sheet";
@@ -15,10 +15,10 @@ import { SheetContent, Sheet, SheetClose, SheetDescription, SheetFooter, SheetHe
15
15
 
16
16
  The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
17
17
  direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
18
- 560), with the title and close on the grey chin, the body in a white panel that scrolls, and the actions on the grey
19
- strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen. Always include a
20
- `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over a sheet, and use
21
- a Dialog for a yes / no confirm.
18
+ 560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
19
+ actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
20
+ Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
21
+ a sheet, and use a Dialog for a yes / no confirm.
22
22
 
23
23
  | Prop | Type | Default | Description |
24
24
  | --- | --- | --- | --- |
@@ -26,7 +26,7 @@ a Dialog for a yes / no confirm.
26
26
  | `closeLabel` | `string` | `"Close"` | Accessible label for the close button. |
27
27
  | `hideCloseButton` | `boolean` | `false` | Hide the close button. Keep a visible way to close the sheet, e.g. a `SheetClose`. |
28
28
  | `portalProps` | `DialogPortalProps` | - | Props for the portal, e.g. a `container` to render the sheet into instead of `document.body`. |
29
- | `size` | `"md" \| "lg"` | `"md"` | `md`: 400 wide: short forms and details. The default.<br>`lg`: 560 wide: longer forms. Side sheets only. |
29
+ | `size` | `"md" \| "lg" \| "xl"` | `"md"` | `md`: 400 wide: short forms and details. The default.<br>`lg`: 560 wide: longer forms. Side sheets only.<br>`xl`: 768 wide: a form with a code editor or a long checklist, such as a webhook endpoint. Side sheets only. |
30
30
  | `type` | `"side" \| "full"` | `"side"` | `side`: A side panel for a task or record that keeps the page in view: refund, dispute, edit customer, new API key.<br>`full`: Full screen for long multi-step flows (add bank account, verification): back, title, progress and close on top, a 664 column of Card sections, the actions below. |
31
31
 
32
32
  Also accepts Base UI props: `finalFocus`, `initialFocus`, `render`.
@@ -76,7 +76,7 @@ title (Heading/Tertiary), `progress` and the close button on one row above a rul
76
76
  | --- | --- | --- | --- |
77
77
  | `backLabel` | `string` | `"Back"` | Accessible label of the back button. |
78
78
  | `onBack` | `(() => void)` | - | Full screen only: shows a back button before the title and calls this when it is pressed. |
79
- | `progress` | `number` | - | Full screen only: how far along the flow is (0–100), drawn as a 120 wide Progress bar before the close button. |
79
+ | `progress` | `number` | - | Full screen only: how far along the flow is (0–100), drawn as a 120 wide Progress bar before the close button. Hidden below `sm`, so the title and description get the row on a phone. |
80
80
 
81
81
  Also accepts Base UI props: `render`.
82
82
 
@@ -6,7 +6,7 @@ as a 256px drawer. Compose it from `SidebarHeader` (a `SidebarBusinessSwitcher`)
6
6
  menus) and `SidebarFooter` (Developer, Settings and a `SidebarModeSwitch`), inside a `SidebarProvider`.
7
7
 
8
8
  ```tsx
9
- import { Sidebar, SidebarBusinessSwitcher, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuCollapsibleContent, SidebarMenuCollapsibleTrigger, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarModeSwitch, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar } from "@dodopayments/ui/sidebar";
9
+ import { Sidebar, SidebarBanner, SidebarBusinessSwitcher, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuCollapsibleContent, SidebarMenuCollapsibleTrigger, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarModeSwitch, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar } from "@dodopayments/ui/sidebar";
10
10
  ```
11
11
 
12
12
  ## Sidebar
@@ -20,15 +20,23 @@ menus) and `SidebarFooter` (Developer, Settings and a `SidebarModeSwitch`), insi
20
20
  | --- | --- | --- | --- |
21
21
  | `mobileTitle` | `string` | `"Sidebar"` | Accessible title of the mobile sheet (visually hidden). |
22
22
 
23
+ ## SidebarBanner
24
+
25
+ Full-width strips above the whole app shell (a `TestModeBanner`, an impersonation or action strip). Place it first
26
+ inside `SidebarProvider`. From 1024px it is fixed to the top of the window and the docked sidebar and the inset
27
+ start below it (its height is `--sidebar-top` on the provider, for a page that sizes itself to the window); below
28
+ that it sits at the top of the page, above the inset. With nothing in it, it takes no space.
29
+
23
30
  ## SidebarBusinessSwitcher
24
31
 
25
32
  The business switcher at the top of the sidebar (Figma `.Business switcher`): a 44px white row with a 24px
26
- avatar, the name (truncates) and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu
33
+ avatar, the name (truncates), an optional `badge` and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu
27
34
  (`children`) 8px below. Put it in `SidebarHeader`.
28
35
 
29
36
  | Prop | Type | Default | Description |
30
37
  | --- | --- | --- | --- |
31
38
  | `name` (required) | `string` | - | Name of the current business. Its initials fill the avatar when there is no `logoUrl`. |
39
+ | `badge` | `ReactNode` | - | After the name, e.g. the member's role as a neutral `Badge`. Hidden on the icon rail. |
32
40
  | `logoUrl` | `string` | - | Logo of the current business. |
33
41
  | `menuClassName` | `string` | `240 wide` | Extra classes for the menu. |
34
42
  | `menuContentProps` | `Omit<MenuContentProps, "className" \| "children">` | - | Props for the `MenuContent`, e.g. `finalFocus`. |
@@ -68,11 +76,12 @@ List of navigation items. Renders `<ul>`.
68
76
 
69
77
  The clickable row of a menu item (primitive `SidebarMenuButton`, Figma `.Nav item`): a 20px icon + Body/Primary
70
78
  label, 32px tall; a 32px tile on the icon rail. Renders a `<button>`; for navigation pass
71
- `render={<a href="/payments" />}` (or your router's link).
79
+ `render={<a href="/payments" />}` (or your router's link). `tag` adds a badge at the end of the row, a dot on the rail.
72
80
 
73
81
  | Prop | Type | Default | Description |
74
82
  | --- | --- | --- | --- |
75
83
  | `isActive` | `boolean` | `false` | Marks the item as the current page: Surface/Tertiary with a Border/Secondary ring, a Content/Primary icon and `aria-current="page"`. |
84
+ | `tag` | `ReactNode` | - | A tag at the end of the row, such as a violet sm `Badge` "New". On the icon rail it leaves the screen (it stays in the item's accessible name) and a 6px violet dot marks the tile's corner instead. |
76
85
  | `tooltip` | `ReactNode` | - | Tooltip shown 8px to the side on hover and focus while the sidebar is the icon rail (desktop only). Pass the label. |
77
86
 
78
87
  Also accepts Base UI props: `render`.
@@ -84,10 +93,12 @@ A menu item that expands to show a sub-menu. Renders `<li>`; compose it from a
84
93
  The primitives have no sidebar collapsible part; built from the `Collapsible` primitive.
85
94
 
86
95
  Inside a `SidebarProvider` only one sub-menu is open at a time: opening one closes the one that was open.
87
- `defaultOpen` sets the first state. Pass `open` to control it yourself; a controlled sub-menu is left out of this.
96
+ `defaultOpen` sets the first state, and `active` opens the one that holds the current page whenever it becomes
97
+ active. Pass `open` to control it yourself; a controlled sub-menu is left out of this.
88
98
 
89
99
  | Prop | Type | Default | Description |
90
100
  | --- | --- | --- | --- |
101
+ | `active` | `boolean` | `false` | The sub-menu holds the current page. It opens (closing the others) when it becomes active, also when the page changes from outside the sidebar, and the merchant can still close it. |
91
102
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
92
103
 
93
104
  Also accepts Base UI props: `defaultOpen`, `disabled`, `onOpenChange`, `open`.
@@ -107,12 +118,14 @@ Also accepts Base UI props: `hiddenUntilFound`, `keepMounted`, `render`.
107
118
  ## SidebarMenuCollapsibleTrigger
108
119
 
109
120
  The row that opens and closes a sub-menu: a `SidebarMenuButton` primitive rendered as a `CollapsibleTrigger`
110
- primitive, with a 12px chevron. The parent stays default while its group is open.
121
+ primitive, with a 12px chevron. The parent stays default while its group is open. `tag` adds a badge before the
122
+ chevron, a dot on the rail.
111
123
 
112
124
  | Prop | Type | Default | Description |
113
125
  | --- | --- | --- | --- |
114
126
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
115
127
  | `isActive` | `boolean` | `false` | Highlights the row, e.g. when the current page is inside the sub-menu. |
128
+ | `tag` | `ReactNode` | - | A tag before the chevron, such as a violet sm `Badge` "New"; a 6px violet dot on the icon rail. |
116
129
  | `tooltip` | `ReactNode` | - | Tooltip shown on hover and focus while the sidebar is the icon rail (desktop only). Pass the label. |
117
130
 
118
131
  Also accepts Base UI props: `nativeButton`, `render`.
@@ -128,11 +141,13 @@ Nested list under a menu item, 6px below it. Hidden on the icon rail. One level
128
141
  ## SidebarMenuSubButton
129
142
 
130
143
  Link row of a sub-menu (primitive `SidebarMenuSubButton`, Figma `.Nav item` sub): a Content/Secondary label
131
- indented to line up with the parent's label. Renders `<a>`; pass `render` for your router's link.
144
+ indented to line up with the parent's label. Renders `<a>`; pass `render` for your router's link. `tag` adds a badge
145
+ at the end of the row.
132
146
 
133
147
  | Prop | Type | Default | Description |
134
148
  | --- | --- | --- | --- |
135
149
  | `isActive` | `boolean` | `false` | Marks the sub-item as the current page: Surface/Tertiary, Content/Primary label and `aria-current="page"`. |
150
+ | `tag` | `ReactNode` | - | A tag at the end of the row, such as a violet sm `Badge` "New". Wrap the label in a `<span>` so it truncates. |
136
151
 
137
152
  Also accepts Base UI props: `render`.
138
153