@crisp-ui-kit/crisp 0.5.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 (472) hide show
  1. package/README.md +14 -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/board.css +9 -1
  10. package/dist/bulkbar.css +11 -3
  11. package/dist/button.css +15 -1
  12. package/dist/button.d.ts +2 -1
  13. package/dist/card.css +8 -0
  14. package/dist/checkbox.css +17 -1
  15. package/dist/cjs/components/accordion/accordion.js +69 -0
  16. package/dist/cjs/components/accordion/accordion.recipe.js +26 -0
  17. package/dist/cjs/components/accordion/index.js +7 -0
  18. package/dist/cjs/components/avatar/avatar.js +44 -0
  19. package/dist/cjs/components/avatar/avatar.recipe.js +42 -0
  20. package/dist/cjs/components/avatar/index.js +7 -0
  21. package/dist/cjs/components/avatargroup/avatargroup.js +52 -0
  22. package/dist/cjs/components/avatargroup/avatargroup.recipe.js +18 -0
  23. package/dist/cjs/components/avatargroup/index.js +7 -0
  24. package/dist/cjs/components/badge/badge.js +44 -0
  25. package/dist/cjs/components/badge/badge.recipe.js +68 -0
  26. package/dist/cjs/components/badge/index.js +7 -0
  27. package/dist/cjs/components/barchart/barchart.js +45 -0
  28. package/dist/cjs/components/barchart/barchart.recipe.js +34 -0
  29. package/dist/cjs/components/barchart/index.js +7 -0
  30. package/dist/cjs/components/breadcrumb/breadcrumb.js +53 -0
  31. package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +21 -0
  32. package/dist/cjs/components/breadcrumb/index.js +7 -0
  33. package/dist/cjs/components/bulkbar/bulkbar.js +53 -0
  34. package/dist/cjs/components/bulkbar/bulkbar.recipe.js +31 -0
  35. package/dist/cjs/components/bulkbar/index.js +8 -0
  36. package/dist/cjs/components/button/button.js +62 -0
  37. package/dist/cjs/components/button/button.recipe.js +58 -0
  38. package/dist/cjs/components/button/index.js +7 -0
  39. package/dist/cjs/components/callout/callout.js +25 -0
  40. package/dist/cjs/components/callout/callout.recipe.js +29 -0
  41. package/dist/cjs/components/callout/index.js +7 -0
  42. package/dist/cjs/components/card/card.js +54 -0
  43. package/dist/cjs/components/card/card.recipe.js +31 -0
  44. package/dist/cjs/components/card/index.js +10 -0
  45. package/dist/cjs/components/checkbox/checkbox.js +56 -0
  46. package/dist/cjs/components/checkbox/checkbox.recipe.js +34 -0
  47. package/dist/cjs/components/checkbox/index.js +7 -0
  48. package/dist/cjs/components/columncalc/columncalc.js +139 -0
  49. package/dist/cjs/components/columncalc/columncalc.recipe.js +33 -0
  50. package/dist/cjs/components/columncalc/index.js +10 -0
  51. package/dist/cjs/components/contextmenu/contextmenu.js +78 -0
  52. package/dist/cjs/components/contextmenu/contextmenu.recipe.js +24 -0
  53. package/dist/cjs/components/contextmenu/index.js +7 -0
  54. package/dist/cjs/components/datatable/datatable.js +508 -0
  55. package/dist/cjs/components/datatable/datatable.recipe.js +113 -0
  56. package/dist/cjs/components/datatable/index.js +7 -0
  57. package/dist/cjs/components/datepicker/datepicker.js +153 -0
  58. package/dist/cjs/components/datepicker/datepicker.recipe.js +180 -0
  59. package/dist/cjs/components/datepicker/index.js +19 -0
  60. package/dist/cjs/components/datepickerfield/datepickerfield.js +85 -0
  61. package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +44 -0
  62. package/dist/cjs/components/datepickerfield/index.js +7 -0
  63. package/dist/cjs/components/dialog/dialog.js +86 -0
  64. package/dist/cjs/components/dialog/dialog.recipe.js +35 -0
  65. package/dist/cjs/components/dialog/index.js +9 -0
  66. package/dist/cjs/components/divider/divider.js +10 -0
  67. package/dist/cjs/components/divider/divider.recipe.js +17 -0
  68. package/dist/cjs/components/divider/index.js +7 -0
  69. package/dist/cjs/components/donutchart/donutchart.js +41 -0
  70. package/dist/cjs/components/donutchart/donutchart.recipe.js +30 -0
  71. package/dist/cjs/components/donutchart/index.js +7 -0
  72. package/dist/cjs/components/drawer/drawer.js +80 -0
  73. package/dist/cjs/components/drawer/drawer.recipe.js +30 -0
  74. package/dist/cjs/components/drawer/index.js +9 -0
  75. package/dist/cjs/components/emptystate/emptystate.js +10 -0
  76. package/dist/cjs/components/emptystate/emptystate.recipe.js +34 -0
  77. package/dist/cjs/components/emptystate/index.js +7 -0
  78. package/dist/cjs/components/formfield/formfield.js +50 -0
  79. package/dist/cjs/components/formfield/formfield.recipe.js +22 -0
  80. package/dist/cjs/components/formfield/index.js +7 -0
  81. package/dist/cjs/components/input/index.js +7 -0
  82. package/dist/cjs/components/input/input.js +47 -0
  83. package/dist/cjs/components/input/input.recipe.js +59 -0
  84. package/dist/cjs/components/kbd/index.js +7 -0
  85. package/dist/cjs/components/kbd/kbd.js +44 -0
  86. package/dist/cjs/components/kbd/kbd.recipe.js +23 -0
  87. package/dist/cjs/components/linechart/index.js +7 -0
  88. package/dist/cjs/components/linechart/linechart.js +57 -0
  89. package/dist/cjs/components/linechart/linechart.recipe.js +35 -0
  90. package/dist/cjs/components/menu/index.js +14 -0
  91. package/dist/cjs/components/menu/menu-keyboard.js +117 -0
  92. package/dist/cjs/components/menu/menu.js +144 -0
  93. package/dist/cjs/components/menu/menu.recipe.js +54 -0
  94. package/dist/cjs/components/multiselect/index.js +7 -0
  95. package/dist/cjs/components/multiselect/multiselect.js +161 -0
  96. package/dist/cjs/components/multiselect/multiselect.recipe.js +71 -0
  97. package/dist/cjs/components/popover/index.js +7 -0
  98. package/dist/cjs/components/popover/popover.js +106 -0
  99. package/dist/cjs/components/popover/popover.recipe.js +21 -0
  100. package/dist/cjs/components/progress/index.js +7 -0
  101. package/dist/cjs/components/progress/progress.js +26 -0
  102. package/dist/cjs/components/progress/progress.recipe.js +20 -0
  103. package/dist/cjs/components/radiogroup/index.js +8 -0
  104. package/dist/cjs/components/radiogroup/radiogroup.js +83 -0
  105. package/dist/cjs/components/radiogroup/radiogroup.recipe.js +40 -0
  106. package/dist/cjs/components/resizablepanel/index.js +12 -0
  107. package/dist/cjs/components/resizablepanel/resizablepanel.js +176 -0
  108. package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +69 -0
  109. package/dist/cjs/components/segmented/index.js +7 -0
  110. package/dist/cjs/components/segmented/segmented.js +95 -0
  111. package/dist/cjs/components/segmented/segmented.recipe.js +23 -0
  112. package/dist/cjs/components/select/index.js +7 -0
  113. package/dist/cjs/components/select/select.js +180 -0
  114. package/dist/cjs/components/select/select.recipe.js +79 -0
  115. package/dist/cjs/components/skeleton/index.js +7 -0
  116. package/dist/cjs/components/skeleton/skeleton.js +13 -0
  117. package/dist/cjs/components/skeleton/skeleton.recipe.js +17 -0
  118. package/dist/cjs/components/spinner/index.js +7 -0
  119. package/dist/cjs/components/spinner/spinner.js +15 -0
  120. package/dist/cjs/components/spinner/spinner.recipe.js +16 -0
  121. package/dist/cjs/components/stagebar/index.js +7 -0
  122. package/dist/cjs/components/stagebar/stagebar.js +26 -0
  123. package/dist/cjs/components/stagebar/stagebar.recipe.js +17 -0
  124. package/dist/cjs/components/statcard/index.js +7 -0
  125. package/dist/cjs/components/statcard/statcard.js +15 -0
  126. package/dist/cjs/components/statcard/statcard.recipe.js +37 -0
  127. package/dist/cjs/components/switch/index.js +7 -0
  128. package/dist/cjs/components/switch/switch.js +58 -0
  129. package/dist/cjs/components/switch/switch.recipe.js +29 -0
  130. package/dist/cjs/components/table/index.js +14 -0
  131. package/dist/cjs/components/table/table.js +66 -0
  132. package/dist/cjs/components/table/table.recipe.js +43 -0
  133. package/dist/cjs/components/tabletoolbar/index.js +20 -0
  134. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +84 -0
  135. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +237 -0
  136. package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +26 -0
  137. package/dist/cjs/components/tabs/index.js +7 -0
  138. package/dist/cjs/components/tabs/tabs.js +106 -0
  139. package/dist/cjs/components/tabs/tabs.recipe.js +36 -0
  140. package/dist/cjs/components/textarea/index.js +7 -0
  141. package/dist/cjs/components/textarea/textarea.js +56 -0
  142. package/dist/cjs/components/textarea/textarea.recipe.js +46 -0
  143. package/dist/cjs/components/toast/index.js +8 -0
  144. package/dist/cjs/components/toast/toast.js +95 -0
  145. package/dist/cjs/components/toast/toast.recipe.js +31 -0
  146. package/dist/cjs/components/tooltip/index.js +7 -0
  147. package/dist/cjs/components/tooltip/tooltip.js +95 -0
  148. package/dist/cjs/components/tooltip/tooltip.recipe.js +16 -0
  149. package/dist/cjs/components/wheelpicker/index.js +7 -0
  150. package/dist/cjs/components/wheelpicker/wheelpicker.js +134 -0
  151. package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +95 -0
  152. package/dist/cjs/core/cx.js +8 -0
  153. package/dist/cjs/core/define.js +6 -0
  154. package/dist/cjs/core/index.js +11 -0
  155. package/dist/cjs/core/primitive.js +49 -0
  156. package/dist/cjs/core/resolve.js +44 -0
  157. package/dist/cjs/core/types.js +2 -0
  158. package/dist/cjs/index.js +92 -0
  159. package/dist/cjs/package.json +3 -0
  160. package/dist/cjs/product/appshell/appshell.js +104 -0
  161. package/dist/cjs/product/appshell/appshell.recipe.js +30 -0
  162. package/dist/cjs/product/appshell/index.js +7 -0
  163. package/dist/cjs/product/authshell/authshell.js +21 -0
  164. package/dist/cjs/product/authshell/authshell.recipe.js +67 -0
  165. package/dist/cjs/product/authshell/index.js +7 -0
  166. package/dist/cjs/product/board/board.js +78 -0
  167. package/dist/cjs/product/board/board.recipe.js +31 -0
  168. package/dist/cjs/product/board/index.js +7 -0
  169. package/dist/cjs/product/command/command.js +238 -0
  170. package/dist/cjs/product/command/command.recipe.js +47 -0
  171. package/dist/cjs/product/command/index.js +8 -0
  172. package/dist/cjs/product/entitycard/entitycard.js +14 -0
  173. package/dist/cjs/product/entitycard/entitycard.recipe.js +32 -0
  174. package/dist/cjs/product/entitycard/index.js +7 -0
  175. package/dist/cjs/product/flowcanvas/flowcanvas.js +121 -0
  176. package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +28 -0
  177. package/dist/cjs/product/flowcanvas/index.js +7 -0
  178. package/dist/cjs/product/inbox/inbox.js +16 -0
  179. package/dist/cjs/product/inbox/inbox.recipe.js +46 -0
  180. package/dist/cjs/product/inbox/index.js +7 -0
  181. package/dist/cjs/product/listpage/index.js +8 -0
  182. package/dist/cjs/product/listpage/listpage.js +25 -0
  183. package/dist/cjs/product/listpage/listpage.recipe.js +46 -0
  184. package/dist/cjs/product/navitem/index.js +5 -0
  185. package/dist/cjs/product/navitem/navitem.js +44 -0
  186. package/dist/cjs/product/navitem/navitem.recipe.js +36 -0
  187. package/dist/cjs/product/onboarding/index.js +7 -0
  188. package/dist/cjs/product/onboarding/onboarding.js +17 -0
  189. package/dist/cjs/product/onboarding/onboarding.recipe.js +44 -0
  190. package/dist/cjs/product/recordpage/index.js +7 -0
  191. package/dist/cjs/product/recordpage/recordpage.js +409 -0
  192. package/dist/cjs/product/recordpage/recordpage.recipe.js +162 -0
  193. package/dist/cjs/product/recordpanel/index.js +7 -0
  194. package/dist/cjs/product/recordpanel/recordpanel.js +83 -0
  195. package/dist/cjs/product/recordpanel/recordpanel.recipe.js +51 -0
  196. package/dist/cjs/product/recordstable/company-logos.js +29 -0
  197. package/dist/cjs/product/recordstable/index.js +10 -0
  198. package/dist/cjs/product/recordstable/recordstable.js +1092 -0
  199. package/dist/cjs/product/recordstable/recordstable.recipe.js +152 -0
  200. package/dist/cjs/product/recordstable/recordstable.tag.js +21 -0
  201. package/dist/cjs/product/richtext/index.js +7 -0
  202. package/dist/cjs/product/richtext/richtext.js +147 -0
  203. package/dist/cjs/product/richtext/richtext.recipe.js +43 -0
  204. package/dist/cjs/product/settingssection/index.js +7 -0
  205. package/dist/cjs/product/settingssection/settingssection.js +14 -0
  206. package/dist/cjs/product/settingssection/settingssection.recipe.js +23 -0
  207. package/dist/cjs/product/settingsshell/index.js +7 -0
  208. package/dist/cjs/product/settingsshell/settingsshell.js +59 -0
  209. package/dist/cjs/product/settingsshell/settingsshell.recipe.js +46 -0
  210. package/dist/cjs/product/sidebar/index.js +13 -0
  211. package/dist/cjs/product/sidebar/sidebar.js +148 -0
  212. package/dist/cjs/product/sidebar/sidebar.recipe.js +46 -0
  213. package/dist/cjs/product/tasklist/index.js +7 -0
  214. package/dist/cjs/product/tasklist/tasklist.js +19 -0
  215. package/dist/cjs/product/tasklist/tasklist.recipe.js +38 -0
  216. package/dist/cjs/product/trialbanner/index.js +7 -0
  217. package/dist/cjs/product/trialbanner/trialbanner.js +13 -0
  218. package/dist/cjs/product/trialbanner/trialbanner.recipe.js +32 -0
  219. package/dist/cjs/product/viewtoggle/index.js +7 -0
  220. package/dist/cjs/product/viewtoggle/viewtoggle.js +55 -0
  221. package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +27 -0
  222. package/dist/cjs/tokens/contract.js +21 -0
  223. package/dist/cjs/tokens/elevation.js +47 -0
  224. package/dist/cjs/tokens/index.js +18 -0
  225. package/dist/cjs/tokens/palette.js +63 -0
  226. package/dist/cjs/tokens/scale.js +70 -0
  227. package/dist/cjs/tokens/semantic.js +57 -0
  228. package/dist/columncalc.css +26 -0
  229. package/dist/columncalc.d.ts +7 -0
  230. package/dist/command.css +34 -1
  231. package/dist/contextmenu.css +10 -2
  232. package/dist/datatable.css +60 -14
  233. package/dist/datepicker.css +165 -19
  234. package/dist/datepicker.d.ts +2 -2
  235. package/dist/datepickerfield.css +27 -0
  236. package/dist/datepickerfield.d.ts +7 -0
  237. package/dist/dialog.css +10 -2
  238. package/dist/donutchart.css +8 -0
  239. package/dist/drawer.css +13 -5
  240. package/dist/entitycard.css +10 -2
  241. package/dist/esm/components/accordion/accordion.js +17 -16
  242. package/dist/esm/components/accordion/accordion.recipe.js +1 -1
  243. package/dist/esm/components/avatargroup/avatargroup.js +2 -2
  244. package/dist/esm/components/avatargroup/avatargroup.recipe.js +2 -2
  245. package/dist/esm/components/badge/badge.recipe.js +4 -4
  246. package/dist/esm/components/barchart/barchart.js +15 -2
  247. package/dist/esm/components/barchart/barchart.recipe.js +10 -5
  248. package/dist/esm/components/breadcrumb/breadcrumb.js +2 -2
  249. package/dist/esm/components/bulkbar/bulkbar.js +2 -2
  250. package/dist/esm/components/bulkbar/bulkbar.recipe.js +4 -4
  251. package/dist/esm/components/button/button.js +13 -2
  252. package/dist/esm/components/button/button.recipe.js +20 -4
  253. package/dist/esm/components/callout/callout.js +2 -2
  254. package/dist/esm/components/checkbox/checkbox.recipe.js +9 -1
  255. package/dist/esm/components/columncalc/columncalc.js +100 -0
  256. package/dist/esm/components/columncalc/columncalc.recipe.js +30 -0
  257. package/dist/esm/components/columncalc/index.js +1 -0
  258. package/dist/esm/components/contextmenu/contextmenu.recipe.js +4 -4
  259. package/dist/esm/components/datatable/datatable.js +276 -49
  260. package/dist/esm/components/datatable/datatable.recipe.js +54 -16
  261. package/dist/esm/components/datepicker/datepicker.js +104 -53
  262. package/dist/esm/components/datepicker/datepicker.recipe.js +170 -25
  263. package/dist/esm/components/datepicker/index.js +1 -1
  264. package/dist/esm/components/datepickerfield/datepickerfield.js +49 -0
  265. package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +41 -0
  266. package/dist/esm/components/datepickerfield/index.js +2 -0
  267. package/dist/esm/components/dialog/dialog.js +2 -2
  268. package/dist/esm/components/dialog/dialog.recipe.js +4 -4
  269. package/dist/esm/components/divider/divider.js +2 -2
  270. package/dist/esm/components/donutchart/donutchart.js +2 -2
  271. package/dist/esm/components/drawer/drawer.js +2 -2
  272. package/dist/esm/components/drawer/drawer.recipe.js +6 -6
  273. package/dist/esm/components/emptystate/emptystate.js +2 -2
  274. package/dist/esm/components/formfield/formfield.js +2 -2
  275. package/dist/esm/components/input/input.js +6 -3
  276. package/dist/esm/components/input/input.recipe.js +38 -5
  277. package/dist/esm/components/linechart/linechart.js +15 -2
  278. package/dist/esm/components/linechart/linechart.recipe.js +10 -5
  279. package/dist/esm/components/menu/index.js +1 -0
  280. package/dist/esm/components/menu/menu-keyboard.js +80 -0
  281. package/dist/esm/components/menu/menu.js +27 -60
  282. package/dist/esm/components/menu/menu.recipe.js +5 -5
  283. package/dist/esm/components/multiselect/multiselect.js +10 -3
  284. package/dist/esm/components/multiselect/multiselect.recipe.js +8 -8
  285. package/dist/esm/components/popover/popover.js +2 -2
  286. package/dist/esm/components/popover/popover.recipe.js +2 -2
  287. package/dist/esm/components/progress/progress.js +3 -3
  288. package/dist/esm/components/radiogroup/radiogroup.js +2 -2
  289. package/dist/esm/components/radiogroup/radiogroup.recipe.js +1 -1
  290. package/dist/esm/components/resizablepanel/index.js +2 -0
  291. package/dist/esm/components/resizablepanel/resizablepanel.js +135 -0
  292. package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +66 -0
  293. package/dist/esm/components/segmented/segmented.js +2 -2
  294. package/dist/esm/components/select/select.js +2 -2
  295. package/dist/esm/components/select/select.recipe.js +6 -6
  296. package/dist/esm/components/skeleton/skeleton.js +5 -2
  297. package/dist/esm/components/spinner/spinner.js +3 -2
  298. package/dist/esm/components/stagebar/stagebar.js +2 -2
  299. package/dist/esm/components/statcard/statcard.js +2 -2
  300. package/dist/esm/components/table/table.recipe.js +6 -6
  301. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +3 -3
  302. package/dist/esm/components/tabletoolbar/tabletoolbar.js +21 -13
  303. package/dist/esm/components/tabs/tabs.js +2 -2
  304. package/dist/esm/components/tabs/tabs.recipe.js +4 -4
  305. package/dist/esm/components/textarea/textarea.js +5 -5
  306. package/dist/esm/components/textarea/textarea.recipe.js +16 -4
  307. package/dist/esm/components/toast/toast.js +4 -4
  308. package/dist/esm/components/toast/toast.recipe.js +2 -2
  309. package/dist/esm/components/tooltip/tooltip.js +21 -7
  310. package/dist/esm/components/wheelpicker/index.js +2 -0
  311. package/dist/esm/components/wheelpicker/wheelpicker.js +98 -0
  312. package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +92 -0
  313. package/dist/esm/index.js +5 -0
  314. package/dist/esm/product/appshell/appshell.js +33 -9
  315. package/dist/esm/product/appshell/appshell.recipe.js +4 -4
  316. package/dist/esm/product/authshell/authshell.js +18 -0
  317. package/dist/esm/product/authshell/authshell.recipe.js +64 -0
  318. package/dist/esm/product/authshell/index.js +2 -0
  319. package/dist/esm/product/board/board.js +2 -2
  320. package/dist/esm/product/board/board.recipe.js +1 -1
  321. package/dist/esm/product/command/command.js +19 -6
  322. package/dist/esm/product/command/command.recipe.js +27 -2
  323. package/dist/esm/product/entitycard/entitycard.js +2 -2
  324. package/dist/esm/product/entitycard/entitycard.recipe.js +2 -2
  325. package/dist/esm/product/flowcanvas/flowcanvas.js +4 -4
  326. package/dist/esm/product/inbox/inbox.recipe.js +1 -1
  327. package/dist/esm/product/listpage/listpage.recipe.js +3 -3
  328. package/dist/esm/product/navitem/navitem.recipe.js +13 -1
  329. package/dist/esm/product/onboarding/onboarding.js +2 -2
  330. package/dist/esm/product/onboarding/onboarding.recipe.js +2 -2
  331. package/dist/esm/product/recordpage/recordpage.js +133 -47
  332. package/dist/esm/product/recordpage/recordpage.recipe.js +19 -17
  333. package/dist/esm/product/recordpanel/recordpanel.js +4 -4
  334. package/dist/esm/product/recordpanel/recordpanel.recipe.js +12 -16
  335. package/dist/esm/product/recordstable/recordstable.js +157 -66
  336. package/dist/esm/product/recordstable/recordstable.recipe.js +23 -23
  337. package/dist/esm/product/recordstable/recordstable.tag.js +18 -0
  338. package/dist/esm/product/richtext/richtext.js +3 -3
  339. package/dist/esm/product/richtext/richtext.recipe.js +3 -3
  340. package/dist/esm/product/settingssection/settingssection.js +2 -2
  341. package/dist/esm/product/settingsshell/settingsshell.js +2 -2
  342. package/dist/esm/product/settingsshell/settingsshell.recipe.js +7 -2
  343. package/dist/esm/product/sidebar/sidebar.js +2 -2
  344. package/dist/esm/product/sidebar/sidebar.recipe.js +27 -2
  345. package/dist/esm/product/tasklist/tasklist.js +4 -4
  346. package/dist/esm/product/trialbanner/trialbanner.js +2 -2
  347. package/dist/esm/product/trialbanner/trialbanner.recipe.js +2 -2
  348. package/dist/esm/product/viewtoggle/viewtoggle.js +10 -2
  349. package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +1 -1
  350. package/dist/esm/tokens/elevation.js +44 -0
  351. package/dist/esm/tokens/index.js +1 -0
  352. package/dist/esm/tokens/palette.js +30 -0
  353. package/dist/esm/tokens/scale.js +7 -0
  354. package/dist/esm/tokens/semantic.js +24 -0
  355. package/dist/inbox.css +9 -1
  356. package/dist/input.css +32 -4
  357. package/dist/linechart.css +5 -5
  358. package/dist/listpage.css +11 -3
  359. package/dist/menu.css +11 -3
  360. package/dist/multiselect.css +14 -6
  361. package/dist/native/tokens.d.ts +16 -0
  362. package/dist/native/tokens.js +221 -0
  363. package/dist/navitem.css +21 -1
  364. package/dist/onboarding.css +10 -2
  365. package/dist/popover.css +8 -0
  366. package/dist/progress.css +8 -0
  367. package/dist/radiogroup.css +9 -1
  368. package/dist/recordpage.css +22 -12
  369. package/dist/recordpanel.css +25 -15
  370. package/dist/recordstable.css +37 -23
  371. package/dist/resizablepanel.css +53 -0
  372. package/dist/resizablepanel.d.ts +7 -0
  373. package/dist/richtext.css +11 -3
  374. package/dist/segmented.css +8 -0
  375. package/dist/select.css +12 -4
  376. package/dist/settingsshell.css +15 -2
  377. package/dist/sidebar.css +34 -1
  378. package/dist/skeleton.css +8 -0
  379. package/dist/spinner.css +8 -0
  380. package/dist/stagebar.css +8 -0
  381. package/dist/styles.css +2051 -1111
  382. package/dist/switch.css +8 -0
  383. package/dist/table.css +14 -6
  384. package/dist/tabletoolbar.css +8 -0
  385. package/dist/tabs.css +12 -4
  386. package/dist/tasklist.css +8 -0
  387. package/dist/textarea.css +23 -3
  388. package/dist/toast.css +10 -2
  389. package/dist/tokens.css +29 -0
  390. package/dist/tokens.json +217 -0
  391. package/dist/tooltip.css +8 -0
  392. package/dist/trialbanner.css +8 -0
  393. package/dist/types/components/accordion/accordion.d.ts +10 -8
  394. package/dist/types/components/avatargroup/avatargroup.d.ts +2 -2
  395. package/dist/types/components/barchart/barchart.d.ts +4 -2
  396. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  397. package/dist/types/components/bulkbar/bulkbar.d.ts +4 -2
  398. package/dist/types/components/button/button.d.ts +8 -0
  399. package/dist/types/components/button/button.recipe.d.ts +12 -0
  400. package/dist/types/components/callout/callout.d.ts +2 -2
  401. package/dist/types/components/columncalc/columncalc.d.ts +49 -0
  402. package/dist/types/components/columncalc/columncalc.recipe.d.ts +3 -0
  403. package/dist/types/components/columncalc/index.d.ts +1 -0
  404. package/dist/types/components/datatable/datatable.d.ts +58 -3
  405. package/dist/types/components/datepicker/datepicker.d.ts +41 -18
  406. package/dist/types/components/datepicker/datepicker.recipe.d.ts +25 -2
  407. package/dist/types/components/datepicker/index.d.ts +1 -1
  408. package/dist/types/components/datepickerfield/datepickerfield.d.ts +35 -0
  409. package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +5 -0
  410. package/dist/types/components/datepickerfield/index.d.ts +2 -0
  411. package/dist/types/components/dialog/dialog.d.ts +3 -1
  412. package/dist/types/components/divider/divider.d.ts +2 -2
  413. package/dist/types/components/donutchart/donutchart.d.ts +2 -2
  414. package/dist/types/components/drawer/drawer.d.ts +3 -1
  415. package/dist/types/components/emptystate/emptystate.d.ts +2 -2
  416. package/dist/types/components/formfield/formfield.d.ts +7 -4
  417. package/dist/types/components/input/input.d.ts +8 -2
  418. package/dist/types/components/linechart/linechart.d.ts +4 -2
  419. package/dist/types/components/menu/index.d.ts +1 -0
  420. package/dist/types/components/menu/menu-keyboard.d.ts +33 -0
  421. package/dist/types/components/menu/menu.d.ts +7 -1
  422. package/dist/types/components/multiselect/multiselect.d.ts +8 -4
  423. package/dist/types/components/popover/popover.d.ts +4 -1
  424. package/dist/types/components/progress/progress.d.ts +2 -2
  425. package/dist/types/components/radiogroup/radiogroup.d.ts +2 -2
  426. package/dist/types/components/resizablepanel/index.d.ts +2 -0
  427. package/dist/types/components/resizablepanel/resizablepanel.d.ts +75 -0
  428. package/dist/types/components/resizablepanel/resizablepanel.recipe.d.ts +3 -0
  429. package/dist/types/components/segmented/segmented.d.ts +2 -2
  430. package/dist/types/components/select/select.d.ts +2 -2
  431. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  432. package/dist/types/components/spinner/spinner.d.ts +2 -2
  433. package/dist/types/components/stagebar/stagebar.d.ts +2 -2
  434. package/dist/types/components/statcard/statcard.d.ts +2 -2
  435. package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -2
  436. package/dist/types/components/tabs/tabs.d.ts +2 -2
  437. package/dist/types/components/toast/toast.d.ts +7 -1
  438. package/dist/types/components/tooltip/tooltip.d.ts +8 -1
  439. package/dist/types/components/wheelpicker/index.d.ts +2 -0
  440. package/dist/types/components/wheelpicker/wheelpicker.d.ts +37 -0
  441. package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +26 -0
  442. package/dist/types/index.d.ts +5 -0
  443. package/dist/types/product/appshell/appshell.d.ts +16 -2
  444. package/dist/types/product/authshell/authshell.d.ts +28 -0
  445. package/dist/types/product/authshell/authshell.recipe.d.ts +3 -0
  446. package/dist/types/product/authshell/index.d.ts +2 -0
  447. package/dist/types/product/board/board.d.ts +2 -2
  448. package/dist/types/product/command/command.d.ts +25 -1
  449. package/dist/types/product/entitycard/entitycard.d.ts +2 -2
  450. package/dist/types/product/flowcanvas/flowcanvas.d.ts +9 -1
  451. package/dist/types/product/onboarding/onboarding.d.ts +7 -1
  452. package/dist/types/product/recordpage/recordpage.d.ts +65 -1
  453. package/dist/types/product/recordpanel/recordpanel.d.ts +8 -2
  454. package/dist/types/product/recordstable/recordstable.d.ts +90 -1
  455. package/dist/types/product/recordstable/recordstable.tag.d.ts +10 -0
  456. package/dist/types/product/richtext/richtext.d.ts +5 -1
  457. package/dist/types/product/settingssection/settingssection.d.ts +2 -2
  458. package/dist/types/product/settingsshell/settingsshell.d.ts +6 -2
  459. package/dist/types/product/sidebar/sidebar.d.ts +8 -0
  460. package/dist/types/product/tasklist/tasklist.d.ts +5 -1
  461. package/dist/types/product/trialbanner/trialbanner.d.ts +2 -2
  462. package/dist/types/product/viewtoggle/viewtoggle.d.ts +11 -5
  463. package/dist/types/tokens/contract.d.ts +14 -3
  464. package/dist/types/tokens/elevation.d.ts +44 -0
  465. package/dist/types/tokens/index.d.ts +1 -0
  466. package/dist/types/tokens/palette.d.ts +40 -0
  467. package/dist/types/tokens/scale.d.ts +7 -0
  468. package/dist/types/tokens/semantic.d.ts +19 -0
  469. package/dist/viewtoggle.css +9 -1
  470. package/dist/wheelpicker.css +68 -0
  471. package/dist/wheelpicker.d.ts +7 -0
  472. package/package.json +160 -68
@@ -1,57 +1,108 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CalendarDays, ChevronLeft, ChevronRight } from "lucide-react";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { mergeProps } from "@seed-design/dom-utils";
3
+ import { useDatePicker, } from "@seed-design/react-date-picker";
4
+ import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
3
5
  import * as React from "react";
4
- import { Popover } from "../popover/popover.js";
6
+ import { WheelPicker } from "../wheelpicker/index.js";
5
7
  import { datepickerRecipe } from "./datepicker.recipe.js";
6
- const DOW = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
7
- const MONTHS = [
8
- "January",
9
- "February",
10
- "March",
11
- "April",
12
- "May",
13
- "June",
14
- "July",
15
- "August",
16
- "September",
17
- "October",
18
- "November",
19
- "December",
20
- ];
21
- const sameDay = (a, b) => a.getFullYear() === b.getFullYear() &&
22
- a.getMonth() === b.getMonth() &&
23
- a.getDate() === b.getDate();
24
- const defaultFormat = (d) => `${MONTHS[d.getMonth()].slice(0, 3)} ${d.getDate()}, ${d.getFullYear()}`;
25
- /**
26
- * A date field with a calendar popover — composes [Popover] with a month grid.
27
- * Controlled via `value`/`onChange` or self-managed from `defaultValue`.
28
- */
29
- export function DatePicker({ value, defaultValue, onChange, placeholder = "Set date…", variant = "default", format = defaultFormat, "aria-label": ariaLabel, className, }) {
30
- const [internal, setInternal] = React.useState(defaultValue ?? null);
31
- const selected = value ?? internal;
32
- const [open, setOpen] = React.useState(false);
33
- const [view, setView] = React.useState(() => selected ?? new Date());
34
- // when reopening, jump the view to the selected month
35
- React.useEffect(() => {
36
- if (open)
37
- setView(selected ?? new Date());
38
- }, [open, selected]);
39
- const pick = (d) => {
40
- if (value === undefined)
41
- setInternal(d);
42
- onChange?.(d);
43
- setOpen(false);
44
- };
45
- const today = new Date();
46
- const year = view.getFullYear();
47
- const month = view.getMonth();
48
- const firstWeekday = new Date(year, month, 1).getDay();
49
- const start = new Date(year, month, 1 - firstWeekday);
50
- return (_jsx("div", { className: datepickerRecipe({ className }), children: _jsx(Popover, { open: open, onOpenChange: setOpen, "aria-label": ariaLabel ?? "Choose date", trigger: _jsxs("button", { type: "button", className: "datepicker-trigger", "data-ghost": variant === "ghost" ? "" : undefined, "data-placeholder": selected ? undefined : "", "aria-label": ariaLabel, children: [_jsx(CalendarDays, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), selected ? format(selected) : placeholder] }), children: _jsxs("div", { className: "datepicker-cal", children: [_jsxs("div", { className: "datepicker-head", children: [_jsx("button", { type: "button", className: "datepicker-nav", "aria-label": "Previous month", onClick: () => setView(new Date(year, month - 1, 1)), children: _jsx(ChevronLeft, { size: 16, strokeWidth: 1.75 }) }), _jsxs("span", { className: "datepicker-title", children: [MONTHS[month], " ", year] }), _jsx("button", { type: "button", className: "datepicker-nav", "aria-label": "Next month", onClick: () => setView(new Date(year, month + 1, 1)), children: _jsx(ChevronRight, { size: 16, strokeWidth: 1.75 }) })] }), _jsxs("div", { className: "datepicker-grid", role: "grid", children: [DOW.map((d) => (_jsx("span", { className: "datepicker-dow", "aria-hidden": "true", children: d }, d))), Array.from({ length: 42 }, (_, i) => {
51
- const day = new Date(start.getFullYear(), start.getMonth(), start.getDate() + i);
52
- const outside = day.getMonth() !== month;
53
- const isSel = selected != null && sameDay(day, selected);
54
- return (_jsx("button", { type: "button", className: "datepicker-day", "aria-label": format(day), "aria-pressed": isSel, "data-outside": outside ? "" : undefined, "data-today": sameDay(day, today) ? "" : undefined, "data-selected": isSel ? "" : undefined, onClick: () => pick(day), children: day.getDate() }, day.toISOString()));
55
- })] })] }) }) }));
8
+ function WeekdayRow({ api, semantic = true, }) {
9
+ return (_jsx("div", { role: semantic ? "row" : undefined, "aria-hidden": semantic ? undefined : true, className: "datepicker-weekday-row", children: api.weekdayLabels.map((weekday) => (_jsx("div", { role: semantic ? "columnheader" : undefined, "aria-label": semantic ? weekday.long : undefined, className: "datepicker-weekday", children: _jsx("span", { "aria-hidden": "true", children: weekday.short }) }, weekday.key))) }));
56
10
  }
11
+ function DateCellView({ cell, renderDateCellContent, renderDateCellSupplement, }) {
12
+ // a leading/trailing blank in the grid: still a gridcell, so the row keeps
13
+ // seven columns for a screen reader, but nothing to press
14
+ if (cell === null)
15
+ return (_jsx("div", { role: "gridcell", className: "datepicker-empty-cell" }));
16
+ const { cellProps, buttonProps, key: _key, ...renderProps } = cell;
17
+ return (_jsx("div", { ...cellProps, className: "datepicker-cell", children: _jsx("button", { ...buttonProps, type: "button", className: "datepicker-date", children: _jsx("span", { className: "datepicker-date-content", children: renderDateCellContent ? (renderDateCellContent(renderProps)) : (_jsxs(_Fragment, { children: [_jsx("span", { "data-date-picker-day": "", children: cell.formattedDay }), renderDateCellSupplement?.(renderProps)] })) }) }) }));
18
+ }
19
+ function NavigationButton({ direction, className, ...props }) {
20
+ const Icon = direction === "left" ? ChevronLeft : ChevronRight;
21
+ return (_jsx("button", { ...props, type: "button", className: className, children: _jsx(Icon, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }));
22
+ }
23
+ function Header({ api }) {
24
+ // in RTL the chevrons swap: "previous" is on the right
25
+ const previousDirection = api.isRtl ? "right" : "left";
26
+ const nextDirection = api.isRtl ? "left" : "right";
27
+ return (_jsxs("div", { className: "datepicker-header", children: [_jsxs("button", { ...api.monthYearButtonProps, type: "button", id: `${api.rootProps.id}-header-label`, className: "datepicker-header-label", children: [_jsx("span", { "data-date-picker-header-label": "", children: api.headerLabel }), _jsx("span", { className: "datepicker-header-chevron", "data-open": api.isWheelOpen ? "" : undefined, children: _jsx(ChevronDown, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) })] }), _jsxs("div", { className: "datepicker-nav", children: [_jsx(NavigationButton, { ...api.previousButtonProps, direction: previousDirection, className: "datepicker-nav-button" }), _jsx(NavigationButton, { ...api.nextButtonProps, direction: nextDirection, className: "datepicker-nav-button" })] })] }));
28
+ }
29
+ function TwoMonthHeader({ api, label, labelId, position, }) {
30
+ const isFirst = position === "first";
31
+ const direction = api.isRtl
32
+ ? isFirst
33
+ ? "right"
34
+ : "left"
35
+ : isFirst
36
+ ? "left"
37
+ : "right";
38
+ return (_jsxs("div", { className: "datepicker-two-month-header", children: [_jsx("div", { id: labelId, className: "datepicker-two-month-label", children: label }), _jsx(NavigationButton, { ...(isFirst ? api.previousButtonProps : api.nextButtonProps), direction: direction, "data-placement": isFirst ? "start" : "end", className: "datepicker-nav-button" })] }));
39
+ }
40
+ function MonthView({ api, month, renderDateCellContent, renderDateCellSupplement, showWeekdays, showMonthLabel, renderHeader, monthRef, }) {
41
+ const labelId = `${api.rootProps.id}-${month.key}-label`;
42
+ const headerLabelId = `${api.rootProps.id}-header-label`;
43
+ return (_jsxs("div", { ref: monthRef, className: "datepicker-month", children: [renderHeader?.(labelId), showMonthLabel ? (_jsx("div", { id: labelId, className: "datepicker-month-label", children: month.label })) : (_jsx("span", { id: labelId, className: "datepicker-live-region", children: month.label })), _jsxs("div", { ...api.gridProps, "aria-labelledby": showMonthLabel || renderHeader
44
+ ? labelId
45
+ : api.visibleRange === "month"
46
+ ? headerLabelId
47
+ : labelId, className: "datepicker-grid", children: [showWeekdays && _jsx(WeekdayRow, { api: api }), month.weeks.map((week) => (_jsx("div", { role: "row", className: "datepicker-week-row", children: week.cells.map((cell, index) => (_jsx(DateCellView, { cell: cell, renderDateCellContent: renderDateCellContent, renderDateCellSupplement: renderDateCellSupplement }, cell?.key ?? `${week.key}-empty-${index}`))) }, week.key)))] })] }));
48
+ }
49
+ function WheelView({ api }) {
50
+ return (_jsx("div", { className: "datepicker-wheel-container", children: _jsx(WheelPicker, { className: "datepicker-wheel", "aria-label": api.headerLabel, columns: [
51
+ {
52
+ key: "year",
53
+ label: api.ariaLabels.yearWheel,
54
+ options: api.wheel.yearOptions,
55
+ },
56
+ {
57
+ key: "month",
58
+ label: api.ariaLabels.monthWheel,
59
+ options: api.wheel.monthOptions,
60
+ },
61
+ ], value: { year: api.wheel.yearValue, month: api.wheel.monthValue }, onValueChange: (next) => {
62
+ if (next.year !== api.wheel.yearValue)
63
+ api.wheel.onYearValueChange(next.year);
64
+ if (next.month !== api.wheel.monthValue)
65
+ api.wheel.onMonthValueChange(next.month);
66
+ } }) }));
67
+ }
68
+ const styleOf = ({ height, minHeight, maxHeight }) => height === undefined && minHeight === undefined && maxHeight === undefined
69
+ ? undefined
70
+ : { height, minHeight, maxHeight };
71
+ const DatePickerImplementation = React.forwardRef((props, forwardedRef) => {
72
+ // The engine defaults `locale` to "ko-KR" — it is a Korean design system.
73
+ // crisp's other components are English-default, so the default is overridden
74
+ // here rather than inherited; a consumer's own `locale` still wins.
75
+ const api = useDatePicker({ locale: "en-US", ...props });
76
+ const { renderDateCellContent, renderDateCellSupplement, actionsRef, visibleRange: _visibleRange, selectionMode: _selectionMode, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, viewDate: _viewDate, defaultViewDate: _defaultViewDate, onViewDateChange: _onViewDateChange, today: _today, locale: _locale, weekStartsOn: _weekStartsOn, yearRange: _yearRange, monthRange: _monthRange, constraints: _constraints, disabled: _disabled, readOnly: _readOnly, rangeStartReadOnly: _rangeStartReadOnly, ariaLabels: _ariaLabels, height, minHeight, maxHeight, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...rootProps } = props;
77
+ React.useImperativeHandle(actionsRef, () => api.actions, [api.actions]);
78
+ // a labelledby wins over a label; otherwise fall back to the engine's name
79
+ const rootAriaLabel = ariaLabelledby
80
+ ? ariaLabel
81
+ : (ariaLabel ?? api.ariaLabels.root);
82
+ return (_jsxs("div", { ref: (el) => {
83
+ api.refs.root(el);
84
+ if (typeof forwardedRef === "function")
85
+ forwardedRef(el);
86
+ else if (forwardedRef)
87
+ forwardedRef.current = el;
88
+ }, ...mergeProps(api.rootProps, rootProps), "aria-label": rootAriaLabel, "aria-labelledby": ariaLabelledby, className: datepickerRecipe({
89
+ visibleRange: api.visibleRange,
90
+ className,
91
+ }), style: styleOf({ height, minHeight, maxHeight }), children: [api.visibleRange === "continuous" ? (_jsxs("div", { ref: api.refs.continuousScroll, ...api.continuousScrollProps, "data-date-picker-continuous-scroll": "", className: "datepicker-continuous-scroll", children: [_jsx(WeekdayRow, { api: api, semantic: false }), _jsxs("div", { className: "datepicker-continuous-content", children: [_jsx("div", { "aria-hidden": "true", className: "datepicker-continuous-spacer", style: { height: api.virtual.topHeight } }), api.months.map((month) => (_jsx(MonthView, { api: api, month: month, renderDateCellContent: renderDateCellContent, renderDateCellSupplement: renderDateCellSupplement, showWeekdays: false, showMonthLabel: true, monthRef: api.refs.continuousMonth(month.key) }, month.key))), _jsx("div", { "aria-hidden": "true", className: "datepicker-continuous-spacer", style: { height: api.virtual.bottomHeight } })] })] })) : (_jsxs(_Fragment, { children: [api.visibleRange !== "twoMonths" && _jsx(Header, { api: api }), _jsx("div", { "data-wheel-open": api.isWheelOpen && api.visibleRange !== "twoMonths"
92
+ ? ""
93
+ : undefined, "aria-hidden": api.isWheelOpen && api.visibleRange !== "twoMonths"
94
+ ? true
95
+ : undefined, className: "datepicker-months", children: api.months.map((month, index) => (_jsx(MonthView, { api: api, month: month, renderDateCellContent: renderDateCellContent, renderDateCellSupplement: renderDateCellSupplement, showWeekdays: true, showMonthLabel: false, renderHeader: api.visibleRange === "twoMonths"
96
+ ? (labelId) => (_jsx(TwoMonthHeader, { api: api, label: month.label, labelId: labelId, position: index === 0 ? "first" : "last" }))
97
+ : undefined }, month.key))) }), api.isWheelOpen && api.visibleRange !== "twoMonths" && (_jsx(WheelView, { api: api }))] })), _jsx("span", { ...api.liveRegionProps, className: "datepicker-live-region", children: api.headerLabel })] }));
98
+ });
99
+ DatePickerImplementation.displayName = "DatePickerImplementation";
100
+ export const DatePicker = React.forwardRef((props, ref) => (_jsx(DatePickerImplementation, { ref: ref, ...props, visibleRange: "month" })));
57
101
  DatePicker.displayName = "DatePicker";
102
+ export const TwoMonthDatePicker = React.forwardRef((props, ref) => (_jsx(DatePickerImplementation, { ref: ref, ...props, visibleRange: "twoMonths" })));
103
+ TwoMonthDatePicker.displayName = "TwoMonthDatePicker";
104
+ export const WeekDatePicker = React.forwardRef((props, ref) => (_jsx(DatePickerImplementation, { ref: ref, ...props, visibleRange: "week" })));
105
+ WeekDatePicker.displayName = "WeekDatePicker";
106
+ export const ContinuousDatePicker = React.forwardRef((props, ref) => (_jsx(DatePickerImplementation, { ref: ref, ...props, visibleRange: "continuous" })));
107
+ ContinuousDatePicker.displayName = "ContinuousDatePicker";
108
+ export { compareDates, dateKey, dateOnOrAfter, dateOnOrBefore, excludeDates, isSameDate, maxSelectionCount, rangeDayCountAtLeast, rangeDayCountAtMost, } from "@seed-design/react-date-picker";
@@ -1,32 +1,177 @@
1
1
  import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
2
  import { contract as c } from "../../tokens/index.js";
3
- // A date field + calendar popover — measured from Attio's date cell editor: an
4
- // outlined trigger showing the value, opening a month grid (weekday row, day
5
- // cells, today outline, selected day brand-filled).
3
+ // seed-design's calendar, measured from @seed-design/css. The geometry is a
4
+ // 48px rhythm: header, weekday row, month label and every date cell are all
5
+ // x12 tall, and the 42px pill inside a cell is inset 3px from its top.
6
+ //
7
+ // The pill and the range bridge are ::before layers behind the numeral
8
+ // (`isolation: isolate` on the cell keeps their z-index local), which is what
9
+ // lets a range paint edge-to-edge between cells while each day keeps its own
10
+ // round highlight.
11
+ // The pill is centred in the cell, so its inset is the half-difference rather
12
+ // than a fourth independent number: change the cell or the pill and the inset
13
+ // follows. Every `top` in the calendar -- the day pill, its focus ring, the
14
+ // range bridge and the content column's padding -- is this one value.
15
+ const pillInset = `calc((${c.size.calendarCell} - ${c.size.calendarPill}) / 2)`;
6
16
  const config = defineRecipe({
7
17
  name: "datepicker",
8
- base: `display: contents; font-family: ${c.font.sans};
9
- & .datepicker-trigger { display: inline-flex; align-items: center; gap: ${c.space["2"]}; box-sizing: border-box; height: 32px; padding: 0 ${c.space["2.5"]}; margin: 0; border: none; border-radius: ${c.radius.md}; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 7%, transparent); color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg}; white-space: nowrap; cursor: pointer; }
10
- & .datepicker-trigger[data-ghost] { background: transparent; box-shadow: none; }
11
- & .datepicker-trigger[data-ghost]:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
12
- & .datepicker-trigger[data-placeholder] { color: ${c.fgMuted}; }
13
- & .datepicker-trigger svg { flex-shrink: 0; color: ${c.fgMuted}; }
14
- & .datepicker-cal { width: 244px; }
15
- & .datepicker-head { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 ${c.space["1"]}; }
16
- & .datepicker-title { font-size: ${c.text.md}; font-weight: ${c.weight.semibold}; color: ${c.fgPrimary}; }
17
- & .datepicker-nav { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; cursor: pointer; }
18
- & .datepicker-nav:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
19
- & .datepicker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: ${c.space["1"]}; }
20
- & .datepicker-dow { display: flex; align-items: center; justify-content: center; height: 24px; font-size: ${c.text.xs}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
21
- & .datepicker-day { display: flex; align-items: center; justify-content: center; height: 30px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.md}; cursor: pointer; }
22
- & .datepicker-day:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); }
23
- & .datepicker-day[data-outside] { color: ${c.fgMuted}; opacity: 0.5; }
24
- & .datepicker-day[data-today] { box-shadow: inset 0 0 0 1px ${c.borderDefault}; }
25
- & .datepicker-day[data-selected] { background: ${c.bgBrandSolid}; color: ${c.fgOnBrand}; }
26
- & .datepicker-day[data-selected]:hover { background: ${c.bgBrandSolidPressed}; }`,
27
- variants: {},
28
- defaultVariants: {},
18
+ base: `
19
+ position: relative; box-sizing: border-box; width: 100%; min-width: 0;
20
+ font-family: ${c.font.sans}; color: ${c.fgNeutralMuted}; background: ${c.bgSurface};
21
+
22
+ & .datepicker-header {
23
+ display: flex; align-items: center; justify-content: space-between;
24
+ height: ${c.size.calendarCell};
25
+ }
26
+ & .datepicker-header-label {
27
+ display: inline-flex; align-items: center; gap: ${c.space["1"]};
28
+ height: 100%; min-width: 0; border: 0; padding: 0 ${c.space["1"]};
29
+ border-radius: ${c.radius.md}; background: transparent; cursor: pointer;
30
+ color: ${c.fgPrimary}; font-family: inherit;
31
+ font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.bold};
32
+ white-space: nowrap;
33
+ outline: 2px solid transparent; outline-offset: -2px;
34
+ transition: outline-color .2s ease;
35
+ }
36
+ & .datepicker-header-label:focus-visible { outline-color: ${c.strokeFocusRing}; }
37
+ & .datepicker-header-chevron { display: inline-flex; transition: transform .2s ease; }
38
+ & .datepicker-header-chevron[data-open] { transform: rotate(180deg); }
39
+
40
+ & .datepicker-nav { display: flex; align-items: center; }
41
+ & .datepicker-nav-button {
42
+ display: inline-flex; align-items: center; justify-content: center;
43
+ width: ${c.size.menuRow}; height: ${c.size.menuRow}; padding: 0;
44
+ border: none; border-radius: ${c.radius.md}; background: none;
45
+ color: ${c.fgMuted}; font-family: inherit; cursor: pointer;
46
+ outline: 2px solid transparent; outline-offset: -2px;
47
+ transition: background-color .12s, outline-color .2s ease;
48
+ }
49
+ & .datepicker-nav-button:hover { background: ${c.bgRaised}; }
50
+ & .datepicker-nav-button:focus-visible { outline-color: ${c.strokeFocusRing}; }
51
+ & .datepicker-nav-button:disabled { opacity: .4; cursor: not-allowed; }
52
+
53
+ & .datepicker-weekday-row {
54
+ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
55
+ position: relative; z-index: 2; background: ${c.bgSurface};
56
+ }
57
+ & .datepicker-weekday {
58
+ display: flex; align-items: center; justify-content: center;
59
+ height: ${c.size.calendarCell}; color: ${c.fgNeutralSubtle};
60
+ font-size: ${c.text.lg}; line-height: 19px; font-weight: ${c.weight.medium};
61
+ }
62
+
63
+ & .datepicker-months { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
64
+ & .datepicker-months[data-wheel-open] { visibility: hidden; }
65
+ & .datepicker-month { min-width: 0; }
66
+ & .datepicker-month-label {
67
+ display: flex; align-items: center; height: ${c.size.calendarCell};
68
+ color: ${c.fgPrimary}; font-size: ${c.text.xl}; line-height: 22px;
69
+ font-weight: ${c.weight.bold};
70
+ }
71
+
72
+ & .datepicker-grid { display: grid; min-width: 0; }
73
+ & .datepicker-week-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
74
+
75
+ & .datepicker-cell {
76
+ position: relative; min-width: 0; min-height: ${c.size.calendarCell};
77
+ isolation: isolate;
78
+ }
79
+ & .datepicker-empty-cell { min-height: ${c.size.calendarCell}; }
80
+
81
+ /* the bridge joining days inside a completed range */
82
+ & .datepicker-cell[data-range-complete][data-in-range]::before {
83
+ content: ""; position: absolute; z-index: -1; inset-inline: 0;
84
+ top: ${pillInset}; height: ${c.size.calendarPill}; background: ${c.bgNeutralWeak};
85
+ }
86
+ & .datepicker-cell[data-range-complete][data-range-start]:not([data-range-end])::before {
87
+ inset-inline-start: 50%;
88
+ }
89
+ & .datepicker-cell[data-range-complete][data-range-end]:not([data-range-start])::before {
90
+ inset-inline-end: 50%;
91
+ }
92
+
93
+ & .datepicker-date {
94
+ position: relative; display: flex; width: 100%; height: 100%;
95
+ min-height: ${c.size.calendarCell}; min-width: 0;
96
+ align-items: flex-start; justify-content: center;
97
+ border: 0; padding: 0; background: transparent; cursor: pointer;
98
+ color: ${c.fgNeutralMuted}; font: inherit; outline: none;
99
+ isolation: isolate;
100
+ }
101
+ /* the round day highlight, behind the numeral */
102
+ & .datepicker-date::before {
103
+ content: ""; position: absolute; z-index: -1; top: ${pillInset}; left: 50%;
104
+ width: ${c.size.calendarPill}; height: ${c.size.calendarPill};
105
+ border-radius: ${c.radius.full};
106
+ background: transparent; transform: translateX(-50%);
107
+ }
108
+ & .datepicker-date[data-today]::before { background: ${c.bgNeutralWeak}; }
109
+ & .datepicker-date[data-selected]::before { background: ${c.bgNeutralInverted}; }
110
+ & .datepicker-date[data-selected] { color: ${c.fgOnNeutralInverted}; }
111
+ & .datepicker-date[data-in-range] { color: ${c.fgNeutralMuted}; }
112
+ & .datepicker-date[data-in-range]::before { background: transparent; }
113
+ & .datepicker-date[data-unavailable] { color: ${c.fgDisabled}; }
114
+ & .datepicker-date:disabled { color: ${c.fgDisabled}; cursor: not-allowed; }
115
+ & .datepicker-date:focus-visible::after {
116
+ content: ""; position: absolute; top: ${pillInset}; left: 50%;
117
+ width: ${c.size.calendarPill}; height: ${c.size.calendarPill};
118
+ transform: translateX(-50%); border-radius: ${c.radius.full};
119
+ outline: 2px solid ${c.strokeFocusRing}; outline-offset: -2px;
120
+ }
121
+
122
+ & .datepicker-date-content {
123
+ position: relative; z-index: 1; display: flex; width: 100%;
124
+ min-height: ${c.size.calendarCell}; min-width: 0; box-sizing: border-box;
125
+ flex-direction: column; align-items: center; gap: 3px;
126
+ padding-top: ${pillInset}; color: inherit;
127
+ font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.medium};
128
+ font-variant-numeric: tabular-nums;
129
+ }
130
+ /* The numeral is its own 42px flex box so it centres on the 42px pill.
131
+ Without this the content column top-aligns the glyph and the pill reads
132
+ as offset — the cell is 48px, the pill 42px inset 3px, and only a
133
+ 42px-tall numeral box shares the pill's centre line. */
134
+ & .datepicker-date-content > [data-date-picker-day] {
135
+ display: flex; min-height: ${c.size.calendarPill}; flex-shrink: 0;
136
+ align-items: center; justify-content: center;
137
+ }
138
+
139
+ /* the year/month wheel, laid over the grid it replaces */
140
+ & .datepicker-wheel-container {
141
+ position: absolute; z-index: 1; inset-inline: 0;
142
+ top: ${c.size.calendarCell}; bottom: 0;
143
+ display: flex; align-items: center; overflow: hidden;
144
+ background: ${c.bgSurface};
145
+ }
146
+ & .datepicker-wheel { width: 100%; }
147
+
148
+ & .datepicker-continuous-scroll {
149
+ height: 100%; min-height: 0; overflow-y: auto;
150
+ overscroll-behavior: contain; scrollbar-width: none;
151
+ }
152
+ & .datepicker-continuous-scroll::-webkit-scrollbar { display: none; }
153
+ & .datepicker-continuous-content { display: flex; flex-direction: column; }
154
+
155
+ /* announced, never drawn */
156
+ & .datepicker-live-region {
157
+ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
158
+ overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
159
+ }
160
+ `,
161
+ variants: {
162
+ visibleRange: {
163
+ month: ``,
164
+ twoMonths: `& .datepicker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: ${c.space["6"]}; }
165
+ & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: ${c.size.calendarCell}; }
166
+ & .datepicker-two-month-label { color: ${c.fgPrimary}; font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.bold}; }`,
167
+ week: ``,
168
+ continuous: `& .datepicker-weekday-row { position: sticky; top: 0; }`,
169
+ },
170
+ },
171
+ defaultVariants: { visibleRange: "month" },
29
172
  compoundVariants: [],
30
173
  });
31
- export const datepickerRecipe = resolveRecipe(config);
174
+ export const datepickerRecipe = Object.assign(resolveRecipe(config), {
175
+ config,
176
+ });
32
177
  export default config;
@@ -1,2 +1,2 @@
1
- export { DatePicker } from "./datepicker.js";
1
+ export { ContinuousDatePicker, compareDates, DatePicker, dateKey, dateOnOrAfter, dateOnOrBefore, excludeDates, isSameDate, maxSelectionCount, rangeDayCountAtLeast, rangeDayCountAtMost, TwoMonthDatePicker, WeekDatePicker, } from "./datepicker.js";
2
2
  export { datepickerRecipe } from "./datepicker.recipe.js";
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CalendarDays } from "lucide-react";
3
+ import * as React from "react";
4
+ import { DatePicker, } from "../datepicker/index.js";
5
+ import { Popover } from "../popover/index.js";
6
+ import { datepickerfieldRecipe } from "./datepickerfield.recipe.js";
7
+ const defaultFormat = (d) => d.toLocaleDateString(undefined, {
8
+ month: "short",
9
+ day: "numeric",
10
+ year: "numeric",
11
+ });
12
+ // the calendar counts months from 1; a JS Date counts from 0
13
+ const toDate = (d) => new Date(d.year, d.month - 1, d.day);
14
+ const fromDate = (d) => ({
15
+ year: d.getFullYear(),
16
+ month: d.getMonth() + 1,
17
+ day: d.getDate(),
18
+ });
19
+ /**
20
+ * Attio's date field: a trigger showing the value, opening a calendar in a
21
+ * popover. This is what `DatePicker` used to be; `DatePicker` is now
22
+ * seed-design's bare calendar, and this composes it.
23
+ */
24
+ export function DatePickerField({ value, defaultValue, onChange, placeholder = "Set date…", variant = "default", format = defaultFormat, presets, calendarProps, "aria-label": ariaLabel, className, ...rest }) {
25
+ const [internal, setInternal] = React.useState(defaultValue ?? null);
26
+ const selected = value ?? internal;
27
+ const [open, setOpen] = React.useState(false);
28
+ const pick = (d) => {
29
+ if (value === undefined)
30
+ setInternal(d);
31
+ onChange?.(d);
32
+ setOpen(false);
33
+ };
34
+ return (_jsx("div", { className: datepickerfieldRecipe({ className }), ...rest, children: _jsx(Popover, { open: open, onOpenChange: setOpen, "aria-label": ariaLabel, trigger: _jsxs("button", { type: "button", className: "datepickerfield-trigger", "data-ghost": variant === "ghost" ? "" : undefined, "data-placeholder": selected ? undefined : "", "aria-label": ariaLabel, children: [_jsx(CalendarDays, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), selected ? format(selected) : placeholder] }), children: _jsxs("div", { className: "datepickerfield-panel", children: [_jsx(DatePicker
35
+ // DatePickerProps is a union over selectionMode, and TypeScript
36
+ // cannot narrow it through a spread: it tries every branch and
37
+ // reports the range one as missing props. The field is always
38
+ // single-select, so the shape is pinned here rather than inferred.
39
+ , { ...{
40
+ ...calendarProps,
41
+ selectionMode: "single",
42
+ value: selected ? fromDate(selected) : undefined,
43
+ onValueChange: (next) => {
44
+ if (next)
45
+ pick(toDate(next));
46
+ },
47
+ } }), presets && presets.length > 0 && (_jsx("div", { className: "datepickerfield-presets", children: presets.map((p, i) => (_jsx("button", { type: "button", className: "datepickerfield-preset", onClick: () => pick(p.date()), children: p.label }, typeof p.label === "string" ? p.label : i))) }))] }) }) }));
48
+ }
49
+ DatePickerField.displayName = "DatePickerField";
@@ -0,0 +1,41 @@
1
+ import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
+ import { contract as c } from "../../tokens/index.js";
3
+ // The trigger crisp's DatePicker used to own, measured from Attio: a 32px
4
+ // outlined chip showing the value, opening a calendar in a popover. Split out
5
+ // when DatePicker became seed-design's bare calendar, so this Attio-measured
6
+ // field survives unchanged for the consumers already using it.
7
+ const config = defineRecipe({
8
+ name: "datepickerfield",
9
+ base: `
10
+ display: inline-flex; font-family: ${c.font.sans};
11
+
12
+ & .datepickerfield-trigger {
13
+ display: inline-flex; align-items: center; gap: ${c.space["2"]};
14
+ box-sizing: border-box; height: 32px; padding: 0 ${c.space["2.5"]}; margin: 0;
15
+ border: none; border-radius: ${c.radius.md}; background: transparent;
16
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, ${c.fgPrimary} 7%, transparent);
17
+ color: ${c.fgPrimary}; font-family: inherit; font-size: ${c.text.lg};
18
+ white-space: nowrap; cursor: pointer;
19
+ }
20
+ & .datepickerfield-trigger[data-ghost] { background: transparent; box-shadow: none; }
21
+ & .datepickerfield-trigger[data-ghost]:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); }
22
+ & .datepickerfield-trigger[data-placeholder] { color: ${c.fgMuted}; }
23
+ & .datepickerfield-trigger svg { flex-shrink: 0; color: ${c.fgMuted}; }
24
+
25
+ & .datepickerfield-panel { padding: ${c.space["2"]}; width: 300px; }
26
+ & .datepickerfield-presets { display: flex; flex-wrap: wrap; gap: ${c.space["1"]}; margin-top: ${c.space["2"]}; }
27
+ & .datepickerfield-preset {
28
+ height: ${c.size.chip}; padding: 0 ${c.space["2"]}; border: none;
29
+ border-radius: ${c.radius.chip}; background: ${c.bgRaised}; color: ${c.fgPrimary};
30
+ font-family: inherit; font-size: ${c.text.sm}; cursor: pointer;
31
+ }
32
+ & .datepickerfield-preset:hover { background: color-mix(in srgb, ${c.fgPrimary} 8%, transparent); }
33
+ `,
34
+ variants: {},
35
+ defaultVariants: {},
36
+ compoundVariants: [],
37
+ });
38
+ export const datepickerfieldRecipe = Object.assign(resolveRecipe(config), {
39
+ config,
40
+ });
41
+ export default config;
@@ -0,0 +1,2 @@
1
+ export { DatePickerField, } from "./datepickerfield.js";
2
+ export { datepickerfieldRecipe } from "./datepickerfield.recipe.js";
@@ -21,7 +21,7 @@ function useDialogInstanceId() {
21
21
  * Escape / outside-click dismissal) with the measured Attio modal surface.
22
22
  * Compose the body with `DialogBody` and actions with `DialogFooter`.
23
23
  */
24
- export function Dialog({ open, onOpenChange, title, icon, width = 640, "aria-label": ariaLabel, children, }) {
24
+ export function Dialog({ open, onOpenChange, title, icon, width = 640, "aria-label": ariaLabel, closeLabel = "Close", children, }) {
25
25
  const id = useDialogInstanceId();
26
26
  const service = useMachine(dialog.machine, {
27
27
  id,
@@ -37,7 +37,7 @@ export function Dialog({ open, onOpenChange, title, icon, width = 640, "aria-lab
37
37
  const api = dialog.connect(service, normalizeProps);
38
38
  if (!api.open)
39
39
  return null;
40
- return (_jsx(Portal, { children: _jsxs("div", { className: dialogRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "dialog-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "dialog-positioner", children: _jsx("div", { ...api.getContentProps(), className: "dialog-content", "data-crisp-dialog": id, style: { maxWidth: `min(${width}px, 90vw)` }, children: _jsxs("div", { className: "dialog-card", children: [title != null && (_jsxs("div", { className: "dialog-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "dialog-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "dialog-close", "aria-label": "Close", children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) }) })] }) }));
40
+ return (_jsx(Portal, { children: _jsxs("div", { className: dialogRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "dialog-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "dialog-positioner", children: _jsx("div", { ...api.getContentProps(), className: "dialog-content", "data-crisp-dialog": id, style: { maxWidth: `min(${width}px, 90vw)` }, children: _jsxs("div", { className: "dialog-card", children: [title != null && (_jsxs("div", { className: "dialog-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "dialog-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "dialog-close", "aria-label": closeLabel, children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) }) })] }) }));
41
41
  }
42
42
  Dialog.displayName = "Dialog";
43
43
  export function DialogBody({ children, className, }) {
@@ -1,5 +1,5 @@
1
1
  import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
- import { contract as c } from "../../tokens/index.js";
2
+ import { contract as c, elevation as e } from "../../tokens/index.js";
3
3
  // A modal dialog surface — measured from Attio's create-record modal: a radius-16
4
4
  // frosted-glass card (60% tinted background + 15px backdrop blur, both re-measured
5
5
  // per theme — light uses a blue-tinted 3-layer shadow, dark drops to a plain
@@ -10,18 +10,18 @@ const config = defineRecipe({
10
10
  base: `display: contents; font-family: ${c.font.sans};
11
11
  & .dialog-backdrop { position: fixed; inset: 0; z-index: 60; background: transparent; }
12
12
  & .dialog-positioner { position: fixed; inset: 0; z-index: 61; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${c.space["4"]} ${c.space["4"]}; }
13
- & .dialog-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-height: 74vh; 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: 0 8px 28px -6px ${c.shadowOverlay1}, 0 18px 88px -4px ${c.shadowOverlay2}, 0 0 1px ${c.shadowOverlay3}; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
13
+ & .dialog-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-height: 74vh; 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); } }
14
14
  & .dialog-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; }
15
15
  & .dialog-header { display: flex; align-items: center; gap: ${c.space["2"]}; flex-shrink: 0; height: 52px; padding: 0 ${c.space["2"]} 0 ${c.space["4"]}; border-bottom: 1px solid ${c.borderSubtle}; }
16
16
  & .dialog-header svg { flex-shrink: 0; color: ${c.fgMuted}; }
17
17
  & .dialog-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; }
18
- & .dialog-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; cursor: pointer; }
18
+ & .dialog-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: ${c.radius.md}; background: none; color: ${c.fgMuted}; font-family: inherit; cursor: pointer; }
19
19
  & .dialog-close:hover { background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: ${c.fgPrimary}; }
20
20
  & .dialog-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: ${c.space["4"]}; padding: ${c.space["5"]} ${c.space["4"]}; }
21
21
  & .dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: ${c.space["3"]}; flex-shrink: 0; min-height: 56px; padding: 0 ${c.space["4"]}; border-top: 1px solid ${c.borderSubtle}; }
22
22
  & .dialog-field { display: flex; flex-direction: column; gap: ${c.space["1.5"]}; }
23
23
  & .dialog-field-label { font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 50%, transparent); }
24
- & .dialog-more { display: inline-flex; align-items: center; gap: ${c.space["2"]}; margin-right: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; }
24
+ & .dialog-more { display: inline-flex; align-items: center; gap: ${c.space["2"]}; margin-inline-end: auto; border: none; background: none; padding: 0; font-family: inherit; font-size: ${c.text.md}; color: ${c.fgMuted}; cursor: pointer; }
25
25
  & .dialog-submit { display: inline-flex; align-items: center; gap: ${c.space["2"]}; height: 28px; 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; }
26
26
  & .dialog-submit-key { display: inline-flex; align-items: center; justify-content: center; height: 18px; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.sm}; background: rgba(255,255,255,0.22); font-size: ${c.text.xs}; }`,
27
27
  variants: {},
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { dividerRecipe } from "./divider.recipe.js";
3
3
  /** A hairline separator over `borderSubtle`, horizontal or vertical. */
4
- export function Divider({ orientation = "horizontal", className, }) {
5
- return (_jsx("hr", { "aria-orientation": orientation, "data-orientation": orientation, className: dividerRecipe({ className }) }));
4
+ export function Divider({ orientation = "horizontal", className, ...rest }) {
5
+ return (_jsx("hr", { "aria-orientation": orientation, "data-orientation": orientation, className: dividerRecipe({ className }), ...rest }));
6
6
  }
7
7
  Divider.displayName = "Divider";
@@ -16,7 +16,7 @@ const PALETTE = [
16
16
  * ring using the r=15.915 (circumference 100) trick so slices are percentages;
17
17
  * a centred total and an optional legend. `role="img"` with a summary.
18
18
  */
19
- export function DonutChart({ data, size = 120, thickness = 14, centerValue, centerCaption, legend = true, format = (n) => n.toLocaleString(), "aria-label": ariaLabel, className, }) {
19
+ export function DonutChart({ data, size = 120, thickness = 14, centerValue, centerCaption, legend = true, format = (n) => n.toLocaleString(), "aria-label": ariaLabel, className, ...rest }) {
20
20
  const total = data.reduce((s, d) => s + Math.max(0, d.value), 0);
21
21
  const R = 15.915; // circumference ≈ 100
22
22
  let cursor = 0;
@@ -33,6 +33,6 @@ export function DonutChart({ data, size = 120, thickness = 14, centerValue, cent
33
33
  });
34
34
  const summary = ariaLabel ??
35
35
  `Donut chart: ${data.map((d) => `${d.label} ${format(d.value)}`).join(", ")}`;
36
- return (_jsxs("div", { className: donutchartRecipe({ className }), role: "img", "aria-label": summary, children: [_jsxs("div", { className: "donutchart-ring", style: { width: size, height: size }, children: [_jsxs("svg", { className: "donutchart-svg", width: size, height: size, viewBox: "0 0 42 42", "aria-hidden": "true", children: [_jsx("circle", { className: "donutchart-track", cx: 21, cy: 21, r: R, strokeWidth: (thickness / size) * 42 }), slices.map((s) => (_jsx("circle", { className: "donutchart-seg", cx: 21, cy: 21, r: R, stroke: s.color, strokeWidth: (thickness / size) * 42, strokeDasharray: `${s.pct} ${100 - s.pct}`, strokeDashoffset: s.offset, children: _jsx("title", { children: `${s.label}: ${format(s.value)}` }) }, s.label)))] }), _jsxs("div", { className: "donutchart-center", children: [_jsx("span", { className: "donutchart-total", children: centerValue ?? format(total) }), centerCaption != null && (_jsx("span", { className: "donutchart-caption", children: centerCaption }))] })] }), legend && (_jsx("div", { className: "donutchart-legend", children: slices.map((s) => (_jsxs("span", { className: "donutchart-item", children: [_jsx("span", { className: "donutchart-swatch", style: { background: s.color } }), _jsx("span", { className: "donutchart-name", children: s.label }), _jsx("span", { className: "donutchart-val", children: format(s.value) })] }, s.label))) }))] }));
36
+ return (_jsxs("div", { className: donutchartRecipe({ className }), ...rest, role: "img", "aria-label": summary, children: [_jsxs("div", { className: "donutchart-ring", style: { width: size, height: size }, children: [_jsxs("svg", { className: "donutchart-svg", width: size, height: size, viewBox: "0 0 42 42", "aria-hidden": "true", children: [_jsx("circle", { className: "donutchart-track", cx: 21, cy: 21, r: R, strokeWidth: (thickness / size) * 42 }), slices.map((s) => (_jsx("circle", { className: "donutchart-seg", cx: 21, cy: 21, r: R, stroke: s.color, strokeWidth: (thickness / size) * 42, strokeDasharray: `${s.pct} ${100 - s.pct}`, strokeDashoffset: s.offset, children: _jsx("title", { children: `${s.label}: ${format(s.value)}` }) }, s.label)))] }), _jsxs("div", { className: "donutchart-center", children: [_jsx("span", { className: "donutchart-total", children: centerValue ?? format(total) }), centerCaption != null && (_jsx("span", { className: "donutchart-caption", children: centerCaption }))] })] }), legend && (_jsx("div", { className: "donutchart-legend", children: slices.map((s) => (_jsxs("span", { className: "donutchart-item", children: [_jsx("span", { className: "donutchart-swatch", style: { background: s.color } }), _jsx("span", { className: "donutchart-name", children: s.label }), _jsx("span", { className: "donutchart-val", children: format(s.value) })] }, s.label))) }))] }));
37
37
  }
38
38
  DonutChart.displayName = "DonutChart";
@@ -18,7 +18,7 @@ function useDrawerInstanceId() {
18
18
  * Escape / outside-click dismissal) with a panel that slides in from the edge.
19
19
  * Compose the body with `DrawerBody` and actions with `DrawerFooter`.
20
20
  */
21
- export function Drawer({ open, onOpenChange, side = "right", title, icon, "aria-label": ariaLabel, children, }) {
21
+ export function Drawer({ open, onOpenChange, side = "right", title, icon, "aria-label": ariaLabel, closeLabel = "Close", children, }) {
22
22
  const id = useDrawerInstanceId();
23
23
  const service = useMachine(dialog.machine, {
24
24
  id,
@@ -31,7 +31,7 @@ export function Drawer({ open, onOpenChange, side = "right", title, icon, "aria-
31
31
  const api = dialog.connect(service, normalizeProps);
32
32
  if (!api.open)
33
33
  return null;
34
- return (_jsx(Portal, { children: _jsxs("div", { className: drawerRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "drawer-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "drawer-positioner", "data-side": side, children: _jsxs("div", { ...api.getContentProps(), className: "drawer-content", children: [title != null && (_jsxs("div", { className: "drawer-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "drawer-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "drawer-close", "aria-label": "Close", children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) })] }) }));
34
+ return (_jsx(Portal, { children: _jsxs("div", { className: drawerRecipe(), children: [_jsx("div", { ...api.getBackdropProps(), className: "drawer-backdrop" }), _jsx("div", { ...api.getPositionerProps(), className: "drawer-positioner", "data-side": side, children: _jsxs("div", { ...api.getContentProps(), className: "drawer-content", children: [title != null && (_jsxs("div", { className: "drawer-header", children: [icon, _jsx("span", { ...api.getTitleProps(), className: "drawer-title", children: title }), _jsx("button", { type: "button", ...api.getCloseTriggerProps(), className: "drawer-close", "aria-label": closeLabel, children: _jsx(X, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })] })), children] }) })] }) }));
35
35
  }
36
36
  Drawer.displayName = "Drawer";
37
37
  export function DrawerBody({ children }) {