@42-central/ui-react 0.29.1 → 0.30.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 (592) hide show
  1. package/dist/{chunk-X6DESK37.js → chunk-2RRTT4AF.js} +17 -5
  2. package/dist/chunk-2RRTT4AF.js.map +1 -0
  3. package/dist/{chunk-TUP7WXQE.js → chunk-322I2RSV.js} +9 -6
  4. package/dist/chunk-322I2RSV.js.map +1 -0
  5. package/dist/{chunk-ISX3AM32.js → chunk-37SRSNLJ.js} +4 -4
  6. package/dist/{chunk-ISX3AM32.js.map → chunk-37SRSNLJ.js.map} +1 -1
  7. package/dist/{chunk-L5GH7LLD.js → chunk-3MFWUG5O.js} +4 -4
  8. package/dist/{chunk-L5GH7LLD.js.map → chunk-3MFWUG5O.js.map} +1 -1
  9. package/dist/{chunk-FQJNQW3G.js → chunk-3XQEOJCE.js} +8 -5
  10. package/dist/chunk-3XQEOJCE.js.map +1 -0
  11. package/dist/{chunk-JKFPRQB2.js → chunk-4LSZ5JWF.js} +3 -3
  12. package/dist/{chunk-JKFPRQB2.js.map → chunk-4LSZ5JWF.js.map} +1 -1
  13. package/dist/{chunk-V2QZG4IT.js → chunk-5HWFYYHW.js} +27 -9
  14. package/dist/chunk-5HWFYYHW.js.map +1 -0
  15. package/dist/{chunk-GEZYGBXY.js → chunk-6MVFCS46.js} +99 -42
  16. package/dist/chunk-6MVFCS46.js.map +1 -0
  17. package/dist/{chunk-NNPSBC7O.js → chunk-6WZSUS3U.js} +10 -9
  18. package/dist/chunk-6WZSUS3U.js.map +1 -0
  19. package/dist/chunk-6YRGP6PS.js +138 -0
  20. package/dist/chunk-6YRGP6PS.js.map +1 -0
  21. package/dist/{chunk-B5YHYI7E.js → chunk-ALANKV5Y.js} +23 -6
  22. package/dist/chunk-ALANKV5Y.js.map +1 -0
  23. package/dist/{chunk-IA6DCC3N.js → chunk-AUQPNDE5.js} +23 -13
  24. package/dist/chunk-AUQPNDE5.js.map +1 -0
  25. package/dist/{chunk-AKXALCUN.js → chunk-D7SW2E24.js} +4 -4
  26. package/dist/chunk-D7SW2E24.js.map +1 -0
  27. package/dist/{chunk-OXR7BXZA.js → chunk-DQIYYDFD.js} +4 -3
  28. package/dist/chunk-DQIYYDFD.js.map +1 -0
  29. package/dist/{chunk-HMNXNKDA.js → chunk-FCBYUN6F.js} +4 -4
  30. package/dist/{chunk-HMNXNKDA.js.map → chunk-FCBYUN6F.js.map} +1 -1
  31. package/dist/{chunk-2W7H43WL.js → chunk-FED6SJWM.js} +23 -14
  32. package/dist/chunk-FED6SJWM.js.map +1 -0
  33. package/dist/{chunk-7E7JNWOC.js → chunk-FEPIHXVI.js} +6 -5
  34. package/dist/chunk-FEPIHXVI.js.map +1 -0
  35. package/dist/{chunk-Y57NW6G7.js → chunk-G3YOSG3U.js} +4 -4
  36. package/dist/{chunk-Y57NW6G7.js.map → chunk-G3YOSG3U.js.map} +1 -1
  37. package/dist/chunk-GZN5CXMR.js +100 -0
  38. package/dist/chunk-GZN5CXMR.js.map +1 -0
  39. package/dist/{chunk-HCHGERDB.js → chunk-HCSZPBWV.js} +17 -115
  40. package/dist/chunk-HCSZPBWV.js.map +1 -0
  41. package/dist/{chunk-I4B3N3UX.js → chunk-HTVICHT4.js} +12 -7
  42. package/dist/chunk-HTVICHT4.js.map +1 -0
  43. package/dist/chunk-I7TC2C3I.js +163 -0
  44. package/dist/chunk-I7TC2C3I.js.map +1 -0
  45. package/dist/{chunk-7FPSQBWB.js → chunk-IBXYLO2J.js} +14 -13
  46. package/dist/chunk-IBXYLO2J.js.map +1 -0
  47. package/dist/{chunk-7KFUFAVP.js → chunk-IRYG6B5A.js} +9 -8
  48. package/dist/chunk-IRYG6B5A.js.map +1 -0
  49. package/dist/{chunk-2RQLPN4U.js → chunk-JCNEW4WJ.js} +8 -8
  50. package/dist/{chunk-2RQLPN4U.js.map → chunk-JCNEW4WJ.js.map} +1 -1
  51. package/dist/{chunk-SP6LCCTZ.js → chunk-KZDMVOL6.js} +35 -8
  52. package/dist/chunk-KZDMVOL6.js.map +1 -0
  53. package/dist/chunk-LR5U6TZZ.js +169 -0
  54. package/dist/chunk-LR5U6TZZ.js.map +1 -0
  55. package/dist/{chunk-MQHD3EJE.js → chunk-LZHZJWVM.js} +6 -4
  56. package/dist/chunk-LZHZJWVM.js.map +1 -0
  57. package/dist/{chunk-5EOMSWNO.js → chunk-MAM2X3MW.js} +5 -5
  58. package/dist/{chunk-5EOMSWNO.js.map → chunk-MAM2X3MW.js.map} +1 -1
  59. package/dist/{chunk-FSPS7TVD.js → chunk-MCMS4NMO.js} +5 -5
  60. package/dist/{chunk-FSPS7TVD.js.map → chunk-MCMS4NMO.js.map} +1 -1
  61. package/dist/{chunk-ZB5VMGKB.js → chunk-MV5DIE2T.js} +15 -4
  62. package/dist/chunk-MV5DIE2T.js.map +1 -0
  63. package/dist/chunk-NDI4HLQE.js +41 -0
  64. package/dist/chunk-NDI4HLQE.js.map +1 -0
  65. package/dist/{chunk-B4GNSSHU.js → chunk-NLJEQZQQ.js} +3 -3
  66. package/dist/{chunk-B4GNSSHU.js.map → chunk-NLJEQZQQ.js.map} +1 -1
  67. package/dist/{chunk-SBZJGFZ6.js → chunk-QHT4DCXE.js} +8 -7
  68. package/dist/chunk-QHT4DCXE.js.map +1 -0
  69. package/dist/{chunk-I4IJOLNA.js → chunk-RMUBCTEF.js} +5 -5
  70. package/dist/{chunk-I4IJOLNA.js.map → chunk-RMUBCTEF.js.map} +1 -1
  71. package/dist/{chunk-G3AD3NJG.js → chunk-RNTDM3RP.js} +9 -5
  72. package/dist/chunk-RNTDM3RP.js.map +1 -0
  73. package/dist/chunk-RPFN6ETQ.js +509 -0
  74. package/dist/chunk-RPFN6ETQ.js.map +1 -0
  75. package/dist/{chunk-HWBFRDX7.js → chunk-SI7C3W5M.js} +28 -9
  76. package/dist/chunk-SI7C3W5M.js.map +1 -0
  77. package/dist/chunk-TPOV3OCC.js +234 -0
  78. package/dist/chunk-TPOV3OCC.js.map +1 -0
  79. package/dist/{chunk-IANYMDKH.js → chunk-UBQ54W46.js} +4 -4
  80. package/dist/chunk-UBQ54W46.js.map +1 -0
  81. package/dist/{chunk-QVOBLRCM.js → chunk-UIKQ4X6W.js} +3 -3
  82. package/dist/{chunk-QVOBLRCM.js.map → chunk-UIKQ4X6W.js.map} +1 -1
  83. package/dist/chunk-UOWQH53N.js +70 -0
  84. package/dist/chunk-UOWQH53N.js.map +1 -0
  85. package/dist/{chunk-QRNQQIQM.js → chunk-WJUY6YWF.js} +52 -20
  86. package/dist/chunk-WJUY6YWF.js.map +1 -0
  87. package/dist/{chunk-3KARNPW4.js → chunk-WKIUMLRT.js} +3 -3
  88. package/dist/{chunk-3KARNPW4.js.map → chunk-WKIUMLRT.js.map} +1 -1
  89. package/dist/chunk-X6RB74JN.js +37 -0
  90. package/dist/chunk-X6RB74JN.js.map +1 -0
  91. package/dist/chunk-XQ6L2CM5.js +83 -0
  92. package/dist/chunk-XQ6L2CM5.js.map +1 -0
  93. package/dist/{chunk-RKCUXOU2.js → chunk-YUVKROMA.js} +44 -7
  94. package/dist/chunk-YUVKROMA.js.map +1 -0
  95. package/dist/components/action-icon/action-icon.d.ts +9 -2
  96. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  97. package/dist/components/action-icon/index.js +5 -1
  98. package/dist/components/alert/index.js +4 -4
  99. package/dist/components/anchor/anchor.d.ts +45 -0
  100. package/dist/components/anchor/anchor.d.ts.map +1 -0
  101. package/dist/components/anchor/index.d.ts +2 -0
  102. package/dist/components/anchor/index.d.ts.map +1 -0
  103. package/dist/components/anchor/index.js +11 -0
  104. package/dist/components/anchor/index.js.map +1 -0
  105. package/dist/components/app-shell/app-shell.d.ts +10 -6
  106. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  107. package/dist/components/app-shell/index.js +23 -24
  108. package/dist/components/app-shell/index.js.map +1 -1
  109. package/dist/components/autocomplete/autocomplete.d.ts +1 -1
  110. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  111. package/dist/components/autocomplete/index.js +15 -9
  112. package/dist/components/autocomplete/index.js.map +1 -1
  113. package/dist/components/avatar/index.js +1 -1
  114. package/dist/components/breadcrumb/breadcrumb.d.ts +5 -1
  115. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  116. package/dist/components/breadcrumb/index.js +12 -0
  117. package/dist/components/breadcrumb/index.js.map +1 -1
  118. package/dist/components/button/button.d.ts +15 -2
  119. package/dist/components/button/button.d.ts.map +1 -1
  120. package/dist/components/button/index.js +5 -1
  121. package/dist/components/button-multi-select/index.js +6 -4
  122. package/dist/components/button-multi-select/index.js.map +1 -1
  123. package/dist/components/button-select/button-select-control.d.ts.map +1 -1
  124. package/dist/components/button-select/button-select.d.ts +2 -2
  125. package/dist/components/button-select/button-select.d.ts.map +1 -1
  126. package/dist/components/button-select/index.js +6 -4
  127. package/dist/components/button-select/index.js.map +1 -1
  128. package/dist/components/calendar/aliases.d.ts +16 -0
  129. package/dist/components/calendar/aliases.d.ts.map +1 -0
  130. package/dist/components/calendar/calendar-body.d.ts +11 -1
  131. package/dist/components/calendar/calendar-body.d.ts.map +1 -1
  132. package/dist/components/calendar/calendar.d.ts +8 -4
  133. package/dist/components/calendar/calendar.d.ts.map +1 -1
  134. package/dist/components/calendar/index.d.ts +2 -1
  135. package/dist/components/calendar/index.d.ts.map +1 -1
  136. package/dist/components/calendar/index.js +15 -5
  137. package/dist/components/calendar/index.js.map +1 -1
  138. package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
  139. package/dist/components/calendar-heatmap/index.js +85 -73
  140. package/dist/components/calendar-heatmap/index.js.map +1 -1
  141. package/dist/components/camera/index.js +16 -14
  142. package/dist/components/carousel/index.js +3 -3
  143. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  144. package/dist/components/checkbox/index.js +2 -2
  145. package/dist/components/choice-card-group/index.js +2 -2
  146. package/dist/components/choice-card-group/index.js.map +1 -1
  147. package/dist/components/circular-progress/circular-progress.d.ts +22 -11
  148. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  149. package/dist/components/circular-progress/index.d.ts +1 -1
  150. package/dist/components/circular-progress/index.d.ts.map +1 -1
  151. package/dist/components/circular-progress/index.js +68 -49
  152. package/dist/components/circular-progress/index.js.map +1 -1
  153. package/dist/components/clipboard/index.js +7 -3
  154. package/dist/components/clipboard/index.js.map +1 -1
  155. package/dist/components/code/code.d.ts +10 -0
  156. package/dist/components/code/code.d.ts.map +1 -1
  157. package/dist/components/code/index.js +1 -0
  158. package/dist/components/code/index.js.map +1 -1
  159. package/dist/components/code-block/chrome.js +10 -6
  160. package/dist/components/code-block/index.js +10 -7
  161. package/dist/components/code-block/index.js.map +1 -1
  162. package/dist/components/combobox/combobox.d.ts +5 -3
  163. package/dist/components/combobox/combobox.d.ts.map +1 -1
  164. package/dist/components/combobox/index.js +12 -7
  165. package/dist/components/combobox-list/combobox-list.d.ts +1 -1
  166. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  167. package/dist/components/combobox-list/index.js +14 -9
  168. package/dist/components/compare/index.js +1 -1
  169. package/dist/components/data-list/data-list.d.ts +96 -0
  170. package/dist/components/data-list/data-list.d.ts.map +1 -0
  171. package/dist/components/data-list/index.d.ts +2 -0
  172. package/dist/components/data-list/index.d.ts.map +1 -0
  173. package/dist/components/data-list/index.js +147 -0
  174. package/dist/components/data-list/index.js.map +1 -0
  175. package/dist/components/data-table/data-table-group.d.ts.map +1 -1
  176. package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
  177. package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
  178. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  179. package/dist/components/data-table/data-table.d.ts +5 -2
  180. package/dist/components/data-table/data-table.d.ts.map +1 -1
  181. package/dist/components/data-table/index.js +163 -168
  182. package/dist/components/data-table/index.js.map +1 -1
  183. package/dist/components/date-picker/aliases.d.ts +16 -0
  184. package/dist/components/date-picker/aliases.d.ts.map +1 -1
  185. package/dist/components/date-picker/date-picker.d.ts +22 -8
  186. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  187. package/dist/components/date-picker/index.d.ts +2 -2
  188. package/dist/components/date-picker/index.d.ts.map +1 -1
  189. package/dist/components/date-picker/index.js +34 -28
  190. package/dist/components/date-picker/index.js.map +1 -1
  191. package/dist/components/download-button/index.js +6 -2
  192. package/dist/components/drawer/drawer.d.ts +7 -4
  193. package/dist/components/drawer/drawer.d.ts.map +1 -1
  194. package/dist/components/drawer/index.js +11 -6
  195. package/dist/components/empty-state/empty-state.d.ts +57 -0
  196. package/dist/components/empty-state/empty-state.d.ts.map +1 -0
  197. package/dist/components/empty-state/index.d.ts +2 -0
  198. package/dist/components/empty-state/index.d.ts.map +1 -0
  199. package/dist/components/empty-state/index.js +8 -0
  200. package/dist/components/empty-state/index.js.map +1 -0
  201. package/dist/components/field/field.d.ts +20 -0
  202. package/dist/components/field/field.d.ts.map +1 -1
  203. package/dist/components/field/index.js +1 -1
  204. package/dist/components/fieldset/fieldset.d.ts +103 -0
  205. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  206. package/dist/components/fieldset/index.d.ts +2 -0
  207. package/dist/components/fieldset/index.d.ts.map +1 -0
  208. package/dist/components/fieldset/index.js +150 -0
  209. package/dist/components/fieldset/index.js.map +1 -0
  210. package/dist/components/file-item/index.js +10 -7
  211. package/dist/components/file-preview/file-preview.d.ts.map +1 -1
  212. package/dist/components/file-preview/index.js +10 -18
  213. package/dist/components/file-preview/index.js.map +1 -1
  214. package/dist/components/file-trigger/index.js +6 -2
  215. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  216. package/dist/components/file-upload/index.js +18 -14
  217. package/dist/components/file-upload/index.js.map +1 -1
  218. package/dist/components/gallery/index.js +3 -3
  219. package/dist/components/geodesic/a11y.d.ts +3 -3
  220. package/dist/components/geodesic/a11y.d.ts.map +1 -1
  221. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  222. package/dist/components/hover-card/index.js +10 -3
  223. package/dist/components/hover-card/index.js.map +1 -1
  224. package/dist/components/image/index.js +3 -3
  225. package/dist/components/image-cropper/index.js +9 -6
  226. package/dist/components/input/index.js +2 -2
  227. package/dist/components/input/input.d.ts.map +1 -1
  228. package/dist/components/kbd/index.js +3 -3
  229. package/dist/components/kbd/kbd.d.ts +4 -0
  230. package/dist/components/kbd/kbd.d.ts.map +1 -1
  231. package/dist/components/lightbox/index.js +13 -11
  232. package/dist/components/lightbox/index.js.map +1 -1
  233. package/dist/components/menu/index.js +9 -5
  234. package/dist/components/menu/index.js.map +1 -1
  235. package/dist/components/menu/menu.d.ts.map +1 -1
  236. package/dist/components/modal/index.js +11 -6
  237. package/dist/components/modal/modal.d.ts +10 -4
  238. package/dist/components/modal/modal.d.ts.map +1 -1
  239. package/dist/components/multi-combobox-list/index.js +13 -9
  240. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
  241. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  242. package/dist/components/multi-select/index.js +13 -10
  243. package/dist/components/multi-select/index.js.map +1 -1
  244. package/dist/components/multi-select/multi-select.d.ts +1 -1
  245. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  246. package/dist/components/nav-link/index.js +4 -4
  247. package/dist/components/nav-link/tanstack.js +4 -4
  248. package/dist/components/notification/index.js +6 -6
  249. package/dist/components/notification/index.js.map +1 -1
  250. package/dist/components/number-input/index.js +11 -7
  251. package/dist/components/number-input/number-input.d.ts +1 -1
  252. package/dist/components/number-input/number-input.d.ts.map +1 -1
  253. package/dist/components/overlays/dialog-parts.d.ts +10 -1
  254. package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
  255. package/dist/components/overlays/index.js +13 -8
  256. package/dist/components/overlays/index.js.map +1 -1
  257. package/dist/components/pagination/index.d.ts +2 -0
  258. package/dist/components/pagination/index.d.ts.map +1 -0
  259. package/dist/components/pagination/index.js +362 -0
  260. package/dist/components/pagination/index.js.map +1 -0
  261. package/dist/components/pagination/pagination.d.ts +147 -0
  262. package/dist/components/pagination/pagination.d.ts.map +1 -0
  263. package/dist/components/password-input/index.js +6 -5
  264. package/dist/components/password-input/index.js.map +1 -1
  265. package/dist/components/password-input/password-input.d.ts +1 -1
  266. package/dist/components/password-input/password-input.d.ts.map +1 -1
  267. package/dist/components/phone-input/index.js +14 -11
  268. package/dist/components/phone-input/index.js.map +1 -1
  269. package/dist/components/phone-input/phone-input.d.ts +1 -1
  270. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  271. package/dist/components/photo-capture/index.js +19 -17
  272. package/dist/components/photo-capture/index.js.map +1 -1
  273. package/dist/components/pills-input/index.js +4 -4
  274. package/dist/components/pills-input/pills-input.d.ts +1 -1
  275. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  276. package/dist/components/pin-input/index.js +6 -5
  277. package/dist/components/pin-input/index.js.map +1 -1
  278. package/dist/components/pin-input/pin-input.d.ts.map +1 -1
  279. package/dist/components/popover/index.js +7 -2
  280. package/dist/components/popover/popover.d.ts +41 -16
  281. package/dist/components/popover/popover.d.ts.map +1 -1
  282. package/dist/components/progress/index.d.ts +1 -1
  283. package/dist/components/progress/index.d.ts.map +1 -1
  284. package/dist/components/progress/index.js +4 -1
  285. package/dist/components/progress/progress.d.ts +22 -14
  286. package/dist/components/progress/progress.d.ts.map +1 -1
  287. package/dist/components/prose/index.d.ts +2 -0
  288. package/dist/components/prose/index.d.ts.map +1 -0
  289. package/dist/components/prose/index.js +17 -0
  290. package/dist/components/prose/index.js.map +1 -0
  291. package/dist/components/prose/prose.d.ts +49 -0
  292. package/dist/components/prose/prose.d.ts.map +1 -0
  293. package/dist/components/prose/styles.css +593 -0
  294. package/dist/components/radio-group/index.js +9 -3
  295. package/dist/components/radio-group/index.js.map +1 -1
  296. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  297. package/dist/components/rating/index.js +3 -2
  298. package/dist/components/rating/index.js.map +1 -1
  299. package/dist/components/rating/rating.d.ts.map +1 -1
  300. package/dist/components/schedule/index.js +10 -8
  301. package/dist/components/schedule/index.js.map +1 -1
  302. package/dist/components/scroll-area/index.d.ts +2 -0
  303. package/dist/components/scroll-area/index.d.ts.map +1 -0
  304. package/dist/components/scroll-area/index.js +10 -0
  305. package/dist/components/scroll-area/index.js.map +1 -0
  306. package/dist/components/scroll-area/scroll-area.d.ts +150 -0
  307. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  308. package/dist/components/segment-group/index.js +2 -2
  309. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  310. package/dist/components/select/index.js +12 -8
  311. package/dist/components/select/select.d.ts +1 -1
  312. package/dist/components/select/select.d.ts.map +1 -1
  313. package/dist/components/slider/index.js +2 -2
  314. package/dist/components/slider/slider.d.ts.map +1 -1
  315. package/dist/components/splitter/index.d.ts +2 -0
  316. package/dist/components/splitter/index.d.ts.map +1 -0
  317. package/dist/components/splitter/index.js +373 -0
  318. package/dist/components/splitter/index.js.map +1 -0
  319. package/dist/components/splitter/splitter.d.ts +159 -0
  320. package/dist/components/splitter/splitter.d.ts.map +1 -0
  321. package/dist/components/spotlight/index.js +23 -22
  322. package/dist/components/spotlight/index.js.map +1 -1
  323. package/dist/components/spotlight/spotlight.d.ts.map +1 -1
  324. package/dist/components/steps/index.d.ts +4 -0
  325. package/dist/components/steps/index.d.ts.map +1 -0
  326. package/dist/components/steps/index.js +478 -0
  327. package/dist/components/steps/index.js.map +1 -0
  328. package/dist/components/steps/steps-data.d.ts +78 -0
  329. package/dist/components/steps/steps-data.d.ts.map +1 -0
  330. package/dist/components/steps/steps.d.ts +183 -0
  331. package/dist/components/steps/steps.d.ts.map +1 -0
  332. package/dist/components/switch/index.js +4 -3
  333. package/dist/components/switch/index.js.map +1 -1
  334. package/dist/components/switch/switch.d.ts.map +1 -1
  335. package/dist/components/table-of-contents/index.d.ts +2 -0
  336. package/dist/components/table-of-contents/index.d.ts.map +1 -0
  337. package/dist/components/table-of-contents/index.js +471 -0
  338. package/dist/components/table-of-contents/index.js.map +1 -0
  339. package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
  340. package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
  341. package/dist/components/tags-input/index.js +12 -9
  342. package/dist/components/tags-input/index.js.map +1 -1
  343. package/dist/components/tags-input/tags-input.d.ts +1 -1
  344. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  345. package/dist/components/text-input/index.js +2 -2
  346. package/dist/components/textarea/index.js +8 -6
  347. package/dist/components/textarea/index.js.map +1 -1
  348. package/dist/components/textarea/textarea.d.ts.map +1 -1
  349. package/dist/components/time-input/index.js +11 -9
  350. package/dist/components/time-input/index.js.map +1 -1
  351. package/dist/components/tooltip/index.js +1 -1
  352. package/dist/components/tooltip/tooltip.d.ts +3 -8
  353. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  354. package/dist/components/tour/conditions.d.ts +83 -0
  355. package/dist/components/tour/conditions.d.ts.map +1 -0
  356. package/dist/components/tour/create-tours.d.ts +49 -0
  357. package/dist/components/tour/create-tours.d.ts.map +1 -0
  358. package/dist/components/tour/index.d.ts +6 -0
  359. package/dist/components/tour/index.d.ts.map +1 -0
  360. package/dist/components/tour/index.js +1449 -0
  361. package/dist/components/tour/index.js.map +1 -0
  362. package/dist/components/tour/runtime.d.ts +57 -0
  363. package/dist/components/tour/runtime.d.ts.map +1 -0
  364. package/dist/components/tour/storage.d.ts +14 -0
  365. package/dist/components/tour/storage.d.ts.map +1 -0
  366. package/dist/components/tour/store.d.ts +62 -0
  367. package/dist/components/tour/store.d.ts.map +1 -0
  368. package/dist/components/tour/tour.d.ts +77 -0
  369. package/dist/components/tour/tour.d.ts.map +1 -0
  370. package/dist/components/tour/types.d.ts +680 -0
  371. package/dist/components/tour/types.d.ts.map +1 -0
  372. package/dist/components/tree/index.d.ts +3 -0
  373. package/dist/components/tree/index.d.ts.map +1 -0
  374. package/dist/components/tree/index.js +457 -0
  375. package/dist/components/tree/index.js.map +1 -0
  376. package/dist/components/tree/tree-row.d.ts +72 -0
  377. package/dist/components/tree/tree-row.d.ts.map +1 -0
  378. package/dist/components/tree/tree.d.ts +193 -0
  379. package/dist/components/tree/tree.d.ts.map +1 -0
  380. package/dist/components/tree-multi-select/index.js +31 -54
  381. package/dist/components/tree-multi-select/index.js.map +1 -1
  382. package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
  383. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  384. package/dist/components/tree-select/index.js +30 -24
  385. package/dist/components/tree-select/index.js.map +1 -1
  386. package/dist/components/tree-select/tree-popover.d.ts +20 -31
  387. package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
  388. package/dist/components/tree-select/tree-select.d.ts +1 -1
  389. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  390. package/dist/index.d.ts +2 -0
  391. package/dist/index.d.ts.map +1 -1
  392. package/dist/index.js +10 -8
  393. package/dist/index.js.map +1 -1
  394. package/dist/lib/date-predicates.d.ts +7 -5
  395. package/dist/lib/date-predicates.d.ts.map +1 -1
  396. package/dist/lib/date-value.d.ts +20 -0
  397. package/dist/lib/date-value.d.ts.map +1 -1
  398. package/dist/lib/floating-arrow.d.ts +53 -0
  399. package/dist/lib/floating-arrow.d.ts.map +1 -0
  400. package/dist/lib/focus-return.d.ts +53 -0
  401. package/dist/lib/focus-return.d.ts.map +1 -0
  402. package/dist/lib/meter.d.ts +104 -0
  403. package/dist/lib/meter.d.ts.map +1 -0
  404. package/dist/lib/overlay-layer.d.ts +26 -8
  405. package/dist/lib/overlay-layer.d.ts.map +1 -1
  406. package/dist/lib/pressed.d.ts +92 -0
  407. package/dist/lib/pressed.d.ts.map +1 -0
  408. package/dist/lib/tree-data.d.ts +18 -2
  409. package/dist/lib/tree-data.d.ts.map +1 -1
  410. package/dist/lib/use-pagination.d.ts +102 -0
  411. package/dist/lib/use-pagination.d.ts.map +1 -0
  412. package/dist/lib/use-scroll-spy.d.ts +126 -0
  413. package/dist/lib/use-scroll-spy.d.ts.map +1 -0
  414. package/dist/theme.css +39 -3
  415. package/package.json +1 -1
  416. package/src/as-child.contract.test.tsx +283 -1
  417. package/src/components/action-icon/action-icon.tsx +34 -4
  418. package/src/components/anchor/anchor.test.tsx +232 -0
  419. package/src/components/anchor/anchor.tsx +187 -0
  420. package/src/components/anchor/index.ts +12 -0
  421. package/src/components/app-shell/app-shell.test.tsx +15 -7
  422. package/src/components/app-shell/app-shell.tsx +27 -20
  423. package/src/components/autocomplete/autocomplete.tsx +11 -3
  424. package/src/components/breadcrumb/breadcrumb.test.tsx +24 -0
  425. package/src/components/breadcrumb/breadcrumb.tsx +20 -1
  426. package/src/components/button/button-pressed.test.tsx +202 -0
  427. package/src/components/button/button.tsx +48 -6
  428. package/src/components/button-select/button-select-control.tsx +2 -2
  429. package/src/components/button-select/button-select.tsx +22 -2
  430. package/src/components/calendar/aliases.tsx +28 -0
  431. package/src/components/calendar/calendar-body.tsx +310 -210
  432. package/src/components/calendar/calendar.tsx +43 -12
  433. package/src/components/calendar/index.ts +7 -1
  434. package/src/components/calendar/month-year-calendar.test.tsx +106 -0
  435. package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
  436. package/src/components/checkbox/checkbox.tsx +7 -2
  437. package/src/components/choice-card-group/choice-card-group.tsx +2 -2
  438. package/src/components/circular-progress/circular-progress.test.tsx +35 -0
  439. package/src/components/circular-progress/circular-progress.tsx +116 -59
  440. package/src/components/circular-progress/index.ts +1 -0
  441. package/src/components/code/code.test.tsx +16 -0
  442. package/src/components/code/code.tsx +11 -0
  443. package/src/components/combobox/combobox.tsx +63 -28
  444. package/src/components/combobox-list/combobox-list.tsx +11 -3
  445. package/src/components/data-list/data-list.test.tsx +149 -0
  446. package/src/components/data-list/data-list.tsx +268 -0
  447. package/src/components/data-list/index.ts +9 -0
  448. package/src/components/data-table/data-table-group.test.tsx +16 -0
  449. package/src/components/data-table/data-table-group.tsx +15 -2
  450. package/src/components/data-table/data-table-placeholder.tsx +28 -36
  451. package/src/components/data-table/data-table-stack.tsx +33 -39
  452. package/src/components/data-table/data-table.test.tsx +31 -0
  453. package/src/components/data-table/data-table.tsx +41 -42
  454. package/src/components/date-picker/aliases.tsx +28 -0
  455. package/src/components/date-picker/date-picker.test.tsx +29 -0
  456. package/src/components/date-picker/date-picker.tsx +164 -45
  457. package/src/components/date-picker/index.ts +5 -1
  458. package/src/components/date-picker/month-year-picker.test.tsx +362 -0
  459. package/src/components/drawer/drawer.test.tsx +41 -0
  460. package/src/components/drawer/drawer.tsx +7 -1
  461. package/src/components/empty-state/empty-state.test.tsx +109 -0
  462. package/src/components/empty-state/empty-state.tsx +180 -0
  463. package/src/components/empty-state/index.ts +9 -0
  464. package/src/components/field/field.tsx +35 -1
  465. package/src/components/fieldset/fieldset.test.tsx +352 -0
  466. package/src/components/fieldset/fieldset.tsx +268 -0
  467. package/src/components/fieldset/index.ts +11 -0
  468. package/src/components/file-preview/file-preview.test.tsx +2 -1
  469. package/src/components/file-preview/file-preview.tsx +7 -13
  470. package/src/components/file-upload/file-upload.tsx +14 -5
  471. package/src/components/hover-card/hover-card.tsx +5 -1
  472. package/src/components/input/input.tsx +12 -5
  473. package/src/components/kbd/kbd.test.tsx +13 -0
  474. package/src/components/kbd/kbd.tsx +6 -0
  475. package/src/components/menu/menu.tsx +6 -2
  476. package/src/components/modal/modal.test.tsx +41 -0
  477. package/src/components/modal/modal.tsx +17 -9
  478. package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
  479. package/src/components/multi-select/multi-select.tsx +11 -3
  480. package/src/components/notification/create-notifier.tsx +1 -1
  481. package/src/components/number-input/number-input.tsx +12 -3
  482. package/src/components/overlays/dialog-parts.tsx +42 -5
  483. package/src/components/pagination/index.ts +19 -0
  484. package/src/components/pagination/pagination.test.tsx +187 -0
  485. package/src/components/pagination/pagination.tsx +563 -0
  486. package/src/components/password-input/password-input.tsx +12 -3
  487. package/src/components/phone-input/phone-input.tsx +12 -3
  488. package/src/components/pills-input/pills-input.tsx +7 -2
  489. package/src/components/pin-input/pin-input.tsx +13 -4
  490. package/src/components/popover/popover.tsx +87 -17
  491. package/src/components/progress/index.ts +1 -0
  492. package/src/components/progress/progress.test.tsx +102 -0
  493. package/src/components/progress/progress.tsx +116 -62
  494. package/src/components/prose/index.ts +1 -0
  495. package/src/components/prose/prose.test.tsx +90 -0
  496. package/src/components/prose/prose.tsx +60 -0
  497. package/src/components/prose/styles.css +593 -0
  498. package/src/components/radio-group/radio-group.tsx +8 -3
  499. package/src/components/rating/rating.tsx +5 -2
  500. package/src/components/scroll-area/index.ts +18 -0
  501. package/src/components/scroll-area/scroll-area.test.tsx +184 -0
  502. package/src/components/scroll-area/scroll-area.tsx +448 -0
  503. package/src/components/segment-group/segment-group.tsx +2 -2
  504. package/src/components/select/select.tsx +37 -18
  505. package/src/components/slider/slider.tsx +2 -2
  506. package/src/components/splitter/index.ts +15 -0
  507. package/src/components/splitter/splitter.test.tsx +244 -0
  508. package/src/components/splitter/splitter.tsx +625 -0
  509. package/src/components/spotlight/spotlight.test.tsx +34 -26
  510. package/src/components/spotlight/spotlight.tsx +7 -9
  511. package/src/components/steps/index.ts +21 -0
  512. package/src/components/steps/steps-data.tsx +179 -0
  513. package/src/components/steps/steps.test.tsx +235 -0
  514. package/src/components/steps/steps.tsx +686 -0
  515. package/src/components/switch/switch.tsx +7 -2
  516. package/src/components/table-of-contents/index.ts +17 -0
  517. package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
  518. package/src/components/table-of-contents/table-of-contents.tsx +708 -0
  519. package/src/components/tags-input/tags-input.tsx +12 -3
  520. package/src/components/textarea/textarea.tsx +15 -5
  521. package/src/components/tooltip/tooltip.tsx +8 -17
  522. package/src/components/tour/conditions.test.ts +527 -0
  523. package/src/components/tour/conditions.ts +445 -0
  524. package/src/components/tour/create-tours.tsx +150 -0
  525. package/src/components/tour/index.ts +86 -0
  526. package/src/components/tour/runtime.ts +187 -0
  527. package/src/components/tour/storage.test.ts +68 -0
  528. package/src/components/tour/storage.ts +44 -0
  529. package/src/components/tour/store.test.tsx +784 -0
  530. package/src/components/tour/store.ts +661 -0
  531. package/src/components/tour/tour.test.tsx +318 -0
  532. package/src/components/tour/tour.tsx +773 -0
  533. package/src/components/tour/tour.types.test.ts +185 -0
  534. package/src/components/tour/types.ts +904 -0
  535. package/src/components/tree/index.ts +24 -0
  536. package/src/components/tree/tree-row.tsx +179 -0
  537. package/src/components/tree/tree.test.tsx +296 -0
  538. package/src/components/tree/tree.tsx +796 -0
  539. package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
  540. package/src/components/tree-select/tree-popover.tsx +26 -107
  541. package/src/components/tree-select/tree-select.tsx +24 -16
  542. package/src/icon-stroke.test.tsx +2 -0
  543. package/src/index.ts +16 -0
  544. package/src/lib/date-predicates.test.ts +46 -0
  545. package/src/lib/date-predicates.ts +44 -24
  546. package/src/lib/date-value.test.ts +24 -1
  547. package/src/lib/date-value.ts +42 -1
  548. package/src/lib/floating-arrow.tsx +73 -0
  549. package/src/lib/focus-return.test.tsx +143 -0
  550. package/src/lib/focus-return.ts +106 -0
  551. package/src/lib/meter.test.ts +40 -0
  552. package/src/lib/meter.ts +159 -0
  553. package/src/lib/overlay-layer.test.tsx +47 -1
  554. package/src/lib/overlay-layer.tsx +65 -8
  555. package/src/lib/pressed.ts +130 -0
  556. package/src/lib/tree-data.ts +42 -2
  557. package/src/lib/use-pagination.test.ts +105 -0
  558. package/src/lib/use-pagination.ts +179 -0
  559. package/src/lib/use-scroll-spy.test.tsx +238 -0
  560. package/src/lib/use-scroll-spy.ts +336 -0
  561. package/src/theme.css +39 -3
  562. package/src/theme.test.ts +29 -1
  563. package/src/visually-hidden-containment.test.tsx +9 -0
  564. package/dist/chunk-2W7H43WL.js.map +0 -1
  565. package/dist/chunk-7E7JNWOC.js.map +0 -1
  566. package/dist/chunk-7FPSQBWB.js.map +0 -1
  567. package/dist/chunk-7KFUFAVP.js.map +0 -1
  568. package/dist/chunk-AKXALCUN.js.map +0 -1
  569. package/dist/chunk-B5YHYI7E.js.map +0 -1
  570. package/dist/chunk-FQJNQW3G.js.map +0 -1
  571. package/dist/chunk-G3AD3NJG.js.map +0 -1
  572. package/dist/chunk-GEZYGBXY.js.map +0 -1
  573. package/dist/chunk-HCHGERDB.js.map +0 -1
  574. package/dist/chunk-HWBFRDX7.js.map +0 -1
  575. package/dist/chunk-I4B3N3UX.js.map +0 -1
  576. package/dist/chunk-IA6DCC3N.js.map +0 -1
  577. package/dist/chunk-IANYMDKH.js.map +0 -1
  578. package/dist/chunk-MQHD3EJE.js.map +0 -1
  579. package/dist/chunk-NNPSBC7O.js.map +0 -1
  580. package/dist/chunk-OXR7BXZA.js.map +0 -1
  581. package/dist/chunk-QKSLDQM2.js +0 -120
  582. package/dist/chunk-QKSLDQM2.js.map +0 -1
  583. package/dist/chunk-QRNQQIQM.js.map +0 -1
  584. package/dist/chunk-RKCUXOU2.js.map +0 -1
  585. package/dist/chunk-S5CQRCTF.js +0 -426
  586. package/dist/chunk-S5CQRCTF.js.map +0 -1
  587. package/dist/chunk-SBZJGFZ6.js.map +0 -1
  588. package/dist/chunk-SP6LCCTZ.js.map +0 -1
  589. package/dist/chunk-TUP7WXQE.js.map +0 -1
  590. package/dist/chunk-V2QZG4IT.js.map +0 -1
  591. package/dist/chunk-X6DESK37.js.map +0 -1
  592. package/dist/chunk-ZB5VMGKB.js.map +0 -1
@@ -0,0 +1,268 @@
1
+ import { ark, type HTMLArkProps } from "@ark-ui/react"
2
+ import { cva } from "class-variance-authority"
3
+ import type { CSSProperties, ReactNode } from "react"
4
+ import { composeChildren } from "../../lib/as-child"
5
+ import { cn } from "../../lib/cn"
6
+ import { props } from "../../lib/props"
7
+ import type { Size } from "../../lib/sizes"
8
+ import type { WithTestId } from "../../lib/test-id"
9
+ import { TEXT_COLOR_CLASSES, TYPOGRAPHY_SIZE_CLASSES } from "../../lib/typography-size"
10
+
11
+ /**
12
+ * Every part is styled from the root through `data-part` hooks
13
+ * (`*:data-[part=item]`, `**:data-[part=label]`), the split `Timeline` and
14
+ * `Table` use, so the parts stay dumb, need no React context, and the whole
15
+ * tree is a Server Component. The selectors are spelled out in full in each
16
+ * class: Tailwind's scanner only sees literal class names, never ones built
17
+ * by interpolation.
18
+ *
19
+ * An item is either a row or a stack:
20
+ *
21
+ * - A **row** re-uses the root's two tracks through `subgrid`, so every label
22
+ * lines up with every other whatever its own width. Label and value share a
23
+ * first baseline, which keeps a one-line label level with a Badge, a Copy
24
+ * button or the first line of a long value.
25
+ * - A **stack** puts the label above the value. It still spans the root's
26
+ * grid (`col-span-full`), so the root keeps its two tracks either way and
27
+ * only the items change shape. Its gap is `row-gap` alone, so a stack
28
+ * that turns back into a row keeps inheriting the root's column gap. That is what lets `responsive` switch on a
29
+ * container query on the root: a query can only style its container's
30
+ * descendants, never the container itself.
31
+ */
32
+ const ROW =
33
+ "*:data-[part=item]:col-span-full *:data-[part=item]:grid *:data-[part=item]:grid-cols-subgrid *:data-[part=item]:items-baseline"
34
+ const STACK =
35
+ "*:data-[part=item]:col-span-full *:data-[part=item]:flex *:data-[part=item]:flex-col *:data-[part=item]:gap-y-(--dl-stack)"
36
+
37
+ /**
38
+ * The label shades, as the root writes them onto every label. They are
39
+ * `TEXT_COLOR_CLASSES.secondary` (Figma's `text-secondary`, the labels tier)
40
+ * and `TYPOGRAPHY_SHADE_CLASSES.muted` behind a label selector, spelled out
41
+ * for the scanner; `data-list.test.tsx` checks they still match those helpers.
42
+ */
43
+ export const LABEL_SHADE_CLASSES = {
44
+ secondary: "**:data-[part=label]:text-brand-900/70 dark:**:data-[part=label]:text-white/80",
45
+ muted: "**:data-[part=label]:text-black/60 dark:**:data-[part=label]:text-white/60",
46
+ } as const
47
+
48
+ const dataListVariants = cva(
49
+ [
50
+ "m-0 grid min-w-0 p-0",
51
+ "grid-cols-[var(--dl-label)_minmax(0,1fr)]",
52
+ // The label track's default: as wide as the widest label, but never more
53
+ // than 40% of the list, so a long label wraps instead of squeezing the
54
+ // values. `labelWidth` replaces it through the same property, set inline
55
+ // so it beats this class whatever the selector order.
56
+ "[--dl-label:fit-content(40%)]",
57
+ ],
58
+ {
59
+ variants: {
60
+ orientation: {
61
+ horizontal: ROW,
62
+ vertical: STACK,
63
+ // `@container` gives the root `container-type: inline-size`, so its
64
+ // own width can no longer come from its content: it fills its parent,
65
+ // like any block. The query reads the root's content box, which the
66
+ // query's own classes (all on the items) never change, so the switch
67
+ // can't feed back into what it measures. 24rem is Tailwind's `@sm`
68
+ // container step; a `var()` can't appear in a query, so it's a literal.
69
+ responsive: [
70
+ "@container/data-list",
71
+ STACK,
72
+ "@sm/data-list:*:data-[part=item]:grid @sm/data-list:*:data-[part=item]:grid-cols-subgrid",
73
+ // The stack's gap is `gap-y` only, so a subgrid row keeps its
74
+ // `column-gap: normal`, which is the root's column gap. A plain
75
+ // `gap-*` here would reset it and glue each label to its value.
76
+ "@sm/data-list:*:data-[part=item]:items-baseline",
77
+ ],
78
+ },
79
+ // Font size from the kit's typography scale (so `size="lg"` reads as
80
+ // `Text size="lg"`), plus the gaps that grow with it. `--dl-stack` is the
81
+ // label-to-value gap of a stacked item, `--dl-row` the space between
82
+ // items (spent as padding instead when there are dividers).
83
+ size: {
84
+ xs: [TYPOGRAPHY_SIZE_CLASSES.xs, "gap-x-3 [--dl-stack:0rem] [--dl-row:0.375rem]"],
85
+ sm: [TYPOGRAPHY_SIZE_CLASSES.sm, "gap-x-4 [--dl-stack:0rem] [--dl-row:0.5rem]"],
86
+ md: [TYPOGRAPHY_SIZE_CLASSES.md, "gap-x-6 [--dl-stack:0.125rem] [--dl-row:0.75rem]"],
87
+ lg: [TYPOGRAPHY_SIZE_CLASSES.lg, "gap-x-6 [--dl-stack:0.125rem] [--dl-row:1rem]"],
88
+ xl: [TYPOGRAPHY_SIZE_CLASSES.xl, "gap-x-8 [--dl-stack:0.25rem] [--dl-row:1.25rem]"],
89
+ },
90
+ // Dividers are the kit's content hairline (the one `Card`'s header and
91
+ // footer draw), between items only. The row spacing moves into each
92
+ // item's padding so the line sits midway between two items, and the
93
+ // first and last item stay flush with the list's edges.
94
+ withDivider: {
95
+ true: [
96
+ "gap-y-0",
97
+ "*:data-[part=item]:py-(--dl-row) *:data-[part=item]:first:pt-0 *:data-[part=item]:last:pb-0",
98
+ "*:data-[part=item]:not-last:border-b *:data-[part=item]:border-brand-900/20 dark:*:data-[part=item]:border-white/8",
99
+ ],
100
+ false: "gap-y-(--dl-row)",
101
+ },
102
+ // Labels: the secondary text colour at medium weight by default, a step
103
+ // below the primary-coloured values; `muted` steps them further back,
104
+ // to the typography muted shade at normal weight.
105
+ muted: {
106
+ true: ["**:data-[part=label]:font-normal", LABEL_SHADE_CLASSES.muted],
107
+ false: ["**:data-[part=label]:font-medium", LABEL_SHADE_CLASSES.secondary],
108
+ },
109
+ },
110
+ defaultVariants: {
111
+ orientation: "horizontal",
112
+ size: "md",
113
+ withDivider: false,
114
+ muted: false,
115
+ },
116
+ },
117
+ )
118
+
119
+ /** How labels sit against their values. */
120
+ export type DataListOrientation = "horizontal" | "vertical" | "responsive"
121
+
122
+ /** One row of the data-driven form. */
123
+ export type DataListEntry = {
124
+ /** The term: what the value is ("Login", "Campus"). Rendered in a `<dt>`. */
125
+ label: ReactNode
126
+ /** The description: any node, from plain text to a Badge, an Avatar or a Copy button. Rendered in a `<dd>`. */
127
+ value: ReactNode
128
+ /** React key for the row. Defaults to the label when it is a string, else the row's index. */
129
+ id?: string
130
+ /** `data-testid` on the item; its label and value get `-label` and `-value` suffixes. */
131
+ testId?: string
132
+ }
133
+
134
+ export type DataListProps = HTMLArkProps<"dl"> &
135
+ WithTestId & {
136
+ /** Rows to render, before any `children`. Each entry becomes a `DataList.Item` with its label and value. */
137
+ data?: readonly DataListEntry[]
138
+ /**
139
+ * `horizontal` (default) puts each label in a column beside its value. `vertical` stacks the
140
+ * label above the value. `responsive` stacks below a 24rem-wide list and goes horizontal from
141
+ * there, measured on the list itself (a container query), not the viewport.
142
+ */
143
+ orientation?: DataListOrientation
144
+ /**
145
+ * The label column's track, for `horizontal` and the wide side of `responsive`: a number in
146
+ * pixels, or any grid track size (`"10rem"`, `"30%"`, `"max-content"`, `"minmax(8rem, 1fr)"`).
147
+ * Default `fit-content(40%)`: the widest label's width, up to 40% of the list.
148
+ */
149
+ labelWidth?: number | string
150
+ /** Font size (the `Text` scale) and the spacing that goes with it. Default `md`. */
151
+ size?: Size
152
+ /** Draws a hairline between items. */
153
+ withDivider?: boolean
154
+ /** Labels in the muted text shade at normal weight, instead of the secondary shade at medium weight. */
155
+ muted?: boolean
156
+ }
157
+
158
+ export type DataListItemProps = HTMLArkProps<"div"> & WithTestId
159
+ export type DataListLabelProps = HTMLArkProps<"dt"> & WithTestId
160
+ export type DataListValueProps = HTMLArkProps<"dd"> & WithTestId
161
+
162
+ /**
163
+ * DataList.Item — one label/value pair. A `<div>` grouping a `<dt>` and its
164
+ * `<dd>` (valid inside a `<dl>`), which lets the pair carry a divider, a
165
+ * `testId` or a click target.
166
+ */
167
+ const DataListItem = ({ testId, ...rest }: DataListItemProps) => (
168
+ <ark.div {...props({ "data-testid": testId })} data-part="item" {...rest} />
169
+ )
170
+
171
+ /** DataList.Label — the term, a `<dt>`. Its colour and weight come from the root's `muted`. */
172
+ const DataListLabel = ({ className, testId, ...rest }: DataListLabelProps) => (
173
+ <ark.dt
174
+ {...props({ "data-testid": testId })}
175
+ data-part="label"
176
+ className={cn("m-0 min-w-0 wrap-break-word", className)}
177
+ {...rest}
178
+ />
179
+ )
180
+
181
+ /** DataList.Value — the description, a `<dd>` in the primary text colour. Holds any node; long text wraps inside its column. */
182
+ const DataListValue = ({ className, testId, ...rest }: DataListValueProps) => (
183
+ <ark.dd
184
+ {...props({ "data-testid": testId })}
185
+ data-part="value"
186
+ className={cn("m-0 min-w-0 wrap-break-word", TEXT_COLOR_CLASSES.primary, className)}
187
+ {...rest}
188
+ />
189
+ )
190
+
191
+ /** The React key of a data row: its `id`, else a string label, else its index. */
192
+ const entryKey = (entry: DataListEntry, index: number): string =>
193
+ entry.id ?? (typeof entry.label === "string" ? entry.label : String(index))
194
+
195
+ /**
196
+ * DataList — a key/value description list on a semantic `<dl>`, for profile
197
+ * and detail pages ("Login: jdoe", "Campus: Paris", "Status: <Badge>").
198
+ *
199
+ * Pure React Server Component. Pass rows as `data`, or compose
200
+ * `DataList.Item` / `.Label` / `.Value` for a row the data form can't
201
+ * describe; the two mix, `data` first.
202
+ *
203
+ * <DataList
204
+ * withDivider
205
+ * data={[
206
+ * { label: "Login", value: "jdoe" },
207
+ * { label: "Campus", value: "Paris" },
208
+ * ]}
209
+ * >
210
+ * <DataList.Item>
211
+ * <DataList.Label>Status</DataList.Label>
212
+ * <DataList.Value><Badge color="green">Active</Badge></DataList.Value>
213
+ * </DataList.Item>
214
+ * </DataList>
215
+ *
216
+ * In `horizontal`, items are subgrid rows of the root's two columns, so labels
217
+ * line up down the list. `responsive` is a container query on the list
218
+ * itself, which therefore always fills its parent's width (it can't
219
+ * shrink-wrap its content in a flex row: give it a width there).
220
+ */
221
+ const DataListComponent = ({
222
+ className,
223
+ style,
224
+ data,
225
+ orientation,
226
+ labelWidth,
227
+ size,
228
+ withDivider,
229
+ muted,
230
+ asChild,
231
+ children,
232
+ testId,
233
+ ...rest
234
+ }: DataListProps) => {
235
+ const labelTrack = typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth
236
+ return (
237
+ <ark.dl
238
+ {...props({ "data-testid": testId })}
239
+ data-orientation={orientation ?? "horizontal"}
240
+ {...rest}
241
+ asChild={asChild}
242
+ style={labelTrack ? ({ ...style, "--dl-label": labelTrack } as CSSProperties) : style}
243
+ className={cn(dataListVariants({ orientation, size, withDivider, muted }), className)}
244
+ >
245
+ {composeChildren(asChild, children, (own) => (
246
+ <>
247
+ {data?.map((entry, index) => (
248
+ <DataListItem key={entryKey(entry, index)} testId={entry.testId}>
249
+ <DataListLabel testId={entry.testId && `${entry.testId}-label`}>
250
+ {entry.label}
251
+ </DataListLabel>
252
+ <DataListValue testId={entry.testId && `${entry.testId}-value`}>
253
+ {entry.value}
254
+ </DataListValue>
255
+ </DataListItem>
256
+ ))}
257
+ {own}
258
+ </>
259
+ ))}
260
+ </ark.dl>
261
+ )
262
+ }
263
+
264
+ export const DataList = Object.assign(DataListComponent, {
265
+ Item: DataListItem,
266
+ Label: DataListLabel,
267
+ Value: DataListValue,
268
+ })
@@ -0,0 +1,9 @@
1
+ export {
2
+ DataList,
3
+ type DataListEntry,
4
+ type DataListItemProps,
5
+ type DataListLabelProps,
6
+ type DataListOrientation,
7
+ type DataListProps,
8
+ type DataListValueProps,
9
+ } from "./data-list"
@@ -1005,3 +1005,19 @@ describe("DataTable grouping", () => {
1005
1005
  })
1006
1006
  })
1007
1007
  })
1008
+
1009
+ describe("the group header's checkbox", () => {
1010
+ // jsdom lays nothing out: the offset the pinned content sticks at is read from its class,
1011
+ // and must be the cells' own inline padding, or the checkbox leaves the select column.
1012
+ it.each([
1013
+ ["xs", "start-2"],
1014
+ ["sm", "start-2.5"],
1015
+ ["md", "start-3"],
1016
+ ["lg", "start-4"],
1017
+ ] as const)("stays in the select column at size %s (%s)", (size, start) => {
1018
+ const { container } = renderTable({ ...byStatus, size, enableRowSelection: true })
1019
+ const pinned = container.querySelector("tr[data-group] th > div")
1020
+ expect(pinned?.className).toContain(start)
1021
+ expect(container.querySelector("tr[data-group] [data-scope=checkbox]")).not.toBeNull()
1022
+ })
1023
+ })
@@ -286,6 +286,17 @@ export function DataTableGroupShowMore<TEntity extends RowData>({
286
286
  )
287
287
  }
288
288
 
289
+ /** Where a group's content stays pinned while the table scrolls sideways: the cells' own
290
+ * inline padding per density (`Table`'s `[&_td]:px-*`), so the group's checkbox stands
291
+ * in the select column with the rows' own whatever the size. */
292
+ const STICKY_START: Record<TableSize, string> = {
293
+ xs: "start-2",
294
+ sm: "start-2.5",
295
+ md: "start-3",
296
+ lg: "start-4",
297
+ xl: "start-4",
298
+ }
299
+
289
300
  /** The group header cell's wash and hairlines. The `<tr>` carries
290
301
  * `data-placeholder`, so `Table`'s row hover leaves it alone. */
291
302
  const groupHeaderCell = cn(
@@ -357,7 +368,9 @@ export function DataTableGroupedBody<TEntity extends RowData>({
357
368
  >
358
369
  {/* Pinned to the inline start, so the group stays named while the table
359
370
  scrolls sideways. */}
360
- <div className="sticky start-3 flex w-max max-w-full items-center gap-2">
371
+ <div
372
+ className={cn("sticky flex w-max max-w-full items-center gap-2", STICKY_START[size])}
373
+ >
361
374
  {selectable && selectableRows.length > 0 && (
362
375
  <Checkbox
363
376
  size={size}
@@ -413,7 +426,7 @@ export function DataTableGroupedBody<TEntity extends RowData>({
413
426
  grouping.nextCount(node) > 0 && (
414
427
  <Table.Row key={`${node.id}-more`} testId={`group-${node.id}-more`} data-placeholder>
415
428
  <Table.Cell colSpan={colSpan}>
416
- <div className={cn("sticky start-3 w-max", node.depth > 0 && "ps-6")}>
429
+ <div className={cn("sticky w-max", STICKY_START[size], node.depth > 0 && "ps-6")}>
417
430
  <DataTableGroupShowMore node={node} grouping={grouping} translations={translations} />
418
431
  </div>
419
432
  </Table.Cell>
@@ -1,11 +1,14 @@
1
1
  import type { ReactNode } from "react"
2
- import { match } from "ts-pattern"
3
- import { cn } from "../../lib/cn"
2
+ import type { Color } from "../../lib/colors"
3
+ import { EmptyState, type EmptyStateRootProps } from "../empty-state"
4
4
 
5
5
  type Placeholder = {
6
6
  title: ReactNode
7
7
  description?: ReactNode
8
8
  actions?: ReactNode
9
+ /** Overrides the view's palette: the error view is `red` by default, the
10
+ * empty view neutral. */
11
+ color?: Color
9
12
  }
10
13
  export type DataTablePlaceholder = ReactNode | Placeholder
11
14
 
@@ -15,47 +18,36 @@ export type DataTablePlaceholder = ReactNode | Placeholder
15
18
  * never disagree on which state is showing. */
16
19
  export type DataTableView = "error" | "loading" | "empty" | "items"
17
20
 
21
+ const isPlaceholder = (node: DataTablePlaceholder): node is Placeholder =>
22
+ !!(node && typeof node === "object" && "title" in node)
23
+
24
+ /** Draws an `empty` / `error` prop as an `EmptyState`: a bare node is its
25
+ * title, an object spells out every part. The view supplies the icon, its
26
+ * default actions (clear filters, retry) and its default palette; the
27
+ * object's own `actions` and `color` win over them. */
18
28
  export function RenderPlaceholder({
19
29
  node,
30
+ icon,
20
31
  defaultActions,
21
- }: {
32
+ defaultColor,
33
+ ...rest
34
+ }: Omit<EmptyStateRootProps, "title" | "color"> & {
22
35
  node: DataTablePlaceholder
36
+ icon?: ReactNode
23
37
  defaultActions?: ReactNode
38
+ defaultColor?: Color
24
39
  }) {
40
+ const placeholder: Placeholder = isPlaceholder(node) ? node : { title: node }
41
+ const { title, description, actions, color } = placeholder
25
42
  return (
26
- <div
27
- className={cn(
28
- "flex flex-col gap-3 [&_data-title]:text-brand-950 dark:[&_data-title]:text-white",
29
- "**:data-desc:text-brand-900/40 dark:**:data-desc:text-white/35",
30
- )}
43
+ <EmptyState
44
+ icon={icon}
45
+ title={title}
46
+ description={description}
47
+ color={color ?? defaultColor}
48
+ {...rest}
31
49
  >
32
- {match(node)
33
- .when(
34
- (n): n is Placeholder => !!(n && typeof n === "object" && "title" in n),
35
- ({ title, description, actions }) => (
36
- <>
37
- <div className="flex flex-col">
38
- <span data-title>{title}</span>
39
- {description && <span data-desc>{description}</span>}
40
- </div>
41
- {(actions || defaultActions) && (
42
- <div className="flex flex-row gap-1 justify-center items-center">
43
- {actions ?? defaultActions}
44
- </div>
45
- )}
46
- </>
47
- ),
48
- )
49
- .otherwise((n) => (
50
- <>
51
- <span data-title>{n}</span>
52
- {defaultActions && (
53
- <div className="flex flex-row gap-1 justify-center items-center">
54
- {defaultActions}
55
- </div>
56
- )}
57
- </>
58
- ))}
59
- </div>
50
+ {actions ?? (defaultActions || undefined)}
51
+ </EmptyState>
60
52
  )
61
53
  }
@@ -19,7 +19,6 @@ import { Pill } from "../pill"
19
19
  import { Select } from "../select/select"
20
20
  import { Skeleton } from "../skeleton"
21
21
  import { Text } from "../text/text"
22
- import { ThemeIcon } from "../theme-icon"
23
22
  import type { DataTableFeatures, Row } from "./data-table-features"
24
23
  import { DataTableFilterControl, hasActiveFilterValue } from "./data-table-filter"
25
24
  import {
@@ -90,28 +89,25 @@ export function DataTableStackedRows<TEntity extends RowData>({
90
89
  <div className={cn("flex flex-1 min-h-0 flex-col gap-2 overflow-y-auto p-3", className)}>
91
90
  {match(view)
92
91
  .with("error", () => (
93
- <div
92
+ <RenderPlaceholder
94
93
  role="alert"
95
- className="flex flex-col gap-3 items-center justify-center py-6 text-center min-h-48.5"
96
- >
97
- {icons.error != null && <ThemeIcon>{icons.error}</ThemeIcon>}
98
- <RenderPlaceholder
99
- node={error}
100
- defaultActions={
101
- onRetry && (
102
- <Button
103
- variant="light"
104
- color="neutral"
105
- size="sm"
106
- startSlot={icons.retry}
107
- onClick={onRetry}
108
- >
109
- {translations.retry}
110
- </Button>
111
- )
112
- }
113
- />
114
- </div>
94
+ node={error}
95
+ icon={icons.error}
96
+ defaultColor="red"
97
+ defaultActions={
98
+ onRetry && (
99
+ <Button
100
+ variant="light"
101
+ color="neutral"
102
+ size="sm"
103
+ startSlot={icons.retry}
104
+ onClick={onRetry}
105
+ >
106
+ {translations.retry}
107
+ </Button>
108
+ )
109
+ }
110
+ />
115
111
  ))
116
112
  .with("loading", () =>
117
113
  Array.from({ length: skeletonRowCount }).map((_, cardIndex) => (
@@ -133,23 +129,21 @@ export function DataTableStackedRows<TEntity extends RowData>({
133
129
  )),
134
130
  )
135
131
  .with("empty", () => (
136
- <div className="flex flex-col gap-3 items-center justify-center py-6 text-center min-h-48.5">
137
- {icons.empty != null && <ThemeIcon>{icons.empty}</ThemeIcon>}
138
- <RenderPlaceholder
139
- node={empty}
140
- defaultActions={
141
- <Button
142
- variant="light"
143
- color="neutral"
144
- size="sm"
145
- startSlot={icons.clear}
146
- onClick={() => table.resetColumnFilters()}
147
- >
148
- {translations.clearFilters}
149
- </Button>
150
- }
151
- />
152
- </div>
132
+ <RenderPlaceholder
133
+ node={empty}
134
+ icon={icons.empty}
135
+ defaultActions={
136
+ <Button
137
+ variant="light"
138
+ color="neutral"
139
+ size="sm"
140
+ startSlot={icons.clear}
141
+ onClick={() => table.resetColumnFilters()}
142
+ >
143
+ {translations.clearFilters}
144
+ </Button>
145
+ }
146
+ />
153
147
  ))
154
148
  .with("items", () => {
155
149
  // Same rendered header content as `DataTableHeaderCell` shows in
@@ -62,6 +62,37 @@ describe("DataTable", () => {
62
62
  expect(within(cell).getByRole("alert").textContent).toBe("Failed to load")
63
63
  })
64
64
 
65
+ it("draws the error view red and the empty view neutral, in both renderings", () => {
66
+ const failed = render(
67
+ <DataTable columns={columns} data={USERS} responsive="stack" error="Failed to load" />,
68
+ )
69
+ // The table cell's alert and the stacked card's.
70
+ const alerts = [...failed.container.querySelectorAll('[role="alert"]')]
71
+ expect(alerts.map((alert) => alert.getAttribute("data-color"))).toEqual(["red", "red"])
72
+ failed.unmount()
73
+
74
+ render(<DataTable columns={columns} data={[]} responsive="stack" />)
75
+ // Title → text column → the EmptyState root.
76
+ const blocks = screen
77
+ .getAllByText(DATA_TABLE_DEFAULT_EMPTY)
78
+ .map((title) => title.parentElement?.parentElement)
79
+ expect(blocks).toHaveLength(2)
80
+ expect(blocks.every((block) => block?.hasAttribute("data-color") === false)).toBe(true)
81
+ })
82
+
83
+ it("lets an error or empty object override the view's palette", () => {
84
+ render(
85
+ <DataTable
86
+ columns={columns}
87
+ data={USERS}
88
+ error={{ title: "Paused", description: "Back on Monday.", color: "neutral" }}
89
+ />,
90
+ )
91
+ const alert = screen.getByRole("alert")
92
+ expect(alert.getAttribute("data-color")).toBe("neutral")
93
+ expect(alert.textContent).toContain("Back on Monday.")
94
+ })
95
+
65
96
  it("keeps a height floor for the placeholder views only", () => {
66
97
  const floor = (container: HTMLElement) => container.querySelector(".min-h-64")
67
98