@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,373 @@
1
+ "use client";
2
+ import { useMergedRefs } from '../../chunk-HBWV5EPU.js';
3
+ import { useDirectionCheck } from '../../chunk-OBSZ4NE2.js';
4
+ import { iconStroke } from '../../chunk-XXOR34T4.js';
5
+ import { devWarn } from '../../chunk-PQZSTI3R.js';
6
+ import { props } from '../../chunk-WYCMIIRR.js';
7
+ import { focusStyles } from '../../chunk-C6NVU4F7.js';
8
+ import { cn } from '../../chunk-4ASNIDV7.js';
9
+ import { ark } from '@ark-ui/react';
10
+ import { useLocaleContext } from '@ark-ui/react/locale';
11
+ import { Splitter as Splitter$1, useSplitterContext as useSplitterContext$1 } from '@ark-ui/react/splitter';
12
+ import { ChevronLeft } from 'lucide-react';
13
+ import { createContext, useRef, useContext, Children, cloneElement, useEffect, useState, isValidElement } from 'react';
14
+ import { jsx } from 'react/jsx-runtime';
15
+
16
+ var SPLITTER_DEFAULT_TRANSLATIONS = {
17
+ handle: "Resize",
18
+ collapse: "Collapse panel",
19
+ expand: "Expand panel"
20
+ };
21
+ var SplitterContext = createContext(null);
22
+ var HandleSlot = createContext(null);
23
+ var useSplitterContext = () => useSplitter().api;
24
+ var useSplitter = () => {
25
+ const context = useContext(SplitterContext);
26
+ if (!context) throw new Error("[@42/ui-react] Splitter parts must be rendered inside <Splitter>.");
27
+ return context;
28
+ };
29
+ var isPanel = (node) => isValidElement(node) && node.type === SplitterPanel;
30
+ var isHandle = (node) => isValidElement(node) && node.type === SplitterHandle;
31
+ var isEmptySize = (size) => !Number.parseFloat(String(size ?? 0));
32
+ var SplitterProvider = ({
33
+ panels,
34
+ orientation,
35
+ dir,
36
+ translations,
37
+ resizeEnd,
38
+ latest,
39
+ onCollapse,
40
+ onExpand,
41
+ children
42
+ }) => {
43
+ const ark2 = useSplitterContext$1();
44
+ useEffect(() => {
45
+ latest.current = ark2.getSizes();
46
+ });
47
+ const ids = panels.map((panel) => panel.props.id);
48
+ const known = (panel) => ids.includes(panel);
49
+ const collapsed = (panel) => known(panel) && ark2.isPanelCollapsed(panel);
50
+ const expand = (panel) => {
51
+ const props2 = panels[ids.indexOf(panel)]?.props;
52
+ const fallback = props2?.min == null && typeof props2?.defaultSize === "number";
53
+ ark2.expandPanel(panel, fallback ? props2?.defaultSize : void 0);
54
+ };
55
+ const shut = ids.filter(collapsed);
56
+ const previous = useRef(null);
57
+ useEffect(() => {
58
+ const before = previous.current;
59
+ previous.current = shut;
60
+ if (!before) return;
61
+ for (const panel of shut.filter((id) => !before.includes(id))) onCollapse?.(panel);
62
+ for (const panel of before.filter((id) => !shut.includes(id))) onExpand?.(panel);
63
+ });
64
+ const api = {
65
+ size: ark2.getSizes(),
66
+ collapsed,
67
+ collapse: (panel) => known(panel) && ark2.collapsePanel(panel),
68
+ expand: (panel) => known(panel) && expand(panel),
69
+ toggle: (panel) => {
70
+ if (!known(panel)) return;
71
+ if (collapsed(panel)) expand(panel);
72
+ else ark2.collapsePanel(panel);
73
+ },
74
+ resize: (panel, size) => known(panel) && ark2.resizePanel(panel, size),
75
+ // Unset entries share what's left, as on the first render.
76
+ reset: () => ark2.setSizes(panels.map((panel) => panel.props.defaultSize))
77
+ };
78
+ const panelDomId = (panel) => known(panel) ? ark2.getPanelProps({ id: panel }).id : void 0;
79
+ return /* @__PURE__ */ jsx(
80
+ SplitterContext.Provider,
81
+ {
82
+ value: { api, orientation, dir, translations, ids, resizeEnd, panelDomId },
83
+ children
84
+ }
85
+ );
86
+ };
87
+ var layout = (children) => {
88
+ const items = Children.toArray(children);
89
+ const panels = items.filter(isPanel).map((panel, index) => panel.props.id ? panel : cloneElement(panel, { id: `panel-${index}` }));
90
+ const ids = panels.map((panel) => panel.props.id);
91
+ const before = items.map((_, index) => items.slice(0, index).filter(isPanel).length);
92
+ const placed = new Set(items.flatMap((item, index) => isHandle(item) ? [before[index]] : []));
93
+ const handle = (k, node) => /* @__PURE__ */ jsx(HandleSlot.Provider, { value: `${ids[k - 1]}:${ids[k]}`, children: node }, `handle-${ids[k - 1]}:${ids[k]}`);
94
+ const rendered = items.flatMap((item, index) => {
95
+ const k = before[index] ?? 0;
96
+ if (isHandle(item)) {
97
+ if (k > 0 && k < ids.length) return [handle(k, item)];
98
+ devWarn(
99
+ "[@42/ui-react] Splitter.Handle must sit between two Splitter.Panels; it was skipped."
100
+ );
101
+ return [];
102
+ }
103
+ if (!isPanel(item)) return [item];
104
+ const panel = panels[k];
105
+ return k > 0 && !placed.has(k) ? [handle(k, /* @__PURE__ */ jsx(SplitterHandle, {})), panel] : [panel];
106
+ });
107
+ return { panels, rendered };
108
+ };
109
+ var SplitterRoot = ({
110
+ orientation = "horizontal",
111
+ size,
112
+ onResize,
113
+ onResizeEnd,
114
+ onCollapse,
115
+ onExpand,
116
+ step = 1,
117
+ translations,
118
+ testId,
119
+ className,
120
+ style,
121
+ children,
122
+ ref,
123
+ asChild: _asChild,
124
+ ...rest
125
+ }) => {
126
+ const { dir } = useLocaleContext();
127
+ const checkDirection = useDirectionCheck();
128
+ const mergedRef = useMergedRefs(ref, checkDirection);
129
+ const { panels, rendered } = layout(children);
130
+ const latest = useRef([]);
131
+ const resizeEnd = () => setTimeout(() => onResizeEnd?.(latest.current));
132
+ return /* @__PURE__ */ jsx(
133
+ Splitter$1.Root,
134
+ {
135
+ ref: mergedRef,
136
+ orientation,
137
+ panels: panels.map(({ props: panel }) => ({
138
+ id: panel.id,
139
+ minSize: panel.min,
140
+ maxSize: panel.max,
141
+ collapsible: panel.collapsible,
142
+ collapsedSize: panel.collapsedSize
143
+ })),
144
+ defaultSize: panels.map((panel) => panel.props.defaultSize),
145
+ size,
146
+ keyboardResizeBy: step,
147
+ onResize: (details) => {
148
+ latest.current = details.size;
149
+ onResize?.(details.size);
150
+ },
151
+ onResizeEnd: (details) => onResizeEnd?.(details.size),
152
+ ...props({ "data-testid": testId }),
153
+ ...rest,
154
+ style: { height: void 0, width: void 0, ...style },
155
+ className: cn("h-full min-h-0 w-full min-w-0", className),
156
+ children: /* @__PURE__ */ jsx(
157
+ SplitterProvider,
158
+ {
159
+ panels,
160
+ orientation,
161
+ dir,
162
+ translations: { ...SPLITTER_DEFAULT_TRANSLATIONS, ...translations },
163
+ resizeEnd,
164
+ latest,
165
+ onCollapse,
166
+ onExpand,
167
+ children: rendered
168
+ }
169
+ )
170
+ }
171
+ );
172
+ };
173
+ var SplitterPanel = ({
174
+ id,
175
+ defaultSize: _defaultSize,
176
+ min: _min,
177
+ max: _max,
178
+ collapsible: _collapsible,
179
+ collapsedSize,
180
+ testId,
181
+ className,
182
+ ...rest
183
+ }) => {
184
+ const { api } = useSplitter();
185
+ const panel = id;
186
+ const collapsed = api.collapsed(panel);
187
+ return /* @__PURE__ */ jsx(
188
+ Splitter$1.Panel,
189
+ {
190
+ id: panel,
191
+ inert: collapsed && isEmptySize(collapsedSize),
192
+ ...props({ "data-testid": testId, "data-collapsed": collapsed }),
193
+ ...rest,
194
+ className: cn(
195
+ // Flex items don't shrink below their content without these, and the
196
+ // panel being the scroller is what lets sticky content stick inside it.
197
+ "relative min-h-0 min-w-0 overflow-auto",
198
+ className
199
+ )
200
+ }
201
+ );
202
+ };
203
+ var useMirroredDrag = (id, disabled) => {
204
+ const { api, ids, orientation, dir, resizeEnd } = useSplitter();
205
+ const mirrored = dir === "rtl" && orientation === "horizontal";
206
+ const [dragging, setDragging] = useState(false);
207
+ const drag = useRef(null);
208
+ const onPointerDownCapture = (event) => {
209
+ if (!mirrored || disabled || event.button !== 0) return;
210
+ event.stopPropagation();
211
+ event.preventDefault();
212
+ const handle = event.currentTarget;
213
+ const panel = id.split(":")[0];
214
+ handle.focus({ preventScroll: true, focusVisible: false });
215
+ drag.current = {
216
+ x: event.clientX,
217
+ width: handle.parentElement?.getBoundingClientRect().width || 1,
218
+ start: api.size[ids.indexOf(panel)] ?? 0,
219
+ panel
220
+ };
221
+ handle.setPointerCapture?.(event.pointerId);
222
+ setDragging(true);
223
+ };
224
+ const onPointerMove = (event) => {
225
+ const current = drag.current;
226
+ if (!current) return;
227
+ const moved = (event.clientX - current.x) / current.width * 100;
228
+ api.resize(current.panel, current.start - moved);
229
+ };
230
+ const end = () => {
231
+ if (!drag.current) return;
232
+ drag.current = null;
233
+ setDragging(false);
234
+ resizeEnd();
235
+ };
236
+ return mirrored ? {
237
+ dragging,
238
+ handlers: {
239
+ onPointerDownCapture,
240
+ onPointerMove,
241
+ onPointerUp: end,
242
+ onLostPointerCapture: end
243
+ }
244
+ } : { dragging: false, handlers: {} };
245
+ };
246
+ var SplitterHandle = ({
247
+ disabled,
248
+ testId,
249
+ className,
250
+ onDoubleClick,
251
+ asChild: _asChild,
252
+ ...rest
253
+ }) => {
254
+ const id = useContext(HandleSlot);
255
+ const { api, translations, resizeEnd } = useSplitter();
256
+ const mirrored = useMirroredDrag(id ?? ":", disabled);
257
+ if (!id) return null;
258
+ return /* @__PURE__ */ jsx(
259
+ Splitter$1.ResizeTrigger,
260
+ {
261
+ id,
262
+ disabled,
263
+ "aria-label": translations.handle,
264
+ tabIndex: disabled ? -1 : 0,
265
+ "aria-disabled": disabled || void 0,
266
+ onDoubleClick: (event) => {
267
+ onDoubleClick?.(event);
268
+ if (disabled || event.defaultPrevented) return;
269
+ api.reset();
270
+ resizeEnd();
271
+ },
272
+ ...mirrored.handlers,
273
+ ...props({ "data-testid": testId, "data-dragging": mirrored.dragging }),
274
+ ...rest,
275
+ className: cn(
276
+ "group/handle relative z-1 flex shrink-0 items-center justify-center p-0 outline-none",
277
+ // The hairline: the handle's own 1px box.
278
+ "bg-brand-900/20 dark:bg-white/15 transition-colors duration-(--duration-fast)",
279
+ "data-[orientation=horizontal]:w-px data-[orientation=vertical]:h-px",
280
+ // The hit area, wider than the line it lies on.
281
+ "before:absolute before:content-['']",
282
+ "data-[orientation=horizontal]:before:inset-y-0 data-[orientation=horizontal]:before:-inset-x-1.5",
283
+ "data-[orientation=vertical]:before:inset-x-0 data-[orientation=vertical]:before:-inset-y-1.5",
284
+ "hover:bg-brand-900/30 dark:hover:bg-white/35",
285
+ "data-dragging:bg-brand-500 dark:data-dragging:bg-brand-500",
286
+ "focus-visible:bg-brand-500 dark:focus-visible:bg-brand-500",
287
+ focusStyles(),
288
+ "data-disabled:hover:bg-brand-900/20 dark:data-disabled:hover:bg-white/15",
289
+ "forced-colors:bg-[CanvasText]",
290
+ className
291
+ ),
292
+ children: /* @__PURE__ */ jsx(
293
+ Splitter$1.ResizeTriggerIndicator,
294
+ {
295
+ className: cn(
296
+ "pointer-events-none shrink-0 rounded-full transition-colors duration-(--duration-fast)",
297
+ "bg-brand-900/30 dark:bg-white/35",
298
+ "group-data-[orientation=horizontal]/handle:h-6 group-data-[orientation=horizontal]/handle:w-1",
299
+ "group-data-[orientation=vertical]/handle:h-1 group-data-[orientation=vertical]/handle:w-6",
300
+ "group-hover/handle:bg-brand-950 dark:group-hover/handle:bg-white",
301
+ "group-data-dragging/handle:bg-brand-500 dark:group-data-dragging/handle:bg-brand-500",
302
+ "group-focus-visible/handle:bg-brand-500 dark:group-focus-visible/handle:bg-brand-500",
303
+ "group-data-disabled/handle:hidden",
304
+ "forced-colors:bg-[CanvasText]"
305
+ )
306
+ }
307
+ )
308
+ }
309
+ );
310
+ };
311
+ var CHEVRON = {
312
+ horizontal: { start: "rtl:-scale-x-100", end: "rotate-180 rtl:-scale-x-100" },
313
+ vertical: { start: "rotate-90", end: "-rotate-90" }
314
+ };
315
+ var SplitterToggle = ({
316
+ panel,
317
+ testId,
318
+ className,
319
+ children,
320
+ asChild,
321
+ onClick,
322
+ ...rest
323
+ }) => {
324
+ const { api, ids, orientation, translations, panelDomId } = useSplitter();
325
+ const collapsed = api.collapsed(panel);
326
+ const last = ids.indexOf(panel) === ids.length - 1 && ids.length > 1;
327
+ const towardStart = last === collapsed;
328
+ const icon = /* @__PURE__ */ jsx(
329
+ ChevronLeft,
330
+ {
331
+ "aria-hidden": true,
332
+ className: cn(iconStroke, CHEVRON[orientation][towardStart ? "start" : "end"])
333
+ }
334
+ );
335
+ const named = children == null;
336
+ return /* @__PURE__ */ jsx(
337
+ ark.button,
338
+ {
339
+ type: "button",
340
+ "aria-expanded": !collapsed,
341
+ "aria-controls": panelDomId(panel),
342
+ "aria-label": named ? collapsed ? translations.expand : translations.collapse : void 0,
343
+ asChild,
344
+ "data-scope": "splitter",
345
+ "data-part": "toggle",
346
+ ...props({ "data-testid": testId, "data-collapsed": collapsed }),
347
+ ...rest,
348
+ onClick: (event) => {
349
+ onClick?.(event);
350
+ if (!event.defaultPrevented) api.toggle(panel);
351
+ },
352
+ className: cn(
353
+ "inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-sm",
354
+ "text-brand-900/70 dark:text-white/80 transition-colors",
355
+ "hover:bg-brand-900/6 hover:text-brand-950 dark:hover:bg-white/8 dark:hover:text-white",
356
+ named && "size-6 [&_svg]:size-4",
357
+ focusStyles(),
358
+ className
359
+ ),
360
+ children: asChild ? children : children ?? icon
361
+ }
362
+ );
363
+ };
364
+ var Splitter = Object.assign(SplitterRoot, {
365
+ Root: SplitterRoot,
366
+ Panel: SplitterPanel,
367
+ Handle: SplitterHandle,
368
+ Toggle: SplitterToggle
369
+ });
370
+
371
+ export { SPLITTER_DEFAULT_TRANSLATIONS, Splitter, useSplitterContext };
372
+ //# sourceMappingURL=index.js.map
373
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/splitter/splitter.tsx"],"names":["ark","useArkSplitter","props","ArkSplitter"],"mappings":";;;;;;;;;;;;;;AA+EO,IAAM,6BAAA,GAAsD;AAAA,EACjE,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,gBAAA;AAAA,EACV,MAAA,EAAQ;AACV;AAyCA,IAAM,eAAA,GAAkB,cAA2C,IAAI,CAAA;AAGvE,IAAM,UAAA,GAAa,cAA6B,IAAI,CAAA;AAS7C,IAAM,kBAAA,GAAqB,MAAmB,WAAA,EAAY,CAAE;AAEnE,IAAM,cAAc,MAAM;AACxB,EAAA,MAAM,OAAA,GAAU,WAAW,eAAe,CAAA;AAC1C,EAAA,IAAI,CAAC,OAAA,EAAS,MAAM,IAAI,MAAM,mEAAmE,CAAA;AACjG,EAAA,OAAO,OAAA;AACT,CAAA;AA2DA,IAAM,UAAU,CAAC,IAAA,KACf,eAAe,IAAI,CAAA,IAAK,KAAK,IAAA,KAAS,aAAA;AACxC,IAAM,WAAW,CAAC,IAAA,KAChB,eAAe,IAAI,CAAA,IAAK,KAAK,IAAA,KAAS,cAAA;AAGxC,IAAM,WAAA,GAAc,CAAC,IAAA,KAAmC,CAAC,OAAO,UAAA,CAAW,MAAA,CAAO,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AA,EAAQ,gBAAA,EAAkB,WAAW,CAAA;AAAA,MAC/D,GAAG,IAAA;AAAA,MACJ,OAAA,EAAS,CAAC,KAAA,KAAU;AAClB,QAAA,OAAA,GAAU,KAAK,CAAA;AACf,QAAA,IAAI,CAAC,KAAA,CAAM,gBAAA,EAAkB,GAAA,CAAI,OAAO,KAAK,CAAA;AAAA,MAC/C,CAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,kFAAA;AAAA,QACA,wDAAA;AAAA,QACA,uFAAA;AAAA,QACA,KAAA,IAAS,uBAAA;AAAA,QACT,WAAA,EAAY;AAAA,QACZ;AAAA,OACF;AAAA,MAEC,QAAA,EAAA,OAAA,GAAU,WAAY,QAAA,IAAY;AAAA;AAAA,GACrC;AAEJ,CAAA;AAMO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc;AAAA,EAClD,IAAA,EAAM,YAAA;AAAA,EACN,KAAA,EAAO,aAAA;AAAA,EACP,MAAA,EAAQ,cAAA;AAAA,EACR,MAAA,EAAQ;AACV,CAAC","file":"index.js","sourcesContent":["\"use client\"\n\nimport type { HTMLArkProps } from \"@ark-ui/react\"\nimport { ark } from \"@ark-ui/react\"\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport {\n Splitter as ArkSplitter,\n useSplitterContext as useArkSplitter,\n} from \"@ark-ui/react/splitter\"\nimport { ChevronLeft } from \"lucide-react\"\nimport {\n Children,\n cloneElement,\n createContext,\n isValidElement,\n type MouseEvent,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefObject,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { devWarn } from \"../../lib/dev-warn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { iconStroke } from \"../../lib/icons\"\nimport { useDirectionCheck } from \"../../lib/intl\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Splitter — resizable panes on Ark UI's `splitter` machine. Put two or more\n * `Splitter.Panel`s side by side (or stacked, with `orientation=\"vertical\"`)\n * and the user drags the line between them to share the space: a project\n * subject next to the code, a list next to its detail view.\n *\n * <Splitter>\n * <Splitter.Panel id=\"list\" defaultSize={30} min={20} max={50} collapsible>\n * <List />\n * </Splitter.Panel>\n * <Splitter.Panel id=\"detail\">\n * <Detail />\n * </Splitter.Panel>\n * </Splitter>\n *\n * - **Sizes are percentages** of the splitter, `size` and the callbacks\n * included. A panel's `defaultSize`, `min`, `max` and `collapsedSize` also\n * take a CSS length (`\"240px\"`, `\"15rem\"`), converted against the\n * splitter's own size.\n * - **Handles are automatic.** One goes between every two panels. Place a\n * `Splitter.Handle` yourself only to configure one (`disabled`, a class).\n * - **Panels are direct children.** The root reads each panel's sizes from\n * its props, so a panel wrapped in another component isn't seen.\n * - **Each panel scrolls its own content.** A panel is `overflow: auto`,\n * with `min-width: 0` / `min-height: 0`, so the panes can shrink below\n * their content, and `position: sticky` inside a panel sticks to it.\n *\n * The direction comes from the locale (`IntlProvider`): under RTL the first\n * panel sits on the right, and dragging, like the arrow keys, follows the\n * pointer. Ark's own drag measures the pointer in screen pixels, left to\n * right, so `Handle` drives a horizontal RTL drag itself (see `useMirroredDrag`).\n */\n\n/** The strings the splitter announces. */\nexport type SplitterTranslations = {\n /** Each handle's accessible name. */\n handle: string\n /** `Splitter.Toggle`'s name while its panel is expanded. */\n collapse: string\n /** `Splitter.Toggle`'s name while its panel is collapsed. */\n expand: string\n}\n\nexport const SPLITTER_DEFAULT_TRANSLATIONS: SplitterTranslations = {\n handle: \"Resize\",\n collapse: \"Collapse panel\",\n expand: \"Expand panel\",\n}\n\n/** A size: a percentage of the splitter (`30`, `\"30%\"`), or a CSS length (`\"240px\"`, `\"15rem\"`). */\nexport type SplitterSize = number | `${number}%` | `${number}px` | `${number}rem` | `${number}em`\n\nexport type SplitterOrientation = \"horizontal\" | \"vertical\"\n\n/**\n * What `useSplitterContext()` returns: the nearest splitter's sizes and the\n * calls that change them. Panels are named by their `id`.\n */\nexport type SplitterApi = {\n /** The current sizes, in percent, in panel order. */\n size: number[]\n /** Whether the panel is at its `collapsedSize`. */\n collapsed: (panel: string) => boolean\n /** Collapses a `collapsible` panel. */\n collapse: (panel: string) => void\n /** Expands a collapsed panel, back to the size it had before, or to its `min`. */\n expand: (panel: string) => void\n /** Collapses an expanded panel, or expands a collapsed one. */\n toggle: (panel: string) => void\n /** Sets one panel's size, in percent. Its neighbour gives or takes the difference. */\n resize: (panel: string, size: number) => void\n /** Puts every panel back to its `defaultSize`, as a double-click on a handle does. */\n reset: () => void\n}\n\ntype SplitterContextValue = {\n api: SplitterApi\n orientation: SplitterOrientation\n dir: \"ltr\" | \"rtl\"\n translations: SplitterTranslations\n /** The panels' ids, in order. */\n ids: string[]\n /** Reports the end of a resize the machine doesn't see (a mirrored drag, a reset). */\n resizeEnd: () => void\n /** The DOM id Ark gives a panel, for `aria-controls`. */\n panelDomId: (panel: string) => string | undefined\n}\n\nconst SplitterContext = createContext<SplitterContextValue | null>(null)\n\n/** The id of the handle being rendered: `\"before:after\"`, the two panels it sits between. */\nconst HandleSlot = createContext<string | null>(null)\n\n/**\n * The nearest `Splitter`'s sizes, and the calls that change them: collapse\n * a panel from a button in its header, reset the layout from a menu.\n *\n * const splitter = useSplitterContext()\n * <Button onClick={() => splitter.toggle(\"list\")}>Toggle list</Button>\n */\nexport const useSplitterContext = (): SplitterApi => useSplitter().api\n\nconst useSplitter = () => {\n const context = useContext(SplitterContext)\n if (!context) throw new Error(\"[@42/ui-react] Splitter parts must be rendered inside <Splitter>.\")\n return context\n}\n\nexport type SplitterProps = NoAsChild<\n Omit<HTMLArkProps<\"div\">, \"onResize\" | \"dir\" | \"defaultValue\" | \"children\">\n> &\n WithTestId & {\n /** Panels side by side (`horizontal`) or stacked (`vertical`). */\n orientation?: SplitterOrientation\n /** The sizes, in percent, in panel order. Controlled: pair it with `onResize`. */\n size?: number[]\n /** Every change, in percent, while dragging too. */\n onResize?: (size: number[]) => void\n /** Once per drag, key press, toggle or reset, with the final sizes: the moment to save them. */\n onResizeEnd?: (size: number[]) => void\n /** A panel reached its `collapsedSize`. */\n onCollapse?: (panel: string) => void\n /** A panel left its `collapsedSize`. */\n onExpand?: (panel: string) => void\n /** How far one arrow key moves a handle, in percent. Shift moves it by 10. */\n step?: number\n /** Override the accessible names. */\n translations?: Partial<SplitterTranslations>\n /** `Splitter.Panel`s, and optionally the `Splitter.Handle`s between them. */\n children?: ReactNode\n ref?: Ref<HTMLDivElement>\n }\n\nexport type SplitterPanelProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** Names the panel for `size` order, `Splitter.Toggle` and `useSplitterContext`. Defaults to `panel-<index>`. */\n id?: string\n /** The starting size. Panels without one share what's left. */\n defaultSize?: SplitterSize\n /** The smallest size a drag or a key press can reach. */\n min?: SplitterSize\n /** The largest size a drag or a key press can reach. */\n max?: SplitterSize\n /** Dragging past half of `min` snaps the panel to `collapsedSize`. */\n collapsible?: boolean\n /** The size of a collapsed panel. A panel collapsed to 0 is also made `inert`. @default 0 */\n collapsedSize?: SplitterSize\n ref?: Ref<HTMLDivElement>\n }\n\nexport type SplitterHandleProps = NoAsChild<Omit<HTMLArkProps<\"button\">, \"id\" | \"children\">> &\n WithTestId & {\n /** Locks the handle: no drag, no key press, no double-click reset. */\n disabled?: boolean\n }\n\nexport type SplitterToggleProps = HTMLArkProps<\"button\"> &\n WithTestId & {\n /** The `id` of the panel it collapses and expands. */\n panel: string\n }\n\ntype PanelElement = ReactElement<SplitterPanelProps>\ntype HandleElement = ReactElement<SplitterHandleProps>\n\nconst isPanel = (node: ReactNode): node is PanelElement =>\n isValidElement(node) && node.type === SplitterPanel\nconst isHandle = (node: ReactNode): node is HandleElement =>\n isValidElement(node) && node.type === SplitterHandle\n\n/** A collapsed size of nothing: the panel shows no content, so it leaves the tab order too. */\nconst isEmptySize = (size: SplitterSize | undefined) => !Number.parseFloat(String(size ?? 0))\n\n/**\n * Builds the context from Ark's machine: the kit's names for its calls, and\n * the reset Ark can't do for a controlled splitter (its \"initial size\" is the\n * last `size` it was handed, so its own reset is a no-op there).\n */\nconst SplitterProvider = ({\n panels,\n orientation,\n dir,\n translations,\n resizeEnd,\n latest,\n onCollapse,\n onExpand,\n children,\n}: Pick<SplitterProps, \"onCollapse\" | \"onExpand\"> & {\n panels: PanelElement[]\n orientation: SplitterOrientation\n dir: \"ltr\" | \"rtl\"\n translations: SplitterTranslations\n resizeEnd: () => void\n latest: RefObject<number[]>\n children: ReactNode\n}) => {\n const ark = useArkSplitter()\n // What a reset that changed nothing reports; any change after this commit overwrites it.\n useEffect(() => {\n latest.current = ark.getSizes()\n })\n const ids = panels.map((panel) => panel.props.id as string)\n const known = (panel: string) => ids.includes(panel)\n const collapsed = (panel: string) => known(panel) && ark.isPanelCollapsed(panel)\n const expand = (panel: string) => {\n const props = panels[ids.indexOf(panel)]?.props\n // Ark expands to the size before the collapse, else to `min`. A panel that\n // starts collapsed and has no `min` would stay at 0: use its default size.\n const fallback = props?.min == null && typeof props?.defaultSize === \"number\"\n ark.expandPanel(panel, fallback ? (props?.defaultSize as number) : undefined)\n }\n // Ark only reports a collapse from its second size change on, so the kit\n // diffs the collapsed set between commits instead. The first commit is the baseline.\n const shut = ids.filter(collapsed)\n const previous = useRef<string[] | null>(null)\n useEffect(() => {\n const before = previous.current\n previous.current = shut\n if (!before) return\n for (const panel of shut.filter((id) => !before.includes(id))) onCollapse?.(panel)\n for (const panel of before.filter((id) => !shut.includes(id))) onExpand?.(panel)\n })\n const api: SplitterApi = {\n size: ark.getSizes(),\n collapsed,\n collapse: (panel) => known(panel) && ark.collapsePanel(panel),\n expand: (panel) => known(panel) && expand(panel),\n toggle: (panel) => {\n if (!known(panel)) return\n if (collapsed(panel)) expand(panel)\n else ark.collapsePanel(panel)\n },\n resize: (panel, size) => known(panel) && ark.resizePanel(panel, size),\n // Unset entries share what's left, as on the first render.\n reset: () => ark.setSizes(panels.map((panel) => panel.props.defaultSize) as SplitterSize[]),\n }\n const panelDomId = (panel: string) =>\n known(panel) ? (ark.getPanelProps({ id: panel }) as { id?: string }).id : undefined\n return (\n <SplitterContext.Provider\n value={{ api, orientation, dir, translations, ids, resizeEnd, panelDomId }}\n >\n {children}\n </SplitterContext.Provider>\n )\n}\n\n/**\n * Lays the children out: every panel gets its id, and a handle goes between\n * every two panels that don't already have one placed by hand.\n */\nconst layout = (children: ReactNode) => {\n const items = Children.toArray(children)\n const panels = items\n .filter(isPanel)\n .map((panel, index) => (panel.props.id ? panel : cloneElement(panel, { id: `panel-${index}` })))\n const ids = panels.map((panel) => panel.props.id as string)\n // How many panels come before each item: a handle at count k sits between panels k-1 and k.\n const before = items.map((_, index) => items.slice(0, index).filter(isPanel).length)\n const placed = new Set(items.flatMap((item, index) => (isHandle(item) ? [before[index]] : [])))\n const handle = (k: number, node: ReactNode) => (\n <HandleSlot.Provider key={`handle-${ids[k - 1]}:${ids[k]}`} value={`${ids[k - 1]}:${ids[k]}`}>\n {node}\n </HandleSlot.Provider>\n )\n const rendered = items.flatMap((item, index): ReactNode[] => {\n const k = before[index] ?? 0\n if (isHandle(item)) {\n if (k > 0 && k < ids.length) return [handle(k, item)]\n devWarn(\n \"[@42/ui-react] Splitter.Handle must sit between two Splitter.Panels; it was skipped.\",\n )\n return []\n }\n if (!isPanel(item)) return [item]\n const panel = panels[k] as PanelElement\n return k > 0 && !placed.has(k) ? [handle(k, <SplitterHandle />), panel] : [panel]\n })\n return { panels, rendered }\n}\n\n/**\n * The convenience root: reads its `Splitter.Panel` children, inserts the\n * handles, and runs the machine. `Splitter.Root` is the same component.\n */\nconst SplitterRoot = ({\n orientation = \"horizontal\",\n size,\n onResize,\n onResizeEnd,\n onCollapse,\n onExpand,\n step = 1,\n translations,\n testId,\n className,\n style,\n children,\n ref,\n asChild: _asChild,\n ...rest\n}: SplitterProps) => {\n const { dir } = useLocaleContext()\n const checkDirection = useDirectionCheck()\n const mergedRef = useMergedRefs(ref, checkDirection)\n const { panels, rendered } = layout(children)\n // The sizes as of the last change, for the resize ends the machine doesn't report.\n const latest = useRef<number[]>([])\n // A macrotask: Ark reports the size change itself in a microtask, which must land first.\n const resizeEnd = () => setTimeout(() => onResizeEnd?.(latest.current))\n\n return (\n <ArkSplitter.Root\n ref={mergedRef}\n orientation={orientation}\n panels={panels.map(({ props: panel }) => ({\n id: panel.id as string,\n minSize: panel.min,\n maxSize: panel.max,\n collapsible: panel.collapsible,\n collapsedSize: panel.collapsedSize,\n }))}\n defaultSize={panels.map((panel) => panel.props.defaultSize) as SplitterSize[]}\n size={size}\n keyboardResizeBy={step}\n onResize={(details) => {\n latest.current = details.size\n onResize?.(details.size)\n }}\n onResizeEnd={(details) => onResizeEnd?.(details.size)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n // Ark sizes the root with an inline `height`/`width: 100%`, which no class\n // could override. The same default moves to classes, so `className=\"h-80\"` sizes it.\n style={{ height: undefined, width: undefined, ...style }}\n className={cn(\"h-full min-h-0 w-full min-w-0\", className)}\n >\n <SplitterProvider\n panels={panels}\n orientation={orientation}\n dir={dir}\n translations={{ ...SPLITTER_DEFAULT_TRANSLATIONS, ...translations }}\n resizeEnd={resizeEnd}\n latest={latest}\n onCollapse={onCollapse}\n onExpand={onExpand}\n >\n {rendered}\n </SplitterProvider>\n </ArkSplitter.Root>\n )\n}\n\n/**\n * One pane. Its size props are read by the root, so it must be a direct\n * child of `Splitter`. It scrolls its own content, and can shrink below it.\n */\nconst SplitterPanel = ({\n id,\n defaultSize: _defaultSize,\n min: _min,\n max: _max,\n collapsible: _collapsible,\n collapsedSize,\n testId,\n className,\n ...rest\n}: SplitterPanelProps) => {\n const { api } = useSplitter()\n const panel = id as string\n const collapsed = api.collapsed(panel)\n return (\n <ArkSplitter.Panel\n id={panel}\n inert={collapsed && isEmptySize(collapsedSize)}\n {...props({ \"data-testid\": testId, \"data-collapsed\": collapsed })}\n {...rest}\n className={cn(\n // Flex items don't shrink below their content without these, and the\n // panel being the scroller is what lets sticky content stick inside it.\n \"relative min-h-0 min-w-0 overflow-auto\",\n className,\n )}\n />\n )\n}\n\n/**\n * Drives a horizontal drag under RTL. Ark measures the pointer left to\n * right and grows the panel *before* the handle as it moves right, which\n * under RTL is the panel on the right: the line would run away from the\n * pointer. So when mirrored, the handle claims the pointer before Ark sees\n * it (capture phase, propagation stopped) and resizes the panel before it\n * by the mirrored distance.\n */\nconst useMirroredDrag = (id: string, disabled: boolean | undefined) => {\n const { api, ids, orientation, dir, resizeEnd } = useSplitter()\n const mirrored = dir === \"rtl\" && orientation === \"horizontal\"\n const [dragging, setDragging] = useState(false)\n const drag = useRef<{ x: number; width: number; start: number; panel: string } | null>(null)\n\n const onPointerDownCapture = (event: PointerEvent<HTMLButtonElement>) => {\n if (!mirrored || disabled || event.button !== 0) return\n event.stopPropagation()\n event.preventDefault()\n const handle = event.currentTarget\n const panel = id.split(\":\")[0] as string\n handle.focus({ preventScroll: true, focusVisible: false } as FocusOptions)\n drag.current = {\n x: event.clientX,\n width: handle.parentElement?.getBoundingClientRect().width || 1,\n start: api.size[ids.indexOf(panel)] ?? 0,\n panel,\n }\n handle.setPointerCapture?.(event.pointerId)\n setDragging(true)\n }\n const onPointerMove = (event: PointerEvent<HTMLButtonElement>) => {\n const current = drag.current\n if (!current) return\n const moved = ((event.clientX - current.x) / current.width) * 100\n api.resize(current.panel, current.start - moved)\n }\n // Up, or capture lost to a cancel: whichever comes first ends the drag.\n const end = () => {\n if (!drag.current) return\n drag.current = null\n setDragging(false)\n resizeEnd()\n }\n return mirrored\n ? {\n dragging,\n handlers: {\n onPointerDownCapture,\n onPointerMove,\n onPointerUp: end,\n onLostPointerCapture: end,\n },\n }\n : { dragging: false, handlers: {} }\n}\n\n/**\n * The line between two panels. A 1px hairline in the layout, with a grip in\n * its middle and a 13px invisible hit area around it. Drag it, focus it and\n * use the arrow keys, Home and End, press Enter to collapse the panel before\n * it, or double-click it to reset the sizes. The root inserts one between\n * every two panels; place one yourself only to configure it.\n */\nconst SplitterHandle = ({\n disabled,\n testId,\n className,\n onDoubleClick,\n asChild: _asChild,\n ...rest\n}: SplitterHandleProps) => {\n const id = useContext(HandleSlot)\n const { api, translations, resizeEnd } = useSplitter()\n const mirrored = useMirroredDrag(id ?? \":\", disabled)\n if (!id) return null\n return (\n <ArkSplitter.ResizeTrigger\n id={id as `${string}:${string}`}\n disabled={disabled}\n aria-label={translations.handle}\n // Ark drops the trigger from the tab order only by omitting tabIndex, which leaves a <button> focusable.\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n onDoubleClick={(event: MouseEvent<HTMLButtonElement>) => {\n onDoubleClick?.(event)\n if (disabled || event.defaultPrevented) return\n api.reset()\n // The handle is focused, so Ark reports no end for this change.\n resizeEnd()\n }}\n {...mirrored.handlers}\n {...props({ \"data-testid\": testId, \"data-dragging\": mirrored.dragging })}\n {...rest}\n className={cn(\n \"group/handle relative z-1 flex shrink-0 items-center justify-center p-0 outline-none\",\n // The hairline: the handle's own 1px box.\n \"bg-brand-900/20 dark:bg-white/15 transition-colors duration-(--duration-fast)\",\n \"data-[orientation=horizontal]:w-px data-[orientation=vertical]:h-px\",\n // The hit area, wider than the line it lies on.\n \"before:absolute before:content-['']\",\n \"data-[orientation=horizontal]:before:inset-y-0 data-[orientation=horizontal]:before:-inset-x-1.5\",\n \"data-[orientation=vertical]:before:inset-x-0 data-[orientation=vertical]:before:-inset-y-1.5\",\n \"hover:bg-brand-900/30 dark:hover:bg-white/35\",\n \"data-dragging:bg-brand-500 dark:data-dragging:bg-brand-500\",\n \"focus-visible:bg-brand-500 dark:focus-visible:bg-brand-500\",\n focusStyles(),\n \"data-disabled:hover:bg-brand-900/20 dark:data-disabled:hover:bg-white/15\",\n \"forced-colors:bg-[CanvasText]\",\n className,\n )}\n >\n <ArkSplitter.ResizeTriggerIndicator\n className={cn(\n \"pointer-events-none shrink-0 rounded-full transition-colors duration-(--duration-fast)\",\n \"bg-brand-900/30 dark:bg-white/35\",\n \"group-data-[orientation=horizontal]/handle:h-6 group-data-[orientation=horizontal]/handle:w-1\",\n \"group-data-[orientation=vertical]/handle:h-1 group-data-[orientation=vertical]/handle:w-6\",\n \"group-hover/handle:bg-brand-950 dark:group-hover/handle:bg-white\",\n \"group-data-dragging/handle:bg-brand-500 dark:group-data-dragging/handle:bg-brand-500\",\n \"group-focus-visible/handle:bg-brand-500 dark:group-focus-visible/handle:bg-brand-500\",\n \"group-data-disabled/handle:hidden\",\n \"forced-colors:bg-[CanvasText]\",\n )}\n />\n </ArkSplitter.ResizeTrigger>\n )\n}\n\n/** Which way the toggle's chevron points: toward where the panel will go. */\nconst CHEVRON: Record<SplitterOrientation, Record<\"start\" | \"end\", string>> = {\n horizontal: { start: \"rtl:-scale-x-100\", end: \"rotate-180 rtl:-scale-x-100\" },\n vertical: { start: \"rotate-90\", end: \"-rotate-90\" },\n}\n\n/**\n * A button that collapses and expands a `collapsible` panel, for a pointer\n * user who'd rather not drag to the edge (the keyboard has Enter on the\n * handle, and this). Put it anywhere inside the splitter, a panel's header\n * usually. Without children it shows a chevron pointing the way the panel\n * will move, and takes its name from `translations`.\n */\nconst SplitterToggle = ({\n panel,\n testId,\n className,\n children,\n asChild,\n onClick,\n ...rest\n}: SplitterToggleProps) => {\n const { api, ids, orientation, translations, panelDomId } = useSplitter()\n const collapsed = api.collapsed(panel)\n // The last panel collapses toward the end; every other one toward the start.\n const last = ids.indexOf(panel) === ids.length - 1 && ids.length > 1\n const towardStart = last === collapsed\n const icon = (\n <ChevronLeft\n aria-hidden\n className={cn(iconStroke, CHEVRON[orientation][towardStart ? \"start\" : \"end\"])}\n />\n )\n const named = children == null\n return (\n <ark.button\n type=\"button\"\n aria-expanded={!collapsed}\n aria-controls={panelDomId(panel)}\n aria-label={named ? (collapsed ? translations.expand : translations.collapse) : undefined}\n asChild={asChild}\n data-scope=\"splitter\"\n data-part=\"toggle\"\n {...props({ \"data-testid\": testId, \"data-collapsed\": collapsed })}\n {...rest}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) api.toggle(panel)\n }}\n className={cn(\n \"inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-sm\",\n \"text-brand-900/70 dark:text-white/80 transition-colors\",\n \"hover:bg-brand-900/6 hover:text-brand-950 dark:hover:bg-white/8 dark:hover:text-white\",\n named && \"size-6 [&_svg]:size-4\",\n focusStyles(),\n className,\n )}\n >\n {asChild ? children : (children ?? icon)}\n </ark.button>\n )\n}\n\n/**\n * Resizable panes. `Splitter.Panel` for each pane; `Splitter.Handle` to\n * configure a handle; `Splitter.Toggle` for a collapse button.\n */\nexport const Splitter = Object.assign(SplitterRoot, {\n Root: SplitterRoot,\n Panel: SplitterPanel,\n Handle: SplitterHandle,\n Toggle: SplitterToggle,\n})\n"]}
@@ -0,0 +1,159 @@
1
+ import type { HTMLArkProps } from "@ark-ui/react";
2
+ import { type ReactNode, type Ref } from "react";
3
+ import type { NoAsChild } from "../../lib/as-child";
4
+ import type { WithTestId } from "../../lib/test-id";
5
+ /**
6
+ * Splitter — resizable panes on Ark UI's `splitter` machine. Put two or more
7
+ * `Splitter.Panel`s side by side (or stacked, with `orientation="vertical"`)
8
+ * and the user drags the line between them to share the space: a project
9
+ * subject next to the code, a list next to its detail view.
10
+ *
11
+ * <Splitter>
12
+ * <Splitter.Panel id="list" defaultSize={30} min={20} max={50} collapsible>
13
+ * <List />
14
+ * </Splitter.Panel>
15
+ * <Splitter.Panel id="detail">
16
+ * <Detail />
17
+ * </Splitter.Panel>
18
+ * </Splitter>
19
+ *
20
+ * - **Sizes are percentages** of the splitter, `size` and the callbacks
21
+ * included. A panel's `defaultSize`, `min`, `max` and `collapsedSize` also
22
+ * take a CSS length (`"240px"`, `"15rem"`), converted against the
23
+ * splitter's own size.
24
+ * - **Handles are automatic.** One goes between every two panels. Place a
25
+ * `Splitter.Handle` yourself only to configure one (`disabled`, a class).
26
+ * - **Panels are direct children.** The root reads each panel's sizes from
27
+ * its props, so a panel wrapped in another component isn't seen.
28
+ * - **Each panel scrolls its own content.** A panel is `overflow: auto`,
29
+ * with `min-width: 0` / `min-height: 0`, so the panes can shrink below
30
+ * their content, and `position: sticky` inside a panel sticks to it.
31
+ *
32
+ * The direction comes from the locale (`IntlProvider`): under RTL the first
33
+ * panel sits on the right, and dragging, like the arrow keys, follows the
34
+ * pointer. Ark's own drag measures the pointer in screen pixels, left to
35
+ * right, so `Handle` drives a horizontal RTL drag itself (see `useMirroredDrag`).
36
+ */
37
+ /** The strings the splitter announces. */
38
+ export type SplitterTranslations = {
39
+ /** Each handle's accessible name. */
40
+ handle: string;
41
+ /** `Splitter.Toggle`'s name while its panel is expanded. */
42
+ collapse: string;
43
+ /** `Splitter.Toggle`'s name while its panel is collapsed. */
44
+ expand: string;
45
+ };
46
+ export declare const SPLITTER_DEFAULT_TRANSLATIONS: SplitterTranslations;
47
+ /** A size: a percentage of the splitter (`30`, `"30%"`), or a CSS length (`"240px"`, `"15rem"`). */
48
+ export type SplitterSize = number | `${number}%` | `${number}px` | `${number}rem` | `${number}em`;
49
+ export type SplitterOrientation = "horizontal" | "vertical";
50
+ /**
51
+ * What `useSplitterContext()` returns: the nearest splitter's sizes and the
52
+ * calls that change them. Panels are named by their `id`.
53
+ */
54
+ export type SplitterApi = {
55
+ /** The current sizes, in percent, in panel order. */
56
+ size: number[];
57
+ /** Whether the panel is at its `collapsedSize`. */
58
+ collapsed: (panel: string) => boolean;
59
+ /** Collapses a `collapsible` panel. */
60
+ collapse: (panel: string) => void;
61
+ /** Expands a collapsed panel, back to the size it had before, or to its `min`. */
62
+ expand: (panel: string) => void;
63
+ /** Collapses an expanded panel, or expands a collapsed one. */
64
+ toggle: (panel: string) => void;
65
+ /** Sets one panel's size, in percent. Its neighbour gives or takes the difference. */
66
+ resize: (panel: string, size: number) => void;
67
+ /** Puts every panel back to its `defaultSize`, as a double-click on a handle does. */
68
+ reset: () => void;
69
+ };
70
+ /**
71
+ * The nearest `Splitter`'s sizes, and the calls that change them: collapse
72
+ * a panel from a button in its header, reset the layout from a menu.
73
+ *
74
+ * const splitter = useSplitterContext()
75
+ * <Button onClick={() => splitter.toggle("list")}>Toggle list</Button>
76
+ */
77
+ export declare const useSplitterContext: () => SplitterApi;
78
+ export type SplitterProps = NoAsChild<Omit<HTMLArkProps<"div">, "onResize" | "dir" | "defaultValue" | "children">> & WithTestId & {
79
+ /** Panels side by side (`horizontal`) or stacked (`vertical`). */
80
+ orientation?: SplitterOrientation;
81
+ /** The sizes, in percent, in panel order. Controlled: pair it with `onResize`. */
82
+ size?: number[];
83
+ /** Every change, in percent, while dragging too. */
84
+ onResize?: (size: number[]) => void;
85
+ /** Once per drag, key press, toggle or reset, with the final sizes: the moment to save them. */
86
+ onResizeEnd?: (size: number[]) => void;
87
+ /** A panel reached its `collapsedSize`. */
88
+ onCollapse?: (panel: string) => void;
89
+ /** A panel left its `collapsedSize`. */
90
+ onExpand?: (panel: string) => void;
91
+ /** How far one arrow key moves a handle, in percent. Shift moves it by 10. */
92
+ step?: number;
93
+ /** Override the accessible names. */
94
+ translations?: Partial<SplitterTranslations>;
95
+ /** `Splitter.Panel`s, and optionally the `Splitter.Handle`s between them. */
96
+ children?: ReactNode;
97
+ ref?: Ref<HTMLDivElement>;
98
+ };
99
+ export type SplitterPanelProps = HTMLArkProps<"div"> & WithTestId & {
100
+ /** Names the panel for `size` order, `Splitter.Toggle` and `useSplitterContext`. Defaults to `panel-<index>`. */
101
+ id?: string;
102
+ /** The starting size. Panels without one share what's left. */
103
+ defaultSize?: SplitterSize;
104
+ /** The smallest size a drag or a key press can reach. */
105
+ min?: SplitterSize;
106
+ /** The largest size a drag or a key press can reach. */
107
+ max?: SplitterSize;
108
+ /** Dragging past half of `min` snaps the panel to `collapsedSize`. */
109
+ collapsible?: boolean;
110
+ /** The size of a collapsed panel. A panel collapsed to 0 is also made `inert`. @default 0 */
111
+ collapsedSize?: SplitterSize;
112
+ ref?: Ref<HTMLDivElement>;
113
+ };
114
+ export type SplitterHandleProps = NoAsChild<Omit<HTMLArkProps<"button">, "id" | "children">> & WithTestId & {
115
+ /** Locks the handle: no drag, no key press, no double-click reset. */
116
+ disabled?: boolean;
117
+ };
118
+ export type SplitterToggleProps = HTMLArkProps<"button"> & WithTestId & {
119
+ /** The `id` of the panel it collapses and expands. */
120
+ panel: string;
121
+ };
122
+ /**
123
+ * The convenience root: reads its `Splitter.Panel` children, inserts the
124
+ * handles, and runs the machine. `Splitter.Root` is the same component.
125
+ */
126
+ declare const SplitterRoot: ({ orientation, size, onResize, onResizeEnd, onCollapse, onExpand, step, translations, testId, className, style, children, ref, asChild: _asChild, ...rest }: SplitterProps) => import("react").JSX.Element;
127
+ /**
128
+ * One pane. Its size props are read by the root, so it must be a direct
129
+ * child of `Splitter`. It scrolls its own content, and can shrink below it.
130
+ */
131
+ declare const SplitterPanel: ({ id, defaultSize: _defaultSize, min: _min, max: _max, collapsible: _collapsible, collapsedSize, testId, className, ...rest }: SplitterPanelProps) => import("react").JSX.Element;
132
+ /**
133
+ * The line between two panels. A 1px hairline in the layout, with a grip in
134
+ * its middle and a 13px invisible hit area around it. Drag it, focus it and
135
+ * use the arrow keys, Home and End, press Enter to collapse the panel before
136
+ * it, or double-click it to reset the sizes. The root inserts one between
137
+ * every two panels; place one yourself only to configure it.
138
+ */
139
+ declare const SplitterHandle: ({ disabled, testId, className, onDoubleClick, asChild: _asChild, ...rest }: SplitterHandleProps) => import("react").JSX.Element | null;
140
+ /**
141
+ * A button that collapses and expands a `collapsible` panel, for a pointer
142
+ * user who'd rather not drag to the edge (the keyboard has Enter on the
143
+ * handle, and this). Put it anywhere inside the splitter, a panel's header
144
+ * usually. Without children it shows a chevron pointing the way the panel
145
+ * will move, and takes its name from `translations`.
146
+ */
147
+ declare const SplitterToggle: ({ panel, testId, className, children, asChild, onClick, ...rest }: SplitterToggleProps) => import("react").JSX.Element;
148
+ /**
149
+ * Resizable panes. `Splitter.Panel` for each pane; `Splitter.Handle` to
150
+ * configure a handle; `Splitter.Toggle` for a collapse button.
151
+ */
152
+ export declare const Splitter: typeof SplitterRoot & {
153
+ Root: typeof SplitterRoot;
154
+ Panel: typeof SplitterPanel;
155
+ Handle: typeof SplitterHandle;
156
+ Toggle: typeof SplitterToggle;
157
+ };
158
+ export {};
159
+ //# sourceMappingURL=splitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitter.d.ts","sourceRoot":"","sources":["../../../src/components/splitter/splitter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAQjD,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,GAAG,EAMT,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAQnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,oBAAoB,GAAG;IACjC,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAA;IAChB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,oBAI3C,CAAA;AAED,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,IAAI,GAAG,GAAG,MAAM,KAAK,GAAG,GAAG,MAAM,IAAI,CAAA;AAEjG,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,UAAU,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,qDAAqD;IACrD,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,mDAAmD;IACnD,SAAS,EAAE,CAA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