@crisp-ui-kit/crisp 0.31.6 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/NOTICE +88 -0
  2. package/README.md +22 -0
  3. package/dist/accordion.css +13 -13
  4. package/dist/accordion.layered.css +23 -0
  5. package/dist/appshell.css +11 -11
  6. package/dist/appshell.layered.css +25 -0
  7. package/dist/authshell.css +23 -23
  8. package/dist/authshell.layered.css +59 -0
  9. package/dist/avatar.css +23 -23
  10. package/dist/avatar.layered.css +41 -0
  11. package/dist/avatargroup.css +2 -2
  12. package/dist/avatargroup.layered.css +7 -0
  13. package/dist/badge.css +31 -31
  14. package/dist/badge.layered.css +51 -0
  15. package/dist/barchart.css +15 -15
  16. package/dist/barchart.layered.css +25 -0
  17. package/dist/base.css +4 -4
  18. package/dist/board.css +20 -20
  19. package/dist/board.layered.css +34 -0
  20. package/dist/breadcrumb.css +8 -8
  21. package/dist/breadcrumb.layered.css +13 -0
  22. package/dist/bulkbar.css +13 -13
  23. package/dist/bulkbar.layered.css +23 -0
  24. package/dist/button.css +21 -21
  25. package/dist/button.layered.css +46 -0
  26. package/dist/callout.css +15 -15
  27. package/dist/callout.layered.css +18 -0
  28. package/dist/card.css +14 -14
  29. package/dist/card.layered.css +30 -0
  30. package/dist/checkbox.css +9 -9
  31. package/dist/checkbox.layered.css +21 -0
  32. package/dist/cjs/components/accordion/accordion.js +1 -1
  33. package/dist/cjs/components/accordion/accordion.recipe.js +10 -10
  34. package/dist/cjs/components/badge/badge.js +1 -1
  35. package/dist/cjs/components/badge/badge.recipe.js +1 -1
  36. package/dist/cjs/components/barchart/barchart.js +3 -3
  37. package/dist/cjs/components/barchart/barchart.recipe.js +14 -14
  38. package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
  39. package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +6 -6
  40. package/dist/cjs/components/bulkbar/bulkbar.js +2 -2
  41. package/dist/cjs/components/bulkbar/bulkbar.recipe.js +10 -10
  42. package/dist/cjs/components/callout/callout.js +1 -1
  43. package/dist/cjs/components/callout/callout.recipe.js +9 -9
  44. package/dist/cjs/components/card/card.js +3 -3
  45. package/dist/cjs/components/card/card.recipe.js +5 -5
  46. package/dist/cjs/components/columncalc/columncalc.js +1 -1
  47. package/dist/cjs/components/columncalc/columncalc.recipe.js +16 -9
  48. package/dist/cjs/components/contextmenu/contextmenu.js +4 -4
  49. package/dist/cjs/components/contextmenu/contextmenu.recipe.js +9 -9
  50. package/dist/cjs/components/datatable/datatable.js +32 -22
  51. package/dist/cjs/components/datatable/datatable.recipe.js +57 -57
  52. package/dist/cjs/components/datepicker/datepicker.js +12 -12
  53. package/dist/cjs/components/datepicker/datepicker.recipe.js +45 -45
  54. package/dist/cjs/components/datepickerfield/datepickerfield.js +2 -2
  55. package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +9 -9
  56. package/dist/cjs/components/dialog/dialog.js +5 -5
  57. package/dist/cjs/components/dialog/dialog.recipe.js +16 -16
  58. package/dist/cjs/components/donutchart/donutchart.js +1 -1
  59. package/dist/cjs/components/donutchart/donutchart.recipe.js +12 -12
  60. package/dist/cjs/components/drawer/drawer.js +3 -3
  61. package/dist/cjs/components/drawer/drawer.recipe.js +14 -14
  62. package/dist/cjs/components/emptystate/emptystate.js +1 -1
  63. package/dist/cjs/components/emptystate/emptystate.recipe.js +9 -9
  64. package/dist/cjs/components/fileupload/fileupload.js +3 -3
  65. package/dist/cjs/components/fileupload/fileupload.recipe.js +23 -23
  66. package/dist/cjs/components/formfield/formfield.js +1 -1
  67. package/dist/cjs/components/formfield/formfield.recipe.js +5 -5
  68. package/dist/cjs/components/input/input.js +1 -1
  69. package/dist/cjs/components/input/input.recipe.js +6 -6
  70. package/dist/cjs/components/linechart/linechart.js +4 -4
  71. package/dist/cjs/components/linechart/linechart.recipe.js +14 -14
  72. package/dist/cjs/components/menu/menu.js +6 -6
  73. package/dist/cjs/components/menu/menu.recipe.js +19 -19
  74. package/dist/cjs/components/multiselect/multiselect.js +5 -5
  75. package/dist/cjs/components/multiselect/multiselect.recipe.js +29 -29
  76. package/dist/cjs/components/popover/popover.js +1 -1
  77. package/dist/cjs/components/popover/popover.recipe.js +3 -3
  78. package/dist/cjs/components/progress/progress.js +2 -2
  79. package/dist/cjs/components/progress/progress.recipe.js +3 -3
  80. package/dist/cjs/components/quantitypicker/quantitypicker.js +2 -2
  81. package/dist/cjs/components/quantitypicker/quantitypicker.recipe.js +16 -16
  82. package/dist/cjs/components/radiogroup/radiogroup.js +1 -1
  83. package/dist/cjs/components/radiogroup/radiogroup.recipe.js +14 -14
  84. package/dist/cjs/components/resizablepanel/resizablepanel.js +3 -3
  85. package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +24 -24
  86. package/dist/cjs/components/segmented/segmented.js +4 -4
  87. package/dist/cjs/components/segmented/segmented.recipe.js +7 -7
  88. package/dist/cjs/components/select/select.js +3 -3
  89. package/dist/cjs/components/select/select.recipe.js +25 -25
  90. package/dist/cjs/components/slider/slider.js +2 -2
  91. package/dist/cjs/components/slider/slider.recipe.js +15 -15
  92. package/dist/cjs/components/stagebar/stagebar.js +1 -1
  93. package/dist/cjs/components/stagebar/stagebar.recipe.js +1 -1
  94. package/dist/cjs/components/statcard/statcard.js +1 -1
  95. package/dist/cjs/components/statcard/statcard.recipe.js +9 -9
  96. package/dist/cjs/components/switch/switch.js +1 -1
  97. package/dist/cjs/components/switch/switch.recipe.js +2 -2
  98. package/dist/cjs/components/table/table.js +1 -1
  99. package/dist/cjs/components/table/table.recipe.js +1 -1
  100. package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
  101. package/dist/cjs/components/tabletoolbar/tabletoolbar.js +13 -13
  102. package/dist/cjs/components/tabs/tabs.js +4 -4
  103. package/dist/cjs/components/tabs/tabs.recipe.js +12 -12
  104. package/dist/cjs/components/textarea/textarea.js +2 -2
  105. package/dist/cjs/components/textarea/textarea.recipe.js +11 -11
  106. package/dist/cjs/components/toast/toast.js +4 -4
  107. package/dist/cjs/components/toast/toast.recipe.js +14 -14
  108. package/dist/cjs/components/wheelpicker/wheelpicker.js +2 -2
  109. package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +19 -19
  110. package/dist/cjs/core/namespace.js +17 -0
  111. package/dist/cjs/core/resolve.js +5 -3
  112. package/dist/cjs/product/appshell/appshell.js +2 -2
  113. package/dist/cjs/product/appshell/appshell.recipe.js +8 -8
  114. package/dist/cjs/product/authshell/authshell.js +1 -1
  115. package/dist/cjs/product/authshell/authshell.recipe.js +20 -20
  116. package/dist/cjs/product/board/board.js +3 -3
  117. package/dist/cjs/product/board/board.recipe.js +17 -17
  118. package/dist/cjs/product/command/command.js +3 -3
  119. package/dist/cjs/product/command/command.recipe.js +25 -25
  120. package/dist/cjs/product/entitycard/entitycard.js +1 -1
  121. package/dist/cjs/product/entitycard/entitycard.recipe.js +7 -7
  122. package/dist/cjs/product/flowcanvas/flowcanvas.js +5 -5
  123. package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +11 -11
  124. package/dist/cjs/product/inbox/inbox.js +1 -1
  125. package/dist/cjs/product/inbox/inbox.recipe.js +22 -22
  126. package/dist/cjs/product/listpage/listpage.js +3 -3
  127. package/dist/cjs/product/listpage/listpage.recipe.js +18 -18
  128. package/dist/cjs/product/navitem/navitem.js +1 -1
  129. package/dist/cjs/product/navitem/navitem.recipe.js +2 -2
  130. package/dist/cjs/product/onboarding/onboarding.js +1 -1
  131. package/dist/cjs/product/onboarding/onboarding.recipe.js +19 -19
  132. package/dist/cjs/product/recordpage/recordpage.js +24 -24
  133. package/dist/cjs/product/recordpage/recordpage.recipe.js +117 -117
  134. package/dist/cjs/product/recordpanel/recordpanel.js +4 -4
  135. package/dist/cjs/product/recordpanel/recordpanel.recipe.js +15 -15
  136. package/dist/cjs/product/recordstable/recordstable.js +48 -48
  137. package/dist/cjs/product/recordstable/recordstable.recipe.js +87 -87
  138. package/dist/cjs/product/recordstable/recordstable.tag.js +8 -8
  139. package/dist/cjs/product/richtext/richtext.js +4 -4
  140. package/dist/cjs/product/richtext/richtext.recipe.js +21 -21
  141. package/dist/cjs/product/settingssection/settingssection.js +1 -1
  142. package/dist/cjs/product/settingssection/settingssection.recipe.js +6 -6
  143. package/dist/cjs/product/settingsshell/settingsshell.js +1 -1
  144. package/dist/cjs/product/settingsshell/settingsshell.recipe.js +20 -20
  145. package/dist/cjs/product/sidebar/sidebar.js +2 -2
  146. package/dist/cjs/product/sidebar/sidebar.recipe.js +21 -21
  147. package/dist/cjs/product/tasklist/tasklist.js +2 -2
  148. package/dist/cjs/product/tasklist/tasklist.recipe.js +14 -14
  149. package/dist/cjs/product/trialbanner/trialbanner.js +1 -1
  150. package/dist/cjs/product/trialbanner/trialbanner.recipe.js +6 -6
  151. package/dist/cjs/product/viewtoggle/viewtoggle.js +1 -1
  152. package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +4 -4
  153. package/dist/cjs/tokens/contract.js +3 -2
  154. package/dist/columncalc.css +19 -12
  155. package/dist/columncalc.layered.css +35 -0
  156. package/dist/command.css +28 -28
  157. package/dist/command.layered.css +44 -0
  158. package/dist/contextmenu.css +12 -12
  159. package/dist/contextmenu.layered.css +22 -0
  160. package/dist/datatable.css +66 -66
  161. package/dist/datatable.layered.css +108 -0
  162. package/dist/datepicker.css +86 -86
  163. package/dist/datepicker.layered.css +179 -0
  164. package/dist/datepickerfield.css +19 -19
  165. package/dist/datepickerfield.layered.css +29 -0
  166. package/dist/dialog.css +19 -19
  167. package/dist/dialog.layered.css +29 -0
  168. package/dist/divider.css +2 -2
  169. package/dist/divider.layered.css +7 -0
  170. package/dist/donutchart.css +15 -15
  171. package/dist/donutchart.layered.css +26 -0
  172. package/dist/drawer.css +17 -17
  173. package/dist/drawer.layered.css +27 -0
  174. package/dist/emptystate.css +15 -15
  175. package/dist/emptystate.layered.css +22 -0
  176. package/dist/entitycard.css +14 -14
  177. package/dist/entitycard.layered.css +28 -0
  178. package/dist/esm/components/accordion/accordion.js +1 -1
  179. package/dist/esm/components/accordion/accordion.recipe.js +10 -10
  180. package/dist/esm/components/badge/badge.js +1 -1
  181. package/dist/esm/components/badge/badge.recipe.js +1 -1
  182. package/dist/esm/components/barchart/barchart.js +3 -3
  183. package/dist/esm/components/barchart/barchart.recipe.js +14 -14
  184. package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
  185. package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +6 -6
  186. package/dist/esm/components/bulkbar/bulkbar.js +2 -2
  187. package/dist/esm/components/bulkbar/bulkbar.recipe.js +10 -10
  188. package/dist/esm/components/callout/callout.js +1 -1
  189. package/dist/esm/components/callout/callout.recipe.js +9 -9
  190. package/dist/esm/components/card/card.js +3 -3
  191. package/dist/esm/components/card/card.recipe.js +5 -5
  192. package/dist/esm/components/columncalc/columncalc.js +1 -1
  193. package/dist/esm/components/columncalc/columncalc.recipe.js +16 -9
  194. package/dist/esm/components/contextmenu/contextmenu.js +4 -4
  195. package/dist/esm/components/contextmenu/contextmenu.recipe.js +9 -9
  196. package/dist/esm/components/datatable/datatable.js +32 -22
  197. package/dist/esm/components/datatable/datatable.recipe.js +57 -57
  198. package/dist/esm/components/datepicker/datepicker.js +12 -12
  199. package/dist/esm/components/datepicker/datepicker.recipe.js +45 -45
  200. package/dist/esm/components/datepickerfield/datepickerfield.js +2 -2
  201. package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +9 -9
  202. package/dist/esm/components/dialog/dialog.js +5 -5
  203. package/dist/esm/components/dialog/dialog.recipe.js +16 -16
  204. package/dist/esm/components/donutchart/donutchart.js +1 -1
  205. package/dist/esm/components/donutchart/donutchart.recipe.js +12 -12
  206. package/dist/esm/components/drawer/drawer.js +3 -3
  207. package/dist/esm/components/drawer/drawer.recipe.js +14 -14
  208. package/dist/esm/components/emptystate/emptystate.js +1 -1
  209. package/dist/esm/components/emptystate/emptystate.recipe.js +9 -9
  210. package/dist/esm/components/fileupload/fileupload.js +3 -3
  211. package/dist/esm/components/fileupload/fileupload.recipe.js +23 -23
  212. package/dist/esm/components/formfield/formfield.js +1 -1
  213. package/dist/esm/components/formfield/formfield.recipe.js +5 -5
  214. package/dist/esm/components/input/input.js +1 -1
  215. package/dist/esm/components/input/input.recipe.js +6 -6
  216. package/dist/esm/components/linechart/linechart.js +4 -4
  217. package/dist/esm/components/linechart/linechart.recipe.js +14 -14
  218. package/dist/esm/components/menu/menu.js +6 -6
  219. package/dist/esm/components/menu/menu.recipe.js +19 -19
  220. package/dist/esm/components/multiselect/multiselect.js +5 -5
  221. package/dist/esm/components/multiselect/multiselect.recipe.js +29 -29
  222. package/dist/esm/components/popover/popover.js +1 -1
  223. package/dist/esm/components/popover/popover.recipe.js +3 -3
  224. package/dist/esm/components/progress/progress.js +2 -2
  225. package/dist/esm/components/progress/progress.recipe.js +3 -3
  226. package/dist/esm/components/quantitypicker/quantitypicker.js +2 -2
  227. package/dist/esm/components/quantitypicker/quantitypicker.recipe.js +16 -16
  228. package/dist/esm/components/radiogroup/radiogroup.js +1 -1
  229. package/dist/esm/components/radiogroup/radiogroup.recipe.js +14 -14
  230. package/dist/esm/components/resizablepanel/resizablepanel.js +3 -3
  231. package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +24 -24
  232. package/dist/esm/components/segmented/segmented.js +4 -4
  233. package/dist/esm/components/segmented/segmented.recipe.js +7 -7
  234. package/dist/esm/components/select/select.js +3 -3
  235. package/dist/esm/components/select/select.recipe.js +25 -25
  236. package/dist/esm/components/slider/slider.js +2 -2
  237. package/dist/esm/components/slider/slider.recipe.js +15 -15
  238. package/dist/esm/components/stagebar/stagebar.js +1 -1
  239. package/dist/esm/components/stagebar/stagebar.recipe.js +1 -1
  240. package/dist/esm/components/statcard/statcard.js +1 -1
  241. package/dist/esm/components/statcard/statcard.recipe.js +9 -9
  242. package/dist/esm/components/switch/switch.js +1 -1
  243. package/dist/esm/components/switch/switch.recipe.js +2 -2
  244. package/dist/esm/components/table/table.js +1 -1
  245. package/dist/esm/components/table/table.recipe.js +1 -1
  246. package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +65 -64
  247. package/dist/esm/components/tabletoolbar/tabletoolbar.js +13 -13
  248. package/dist/esm/components/tabs/tabs.js +4 -4
  249. package/dist/esm/components/tabs/tabs.recipe.js +12 -12
  250. package/dist/esm/components/textarea/textarea.js +2 -2
  251. package/dist/esm/components/textarea/textarea.recipe.js +11 -11
  252. package/dist/esm/components/toast/toast.js +4 -4
  253. package/dist/esm/components/toast/toast.recipe.js +14 -14
  254. package/dist/esm/components/wheelpicker/wheelpicker.js +2 -2
  255. package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +19 -19
  256. package/dist/esm/core/namespace.js +14 -0
  257. package/dist/esm/core/resolve.js +5 -3
  258. package/dist/esm/product/appshell/appshell.js +2 -2
  259. package/dist/esm/product/appshell/appshell.recipe.js +8 -8
  260. package/dist/esm/product/authshell/authshell.js +1 -1
  261. package/dist/esm/product/authshell/authshell.recipe.js +20 -20
  262. package/dist/esm/product/board/board.js +3 -3
  263. package/dist/esm/product/board/board.recipe.js +17 -17
  264. package/dist/esm/product/command/command.js +3 -3
  265. package/dist/esm/product/command/command.recipe.js +25 -25
  266. package/dist/esm/product/entitycard/entitycard.js +1 -1
  267. package/dist/esm/product/entitycard/entitycard.recipe.js +7 -7
  268. package/dist/esm/product/flowcanvas/flowcanvas.js +5 -5
  269. package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +11 -11
  270. package/dist/esm/product/inbox/inbox.js +1 -1
  271. package/dist/esm/product/inbox/inbox.recipe.js +22 -22
  272. package/dist/esm/product/listpage/listpage.js +3 -3
  273. package/dist/esm/product/listpage/listpage.recipe.js +18 -18
  274. package/dist/esm/product/navitem/navitem.js +1 -1
  275. package/dist/esm/product/navitem/navitem.recipe.js +2 -2
  276. package/dist/esm/product/onboarding/onboarding.js +1 -1
  277. package/dist/esm/product/onboarding/onboarding.recipe.js +19 -19
  278. package/dist/esm/product/recordpage/recordpage.js +24 -24
  279. package/dist/esm/product/recordpage/recordpage.recipe.js +117 -117
  280. package/dist/esm/product/recordpanel/recordpanel.js +4 -4
  281. package/dist/esm/product/recordpanel/recordpanel.recipe.js +15 -15
  282. package/dist/esm/product/recordstable/recordstable.js +48 -48
  283. package/dist/esm/product/recordstable/recordstable.recipe.js +87 -87
  284. package/dist/esm/product/recordstable/recordstable.tag.js +8 -8
  285. package/dist/esm/product/richtext/richtext.js +4 -4
  286. package/dist/esm/product/richtext/richtext.recipe.js +21 -21
  287. package/dist/esm/product/settingssection/settingssection.js +1 -1
  288. package/dist/esm/product/settingssection/settingssection.recipe.js +6 -6
  289. package/dist/esm/product/settingsshell/settingsshell.js +1 -1
  290. package/dist/esm/product/settingsshell/settingsshell.recipe.js +20 -20
  291. package/dist/esm/product/sidebar/sidebar.js +2 -2
  292. package/dist/esm/product/sidebar/sidebar.recipe.js +21 -21
  293. package/dist/esm/product/tasklist/tasklist.js +2 -2
  294. package/dist/esm/product/tasklist/tasklist.recipe.js +14 -14
  295. package/dist/esm/product/trialbanner/trialbanner.js +1 -1
  296. package/dist/esm/product/trialbanner/trialbanner.recipe.js +6 -6
  297. package/dist/esm/product/viewtoggle/viewtoggle.js +1 -1
  298. package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +4 -4
  299. package/dist/esm/tokens/contract.js +3 -2
  300. package/dist/fileupload.css +46 -46
  301. package/dist/fileupload.layered.css +91 -0
  302. package/dist/flowcanvas.css +13 -13
  303. package/dist/flowcanvas.layered.css +17 -0
  304. package/dist/formfield.css +7 -7
  305. package/dist/formfield.layered.css +10 -0
  306. package/dist/inbox.css +26 -26
  307. package/dist/inbox.layered.css +41 -0
  308. package/dist/input.css +17 -17
  309. package/dist/input.layered.css +45 -0
  310. package/dist/kbd.css +2 -2
  311. package/dist/kbd.layered.css +5 -0
  312. package/dist/linechart.css +14 -14
  313. package/dist/linechart.layered.css +17 -0
  314. package/dist/listpage.css +22 -22
  315. package/dist/listpage.layered.css +41 -0
  316. package/dist/menu.css +29 -29
  317. package/dist/menu.layered.css +48 -0
  318. package/dist/multiselect.css +42 -42
  319. package/dist/multiselect.layered.css +63 -0
  320. package/dist/navitem.css +14 -14
  321. package/dist/navitem.layered.css +25 -0
  322. package/dist/onboarding.css +24 -24
  323. package/dist/onboarding.layered.css +39 -0
  324. package/dist/popover.css +6 -6
  325. package/dist/popover.layered.css +16 -0
  326. package/dist/progress.css +7 -7
  327. package/dist/progress.layered.css +17 -0
  328. package/dist/quantitypicker.css +34 -34
  329. package/dist/quantitypicker.layered.css +80 -0
  330. package/dist/radiogroup.css +18 -18
  331. package/dist/radiogroup.layered.css +33 -0
  332. package/dist/recordpage.css +122 -122
  333. package/dist/recordpage.layered.css +153 -0
  334. package/dist/recordpanel.css +31 -31
  335. package/dist/recordpanel.layered.css +50 -0
  336. package/dist/recordstable.css +162 -162
  337. package/dist/recordstable.layered.css +222 -0
  338. package/dist/resizablepanel.css +26 -26
  339. package/dist/resizablepanel.layered.css +55 -0
  340. package/dist/richtext.css +24 -24
  341. package/dist/richtext.layered.css +38 -0
  342. package/dist/segmented.css +10 -10
  343. package/dist/segmented.layered.css +20 -0
  344. package/dist/select.css +43 -43
  345. package/dist/select.layered.css +72 -0
  346. package/dist/settingssection.css +8 -8
  347. package/dist/settingssection.layered.css +11 -0
  348. package/dist/settingsshell.css +23 -23
  349. package/dist/settingsshell.layered.css +44 -0
  350. package/dist/sidebar.css +27 -27
  351. package/dist/sidebar.layered.css +40 -0
  352. package/dist/skeleton.css +4 -4
  353. package/dist/skeleton.layered.css +15 -0
  354. package/dist/slider.css +23 -23
  355. package/dist/slider.layered.css +58 -0
  356. package/dist/spinner.css +3 -3
  357. package/dist/spinner.layered.css +14 -0
  358. package/dist/stagebar.css +4 -4
  359. package/dist/stagebar.layered.css +14 -0
  360. package/dist/statcard.css +14 -14
  361. package/dist/statcard.layered.css +21 -0
  362. package/dist/styles.css +1816 -1725
  363. package/dist/styles.layered.css +2932 -0
  364. package/dist/switch.css +7 -7
  365. package/dist/switch.layered.css +22 -0
  366. package/dist/table.css +16 -16
  367. package/dist/table.layered.css +36 -0
  368. package/dist/tabletoolbar.css +67 -67
  369. package/dist/tabletoolbar.layered.css +80 -0
  370. package/dist/tabs.css +15 -15
  371. package/dist/tabs.layered.css +29 -0
  372. package/dist/tasklist.css +17 -17
  373. package/dist/tasklist.layered.css +34 -0
  374. package/dist/textarea.css +18 -18
  375. package/dist/textarea.layered.css +42 -0
  376. package/dist/toast.css +17 -17
  377. package/dist/toast.layered.css +27 -0
  378. package/dist/tokens.css +199 -115
  379. package/dist/tooltip.css +3 -3
  380. package/dist/tooltip.layered.css +13 -0
  381. package/dist/trialbanner.css +13 -13
  382. package/dist/trialbanner.layered.css +28 -0
  383. package/dist/types/core/namespace.d.ts +2 -0
  384. package/dist/viewtoggle.css +10 -10
  385. package/dist/viewtoggle.layered.css +23 -0
  386. package/dist/wheelpicker.css +29 -29
  387. package/dist/wheelpicker.layered.css +70 -0
  388. package/licenses/Apache-2.0.txt +201 -0
  389. package/package.json +5 -2
@@ -80,7 +80,7 @@ function formatCell(type, v, symbol) {
80
80
  // display string belongs -- as an entity's name, a status' label -- while the
81
81
  // raw value keeps driving structure and tone.
82
82
  function renderTyped(col, value, avatarTone, display) {
83
- const empty = _jsx("span", { className: "datatable-muted", children: "\u2014" });
83
+ const empty = _jsx("span", { className: "crisp-datatable-muted", children: "\u2014" });
84
84
  switch (col.type) {
85
85
  case "entity": {
86
86
  const raw = (typeof value === "object" && value ? value : { name: asText(value) });
@@ -89,7 +89,7 @@ function renderTyped(col, value, avatarTone, display) {
89
89
  const e = display ? { ...raw, name: display } : raw;
90
90
  if (!e.name)
91
91
  return empty;
92
- return (_jsxs("span", { className: "datatable-entity", children: [_jsx("span", { className: "datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, children: e.avatar ? (_jsx("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), _jsx("span", { className: "datatable-entity-name", children: e.name })] }));
92
+ return (_jsxs("span", { className: "crisp-datatable-entity", children: [_jsx("span", { className: "crisp-datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, children: e.avatar ? (_jsx("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), _jsx("span", { className: "crisp-datatable-entity-name", children: e.name })] }));
93
93
  }
94
94
  case "tags": {
95
95
  // asking for a format on a tag column means "render it your way" -- show
@@ -99,7 +99,7 @@ function renderTyped(col, value, avatarTone, display) {
99
99
  const tags = Array.isArray(value) ? value : [];
100
100
  if (!tags.length)
101
101
  return empty;
102
- return (_jsx("span", { className: "datatable-tags", children: tags.map((t) => (_jsx("span", { className: "datatable-tag", "data-tone": col.tones?.[t] ?? toneFor(t), children: t }, t))) }));
102
+ return (_jsx("span", { className: "crisp-datatable-tags", children: tags.map((t) => (_jsx("span", { className: "crisp-datatable-tag", "data-tone": col.tones?.[t] ?? toneFor(t), children: t }, t))) }));
103
103
  }
104
104
  case "status": {
105
105
  const s = asText(value);
@@ -107,14 +107,14 @@ function renderTyped(col, value, avatarTone, display) {
107
107
  return empty;
108
108
  // tone is looked up by the RAW status, so formatting the label (casing,
109
109
  // translation) can never silently repaint the chip
110
- return (_jsx("span", { className: "datatable-tag", "data-tone": col.tones?.[s] ?? toneFor(s), children: display || s }));
110
+ return (_jsx("span", { className: "crisp-datatable-tag", "data-tone": col.tones?.[s] ?? toneFor(s), children: display || s }));
111
111
  }
112
112
  default: {
113
113
  const text = display || formatCell(col.type, value, col.symbol);
114
114
  const isNum = col.type === "number" || col.type === "currency";
115
115
  if (!text)
116
116
  return empty;
117
- return isNum ? _jsx("span", { className: "datatable-num", children: text }) : text;
117
+ return isNum ? _jsx("span", { className: "crisp-datatable-num", children: text }) : text;
118
118
  }
119
119
  }
120
120
  }
@@ -366,21 +366,29 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
366
366
  // sticky attrs for the leading column(s): grip col (index -2) + selection
367
367
  // col (-1) + first data column (0). Each offsets by whatever leading
368
368
  // columns come before it, so the group stays contiguous when scrolled.
369
+ // `insetInlineStart`, never `left`: the offset pins the column to the
370
+ // LEADING edge, which is the right one under `dir="rtl"`. A physical `left`
371
+ // pins to the trailing edge instead, and the column scrolls out of view the
372
+ // moment sticky would have engaged (#285). RecordsTable does the same job in
373
+ // CSS and has used the logical property since #91 -- this offset is computed
374
+ // here rather than in a recipe, which is why that sweep could not reach it.
369
375
  const stickyCol = (index) => {
370
376
  if (!stickyFirst)
371
377
  return {};
372
378
  if (showGrip && index === -2)
373
- return { "data-sticky": "", style: { left: 0 } };
379
+ return { "data-sticky": "", style: { insetInlineStart: 0 } };
374
380
  if (selectable && index === -1)
375
381
  return {
376
382
  "data-sticky": "",
377
- style: { left: showGrip ? GRIP_W : 0 },
383
+ style: { insetInlineStart: showGrip ? GRIP_W : 0 },
378
384
  };
379
385
  if (index === 0)
380
386
  return {
381
387
  "data-sticky": "",
382
388
  "data-sticky-edge": "",
383
- style: { left: (showGrip ? GRIP_W : 0) + (selectable ? CHECK_W : 0) },
389
+ style: {
390
+ insetInlineStart: (showGrip ? GRIP_W : 0) + (selectable ? CHECK_W : 0),
391
+ },
384
392
  };
385
393
  return {};
386
394
  };
@@ -417,13 +425,13 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
417
425
  function ChevronFor({ colKey }) {
418
426
  const dir = sortDirByKey.get(colKey);
419
427
  if (dir)
420
- return dir === "asc" ? (_jsx(ArrowUp, { className: "datatable-chevron", size: 13, strokeWidth: 2 })) : (_jsx(ArrowDown, { className: "datatable-chevron", size: 13, strokeWidth: 2 }));
421
- return (_jsx(ChevronsUpDown, { className: "datatable-chevron", size: 13, strokeWidth: 2 }));
428
+ return dir === "asc" ? (_jsx(ArrowUp, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 })) : (_jsx(ArrowDown, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 }));
429
+ return (_jsx(ChevronsUpDown, { className: "crisp-datatable-chevron", size: 13, strokeWidth: 2 }));
422
430
  }
423
- return (_jsxs("div", { ref: gridRef, className: datatableRecipe({ className }), tabIndex: -1, onKeyDown: onGridKeyDown, ...rest, children: [(filterable || showCount || toolbar || columnMenu) && (_jsxs("div", { className: "datatable-toolbar", children: [columnMenu && (_jsxs(Menu, { align: "start", trigger: _jsxs("button", { type: "button", className: "datatable-viewsettings", children: [_jsx(SlidersHorizontal, { size: 14, strokeWidth: 1.75 }), "View settings"] }), children: [_jsx("div", { className: "datatable-group-label", children: "Columns" }), allColumns.map((c) => (_jsxs(MenuItem, { onSelect: () => c.hidden ? showColumn(c.key) : hideColumn(c.key), children: [_jsx(Check, { size: 14, strokeWidth: 2, style: { opacity: c.hidden ? 0 : 1 } }), typeof c.header === "string" ? c.header : c.key] }, c.key)))] })), filterable && (_jsxs("span", { className: "datatable-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), _jsx("input", { type: "search", placeholder: searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value), "aria-label": searchLabel })] })), showCount && (_jsx("span", { className: "datatable-count", children: countLabel(rows.length, data.length) })), toolbar] })), _jsxs(Table, { interactive: interactive, surface: surface, style: { minWidth }, scrollProps: {
431
+ return (_jsxs("div", { ref: gridRef, className: datatableRecipe({ className }), tabIndex: -1, onKeyDown: onGridKeyDown, ...rest, children: [(filterable || showCount || toolbar || columnMenu) && (_jsxs("div", { className: "crisp-datatable-toolbar", children: [columnMenu && (_jsxs(Menu, { align: "start", trigger: _jsxs("button", { type: "button", className: "crisp-datatable-viewsettings", children: [_jsx(SlidersHorizontal, { size: 14, strokeWidth: 1.75 }), "View settings"] }), children: [_jsx("div", { className: "crisp-datatable-group-label", children: "Columns" }), allColumns.map((c) => (_jsxs(MenuItem, { onSelect: () => c.hidden ? showColumn(c.key) : hideColumn(c.key), children: [_jsx(Check, { size: 14, strokeWidth: 2, style: { opacity: c.hidden ? 0 : 1 } }), typeof c.header === "string" ? c.header : c.key] }, c.key)))] })), filterable && (_jsxs("span", { className: "crisp-datatable-search", children: [_jsx(Search, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), _jsx("input", { type: "search", placeholder: searchPlaceholder, value: query, onChange: (e) => setQuery(e.target.value), "aria-label": searchLabel })] })), showCount && (_jsx("span", { className: "crisp-datatable-count", children: countLabel(rows.length, data.length) })), toolbar] })), _jsxs(Table, { interactive: interactive, surface: surface, style: { minWidth }, scrollProps: {
424
432
  onScroll: (e) => setScrolledX(e.currentTarget.scrollLeft > 0),
425
433
  ...(scrolledX ? { "data-scrolled-x": "" } : {}),
426
- }, children: [_jsxs("colgroup", { children: [showGrip && _jsx("col", { style: { width: GRIP_W } }), selectable && _jsx("col", { style: { width: CHECK_W } }), columns.map((col) => (_jsx("col", { style: { width: colWidth(col) } }, col.key)))] }), _jsx(TableHeader, { children: _jsxs(TableRow, { children: [showGrip && (_jsx(TableHead, { className: "datatable-col-grip", ...stickyCol(-2) })), selectable && (_jsx(TableHead, { className: "datatable-col-check", ...stickyCol(-1), children: _jsx("span", { className: "datatable-check", children: _jsx(Checkbox, { "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, onChange: toggleAll }) }) })), columns.map((col, i) => {
434
+ }, children: [_jsxs("colgroup", { children: [showGrip && _jsx("col", { style: { width: GRIP_W } }), selectable && _jsx("col", { style: { width: CHECK_W } }), columns.map((col) => (_jsx("col", { style: { width: colWidth(col) } }, col.key)))] }), _jsx(TableHeader, { children: _jsxs(TableRow, { children: [showGrip && (_jsx(TableHead, { className: "crisp-datatable-col-grip", ...stickyCol(-2) })), selectable && (_jsx(TableHead, { className: "crisp-datatable-col-check", ...stickyCol(-1), children: _jsx("span", { className: "crisp-datatable-check", children: _jsx(Checkbox, { "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, onChange: toggleAll }) }) })), columns.map((col, i) => {
427
435
  const Icon = col.icon;
428
436
  // The sort direction was painted (`data-sorted`) and never
429
437
  // announced: a screen reader heard the same header before and
@@ -439,10 +447,10 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
439
447
  ? "ascending"
440
448
  : "descending"
441
449
  : "none";
442
- const inner = (_jsxs("span", { className: "datatable-th-inner", children: [Icon ? _jsx(Icon, { size: 14, strokeWidth: 1.75 }) : null, _jsx("span", { className: "datatable-th-label", children: col.header }), col.sortable ? _jsx(ChevronFor, { colKey: col.key }) : null] }));
450
+ const inner = (_jsxs("span", { className: "crisp-datatable-th-inner", children: [Icon ? _jsx(Icon, { size: 14, strokeWidth: 1.75 }) : null, _jsx("span", { className: "crisp-datatable-th-label", children: col.header }), col.sortable ? _jsx(ChevronFor, { colKey: col.key }) : null] }));
443
451
  return (_jsxs(TableHead, { align: alignFor(col), "aria-sort": ariaSort, ...stickyCol(i), children: [renaming === col.key ? (_jsx("input", {
444
452
  // biome-ignore lint/a11y/noAutofocus: the rename item opens this field
445
- autoFocus: true, className: "datatable-th-rename", defaultValue: typeof col.header === "string" ? col.header : "", "aria-label": `Rename column`, onBlur: (e) => {
453
+ autoFocus: true, className: "crisp-datatable-th-rename", defaultValue: typeof col.header === "string" ? col.header : "", "aria-label": `Rename column`, onBlur: (e) => {
446
454
  renameColumn(col.key, e.currentTarget.value);
447
455
  setRenaming(null);
448
456
  }, onKeyDown: (e) => {
@@ -452,10 +460,10 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
452
460
  }
453
461
  else if (e.key === "Escape")
454
462
  setRenaming(null);
455
- } })) : columnMenu ? (_jsxs(Menu, { align: "start", trigger: _jsx("button", { type: "button", className: "datatable-sort", "data-sorted": sortDirByKey.get(col.key), "aria-label": `${typeof col.header === "string"
463
+ } })) : columnMenu ? (_jsxs(Menu, { align: "start", trigger: _jsx("button", { type: "button", className: "crisp-datatable-sort", "data-sorted": sortDirByKey.get(col.key), "aria-label": `${typeof col.header === "string"
456
464
  ? col.header
457
- : col.key} column options`, children: inner }), children: [_jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "asc" }), children: "Sort ascending" }), _jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "desc" }), children: "Sort descending" }), col.managed === false ? null : (_jsxs(_Fragment, { children: [_jsx(MenuItem, { onSelect: () => moveColumn(col.key, -1), children: "Move left" }), _jsx(MenuItem, { onSelect: () => moveColumn(col.key, 1), children: "Move right" }), _jsx(MenuItem, { onSelect: () => setRenaming(col.key), children: "Edit column label" }), _jsx(MenuItem, { onSelect: () => hideColumn(col.key), children: "Hide from view" })] }))] })) : col.sortable ? (_jsx("button", { type: "button", className: "datatable-sort", "data-sorted": sortDirByKey.get(col.key), onClick: () => cycleSort(col.key), children: inner })) : (inner), col.resizable !== false && (_jsx("span", { className: "datatable-resize", "data-resizing": resizingKey === col.key ? "" : undefined, onPointerDown: (e) => startResize(col, e), onPointerMove: moveResize, onPointerUp: endResize }))] }, col.key));
458
- })] }) }), _jsx(TableBody, { children: error ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "datatable-empty", children: error }) }) })) : rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "datatable-empty", children: empty }) }) })) : (groupedRows.map(({ group, rows: groupRows }) => (_jsxs(React.Fragment, { children: [group !== null && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: totalCols, className: "datatable-group", children: [_jsx("span", { className: "datatable-group-label", children: group }), _jsx("span", { className: "datatable-group-count", children: groupRows.length })] }) })), groupRows.map((row) => (_jsxs(TableRow, { "data-selected": selected.has(row.id) ? "" : undefined, "data-drop-target": showGrip &&
465
+ : col.key} column options`, children: inner }), children: [_jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "asc" }), children: "Sort ascending" }), _jsx(MenuItem, { onSelect: () => setSort({ key: col.key, dir: "desc" }), children: "Sort descending" }), col.managed === false ? null : (_jsxs(_Fragment, { children: [_jsx(MenuItem, { onSelect: () => moveColumn(col.key, -1), children: "Move left" }), _jsx(MenuItem, { onSelect: () => moveColumn(col.key, 1), children: "Move right" }), _jsx(MenuItem, { onSelect: () => setRenaming(col.key), children: "Edit column label" }), _jsx(MenuItem, { onSelect: () => hideColumn(col.key), children: "Hide from view" })] }))] })) : col.sortable ? (_jsx("button", { type: "button", className: "crisp-datatable-sort", "data-sorted": sortDirByKey.get(col.key), onClick: () => cycleSort(col.key), children: inner })) : (inner), col.resizable !== false && (_jsx("span", { className: "crisp-datatable-resize", "data-resizing": resizingKey === col.key ? "" : undefined, onPointerDown: (e) => startResize(col, e), onPointerMove: moveResize, onPointerUp: endResize }))] }, col.key));
466
+ })] }) }), _jsx(TableBody, { children: error ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "crisp-datatable-empty", children: error }) }) })) : rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: totalCols, children: _jsx("div", { className: "crisp-datatable-empty", children: empty }) }) })) : (groupedRows.map(({ group, rows: groupRows }) => (_jsxs(React.Fragment, { children: [group !== null && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: totalCols, className: "crisp-datatable-group", children: [_jsx("span", { className: "crisp-datatable-group-label", children: group }), _jsx("span", { className: "crisp-datatable-group-count", children: groupRows.length })] }) })), groupRows.map((row) => (_jsxs(TableRow, { "data-selected": selected.has(row.id) ? "" : undefined, "data-drop-target": showGrip &&
459
467
  dragRowId &&
460
468
  dragRowId !== row.id &&
461
469
  dropRowId === row.id
@@ -471,18 +479,18 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
471
479
  e.preventDefault();
472
480
  reorderRows(dragRowId, row.id);
473
481
  }
474
- : undefined, children: [showGrip && (_jsx(TableCell, { className: "datatable-col-grip", ...stickyCol(-2), onClick: (e) => e.stopPropagation(), children: _jsx("button", { type: "button", className: "datatable-grip", "aria-label": reorderRowLabel, draggable: true, onDragStart: (e) => {
482
+ : undefined, children: [showGrip && (_jsx(TableCell, { className: "crisp-datatable-col-grip", ...stickyCol(-2), onClick: (e) => e.stopPropagation(), children: _jsx("button", { type: "button", className: "crisp-datatable-grip", "aria-label": reorderRowLabel, draggable: true, onDragStart: (e) => {
475
483
  setDragRowId(row.id);
476
484
  e.dataTransfer.effectAllowed = "move";
477
485
  }, onDragEnd: () => {
478
486
  setDragRowId(null);
479
487
  setDropRowId(null);
480
- }, children: _jsx(GripVertical, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }) })), selectable && (_jsx(TableCell, { className: "datatable-col-check", ...stickyCol(-1), onClick: (e) => e.stopPropagation(), children: _jsx("span", { className: "datatable-check", children: _jsx(Checkbox, { "aria-label": selectRowLabel(row), checked: selected.has(row.id), onChange: () => toggleRow(row.id) }) }) })), columns.map((col, i) => {
488
+ }, children: _jsx(GripVertical, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) }) })), selectable && (_jsx(TableCell, { className: "crisp-datatable-col-check", ...stickyCol(-1), onClick: (e) => e.stopPropagation(), children: _jsx("span", { className: "crisp-datatable-check", children: _jsx(Checkbox, { "aria-label": selectRowLabel(row), checked: selected.has(row.id), onChange: () => toggleRow(row.id) }) }) })), columns.map((col, i) => {
481
489
  const isEditing = editing?.id === row.id && editing?.key === col.key;
482
490
  const value = cellValue(col, row);
483
491
  const sticky = stickyCol(i);
484
492
  if (isEditing) {
485
- return (_jsx(TableCell, { align: alignFor(col), ...sticky, onClick: (e) => e.stopPropagation(), children: _jsx("input", { className: "datatable-edit",
493
+ return (_jsx(TableCell, { align: alignFor(col), ...sticky, onClick: (e) => e.stopPropagation(), children: _jsx("input", { className: "crisp-datatable-edit",
486
494
  // biome-ignore lint/a11y/noAutofocus: focus the field the moment it opens
487
495
  autoFocus: true, ...editorFor(col), "data-editor": editorFor(col).type, defaultValue: col.type === "date"
488
496
  ? toDateInputValue(value)
@@ -493,7 +501,9 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
493
501
  setEditing(null);
494
502
  }, onBlur: (e) => commitEdit(row.id, col.key, e.currentTarget.value) }) }, col.key));
495
503
  }
496
- return (_jsx(TableCell, { align: alignFor(col), ...sticky, className: col.editable ? "datatable-editable" : undefined, "data-selected": selCell?.id === row.id && selCell?.key === col.key
504
+ return (_jsx(TableCell, { align: alignFor(col), ...sticky, className: col.editable
505
+ ? "crisp-datatable-editable"
506
+ : undefined, "data-selected": selCell?.id === row.id && selCell?.key === col.key
497
507
  ? ""
498
508
  : undefined, onClick: (e) => {
499
509
  // the keyboard model's anchor; also opens the
@@ -511,6 +521,6 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
511
521
  }, children: col.render
512
522
  ? col.render(value, row)
513
523
  : renderTyped(col, value, avatarTone, col.format?.(value, row)) }, col.key));
514
- })] }, row.id)))] }, group ?? "__ungrouped")))) }), (hasSummary || onAddRow) && (_jsxs(TableFooter, { children: [hasSummary && (_jsxs(TableRow, { children: [showGrip && _jsx(TableCell, { ...stickyCol(-2) }), selectable && _jsx(TableCell, { ...stickyCol(-1) }), columns.map((col, i) => (_jsx(TableCell, { align: alignFor(col), ...stickyCol(i), children: col.summary ? col.summary(rows) : null }, col.key)))] })), onAddRow && (_jsx(TableRow, { children: _jsx(TableCell, { className: "datatable-addcell", colSpan: totalCols, children: _jsxs("button", { type: "button", className: "datatable-addrow", onClick: onAddRow, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), addRowLabel] }) }) }))] }))] })] }));
524
+ })] }, row.id)))] }, group ?? "__ungrouped")))) }), (hasSummary || onAddRow) && (_jsxs(TableFooter, { children: [hasSummary && (_jsxs(TableRow, { children: [showGrip && _jsx(TableCell, { ...stickyCol(-2) }), selectable && _jsx(TableCell, { ...stickyCol(-1) }), columns.map((col, i) => (_jsx(TableCell, { align: alignFor(col), ...stickyCol(i), children: col.summary ? col.summary(rows) : null }, col.key)))] })), onAddRow && (_jsx(TableRow, { children: _jsx(TableCell, { className: "crisp-datatable-addcell", colSpan: totalCols, children: _jsxs("button", { type: "button", className: "crisp-datatable-addrow", onClick: onAddRow, children: [_jsx(Plus, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), addRowLabel] }) }) }))] }))] })] }));
515
525
  }
516
526
  DataTable.displayName = "DataTable";
@@ -7,13 +7,13 @@ import { contract as c, elevation as e } from "../../tokens/index.js";
7
7
  const config = defineRecipe({
8
8
  name: "datatable",
9
9
  base: `display: flex; flex-direction: column; gap: ${c.space["2.5"]}; font-family: ${c.font.sans};
10
- & .datatable-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; }
11
- & .datatable-search { position: relative; flex: 1; max-width: 280px; display: inline-flex; align-items: center; }
12
- & .datatable-search svg { position: absolute; inset-inline-start: ${c.space["2"]}; color: ${c.fgMuted}; pointer-events: none; }
13
- & .datatable-search input { width: 100%; height: 32px; padding: 0 ${c.space["2"]} 0 ${c.space["6"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: ${e.field}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; outline: none; transition: box-shadow .15s; }
14
- & .datatable-search input::placeholder { color: ${c.fgMuted}; }
15
- & .datatable-search input:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
16
- & .datatable-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; }
10
+ & .crisp-datatable-toolbar { display: flex; align-items: center; gap: ${c.space["2"]}; }
11
+ & .crisp-datatable-search { position: relative; flex: 1; max-width: 280px; display: inline-flex; align-items: center; }
12
+ & .crisp-datatable-search svg { position: absolute; inset-inline-start: ${c.space["2"]}; color: ${c.fgMuted}; pointer-events: none; }
13
+ & .crisp-datatable-search input { width: 100%; height: 32px; padding: 0 ${c.space["2"]} 0 ${c.space["6"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: ${e.field}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; outline: none; transition: box-shadow .15s; }
14
+ & .crisp-datatable-search input::placeholder { color: ${c.fgMuted}; }
15
+ & .crisp-datatable-search input:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
16
+ & .crisp-datatable-count { margin-inline-start: auto; font-size: ${c.text.md}; color: ${c.fgMuted}; }
17
17
  /* The header cell has no padding of its own -- the button owns the
18
18
  full cell so the whole header is clickable (its own inset is 12px).
19
19
  Mirrors the summary-row fix. */
@@ -25,71 +25,71 @@ const config = defineRecipe({
25
25
  -sized box to truncate against, and the th's own overflow hard-clipped
26
26
  it with no "...". Fill the wrapper, scoped to th so Menu's default
27
27
  (correct everywhere else) is untouched. */
28
- & th .menu { width: 100%; height: 100%; }
29
- & .datatable-th-inner { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; min-width: 0; height: 100%; }
30
- & .datatable-th-inner > svg { flex-shrink: 0; color: ${c.fgMuted}; }
28
+ & th .crisp-menu { width: 100%; height: 100%; }
29
+ & .crisp-datatable-th-inner { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; min-width: 0; height: 100%; }
30
+ & .crisp-datatable-th-inner > svg { flex-shrink: 0; color: ${c.fgMuted}; }
31
31
  /* The summary cell has NO padding of its own -- the calculation trigger
32
32
  owns the whole 246x37 area so a click anywhere in the cell opens the
33
33
  menu. Zero the cell's inset and let ColumnCalc supply the 12px. */
34
34
  & tfoot td { padding: 0; }
35
35
  /* Group heading row -- a view is grouped under a subtle label with the
36
36
  bucket's count beside it. */
37
- & .datatable-viewsettings { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
38
- & .datatable-viewsettings:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgPrimary}; }
39
- & .datatable-group-label { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
40
- & .datatable-group { height: ${c.size.menuRow}; padding: 0 ${c.space["3"]}; background: ${c.bgSubtle}; border-bottom: 1px solid ${c.borderSubtle}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
41
- & .datatable-group-count { margin-inline-start: ${c.space["1.5"]}; color: ${c.fgMuted}; font-variant-numeric: tabular-nums; }
42
- & .datatable-th-rename { width: 100%; min-width: 0; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; outline: none; }
43
- & .datatable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
44
- & .datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
45
- & .datatable-sort { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: start; cursor: pointer; }
46
- & th[data-align="right"] .datatable-sort { justify-content: flex-end; }
47
- & .datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: ${c.fgMuted}; opacity: 0; transition: opacity .12s; }
48
- & th[data-align="right"] .datatable-chevron { margin-inline-start: 0; }
49
- & .datatable-sort:hover .datatable-chevron { opacity: 0.6; }
50
- & .datatable-sort[data-sorted] .datatable-chevron { opacity: 1; color: ${c.fgPrimary}; }
37
+ & .crisp-datatable-viewsettings { display: inline-flex; align-items: center; gap: ${c.space["1.5"]}; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["2"]}; border: none; border-radius: ${c.radius.md}; background: transparent; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
38
+ & .crisp-datatable-viewsettings:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, transparent); color: ${c.fgPrimary}; }
39
+ & .crisp-datatable-group-label { padding: ${c.space["1.5"]} ${c.space["2"]} ${c.space["1"]}; font-size: ${c.text.sm}; font-weight: ${c.weight.medium}; color: ${c.fgMuted}; }
40
+ & .crisp-datatable-group { height: ${c.size.menuRow}; padding: 0 ${c.space["3"]}; background: ${c.bgSubtle}; border-bottom: 1px solid ${c.borderSubtle}; font-size: ${c.text.md}; font-weight: ${c.weight.medium}; color: color-mix(in srgb, ${c.fgPrimary} 63%, transparent); }
41
+ & .crisp-datatable-group-count { margin-inline-start: ${c.space["1.5"]}; color: ${c.fgMuted}; font-variant-numeric: tabular-nums; }
42
+ & .crisp-datatable-th-rename { width: 100%; min-width: 0; height: ${c.size.row}; margin: 0; padding: 0 ${c.space["1"]}; border: none; border-radius: ${c.radius.md}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; font-family: inherit; font-size: ${c.text.lg}; font-weight: ${c.weight.medium}; color: ${c.fgPrimary}; outline: none; }
43
+ & .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
44
+ & .crisp-datatable-th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
45
+ & .crisp-datatable-sort { display: flex; align-items: center; gap: ${c.space["1.5"]}; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 ${c.space["2"]}; border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: start; cursor: pointer; }
46
+ & th[data-align="right"] .crisp-datatable-sort { justify-content: flex-end; }
47
+ & .crisp-datatable-chevron { margin-inline-start: auto; flex-shrink: 0; color: ${c.fgMuted}; opacity: 0; transition: opacity .12s; }
48
+ & th[data-align="right"] .crisp-datatable-chevron { margin-inline-start: 0; }
49
+ & .crisp-datatable-sort:hover .crisp-datatable-chevron { opacity: 0.6; }
50
+ & .crisp-datatable-sort[data-sorted] .crisp-datatable-chevron { opacity: 1; color: ${c.fgPrimary}; }
51
51
  /* sticky first column(s) + horizontal scroll shadow — RecordsTable's feel */
52
52
  & th[data-sticky], & td[data-sticky] { position: sticky; z-index: 1; background: ${c.bgSurface}; }
53
53
  & th[data-sticky] { z-index: 3; }
54
54
  & tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface}); }
55
55
  & tbody tr:hover td[data-sticky] { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); }
56
- & .table-scroll[data-scrolled-x] [data-sticky-edge] { clip-path: inset(0 -38px 0 0); box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
56
+ & .crisp-table-scroll[data-scrolled-x] [data-sticky-edge] { clip-path: inset(0 -38px 0 0); box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
57
57
  /* add-row + summary footer */
58
- & .datatable-addcell { padding: 0; border-top: none; }
59
- & .datatable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; transition: background-color .12s; }
60
- & .datatable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
61
- & .datatable-addrow svg { flex-shrink: 0; }
62
- & .datatable-check { display: flex; align-items: center; justify-content: center; }
63
- & .datatable-col-check { width: 40px; padding: 0; text-align: center; }
58
+ & .crisp-datatable-addcell { padding: 0; border-top: none; }
59
+ & .crisp-datatable-addrow { display: flex; align-items: center; gap: ${c.space["2"]}; width: 100%; height: ${c.size.tableRow}; padding: 0 ${c.space["2"]}; border: none; border-top: 1px solid ${c.borderSubtle}; background: ${c.bgSurface}; color: ${c.fgMuted}; font-family: inherit; font-size: ${c.text.lg}; cursor: pointer; transition: background-color .12s; }
60
+ & .crisp-datatable-addrow:hover { background: ${c.bgRaised}; color: ${c.fgPrimary}; }
61
+ & .crisp-datatable-addrow svg { flex-shrink: 0; }
62
+ & .crisp-datatable-check { display: flex; align-items: center; justify-content: center; }
63
+ & .crisp-datatable-col-check { width: 40px; padding: 0; text-align: center; }
64
64
  & tbody tr[data-selected] td { background: color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface}); }
65
65
  & tbody tr[data-selected]:hover td { background: color-mix(in srgb, ${c.fgPrimary} 4%, color-mix(in srgb, ${c.bgBrandSolid} 10%, ${c.bgSurface})); }
66
- & .datatable-editable:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); cursor: text; }
67
- & .datatable-edit { width: 100%; height: 28px; margin: 0; padding: 0 ${c.space["1.5"]}; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; outline: none; vertical-align: middle; }
68
- & .datatable-edit:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
69
- & .datatable-empty { padding: ${c.space["8"]} ${c.space["3"]}; text-align: center; color: ${c.fgMuted}; font-size: ${c.text.lg}; }
66
+ & .crisp-datatable-editable:hover { background: color-mix(in srgb, ${c.fgPrimary} 4%, ${c.bgSurface}); cursor: text; }
67
+ & .crisp-datatable-edit { width: 100%; height: 28px; margin: 0; padding: 0 ${c.space["1.5"]}; border: none; border-radius: ${c.radius.sm}; background: ${c.bgSurface}; box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; font-family: inherit; font-size: ${c.text.lg}; color: ${c.fgPrimary}; outline: none; vertical-align: middle; }
68
+ & .crisp-datatable-edit:focus { box-shadow: inset 0 0 0 1px ${c.bgBrandSolid}; }
69
+ & .crisp-datatable-empty { padding: ${c.space["8"]} ${c.space["3"]}; text-align: center; color: ${c.fgMuted}; font-size: ${c.text.lg}; }
70
70
  /* fixed layout so column widths (and resize) are exact — like RecordsTable */
71
71
  & table { table-layout: fixed; }
72
72
  /* column resize grip */
73
- & .datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
74
- & .datatable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
75
- & .datatable-resize:hover::after, & .datatable-resize[data-resizing]::after { opacity: 1; }
73
+ & .crisp-datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
74
+ & .crisp-datatable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
75
+ & .crisp-datatable-resize:hover::after, & .crisp-datatable-resize[data-resizing]::after { opacity: 1; }
76
76
  /* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
77
- & .datatable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
78
- & .datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
79
- & .datatable-avatar { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: ${c.weight.semibold}; text-transform: uppercase; color: ${c.fgOnBrand}; background: ${c.bgBrandSolid}; }
80
- & .datatable-avatar[data-tone="success"] { background: ${c.bgSuccess}; } & .datatable-avatar[data-tone="warning"] { background: ${c.bgWarning}; } & .datatable-avatar[data-tone="danger"] { background: ${c.bgDanger}; } & .datatable-avatar[data-tone="purple"] { background: ${c.bgPurple}; } & .datatable-avatar[data-tone="cyan"] { background: ${c.bgCyan}; } & .datatable-avatar[data-tone="orange"] { background: ${c.bgOrange}; }
81
- & .datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
82
- & .datatable-tags { display: flex; align-items: center; gap: ${c.space["1"]}; overflow: hidden; }
83
- & .datatable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); }
84
- & .datatable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); }
85
- & .datatable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); }
86
- & .datatable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); }
87
- & .datatable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
88
- & .datatable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); }
89
- & .datatable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); }
90
- & .datatable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); }
91
- & .datatable-num { font-variant-numeric: tabular-nums; }
92
- & .datatable-muted { color: ${c.fgMuted}; }
77
+ & .crisp-datatable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
78
+ & .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
79
+ & .crisp-datatable-avatar { width: ${c.size.icon}; height: ${c.size.icon}; border-radius: ${c.radius.sm}; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: ${c.weight.semibold}; text-transform: uppercase; color: ${c.fgOnBrand}; background: ${c.bgBrandSolid}; }
80
+ & .crisp-datatable-avatar[data-tone="success"] { background: ${c.bgSuccess}; } & .crisp-datatable-avatar[data-tone="warning"] { background: ${c.bgWarning}; } & .crisp-datatable-avatar[data-tone="danger"] { background: ${c.bgDanger}; } & .crisp-datatable-avatar[data-tone="purple"] { background: ${c.bgPurple}; } & .crisp-datatable-avatar[data-tone="cyan"] { background: ${c.bgCyan}; } & .crisp-datatable-avatar[data-tone="orange"] { background: ${c.bgOrange}; }
81
+ & .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
82
+ & .crisp-datatable-tags { display: flex; align-items: center; gap: ${c.space["1"]}; overflow: hidden; }
83
+ & .crisp-datatable-tag { display: inline-flex; align-items: center; height: ${c.size.chip}; padding: 0 ${c.space["1"]}; border-radius: ${c.radius.chip}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; white-space: nowrap; background: color-mix(in srgb, ${c.fgPrimary} 6%, transparent); color: color-mix(in srgb, ${c.fgPrimary} 82%, transparent); }
84
+ & .crisp-datatable-tag[data-tone="brand"] { background: color-mix(in srgb, ${c.bgBrandSolid} 14%, transparent); color: color-mix(in srgb, ${c.bgBrandSolid} 82%, ${c.fgPrimary}); }
85
+ & .crisp-datatable-tag[data-tone="success"] { background: color-mix(in srgb, ${c.bgSuccess} 16%, transparent); color: color-mix(in srgb, ${c.bgSuccess} 78%, ${c.fgPrimary}); }
86
+ & .crisp-datatable-tag[data-tone="warning"] { background: color-mix(in srgb, ${c.bgWarning} 18%, transparent); color: color-mix(in srgb, ${c.bgWarning} 82%, ${c.fgPrimary}); }
87
+ & .crisp-datatable-tag[data-tone="danger"] { background: color-mix(in srgb, ${c.bgDanger} 15%, transparent); color: color-mix(in srgb, ${c.bgDanger} 80%, ${c.fgPrimary}); }
88
+ & .crisp-datatable-tag[data-tone="purple"] { background: color-mix(in srgb, ${c.bgPurple} 16%, transparent); color: color-mix(in srgb, ${c.bgPurple} 80%, ${c.fgPrimary}); }
89
+ & .crisp-datatable-tag[data-tone="cyan"] { background: color-mix(in srgb, ${c.bgCyan} 18%, transparent); color: color-mix(in srgb, ${c.bgCyan} 82%, ${c.fgPrimary}); }
90
+ & .crisp-datatable-tag[data-tone="orange"] { background: color-mix(in srgb, ${c.bgOrange} 16%, transparent); color: color-mix(in srgb, ${c.bgOrange} 82%, ${c.fgPrimary}); }
91
+ & .crisp-datatable-num { font-variant-numeric: tabular-nums; }
92
+ & .crisp-datatable-muted { color: ${c.fgMuted}; }
93
93
  /* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
94
94
  a leading 20px grip column, a 16px grip icon, and the row's own
95
95
  hairline doubling as the drop indicator (it tints toward the brand
@@ -98,9 +98,9 @@ const config = defineRecipe({
98
98
  draggable + dataTransfer, the same one column reorder already uses
99
99
  (RecordsTable's reorderColumn) -- not a proprietary
100
100
  pointer-events implementation. */
101
- & .datatable-col-grip { width: 20px; padding: 0; text-align: center; }
102
- & .datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: ${c.fgMuted}; cursor: grab; }
103
- & .datatable-grip:active { cursor: grabbing; }
101
+ & .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
102
+ & .crisp-datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: ${c.fgMuted}; cursor: grab; }
103
+ & .crisp-datatable-grip:active { cursor: grabbing; }
104
104
  & tbody tr[data-drop-target] td, & tbody tr[data-drop-target] th { box-shadow: inset 0 2px 0 0 ${c.bgBrandSolid}; transition: box-shadow .12s; }`,
105
105
  variants: {},
106
106
  defaultVariants: {},
@@ -6,15 +6,15 @@ import * as React from "react";
6
6
  import { WheelPicker } from "../wheelpicker/index.js";
7
7
  import { datepickerRecipe } from "./datepicker.recipe.js";
8
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))) }));
9
+ return (_jsx("div", { role: semantic ? "row" : undefined, "aria-hidden": semantic ? undefined : true, className: "crisp-datepicker-weekday-row", children: api.weekdayLabels.map((weekday) => (_jsx("div", { role: semantic ? "columnheader" : undefined, "aria-label": semantic ? weekday.long : undefined, className: "crisp-datepicker-weekday", children: _jsx("span", { "aria-hidden": "true", children: weekday.short }) }, weekday.key))) }));
10
10
  }
11
11
  function DateCellView({ cell, renderDateCellContent, renderDateCellSupplement, }) {
12
12
  // a leading/trailing blank in the grid: still a gridcell, so the row keeps
13
13
  // seven columns for a screen reader, but nothing to press
14
14
  if (cell === null)
15
- return (_jsx("div", { role: "gridcell", className: "datepicker-empty-cell" }));
15
+ return (_jsx("div", { role: "gridcell", className: "crisp-datepicker-empty-cell" }));
16
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)] })) }) }) }));
17
+ return (_jsx("div", { ...cellProps, className: "crisp-datepicker-cell", children: _jsx("button", { ...buttonProps, type: "button", className: "crisp-datepicker-date", children: _jsx("span", { className: "crisp-datepicker-date-content", children: renderDateCellContent ? (renderDateCellContent(renderProps)) : (_jsxs(_Fragment, { children: [_jsx("span", { "data-date-picker-day": "", children: cell.formattedDay }), renderDateCellSupplement?.(renderProps)] })) }) }) }));
18
18
  }
19
19
  function NavigationButton({ direction, className, ...props }) {
20
20
  const Icon = direction === "left" ? ChevronLeft : ChevronRight;
@@ -24,9 +24,9 @@ function Header({ api }) {
24
24
  // in RTL the chevrons swap: "previous" is on the right
25
25
  const previousDirection = api.isRtl ? "right" : "left";
26
26
  const nextDirection = api.isRtl ? "left" : "right";
27
- return (_jsxs("div", { className: "datepicker-header", children: [_jsxs("button", { ...api.monthYearButtonProps, "aria-controls": api.isWheelOpen
27
+ return (_jsxs("div", { className: "crisp-datepicker-header", children: [_jsxs("button", { ...api.monthYearButtonProps, "aria-controls": api.isWheelOpen
28
28
  ? api.monthYearButtonProps["aria-controls"]
29
- : undefined, 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" })] })] }));
29
+ : undefined, type: "button", id: `${api.rootProps.id}-header-label`, className: "crisp-datepicker-header-label", children: [_jsx("span", { "data-date-picker-header-label": "", children: api.headerLabel }), _jsx("span", { className: "crisp-datepicker-header-chevron", "data-open": api.isWheelOpen ? "" : undefined, children: _jsx(ChevronDown, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }) })] }), _jsxs("div", { className: "crisp-datepicker-nav", children: [_jsx(NavigationButton, { ...api.previousButtonProps, direction: previousDirection, className: "crisp-datepicker-nav-button" }), _jsx(NavigationButton, { ...api.nextButtonProps, direction: nextDirection, className: "crisp-datepicker-nav-button" })] })] }));
30
30
  }
31
31
  function TwoMonthHeader({ api, label, labelId, position, }) {
32
32
  const isFirst = position === "first";
@@ -37,19 +37,19 @@ function TwoMonthHeader({ api, label, labelId, position, }) {
37
37
  : isFirst
38
38
  ? "left"
39
39
  : "right";
40
- 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" })] }));
40
+ return (_jsxs("div", { className: "crisp-datepicker-two-month-header", children: [_jsx("div", { id: labelId, className: "crisp-datepicker-two-month-label", children: label }), _jsx(NavigationButton, { ...(isFirst ? api.previousButtonProps : api.nextButtonProps), direction: direction, "data-placement": isFirst ? "start" : "end", className: "crisp-datepicker-nav-button" })] }));
41
41
  }
42
42
  function MonthView({ api, month, renderDateCellContent, renderDateCellSupplement, showWeekdays, showMonthLabel, renderHeader, monthRef, }) {
43
43
  const labelId = `${api.rootProps.id}-${month.key}-label`;
44
44
  const headerLabelId = `${api.rootProps.id}-header-label`;
45
- 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
45
+ return (_jsxs("div", { ref: monthRef, className: "crisp-datepicker-month", children: [renderHeader?.(labelId), showMonthLabel ? (_jsx("div", { id: labelId, className: "crisp-datepicker-month-label", children: month.label })) : (_jsx("span", { id: labelId, className: "crisp-datepicker-live-region", children: month.label })), _jsxs("div", { ...api.gridProps, "aria-labelledby": showMonthLabel || renderHeader
46
46
  ? labelId
47
47
  : api.visibleRange === "month"
48
48
  ? headerLabelId
49
- : 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)))] })] }));
49
+ : labelId, className: "crisp-datepicker-grid", children: [showWeekdays && _jsx(WeekdayRow, { api: api }), month.weeks.map((week) => (_jsx("div", { role: "row", className: "crisp-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)))] })] }));
50
50
  }
51
51
  function WheelView({ api }) {
52
- return (_jsx("div", { ...api.wheelProps, className: "datepicker-wheel-container", children: _jsx(WheelPicker, { className: "datepicker-wheel", "aria-label": api.headerLabel, columns: [
52
+ return (_jsx("div", { ...api.wheelProps, className: "crisp-datepicker-wheel-container", children: _jsx(WheelPicker, { className: "crisp-datepicker-wheel", "aria-label": api.headerLabel, columns: [
53
53
  {
54
54
  key: "year",
55
55
  label: api.ariaLabels.yearWheel,
@@ -90,13 +90,13 @@ const DatePickerImplementation = React.forwardRef((props, forwardedRef) => {
90
90
  }, ...mergeProps(api.rootProps, rootProps), "aria-label": rootAriaLabel, "aria-labelledby": ariaLabelledby, className: datepickerRecipe({
91
91
  visibleRange: api.visibleRange,
92
92
  className,
93
- }), 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"
93
+ }), style: styleOf({ height, minHeight, maxHeight }), children: [api.visibleRange === "continuous" ? (_jsxs("div", { ref: api.refs.continuousScroll, ...api.continuousScrollProps, "data-date-picker-continuous-scroll": "", className: "crisp-datepicker-continuous-scroll", children: [_jsx(WeekdayRow, { api: api, semantic: false }), _jsxs("div", { className: "crisp-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"
94
94
  ? ""
95
95
  : undefined, "aria-hidden": api.isWheelOpen && api.visibleRange !== "twoMonths"
96
96
  ? true
97
- : 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"
97
+ : undefined, className: "crisp-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"
98
98
  ? (labelId) => (_jsx(TwoMonthHeader, { api: api, label: month.label, labelId: labelId, position: index === 0 ? "first" : "last" }))
99
- : undefined }, month.key))) }), api.isWheelOpen && api.visibleRange !== "twoMonths" && (_jsx(WheelView, { api: api }))] })), _jsx("span", { ...api.liveRegionProps, className: "datepicker-live-region", children: api.headerLabel })] }));
99
+ : undefined }, month.key))) }), api.isWheelOpen && api.visibleRange !== "twoMonths" && (_jsx(WheelView, { api: api }))] })), _jsx("span", { ...api.liveRegionProps, className: "crisp-datepicker-live-region", children: api.headerLabel })] }));
100
100
  });
101
101
  DatePickerImplementation.displayName = "DatePickerImplementation";
102
102
  export const DatePicker = React.forwardRef((props, ref) => (_jsx(DatePickerImplementation, { ref: ref, ...props, visibleRange: "month" })));