@crisp-ui-kit/crisp 0.2.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (590) hide show
  1. package/README.md +20 -0
  2. package/dist/accordion.css +9 -1
  3. package/dist/appshell.css +12 -4
  4. package/dist/authshell.css +57 -0
  5. package/dist/authshell.d.ts +7 -0
  6. package/dist/avatargroup.css +2 -2
  7. package/dist/badge.css +4 -4
  8. package/dist/barchart.css +13 -5
  9. package/dist/base.css +25 -0
  10. package/dist/board.css +9 -1
  11. package/dist/bulkbar.css +11 -3
  12. package/dist/button.css +16 -2
  13. package/dist/button.d.ts +2 -1
  14. package/dist/card.css +8 -0
  15. package/dist/checkbox.css +17 -1
  16. package/dist/cjs/components/accordion/accordion.js +69 -0
  17. package/dist/cjs/components/accordion/accordion.recipe.js +26 -0
  18. package/dist/cjs/components/accordion/index.js +7 -0
  19. package/dist/cjs/components/avatar/avatar.js +44 -0
  20. package/dist/cjs/components/avatar/avatar.recipe.js +42 -0
  21. package/dist/cjs/components/avatar/index.js +7 -0
  22. package/dist/cjs/components/avatargroup/avatargroup.js +52 -0
  23. package/dist/cjs/components/avatargroup/avatargroup.recipe.js +18 -0
  24. package/dist/cjs/components/avatargroup/index.js +7 -0
  25. package/dist/cjs/components/badge/badge.js +44 -0
  26. package/dist/cjs/components/badge/badge.recipe.js +68 -0
  27. package/dist/cjs/components/badge/index.js +7 -0
  28. package/dist/cjs/components/barchart/barchart.js +45 -0
  29. package/dist/cjs/components/barchart/barchart.recipe.js +34 -0
  30. package/dist/cjs/components/barchart/index.js +7 -0
  31. package/dist/cjs/components/breadcrumb/breadcrumb.js +53 -0
  32. package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +21 -0
  33. package/dist/cjs/components/breadcrumb/index.js +7 -0
  34. package/dist/cjs/components/bulkbar/bulkbar.js +53 -0
  35. package/dist/cjs/components/bulkbar/bulkbar.recipe.js +31 -0
  36. package/dist/cjs/components/bulkbar/index.js +8 -0
  37. package/dist/cjs/components/button/button.js +62 -0
  38. package/dist/cjs/components/button/button.recipe.js +58 -0
  39. package/dist/cjs/components/button/index.js +7 -0
  40. package/dist/cjs/components/callout/callout.js +25 -0
  41. package/dist/cjs/components/callout/callout.recipe.js +29 -0
  42. package/dist/cjs/components/callout/index.js +7 -0
  43. package/dist/cjs/components/card/card.js +54 -0
  44. package/dist/cjs/components/card/card.recipe.js +31 -0
  45. package/dist/cjs/components/card/index.js +10 -0
  46. package/dist/cjs/components/checkbox/checkbox.js +56 -0
  47. package/dist/cjs/components/checkbox/checkbox.recipe.js +34 -0
  48. package/dist/cjs/components/checkbox/index.js +7 -0
  49. package/dist/cjs/components/columncalc/columncalc.js +139 -0
  50. package/dist/cjs/components/columncalc/columncalc.recipe.js +33 -0
  51. package/dist/cjs/components/columncalc/index.js +10 -0
  52. package/dist/cjs/components/contextmenu/contextmenu.js +78 -0
  53. package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
  54. package/dist/cjs/components/contextmenu/index.js +7 -0
  55. package/dist/cjs/components/datatable/datatable.js +508 -0
  56. package/dist/cjs/components/datatable/datatable.recipe.js +113 -0
  57. package/dist/cjs/components/datatable/index.js +7 -0
  58. package/dist/cjs/components/datepicker/datepicker.js +153 -0
  59. package/dist/cjs/components/datepicker/datepicker.recipe.js +180 -0
  60. package/dist/cjs/components/datepicker/index.js +19 -0
  61. package/dist/cjs/components/datepickerfield/datepickerfield.js +85 -0
  62. package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +44 -0
  63. package/dist/cjs/components/datepickerfield/index.js +7 -0
  64. package/dist/cjs/components/dialog/dialog.js +86 -0
  65. package/dist/cjs/components/dialog/dialog.recipe.js +35 -0
  66. package/dist/cjs/components/dialog/index.js +9 -0
  67. package/dist/cjs/components/divider/divider.js +10 -0
  68. package/dist/cjs/components/divider/divider.recipe.js +17 -0
  69. package/dist/cjs/components/divider/index.js +7 -0
  70. package/dist/cjs/components/donutchart/donutchart.js +41 -0
  71. package/dist/cjs/components/donutchart/donutchart.recipe.js +30 -0
  72. package/dist/cjs/components/donutchart/index.js +7 -0
  73. package/dist/cjs/components/drawer/drawer.js +80 -0
  74. package/dist/cjs/components/drawer/drawer.recipe.js +30 -0
  75. package/dist/cjs/components/drawer/index.js +9 -0
  76. package/dist/cjs/components/emptystate/emptystate.js +10 -0
  77. package/dist/cjs/components/emptystate/emptystate.recipe.js +34 -0
  78. package/dist/cjs/components/emptystate/index.js +7 -0
  79. package/dist/cjs/components/formfield/formfield.js +50 -0
  80. package/dist/cjs/components/formfield/formfield.recipe.js +22 -0
  81. package/dist/cjs/components/formfield/index.js +7 -0
  82. package/dist/cjs/components/input/index.js +7 -0
  83. package/dist/cjs/components/input/input.js +47 -0
  84. package/dist/cjs/components/input/input.recipe.js +59 -0
  85. package/dist/cjs/components/kbd/index.js +7 -0
  86. package/dist/cjs/components/kbd/kbd.js +44 -0
  87. package/dist/cjs/components/kbd/kbd.recipe.js +23 -0
  88. package/dist/cjs/components/linechart/index.js +7 -0
  89. package/dist/cjs/components/linechart/linechart.js +57 -0
  90. package/dist/cjs/components/linechart/linechart.recipe.js +35 -0
  91. package/dist/cjs/components/menu/index.js +14 -0
  92. package/dist/cjs/components/menu/menu-keyboard.js +117 -0
  93. package/dist/cjs/components/menu/menu.js +144 -0
  94. package/dist/cjs/components/menu/menu.recipe.js +54 -0
  95. package/dist/cjs/components/multiselect/index.js +7 -0
  96. package/dist/cjs/components/multiselect/multiselect.js +161 -0
  97. package/dist/cjs/components/multiselect/multiselect.recipe.js +71 -0
  98. package/dist/cjs/components/popover/index.js +7 -0
  99. package/dist/cjs/components/popover/popover.js +106 -0
  100. package/dist/cjs/components/popover/popover.recipe.js +21 -0
  101. package/dist/cjs/components/progress/index.js +7 -0
  102. package/dist/cjs/components/progress/progress.js +26 -0
  103. package/dist/cjs/components/progress/progress.recipe.js +20 -0
  104. package/dist/cjs/components/radiogroup/index.js +8 -0
  105. package/dist/cjs/components/radiogroup/radiogroup.js +83 -0
  106. package/dist/cjs/components/radiogroup/radiogroup.recipe.js +40 -0
  107. package/dist/cjs/components/resizablepanel/index.js +12 -0
  108. package/dist/cjs/components/resizablepanel/resizablepanel.js +176 -0
  109. package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +69 -0
  110. package/dist/cjs/components/segmented/index.js +7 -0
  111. package/dist/cjs/components/segmented/segmented.js +95 -0
  112. package/dist/cjs/components/segmented/segmented.recipe.js +23 -0
  113. package/dist/cjs/components/select/index.js +7 -0
  114. package/dist/cjs/components/select/select.js +180 -0
  115. package/dist/cjs/components/select/select.recipe.js +79 -0
  116. package/dist/cjs/components/skeleton/index.js +7 -0
  117. package/dist/cjs/components/skeleton/skeleton.js +13 -0
  118. package/dist/cjs/components/skeleton/skeleton.recipe.js +17 -0
  119. package/dist/cjs/components/spinner/index.js +7 -0
  120. package/dist/cjs/components/spinner/spinner.js +15 -0
  121. package/dist/cjs/components/spinner/spinner.recipe.js +16 -0
  122. package/dist/cjs/components/stagebar/index.js +7 -0
  123. package/dist/cjs/components/stagebar/stagebar.js +26 -0
  124. package/dist/cjs/components/stagebar/stagebar.recipe.js +17 -0
  125. package/dist/cjs/components/statcard/index.js +7 -0
  126. package/dist/cjs/components/statcard/statcard.js +15 -0
  127. package/dist/cjs/components/statcard/statcard.recipe.js +37 -0
  128. package/dist/cjs/components/switch/index.js +7 -0
  129. package/dist/cjs/components/switch/switch.js +58 -0
  130. package/dist/cjs/components/switch/switch.recipe.js +29 -0
  131. package/dist/cjs/components/table/index.js +14 -0
  132. package/dist/cjs/components/table/table.js +66 -0
  133. package/dist/cjs/components/table/table.recipe.js +43 -0
  134. package/dist/cjs/components/tabletoolbar/index.js +20 -0
  135. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +84 -0
  136. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +237 -0
  137. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -0
  138. package/dist/cjs/components/tabs/index.js +7 -0
  139. package/dist/cjs/components/tabs/tabs.js +106 -0
  140. package/dist/cjs/components/tabs/tabs.recipe.js +36 -0
  141. package/dist/cjs/components/textarea/index.js +7 -0
  142. package/dist/cjs/components/textarea/textarea.js +56 -0
  143. package/dist/cjs/components/textarea/textarea.recipe.js +46 -0
  144. package/dist/cjs/components/toast/index.js +8 -0
  145. package/dist/cjs/components/toast/toast.js +95 -0
  146. package/dist/cjs/components/toast/toast.recipe.js +31 -0
  147. package/dist/cjs/components/tooltip/index.js +7 -0
  148. package/dist/cjs/components/tooltip/tooltip.js +95 -0
  149. package/dist/cjs/components/tooltip/tooltip.recipe.js +16 -0
  150. package/dist/cjs/components/wheelpicker/index.js +7 -0
  151. package/dist/cjs/components/wheelpicker/wheelpicker.js +134 -0
  152. package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +95 -0
  153. package/dist/cjs/core/cx.js +8 -0
  154. package/dist/cjs/core/define.js +6 -0
  155. package/dist/cjs/core/index.js +11 -0
  156. package/dist/cjs/core/primitive.js +49 -0
  157. package/dist/cjs/core/resolve.js +44 -0
  158. package/dist/cjs/core/types.js +2 -0
  159. package/dist/cjs/index.js +92 -0
  160. package/dist/cjs/package.json +3 -0
  161. package/dist/cjs/product/appshell/appshell.js +104 -0
  162. package/dist/cjs/product/appshell/appshell.recipe.js +30 -0
  163. package/dist/cjs/product/appshell/index.js +7 -0
  164. package/dist/cjs/product/authshell/authshell.js +21 -0
  165. package/dist/cjs/product/authshell/authshell.recipe.js +67 -0
  166. package/dist/cjs/product/authshell/index.js +7 -0
  167. package/dist/cjs/product/board/board.js +78 -0
  168. package/dist/cjs/product/board/board.recipe.js +31 -0
  169. package/dist/cjs/product/board/index.js +7 -0
  170. package/dist/cjs/product/command/command.js +238 -0
  171. package/dist/cjs/product/command/command.recipe.js +47 -0
  172. package/dist/cjs/product/command/index.js +8 -0
  173. package/dist/cjs/product/entitycard/entitycard.js +14 -0
  174. package/dist/cjs/product/entitycard/entitycard.recipe.js +32 -0
  175. package/dist/cjs/product/entitycard/index.js +7 -0
  176. package/dist/cjs/product/flowcanvas/flowcanvas.js +121 -0
  177. package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +28 -0
  178. package/dist/cjs/product/flowcanvas/index.js +7 -0
  179. package/dist/cjs/product/inbox/inbox.js +16 -0
  180. package/dist/cjs/product/inbox/inbox.recipe.js +46 -0
  181. package/dist/cjs/product/inbox/index.js +7 -0
  182. package/dist/cjs/product/listpage/index.js +8 -0
  183. package/dist/cjs/product/listpage/listpage.js +25 -0
  184. package/dist/cjs/product/listpage/listpage.recipe.js +46 -0
  185. package/dist/cjs/product/navitem/index.js +5 -0
  186. package/dist/cjs/product/navitem/navitem.js +44 -0
  187. package/dist/cjs/product/navitem/navitem.recipe.js +36 -0
  188. package/dist/cjs/product/onboarding/index.js +7 -0
  189. package/dist/cjs/product/onboarding/onboarding.js +17 -0
  190. package/dist/cjs/product/onboarding/onboarding.recipe.js +44 -0
  191. package/dist/cjs/product/recordpage/index.js +7 -0
  192. package/dist/cjs/product/recordpage/recordpage.js +409 -0
  193. package/dist/cjs/product/recordpage/recordpage.recipe.js +162 -0
  194. package/dist/cjs/product/recordpanel/index.js +7 -0
  195. package/dist/cjs/product/recordpanel/recordpanel.js +83 -0
  196. package/dist/cjs/product/recordpanel/recordpanel.recipe.js +51 -0
  197. package/dist/cjs/product/recordstable/company-logos.js +29 -0
  198. package/dist/cjs/product/recordstable/index.js +10 -0
  199. package/dist/cjs/product/recordstable/recordstable.js +1092 -0
  200. package/dist/cjs/product/recordstable/recordstable.recipe.js +152 -0
  201. package/dist/cjs/product/recordstable/recordstable.tag.js +21 -0
  202. package/dist/cjs/product/richtext/index.js +7 -0
  203. package/dist/cjs/product/richtext/richtext.js +147 -0
  204. package/dist/cjs/product/richtext/richtext.recipe.js +43 -0
  205. package/dist/cjs/product/settingssection/index.js +7 -0
  206. package/dist/cjs/product/settingssection/settingssection.js +14 -0
  207. package/dist/cjs/product/settingssection/settingssection.recipe.js +23 -0
  208. package/dist/cjs/product/settingsshell/index.js +7 -0
  209. package/dist/cjs/product/settingsshell/settingsshell.js +59 -0
  210. package/dist/cjs/product/settingsshell/settingsshell.recipe.js +46 -0
  211. package/dist/cjs/product/sidebar/index.js +13 -0
  212. package/dist/cjs/product/sidebar/sidebar.js +148 -0
  213. package/dist/cjs/product/sidebar/sidebar.recipe.js +46 -0
  214. package/dist/cjs/product/tasklist/index.js +7 -0
  215. package/dist/cjs/product/tasklist/tasklist.js +19 -0
  216. package/dist/cjs/product/tasklist/tasklist.recipe.js +38 -0
  217. package/dist/cjs/product/trialbanner/index.js +7 -0
  218. package/dist/cjs/product/trialbanner/trialbanner.js +13 -0
  219. package/dist/cjs/product/trialbanner/trialbanner.recipe.js +32 -0
  220. package/dist/cjs/product/viewtoggle/index.js +7 -0
  221. package/dist/cjs/product/viewtoggle/viewtoggle.js +55 -0
  222. package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +27 -0
  223. package/dist/cjs/tokens/contract.js +21 -0
  224. package/dist/cjs/tokens/elevation.js +47 -0
  225. package/dist/cjs/tokens/index.js +18 -0
  226. package/dist/cjs/tokens/palette.js +63 -0
  227. package/dist/cjs/tokens/scale.js +70 -0
  228. package/dist/cjs/tokens/semantic.js +57 -0
  229. package/dist/columncalc.css +26 -0
  230. package/dist/columncalc.d.ts +7 -0
  231. package/dist/command.css +34 -1
  232. package/dist/contextmenu.css +11 -3
  233. package/dist/datatable.css +106 -0
  234. package/dist/datatable.d.ts +7 -0
  235. package/dist/datepicker.css +165 -19
  236. package/dist/datepicker.d.ts +2 -2
  237. package/dist/datepickerfield.css +27 -0
  238. package/dist/datepickerfield.d.ts +7 -0
  239. package/dist/dialog.css +11 -3
  240. package/dist/donutchart.css +8 -0
  241. package/dist/drawer.css +13 -5
  242. package/dist/entitycard.css +10 -2
  243. package/dist/esm/components/accordion/accordion.js +33 -0
  244. package/dist/esm/components/accordion/accordion.recipe.js +23 -0
  245. package/dist/esm/components/accordion/index.js +2 -0
  246. package/dist/esm/components/avatar/avatar.js +8 -0
  247. package/dist/esm/components/avatar/avatar.recipe.js +39 -0
  248. package/dist/esm/components/avatar/index.js +2 -0
  249. package/dist/esm/components/avatargroup/avatargroup.js +16 -0
  250. package/dist/esm/components/avatargroup/avatargroup.recipe.js +15 -0
  251. package/dist/esm/components/avatargroup/index.js +2 -0
  252. package/dist/esm/components/badge/badge.js +8 -0
  253. package/dist/esm/components/badge/badge.recipe.js +65 -0
  254. package/dist/esm/components/badge/index.js +2 -0
  255. package/dist/esm/components/barchart/barchart.js +42 -0
  256. package/dist/esm/components/barchart/barchart.recipe.js +31 -0
  257. package/dist/esm/components/barchart/index.js +2 -0
  258. package/dist/esm/components/breadcrumb/breadcrumb.js +17 -0
  259. package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +18 -0
  260. package/dist/esm/components/breadcrumb/index.js +2 -0
  261. package/dist/esm/components/bulkbar/bulkbar.js +16 -0
  262. package/dist/esm/components/bulkbar/bulkbar.recipe.js +28 -0
  263. package/dist/esm/components/bulkbar/index.js +2 -0
  264. package/dist/esm/components/button/button.js +26 -0
  265. package/dist/esm/components/button/button.recipe.js +55 -0
  266. package/dist/esm/components/button/index.js +2 -0
  267. package/dist/esm/components/callout/callout.js +22 -0
  268. package/dist/esm/components/callout/callout.recipe.js +26 -0
  269. package/dist/esm/components/callout/index.js +2 -0
  270. package/dist/esm/components/card/card.js +15 -0
  271. package/dist/esm/components/card/card.recipe.js +28 -0
  272. package/dist/esm/components/card/index.js +2 -0
  273. package/dist/esm/components/checkbox/checkbox.js +20 -0
  274. package/dist/esm/components/checkbox/checkbox.recipe.js +31 -0
  275. package/dist/esm/components/checkbox/index.js +2 -0
  276. package/dist/esm/components/columncalc/columncalc.js +100 -0
  277. package/dist/esm/components/columncalc/columncalc.recipe.js +30 -0
  278. package/dist/esm/components/columncalc/index.js +1 -0
  279. package/dist/esm/components/contextmenu/contextmenu.js +42 -0
  280. package/dist/esm/components/contextmenu/contextmenu.recipe.js +21 -0
  281. package/dist/esm/components/contextmenu/index.js +2 -0
  282. package/dist/esm/components/datatable/datatable.js +472 -0
  283. package/dist/esm/components/datatable/datatable.recipe.js +110 -0
  284. package/dist/esm/components/datatable/index.js +2 -0
  285. package/dist/esm/components/datepicker/datepicker.js +108 -0
  286. package/dist/esm/components/datepicker/datepicker.recipe.js +177 -0
  287. package/dist/esm/components/datepicker/index.js +2 -0
  288. package/dist/esm/components/datepickerfield/datepickerfield.js +49 -0
  289. package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +41 -0
  290. package/dist/esm/components/datepickerfield/index.js +2 -0
  291. package/dist/esm/components/dialog/dialog.js +48 -0
  292. package/dist/esm/components/dialog/dialog.recipe.js +32 -0
  293. package/dist/esm/components/dialog/index.js +2 -0
  294. package/dist/esm/components/divider/divider.js +7 -0
  295. package/dist/esm/components/divider/divider.recipe.js +14 -0
  296. package/dist/esm/components/divider/index.js +2 -0
  297. package/dist/esm/components/donutchart/donutchart.js +38 -0
  298. package/dist/esm/components/donutchart/donutchart.recipe.js +27 -0
  299. package/dist/esm/components/donutchart/index.js +2 -0
  300. package/dist/esm/components/drawer/drawer.js +42 -0
  301. package/dist/esm/components/drawer/drawer.recipe.js +27 -0
  302. package/dist/esm/components/drawer/index.js +2 -0
  303. package/dist/esm/components/emptystate/emptystate.js +7 -0
  304. package/dist/esm/components/emptystate/emptystate.recipe.js +31 -0
  305. package/dist/esm/components/emptystate/index.js +2 -0
  306. package/dist/esm/components/formfield/formfield.js +14 -0
  307. package/dist/esm/components/formfield/formfield.recipe.js +19 -0
  308. package/dist/esm/components/formfield/index.js +2 -0
  309. package/dist/esm/components/input/index.js +2 -0
  310. package/dist/esm/components/input/input.js +11 -0
  311. package/dist/esm/components/input/input.recipe.js +56 -0
  312. package/dist/esm/components/kbd/index.js +2 -0
  313. package/dist/esm/components/kbd/kbd.js +8 -0
  314. package/dist/esm/components/kbd/kbd.recipe.js +20 -0
  315. package/dist/esm/components/linechart/index.js +2 -0
  316. package/dist/esm/components/linechart/linechart.js +54 -0
  317. package/dist/esm/components/linechart/linechart.recipe.js +32 -0
  318. package/dist/esm/components/menu/index.js +3 -0
  319. package/dist/esm/components/menu/menu-keyboard.js +80 -0
  320. package/dist/esm/components/menu/menu.js +104 -0
  321. package/dist/esm/components/menu/menu.recipe.js +51 -0
  322. package/dist/esm/components/multiselect/index.js +2 -0
  323. package/dist/esm/components/multiselect/multiselect.js +125 -0
  324. package/dist/esm/components/multiselect/multiselect.recipe.js +68 -0
  325. package/dist/esm/components/popover/index.js +2 -0
  326. package/dist/esm/components/popover/popover.js +70 -0
  327. package/dist/esm/components/popover/popover.recipe.js +18 -0
  328. package/dist/esm/components/progress/index.js +2 -0
  329. package/dist/esm/components/progress/progress.js +23 -0
  330. package/dist/esm/components/progress/progress.recipe.js +17 -0
  331. package/dist/esm/components/radiogroup/index.js +2 -0
  332. package/dist/esm/components/radiogroup/radiogroup.js +46 -0
  333. package/dist/esm/components/radiogroup/radiogroup.recipe.js +37 -0
  334. package/dist/esm/components/resizablepanel/index.js +2 -0
  335. package/dist/esm/components/resizablepanel/resizablepanel.js +135 -0
  336. package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +66 -0
  337. package/dist/esm/components/segmented/index.js +2 -0
  338. package/dist/esm/components/segmented/segmented.js +59 -0
  339. package/dist/esm/components/segmented/segmented.recipe.js +20 -0
  340. package/dist/esm/components/select/index.js +2 -0
  341. package/dist/esm/components/select/select.js +144 -0
  342. package/dist/esm/components/select/select.recipe.js +76 -0
  343. package/dist/esm/components/skeleton/index.js +2 -0
  344. package/dist/esm/components/skeleton/skeleton.js +10 -0
  345. package/dist/esm/components/skeleton/skeleton.recipe.js +14 -0
  346. package/dist/esm/components/spinner/index.js +2 -0
  347. package/dist/esm/components/spinner/spinner.js +12 -0
  348. package/dist/esm/components/spinner/spinner.recipe.js +13 -0
  349. package/dist/esm/components/stagebar/index.js +2 -0
  350. package/dist/esm/components/stagebar/stagebar.js +23 -0
  351. package/dist/esm/components/stagebar/stagebar.recipe.js +14 -0
  352. package/dist/esm/components/statcard/index.js +2 -0
  353. package/dist/esm/components/statcard/statcard.js +12 -0
  354. package/dist/esm/components/statcard/statcard.recipe.js +34 -0
  355. package/dist/esm/components/switch/index.js +2 -0
  356. package/dist/esm/components/switch/switch.js +22 -0
  357. package/dist/esm/components/switch/switch.recipe.js +26 -0
  358. package/dist/esm/components/table/index.js +2 -0
  359. package/dist/esm/components/table/table.js +30 -0
  360. package/dist/esm/components/table/table.recipe.js +40 -0
  361. package/dist/esm/components/tabletoolbar/index.js +2 -0
  362. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +79 -0
  363. package/dist/esm/components/tabletoolbar/tabletoolbar.js +199 -0
  364. package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +23 -0
  365. package/dist/esm/components/tabs/index.js +2 -0
  366. package/dist/esm/components/tabs/tabs.js +70 -0
  367. package/dist/esm/components/tabs/tabs.recipe.js +33 -0
  368. package/dist/esm/components/textarea/index.js +2 -0
  369. package/dist/esm/components/textarea/textarea.js +20 -0
  370. package/dist/esm/components/textarea/textarea.recipe.js +43 -0
  371. package/dist/esm/components/toast/index.js +2 -0
  372. package/dist/esm/components/toast/toast.js +58 -0
  373. package/dist/esm/components/toast/toast.recipe.js +28 -0
  374. package/dist/esm/components/tooltip/index.js +2 -0
  375. package/dist/esm/components/tooltip/tooltip.js +59 -0
  376. package/dist/esm/components/tooltip/tooltip.recipe.js +13 -0
  377. package/dist/esm/components/wheelpicker/index.js +2 -0
  378. package/dist/esm/components/wheelpicker/wheelpicker.js +98 -0
  379. package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +92 -0
  380. package/dist/esm/core/cx.js +1 -0
  381. package/dist/esm/core/define.js +3 -0
  382. package/dist/esm/core/index.js +4 -0
  383. package/dist/esm/core/primitive.js +13 -0
  384. package/dist/esm/core/resolve.js +41 -0
  385. package/dist/esm/core/types.js +1 -0
  386. package/dist/esm/index.js +76 -0
  387. package/dist/esm/product/appshell/appshell.js +68 -0
  388. package/dist/esm/product/appshell/appshell.recipe.js +27 -0
  389. package/dist/esm/product/appshell/index.js +2 -0
  390. package/dist/esm/product/authshell/authshell.js +18 -0
  391. package/dist/esm/product/authshell/authshell.recipe.js +64 -0
  392. package/dist/esm/product/authshell/index.js +2 -0
  393. package/dist/esm/product/board/board.js +42 -0
  394. package/dist/esm/product/board/board.recipe.js +28 -0
  395. package/dist/esm/product/board/index.js +2 -0
  396. package/dist/esm/product/command/command.js +201 -0
  397. package/dist/esm/product/command/command.recipe.js +44 -0
  398. package/dist/esm/product/command/index.js +2 -0
  399. package/dist/esm/product/entitycard/entitycard.js +11 -0
  400. package/dist/esm/product/entitycard/entitycard.recipe.js +29 -0
  401. package/dist/esm/product/entitycard/index.js +2 -0
  402. package/dist/esm/product/flowcanvas/flowcanvas.js +85 -0
  403. package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +25 -0
  404. package/dist/esm/product/flowcanvas/index.js +2 -0
  405. package/dist/esm/product/inbox/inbox.js +13 -0
  406. package/dist/esm/product/inbox/inbox.recipe.js +43 -0
  407. package/dist/esm/product/inbox/index.js +2 -0
  408. package/dist/esm/product/listpage/index.js +2 -0
  409. package/dist/esm/product/listpage/listpage.js +21 -0
  410. package/dist/esm/product/listpage/listpage.recipe.js +43 -0
  411. package/dist/esm/product/navitem/index.js +1 -0
  412. package/dist/esm/product/navitem/navitem.js +8 -0
  413. package/dist/esm/product/navitem/navitem.recipe.js +33 -0
  414. package/dist/esm/product/onboarding/index.js +2 -0
  415. package/dist/esm/product/onboarding/onboarding.js +14 -0
  416. package/dist/esm/product/onboarding/onboarding.recipe.js +41 -0
  417. package/dist/esm/product/recordpage/index.js +2 -0
  418. package/dist/esm/product/recordpage/recordpage.js +372 -0
  419. package/dist/esm/product/recordpage/recordpage.recipe.js +159 -0
  420. package/dist/esm/product/recordpanel/index.js +2 -0
  421. package/dist/esm/product/recordpanel/recordpanel.js +47 -0
  422. package/dist/esm/product/recordpanel/recordpanel.recipe.js +48 -0
  423. package/dist/esm/product/recordstable/company-logos.js +26 -0
  424. package/dist/esm/product/recordstable/index.js +2 -0
  425. package/dist/esm/product/recordstable/recordstable.js +1054 -0
  426. package/dist/esm/product/recordstable/recordstable.recipe.js +149 -0
  427. package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
  428. package/dist/esm/product/richtext/index.js +2 -0
  429. package/dist/esm/product/richtext/richtext.js +111 -0
  430. package/dist/esm/product/richtext/richtext.recipe.js +40 -0
  431. package/dist/esm/product/settingssection/index.js +2 -0
  432. package/dist/esm/product/settingssection/settingssection.js +11 -0
  433. package/dist/esm/product/settingssection/settingssection.recipe.js +20 -0
  434. package/dist/esm/product/settingsshell/index.js +2 -0
  435. package/dist/esm/product/settingsshell/settingsshell.js +23 -0
  436. package/dist/esm/product/settingsshell/settingsshell.recipe.js +43 -0
  437. package/dist/esm/product/sidebar/index.js +2 -0
  438. package/dist/esm/product/sidebar/sidebar.js +112 -0
  439. package/dist/esm/product/sidebar/sidebar.recipe.js +43 -0
  440. package/dist/esm/product/tasklist/index.js +2 -0
  441. package/dist/esm/product/tasklist/tasklist.js +16 -0
  442. package/dist/esm/product/tasklist/tasklist.recipe.js +35 -0
  443. package/dist/esm/product/trialbanner/index.js +2 -0
  444. package/dist/esm/product/trialbanner/trialbanner.js +10 -0
  445. package/dist/esm/product/trialbanner/trialbanner.recipe.js +29 -0
  446. package/dist/esm/product/viewtoggle/index.js +2 -0
  447. package/dist/esm/product/viewtoggle/viewtoggle.js +19 -0
  448. package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +24 -0
  449. package/dist/esm/tokens/contract.js +18 -0
  450. package/dist/esm/tokens/elevation.js +44 -0
  451. package/dist/esm/tokens/index.js +5 -0
  452. package/dist/esm/tokens/palette.js +60 -0
  453. package/dist/esm/tokens/scale.js +67 -0
  454. package/dist/esm/tokens/semantic.js +54 -0
  455. package/dist/inbox.css +9 -1
  456. package/dist/input.css +32 -4
  457. package/dist/linechart.css +5 -5
  458. package/dist/listpage.css +11 -3
  459. package/dist/menu.css +13 -5
  460. package/dist/multiselect.css +17 -9
  461. package/dist/native/tokens.d.ts +16 -0
  462. package/dist/native/tokens.js +221 -0
  463. package/dist/navitem.css +21 -1
  464. package/dist/onboarding.css +10 -2
  465. package/dist/popover.css +9 -1
  466. package/dist/progress.css +8 -0
  467. package/dist/radiogroup.css +9 -1
  468. package/dist/recordpage.css +26 -16
  469. package/dist/recordpanel.css +25 -15
  470. package/dist/recordstable.css +41 -27
  471. package/dist/resizablepanel.css +53 -0
  472. package/dist/resizablepanel.d.ts +7 -0
  473. package/dist/richtext.css +11 -3
  474. package/dist/segmented.css +8 -0
  475. package/dist/select.css +22 -8
  476. package/dist/select.d.ts +2 -1
  477. package/dist/settingsshell.css +15 -2
  478. package/dist/sidebar.css +34 -1
  479. package/dist/skeleton.css +8 -0
  480. package/dist/spinner.css +8 -0
  481. package/dist/stagebar.css +8 -0
  482. package/dist/statcard.css +6 -0
  483. package/dist/statcard.d.ts +2 -2
  484. package/dist/styles.css +2134 -999
  485. package/dist/switch.css +8 -0
  486. package/dist/table.css +34 -0
  487. package/dist/table.d.ts +8 -0
  488. package/dist/tabletoolbar.css +78 -0
  489. package/dist/tabletoolbar.d.ts +7 -0
  490. package/dist/tabs.css +12 -4
  491. package/dist/tasklist.css +8 -0
  492. package/dist/textarea.css +23 -3
  493. package/dist/toast.css +10 -2
  494. package/dist/tokens.css +53 -0
  495. package/dist/tokens.json +217 -0
  496. package/dist/tooltip.css +8 -0
  497. package/dist/trialbanner.css +8 -0
  498. package/dist/types/components/accordion/accordion.d.ts +10 -8
  499. package/dist/types/components/avatargroup/avatargroup.d.ts +2 -2
  500. package/dist/types/components/barchart/barchart.d.ts +4 -2
  501. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  502. package/dist/types/components/bulkbar/bulkbar.d.ts +4 -2
  503. package/dist/types/components/button/button.d.ts +8 -0
  504. package/dist/types/components/button/button.recipe.d.ts +12 -0
  505. package/dist/types/components/callout/callout.d.ts +2 -2
  506. package/dist/types/components/columncalc/columncalc.d.ts +49 -0
  507. package/dist/types/components/columncalc/columncalc.recipe.d.ts +3 -0
  508. package/dist/types/components/columncalc/index.d.ts +1 -0
  509. package/dist/types/components/datatable/datatable.d.ts +153 -0
  510. package/dist/types/components/datatable/datatable.recipe.d.ts +3 -0
  511. package/dist/types/components/datatable/index.d.ts +2 -0
  512. package/dist/types/components/datepicker/datepicker.d.ts +41 -18
  513. package/dist/types/components/datepicker/datepicker.recipe.d.ts +25 -2
  514. package/dist/types/components/datepicker/index.d.ts +1 -1
  515. package/dist/types/components/datepickerfield/datepickerfield.d.ts +35 -0
  516. package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +5 -0
  517. package/dist/types/components/datepickerfield/index.d.ts +2 -0
  518. package/dist/types/components/dialog/dialog.d.ts +3 -1
  519. package/dist/types/components/divider/divider.d.ts +2 -2
  520. package/dist/types/components/donutchart/donutchart.d.ts +2 -2
  521. package/dist/types/components/drawer/drawer.d.ts +3 -1
  522. package/dist/types/components/emptystate/emptystate.d.ts +2 -2
  523. package/dist/types/components/formfield/formfield.d.ts +7 -4
  524. package/dist/types/components/input/input.d.ts +8 -2
  525. package/dist/types/components/linechart/linechart.d.ts +4 -2
  526. package/dist/types/components/menu/index.d.ts +1 -0
  527. package/dist/types/components/menu/menu-keyboard.d.ts +33 -0
  528. package/dist/types/components/menu/menu.d.ts +7 -1
  529. package/dist/types/components/multiselect/multiselect.d.ts +8 -4
  530. package/dist/types/components/popover/popover.d.ts +4 -1
  531. package/dist/types/components/progress/progress.d.ts +2 -2
  532. package/dist/types/components/radiogroup/radiogroup.d.ts +2 -2
  533. package/dist/types/components/resizablepanel/index.d.ts +2 -0
  534. package/dist/types/components/resizablepanel/resizablepanel.d.ts +75 -0
  535. package/dist/types/components/resizablepanel/resizablepanel.recipe.d.ts +3 -0
  536. package/dist/types/components/segmented/segmented.d.ts +2 -2
  537. package/dist/types/components/select/select.d.ts +4 -2
  538. package/dist/types/components/select/select.recipe.d.ts +12 -0
  539. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  540. package/dist/types/components/spinner/spinner.d.ts +2 -2
  541. package/dist/types/components/stagebar/stagebar.d.ts +2 -2
  542. package/dist/types/components/statcard/statcard.d.ts +7 -2
  543. package/dist/types/components/statcard/statcard.recipe.d.ts +12 -2
  544. package/dist/types/components/table/index.d.ts +2 -0
  545. package/dist/types/components/table/table.d.ts +53 -0
  546. package/dist/types/components/table/table.recipe.d.ts +21 -0
  547. package/dist/types/components/tabletoolbar/index.d.ts +2 -0
  548. package/dist/types/components/tabletoolbar/tabletoolbar.chrome.d.ts +2 -0
  549. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +89 -0
  550. package/dist/types/components/tabletoolbar/tabletoolbar.recipe.d.ts +3 -0
  551. package/dist/types/components/tabs/tabs.d.ts +2 -2
  552. package/dist/types/components/toast/toast.d.ts +7 -1
  553. package/dist/types/components/tooltip/tooltip.d.ts +8 -1
  554. package/dist/types/components/wheelpicker/index.d.ts +2 -0
  555. package/dist/types/components/wheelpicker/wheelpicker.d.ts +37 -0
  556. package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +26 -0
  557. package/dist/types/index.d.ts +8 -0
  558. package/dist/types/product/appshell/appshell.d.ts +16 -2
  559. package/dist/types/product/authshell/authshell.d.ts +28 -0
  560. package/dist/types/product/authshell/authshell.recipe.d.ts +3 -0
  561. package/dist/types/product/authshell/index.d.ts +2 -0
  562. package/dist/types/product/board/board.d.ts +2 -2
  563. package/dist/types/product/command/command.d.ts +25 -1
  564. package/dist/types/product/entitycard/entitycard.d.ts +2 -2
  565. package/dist/types/product/flowcanvas/flowcanvas.d.ts +9 -1
  566. package/dist/types/product/onboarding/onboarding.d.ts +7 -1
  567. package/dist/types/product/recordpage/recordpage.d.ts +65 -1
  568. package/dist/types/product/recordpanel/recordpanel.d.ts +8 -2
  569. package/dist/types/product/recordstable/company-logos.d.ts +1 -0
  570. package/dist/types/product/recordstable/recordstable.d.ts +131 -1
  571. package/dist/types/product/recordstable/recordstable.tag.d.ts +10 -0
  572. package/dist/types/product/richtext/richtext.d.ts +5 -1
  573. package/dist/types/product/settingssection/settingssection.d.ts +2 -2
  574. package/dist/types/product/settingsshell/settingsshell.d.ts +6 -2
  575. package/dist/types/product/sidebar/index.d.ts +1 -1
  576. package/dist/types/product/sidebar/sidebar.d.ts +93 -0
  577. package/dist/types/product/tasklist/tasklist.d.ts +5 -1
  578. package/dist/types/product/trialbanner/trialbanner.d.ts +2 -2
  579. package/dist/types/product/viewtoggle/viewtoggle.d.ts +11 -5
  580. package/dist/types/tokens/contract.d.ts +26 -3
  581. package/dist/types/tokens/elevation.d.ts +44 -0
  582. package/dist/types/tokens/index.d.ts +1 -0
  583. package/dist/types/tokens/palette.d.ts +88 -0
  584. package/dist/types/tokens/scale.d.ts +7 -0
  585. package/dist/types/tokens/semantic.d.ts +31 -0
  586. package/dist/viewtoggle.css +11 -3
  587. package/dist/wheelpicker.css +68 -0
  588. package/dist/wheelpicker.d.ts +7 -0
  589. package/package.json +351 -9
  590. package/dist/index.js +0 -9690
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { boardRecipe } from "./board.recipe.js";
4
+ /**
5
+ * A kanban board with native drag-and-drop between columns. Cards are
6
+ * `draggable`; dropping one on a column reparents it via `onCardsChange`
7
+ * (the parent owns the cards, so the move is a controlled state update).
8
+ * Measured from Attio's Deals pipeline.
9
+ */
10
+ export function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel = "New", className, ...rest }) {
11
+ const [dragId, setDragId] = React.useState(null);
12
+ const [overCol, setOverCol] = React.useState(null);
13
+ const move = (cardId, toColumn) => {
14
+ const card = cards.find((c) => c.id === cardId);
15
+ if (!card || card.columnId === toColumn)
16
+ return;
17
+ onCardsChange?.(cards.map((c) => (c.id === cardId ? { ...c, columnId: toColumn } : c)));
18
+ };
19
+ return (_jsx("div", { className: boardRecipe({ className }), ...rest, children: columns.map((col) => {
20
+ const colCards = cards.filter((c) => c.columnId === col.id);
21
+ return (_jsxs("div", { className: "board-col", "data-over": overCol === col.id ? "" : undefined, onDragOver: (e) => {
22
+ if (!dragId)
23
+ return;
24
+ e.preventDefault();
25
+ setOverCol(col.id);
26
+ }, onDragLeave: (e) => {
27
+ if (!e.currentTarget.contains(e.relatedTarget)) {
28
+ setOverCol((v) => (v === col.id ? null : v));
29
+ }
30
+ }, onDrop: (e) => {
31
+ e.preventDefault();
32
+ if (dragId)
33
+ move(dragId, col.id);
34
+ setDragId(null);
35
+ setOverCol(null);
36
+ }, children: [_jsxs("div", { className: "board-col-header", children: [col.accent && (_jsx("span", { className: "board-col-dot", style: { background: col.accent } })), _jsx("span", { className: "board-col-title", children: col.title }), _jsx("span", { className: "board-col-count", children: colCards.length }), onNewCard && (_jsx("button", { type: "button", className: "board-col-add", "aria-label": `Add to ${col.title}`, onClick: () => onNewCard(col.id), children: "+" }))] }), _jsxs("div", { className: "board-col-body", children: [onNewCard && (_jsxs("button", { type: "button", className: "board-newcard", onClick: () => onNewCard(col.id), children: ["+ ", newCardLabel] })), colCards.map((card) => (_jsx("div", { className: "board-card", draggable: true, "data-dragging": dragId === card.id ? "" : undefined, onDragStart: () => setDragId(card.id), onDragEnd: () => {
37
+ setDragId(null);
38
+ setOverCol(null);
39
+ }, children: renderCard(card) }, card.id)))] })] }, col.id));
40
+ }) }));
41
+ }
42
+ Board.displayName = "Board";
@@ -0,0 +1,28 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A kanban board — measured from Attio's Deals pipeline: horizontally scrolling
4
+ // columns (dot + title + count header, a "New" button, a stack of draggable
5
+ // cards), with the hovered drop column highlighted.
6
+ const config = defineRecipe({
7
+ name: "board",
8
+ base: `display: flex; gap: ${c.space["3"]}; height: 100%; box-sizing: border-box; padding: ${c.space["3"]}; overflow-x: auto; align-items: flex-start; font-family: ${c.font.sans};
9
+ & .board-col { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; max-height: 100%; box-sizing: border-box; }
10
+ & .board-col-header { display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding: 0 ${c.space["1"]}; flex-shrink: 0; }
11
+ & .board-col-dot { width: 9px; height: 9px; border-radius: ${c.radius.full}; flex-shrink: 0; }
12
+ & .board-col-title { font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
13
+ & .board-col-count { font-size: ${c.text.md}; color: ${c.fgMuted}; }
14
+ & .board-col-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-inline-start: auto; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
15
+ & .board-col-add:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
16
+ & .board-col-body { display: flex; flex-direction: column; gap: ${c.space["2"]}; flex: 1; min-height: 48px; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; overflow-y: auto; transition: background 0.12s; }
17
+ & .board-col[data-over] .board-col-body { background: color-mix(in srgb, ${c.bgBrandSolid} 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.bgBrandSolid} 30%, transparent); }
18
+ & .board-newcard { display: flex; align-items: center; justify-content: center; gap: ${c.space["1.5"]}; height: 32px; flex-shrink: 0; border: none; border-radius: ${c.radius.md}; background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
19
+ & .board-newcard:hover { background: color-mix(in srgb, ${c.fgPrimary} 7%, transparent); color: ${c.fgPrimary}; }
20
+ & .board-card { display: flex; flex-direction: column; gap: ${c.space["2"]}; box-sizing: border-box; padding: ${c.space["2.5"]} ${c.space["3"]}; border-radius: ${c.radius.lg}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}, 0 1px 2px rgba(0,0,0,0.04); cursor: grab; }
21
+ & .board-card:active { cursor: grabbing; }
22
+ & .board-card[data-dragging] { opacity: 0.4; }`,
23
+ variants: {},
24
+ defaultVariants: {},
25
+ compoundVariants: [],
26
+ });
27
+ export const boardRecipe = resolveRecipe(config);
28
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { Board, } from "./board.js";
2
+ export { boardRecipe } from "./board.recipe.js";
@@ -0,0 +1,201 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as combobox from "@zag-js/combobox";
3
+ import * as dialog from "@zag-js/dialog";
4
+ import { normalizeProps, Portal, useMachine } from "@zag-js/react";
5
+ import { Building2, CircleDollarSign, House, ListTodo, Search, Settings, SquareCheck, User, UserPlus, } from "lucide-react";
6
+ import * as React from "react";
7
+ import { Kbd } from "../../components/kbd/index.js";
8
+ import { commandRecipe } from "./command.recipe.js";
9
+ const IconHome = () => (_jsx(House, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
10
+ const IconTasks = () => (_jsx(SquareCheck, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
11
+ const IconCompanies = () => (_jsx(Building2, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
12
+ const IconPeople = () => (_jsx(User, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
13
+ const IconDeals = () => (_jsx(CircleDollarSign, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
14
+ const IconNewPerson = () => (_jsx(UserPlus, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
15
+ const IconNewTask = () => (_jsx(ListTodo, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
16
+ const IconSearch = () => (_jsx(Search, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
17
+ const IconSettings = () => (_jsx(Settings, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }));
18
+ /** crisp's own generic command set (not copied from any product). */
19
+ export const defaultCommandItems = [
20
+ {
21
+ id: "go-home",
22
+ label: "Go to Home",
23
+ icon: IconHome,
24
+ group: "Navigation",
25
+ shortcut: ["G", "H"],
26
+ },
27
+ {
28
+ id: "go-tasks",
29
+ label: "Go to Tasks",
30
+ icon: IconTasks,
31
+ group: "Navigation",
32
+ shortcut: ["G", "T"],
33
+ },
34
+ {
35
+ id: "go-companies",
36
+ label: "Go to Companies",
37
+ icon: IconCompanies,
38
+ group: "Navigation",
39
+ shortcut: ["G", "C"],
40
+ },
41
+ {
42
+ id: "go-people",
43
+ label: "Go to People",
44
+ icon: IconPeople,
45
+ group: "Navigation",
46
+ shortcut: ["G", "P"],
47
+ },
48
+ {
49
+ id: "go-deals",
50
+ label: "Go to Deals",
51
+ icon: IconDeals,
52
+ group: "Navigation",
53
+ shortcut: ["G", "D"],
54
+ },
55
+ {
56
+ id: "new-company",
57
+ label: "New company",
58
+ icon: IconCompanies,
59
+ group: "Create",
60
+ keywords: ["create", "add"],
61
+ },
62
+ {
63
+ id: "new-person",
64
+ label: "New person",
65
+ icon: IconNewPerson,
66
+ group: "Create",
67
+ keywords: ["create", "add"],
68
+ },
69
+ {
70
+ id: "new-task",
71
+ label: "New task",
72
+ icon: IconNewTask,
73
+ group: "Create",
74
+ keywords: ["create", "add"],
75
+ },
76
+ {
77
+ id: "search-records",
78
+ label: "Search records…",
79
+ icon: IconSearch,
80
+ group: "Actions",
81
+ keywords: ["find"],
82
+ },
83
+ {
84
+ id: "settings",
85
+ label: "Settings",
86
+ icon: IconSettings,
87
+ group: "Actions",
88
+ keywords: ["preferences"],
89
+ },
90
+ ];
91
+ // A globally unique (process-lifetime) id per mounted instance, rather than
92
+ // React's tree-position-based useId. The dialog/combobox machines defer
93
+ // their outside-click/focus dismissal listeners by a frame, so a rapid
94
+ // unmount+remount that reused useId's tree-relative ids could let a stale
95
+ // registration from a just-unmounted instance resolve (by id) to a new
96
+ // instance's DOM node.
97
+ let instanceCounter = 0;
98
+ function useCommandInstanceId() {
99
+ const idRef = React.useRef(null);
100
+ if (idRef.current == null) {
101
+ instanceCounter += 1;
102
+ idRef.current = `crisp-command-${instanceCounter}`;
103
+ }
104
+ return idRef.current;
105
+ }
106
+ /**
107
+ * ⌘K command palette. Composes a Zag dialog machine (modal, focus trap,
108
+ * scroll lock) with a Zag combobox machine (filterable, keyboard-navigable
109
+ * option list) so keyboard/focus correctness comes from the machines, not
110
+ * hand-rolled event handling.
111
+ */
112
+ export function Command({ open, onOpenChange, items = defaultCommandItems, placeholder = "Search actions and records…", "aria-label": ariaLabel = "Command palette", navigateLabel = "Navigate", selectLabel = "Select", emptyLabel = "No matching commands", query: queryProp, onQueryChange, filterItems = true, }) {
113
+ const instanceId = useCommandInstanceId();
114
+ const dialogId = `${instanceId}-dialog`;
115
+ const comboId = `${instanceId}-combobox`;
116
+ const inputRef = React.useRef(null);
117
+ const [internalQuery, setInternalQuery] = React.useState("");
118
+ const query = queryProp !== undefined ? queryProp : internalQuery;
119
+ const setQuery = React.useCallback((next) => {
120
+ onQueryChange?.(next);
121
+ if (queryProp === undefined)
122
+ setInternalQuery(next);
123
+ }, [onQueryChange, queryProp]);
124
+ const dialogService = useMachine(dialog.machine, {
125
+ id: dialogId,
126
+ open,
127
+ onOpenChange(details) {
128
+ onOpenChange(details.open);
129
+ },
130
+ initialFocusEl: () => inputRef.current,
131
+ "aria-label": ariaLabel,
132
+ });
133
+ const dlg = dialog.connect(dialogService, normalizeProps);
134
+ const filteredItems = React.useMemo(() => {
135
+ if (!filterItems)
136
+ return items;
137
+ const q = query.trim().toLowerCase();
138
+ if (!q)
139
+ return items;
140
+ return items.filter((item) => item.label.toLowerCase().includes(q) ||
141
+ item.keywords?.some((k) => k.toLowerCase().includes(q)));
142
+ }, [items, query, filterItems]);
143
+ const collection = React.useMemo(() => combobox.collection({
144
+ items: filteredItems,
145
+ itemToValue: (item) => item.id,
146
+ itemToString: (item) => item.label,
147
+ }), [filteredItems]);
148
+ const comboService = useMachine(combobox.machine, {
149
+ id: comboId,
150
+ collection,
151
+ // The list is always visible while the dialog is open (not a floating
152
+ // popover) — the combobox is only used for its keyboard/filter machine.
153
+ open: true,
154
+ // The dialog already owns escape/outside-click dismissal; avoid a
155
+ // second competing dismissable layer.
156
+ disableLayer: true,
157
+ inputBehavior: "autohighlight",
158
+ closeOnSelect: false,
159
+ // Always driven from our own `query` (internal state, or the caller's
160
+ // controlled prop) so a caller-driven query update reaches the input,
161
+ // not just the reverse — the sole source of truth is `query`, not this
162
+ // machine's own copy.
163
+ inputValue: query,
164
+ onInputValueChange(details) {
165
+ setQuery(details.inputValue);
166
+ },
167
+ onSelect(details) {
168
+ const item = items.find((candidate) => candidate.id === details.itemValue);
169
+ item?.onSelect?.();
170
+ onOpenChange(false);
171
+ },
172
+ });
173
+ const combo = combobox.connect(comboService, normalizeProps);
174
+ // Reset the query/highlight each time the palette opens, so it never
175
+ // reopens showing a stale filter from the previous session.
176
+ // biome-ignore lint/correctness/useExhaustiveDependencies: only re-run when `open` flips — `combo` is a fresh object every render.
177
+ React.useLayoutEffect(() => {
178
+ if (!open)
179
+ return;
180
+ setQuery("");
181
+ combo.setInputValue("", "script");
182
+ combo.clearHighlightValue();
183
+ }, [open]);
184
+ // The footer's primary button mirrors the currently highlighted row (Attio
185
+ // shows the active action there and runs it on ↵ / click).
186
+ const highlightedItem = filteredItems.find((item) => item.id === combo.highlightedValue) ??
187
+ filteredItems[0];
188
+ const runItem = (item) => {
189
+ if (!item)
190
+ return;
191
+ item.onSelect?.();
192
+ onOpenChange(false);
193
+ };
194
+ if (!dlg.open)
195
+ return null;
196
+ return (_jsx(Portal, { children: _jsxs("div", { className: commandRecipe(), children: [_jsx("div", { ...dlg.getBackdropProps(), className: "command-backdrop" }), _jsx("div", { ...dlg.getPositionerProps(), className: "command-positioner", children: _jsx("div", { ...dlg.getContentProps(), className: "command-content", children: _jsxs("div", { className: "command-card", children: [_jsxs("div", { className: "command-control", children: [_jsx(IconSearch, {}), _jsx("input", { ref: inputRef, ...combo.getInputProps(), className: "command-input", placeholder: placeholder })] }), _jsx("div", { ...combo.getContentProps(), className: "command-list", children: filteredItems.length === 0 ? (_jsx("div", { className: "command-empty", children: emptyLabel })) : (filteredItems.map((item, i) => {
197
+ const Icon = item.icon;
198
+ const showGroup = item.group && item.group !== filteredItems[i - 1]?.group;
199
+ return (_jsxs(React.Fragment, { children: [showGroup && (_jsx("div", { className: "command-group-label", "aria-hidden": "true", children: item.group })), _jsxs("div", { ...combo.getItemProps({ item }), className: "command-item", children: [_jsx(Icon, {}), _jsx("span", { className: "command-item-label", children: item.label }), item.shortcut && (_jsx("span", { className: "command-item-shortcut", children: item.shortcut.map((key) => (_jsx(Kbd, { children: key }, key))) }))] })] }, item.id));
200
+ })) }), _jsxs("div", { className: "command-footer", children: [_jsxs("span", { className: "command-footer-nav", children: [_jsx(Kbd, { children: "\u2191" }), _jsx(Kbd, { children: "\u2193" }), navigateLabel] }), _jsxs("button", { type: "button", className: "command-footer-action", disabled: !highlightedItem, onClick: () => runItem(highlightedItem), children: [_jsx("span", { className: "command-footer-action-label", children: highlightedItem?.label ?? selectLabel }), _jsx("span", { className: "command-footer-key", children: "\u21B5" })] })] })] }) }) })] }) }));
201
+ }
@@ -0,0 +1,44 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c, elevation as e } from "../../tokens/index.js";
3
+ const config = defineRecipe({
4
+ name: "command",
5
+ base: `display: contents; font-family: ${c.font.sans}
6
+ ; & .command-content, & .command-card { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
7
+ & .command-backdrop { position: fixed; inset: 0; z-index: 50; background: transparent; }
8
+ & .command-positioner { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${c.space["4"]} ${c.space["4"]}; }
9
+ & .command-content { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-width: 748px; max-height: 70vh; padding: ${c.space["1"]}; border-radius: ${c.radius["2xl"]}; background: color-mix(in srgb, ${c.bgOverlayFrost} 60%, transparent); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: ${e.modal}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
10
+ & .command-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${c.radius.xl}; background: ${c.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 8%, transparent); overflow: hidden; }
11
+ & .command-control { display: flex; align-items: center; gap: ${c.space["2.5"]}; height: 52px; flex-shrink: 0; padding: 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; color: ${c.fgMuted}; }
12
+ & .command-control svg { flex-shrink: 0; }
13
+ & .command-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: ${c.font.sans}; font-size: ${c.text.xl}; color: ${c.fgPrimary}; }
14
+ & .command-input::placeholder { color: ${c.fgMuted}; }
15
+ & .command-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]} ${c.space["2.5"]}; display: flex; flex-direction: column; gap: ${c.space.px}; }
16
+ & .command-empty { padding: ${c.space["8"]} ${c.space["3"]}; text-align: center; font-size: ${c.text.md}; color: ${c.fgMuted}; }
17
+ & .command-item { box-sizing: border-box; display: flex; align-items: center; gap: ${c.space["2"]}; height: 36px; padding-inline: ${c.space["2.5"]}; border-radius: ${c.radius.xl}; font-size: ${c.text.lg}; color: ${c.fgPrimary}; cursor: pointer; }
18
+ & .command-item svg { flex-shrink: 0; color: ${c.fgMuted}; }
19
+ & .command-item[data-highlighted] { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
20
+ & .command-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
21
+ & .command-item-shortcut { margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: ${c.space["0.5"]}; }
22
+ & .command-group-label { padding: ${c.space["2"]} ${c.space["2.5"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
23
+ & .command-list > .command-group-label:first-child { padding-top: ${c.space["1"]}; }
24
+ & .command-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 44px; padding: 0 ${c.space["2.5"]}; border-top: 1px solid ${c.borderSubtle}; }
25
+ & .command-footer-nav { display: flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
26
+ & .command-footer-action { display: flex; align-items: center; gap: ${c.space["2"]}; height: 28px; max-width: 60%; padding: 0 ${c.space["1"]} 0 ${c.space["2.5"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgBrandSolid}; color: ${c.fgOnBrand}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
27
+ & .command-footer-action:disabled { opacity: 0.5; cursor: default; }
28
+ & .command-footer-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
29
+ & .command-footer-key { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${c.text.xs}; }
30
+ `,
31
+ variants: {},
32
+ defaultVariants: {},
33
+ compoundVariants: [],
34
+ });
35
+ export const commandRecipe = Object.assign(resolveRecipe(config), {
36
+ config,
37
+ meta: {
38
+ content: {
39
+ maxWidth: "720px",
40
+ borderRadius: "16px",
41
+ },
42
+ },
43
+ });
44
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { Command, defaultCommandItems, } from "./command.js";
2
+ export { commandRecipe } from "./command.recipe.js";
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { entitycardRecipe } from "./entitycard.recipe.js";
3
+ /**
4
+ * A note / entity card — measured from Attio's Notes grid. A bordered white
5
+ * card with an author row, a title, a clamped excerpt, and a footer row with a
6
+ * right-aligned date. Rendered as a button so the whole card is clickable.
7
+ */
8
+ export function EntityCard({ author, title, excerpt, footer, date, onClick, "aria-label": ariaLabel, className, ...rest }) {
9
+ return (_jsxs("button", { type: "button", className: entitycardRecipe({ className }), ...rest, onClick: onClick, "aria-label": ariaLabel, children: [author != null && _jsx("span", { className: "entitycard-author", children: author }), _jsx("span", { className: "entitycard-title", children: title }), excerpt != null && _jsx("span", { className: "entitycard-excerpt", children: excerpt }), _jsx("span", { className: "entitycard-spacer" }), (footer != null || date != null) && (_jsxs("span", { className: "entitycard-foot", children: [footer, date != null && _jsx("span", { className: "entitycard-date", children: date })] }))] }));
10
+ }
11
+ EntityCard.displayName = "EntityCard";
@@ -0,0 +1,29 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A note / entity card — measured from Attio's Notes grid: a bordered white card
4
+ // with an author row (avatar + name) at the top, a title, a clamped excerpt,
5
+ // and a footer row (avatar + name … date). The whole card is clickable.
6
+ const config = defineRecipe({
7
+ name: "entitycard",
8
+ base: `display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start;
9
+ padding: ${c.space["3"]} ${c.space["4"]}; margin: 0; border: none; border-radius: ${c.radius.xl};
10
+ background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.borderSubtle}; color: ${c.fgPrimary};
11
+ font-family: ${c.font.sans}; cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease;
12
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
13
+
14
+ &:hover { box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
15
+ &:focus-visible { outline: 2px solid ${c.bgBrandSolid}; outline-offset: 2px; }
16
+
17
+ & .entitycard-author { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
18
+ & .entitycard-title { margin-top: ${c.space["2"]}; font-size: ${c.text.lg}; font-weight: ${c.weight.semibold}; letter-spacing: -0.1px; color: ${c.fgPrimary}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
19
+ & .entitycard-excerpt { margin-top: ${c.space["1"]}; font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
20
+ & .entitycard-spacer { flex: 1; min-height: ${c.space["3"]}; }
21
+ & .entitycard-foot { display: flex; align-items: center; gap: ${c.space["1.5"]}; padding-top: ${c.space["2.5"]}; margin-top: ${c.space["1"]}; border-top: 1px solid ${c.borderSubtle}; font-size: ${c.text.sm}; color: ${c.fgMuted}; }
22
+ & .entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${c.fgPrimary}; }
23
+ & .entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }`,
24
+ variants: {},
25
+ defaultVariants: {},
26
+ compoundVariants: [],
27
+ });
28
+ export const entitycardRecipe = resolveRecipe(config);
29
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { EntityCard } from "./entitycard.js";
2
+ export { entitycardRecipe } from "./entitycard.recipe.js";
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Minus, Plus } from "lucide-react";
3
+ import * as React from "react";
4
+ import { flowcanvasRecipe } from "./flowcanvas.recipe.js";
5
+ const GRID = 20;
6
+ const clampZoom = (z) => Math.min(1.5, Math.max(0.5, z));
7
+ /**
8
+ * A pannable, zoomable node canvas with draggable nodes and connecting edges —
9
+ * measured from Attio's Workflows editor. Drag a node to move it (fires
10
+ * `onNodesChange`); drag the background to pan; use the toolbar to zoom.
11
+ */
12
+ export function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth = 240, nodeHeight = 64, "aria-label": ariaLabel, className, zoomOutLabel = "Zoom out", zoomInLabel = "Zoom in", resetLabel = "Reset", edgesLabel = "Edges", }) {
13
+ const [pan, setPan] = React.useState({ x: 40, y: 40 });
14
+ const [zoom, setZoom] = React.useState(1);
15
+ const [panning, setPanning] = React.useState(false);
16
+ const drag = React.useRef(null);
17
+ const byId = React.useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes]);
18
+ const onNodePointerDown = (e, node) => {
19
+ e.stopPropagation();
20
+ e.target.setPointerCapture?.(e.pointerId);
21
+ drag.current = {
22
+ id: node.id,
23
+ startX: e.clientX,
24
+ startY: e.clientY,
25
+ nodeX: node.x,
26
+ nodeY: node.y,
27
+ };
28
+ };
29
+ const onBackgroundPointerDown = (e) => {
30
+ e.currentTarget.setPointerCapture?.(e.pointerId);
31
+ setPanning(true);
32
+ drag.current = {
33
+ pan: true,
34
+ startX: e.clientX,
35
+ startY: e.clientY,
36
+ panX: pan.x,
37
+ panY: pan.y,
38
+ };
39
+ };
40
+ const onPointerMove = (e) => {
41
+ const d = drag.current;
42
+ if (!d)
43
+ return;
44
+ if ("pan" in d) {
45
+ setPan({
46
+ x: d.panX + (e.clientX - d.startX),
47
+ y: d.panY + (e.clientY - d.startY),
48
+ });
49
+ }
50
+ else {
51
+ const dx = (e.clientX - d.startX) / zoom;
52
+ const dy = (e.clientY - d.startY) / zoom;
53
+ onNodesChange?.(nodes.map((n) => n.id === d.id ? { ...n, x: d.nodeX + dx, y: d.nodeY + dy } : n));
54
+ }
55
+ };
56
+ const onPointerUp = () => {
57
+ drag.current = null;
58
+ setPanning(false);
59
+ };
60
+ return (_jsxs("div", { className: flowcanvasRecipe({ className }), "data-panning": panning ? "" : undefined, style: {
61
+ backgroundSize: `${GRID * zoom}px ${GRID * zoom}px`,
62
+ backgroundPosition: `${pan.x}px ${pan.y}px`,
63
+ }, role: "application", "aria-label": ariaLabel ?? "Flow canvas", onPointerDown: onBackgroundPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [_jsxs("div", { className: "flowcanvas-viewport", style: {
64
+ transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom})`,
65
+ }, children: [_jsxs("svg", { className: "flowcanvas-edges", "aria-hidden": "true", children: [_jsx("title", { children: edgesLabel }), edges.map((edge) => {
66
+ const a = byId.get(edge.from);
67
+ const b = byId.get(edge.to);
68
+ if (!a || !b)
69
+ return null;
70
+ const sx = a.x + nodeWidth;
71
+ const sy = a.y + nodeHeight / 2;
72
+ const tx = b.x;
73
+ const ty = b.y + nodeHeight / 2;
74
+ const c = Math.max(30, Math.abs(tx - sx) / 2);
75
+ return (_jsxs("g", { children: [_jsx("path", { className: "flowcanvas-edge", d: `M ${sx} ${sy} C ${sx + c} ${sy}, ${tx - c} ${ty}, ${tx} ${ty}` }), _jsx("circle", { className: "flowcanvas-edge-dot", cx: sx, cy: sy, r: 3 }), _jsx("circle", { className: "flowcanvas-edge-dot", cx: tx, cy: ty, r: 3 })] }, `${edge.from}-${edge.to}`));
76
+ })] }), nodes.map((node) => (_jsx("div", { className: "flowcanvas-node", "data-dragging": drag.current &&
77
+ "id" in drag.current &&
78
+ drag.current.id === node.id
79
+ ? ""
80
+ : undefined, style: { left: node.x, top: node.y, width: nodeWidth }, onPointerDown: (e) => onNodePointerDown(e, node), children: renderNode(node) }, node.id)))] }), _jsxs("div", { className: "flowcanvas-toolbar", children: [_jsx("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomOutLabel, onClick: () => setZoom((z) => clampZoom(z - 0.1)), children: _jsx(Minus, { size: 16, strokeWidth: 2 }) }), _jsxs("span", { className: "flowcanvas-tool flowcanvas-tool-zoom", "aria-live": "polite", children: [Math.round(zoom * 100), "%"] }), _jsx("button", { type: "button", className: "flowcanvas-tool", "aria-label": zoomInLabel, onClick: () => setZoom((z) => clampZoom(z + 0.1)), children: _jsx(Plus, { size: 16, strokeWidth: 2 }) }), _jsx("span", { className: "flowcanvas-tool-sep" }), _jsx("button", { type: "button", className: "flowcanvas-tool", onClick: () => {
81
+ setZoom(1);
82
+ setPan({ x: 40, y: 40 });
83
+ }, children: resetLabel })] })] }));
84
+ }
85
+ FlowCanvas.displayName = "FlowCanvas";
@@ -0,0 +1,25 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A pannable, zoomable node canvas — measured from Attio's Workflows editor:
4
+ // a dotted-grid background, draggable node cards, and connecting edges with dots.
5
+ const config = defineRecipe({
6
+ name: "flowcanvas",
7
+ base: `position: relative; overflow: hidden; box-sizing: border-box; width: 100%; height: 100%; background-color: ${c.bgSurface}; background-image: radial-gradient(circle, color-mix(in srgb, ${c.fgPrimary} 14%, transparent) 1px, transparent 1px); font-family: ${c.font.sans}; cursor: grab; touch-action: none; user-select: none;
8
+ &[data-panning] { cursor: grabbing; }
9
+ & .flowcanvas-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
10
+ & .flowcanvas-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
11
+ & .flowcanvas-edge { fill: none; stroke: color-mix(in srgb, ${c.fgPrimary} 28%, transparent); stroke-width: 1.5; }
12
+ & .flowcanvas-edge-dot { fill: ${c.bgBrandSolid}; }
13
+ & .flowcanvas-node { position: absolute; cursor: grab; }
14
+ & .flowcanvas-node[data-dragging] { cursor: grabbing; z-index: 10; }
15
+ & .flowcanvas-toolbar { position: absolute; bottom: ${c.space["4"]}; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: ${c.space["1"]}; padding: ${c.space["1"]}; border-radius: ${c.radius.lg}; background: ${c.bgRaised}; box-shadow: inset 0 0 0 1px ${c.borderDefault}, 0 4px 14px -4px rgba(28,40,64,0.16); }
16
+ & .flowcanvas-tool { display: inline-flex; align-items: center; justify-content: center; gap: ${c.space["1"]}; height: 30px; min-width: 30px; padding: 0 ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; cursor: pointer; }
17
+ & .flowcanvas-tool:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
18
+ & .flowcanvas-tool-zoom { min-width: 48px; }
19
+ & .flowcanvas-tool-sep { width: 1px; height: 18px; background: ${c.borderSubtle}; }`,
20
+ variants: {},
21
+ defaultVariants: {},
22
+ compoundVariants: [],
23
+ });
24
+ export const flowcanvasRecipe = resolveRecipe(config);
25
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { FlowCanvas, } from "./flowcanvas.js";
2
+ export { flowcanvasRecipe } from "./flowcanvas.recipe.js";
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Bell } from "lucide-react";
3
+ import { inboxRecipe } from "./inbox.recipe.js";
4
+ /**
5
+ * A notifications inbox panel — measured from Attio's notification flyout. A
6
+ * title, Notifications/Requests tabs with counts, then notification rows
7
+ * (avatar + message + time + unread dot) or a centred empty state. Put it inside
8
+ * a Popover for the flyout.
9
+ */
10
+ export function Inbox({ notifications = [], title = "Notifications", tabs, activeTab, onTabChange, emptyTitle = "No notifications", emptySubtitle = "Notifications such as mentions and important updates will be displayed here.", emptyAction, className, }) {
11
+ return (_jsxs("div", { className: inboxRecipe({ className }), children: [_jsxs("div", { className: "inbox-head", children: [_jsx("div", { className: "inbox-title", children: title }), tabs && tabs.length > 0 && (_jsx("div", { className: "inbox-tabs", role: "tablist", children: tabs.map((t) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": t.id === activeTab, className: "inbox-tab", "data-active": t.id === activeTab ? "" : undefined, onClick: () => onTabChange?.(t.id), children: [t.label, t.count != null && (_jsxs("span", { className: "inbox-tab-count", children: ["(", t.count, ")"] }))] }, t.id))) }))] }), notifications.length === 0 ? (_jsxs("div", { className: "inbox-empty", children: [_jsx("span", { className: "inbox-empty-icon", children: _jsx(Bell, { size: 40, strokeWidth: 1.25 }) }), _jsx("div", { className: "inbox-empty-title", children: emptyTitle }), emptySubtitle != null && (_jsx("div", { className: "inbox-empty-sub", children: emptySubtitle })), emptyAction != null && (_jsx("div", { className: "inbox-empty-action", children: emptyAction }))] })) : (_jsx("div", { className: "inbox-list", children: notifications.map((n) => (_jsxs("button", { type: "button", className: "inbox-row", onClick: n.onClick, children: [n.avatar != null && (_jsx("span", { className: "inbox-row-avatar", children: n.avatar })), _jsxs("span", { className: "inbox-row-body", children: [_jsx("span", { className: "inbox-row-msg", children: n.message }), n.time != null && (_jsx("span", { className: "inbox-row-time", children: n.time }))] }), n.unread && _jsx("span", { className: "inbox-row-unread" })] }, n.id))) }))] }));
12
+ }
13
+ Inbox.displayName = "Inbox";
@@ -0,0 +1,43 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // A notifications inbox panel — measured from Attio's notification flyout: a
4
+ // ~380px rounded panel with a title, "Notifications / Requests" tabs (with
5
+ // counts), then notification rows (avatar + message + time + unread dot) or a
6
+ // centred empty state. Drop it in a Popover for the flyout, or use standalone.
7
+ const config = defineRecipe({
8
+ name: "inbox",
9
+ base: `display: flex; flex-direction: column; box-sizing: border-box; width: 380px; max-height: 588px;
10
+ border-radius: ${c.radius.xl}; background: ${c.bgSurface}; font-family: ${c.font.sans}; overflow: hidden;
11
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 6%, transparent), 0 8px 28px -6px rgba(28,40,64,0.16), 0 2px 6px -2px rgba(28,40,64,0.10);
12
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
13
+
14
+ & .inbox-head { padding: ${c.space["3"]} ${c.space["3"]} 0; }
15
+ & .inbox-title { font-size: ${c.text.xl}; line-height: 28px; font-weight: ${c.weight.semibold}; letter-spacing: -0.3px; color: ${c.fgPrimary}; }
16
+ & .inbox-tabs { display: flex; gap: ${c.space["3"]}; margin-top: ${c.space["2"]}; box-shadow: inset 0 -1px 0 ${c.borderSubtle}; }
17
+ & .inbox-tab { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: 32px; padding: 0 2px; margin: 0; border: none; background: none; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
18
+ & .inbox-tab:hover { color: ${c.fgPrimary}; }
19
+ & .inbox-tab[data-active] { color: ${c.bgBrandSolid}; box-shadow: inset 0 -2px 0 ${c.bgBrandSolid}; }
20
+ & .inbox-tab-count { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
21
+ & .inbox-tab[data-active] .inbox-tab-count { color: ${c.bgBrandSolid}; }
22
+
23
+ & .inbox-list { flex: 1; min-height: 0; overflow-y: auto; padding: ${c.space["1"]}; display: flex; flex-direction: column; gap: 1px; }
24
+ & .inbox-row { display: flex; align-items: flex-start; gap: ${c.space["2.5"]}; padding: ${c.space["2"]} ${c.space["2"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: none; font-family: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
25
+ & .inbox-row:hover { background: ${c.bgRaised}; }
26
+ & .inbox-row-avatar { flex-shrink: 0; margin-top: 1px; }
27
+ & .inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
28
+ & .inbox-row-msg { font-size: ${c.text.lg}; line-height: 18px; color: ${c.fgPrimary}; }
29
+ & .inbox-row-msg b { font-weight: ${c.weight.semibold}; }
30
+ & .inbox-row-time { font-size: ${c.text.sm}; color: ${c.fgMuted}; }
31
+ & .inbox-row-unread { flex-shrink: 0; width: 8px; height: 8px; margin-top: ${c.space["1"]}; border-radius: ${c.radius.full}; background: ${c.bgBrandSolid}; }
32
+
33
+ & .inbox-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: ${c.space["1"]}; padding: ${c.space["6"]} ${c.space["4"]}; text-align: center; }
34
+ & .inbox-empty-icon { display: inline-flex; margin-bottom: ${c.space["2"]}; color: color-mix(in srgb, ${c.fgPrimary} 22%, transparent); }
35
+ & .inbox-empty-title { font-size: ${c.text.xl}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
36
+ & .inbox-empty-sub { font-size: ${c.text.md}; line-height: 18px; color: ${c.fgMuted}; max-width: 260px; }
37
+ & .inbox-empty-action { margin-top: ${c.space["2"]}; }`,
38
+ variants: {},
39
+ defaultVariants: {},
40
+ compoundVariants: [],
41
+ });
42
+ export const inboxRecipe = resolveRecipe(config);
43
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { Inbox, } from "./inbox.js";
2
+ export { inboxRecipe } from "./inbox.recipe.js";
@@ -0,0 +1,2 @@
1
+ export { ListPage, ListRow, } from "./listpage.js";
2
+ export { listpageRecipe } from "./listpage.recipe.js";
@@ -0,0 +1,21 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { listpageRecipe } from "./listpage.recipe.js";
3
+ /** A single list row wrapper (52px, hover, top border). Compose cells inside.
4
+ * Renders a real `<button>` when `onClick` is given, else a plain row. */
5
+ export function ListRow({ children, onClick, }) {
6
+ if (onClick) {
7
+ return (_jsx("button", { type: "button", className: "listpage-row", onClick: onClick, children: children }));
8
+ }
9
+ return _jsx("div", { className: "listpage-row", children: children });
10
+ }
11
+ /**
12
+ * The entity-list page shell — measured from Attio's Reports/Sequences/Tasks/
13
+ * Notes list views. A view-bar toolbar (leading/trailing slots + record count),
14
+ * an optional dashed Favorites region, then column headers and time-grouped
15
+ * rows. Rows are composed by the caller (wrap each in <ListRow>).
16
+ */
17
+ export function ListPage({ leading, trailing, count, favorites, favoritesLabel = "Favorites", columns, groups, emptyLabel = "Nothing here yet", className, }) {
18
+ const total = groups?.reduce((s, g) => s + g.rows.length, 0) ?? 0;
19
+ return (_jsxs("div", { className: listpageRecipe({ className }), children: [_jsxs("div", { className: "listpage-toolbar", children: [_jsx("div", { className: "listpage-toolbar-lead", children: leading }), count != null && _jsx("div", { className: "listpage-count", children: count }), trailing != null && (_jsx("div", { className: "listpage-toolbar-trail", children: trailing }))] }), _jsxs("div", { className: "listpage-body", children: [favorites != null && (_jsxs(_Fragment, { children: [_jsx("div", { className: "listpage-section-label", children: favoritesLabel }), _jsx("div", { className: "listpage-favorites", "data-dashed": "", children: favorites })] })), columns && columns.length > 0 && (_jsx("div", { className: "listpage-colhead", children: columns.map((col, i) => (_jsxs("span", { className: "listpage-colhead-cell", children: [col.icon, col.label] }, i))) })), total === 0 && !groups?.length ? (_jsx("div", { className: "listpage-empty", children: emptyLabel })) : (groups?.map((g) => (_jsxs("div", { children: [_jsxs("div", { className: "listpage-group", children: [g.label, g.count != null && (_jsx("span", { className: "listpage-group-count", children: g.count }))] }), g.rows] }, g.id))))] })] }));
20
+ }
21
+ ListPage.displayName = "ListPage";