@dodopayments/ui 1.7.2 → 1.8.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 (433) hide show
  1. package/ai/component-registry.json +1469 -238
  2. package/ai/component-registry.md +42 -38
  3. package/ai/components/app-top-bar.md +17 -5
  4. package/ai/components/area-chart.md +2 -0
  5. package/ai/components/bar-chart.md +2 -0
  6. package/ai/components/breadcrumb.md +2 -0
  7. package/ai/components/button-group.md +2 -0
  8. package/ai/components/chart-legend.md +2 -0
  9. package/ai/components/checkout-page.md +2 -0
  10. package/ai/components/color-input.md +2 -0
  11. package/ai/components/combobox.md +199 -0
  12. package/ai/components/composed-chart.md +2 -0
  13. package/ai/components/container.md +2 -0
  14. package/ai/components/context-menu.md +2 -0
  15. package/ai/components/dialog.md +1 -0
  16. package/ai/components/direction-provider.md +2 -0
  17. package/ai/components/drawer.md +2 -0
  18. package/ai/components/field.md +2 -0
  19. package/ai/components/filter-grid.md +2 -0
  20. package/ai/components/flag.md +22 -0
  21. package/ai/components/funnel-chart.md +2 -0
  22. package/ai/components/fx-conversion.md +2 -0
  23. package/ai/components/gauge-chart.md +2 -0
  24. package/ai/components/heatmap-chart.md +2 -0
  25. package/ai/components/invoice-document.md +2 -0
  26. package/ai/components/link.md +3 -3
  27. package/ai/components/list-item.md +4 -4
  28. package/ai/components/live-activity.md +2 -0
  29. package/ai/components/new-items-pill.md +2 -0
  30. package/ai/components/page-header.md +1 -0
  31. package/ai/components/payment-result.md +2 -0
  32. package/ai/components/pie-chart.md +2 -0
  33. package/ai/components/plan-picker.md +2 -0
  34. package/ai/components/product-card.md +2 -0
  35. package/ai/components/proration-preview.md +2 -0
  36. package/ai/components/radar-chart.md +2 -0
  37. package/ai/components/reorder-list.md +4 -0
  38. package/ai/components/required-mark.md +22 -0
  39. package/ai/components/ring-chart.md +2 -0
  40. package/ai/components/sale-share-card.md +2 -0
  41. package/ai/components/sankey-chart.md +2 -0
  42. package/ai/components/scatter-chart.md +2 -0
  43. package/ai/components/settings-section.md +2 -0
  44. package/ai/components/sheet.md +8 -4
  45. package/ai/components/slider.md +2 -0
  46. package/ai/components/sunburst-chart.md +2 -0
  47. package/ai/components/switch-transition.md +91 -0
  48. package/ai/components/task-steps.md +2 -0
  49. package/ai/components/test-mode-banner.md +2 -2
  50. package/ai/components/timestamp.md +8 -8
  51. package/ai/components/timezone-select.md +2 -0
  52. package/ai/components/typing-indicator.md +2 -0
  53. package/ai/components/wallet-buttons.md +2 -0
  54. package/ai/components/wizard-steps.md +2 -0
  55. package/ai/skills/dodo-charts/SKILL.md +21 -12
  56. package/ai/skills/dodo-design/SKILL.md +21 -10
  57. package/bin/registry.js +15 -4
  58. package/bin/scan.d.ts +3 -2
  59. package/bin/scan.js +4 -4
  60. package/dist/components/app-top-bar/app-top-bar.d.ts +17 -3
  61. package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
  62. package/dist/components/app-top-bar/app-top-bar.js +25 -9
  63. package/dist/components/app-top-bar/app-top-bar.js.map +1 -1
  64. package/dist/components/app-top-bar/index.d.ts +1 -1
  65. package/dist/components/app-top-bar/index.d.ts.map +1 -1
  66. package/dist/components/app-top-bar/index.js +1 -1
  67. package/dist/components/app-top-bar/index.js.map +1 -1
  68. package/dist/components/card/card.d.ts +1 -1
  69. package/dist/components/card/card.d.ts.map +1 -1
  70. package/dist/components/card/card.js +11 -2
  71. package/dist/components/card/card.js.map +1 -1
  72. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  73. package/dist/components/checkbox/checkbox.js +7 -3
  74. package/dist/components/checkbox/checkbox.js.map +1 -1
  75. package/dist/components/collapsible/collapsible.d.ts.map +1 -1
  76. package/dist/components/collapsible/collapsible.js +3 -1
  77. package/dist/components/collapsible/collapsible.js.map +1 -1
  78. package/dist/components/{select/select-combobox.d.ts → combobox/combobox.d.ts} +1 -1
  79. package/dist/components/combobox/combobox.d.ts.map +1 -0
  80. package/dist/components/{select/select-combobox.js → combobox/combobox.js} +1 -1
  81. package/dist/components/combobox/combobox.js.map +1 -0
  82. package/dist/components/combobox/index.d.ts +2 -0
  83. package/dist/components/combobox/index.d.ts.map +1 -0
  84. package/dist/components/combobox/index.js +2 -0
  85. package/dist/components/combobox/index.js.map +1 -0
  86. package/dist/components/country-select/country-select.js +1 -1
  87. package/dist/components/country-select/country-select.js.map +1 -1
  88. package/dist/components/currency-select/currency-select.js +1 -1
  89. package/dist/components/currency-select/currency-select.js.map +1 -1
  90. package/dist/components/data-grid/data-grid.js +2 -2
  91. package/dist/components/data-grid/data-grid.js.map +1 -1
  92. package/dist/components/date-picker/date-picker.d.ts +1 -1
  93. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  94. package/dist/components/date-picker/date-picker.js +8 -7
  95. package/dist/components/date-picker/date-picker.js.map +1 -1
  96. package/dist/components/date-picker/index.d.ts +1 -1
  97. package/dist/components/date-picker/index.d.ts.map +1 -1
  98. package/dist/components/date-picker/index.js +1 -1
  99. package/dist/components/date-picker/index.js.map +1 -1
  100. package/dist/components/dialog/confirm-dialog.d.ts +7 -1
  101. package/dist/components/dialog/confirm-dialog.d.ts.map +1 -1
  102. package/dist/components/dialog/confirm-dialog.js +2 -2
  103. package/dist/components/dialog/confirm-dialog.js.map +1 -1
  104. package/dist/components/field/field.d.ts +0 -19
  105. package/dist/components/field/field.d.ts.map +1 -1
  106. package/dist/components/field/field.js +2 -13
  107. package/dist/components/field/field.js.map +1 -1
  108. package/dist/components/field/index.d.ts +1 -1
  109. package/dist/components/field/index.d.ts.map +1 -1
  110. package/dist/components/field/index.js +1 -1
  111. package/dist/components/field/index.js.map +1 -1
  112. package/dist/components/field/label.d.ts +0 -8
  113. package/dist/components/field/label.d.ts.map +1 -1
  114. package/dist/components/field/label.js +1 -9
  115. package/dist/components/field/label.js.map +1 -1
  116. package/dist/components/filter-grid/filter-grid.js +1 -1
  117. package/dist/components/filter-grid/filter-grid.js.map +1 -1
  118. package/dist/components/flag/country-flag.d.ts.map +1 -0
  119. package/dist/components/flag/country-flag.js.map +1 -0
  120. package/dist/components/flag/flag.d.ts.map +1 -0
  121. package/dist/components/{payment-logos → flag}/flag.js +1 -1
  122. package/dist/components/flag/flag.js.map +1 -0
  123. package/dist/components/flag/index.d.ts +2 -0
  124. package/dist/components/flag/index.d.ts.map +1 -0
  125. package/dist/components/flag/index.js +2 -0
  126. package/dist/components/flag/index.js.map +1 -0
  127. package/dist/components/form/form.js +1 -1
  128. package/dist/components/form/form.js.map +1 -1
  129. package/dist/components/form-field/form-field.d.ts.map +1 -1
  130. package/dist/components/form-field/form-field.js +2 -1
  131. package/dist/components/form-field/form-field.js.map +1 -1
  132. package/dist/components/input/chips-field.d.ts +6 -0
  133. package/dist/components/input/chips-field.d.ts.map +1 -1
  134. package/dist/components/input/chips-field.js +3 -1
  135. package/dist/components/input/chips-field.js.map +1 -1
  136. package/dist/components/input/input-chips-suggestions.js +1 -1
  137. package/dist/components/input/input-chips-suggestions.js.map +1 -1
  138. package/dist/components/input/input-phone.js +1 -1
  139. package/dist/components/input/input-phone.js.map +1 -1
  140. package/dist/components/input/input.d.ts +15 -0
  141. package/dist/components/input/input.d.ts.map +1 -1
  142. package/dist/components/input/input.js +9 -4
  143. package/dist/components/input/input.js.map +1 -1
  144. package/dist/components/link/link.d.ts +5 -5
  145. package/dist/components/link/link.js +5 -5
  146. package/dist/components/link/link.js.map +1 -1
  147. package/dist/components/list-item/list-item.d.ts +6 -6
  148. package/dist/components/list-item/list-item.d.ts.map +1 -1
  149. package/dist/components/list-item/list-item.js +7 -6
  150. package/dist/components/list-item/list-item.js.map +1 -1
  151. package/dist/components/list-toolbar/list-toolbar-date-range.d.ts +1 -1
  152. package/dist/components/list-toolbar/list-toolbar-date-range.js +3 -3
  153. package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
  154. package/dist/components/list-toolbar/list-toolbar.js +1 -1
  155. package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
  156. package/dist/components/page-header/page-header.d.ts +13 -2
  157. package/dist/components/page-header/page-header.d.ts.map +1 -1
  158. package/dist/components/page-header/page-header.js +14 -2
  159. package/dist/components/page-header/page-header.js.map +1 -1
  160. package/dist/components/payment-logos/index.d.ts +1 -1
  161. package/dist/components/payment-logos/index.d.ts.map +1 -1
  162. package/dist/components/payment-logos/index.js +1 -1
  163. package/dist/components/payment-logos/index.js.map +1 -1
  164. package/dist/components/record-header/record-header.js +1 -1
  165. package/dist/components/record-header/record-header.js.map +1 -1
  166. package/dist/components/reorder-list/reorder-list.d.ts +15 -1
  167. package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
  168. package/dist/components/reorder-list/reorder-list.js +13 -6
  169. package/dist/components/reorder-list/reorder-list.js.map +1 -1
  170. package/dist/components/required-mark/index.d.ts +2 -0
  171. package/dist/components/required-mark/index.d.ts.map +1 -0
  172. package/dist/components/required-mark/index.js +2 -0
  173. package/dist/components/required-mark/index.js.map +1 -0
  174. package/dist/components/required-mark/required-mark.d.ts +9 -0
  175. package/dist/components/required-mark/required-mark.d.ts.map +1 -0
  176. package/dist/components/required-mark/required-mark.js +11 -0
  177. package/dist/components/required-mark/required-mark.js.map +1 -0
  178. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  179. package/dist/components/rich-text-editor/rich-text-editor.js +18 -1
  180. package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
  181. package/dist/components/select/select.d.ts +1 -1
  182. package/dist/components/select/select.js +2 -2
  183. package/dist/components/select/select.js.map +1 -1
  184. package/dist/components/settings-section/settings-section.d.ts +3 -1
  185. package/dist/components/settings-section/settings-section.d.ts.map +1 -1
  186. package/dist/components/settings-section/settings-section.js +6 -5
  187. package/dist/components/settings-section/settings-section.js.map +1 -1
  188. package/dist/components/sheet/sheet.d.ts +6 -4
  189. package/dist/components/sheet/sheet.d.ts.map +1 -1
  190. package/dist/components/sheet/sheet.js +4 -2
  191. package/dist/components/sheet/sheet.js.map +1 -1
  192. package/dist/components/sidebar/sidebar.js +1 -1
  193. package/dist/components/sidebar/sidebar.js.map +1 -1
  194. package/dist/components/switch-transition/index.d.ts +2 -0
  195. package/dist/components/switch-transition/index.d.ts.map +1 -0
  196. package/dist/components/switch-transition/index.js +2 -0
  197. package/dist/components/switch-transition/index.js.map +1 -0
  198. package/dist/components/switch-transition/switch-transition.d.ts +30 -0
  199. package/dist/components/switch-transition/switch-transition.d.ts.map +1 -0
  200. package/dist/components/switch-transition/switch-transition.js +80 -0
  201. package/dist/components/switch-transition/switch-transition.js.map +1 -0
  202. package/dist/components/test-mode-banner/test-mode-banner.d.ts +1 -1
  203. package/dist/components/test-mode-banner/test-mode-banner.js +2 -2
  204. package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
  205. package/dist/components/timestamp/timestamp.d.ts +5 -7
  206. package/dist/components/timestamp/timestamp.d.ts.map +1 -1
  207. package/dist/components/timestamp/timestamp.js +18 -14
  208. package/dist/components/timestamp/timestamp.js.map +1 -1
  209. package/dist/icons/index.d.ts +22 -0
  210. package/dist/icons/index.d.ts.map +1 -1
  211. package/dist/icons/index.js +22 -0
  212. package/dist/icons/index.js.map +1 -1
  213. package/dist/icons/ui/ai-agents.d.ts +3 -1
  214. package/dist/icons/ui/ai-agents.d.ts.map +1 -1
  215. package/dist/icons/ui/ai-agents.js +3 -1
  216. package/dist/icons/ui/ai-agents.js.map +1 -1
  217. package/dist/icons/ui/badge-check-2-outline-duo.d.ts +3 -0
  218. package/dist/icons/ui/badge-check-2-outline-duo.d.ts.map +1 -0
  219. package/dist/icons/ui/badge-check-2-outline-duo.js +5 -0
  220. package/dist/icons/ui/badge-check-2-outline-duo.js.map +1 -0
  221. package/dist/icons/ui/ban-outline-duo.d.ts +3 -0
  222. package/dist/icons/ui/ban-outline-duo.d.ts.map +1 -0
  223. package/dist/icons/ui/ban-outline-duo.js +5 -0
  224. package/dist/icons/ui/ban-outline-duo.js.map +1 -0
  225. package/dist/icons/ui/chart-column-outline-duo.d.ts +3 -0
  226. package/dist/icons/ui/chart-column-outline-duo.d.ts.map +1 -0
  227. package/dist/icons/ui/chart-column-outline-duo.js +5 -0
  228. package/dist/icons/ui/chart-column-outline-duo.js.map +1 -0
  229. package/dist/icons/ui/check-glyph-12.d.ts +3 -1
  230. package/dist/icons/ui/check-glyph-12.d.ts.map +1 -1
  231. package/dist/icons/ui/check-glyph-12.js +3 -1
  232. package/dist/icons/ui/check-glyph-12.js.map +1 -1
  233. package/dist/icons/ui/circle-user-outline-duo.d.ts +3 -0
  234. package/dist/icons/ui/circle-user-outline-duo.d.ts.map +1 -0
  235. package/dist/icons/ui/circle-user-outline-duo.js +5 -0
  236. package/dist/icons/ui/circle-user-outline-duo.js.map +1 -0
  237. package/dist/icons/ui/credit-card-outline-duo.d.ts +3 -0
  238. package/dist/icons/ui/credit-card-outline-duo.d.ts.map +1 -0
  239. package/dist/icons/ui/credit-card-outline-duo.js +5 -0
  240. package/dist/icons/ui/credit-card-outline-duo.js.map +1 -0
  241. package/dist/icons/ui/crown.d.ts +3 -0
  242. package/dist/icons/ui/crown.d.ts.map +1 -0
  243. package/dist/icons/ui/crown.js +5 -0
  244. package/dist/icons/ui/crown.js.map +1 -0
  245. package/dist/icons/ui/envelope-outline-duo.d.ts +3 -0
  246. package/dist/icons/ui/envelope-outline-duo.d.ts.map +1 -0
  247. package/dist/icons/ui/envelope-outline-duo.js +5 -0
  248. package/dist/icons/ui/envelope-outline-duo.js.map +1 -0
  249. package/dist/icons/ui/gear-outline-duo.d.ts +3 -0
  250. package/dist/icons/ui/gear-outline-duo.d.ts.map +1 -0
  251. package/dist/icons/ui/gear-outline-duo.js +5 -0
  252. package/dist/icons/ui/gear-outline-duo.js.map +1 -0
  253. package/dist/icons/ui/greek-temple-2-outline-duo.d.ts +3 -0
  254. package/dist/icons/ui/greek-temple-2-outline-duo.d.ts.map +1 -0
  255. package/dist/icons/ui/greek-temple-2-outline-duo.js +5 -0
  256. package/dist/icons/ui/greek-temple-2-outline-duo.js.map +1 -0
  257. package/dist/icons/ui/heart-glyph.d.ts +3 -1
  258. package/dist/icons/ui/heart-glyph.d.ts.map +1 -1
  259. package/dist/icons/ui/heart-glyph.js +3 -1
  260. package/dist/icons/ui/heart-glyph.js.map +1 -1
  261. package/dist/icons/ui/heart.d.ts +3 -1
  262. package/dist/icons/ui/heart.d.ts.map +1 -1
  263. package/dist/icons/ui/heart.js +3 -1
  264. package/dist/icons/ui/heart.js.map +1 -1
  265. package/dist/icons/ui/laptop-2.d.ts +3 -0
  266. package/dist/icons/ui/laptop-2.d.ts.map +1 -0
  267. package/dist/icons/ui/laptop-2.js +5 -0
  268. package/dist/icons/ui/laptop-2.js.map +1 -0
  269. package/dist/icons/ui/life-ring-outline-duo.d.ts +3 -0
  270. package/dist/icons/ui/life-ring-outline-duo.d.ts.map +1 -0
  271. package/dist/icons/ui/life-ring-outline-duo.js +5 -0
  272. package/dist/icons/ui/life-ring-outline-duo.js.map +1 -0
  273. package/dist/icons/ui/mobile.d.ts +3 -0
  274. package/dist/icons/ui/mobile.d.ts.map +1 -0
  275. package/dist/icons/ui/mobile.js +5 -0
  276. package/dist/icons/ui/mobile.js.map +1 -0
  277. package/dist/icons/ui/office-3-outline-duo.d.ts +3 -0
  278. package/dist/icons/ui/office-3-outline-duo.d.ts.map +1 -0
  279. package/dist/icons/ui/office-3-outline-duo.js +5 -0
  280. package/dist/icons/ui/office-3-outline-duo.js.map +1 -0
  281. package/dist/icons/ui/palette-2-outline-duo.d.ts +3 -0
  282. package/dist/icons/ui/palette-2-outline-duo.d.ts.map +1 -0
  283. package/dist/icons/ui/palette-2-outline-duo.js +5 -0
  284. package/dist/icons/ui/palette-2-outline-duo.js.map +1 -0
  285. package/dist/icons/ui/plug-2-outline-duo.d.ts +3 -0
  286. package/dist/icons/ui/plug-2-outline-duo.d.ts.map +1 -0
  287. package/dist/icons/ui/plug-2-outline-duo.js +5 -0
  288. package/dist/icons/ui/plug-2-outline-duo.js.map +1 -0
  289. package/dist/icons/ui/plug-sparkle-outline-duo.d.ts +3 -0
  290. package/dist/icons/ui/plug-sparkle-outline-duo.d.ts.map +1 -0
  291. package/dist/icons/ui/plug-sparkle-outline-duo.js +5 -0
  292. package/dist/icons/ui/plug-sparkle-outline-duo.js.map +1 -0
  293. package/dist/icons/ui/refresh-clockwise-outline-duo.d.ts +3 -0
  294. package/dist/icons/ui/refresh-clockwise-outline-duo.d.ts.map +1 -0
  295. package/dist/icons/ui/refresh-clockwise-outline-duo.js +5 -0
  296. package/dist/icons/ui/refresh-clockwise-outline-duo.js.map +1 -0
  297. package/dist/icons/ui/scale-outline-duo.d.ts +3 -0
  298. package/dist/icons/ui/scale-outline-duo.d.ts.map +1 -0
  299. package/dist/icons/ui/scale-outline-duo.js +5 -0
  300. package/dist/icons/ui/scale-outline-duo.js.map +1 -0
  301. package/dist/icons/ui/shop-outline-duo.d.ts +3 -0
  302. package/dist/icons/ui/shop-outline-duo.d.ts.map +1 -0
  303. package/dist/icons/ui/shop-outline-duo.js +5 -0
  304. package/dist/icons/ui/shop-outline-duo.js.map +1 -0
  305. package/dist/icons/ui/tag-outline-duo.d.ts +3 -0
  306. package/dist/icons/ui/tag-outline-duo.d.ts.map +1 -0
  307. package/dist/icons/ui/tag-outline-duo.js +5 -0
  308. package/dist/icons/ui/tag-outline-duo.js.map +1 -0
  309. package/dist/icons/ui/ticket-outline-duo.d.ts +3 -0
  310. package/dist/icons/ui/ticket-outline-duo.d.ts.map +1 -0
  311. package/dist/icons/ui/ticket-outline-duo.js +5 -0
  312. package/dist/icons/ui/ticket-outline-duo.js.map +1 -0
  313. package/dist/icons/ui/trash-2.d.ts +3 -1
  314. package/dist/icons/ui/trash-2.d.ts.map +1 -1
  315. package/dist/icons/ui/trash-2.js +3 -1
  316. package/dist/icons/ui/trash-2.js.map +1 -1
  317. package/dist/icons/ui/users-6-outline-duo.d.ts +3 -0
  318. package/dist/icons/ui/users-6-outline-duo.d.ts.map +1 -0
  319. package/dist/icons/ui/users-6-outline-duo.js +5 -0
  320. package/dist/icons/ui/users-6-outline-duo.js.map +1 -0
  321. package/dist/index.d.ts +4 -0
  322. package/dist/index.d.ts.map +1 -1
  323. package/dist/index.js +4 -0
  324. package/dist/index.js.map +1 -1
  325. package/dist/{components/date-picker/day-label.d.ts → lib/calendar-day.d.ts} +1 -1
  326. package/dist/lib/calendar-day.d.ts.map +1 -0
  327. package/dist/{components/date-picker/day-label.js → lib/calendar-day.js} +1 -1
  328. package/dist/lib/calendar-day.js.map +1 -0
  329. package/dist/lib/cn-tables.js +5 -5
  330. package/dist/lib/cn-tables.js.map +1 -1
  331. package/dist/lib/column-title.d.ts.map +1 -0
  332. package/dist/lib/column-title.js.map +1 -0
  333. package/dist/{components/date-picker/presets.d.ts → lib/date-presets.d.ts} +2 -2
  334. package/dist/lib/date-presets.d.ts.map +1 -0
  335. package/dist/{components/date-picker/presets.js → lib/date-presets.js} +2 -2
  336. package/dist/lib/date-presets.js.map +1 -0
  337. package/dist/lib/field-context.d.ts +21 -0
  338. package/dist/lib/field-context.d.ts.map +1 -0
  339. package/dist/lib/field-context.js +14 -0
  340. package/dist/lib/field-context.js.map +1 -0
  341. package/dist/lib/motion.d.ts +4 -2
  342. package/dist/lib/motion.d.ts.map +1 -1
  343. package/dist/lib/motion.js +4 -2
  344. package/dist/lib/motion.js.map +1 -1
  345. package/dist/lib/use-animated-height.d.ts +6 -0
  346. package/dist/lib/use-animated-height.d.ts.map +1 -0
  347. package/dist/lib/use-animated-height.js +67 -0
  348. package/dist/lib/use-animated-height.js.map +1 -0
  349. package/dist/primitives/ui/autocomplete.js +1 -1
  350. package/dist/primitives/ui/autocomplete.js.map +1 -1
  351. package/dist/primitives/ui/button.js +6 -6
  352. package/dist/primitives/ui/button.js.map +1 -1
  353. package/dist/primitives/ui/card.js +1 -1
  354. package/dist/primitives/ui/card.js.map +1 -1
  355. package/dist/primitives/ui/checkbox.js +1 -1
  356. package/dist/primitives/ui/checkbox.js.map +1 -1
  357. package/dist/primitives/ui/combobox.js +3 -3
  358. package/dist/primitives/ui/combobox.js.map +1 -1
  359. package/dist/primitives/ui/drawer.js +1 -1
  360. package/dist/primitives/ui/drawer.js.map +1 -1
  361. package/dist/primitives/ui/empty.js +2 -2
  362. package/dist/primitives/ui/empty.js.map +1 -1
  363. package/dist/primitives/ui/group.js +2 -2
  364. package/dist/primitives/ui/group.js.map +1 -1
  365. package/dist/primitives/ui/input-group.js +1 -1
  366. package/dist/primitives/ui/input-group.js.map +1 -1
  367. package/dist/primitives/ui/input.js +2 -2
  368. package/dist/primitives/ui/input.js.map +1 -1
  369. package/dist/primitives/ui/menu.d.ts +1 -1
  370. package/dist/primitives/ui/menu.d.ts.map +1 -1
  371. package/dist/primitives/ui/menu.js +1 -1
  372. package/dist/primitives/ui/menu.js.map +1 -1
  373. package/dist/primitives/ui/number-field.js +1 -1
  374. package/dist/primitives/ui/number-field.js.map +1 -1
  375. package/dist/primitives/ui/otp-field.js +1 -1
  376. package/dist/primitives/ui/otp-field.js.map +1 -1
  377. package/dist/primitives/ui/popover.js +1 -1
  378. package/dist/primitives/ui/popover.js.map +1 -1
  379. package/dist/primitives/ui/preview-card.js +1 -1
  380. package/dist/primitives/ui/preview-card.js.map +1 -1
  381. package/dist/primitives/ui/radio-group.js +1 -1
  382. package/dist/primitives/ui/radio-group.js.map +1 -1
  383. package/dist/primitives/ui/select.js +2 -2
  384. package/dist/primitives/ui/select.js.map +1 -1
  385. package/dist/primitives/ui/sheet.d.ts +4 -3
  386. package/dist/primitives/ui/sheet.d.ts.map +1 -1
  387. package/dist/primitives/ui/sheet.js +112 -6
  388. package/dist/primitives/ui/sheet.js.map +1 -1
  389. package/dist/primitives/ui/skeleton.js +1 -1
  390. package/dist/primitives/ui/skeleton.js.map +1 -1
  391. package/dist/primitives/ui/textarea.js +2 -2
  392. package/dist/primitives/ui/textarea.js.map +1 -1
  393. package/dist/primitives/ui/toast.js +2 -2
  394. package/dist/primitives/ui/toast.js.map +1 -1
  395. package/dist/primitives/ui/toggle-group.js +1 -1
  396. package/dist/primitives/ui/toggle-group.js.map +1 -1
  397. package/dist/primitives/ui/toggle.js +1 -1
  398. package/dist/primitives/ui/toggle.js.map +1 -1
  399. package/dist/primitives/ui/toolbar.js +1 -1
  400. package/dist/primitives/ui/toolbar.js.map +1 -1
  401. package/dist/primitives/ui/tooltip.js +1 -1
  402. package/dist/primitives/ui/tooltip.js.map +1 -1
  403. package/dist/styles/extensions.css +5 -0
  404. package/dist/styles/hover.test.tsx +154 -0
  405. package/dist/styles/rtl.test.tsx +1 -1
  406. package/dist/styles/theme-switch-tokens.test.tsx +96 -0
  407. package/dist/styles/theme.css +23 -10
  408. package/dist/styles/tokens-artwork.css +115 -0
  409. package/dist/styles/tokens-charts.css +81 -0
  410. package/dist/styles/tokens-motion.css +60 -0
  411. package/dist/styles/tokens.css +81 -340
  412. package/dist/styles/tokens.test.tsx +40 -4
  413. package/eslint/restricted-classes.js +6 -0
  414. package/package.json +5 -1
  415. package/stylelint/index.d.ts +1 -1
  416. package/stylelint/index.js +9 -2
  417. package/dist/components/country-select/country-flag.d.ts.map +0 -1
  418. package/dist/components/country-select/country-flag.js.map +0 -1
  419. package/dist/components/data-grid/column-title.d.ts.map +0 -1
  420. package/dist/components/data-grid/column-title.js.map +0 -1
  421. package/dist/components/date-picker/day-label.d.ts.map +0 -1
  422. package/dist/components/date-picker/day-label.js.map +0 -1
  423. package/dist/components/date-picker/presets.d.ts.map +0 -1
  424. package/dist/components/date-picker/presets.js.map +0 -1
  425. package/dist/components/payment-logos/flag.d.ts.map +0 -1
  426. package/dist/components/payment-logos/flag.js.map +0 -1
  427. package/dist/components/select/select-combobox.d.ts.map +0 -1
  428. package/dist/components/select/select-combobox.js.map +0 -1
  429. /package/dist/components/{country-select → flag}/country-flag.d.ts +0 -0
  430. /package/dist/components/{country-select → flag}/country-flag.js +0 -0
  431. /package/dist/components/{payment-logos → flag}/flag.d.ts +0 -0
  432. /package/dist/{components/data-grid → lib}/column-title.d.ts +0 -0
  433. /package/dist/{components/data-grid → lib}/column-title.js +0 -0
@@ -0,0 +1,154 @@
1
+ import { expect, test } from "vitest";
2
+
3
+ /**
4
+ * Hover styles are for devices that can hover. Tailwind's `hover:` variant compiles inside
5
+ * `@media (hover: hover)`, so a phone never gets a hover style that sticks after a tap. A `:hover`
6
+ * written by hand in an arbitrary selector (`[tr:hover>&]:`) skips that guard: lead it with
7
+ * `[@media(hover:hover)]:`.
8
+ */
9
+ function hoverRules(): { guarded: number; unguarded: string[] } {
10
+ let guarded = 0;
11
+ const unguarded: string[] = [];
12
+ const visit = (rules: CSSRuleList, selector: string, hover: boolean, inMedia: boolean) => {
13
+ for (const rule of rules) {
14
+ let ruleSelector = selector;
15
+ let ruleHover = hover;
16
+ let ruleInMedia = inMedia;
17
+ if (rule instanceof CSSStyleRule) {
18
+ ruleSelector = `${selector} ${rule.selectorText}`.trim();
19
+ // Escaped characters are part of a class name (`.hover\:bg-accent`), not a pseudo-class.
20
+ ruleHover = hover || rule.selectorText.replace(/\\./g, "").includes(":hover");
21
+ }
22
+ if (rule instanceof CSSMediaRule && /hover:\s*hover/.test(rule.conditionText)) {
23
+ ruleInMedia = true;
24
+ }
25
+ // A style rule, or the declarations Tailwind nests straight inside `@media` (CSSNestedDeclarations).
26
+ const style = (rule as { style?: CSSStyleDeclaration }).style;
27
+ if (ruleHover && style && style.length > 0) {
28
+ if (ruleInMedia) guarded += 1;
29
+ else unguarded.push(ruleSelector);
30
+ }
31
+ if ("cssRules" in rule) {
32
+ visit((rule as CSSGroupingRule).cssRules, ruleSelector, ruleHover, ruleInMedia);
33
+ }
34
+ }
35
+ };
36
+ for (const sheet of document.styleSheets) visit(sheet.cssRules, "", false, false);
37
+ return { guarded, unguarded };
38
+ }
39
+
40
+ test("every hover style sits inside @media (hover: hover)", () => {
41
+ const { guarded, unguarded } = hoverRules();
42
+ // The stylesheet holds the classes of every component, so an empty result means the walk is broken.
43
+ expect(guarded).toBeGreaterThan(50);
44
+ expect(unguarded).toEqual([]);
45
+ });
46
+
47
+ /**
48
+ * Every hover a pointer can see fades: each property a `:hover` rule changes on an element is in that
49
+ * element's `transition-property`, over `duration-quick` or `duration-fast` on `ease-smooth-out`
50
+ * (docs: Foundations > Motion, rule 5). Menu and list highlights do not animate by rule, so they are
51
+ * not rendered here.
52
+ */
53
+ function hoveredProperties(element: Element): Set<string> {
54
+ const props = new Set<string>();
55
+ const visit = (rules: CSSRuleList) => {
56
+ for (const rule of rules) {
57
+ if (
58
+ rule instanceof CSSStyleRule &&
59
+ rule.selectorText.replace(/\\./g, "").includes(":hover")
60
+ ) {
61
+ for (const part of rule.selectorText.split(/,(?![^(]*\))/)) {
62
+ if (!part.replace(/\\./g, "").includes(":hover")) continue;
63
+ let matches: boolean;
64
+ try {
65
+ matches = element.matches(part.replace(/:hover/g, ""));
66
+ } catch {
67
+ continue;
68
+ }
69
+ if (!matches) continue;
70
+ const declared = [...rule.style];
71
+ const own = declared.filter((name) => !name.startsWith("--tw-"));
72
+ // A gradient hover only sets Tailwind's gradient variables.
73
+ for (const name of own.length > 0
74
+ ? own
75
+ : declared.filter((n) => /gradient-(from|to)$/.test(n)))
76
+ props.add(name);
77
+ }
78
+ }
79
+ if ("cssRules" in rule) visit((rule as CSSGroupingRule).cssRules);
80
+ }
81
+ };
82
+ for (const sheet of document.styleSheets) visit(sheet.cssRules);
83
+ return props;
84
+ }
85
+
86
+ /** Longhands a hover sets that a transition names by their shorthand. */
87
+ const COVERED_BY: Record<string, string> = {
88
+ "border-top-color": "border-color",
89
+ "border-right-color": "border-color",
90
+ "border-bottom-color": "border-color",
91
+ "border-left-color": "border-color",
92
+ };
93
+
94
+ test("every hover fades on the motion tokens", async () => {
95
+ const { render } = await import("vitest-browser-react");
96
+ const { enableTransitions } = await import("../../test/motion.ts");
97
+ const { DODO_BUTTON_VARIANTS, Button } = await import("../components/button/button.tsx");
98
+ const { Tabs, TabsList, TabsTrigger } = await import("../components/tabs/tabs.tsx");
99
+ const { Collapsible, CollapsibleTrigger } = await import(
100
+ "../components/collapsible/collapsible.tsx"
101
+ );
102
+ const restore = enableTransitions();
103
+ try {
104
+ const variants = Object.keys(
105
+ DODO_BUTTON_VARIANTS.variant,
106
+ ) as (keyof typeof DODO_BUTTON_VARIANTS.variant)[];
107
+ const screen = await render(
108
+ <div>
109
+ {variants.map((variant) => (
110
+ <Button key={variant} variant={variant} data-hover-check={`button ${variant}`}>
111
+ Save
112
+ </Button>
113
+ ))}
114
+ <Tabs defaultValue="a">
115
+ <TabsList aria-label="Sections">
116
+ <TabsTrigger value="a">A</TabsTrigger>
117
+ <TabsTrigger value="b" data-hover-check="tabs trigger">
118
+ B
119
+ </TabsTrigger>
120
+ </TabsList>
121
+ </Tabs>
122
+ <Collapsible>
123
+ <CollapsibleTrigger data-hover-check="collapsible trigger">More</CollapsibleTrigger>
124
+ </Collapsible>
125
+ </div>,
126
+ );
127
+ const problems: string[] = [];
128
+ const checked = screen.container.querySelectorAll("[data-hover-check]");
129
+ expect(checked.length).toBe(variants.length + 2);
130
+ for (const element of checked) {
131
+ const name = element.getAttribute("data-hover-check");
132
+ const style = getComputedStyle(element);
133
+ const animated = style.transitionProperty.split(",").map((p) => p.trim());
134
+ const hovered = hoveredProperties(element);
135
+ if (hovered.size === 0) problems.push(`${name}: no hover rule found`);
136
+ for (const prop of hovered) {
137
+ const covered =
138
+ animated.includes("all") ||
139
+ animated.includes(prop) ||
140
+ animated.includes(COVERED_BY[prop] ?? "");
141
+ if (!covered) problems.push(`${name}: hover sets ${prop}, which does not transition`);
142
+ }
143
+ const duration = Math.max(
144
+ ...style.transitionDuration.split(",").map((d) => Number.parseFloat(d) * 1000),
145
+ );
146
+ if (duration !== 150 && duration !== 250) problems.push(`${name}: ${duration}ms`);
147
+ if (!style.transitionTimingFunction.startsWith("cubic-bezier(0.22, 1, 0.36, 1)"))
148
+ problems.push(`${name}: ${style.transitionTimingFunction}`);
149
+ }
150
+ expect(problems).toEqual([]);
151
+ } finally {
152
+ restore();
153
+ }
154
+ });
@@ -16,7 +16,7 @@ import {
16
16
  ComboboxInput,
17
17
  ComboboxItem,
18
18
  ComboboxList,
19
- } from "../components/select/select-combobox.tsx";
19
+ } from "../components/combobox/combobox.tsx";
20
20
  import {
21
21
  Collapsible,
22
22
  CollapsibleContent,
@@ -0,0 +1,96 @@
1
+ import { describe, expect, test } from "vitest";
2
+ import { render } from "vitest-browser-react";
3
+
4
+ /*
5
+ * Tokens that replaced `dark:` classes in the primitives. Each token class must paint what the pair of
6
+ * classes it replaced painted, in light, in dark and in a light scope inside dark. The literal classes on
7
+ * the reference elements are the ones the primitives used to carry.
8
+ */
9
+ const SCOPES = [
10
+ ["light", (node: React.ReactNode) => <div className="light">{node}</div>, "light"],
11
+ ["dark", (node: React.ReactNode) => <div className="dark">{node}</div>, "dark"],
12
+ [
13
+ "light inside dark",
14
+ (node: React.ReactNode) => (
15
+ <div className="dark">
16
+ <div className="light">{node}</div>
17
+ </div>
18
+ ),
19
+ "light",
20
+ ],
21
+ ] as const;
22
+
23
+ const TOAST_NEW =
24
+ "bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(var(--stack-shade)*max(0,var(--toast-index,0))))]";
25
+ const TOAST_OLD = {
26
+ light:
27
+ "bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(1%*max(0,var(--toast-index,0))))]",
28
+ dark: "bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(6%*max(0,var(--toast-index,0))))]",
29
+ };
30
+ const DRAWER_NEW =
31
+ "bg-[color-mix(in_srgb,var(--muted),var(--color-black)_calc(var(--stack-shade-panel)*(var(--nested-drawers)-var(--stack-progress))))]";
32
+ const DRAWER_OLD = {
33
+ light:
34
+ "bg-[color-mix(in_srgb,var(--muted),var(--color-black)_calc(2%*(var(--nested-drawers)-var(--stack-progress))))]",
35
+ dark: "bg-[color-mix(in_srgb,var(--muted),var(--color-black)_calc(6%*(var(--nested-drawers)-var(--stack-progress))))]",
36
+ };
37
+
38
+ const background = (testId: string): string =>
39
+ getComputedStyle(document.querySelector(`[data-testid="${testId}"]`) as Element).backgroundColor;
40
+
41
+ describe.each(SCOPES)("tokens that replaced dark: classes, %s", (_name, wrap, mode) => {
42
+ test("the autofill tint is 4% of the text colour in light and 8% in dark", async () => {
43
+ await render(
44
+ wrap(
45
+ <>
46
+ <div className="bg-foreground/(--autofill-tint)" data-testid="token" />
47
+ <div
48
+ className={mode === "dark" ? "bg-foreground/8" : "bg-foreground/4"}
49
+ data-testid="reference"
50
+ />
51
+ <div data-testid="unpainted" />
52
+ </>,
53
+ ),
54
+ );
55
+ expect(background("token")).not.toBe(background("unpainted"));
56
+ expect(background("token")).toBe(background("reference"));
57
+ });
58
+
59
+ test("a stacked toast darkens by 1% a level in light and 6% in dark", async () => {
60
+ const style = { "--toast-index": 2 } as React.CSSProperties;
61
+ await render(
62
+ wrap(
63
+ <>
64
+ <div className={TOAST_NEW} data-testid="token" style={style} />
65
+ <div className={TOAST_OLD[mode]} data-testid="reference" style={style} />
66
+ <div className="bg-popover" data-testid="front" />
67
+ </>,
68
+ ),
69
+ );
70
+ expect(background("token")).toBe(background("reference"));
71
+ expect(background("token")).not.toBe(background("front"));
72
+ });
73
+
74
+ test("a drawer behind a nested drawer darkens by 2% a level in light and 6% in dark", async () => {
75
+ const style = { "--nested-drawers": 2, "--stack-progress": 0 } as React.CSSProperties;
76
+ await render(
77
+ wrap(
78
+ <>
79
+ <div className={DRAWER_NEW} data-testid="token" style={style} />
80
+ <div className={DRAWER_OLD[mode]} data-testid="reference" style={style} />
81
+ <div className="bg-muted" data-testid="front" />
82
+ </>,
83
+ ),
84
+ );
85
+ expect(background("token")).toBe(background("reference"));
86
+ expect(background("token")).not.toBe(background("front"));
87
+ });
88
+
89
+ test("clip-edge stops a fill at the border in light and runs it under the border in dark", async () => {
90
+ await render(wrap(<div className="clip-edge" data-testid="token" />));
91
+ const clip = getComputedStyle(
92
+ document.querySelector('[data-testid="token"]') as Element,
93
+ ).backgroundClip;
94
+ expect(clip).toBe(mode === "dark" ? "border-box" : "padding-box");
95
+ });
96
+ });
@@ -47,7 +47,7 @@
47
47
  }
48
48
 
49
49
  /*
50
- * Edge shadows that switch per theme (tokens.css): `before:shadow-highlight`, `inset-shadow-highlight`.
50
+ * Edge shadows that switch per theme (tokens.css): `before:shadow-highlight`, `inset-shadow-button-solid`.
51
51
  * They read a runtime variable, so they take no opacity modifier. `reference`: each theme variable has its
52
52
  * token's name, so emitting it would make the token point at itself.
53
53
  */
@@ -57,9 +57,16 @@
57
57
  --shadow-overlay: var(--shadow-overlay);
58
58
  --shadow-dialog: var(--shadow-dialog);
59
59
  --shadow-panel: var(--shadow-panel);
60
- --inset-shadow-highlight: var(--inset-shadow-highlight);
61
- --inset-shadow-pressed: var(--inset-shadow-pressed);
60
+ --shadow-button-primary: var(--shadow-button-primary);
61
+ --shadow-button-secondary: var(--shadow-button-secondary);
62
+ --shadow-button-destructive: var(--shadow-button-destructive);
63
+ --shadow-button-warning: var(--shadow-button-warning);
64
+ --inset-shadow-button-primary: var(--inset-shadow-button-primary);
65
+ --inset-shadow-button-secondary: var(--inset-shadow-button-secondary);
66
+ --inset-shadow-button-solid: var(--inset-shadow-button-solid);
62
67
  --inset-shadow-sunken: var(--inset-shadow-sunken);
68
+ --inset-shadow-highlight: var(--inset-shadow-highlight); /* deprecated, removed in 2.0.0 */
69
+ --inset-shadow-pressed: var(--inset-shadow-pressed); /* deprecated, removed in 2.0.0 */
63
70
  --inset-shadow-recessed: var(--inset-shadow-recessed);
64
71
  --inset-shadow-segmented: var(--inset-shadow-segmented);
65
72
  --inset-shadow-bar: var(--inset-shadow-bar);
@@ -148,8 +155,8 @@
148
155
  --color-sidebar-border: var(--sidebar-border);
149
156
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
150
157
  --color-sidebar-accent: var(--sidebar-accent);
151
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
152
- --color-sidebar-primary: var(--sidebar-primary);
158
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); /* deprecated, removed in 2.0.0 */
159
+ --color-sidebar-primary: var(--sidebar-primary); /* deprecated, removed in 2.0.0 */
153
160
  --color-sidebar-foreground: var(--sidebar-foreground);
154
161
  --color-sidebar: var(--sidebar);
155
162
  --color-ring: var(--ring);
@@ -247,11 +254,11 @@
247
254
  --color-primary: var(--primary);
248
255
  --color-link: var(--link);
249
256
  --color-brand: var(--brand);
250
- --color-brand-hover: var(--brand-hover);
251
- --color-brand-pressed: var(--brand-pressed);
252
257
  --color-brand-foreground: var(--brand-foreground);
253
258
  --color-brand-border: var(--brand-border);
254
- --color-brand-shadow: var(--brand-shadow);
259
+ --color-brand-hover: var(--brand-hover); /* deprecated, removed in 2.0.0 */
260
+ --color-brand-pressed: var(--brand-pressed); /* deprecated, removed in 2.0.0 */
261
+ --color-brand-shadow: var(--brand-shadow); /* deprecated, removed in 2.0.0 */
255
262
  --color-popover-foreground: var(--popover-foreground);
256
263
  --color-popover: var(--popover);
257
264
  --color-popover-border: var(--popover-border);
@@ -282,9 +289,9 @@
282
289
  --color-chart-diverging-pos-1: var(--chart-diverging-pos-1);
283
290
  --color-chart-diverging-pos-2: var(--chart-diverging-pos-2);
284
291
  --color-chart-diverging-pos-3: var(--chart-diverging-pos-3);
285
- --color-code: var(--code);
286
- --color-code-foreground: var(--code-foreground);
287
292
  --color-code-highlight: var(--code-highlight);
293
+ --color-code: var(--code); /* deprecated, removed in 2.0.0 */
294
+ --color-code-foreground: var(--code-foreground); /* deprecated, removed in 2.0.0 */
288
295
 
289
296
  /* Logo artwork only (brand identity, see tokens.css). */
290
297
  --color-logo-mark: var(--logo-mark);
@@ -374,6 +381,12 @@
374
381
  --transition-delay-stagger: var(--motion-duration-stagger);
375
382
  --transition-delay-micro: var(--motion-duration-micro);
376
383
  --ease-smooth-out: var(--motion-ease-smooth-out);
384
+ /*
385
+ * A `transition-*` class with no duration or easing of its own: a hover in, `duration-quick` on
386
+ * `ease-smooth-out` (docs: Foundations > Motion, rule 5), instead of Tailwind's 150ms default curve.
387
+ */
388
+ --default-transition-duration: var(--motion-duration-quick);
389
+ --default-transition-timing-function: var(--motion-ease-smooth-out);
377
390
  --ease-bounce: var(--motion-ease-bounce);
378
391
  --ease-bounce-strong: var(--motion-ease-bounce-strong);
379
392
  --ease-sheet: var(--motion-ease-sheet);
@@ -0,0 +1,115 @@
1
+ /*
2
+ * Artwork tokens: milestones, featured icon spheres, the logo, leaderboard glows, wallet and share cards.
3
+ * Single-use by nature; each still points at a primitive. Imported by tokens.css.
4
+ */
5
+ :root,
6
+ .light {
7
+ /* Wallet buttons (Apple Pay, Google Pay): the brands' required black-on-light / white-on-dark marks. */
8
+ --wallet: var(--color-black);
9
+ --wallet-foreground: var(--color-white);
10
+ /*
11
+ * The Leaderboard podium glows (Figma Leaderboard › .Podium cell): gold, silver and bronze at 40% from the top-left
12
+ * corner, transparent at 70%. Illustration, as in the dashboard code: the same in light and dark.
13
+ */
14
+ --leaderboard-glow-first: radial-gradient(at top left, --alpha(var(--color-art-gold) / 40%), transparent 70%);
15
+ --leaderboard-glow-second: radial-gradient(at top left, --alpha(var(--color-art-silver) / 40%), transparent 70%);
16
+ --leaderboard-glow-third: radial-gradient(at top left, --alpha(var(--color-art-bronze) / 40%), transparent 70%);
17
+ /*
18
+ * The help panel's dot field (the dashboard's support/Blue.png and Green.png): 2px dots on a 5px grid, at half strength,
19
+ * fading in from the top-left and bottom-right corners. Blue in light, the brand lime in dark.
20
+ */
21
+ --support-art-dots: radial-gradient(circle, var(--color-blue-400) 1.1px, transparent 1.35px);
22
+ --support-art-mask:
23
+ radial-gradient(at top left, black, transparent 45%), radial-gradient(at bottom right, black, transparent 55%);
24
+ /*
25
+ * Featured icon spheres (the dashboard's verification badges, `IconCircleBase`): each tone's fill runs from `-top`
26
+ * to `-bottom` under the sphere's white gloss, on the status ramps (green, amber, red, blue, grey), the same.
27
+ */
28
+ --sphere-neutral-top: var(--color-grey-600);
29
+ --sphere-neutral-bottom: var(--color-grey-700);
30
+ --sphere-success-top: var(--color-green-500);
31
+ --sphere-success-bottom: var(--color-green-700);
32
+ --sphere-warning-top: var(--color-amber-600);
33
+ --sphere-warning-bottom: var(--color-amber-700);
34
+ --sphere-error-top: var(--color-red-500);
35
+ --sphere-error-bottom: var(--color-red-700);
36
+ --sphere-info-top: var(--color-blue-500);
37
+ --sphere-info-bottom: var(--color-blue-600);
38
+ /*
39
+ * Milestones (Design File › Merchant Milestones): per category, `-gem` the gem art, `-tint` the card top, `-edge` its
40
+ * 1px ring, `-sparkle` the dots and the share card top. Gems are the same in both modes.
41
+ */
42
+ --milestone-geography-gem: var(--color-art-sky-600);
43
+ --milestone-geography-tint: var(--color-art-sky-300);
44
+ --milestone-geography-edge: var(--color-art-sky-300);
45
+ --milestone-geography-sparkle: var(--color-art-sky-400);
46
+ --milestone-revenue-gem: var(--color-green-600);
47
+ --milestone-revenue-tint: var(--color-art-mint-300);
48
+ --milestone-revenue-edge: var(--color-art-mint-300);
49
+ --milestone-revenue-sparkle: var(--color-art-mint-400);
50
+ --milestone-growth-gem: var(--color-art-indigo-700);
51
+ --milestone-growth-tint: var(--color-art-indigo-300);
52
+ --milestone-growth-edge: var(--color-art-indigo-300);
53
+ --milestone-growth-sparkle: var(--color-art-indigo-400);
54
+ --milestone-customers-gem: var(--color-art-purple-700);
55
+ --milestone-customers-tint: var(--color-violet-300);
56
+ --milestone-customers-edge: var(--color-violet-300);
57
+ --milestone-customers-sparkle: var(--color-violet-400);
58
+ /* The "milestone reached" notice: the category's lightest tint (`-wash`) with a 1px edge a step darker. */
59
+ --milestone-geography-wash: var(--color-blue-25);
60
+ --milestone-geography-wash-edge: var(--color-art-sky-200);
61
+ --milestone-revenue-wash: var(--color-green-50);
62
+ --milestone-revenue-wash-edge: var(--color-art-mint-200);
63
+ --milestone-growth-wash: var(--color-blue-50);
64
+ --milestone-growth-wash-edge: var(--color-blue-200);
65
+ --milestone-customers-wash: var(--color-violet-50);
66
+ --milestone-customers-wash-edge: var(--color-violet-200);
67
+ --milestone-glyph: var(--color-white); /* the symbol on a reached gem */
68
+ /* A milestone not reached yet: a grey gem and a grey card top. */
69
+ --milestone-locked-gem: var(--color-art-taupe-400);
70
+ --milestone-locked-glyph: var(--color-grey-400);
71
+ --milestone-locked-tint: var(--color-art-slate-300);
72
+ --milestone-locked-edge: var(--border);
73
+ --milestone-edge-end: var(--border); /* the bottom of a reached card's edge */
74
+ /* Glass streaks: white 0-30-0% (reached), 10-40-10% (locked). */
75
+ --milestone-streak: --alpha(var(--color-white) / 30%);
76
+ --milestone-locked-streak: --alpha(var(--color-white) / 40%);
77
+ --milestone-locked-streak-edge: --alpha(var(--color-white) / 10%);
78
+ /* A sale share card: the lime amount and the dark ink of its outline and headline, the same in both themes. */
79
+ --share-amount: var(--color-pulse-200);
80
+ --share-ink: var(--color-pulse-950);
81
+ /* Logo artwork only (Logo component): fixed Dodo brand colours, not for UI. */
82
+ --logo-mark: var(--color-pulse-200);
83
+ --logo-mark-edge: var(--color-art-lime-edge);
84
+ --logo-glyph: var(--color-art-ink);
85
+ --logo-wordmark: var(--color-art-ink);
86
+ --logo-wordmark-on-light: var(--color-art-ink);
87
+ --logo-wordmark-on-dark: var(--color-white);
88
+ }
89
+
90
+ .dark {
91
+ --support-art-dots: radial-gradient(circle, var(--color-pulse-400) 1.1px, transparent 1.35px);
92
+ --wallet: var(--color-white);
93
+ --wallet-foreground: var(--color-black);
94
+ /* Milestones in dark (Design File): tops start at the 400 step. */
95
+ --milestone-geography-tint: var(--milestone-geography-sparkle);
96
+ --milestone-revenue-tint: var(--milestone-revenue-sparkle);
97
+ --milestone-growth-tint: var(--milestone-growth-sparkle);
98
+ --milestone-customers-tint: var(--milestone-customers-sparkle);
99
+ --milestone-geography-wash: color-mix(in srgb, var(--milestone-geography-sparkle) 12%, var(--card));
100
+ --milestone-geography-wash-edge: color-mix(in srgb, var(--milestone-geography-sparkle) 32%, var(--card));
101
+ --milestone-revenue-wash: color-mix(in srgb, var(--milestone-revenue-sparkle) 12%, var(--card));
102
+ --milestone-revenue-wash-edge: color-mix(in srgb, var(--milestone-revenue-sparkle) 32%, var(--card));
103
+ --milestone-growth-wash: color-mix(in srgb, var(--milestone-growth-sparkle) 12%, var(--card));
104
+ --milestone-growth-wash-edge: color-mix(in srgb, var(--milestone-growth-sparkle) 32%, var(--card));
105
+ --milestone-customers-wash: color-mix(in srgb, var(--milestone-customers-sparkle) 12%, var(--card));
106
+ --milestone-customers-wash-edge: color-mix(in srgb, var(--milestone-customers-sparkle) 32%, var(--card));
107
+ --milestone-locked-gem: var(--color-grey-950);
108
+ --milestone-locked-glyph: var(--color-art-iron-500);
109
+ --milestone-locked-tint: var(--color-grey-800);
110
+ --milestone-locked-edge: --alpha(var(--color-white) / 7%);
111
+ --milestone-edge-end: color-mix(in srgb, var(--color-white) 8%, var(--card));
112
+ --milestone-locked-streak: --alpha(var(--color-white) / 12%);
113
+ --milestone-locked-streak-edge: transparent;
114
+ --logo-wordmark: var(--color-white);
115
+ }
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Chart tokens: series, scales and marks. Imported by tokens.css.
3
+ */
4
+ :root,
5
+ .light {
6
+ /* Series, in order. --chart-1 is the dashboard lime (2.1:1, pair it with a label); 2-8 keep 3:1. */
7
+ --chart-1: var(--color-pulse-500);
8
+ --chart-2: var(--color-blue-600); /* content/accent */
9
+ --chart-3: var(--color-violet-600); /* content/violet */
10
+ --chart-4: var(--color-orange-500); /* below 3:1 on white, like --chart-1: pair it with a label */
11
+ --chart-5: var(--color-pink-600); /* content/pink */
12
+ --chart-6: var(--color-amber-600);
13
+ --chart-7: var(--color-green-600);
14
+ --chart-8: var(--color-grey-500);
15
+ /* Bars, lines and areas: solid Pulse and Blue 400, the same in both modes (1.5:1 and 2.8:1 on white, pair them
16
+ * with a label or a tooltip), and Violet 500 for a third series (Violet 400 in dark). */
17
+ --chart-solid-1: var(--color-pulse-400);
18
+ --chart-solid-2: var(--color-blue-400);
19
+ --chart-solid-3: var(--color-violet-500);
20
+ /* The previous period: a dashed reference line, as the dashboard draws it (not a series). */
21
+ --chart-comparison: var(--color-grey-300);
22
+ /* ComparisonBars: the previous-period marker and the hatching where a value fell short. */
23
+ --chart-comparison-marker: var(--color-pulse-700);
24
+ --chart-hatch: repeating-linear-gradient(
25
+ 135deg,
26
+ var(--chart-scale-pattern-color) 0 1.5px,
27
+ transparent 1.5px 6px
28
+ );
29
+ /* Up and down values (a delta, the change since last period). Pair them with a sign or an icon. */
30
+ --chart-positive: var(--color-green-600);
31
+ --chart-negative: var(--color-red-500);
32
+ /*
33
+ * Diverging scale (change against a baseline): neg-3 is the strongest decrease, 0 no change, pos-3 the
34
+ * strongest increase. Every step, the grey midpoint included, keeps 3:1 against the background.
35
+ */
36
+ --chart-diverging-neg-3: var(--color-red-700);
37
+ --chart-diverging-neg-2: var(--color-red-600);
38
+ --chart-diverging-neg-1: var(--color-red-500);
39
+ --chart-diverging-0: var(--color-grey-500);
40
+ --chart-diverging-pos-1: var(--color-green-500);
41
+ --chart-diverging-pos-2: var(--color-green-600);
42
+ --chart-diverging-pos-3: var(--color-green-700);
43
+ /* Sequential chart scale (heatmap, choropleth, binned data), 01 = empty / lowest, 05 = highest. */
44
+ --chart-scale-01: var(--accent);
45
+ --chart-scale-02: color-mix(in oklab, var(--chart-1) 30%, var(--background));
46
+ --chart-scale-03: color-mix(in oklab, var(--chart-1) 55%, var(--background));
47
+ --chart-scale-04: color-mix(in oklab, var(--chart-1) 80%, var(--background));
48
+ --chart-scale-05: var(--chart-1);
49
+ --chart-scale-pattern-color: var(--border);
50
+ }
51
+
52
+ .dark {
53
+ --chart-1: var(--color-pulse-400);
54
+ --chart-2: var(--color-blue-400);
55
+ --chart-3: var(--color-violet-400);
56
+ --chart-4: var(--color-orange-400);
57
+ --chart-5: var(--color-pink-400);
58
+ --chart-6: var(--color-amber-400);
59
+ --chart-7: var(--color-green-400);
60
+ --chart-8: var(--color-grey-400);
61
+ --chart-solid-3: var(--color-violet-400);
62
+ --chart-comparison: var(--color-grey-600);
63
+ --chart-comparison-marker: var(--color-pulse-300);
64
+ --chart-positive: var(--color-green-400);
65
+ --chart-negative: var(--color-red-400);
66
+ --chart-diverging-neg-3: var(--color-red-300);
67
+ --chart-diverging-neg-2: var(--color-red-400);
68
+ --chart-diverging-pos-2: var(--color-green-400);
69
+ --chart-diverging-pos-3: var(--color-green-300);
70
+ /* Again here so a nested .dark recomputes them; 03 is brighter for 4.5:1 text (RetentionMatrix). */
71
+ --chart-scale-01: var(--accent);
72
+ --chart-scale-02: color-mix(in oklab, var(--chart-1) 30%, var(--background));
73
+ --chart-scale-03: color-mix(in oklab, var(--chart-1) 62%, var(--background));
74
+ --chart-scale-04: color-mix(in oklab, var(--chart-1) 80%, var(--background));
75
+ --chart-scale-05: var(--chart-1);
76
+ --chart-hatch: repeating-linear-gradient(
77
+ 135deg,
78
+ var(--chart-scale-pattern-color) 0 1.5px,
79
+ transparent 1.5px 6px
80
+ );
81
+ }
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Motion tokens: durations, easings, distances, scales and blurs (docs: Foundations > Motion).
3
+ * The same in light and dark. Imported by tokens.css.
4
+ */
5
+ :root,
6
+ .light {
7
+ /* Motion (theme-independent), the transitions.dev motion-token scale (https://transitions.dev/skill.html). */
8
+ --motion-duration-instant: 50ms; /* tooltip close (dodo-ui addition, from the transitions.dev tooltip) */
9
+ --motion-duration-stagger: 40ms; /* per-item stagger offset */
10
+ --motion-duration-micro: 80ms; /* tooltip intent delay, shake segment, large stagger */
11
+ --motion-duration-quick: 150ms; /* modal/dropdown close, text swap, tooltip appear */
12
+ --motion-duration-fast: 250ms; /* icon swap, dropdown/modal open, tabs sliding, accordion, page slide */
13
+ --motion-duration-medium: 350ms; /* panel close, toast open */
14
+ --motion-duration-slow: 400ms; /* panel open, skeleton content reveal, input clear */
15
+ --motion-duration-very-slow: 500ms; /* emphasis moments, badge appear, text reveal, success check */
16
+ --motion-ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); /* surfaces: open + close, slide, resize, position */
17
+ --motion-ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1); /* entrance pop (badge); never on a close */
18
+ --motion-ease-bounce-strong: cubic-bezier(0.34, 3.85, 0.64, 1); /* springy hover-out return */
19
+ --motion-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1); /* touch sheets and drawers sliding in or settling after a drag (Vaul) */
20
+ /* A spring with a small overshoot (8%) as CSS: switch thumbs, radio dots, count pops. Never on a close. */
21
+ --motion-ease-spring: linear(
22
+ 0,
23
+ 0.042,
24
+ 0.146,
25
+ 0.284,
26
+ 0.435,
27
+ 0.582,
28
+ 0.715,
29
+ 0.828,
30
+ 0.919,
31
+ 0.987,
32
+ 1.035,
33
+ 1.064,
34
+ 1.079,
35
+ 1.084,
36
+ 1.08,
37
+ 1.071,
38
+ 1.059,
39
+ 1.047,
40
+ 1.034,
41
+ 1.023,
42
+ 1.014,
43
+ 1.006,
44
+ 1.001,
45
+ 0.997,
46
+ 1
47
+ );
48
+ --motion-distance-micro: 4px; /* text swap */
49
+ --motion-distance-small: 6px; /* error shake, small segment */
50
+ --motion-distance-base: 8px; /* badge reveal, page slide, error shake large segment */
51
+ --motion-distance-medium: 12px; /* text reveal */
52
+ --motion-distance-large: 30px; /* check badge appear */
53
+ --motion-scale-large: 0.96; /* modal open / close: the scale it animates from */
54
+ --motion-scale-medium: 0.97; /* dropdown open */
55
+ --motion-scale-small: 0.98; /* tooltip open */
56
+ --motion-scale-tiny: 0.99; /* dropdown close */
57
+ --motion-blur-small: 2px; /* panel reveal, icon swap, text swap, skeleton reveal, number pop-in */
58
+ --motion-blur-medium: 3px; /* page slide, text reveal */
59
+ --motion-blur-large: 8px; /* success check open */
60
+ }