@42-central/ui-react 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (591) 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/button/button.d.ts +15 -2
  115. package/dist/components/button/button.d.ts.map +1 -1
  116. package/dist/components/button/index.js +5 -1
  117. package/dist/components/button-multi-select/index.js +6 -4
  118. package/dist/components/button-multi-select/index.js.map +1 -1
  119. package/dist/components/button-select/button-select-control.d.ts.map +1 -1
  120. package/dist/components/button-select/button-select.d.ts +2 -2
  121. package/dist/components/button-select/button-select.d.ts.map +1 -1
  122. package/dist/components/button-select/index.js +6 -4
  123. package/dist/components/button-select/index.js.map +1 -1
  124. package/dist/components/calendar/aliases.d.ts +16 -0
  125. package/dist/components/calendar/aliases.d.ts.map +1 -0
  126. package/dist/components/calendar/calendar-body.d.ts +11 -1
  127. package/dist/components/calendar/calendar-body.d.ts.map +1 -1
  128. package/dist/components/calendar/calendar.d.ts +8 -4
  129. package/dist/components/calendar/calendar.d.ts.map +1 -1
  130. package/dist/components/calendar/index.d.ts +2 -1
  131. package/dist/components/calendar/index.d.ts.map +1 -1
  132. package/dist/components/calendar/index.js +15 -5
  133. package/dist/components/calendar/index.js.map +1 -1
  134. package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
  135. package/dist/components/calendar-heatmap/index.js +85 -73
  136. package/dist/components/calendar-heatmap/index.js.map +1 -1
  137. package/dist/components/camera/index.js +16 -14
  138. package/dist/components/carousel/index.js +3 -3
  139. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  140. package/dist/components/checkbox/index.js +2 -2
  141. package/dist/components/choice-card-group/index.js +2 -2
  142. package/dist/components/choice-card-group/index.js.map +1 -1
  143. package/dist/components/circular-progress/circular-progress.d.ts +22 -11
  144. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  145. package/dist/components/circular-progress/index.d.ts +1 -1
  146. package/dist/components/circular-progress/index.d.ts.map +1 -1
  147. package/dist/components/circular-progress/index.js +68 -49
  148. package/dist/components/circular-progress/index.js.map +1 -1
  149. package/dist/components/clipboard/index.js +7 -3
  150. package/dist/components/clipboard/index.js.map +1 -1
  151. package/dist/components/code/code.d.ts +10 -0
  152. package/dist/components/code/code.d.ts.map +1 -1
  153. package/dist/components/code/index.js +1 -0
  154. package/dist/components/code/index.js.map +1 -1
  155. package/dist/components/code-block/chrome.js +10 -6
  156. package/dist/components/code-block/index.js +10 -7
  157. package/dist/components/code-block/index.js.map +1 -1
  158. package/dist/components/combobox/combobox.d.ts +5 -3
  159. package/dist/components/combobox/combobox.d.ts.map +1 -1
  160. package/dist/components/combobox/index.js +12 -7
  161. package/dist/components/combobox-list/combobox-list.d.ts +1 -1
  162. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  163. package/dist/components/combobox-list/index.js +14 -9
  164. package/dist/components/compare/index.js +1 -1
  165. package/dist/components/data-list/data-list.d.ts +96 -0
  166. package/dist/components/data-list/data-list.d.ts.map +1 -0
  167. package/dist/components/data-list/index.d.ts +2 -0
  168. package/dist/components/data-list/index.d.ts.map +1 -0
  169. package/dist/components/data-list/index.js +147 -0
  170. package/dist/components/data-list/index.js.map +1 -0
  171. package/dist/components/data-table/data-table-group.d.ts.map +1 -1
  172. package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
  173. package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
  174. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  175. package/dist/components/data-table/data-table.d.ts +5 -2
  176. package/dist/components/data-table/data-table.d.ts.map +1 -1
  177. package/dist/components/data-table/index.js +163 -168
  178. package/dist/components/data-table/index.js.map +1 -1
  179. package/dist/components/date-picker/aliases.d.ts +16 -0
  180. package/dist/components/date-picker/aliases.d.ts.map +1 -1
  181. package/dist/components/date-picker/date-picker.d.ts +22 -8
  182. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  183. package/dist/components/date-picker/index.d.ts +2 -2
  184. package/dist/components/date-picker/index.d.ts.map +1 -1
  185. package/dist/components/date-picker/index.js +34 -28
  186. package/dist/components/date-picker/index.js.map +1 -1
  187. package/dist/components/download-button/index.js +6 -2
  188. package/dist/components/drawer/drawer.d.ts +7 -4
  189. package/dist/components/drawer/drawer.d.ts.map +1 -1
  190. package/dist/components/drawer/index.js +11 -6
  191. package/dist/components/empty-state/empty-state.d.ts +57 -0
  192. package/dist/components/empty-state/empty-state.d.ts.map +1 -0
  193. package/dist/components/empty-state/index.d.ts +2 -0
  194. package/dist/components/empty-state/index.d.ts.map +1 -0
  195. package/dist/components/empty-state/index.js +8 -0
  196. package/dist/components/empty-state/index.js.map +1 -0
  197. package/dist/components/field/field.d.ts +20 -0
  198. package/dist/components/field/field.d.ts.map +1 -1
  199. package/dist/components/field/index.js +1 -1
  200. package/dist/components/fieldset/fieldset.d.ts +103 -0
  201. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  202. package/dist/components/fieldset/index.d.ts +2 -0
  203. package/dist/components/fieldset/index.d.ts.map +1 -0
  204. package/dist/components/fieldset/index.js +150 -0
  205. package/dist/components/fieldset/index.js.map +1 -0
  206. package/dist/components/file-item/index.js +10 -7
  207. package/dist/components/file-preview/file-preview.d.ts.map +1 -1
  208. package/dist/components/file-preview/index.js +10 -18
  209. package/dist/components/file-preview/index.js.map +1 -1
  210. package/dist/components/file-trigger/index.js +6 -2
  211. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  212. package/dist/components/file-upload/index.js +18 -14
  213. package/dist/components/file-upload/index.js.map +1 -1
  214. package/dist/components/gallery/index.js +3 -3
  215. package/dist/components/geodesic/a11y.d.ts +3 -3
  216. package/dist/components/geodesic/a11y.d.ts.map +1 -1
  217. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  218. package/dist/components/hover-card/index.js +10 -3
  219. package/dist/components/hover-card/index.js.map +1 -1
  220. package/dist/components/image/index.js +3 -3
  221. package/dist/components/image-cropper/index.js +9 -6
  222. package/dist/components/input/index.js +2 -2
  223. package/dist/components/input/input.d.ts.map +1 -1
  224. package/dist/components/kbd/index.js +3 -3
  225. package/dist/components/kbd/kbd.d.ts +4 -0
  226. package/dist/components/kbd/kbd.d.ts.map +1 -1
  227. package/dist/components/lightbox/index.js +13 -11
  228. package/dist/components/lightbox/index.js.map +1 -1
  229. package/dist/components/menu/index.js +9 -5
  230. package/dist/components/menu/index.js.map +1 -1
  231. package/dist/components/menu/menu.d.ts.map +1 -1
  232. package/dist/components/modal/index.js +11 -6
  233. package/dist/components/modal/modal.d.ts +10 -4
  234. package/dist/components/modal/modal.d.ts.map +1 -1
  235. package/dist/components/multi-combobox-list/index.js +13 -9
  236. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
  237. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  238. package/dist/components/multi-select/index.js +13 -10
  239. package/dist/components/multi-select/index.js.map +1 -1
  240. package/dist/components/multi-select/multi-select.d.ts +1 -1
  241. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  242. package/dist/components/nav-link/index.js +4 -4
  243. package/dist/components/nav-link/tanstack.js +4 -4
  244. package/dist/components/notification/index.js +6 -6
  245. package/dist/components/notification/index.js.map +1 -1
  246. package/dist/components/number-input/index.js +11 -7
  247. package/dist/components/number-input/number-input.d.ts +1 -1
  248. package/dist/components/number-input/number-input.d.ts.map +1 -1
  249. package/dist/components/overlays/dialog-parts.d.ts +10 -1
  250. package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
  251. package/dist/components/overlays/index.js +13 -8
  252. package/dist/components/overlays/index.js.map +1 -1
  253. package/dist/components/pagination/index.d.ts +2 -0
  254. package/dist/components/pagination/index.d.ts.map +1 -0
  255. package/dist/components/pagination/index.js +362 -0
  256. package/dist/components/pagination/index.js.map +1 -0
  257. package/dist/components/pagination/pagination.d.ts +147 -0
  258. package/dist/components/pagination/pagination.d.ts.map +1 -0
  259. package/dist/components/password-input/index.js +6 -5
  260. package/dist/components/password-input/index.js.map +1 -1
  261. package/dist/components/password-input/password-input.d.ts +1 -1
  262. package/dist/components/password-input/password-input.d.ts.map +1 -1
  263. package/dist/components/phone-input/index.js +14 -11
  264. package/dist/components/phone-input/index.js.map +1 -1
  265. package/dist/components/phone-input/phone-input.d.ts +1 -1
  266. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  267. package/dist/components/photo-capture/index.js +19 -17
  268. package/dist/components/photo-capture/index.js.map +1 -1
  269. package/dist/components/pills-input/index.js +4 -4
  270. package/dist/components/pills-input/pills-input.d.ts +1 -1
  271. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  272. package/dist/components/pin-input/index.js +6 -5
  273. package/dist/components/pin-input/index.js.map +1 -1
  274. package/dist/components/pin-input/pin-input.d.ts.map +1 -1
  275. package/dist/components/popover/index.js +7 -2
  276. package/dist/components/popover/popover.d.ts +41 -16
  277. package/dist/components/popover/popover.d.ts.map +1 -1
  278. package/dist/components/progress/index.d.ts +1 -1
  279. package/dist/components/progress/index.d.ts.map +1 -1
  280. package/dist/components/progress/index.js +4 -1
  281. package/dist/components/progress/progress.d.ts +22 -14
  282. package/dist/components/progress/progress.d.ts.map +1 -1
  283. package/dist/components/prose/index.d.ts +2 -0
  284. package/dist/components/prose/index.d.ts.map +1 -0
  285. package/dist/components/prose/index.js +17 -0
  286. package/dist/components/prose/index.js.map +1 -0
  287. package/dist/components/prose/prose.d.ts +49 -0
  288. package/dist/components/prose/prose.d.ts.map +1 -0
  289. package/dist/components/prose/styles.css +593 -0
  290. package/dist/components/radio-group/index.js +9 -3
  291. package/dist/components/radio-group/index.js.map +1 -1
  292. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  293. package/dist/components/rating/index.js +3 -2
  294. package/dist/components/rating/index.js.map +1 -1
  295. package/dist/components/rating/rating.d.ts.map +1 -1
  296. package/dist/components/schedule/index.js +10 -8
  297. package/dist/components/schedule/index.js.map +1 -1
  298. package/dist/components/scroll-area/index.d.ts +2 -0
  299. package/dist/components/scroll-area/index.d.ts.map +1 -0
  300. package/dist/components/scroll-area/index.js +10 -0
  301. package/dist/components/scroll-area/index.js.map +1 -0
  302. package/dist/components/scroll-area/scroll-area.d.ts +150 -0
  303. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  304. package/dist/components/segment-group/index.js +2 -2
  305. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  306. package/dist/components/select/index.js +12 -8
  307. package/dist/components/select/select.d.ts +1 -1
  308. package/dist/components/select/select.d.ts.map +1 -1
  309. package/dist/components/slider/index.js +2 -2
  310. package/dist/components/slider/slider.d.ts.map +1 -1
  311. package/dist/components/splitter/index.d.ts +2 -0
  312. package/dist/components/splitter/index.d.ts.map +1 -0
  313. package/dist/components/splitter/index.js +373 -0
  314. package/dist/components/splitter/index.js.map +1 -0
  315. package/dist/components/splitter/splitter.d.ts +159 -0
  316. package/dist/components/splitter/splitter.d.ts.map +1 -0
  317. package/dist/components/spotlight/index.js +23 -22
  318. package/dist/components/spotlight/index.js.map +1 -1
  319. package/dist/components/spotlight/spotlight.d.ts.map +1 -1
  320. package/dist/components/steps/index.d.ts +4 -0
  321. package/dist/components/steps/index.d.ts.map +1 -0
  322. package/dist/components/steps/index.js +478 -0
  323. package/dist/components/steps/index.js.map +1 -0
  324. package/dist/components/steps/steps-data.d.ts +78 -0
  325. package/dist/components/steps/steps-data.d.ts.map +1 -0
  326. package/dist/components/steps/steps.d.ts +183 -0
  327. package/dist/components/steps/steps.d.ts.map +1 -0
  328. package/dist/components/switch/index.js +4 -3
  329. package/dist/components/switch/index.js.map +1 -1
  330. package/dist/components/switch/switch.d.ts.map +1 -1
  331. package/dist/components/table-of-contents/index.d.ts +2 -0
  332. package/dist/components/table-of-contents/index.d.ts.map +1 -0
  333. package/dist/components/table-of-contents/index.js +471 -0
  334. package/dist/components/table-of-contents/index.js.map +1 -0
  335. package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
  336. package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
  337. package/dist/components/tags-input/index.js +12 -9
  338. package/dist/components/tags-input/index.js.map +1 -1
  339. package/dist/components/tags-input/tags-input.d.ts +1 -1
  340. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  341. package/dist/components/text-input/index.js +2 -2
  342. package/dist/components/textarea/index.js +8 -6
  343. package/dist/components/textarea/index.js.map +1 -1
  344. package/dist/components/textarea/textarea.d.ts.map +1 -1
  345. package/dist/components/time-input/index.js +11 -9
  346. package/dist/components/time-input/index.js.map +1 -1
  347. package/dist/components/timeline/index.js +8 -1
  348. package/dist/components/timeline/index.js.map +1 -1
  349. package/dist/components/timeline/timeline.d.ts.map +1 -1
  350. package/dist/components/tooltip/index.js +1 -1
  351. package/dist/components/tooltip/tooltip.d.ts +3 -8
  352. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  353. package/dist/components/tour/conditions.d.ts +83 -0
  354. package/dist/components/tour/conditions.d.ts.map +1 -0
  355. package/dist/components/tour/create-tours.d.ts +49 -0
  356. package/dist/components/tour/create-tours.d.ts.map +1 -0
  357. package/dist/components/tour/index.d.ts +6 -0
  358. package/dist/components/tour/index.d.ts.map +1 -0
  359. package/dist/components/tour/index.js +1449 -0
  360. package/dist/components/tour/index.js.map +1 -0
  361. package/dist/components/tour/runtime.d.ts +57 -0
  362. package/dist/components/tour/runtime.d.ts.map +1 -0
  363. package/dist/components/tour/storage.d.ts +14 -0
  364. package/dist/components/tour/storage.d.ts.map +1 -0
  365. package/dist/components/tour/store.d.ts +62 -0
  366. package/dist/components/tour/store.d.ts.map +1 -0
  367. package/dist/components/tour/tour.d.ts +77 -0
  368. package/dist/components/tour/tour.d.ts.map +1 -0
  369. package/dist/components/tour/types.d.ts +680 -0
  370. package/dist/components/tour/types.d.ts.map +1 -0
  371. package/dist/components/tree/index.d.ts +3 -0
  372. package/dist/components/tree/index.d.ts.map +1 -0
  373. package/dist/components/tree/index.js +457 -0
  374. package/dist/components/tree/index.js.map +1 -0
  375. package/dist/components/tree/tree-row.d.ts +72 -0
  376. package/dist/components/tree/tree-row.d.ts.map +1 -0
  377. package/dist/components/tree/tree.d.ts +193 -0
  378. package/dist/components/tree/tree.d.ts.map +1 -0
  379. package/dist/components/tree-multi-select/index.js +31 -54
  380. package/dist/components/tree-multi-select/index.js.map +1 -1
  381. package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
  382. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  383. package/dist/components/tree-select/index.js +30 -24
  384. package/dist/components/tree-select/index.js.map +1 -1
  385. package/dist/components/tree-select/tree-popover.d.ts +20 -31
  386. package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
  387. package/dist/components/tree-select/tree-select.d.ts +1 -1
  388. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  389. package/dist/index.d.ts +2 -0
  390. package/dist/index.d.ts.map +1 -1
  391. package/dist/index.js +10 -8
  392. package/dist/index.js.map +1 -1
  393. package/dist/lib/date-predicates.d.ts +7 -5
  394. package/dist/lib/date-predicates.d.ts.map +1 -1
  395. package/dist/lib/date-value.d.ts +20 -0
  396. package/dist/lib/date-value.d.ts.map +1 -1
  397. package/dist/lib/floating-arrow.d.ts +53 -0
  398. package/dist/lib/floating-arrow.d.ts.map +1 -0
  399. package/dist/lib/focus-return.d.ts +53 -0
  400. package/dist/lib/focus-return.d.ts.map +1 -0
  401. package/dist/lib/meter.d.ts +104 -0
  402. package/dist/lib/meter.d.ts.map +1 -0
  403. package/dist/lib/overlay-layer.d.ts +26 -8
  404. package/dist/lib/overlay-layer.d.ts.map +1 -1
  405. package/dist/lib/pressed.d.ts +92 -0
  406. package/dist/lib/pressed.d.ts.map +1 -0
  407. package/dist/lib/tree-data.d.ts +18 -2
  408. package/dist/lib/tree-data.d.ts.map +1 -1
  409. package/dist/lib/use-pagination.d.ts +102 -0
  410. package/dist/lib/use-pagination.d.ts.map +1 -0
  411. package/dist/lib/use-scroll-spy.d.ts +126 -0
  412. package/dist/lib/use-scroll-spy.d.ts.map +1 -0
  413. package/dist/theme.css +39 -3
  414. package/package.json +1 -1
  415. package/src/as-child.contract.test.tsx +283 -1
  416. package/src/components/action-icon/action-icon.tsx +34 -4
  417. package/src/components/anchor/anchor.test.tsx +232 -0
  418. package/src/components/anchor/anchor.tsx +187 -0
  419. package/src/components/anchor/index.ts +12 -0
  420. package/src/components/app-shell/app-shell.test.tsx +15 -7
  421. package/src/components/app-shell/app-shell.tsx +27 -20
  422. package/src/components/autocomplete/autocomplete.tsx +11 -3
  423. package/src/components/button/button-pressed.test.tsx +202 -0
  424. package/src/components/button/button.tsx +48 -6
  425. package/src/components/button-select/button-select-control.tsx +2 -2
  426. package/src/components/button-select/button-select.tsx +22 -2
  427. package/src/components/calendar/aliases.tsx +28 -0
  428. package/src/components/calendar/calendar-body.tsx +310 -210
  429. package/src/components/calendar/calendar.tsx +43 -12
  430. package/src/components/calendar/index.ts +7 -1
  431. package/src/components/calendar/month-year-calendar.test.tsx +106 -0
  432. package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
  433. package/src/components/checkbox/checkbox.tsx +7 -2
  434. package/src/components/choice-card-group/choice-card-group.tsx +2 -2
  435. package/src/components/circular-progress/circular-progress.test.tsx +35 -0
  436. package/src/components/circular-progress/circular-progress.tsx +116 -59
  437. package/src/components/circular-progress/index.ts +1 -0
  438. package/src/components/code/code.test.tsx +16 -0
  439. package/src/components/code/code.tsx +11 -0
  440. package/src/components/combobox/combobox.tsx +63 -28
  441. package/src/components/combobox-list/combobox-list.tsx +11 -3
  442. package/src/components/data-list/data-list.test.tsx +149 -0
  443. package/src/components/data-list/data-list.tsx +268 -0
  444. package/src/components/data-list/index.ts +9 -0
  445. package/src/components/data-table/data-table-group.test.tsx +16 -0
  446. package/src/components/data-table/data-table-group.tsx +15 -2
  447. package/src/components/data-table/data-table-placeholder.tsx +28 -36
  448. package/src/components/data-table/data-table-stack.tsx +33 -39
  449. package/src/components/data-table/data-table.test.tsx +31 -0
  450. package/src/components/data-table/data-table.tsx +41 -42
  451. package/src/components/date-picker/aliases.tsx +28 -0
  452. package/src/components/date-picker/date-picker.test.tsx +29 -0
  453. package/src/components/date-picker/date-picker.tsx +164 -45
  454. package/src/components/date-picker/index.ts +5 -1
  455. package/src/components/date-picker/month-year-picker.test.tsx +362 -0
  456. package/src/components/drawer/drawer.test.tsx +41 -0
  457. package/src/components/drawer/drawer.tsx +7 -1
  458. package/src/components/empty-state/empty-state.test.tsx +109 -0
  459. package/src/components/empty-state/empty-state.tsx +180 -0
  460. package/src/components/empty-state/index.ts +9 -0
  461. package/src/components/field/field.tsx +35 -1
  462. package/src/components/fieldset/fieldset.test.tsx +352 -0
  463. package/src/components/fieldset/fieldset.tsx +268 -0
  464. package/src/components/fieldset/index.ts +11 -0
  465. package/src/components/file-preview/file-preview.test.tsx +2 -1
  466. package/src/components/file-preview/file-preview.tsx +7 -13
  467. package/src/components/file-upload/file-upload.tsx +14 -5
  468. package/src/components/hover-card/hover-card.tsx +5 -1
  469. package/src/components/input/input.tsx +12 -5
  470. package/src/components/kbd/kbd.test.tsx +13 -0
  471. package/src/components/kbd/kbd.tsx +6 -0
  472. package/src/components/menu/menu.tsx +6 -2
  473. package/src/components/modal/modal.test.tsx +41 -0
  474. package/src/components/modal/modal.tsx +17 -9
  475. package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
  476. package/src/components/multi-select/multi-select.tsx +11 -3
  477. package/src/components/notification/create-notifier.tsx +1 -1
  478. package/src/components/number-input/number-input.tsx +12 -3
  479. package/src/components/overlays/dialog-parts.tsx +42 -5
  480. package/src/components/pagination/index.ts +19 -0
  481. package/src/components/pagination/pagination.test.tsx +187 -0
  482. package/src/components/pagination/pagination.tsx +563 -0
  483. package/src/components/password-input/password-input.tsx +12 -3
  484. package/src/components/phone-input/phone-input.tsx +12 -3
  485. package/src/components/pills-input/pills-input.tsx +7 -2
  486. package/src/components/pin-input/pin-input.tsx +13 -4
  487. package/src/components/popover/popover.tsx +87 -17
  488. package/src/components/progress/index.ts +1 -0
  489. package/src/components/progress/progress.test.tsx +102 -0
  490. package/src/components/progress/progress.tsx +116 -62
  491. package/src/components/prose/index.ts +1 -0
  492. package/src/components/prose/prose.test.tsx +90 -0
  493. package/src/components/prose/prose.tsx +60 -0
  494. package/src/components/prose/styles.css +593 -0
  495. package/src/components/radio-group/radio-group.tsx +8 -3
  496. package/src/components/rating/rating.tsx +5 -2
  497. package/src/components/scroll-area/index.ts +18 -0
  498. package/src/components/scroll-area/scroll-area.test.tsx +184 -0
  499. package/src/components/scroll-area/scroll-area.tsx +448 -0
  500. package/src/components/segment-group/segment-group.tsx +2 -2
  501. package/src/components/select/select.tsx +37 -18
  502. package/src/components/slider/slider.tsx +2 -2
  503. package/src/components/splitter/index.ts +15 -0
  504. package/src/components/splitter/splitter.test.tsx +244 -0
  505. package/src/components/splitter/splitter.tsx +625 -0
  506. package/src/components/spotlight/spotlight.test.tsx +34 -26
  507. package/src/components/spotlight/spotlight.tsx +7 -9
  508. package/src/components/steps/index.ts +21 -0
  509. package/src/components/steps/steps-data.tsx +179 -0
  510. package/src/components/steps/steps.test.tsx +235 -0
  511. package/src/components/steps/steps.tsx +686 -0
  512. package/src/components/switch/switch.tsx +7 -2
  513. package/src/components/table-of-contents/index.ts +17 -0
  514. package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
  515. package/src/components/table-of-contents/table-of-contents.tsx +708 -0
  516. package/src/components/tags-input/tags-input.tsx +12 -3
  517. package/src/components/textarea/textarea.tsx +15 -5
  518. package/src/components/timeline/timeline.test.tsx +22 -0
  519. package/src/components/timeline/timeline.tsx +10 -1
  520. package/src/components/tooltip/tooltip.tsx +8 -17
  521. package/src/components/tour/conditions.test.ts +527 -0
  522. package/src/components/tour/conditions.ts +445 -0
  523. package/src/components/tour/create-tours.tsx +150 -0
  524. package/src/components/tour/index.ts +86 -0
  525. package/src/components/tour/runtime.ts +187 -0
  526. package/src/components/tour/storage.test.ts +68 -0
  527. package/src/components/tour/storage.ts +44 -0
  528. package/src/components/tour/store.test.tsx +784 -0
  529. package/src/components/tour/store.ts +661 -0
  530. package/src/components/tour/tour.test.tsx +318 -0
  531. package/src/components/tour/tour.tsx +773 -0
  532. package/src/components/tour/tour.types.test.ts +185 -0
  533. package/src/components/tour/types.ts +904 -0
  534. package/src/components/tree/index.ts +24 -0
  535. package/src/components/tree/tree-row.tsx +179 -0
  536. package/src/components/tree/tree.test.tsx +296 -0
  537. package/src/components/tree/tree.tsx +796 -0
  538. package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
  539. package/src/components/tree-select/tree-popover.tsx +26 -107
  540. package/src/components/tree-select/tree-select.tsx +24 -16
  541. package/src/icon-stroke.test.tsx +2 -0
  542. package/src/index.ts +16 -0
  543. package/src/lib/date-predicates.test.ts +46 -0
  544. package/src/lib/date-predicates.ts +44 -24
  545. package/src/lib/date-value.test.ts +24 -1
  546. package/src/lib/date-value.ts +42 -1
  547. package/src/lib/floating-arrow.tsx +73 -0
  548. package/src/lib/focus-return.test.tsx +143 -0
  549. package/src/lib/focus-return.ts +106 -0
  550. package/src/lib/meter.test.ts +40 -0
  551. package/src/lib/meter.ts +159 -0
  552. package/src/lib/overlay-layer.test.tsx +47 -1
  553. package/src/lib/overlay-layer.tsx +65 -8
  554. package/src/lib/pressed.ts +130 -0
  555. package/src/lib/tree-data.ts +42 -2
  556. package/src/lib/use-pagination.test.ts +105 -0
  557. package/src/lib/use-pagination.ts +179 -0
  558. package/src/lib/use-scroll-spy.test.tsx +238 -0
  559. package/src/lib/use-scroll-spy.ts +336 -0
  560. package/src/theme.css +39 -3
  561. package/src/theme.test.ts +29 -1
  562. package/src/visually-hidden-containment.test.tsx +9 -0
  563. package/dist/chunk-2W7H43WL.js.map +0 -1
  564. package/dist/chunk-7E7JNWOC.js.map +0 -1
  565. package/dist/chunk-7FPSQBWB.js.map +0 -1
  566. package/dist/chunk-7KFUFAVP.js.map +0 -1
  567. package/dist/chunk-AKXALCUN.js.map +0 -1
  568. package/dist/chunk-B5YHYI7E.js.map +0 -1
  569. package/dist/chunk-FQJNQW3G.js.map +0 -1
  570. package/dist/chunk-G3AD3NJG.js.map +0 -1
  571. package/dist/chunk-GEZYGBXY.js.map +0 -1
  572. package/dist/chunk-HCHGERDB.js.map +0 -1
  573. package/dist/chunk-HWBFRDX7.js.map +0 -1
  574. package/dist/chunk-I4B3N3UX.js.map +0 -1
  575. package/dist/chunk-IA6DCC3N.js.map +0 -1
  576. package/dist/chunk-IANYMDKH.js.map +0 -1
  577. package/dist/chunk-MQHD3EJE.js.map +0 -1
  578. package/dist/chunk-NNPSBC7O.js.map +0 -1
  579. package/dist/chunk-OXR7BXZA.js.map +0 -1
  580. package/dist/chunk-QKSLDQM2.js +0 -120
  581. package/dist/chunk-QKSLDQM2.js.map +0 -1
  582. package/dist/chunk-QRNQQIQM.js.map +0 -1
  583. package/dist/chunk-RKCUXOU2.js.map +0 -1
  584. package/dist/chunk-S5CQRCTF.js +0 -426
  585. package/dist/chunk-S5CQRCTF.js.map +0 -1
  586. package/dist/chunk-SBZJGFZ6.js.map +0 -1
  587. package/dist/chunk-SP6LCCTZ.js.map +0 -1
  588. package/dist/chunk-TUP7WXQE.js.map +0 -1
  589. package/dist/chunk-V2QZG4IT.js.map +0 -1
  590. package/dist/chunk-X6DESK37.js.map +0 -1
  591. package/dist/chunk-ZB5VMGKB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,IAAM,eAAA,GAAkB,cAAoC,IAAI,CAAA;AAUzD,SAAS,WAAA,GAA6B;AAC3C,EAAA,MAAM,GAAA,GAAM,WAAW,eAAe,CAAA;AACtC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAC9E,EAAA,OAAO,GAAA;AACT;AAOA,IAAM,WAAA,GAAc,CAAC,KAAA,EAAmB,MAAA,KAAwC;AAC9E,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAA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,WAAW,CAAA;AAAA,MAC/D,GAAG,IAAA;AAAA,MACJ,OAAA,EAAS,CAAC,KAAA,KAAU;AAClB,QAAA,OAAA,GAAU,KAAK,CAAA;AACf,QAAA,MAAM,SAAS,KAAA,CAAM,aAAA;AAGrB,QAAA,SAAA,CAAU,MAAM,YAAA,CAAa,CAAC,KAAA,KAAU,CAAC,KAAK,CAAC,CAAA;AAG/C,QAAA,MAAM,OAAA,GAAU,QAAA,CAAS,cAAA,CAAe,SAAS,CAAA;AACjD,QAAA,IAAI,OAAA,IAAW,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,EAAG;AACxC,UAAA,MAAM,OAAA,GAAU;AAAA,YACd,GAAI,QAAQ,aAAA,EAAe,gBAAA;AAAA,cACzB;AAAA,iBACG;AAAC,WACR,CAAE,KAAK,CAAC,OAAA,KAAY,CAAC,OAAA,CAAQ,QAAA,CAAS,OAAO,CAAC,CAAA;AAC9C,UAAA,OAAA,EAAS,KAAA,EAAM;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,GACF;AAEJ,CAAA;AAEO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc;AAAA,EAClD,OAAA,EAAS,eAAA;AAAA,EACT,aAAA,EAAe,qBAAA;AAAA,EACf,WAAA,EAAa,mBAAA;AAAA,EACb,aAAA,EAAe,qBAAA;AAAA,EACf,cAAA,EAAgB,sBAAA;AAAA,EAChB,sBAAA,EAAwB,8BAAA;AAAA,EACxB,MAAA,EAAQ,cAAA;AAAA,EACR,IAAA,EAAM,YAAA;AAAA,EACN,IAAA,EAAM,YAAA;AAAA,EACN,OAAA,EAAS,eAAA;AAAA,EACT,KAAA,EAAO;AACT,CAAC","file":"index.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type Dispatch,\n type MouseEvent,\n type PointerEvent,\n type Ref,\n type RefObject,\n type SetStateAction,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\"\nimport { flushSync } from \"react-dom\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport { SidebarRailContext } from \"../../lib/sidebar-rail\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useContainerQuery } from \"../../lib/use-container-query\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { type Updater, useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Drawer } from \"../drawer/drawer\"\n\n/**\n * AppShell — header / sidebar / main / aside app frame, laid out with CSS\n * Grid named areas. Sidebar spans the full height on the left; Header\n * spans the rest of the top (above both Main and Aside — Header never\n * spans over Sidebar, but it does span over Aside, unlike Sidebar itself);\n * Aside sits below Header, full height only within the remaining row,\n * beside Main. No Footer — add one only once a real consumer needs it.\n *\n * On desktop, Sidebar is a grid column that can be collapsed — opt in by\n * rendering an `AppShell.SidebarCollapseTrigger` (or driving `collapsed`):\n * the column animates to zero and the sidebar slides off the start edge,\n * coming back as a floating card while the pointer rests on that edge\n * (fumadocs' docs sidebar behaves the same way). Below `breakpoint`, it\n * becomes an overlay `Drawer` instead, toggled by `AppShell.SidebarTrigger`\n * (which renders nothing on desktop — `SidebarCollapseTrigger` is its\n * desktop counterpart, and renders nothing on mobile). Aside works\n * differently: it's always mounted (no JS/container-query gating at all,\n * unlike Sidebar) and purely CSS-driven — hidden below a `@xl` container\n * breakpoint, visible above it — mirroring how fumadocs' own docs layout\n * keeps its table-of-contents rail always in the DOM. There is no\n * `variant`/`color` axis — like `Table`/`Grid`/`Flex`, this is a\n * structural primitive, not a themed surface.\n *\n * `breakpoint` and Aside's `@xl` cutoff are both measured against\n * `AppShell`'s own rendered width, not the browser viewport — so this\n * behaves correctly embedded in a panel, a resizable pane, or anything\n * narrower than the window, not just when it fills the whole page.\n *\n * <AppShell>\n * <AppShell.Sidebar>\n * <AppShell.SidebarHeader>Logo</AppShell.SidebarHeader>\n * <AppShell.SidebarBody>Nav — scrolls</AppShell.SidebarBody>\n * <AppShell.SidebarFooter>User menu</AppShell.SidebarFooter>\n * </AppShell.Sidebar>\n * <AppShell.Header>\n * <AppShell.SidebarTrigger asChild>\n * <ActionIcon variant=\"subtle\" color=\"neutral\"><PanelLeft /></ActionIcon>\n * </AppShell.SidebarTrigger>\n * </AppShell.Header>\n * <AppShell.Main>Page content</AppShell.Main>\n * <AppShell.Aside>On this page…</AppShell.Aside>\n * </AppShell>\n */\n\nexport type AppShellState = {\n /** Whether the mobile drawer is open. Always uncontrolled, never a public prop. */\n mobileOpen: boolean\n /** Opens or closes the mobile drawer — e.g. close it after a programmatic\n * navigation (`router.push`) that no link click inside the sidebar caused. */\n setMobileOpen: Dispatch<SetStateAction<boolean>>\n /** Whether `AppShell` is narrower than its `breakpoint`, so Sidebar is a drawer. */\n isMobile: boolean\n /** Whether the desktop sidebar is collapsed. Has no effect below\n * `breakpoint`, where the sidebar is a drawer either way. */\n collapsed: boolean\n /** Collapses or expands the desktop sidebar — e.g. from a keyboard\n * shortcut. Goes through `onCollapsedChange` when `collapsed` is controlled. */\n setCollapsed: (updater: Updater<boolean>) => void\n /** Id of the sidebar — the drawer's content on mobile, the docked column on\n * desktop — which both triggers' `aria-controls` point at. */\n sidebarId: string\n}\n\nconst AppShellContext = createContext<AppShellState | null>(null)\n\n/**\n * The shell's sidebar state, from any descendant of `<AppShell>`. A link\n * clicked inside the mobile drawer already closes it; reach for this only when\n * something else navigates:\n *\n * const { setMobileOpen } = useAppShell()\n * const onSubmit = async () => { await save(); router.push(\"/done\"); setMobileOpen(false) }\n */\nexport function useAppShell(): AppShellState {\n const ctx = useContext(AppShellContext)\n if (!ctx) throw new Error(\"AppShell parts must be rendered within <AppShell>.\")\n return ctx\n}\n\n/** Whether a click inside the drawer follows a link in this tab: a plain\n * primary-button click on an `<a href>`. A modified click (new tab/window,\n * download) leaves the page — and the drawer — where they are. Whether the\n * link's own handler called `preventDefault` doesn't matter: a client-side\n * router does exactly that to navigate without a page load. */\nconst followsLink = (event: MouseEvent, drawer: HTMLElement | null): boolean => {\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return false\n }\n const link = event.target instanceof Element ? event.target.closest(\"a[href]\") : null\n return link != null && drawer?.contains(link) === true\n}\n\nexport type AppShellProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** AppShell's own rendered width (px) below which Sidebar renders as an\n * overlay `Drawer` instead of a grid column — measured against the\n * container itself via `ResizeObserver`, not the viewport. @default 768 */\n breakpoint?: number\n /** Whether the desktop sidebar is collapsed (controlled). Ignored below\n * `breakpoint`. */\n collapsed?: boolean\n /** Initial collapsed state (uncontrolled). @default false */\n defaultCollapsed?: boolean\n /** Called when a `SidebarCollapseTrigger` (or `useAppShell().setCollapsed`)\n * collapses or expands the desktop sidebar. */\n onCollapsedChange?: (collapsed: boolean) => void\n /** Lands on the grid root; also used internally to measure `breakpoint`\n * against the container's own width. */\n ref?: Ref<HTMLDivElement>\n }\n\nconst AppShellRoot = ({\n breakpoint = 768,\n collapsed: collapsedProp,\n defaultCollapsed,\n onCollapsedChange,\n className,\n style,\n children,\n ref,\n testId,\n onClick,\n ...rest\n}: AppShellProps) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const [mobileOpen, setMobileOpen] = useState(false)\n const [collapsed, setCollapsed] = useUncontrolled({\n value: collapsedProp,\n defaultValue: defaultCollapsed,\n finalValue: false,\n onChange: onCollapsedChange,\n })\n const isMobile = useContainerQuery(rootRef, breakpoint)\n const sidebarId = `app-shell-sidebar-${useId()}`\n\n const mergedRef = useMergedRefs(ref, rootRef)\n return (\n <AppShellContext.Provider\n value={{ mobileOpen, setMobileOpen, isMobile, collapsed, setCollapsed, sidebarId }}\n >\n <ark.div\n {...props({\n \"data-testid\": testId,\n \"data-sidebar-collapsed\": collapsed && !isMobile,\n })}\n {...rest}\n ref={mergedRef}\n // The drawer is portaled out of this element in the DOM, but React\n // still bubbles its clicks through here. Closing on a followed link\n // is what a page load would have done; a client-side router doesn't\n // reload, so without this the drawer stays open over the new page.\n onClick={(event) => {\n onClick?.(event)\n if (mobileOpen && followsLink(event, document.getElementById(sidebarId))) {\n setMobileOpen(false)\n }\n }}\n style={{ gridTemplateAreas: `\"sidebar header header\" \"sidebar main aside\"`, ...style }}\n className={cn(\n \"@container grid h-dvh grid-cols-[auto_1fr_auto] grid-rows-[auto_1fr] overflow-hidden\",\n className,\n )}\n >\n {children}\n </ark.div>\n </AppShellContext.Provider>\n )\n}\n\nconst SIDEBAR_WIDTH: Record<Size, string> = {\n xs: \"w-56\",\n sm: \"w-64\",\n md: \"w-72\",\n lg: \"w-80\",\n xl: \"w-96\",\n}\n\n/** The icon rail's width: exactly the expanded sidebar's icon column —\n * SidebarBody's 16px padding + NavLink's 10px row padding on each side of a\n * 16px icon, plus the aside's 1px end border. At this width nothing has to re-lay out on a rail: every icon\n * (and the header's trigger, and the footer's avatar) sits where it does\n * when expanded, so opening and closing only animates the width, with\n * nothing jumping as the labels come and go. A NavLink row is then a 36px\n * square by itself. */\nconst RAIL_WIDTH = \"w-[calc(--spacing(17)+1px)]\"\n\n/** How long (ms) the pointer must stay *still* on an icon rail before it\n * peeks open. Any movement past `RAIL_REST_TOLERANCE` restarts the count, so\n * travelling across the icons (and reading their tooltips, 200ms) never opens\n * it — only a deliberate rest does. */\nconst RAIL_PEEK_DELAY = 1200\n/** How far (px) the pointer may drift and still count as resting — a hand on\n * a mouse or trackpad is never perfectly still. */\nconst RAIL_REST_TOLERANCE = 4\n\nexport type AppShellSidebarCollapse = \"hide\" | \"icons\"\n\nexport type AppShellSidebarProps = NoAsChild<HTMLArkProps<\"aside\">> &\n WithTestId & {\n /** Width when expanded, from the kit's Size scale. @default \"md\" */\n size?: Size\n /** What collapsing does on desktop. `\"hide\"` slides the sidebar off the\n * edge, peeking back as a card on hover at the edge. `\"icons\"` shrinks it\n * to a 68px icon rail: labels turn into tooltips, and resting on the rail\n * peeks the full sidebar over the page. @default \"hide\" */\n collapse?: AppShellSidebarCollapse\n }\n\n/**\n * Below `breakpoint`, renders through the kit's own `Drawer` instead of the\n * grid column — same `SidebarHeader`/`SidebarBody`/`SidebarFooter` children\n * either way, mirroring the desktop docked aside's layout: `Drawer`'s own\n * body normally forces every child through one scrolling container, which\n * would otherwise carry Header/Footer along with the scroll instead of\n * pinning them — `classNames.body` turns it into the same flex column\n * (Header/Footer as plain shrink-0 flex items, only SidebarBody's own\n * `overflow-y-auto` scrolls) instead. Full width, opening from the logical\n * end edge (right in LTR). `withCloseButton={false}` — at full width,\n * `Drawer`'s own generic close bar would just stack a second, redundant\n * header above `SidebarHeader`; render a `SidebarTrigger` inside\n * `SidebarHeader` itself instead for one unified bar with a visible close\n * affordance (swipe-to-dismiss on `Drawer`'s content still works too, but\n * isn't the only way out — not discoverable, and risky to rely on alone in\n * a sidebar full of tappable nav rows).\n *\n * Exclusive branch, not always-mounted-and-CSS-hidden like `Aside` — unlike\n * `Aside`, `Sidebar` has two genuinely different structural forms (a plain\n * `<aside>` vs. a portaled dialog with focus-trap/ARIA machinery), so\n * keeping both permanently mounted would mean literally duplicating\n * `children` (and any side effects inside it) into two simultaneous trees.\n * Matches fumadocs' own sidebar, which is JS-conditional for the same\n * reason — only its TOC (this component's `Aside`) goes the always-mounted\n * route. Only `size`/`className`/`children` and the `aria-label` /\n * `aria-labelledby` naming carry over to `Drawer` mode; arbitrary `<aside>`\n * props don't apply to `Drawer`'s own curated prop surface. The drawer has\n * no `title`, so without one of those it is a dialog with no name (and\n * `Drawer` warns in development).\n */\nconst AppShellSidebar = ({\n size = \"md\",\n collapse = \"hide\",\n className,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: AppShellSidebarProps) => {\n const { isMobile, mobileOpen, setMobileOpen, collapsed, sidebarId } = useAppShell()\n const columnRef = useRef<HTMLDivElement>(null)\n const asideRef = useRef<HTMLElement>(null)\n const icons = collapse === \"icons\"\n const { peeking, restPoint, onPointerEnter, onPointerMove, onPointerLeave, onScrollActivity } =\n useSidebarPeek(collapsed, columnRef, asideRef, icons ? RAIL_PEEK_DELAY : 0)\n // Icons only: collapsed to the rail and not peeking.\n const rail = icons && collapsed && !peeking\n useRailAnchor(icons && collapsed && !isMobile, peeking, asideRef, restPoint)\n\n if (isMobile) {\n return (\n <Drawer\n open={mobileOpen}\n onOpenChange={setMobileOpen}\n placement=\"end\"\n withCloseButton={false}\n aria-label={rest[\"aria-label\"]}\n aria-labelledby={rest[\"aria-labelledby\"]}\n ids={{ content: sidebarId }}\n testId={testId}\n classNames={{ body: \"flex flex-col overflow-hidden p-0\" }}\n className={cn(\"w-full max-w-none\", className)}\n >\n {children}\n </Drawer>\n )\n }\n\n // Two layers, as in fumadocs: the column is what the grid track sizes\n // itself to (and what animates to zero), while the aside is positioned\n // inside it at a fixed width — so its content never reflows mid-collapse,\n // and the same element can float back out as a card while collapsed.\n return (\n <div\n ref={columnRef}\n id={sidebarId}\n className={cn(\n \"[grid-area:sidebar] relative z-10\",\n \"transition-[width] duration-250 ease-out motion-reduce:transition-none\",\n collapsed ? (icons ? RAIL_WIDTH : \"w-0\") : SIDEBAR_WIDTH[size],\n )}\n >\n {collapsed && !icons && (\n // The hot strip along the start edge that brings the card back. Before\n // the aside in the DOM so a peeking card paints over it.\n <div\n aria-hidden\n data-sidebar-edge=\"\"\n className=\"absolute inset-y-0 inset-s-0 w-4\"\n onPointerEnter={onPointerEnter}\n onPointerLeave={onPointerLeave}\n />\n )}\n <ark.aside\n {...props({\n \"data-testid\": testId,\n \"data-collapsed\": collapsed,\n \"data-peeking\": peeking,\n \"data-sidebar-rail\": rail,\n })}\n {...rest}\n ref={asideRef}\n // Off-screen links must not take Tab focus, nor be read out. A rail\n // is on screen, so it stays interactive.\n inert={collapsed && !icons && !peeking}\n onPointerEnter={(event) => {\n rest.onPointerEnter?.(event)\n onPointerEnter(event)\n }}\n // Capture: `scroll` doesn't bubble from SidebarBody, and a wheel\n // that can't scroll (at an end) is still the user scrolling.\n onWheelCapture={(event) => {\n rest.onWheelCapture?.(event)\n onScrollActivity()\n }}\n onScrollCapture={(event) => {\n rest.onScrollCapture?.(event)\n onScrollActivity()\n }}\n onPointerMove={(event) => {\n rest.onPointerMove?.(event)\n onPointerMove(event)\n }}\n onPointerLeave={(event) => {\n rest.onPointerLeave?.(event)\n onPointerLeave(event)\n }}\n className={cn(\n \"absolute inset-y-0 inset-s-0 flex flex-col overflow-hidden\",\n TEXT_COLOR_CLASSES.primary,\n // Brand-derived border/fill, matching InputBase/Popover/Modal/Drawer/Table's\n // own chrome (border-brand-900/20 dark:border-white/15, bg-brand-50/90\n // dark:bg-brand-950/85) rather than a neutral gray.\n \"border-e border-brand-900/20 bg-brand-50/90 dark:border-white/15 dark:bg-brand-950/85\",\n \"transition-[width,translate,inset-block,border-radius,box-shadow] duration-250 ease-out motion-reduce:transition-none\",\n rail ? RAIL_WIDTH : SIDEBAR_WIDTH[size],\n // A peeking rail widens in place, over the page.\n icons && peeking && \"shadow-lg backdrop-blur-sm\",\n collapsed &&\n !icons && [\n // Collapsed, it's a floating panel over scrolling content — so it\n // takes Popover's blur, which the docked column doesn't need.\n \"inset-y-2 rounded-xl border backdrop-blur-sm\",\n peeking\n ? \"translate-x-2 shadow-lg rtl:-translate-x-2\"\n : \"-translate-x-full rtl:translate-x-full\",\n ],\n className,\n )}\n >\n <SidebarRailContext.Provider value={icons ? { active: rail } : null}>\n {children}\n </SidebarRailContext.Provider>\n </ark.aside>\n </div>\n )\n}\n\n/** Pointer-leave grace period (ms) when the pointer leaves near the shell's\n * edge — overshooting the window edge shouldn't snap the card shut. */\nconst PEEK_LEAVE_DELAY = 500\n/** How close to the shell's edge (px) a pointer-leave counts as \"near\". */\nconst PEEK_EDGE_DISTANCE = 100\n\n/**\n * Hover-to-peek for a collapsed sidebar, ported from fumadocs'\n * `SidebarContent`. Entering the edge strip (or the card itself) shows the\n * card; leaving hides it — at once when the pointer heads into the page, after\n * a grace period when it leaves near the edge. An icon rail (`enterDelay`)\n * instead waits for the pointer to come to rest: the count restarts whenever\n * it moves more than `RAIL_REST_TOLERANCE`, and leaving cancels it. Touch is\n * ignored (there is no hover to end it), and so is arming while the aside is\n * still animating —\n * otherwise collapsing with the pointer over the sidebar would peek it right\n * back. Leaving is never ignored, so a card can't get stuck open.\n */\nfunction useSidebarPeek(\n collapsed: boolean,\n columnRef: RefObject<HTMLElement | null>,\n asideRef: RefObject<HTMLElement | null>,\n /** How long the pointer must stay before the card shows — 0 at the hide\n * mode's edge strip, a dwell on an icon rail, where hovering an icon\n * should show its tooltip first. */\n enterDelay: number,\n) {\n const [hovered, setHovered] = useState(false)\n const [wasCollapsed, setWasCollapsed] = useState(collapsed)\n const timer = useRef<number | undefined>(undefined)\n /** Where the pointer was when the current rest began; null when not armed. */\n const restOrigin = useRef<{ x: number; y: number } | null>(null)\n /** Where the pointer rested when the rail last peeked open. */\n const restPoint = useRef<{ x: number; y: number } | null>(null)\n\n // Any collapse or expand starts from a hidden card.\n if (wasCollapsed !== collapsed) {\n setWasCollapsed(collapsed)\n setHovered(false)\n }\n useEffect(() => () => window.clearTimeout(timer.current), [])\n\n const ignored = (event: PointerEvent<HTMLElement>) =>\n !collapsed ||\n event.pointerType === \"touch\" ||\n (asideRef.current?.getAnimations?.().length ?? 0) > 0\n\n /** (Re)start the rest count from where the pointer is now. */\n const armRest = (event: PointerEvent<HTMLElement>) => {\n restOrigin.current = { x: event.clientX, y: event.clientY }\n restartRest()\n }\n\n const restartRest = () => {\n window.clearTimeout(timer.current)\n timer.current = window.setTimeout(() => {\n restPoint.current = restOrigin.current\n restOrigin.current = null\n setHovered(true)\n }, enterDelay)\n }\n\n const onPointerEnter = (event: PointerEvent<HTMLElement>) => {\n if (ignored(event)) return\n if (enterDelay > 0) return armRest(event)\n window.clearTimeout(timer.current)\n setHovered(true)\n }\n\n const onPointerMove = (event: PointerEvent<HTMLElement>) => {\n if (enterDelay === 0 || hovered || ignored(event)) return\n const origin = restOrigin.current\n // Also arms a rest the enter couldn't (the pointer was already over the\n // aside when it finished animating).\n if (\n !origin ||\n Math.hypot(event.clientX - origin.x, event.clientY - origin.y) > RAIL_REST_TOLERANCE\n ) {\n armRest(event)\n }\n }\n\n /**\n * Scrolling the rail is not resting on it, even with the pointer parked:\n * the rows are sliding under it, and the one it ends on is the one the user\n * means. So a wheel or scroll restarts the count, and the rail opens only\n * once both the pointer *and* the list have been still — not mid-scroll, on\n * whichever row happened to be passing. Only while a rest is pending (the\n * pointer is over the rail), so the anchoring's own scrolling, which runs\n * while open or after the pointer left, never arms one.\n */\n const onScrollActivity = () => {\n if (enterDelay === 0 || hovered || !restOrigin.current) return\n restartRest()\n }\n\n const onPointerLeave = (event: PointerEvent<HTMLElement>) => {\n if (!collapsed || event.pointerType === \"touch\") return\n restOrigin.current = null\n window.clearTimeout(timer.current)\n // Measured against the shell, not the viewport: AppShell may be embedded.\n const shell = columnRef.current?.parentElement ?? document.documentElement\n const { left, right } = shell.getBoundingClientRect()\n const fromEdge = Math.min(event.clientX - left, right - event.clientX)\n timer.current = window.setTimeout(\n () => setHovered(false),\n fromEdge > PEEK_EDGE_DISTANCE ? 0 : PEEK_LEAVE_DELAY,\n )\n }\n\n return {\n peeking: collapsed && hovered,\n restPoint,\n onPointerEnter,\n onPointerMove,\n onPointerLeave,\n onScrollActivity,\n }\n}\n\n/** The nearest scrolling ancestor of `node` inside `within` — SidebarBody,\n * unless a consumer put the row in a scroller of their own. */\nfunction scrollerOf(node: Element, within: Element): HTMLElement | null {\n for (let el = node.parentElement; el && el !== within; el = el.parentElement) {\n const { overflowY } = getComputedStyle(el)\n if (overflowY === \"auto\" || overflowY === \"scroll\") return el\n }\n return null\n}\n\n/** Longest gap (ms) between wheel events that still counts as one stream —\n * trackpad momentum fires every frame or so; a new, deliberate scroll starts\n * after a pause. */\nconst WHEEL_STREAM_GAP = 150\n\n/** Safety stop (ms) for the anchoring: it normally ends with the transition's\n * own animations (width 250ms, Collapse 300ms). */\nconst ANCHOR_MAX_DURATION = 1000\n\n/**\n * Keeps the row under the pointer where it is while an icon rail peeks open,\n * and while it closes again. Opening unfolds nested rows (NavLink's Collapse)\n * above it, which would otherwise push it down and out from under the pointer;\n * so every time the scroller's content resizes during the transition, the\n * scroller scrolls by exactly the distance it drifted. Self-correcting (it\n * re-measures against the starting position each time), it follows the\n * transition until its animations finish. Meanwhile it owns the list's scroll:\n * wheel events wait the ~300ms out (trackpad momentum would otherwise fight\n * it).\n *\n * The element is picked once, under the pointer at the moment the rail opens,\n * and reused on close: folding everything back above the same element walks\n * the scroll back to where the rail was, so a rail is never left scrolled.\n * Where the list is too short to scroll that far, it stays as close as the\n * scroll allows.\n */\nfunction useRailAnchor(\n enabled: boolean,\n peeking: boolean,\n asideRef: RefObject<HTMLElement | null>,\n restPoint: RefObject<{ x: number; y: number } | null>,\n) {\n const anchor = useRef<Element | null>(null)\n\n // A layout effect: it runs before the first frame of the transition paints,\n // while everything still sits where it did, so the starting position is\n // the true pre-open one.\n useIsomorphicLayoutEffect(() => {\n const aside = asideRef.current\n if (!enabled || !aside) return\n if (peeking) {\n const point = restPoint.current\n const hit = point ? document.elementFromPoint?.(point.x, point.y) : null\n anchor.current = hit && aside.contains(hit) ? hit : null\n }\n const target = anchor.current\n if (!peeking) anchor.current = null\n if (!target?.isConnected) return\n const scroller = scrollerOf(target, aside)\n if (!scroller) return\n\n const top = target.getBoundingClientRect().top\n // No \"a scroll we didn't make means the user took over\" check: the\n // browser makes some itself. Scrolled to the bottom, anything that changes\n // the scroller's height mid-transition (a footer whose text rewraps as the\n // rail widens) clamps the scroll and fires one, and treating that as the\n // user dropped the correction halfway, at random. The wheel is held below,\n // and nothing else scrolls a sidebar in a 300ms window.\n const correct = () => {\n const drift = target.getBoundingClientRect().top - top\n if (drift !== 0) scroller.scrollTop += drift\n }\n // A ResizeObserver, not requestAnimationFrame: its callbacks run after\n // layout and before paint, so each frame is corrected before it's drawn.\n // rAF runs before layout, sees the previous frame, and always lags one —\n // visible as a jolt on Collapse's fast-starting first frame.\n const observer = new ResizeObserver(correct)\n // The scroller too, not just its content: its own height changing (a\n // footer rewrapping) can move the row as well.\n observer.observe(scroller)\n for (const child of scroller.children) observer.observe(child)\n // The browser's own scroll anchoring would adjust the same scroll from its\n // own anchor node; keep it out while this one runs.\n const overflowAnchor = scroller.style.overflowAnchor\n scroller.style.overflowAnchor = \"none\"\n // Wheel scrolling waits out the transition (~300ms), and any wheel stream\n // already running through it. A trackpad keeps sending momentum wheel\n // events for a second or more after a flick: the user has stopped\n // scrolling, but the events still scroll the list (which, corrected, is no\n // longer resting against the edge that absorbed them), and nothing in a\n // WheelEvent tells inertia from intent. Letting them through dragged the\n // row out from under the pointer, at random. Momentum is one unbroken\n // stream, so the first wheel event after a pause is the user's again.\n let stopped = false\n let lastWheel = Number.NEGATIVE_INFINITY\n const holdWheel = (event: WheelEvent) => {\n const continuing = event.timeStamp - lastWheel < WHEEL_STREAM_GAP\n lastWheel = event.timeStamp\n if (!stopped || continuing) event.preventDefault()\n else releaseWheel()\n }\n const releaseWheel = () => scroller.removeEventListener(\"wheel\", holdWheel)\n const stop = () => {\n if (stopped) return\n stopped = true\n observer.disconnect()\n scroller.style.overflowAnchor = overflowAnchor\n }\n scroller.addEventListener(\"wheel\", holdWheel, { passive: false })\n // Done once the transition is: reading the animations here also flushes\n // the style change, so the width and Collapse transitions already exist.\n // Without getAnimations, only the timeout ends it.\n let settle = 0\n if (aside.getAnimations) {\n const running = aside.getAnimations({ subtree: true })\n Promise.allSettled(running.map((animation) => animation.finished)).then(() => {\n // One frame late, on purpose. `finished` resolves at the start of the\n // final frame, before that frame lays out the animations' end values;\n // stopping right away skipped the last few px of the unfold, leaving\n // the row 3px off (more or less, by frame timing). The next frame's\n // rAF runs after that layout and its ResizeObserver correction.\n settle = requestAnimationFrame(stop)\n })\n }\n const timeout = window.setTimeout(stop, ANCHOR_MAX_DURATION)\n return () => {\n stop()\n releaseWheel()\n window.clearTimeout(timeout)\n cancelAnimationFrame(settle)\n }\n }, [enabled, peeking])\n}\n\n// Shared by SidebarHeader and Header so the two sit at the same height and\n// Header's bottom border lines up level with SidebarHeader's own bottom edge\n// — sizing each off its own padding + content independently (the original\n// approach) drifts out of sync as soon as one holds taller content than the\n// other.\nconst HEADER_HEIGHT_CLASS = \"h-14\"\n\nexport type AppShellSidebarHeaderProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n// Plain flex sibling, not routed through the `ark.*` factory — mirrors\n// Drawer.Header/.Body/.Footer, which aren't either.\nconst AppShellSidebarHeader = ({ className, testId, ...rest }: AppShellSidebarHeaderProps) => (\n <div\n className={cn(HEADER_HEIGHT_CLASS, \"flex shrink-0 items-center gap-2 px-4\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type AppShellSidebarBodyProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/**\n * The scroll region — the only part of Sidebar that scrolls. On an icon rail\n * its scrollbar is hidden (no room for one). The mask fades\n * content at the top/bottom edges instead of clipping it on a hard line\n * (fumadocs' own docs sidebar uses the same static mask on its nav\n * viewport); `overscroll-contain` stops scrolling the list from chaining\n * into scrolling the rest of the page once it hits either end.\n */\nconst AppShellSidebarBody = ({ className, testId, ...rest }: AppShellSidebarBodyProps) => (\n <div\n className={cn(\n \"min-h-0 flex-1 overflow-y-auto overscroll-contain p-4\",\n // A classic (non-overlay) scrollbar would take ~15px of a 68px rail and\n // push the icons off-centre. The rail still scrolls by wheel, touch and\n // focus, and the edge mask below still shows there's more.\n \"sidebar-rail:[scrollbar-width:none]\",\n \"[mask-image:linear-gradient(to_bottom,transparent,black_12px,black_calc(100%-12px),transparent)]\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type AppShellSidebarFooterProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nconst AppShellSidebarFooter = ({ className, testId, ...rest }: AppShellSidebarFooterProps) => (\n <div className={cn(\"shrink-0 p-4\", className)} {...props({ \"data-testid\": testId })} {...rest} />\n)\n\nexport type AppShellHeaderProps = HTMLArkProps<\"header\"> & WithTestId\n\nconst AppShellHeader = ({ className, testId, ...rest }: AppShellHeaderProps) => (\n <ark.header\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n HEADER_HEIGHT_CLASS,\n // Brand-derived border/fill, matching InputBase/Popover/Modal/Drawer/Table's\n // own chrome (border-brand-900/20 dark:border-white/15, bg-brand-50/90\n // dark:bg-brand-950/85) rather than a neutral gray.\n \"[grid-area:header] flex shrink-0 items-center gap-3 border-b border-brand-900/20 bg-brand-50/90 px-4 text-brand-950\",\n \"dark:border-white/15 dark:bg-brand-950/85 dark:text-white\",\n className,\n )}\n />\n)\n\nexport type AppShellMainSize = \"sm\" | \"md\" | \"lg\" | \"xl\"\n\n// A local scale rather than the shared Size one: these are page widths, not\n// control widths, so they read off the kit's own `--width-*` tokens\n// (theme.css) — the vocabulary Modal already uses — instead of inventing a\n// second set. Static class strings so Tailwind's build-time scanner picks them\n// up, in the same lookup-map shape as SIDEBAR_WIDTH/ASIDE_WIDTH above.\nconst MAIN_MEASURE: Record<AppShellMainSize, string> = {\n sm: \"[--app-shell-measure:var(--width-xl)]\", // 48rem / 768px\n md: \"[--app-shell-measure:var(--width-2xl)]\", // 64rem / 1024px\n lg: \"[--app-shell-measure:var(--width-3xl)]\", // 80rem / 1280px\n xl: \"[--app-shell-measure:var(--width-4xl)]\", // 90rem / 1440px\n}\n\nexport type AppShellMainProps = HTMLArkProps<\"main\"> &\n WithTestId & {\n /** Width of the content column, from the kit's `--width-*` tokens:\n * `sm` 48rem · `md` 64rem · `lg` 80rem · `xl` 90rem. @default \"lg\" */\n size?: AppShellMainSize\n /** Drop the content column entirely — children fill Main edge to edge, as\n * they did before the column existed. For pages whose Main *is* one\n * full-canvas component (a Schedule, a DataTable sized to the viewport)\n * rather than a document. @default false */\n fluid?: boolean\n }\n\n/**\n * The page region. By default its children sit in a centered content column,\n * so a page of prose and forms doesn't stretch to whatever width the window\n * happens to be; `AppShell.Full` opts one child out to the full width, and\n * `AppShell.Content` puts arbitrary content back in.\n *\n * The column is three grid tracks — `1fr`, the column, `1fr` — rather than\n * inline padding, which is what lets a child span *past* the gutters without\n * negative margins, `100vw`, or any JS measurement. Percentages in track\n * sizing resolve against Main's own content box, so the column is correct\n * beside a sidebar, inside a resizable pane, or in a bounded docs preview\n * frame, with no media query and no `ResizeObserver` involved. Below\n * `measure + 2 × gutter` the middle track collapses to `100% - 2 × gutter`\n * and the `1fr` tracks land exactly on the gutter, so the column degrades\n * into plain padding continuously, without a breakpoint.\n *\n * `align-content: start` is load-bearing: grid's default (`normal`, i.e.\n * `stretch`) hands leftover vertical space to every auto row, which would\n * space a short page's blocks out down the viewport.\n *\n * <AppShell.Main>\n * <Title>Quarterly sales</Title>\n * <AppShell.Full asChild>\n * <DataTable … />\n * </AppShell.Full>\n * </AppShell.Main>\n */\nconst AppShellMain = ({\n size = \"lg\",\n fluid = false,\n className,\n testId,\n ...rest\n}: AppShellMainProps) => (\n <ark.main\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"[grid-area:main] min-h-0 overflow-y-auto\",\n !fluid && [\n // Gutter doubles as Main's block padding, so content never butts\n // against Header. Overridable per page with\n // `className=\"[--app-shell-gutter:2rem]\"`; both vars inherit, which is\n // what lets `AppShell.Content` re-derive the column at any depth.\n \"[--app-shell-gutter:1.5rem] py-(--app-shell-gutter)\",\n MAIN_MEASURE[size],\n \"grid content-start grid-cols-[1fr_min(100%-2*var(--app-shell-gutter),var(--app-shell-measure))_1fr]\",\n // Both placement rules are authored here, on the same element, so\n // their relative weight is decided by specificity — `.main > [data-full]`\n // (0,2,0) over `.main > *` (0,1,0) — and never by where Tailwind\n // happens to sort two same-weight utilities. `min-w-0` stops a wide\n // child (a DataTable) overflowing the column, and zeroes a spanning\n // child's min-content contribution so it can't inflate the gutters.\n \"[&>*]:col-start-2 [&>*]:min-w-0\",\n \"[&>[data-full]]:col-span-full\",\n ],\n className,\n )}\n />\n)\n\nexport type AppShellFullProps = HTMLArkProps<\"div\"> & WithTestId\n\n/**\n * Opts one child of `AppShell.Main` out of the content column, spanning every\n * track so it reaches Main's true edges — for the things a column actively\n * hurts: data tables, carousels, heroes, full-width backgrounds.\n *\n * Carries no layout class of its own; it only marks itself with `data-full`,\n * and Main's own rule does the placement (see `AppShellMain`). `asChild`\n * merges that marker onto the component itself, so nothing extra lands in the\n * DOM:\n *\n * <AppShell.Full asChild>\n * <DataTable … />\n * </AppShell.Full>\n *\n * Only works as a *direct* child of Main — breaking out of a grid means being\n * in it. Wrap content in a `Full` band and use `AppShell.Content` inside it\n * rather than nesting `Full` deeper.\n */\nconst AppShellFull = ({ testId, ...rest }: AppShellFullProps) => (\n <ark.div data-full=\"\" {...props({ \"data-testid\": testId })} {...rest} />\n)\n\nexport type AppShellContentProps = HTMLArkProps<\"div\"> & WithTestId\n\n/**\n * Puts content back into Main's column — the counterpart to `AppShell.Full`,\n * for a full-width band whose *text* should still line up with the rest of the\n * page:\n *\n * <AppShell.Full asChild>\n * <section className=\"bg-brand-50 py-16\">\n * <AppShell.Content>\n * <Title>Welcome back</Title>\n * </AppShell.Content>\n * </section>\n * </AppShell.Full>\n *\n * The width expression is the same one Main gives its middle track, resolved\n * against this element's own containing block, so the edges line up exactly at\n * both ends of the range — full measure when there's room, gutter-only when\n * there isn't. Reading the inherited custom properties rather than using\n * `subgrid` is deliberate: subgrid would only reach one level down, only from\n * an element spanning every track, and would break on any wrapper in between.\n * This works at any depth, including inside a `fluid` Main.\n */\nconst AppShellContent = ({ className, testId, ...rest }: AppShellContentProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"mx-auto w-[min(100%-2*var(--app-shell-gutter),var(--app-shell-measure))]\",\n className,\n )}\n />\n)\n\nconst ASIDE_WIDTH: Record<Size, string> = {\n xs: \"@xl:w-56\",\n sm: \"@xl:w-64\",\n md: \"@xl:w-72\",\n lg: \"@xl:w-80\",\n xl: \"@xl:w-96\",\n}\n\nexport type AppShellAsideProps = HTMLArkProps<\"aside\"> &\n WithTestId & {\n /** Width when visible, from the kit's Size scale. @default \"md\" */\n size?: Size\n }\n\n/**\n * The right region, below `Header` (unlike `Sidebar`, which spans the full\n * height beside it). Unlike `Sidebar`, always mounted — hidden below a\n * `@xl` *container* breakpoint (1280px of `AppShell`'s own width, via\n * Tailwind's native container queries — `AppShell`'s root carries\n * `@container`) and shown above it, purely via static classes, no\n * `useContainerQuery`/context involved. Matches fumadocs' own docs layout,\n * which keeps its table-of-contents rail always in the DOM rather than\n * conditionally unmounting it — no hydration mismatch is possible when\n * nothing renders differently based on client-only state. Fixed to `@xl`\n * rather than a configurable prop like Sidebar's `breakpoint`: Sidebar's is\n * JS-driven and can take any pixel value at runtime, but a static Tailwind\n * class can't take an arbitrary runtime breakpoint without breaking the\n * build-time class scanner.\n */\nconst AppShellAside = ({ size = \"md\", className, testId, ...rest }: AppShellAsideProps) => (\n <ark.aside\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"[grid-area:aside] hidden flex-col overflow-y-auto\",\n TEXT_COLOR_CLASSES.primary,\n \"@xl:flex\",\n ASIDE_WIDTH[size],\n className,\n )}\n />\n)\n\nexport type AppShellSidebarTriggerProps = HTMLArkProps<\"button\"> & WithTestId\n\n/**\n * Opens/closes the mobile `Drawer`. Renders nothing above `breakpoint`,\n * where the sidebar is a grid column — `SidebarCollapseTrigger` is the\n * desktop counterpart that collapses it.\n * `asChild`-able, like every other kit trigger. Carries `aria-expanded` and\n * `aria-controls` (the drawer's content), like any disclosure button.\n */\nconst AppShellSidebarTrigger = ({ onClick, testId, ...rest }: AppShellSidebarTriggerProps) => {\n const { isMobile, mobileOpen, setMobileOpen, sidebarId } = useAppShell()\n\n if (!isMobile) return null\n\n return (\n <ark.button\n type=\"button\"\n aria-expanded={mobileOpen}\n aria-controls={sidebarId}\n {...props({ \"data-testid\": testId })}\n {...rest}\n onClick={(event) => {\n onClick?.(event)\n setMobileOpen((open) => !open)\n }}\n />\n )\n}\n\nexport type AppShellSidebarCollapseTriggerProps = HTMLArkProps<\"button\"> & WithTestId\n\n/**\n * Collapses/expands the desktop sidebar — `SidebarTrigger`'s desktop\n * counterpart, and its mirror image: renders nothing below `breakpoint`,\n * where the sidebar is a drawer and there's nothing to collapse. Rendering one\n * is what opts a shell into collapsing. `asChild`-able; carries\n * `aria-expanded`, `aria-controls` and `data-collapsed`.\n *\n * Usually rendered twice: in `SidebarHeader` to collapse, and in `Header` to\n * expand again (the one in the sidebar slides away with it) — the Header one\n * often only while `useAppShell().collapsed`. Collapsing from the one inside\n * the sidebar hands focus to a collapse trigger outside it, including one\n * that only just rendered, since the collapsed sidebar is `inert` and would\n * otherwise drop focus on the floor.\n */\nconst AppShellSidebarCollapseTrigger = ({\n onClick,\n testId,\n ...rest\n}: AppShellSidebarCollapseTriggerProps) => {\n const { isMobile, collapsed, setCollapsed, sidebarId } = useAppShell()\n\n if (isMobile) return null\n\n return (\n <ark.button\n type=\"button\"\n aria-expanded={!collapsed}\n aria-controls={sidebarId}\n data-app-shell-collapse-trigger=\"\"\n {...props({ \"data-testid\": testId, \"data-collapsed\": collapsed })}\n {...rest}\n onClick={(event) => {\n onClick?.(event)\n const button = event.currentTarget\n // Commit synchronously, so a trigger that only renders while\n // collapsed (an \"expand\" button in Header) exists to take focus.\n flushSync(() => setCollapsed((value) => !value))\n // Collapsed out of sight (`collapse=\"hide\"`), the sidebar is now\n // inert and this button with it. A rail stays usable, so focus stays.\n const sidebar = document.getElementById(sidebarId)\n if (sidebar && button.closest(\"[inert]\")) {\n const outside = [\n ...(sidebar.parentElement?.querySelectorAll<HTMLElement>(\n \"[data-app-shell-collapse-trigger]\",\n ) ?? []),\n ].find((trigger) => !sidebar.contains(trigger))\n outside?.focus()\n }\n }}\n />\n )\n}\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Sidebar: AppShellSidebar,\n SidebarHeader: AppShellSidebarHeader,\n SidebarBody: AppShellSidebarBody,\n SidebarFooter: AppShellSidebarFooter,\n SidebarTrigger: AppShellSidebarTrigger,\n SidebarCollapseTrigger: AppShellSidebarCollapseTrigger,\n Header: AppShellHeader,\n Main: AppShellMain,\n Full: AppShellFull,\n Content: AppShellContent,\n Aside: AppShellAside,\n})\n"]}
1
+ {"version":3,"sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,IAAM,eAAA,GAAkB,cAAoC,IAAI,CAAA;AAUzD,SAAS,WAAA,GAA6B;AAC3C,EAAA,MAAM,GAAA,GAAM,WAAW,eAAe,CAAA;AACtC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAC9E,EAAA,OAAO,GAAA;AACT;AAOA,IAAM,WAAA,GAAc,CAAC,KAAA,EAAmB,MAAA,KAAwC;AAC9E,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,IAAK,KAAA,CAAM,OAAA,IAAW,MAAM,OAAA,IAAW,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,MAAA,EAAQ;AAC1F,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,MAAM,IAAA,GAAO,MAAM,MAAA,YAAkB,OAAA,GAAU,MAAM,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,GAAI,IAAA;AACjF,EAAA,OAAO,IAAA,IAAQ,IAAA,IAAQ,MAAA,EAAQ,QAAA,CAAS,IAAI,CAAA,KAAM,IAAA;AACpD,CAAA;AAqBA,IAAM,eAAe,CAAC;AAAA,EACpB,UAAA,GAAa,GAAA;AAAA,EACb,SAAA,EAAW,aAAA;AAAA,EACX,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA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,CAAA;AACf,QAAA,MAAM,SAAS,KAAA,CAAM,aAAA;AAGrB,QAAA,SAAA,CAAU,MAAM,YAAA,CAAa,CAAC,KAAA,KAAU,CAAC,KAAK,CAAC,CAAA;AAG/C,QAAA,MAAM,OAAA,GAAU,QAAA,CAAS,cAAA,CAAe,SAAS,CAAA;AACjD,QAAA,IAAI,OAAA,IAAW,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,EAAG;AACxC,UAAA,MAAM,OAAA,GAAU;AAAA,YACd,GAAI,QAAQ,aAAA,EAAe,gBAAA;AAAA,cACzB;AAAA,iBACG;AAAC,WACR,CAAE,KAAK,CAAC,OAAA,KAAY,CAAC,OAAA,CAAQ,QAAA,CAAS,OAAO,CAAC,CAAA;AAC9C,UAAA,OAAA,EAAS,KAAA,EAAM;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,GACF;AAEJ,CAAA;AAEO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc;AAAA,EAClD,OAAA,EAAS,eAAA;AAAA,EACT,aAAA,EAAe,qBAAA;AAAA,EACf,WAAA,EAAa,mBAAA;AAAA,EACb,aAAA,EAAe,qBAAA;AAAA,EACf,cAAA,EAAgB,sBAAA;AAAA,EAChB,sBAAA,EAAwB,8BAAA;AAAA,EACxB,MAAA,EAAQ,cAAA;AAAA,EACR,IAAA,EAAM,YAAA;AAAA,EACN,IAAA,EAAM,YAAA;AAAA,EACN,OAAA,EAAS,eAAA;AAAA,EACT,KAAA,EAAO;AACT,CAAC","file":"index.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type Dispatch,\n type MouseEvent,\n type PointerEvent,\n type Ref,\n type RefObject,\n type SetStateAction,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\"\nimport { flushSync } from \"react-dom\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport { SidebarRailContext } from \"../../lib/sidebar-rail\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useContainerQuery } from \"../../lib/use-container-query\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { type Updater, useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Drawer } from \"../drawer/drawer\"\nimport { ScrollArea } from \"../scroll-area/scroll-area\"\n\n/**\n * AppShell — header / sidebar / main / aside app frame, laid out with CSS\n * Grid named areas. Sidebar spans the full height on the left; Header\n * spans the rest of the top (above both Main and Aside — Header never\n * spans over Sidebar, but it does span over Aside, unlike Sidebar itself);\n * Aside sits below Header, full height only within the remaining row,\n * beside Main. No Footer — add one only once a real consumer needs it.\n *\n * On desktop, Sidebar is a grid column that can be collapsed — opt in by\n * rendering an `AppShell.SidebarCollapseTrigger` (or driving `collapsed`):\n * the column animates to zero and the sidebar slides off the start edge,\n * coming back as a floating card while the pointer rests on that edge\n * (fumadocs' docs sidebar behaves the same way). Below `breakpoint`, it\n * becomes an overlay `Drawer` instead, toggled by `AppShell.SidebarTrigger`\n * (which renders nothing on desktop — `SidebarCollapseTrigger` is its\n * desktop counterpart, and renders nothing on mobile). Aside works\n * differently: it's always mounted (no JS/container-query gating at all,\n * unlike Sidebar) and purely CSS-driven — hidden below a `@xl` container\n * breakpoint, visible above it — mirroring how fumadocs' own docs layout\n * keeps its table-of-contents rail always in the DOM. There is no\n * `variant`/`color` axis — like `Table`/`Grid`/`Flex`, this is a\n * structural primitive, not a themed surface.\n *\n * `breakpoint` and Aside's `@xl` cutoff are both measured against\n * `AppShell`'s own rendered width, not the browser viewport — so this\n * behaves correctly embedded in a panel, a resizable pane, or anything\n * narrower than the window, not just when it fills the whole page.\n *\n * <AppShell>\n * <AppShell.Sidebar>\n * <AppShell.SidebarHeader>Logo</AppShell.SidebarHeader>\n * <AppShell.SidebarBody>Nav — scrolls</AppShell.SidebarBody>\n * <AppShell.SidebarFooter>User menu</AppShell.SidebarFooter>\n * </AppShell.Sidebar>\n * <AppShell.Header>\n * <AppShell.SidebarTrigger asChild>\n * <ActionIcon variant=\"subtle\" color=\"neutral\"><PanelLeft /></ActionIcon>\n * </AppShell.SidebarTrigger>\n * </AppShell.Header>\n * <AppShell.Main>Page content</AppShell.Main>\n * <AppShell.Aside>On this page…</AppShell.Aside>\n * </AppShell>\n */\n\nexport type AppShellState = {\n /** Whether the mobile drawer is open. Always uncontrolled, never a public prop. */\n mobileOpen: boolean\n /** Opens or closes the mobile drawer — e.g. close it after a programmatic\n * navigation (`router.push`) that no link click inside the sidebar caused. */\n setMobileOpen: Dispatch<SetStateAction<boolean>>\n /** Whether `AppShell` is narrower than its `breakpoint`, so Sidebar is a drawer. */\n isMobile: boolean\n /** Whether the desktop sidebar is collapsed. Has no effect below\n * `breakpoint`, where the sidebar is a drawer either way. */\n collapsed: boolean\n /** Collapses or expands the desktop sidebar — e.g. from a keyboard\n * shortcut. Goes through `onCollapsedChange` when `collapsed` is controlled. */\n setCollapsed: (updater: Updater<boolean>) => void\n /** Id of the sidebar — the drawer's content on mobile, the docked column on\n * desktop — which both triggers' `aria-controls` point at. */\n sidebarId: string\n}\n\nconst AppShellContext = createContext<AppShellState | null>(null)\n\n/**\n * The shell's sidebar state, from any descendant of `<AppShell>`. A link\n * clicked inside the mobile drawer already closes it; reach for this only when\n * something else navigates:\n *\n * const { setMobileOpen } = useAppShell()\n * const onSubmit = async () => { await save(); router.push(\"/done\"); setMobileOpen(false) }\n */\nexport function useAppShell(): AppShellState {\n const ctx = useContext(AppShellContext)\n if (!ctx) throw new Error(\"AppShell parts must be rendered within <AppShell>.\")\n return ctx\n}\n\n/** Whether a click inside the drawer follows a link in this tab: a plain\n * primary-button click on an `<a href>`. A modified click (new tab/window,\n * download) leaves the page — and the drawer — where they are. Whether the\n * link's own handler called `preventDefault` doesn't matter: a client-side\n * router does exactly that to navigate without a page load. */\nconst followsLink = (event: MouseEvent, drawer: HTMLElement | null): boolean => {\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return false\n }\n const link = event.target instanceof Element ? event.target.closest(\"a[href]\") : null\n return link != null && drawer?.contains(link) === true\n}\n\nexport type AppShellProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** AppShell's own rendered width (px) below which Sidebar renders as an\n * overlay `Drawer` instead of a grid column — measured against the\n * container itself via `ResizeObserver`, not the viewport. @default 768 */\n breakpoint?: number\n /** Whether the desktop sidebar is collapsed (controlled). Ignored below\n * `breakpoint`. */\n collapsed?: boolean\n /** Initial collapsed state (uncontrolled). @default false */\n defaultCollapsed?: boolean\n /** Called when a `SidebarCollapseTrigger` (or `useAppShell().setCollapsed`)\n * collapses or expands the desktop sidebar. */\n onCollapsedChange?: (collapsed: boolean) => void\n /** Lands on the grid root; also used internally to measure `breakpoint`\n * against the container's own width. */\n ref?: Ref<HTMLDivElement>\n }\n\nconst AppShellRoot = ({\n breakpoint = 768,\n collapsed: collapsedProp,\n defaultCollapsed,\n onCollapsedChange,\n className,\n style,\n children,\n ref,\n testId,\n onClick,\n ...rest\n}: AppShellProps) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const [mobileOpen, setMobileOpen] = useState(false)\n const [collapsed, setCollapsed] = useUncontrolled({\n value: collapsedProp,\n defaultValue: defaultCollapsed,\n finalValue: false,\n onChange: onCollapsedChange,\n })\n const isMobile = useContainerQuery(rootRef, breakpoint)\n const sidebarId = `app-shell-sidebar-${useId()}`\n\n const mergedRef = useMergedRefs(ref, rootRef)\n return (\n <AppShellContext.Provider\n value={{ mobileOpen, setMobileOpen, isMobile, collapsed, setCollapsed, sidebarId }}\n >\n <ark.div\n {...props({\n \"data-testid\": testId,\n \"data-sidebar-collapsed\": collapsed && !isMobile,\n })}\n {...rest}\n ref={mergedRef}\n // The drawer is portaled out of this element in the DOM, but React\n // still bubbles its clicks through here. Closing on a followed link\n // is what a page load would have done; a client-side router doesn't\n // reload, so without this the drawer stays open over the new page.\n onClick={(event) => {\n onClick?.(event)\n if (mobileOpen && followsLink(event, document.getElementById(sidebarId))) {\n setMobileOpen(false)\n }\n }}\n style={{ gridTemplateAreas: `\"sidebar header header\" \"sidebar main aside\"`, ...style }}\n className={cn(\n \"@container grid h-dvh grid-cols-[auto_1fr_auto] grid-rows-[auto_1fr] overflow-hidden\",\n className,\n )}\n >\n {children}\n </ark.div>\n </AppShellContext.Provider>\n )\n}\n\nconst SIDEBAR_WIDTH: Record<Size, string> = {\n xs: \"w-56\",\n sm: \"w-64\",\n md: \"w-72\",\n lg: \"w-80\",\n xl: \"w-96\",\n}\n\n/** The icon rail's width: exactly the expanded sidebar's icon column —\n * SidebarBody's 16px padding + NavLink's 10px row padding on each side of a\n * 16px icon, plus the aside's 1px end border. At this width nothing has to re-lay out on a rail: every icon\n * (and the header's trigger, and the footer's avatar) sits where it does\n * when expanded, so opening and closing only animates the width, with\n * nothing jumping as the labels come and go. A NavLink row is then a 36px\n * square by itself. */\nconst RAIL_WIDTH = \"w-[calc(--spacing(17)+1px)]\"\n\n/** How long (ms) the pointer must stay *still* on an icon rail before it\n * peeks open. Any movement past `RAIL_REST_TOLERANCE` restarts the count, so\n * travelling across the icons (and reading their tooltips, 200ms) never opens\n * it — only a deliberate rest does. */\nconst RAIL_PEEK_DELAY = 1200\n/** How far (px) the pointer may drift and still count as resting — a hand on\n * a mouse or trackpad is never perfectly still. */\nconst RAIL_REST_TOLERANCE = 4\n\nexport type AppShellSidebarCollapse = \"hide\" | \"icons\"\n\nexport type AppShellSidebarProps = NoAsChild<HTMLArkProps<\"aside\">> &\n WithTestId & {\n /** Width when expanded, from the kit's Size scale. @default \"md\" */\n size?: Size\n /** What collapsing does on desktop. `\"hide\"` slides the sidebar off the\n * edge, peeking back as a card on hover at the edge. `\"icons\"` shrinks it\n * to a 68px icon rail: labels turn into tooltips, and resting on the rail\n * peeks the full sidebar over the page. @default \"hide\" */\n collapse?: AppShellSidebarCollapse\n }\n\n/**\n * Below `breakpoint`, renders through the kit's own `Drawer` instead of the\n * grid column — same `SidebarHeader`/`SidebarBody`/`SidebarFooter` children\n * either way, mirroring the desktop docked aside's layout: `Drawer`'s own\n * body normally forces every child through one scrolling container, which\n * would otherwise carry Header/Footer along with the scroll instead of\n * pinning them — `classNames.body` turns it into the same flex column\n * (Header/Footer as plain shrink-0 flex items, only SidebarBody's own\n * `overflow-y-auto` scrolls) instead. Full width, opening from the logical\n * end edge (right in LTR). `withCloseButton={false}` — at full width,\n * `Drawer`'s own generic close bar would just stack a second, redundant\n * header above `SidebarHeader`; render a `SidebarTrigger` inside\n * `SidebarHeader` itself instead for one unified bar with a visible close\n * affordance (swipe-to-dismiss on `Drawer`'s content still works too, but\n * isn't the only way out — not discoverable, and risky to rely on alone in\n * a sidebar full of tappable nav rows).\n *\n * Exclusive branch, not always-mounted-and-CSS-hidden like `Aside` — unlike\n * `Aside`, `Sidebar` has two genuinely different structural forms (a plain\n * `<aside>` vs. a portaled dialog with focus-trap/ARIA machinery), so\n * keeping both permanently mounted would mean literally duplicating\n * `children` (and any side effects inside it) into two simultaneous trees.\n * Matches fumadocs' own sidebar, which is JS-conditional for the same\n * reason — only its TOC (this component's `Aside`) goes the always-mounted\n * route. Only `size`/`className`/`children` and the `aria-label` /\n * `aria-labelledby` naming carry over to `Drawer` mode; arbitrary `<aside>`\n * props don't apply to `Drawer`'s own curated prop surface. The drawer has\n * no `title`, so without one of those it is a dialog with no name (and\n * `Drawer` warns in development).\n */\nconst AppShellSidebar = ({\n size = \"md\",\n collapse = \"hide\",\n className,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: AppShellSidebarProps) => {\n const { isMobile, mobileOpen, setMobileOpen, collapsed, sidebarId } = useAppShell()\n const columnRef = useRef<HTMLDivElement>(null)\n const asideRef = useRef<HTMLElement>(null)\n const icons = collapse === \"icons\"\n const { peeking, restPoint, onPointerEnter, onPointerMove, onPointerLeave, onScrollActivity } =\n useSidebarPeek(collapsed, columnRef, asideRef, icons ? RAIL_PEEK_DELAY : 0)\n // Icons only: collapsed to the rail and not peeking.\n const rail = icons && collapsed && !peeking\n useRailAnchor(icons && collapsed && !isMobile, peeking, asideRef, restPoint)\n\n if (isMobile) {\n return (\n <Drawer\n open={mobileOpen}\n onOpenChange={setMobileOpen}\n placement=\"end\"\n withCloseButton={false}\n aria-label={rest[\"aria-label\"]}\n aria-labelledby={rest[\"aria-labelledby\"]}\n ids={{ content: sidebarId }}\n testId={testId}\n // A non-scrolling body: Sidebar.Body is the scroller, so Header/Footer stay put.\n scrollable={false}\n classNames={{ body: \"overflow-hidden p-0\" }}\n className={cn(\"w-full max-w-none\", className)}\n >\n {children}\n </Drawer>\n )\n }\n\n // Two layers, as in fumadocs: the column is what the grid track sizes\n // itself to (and what animates to zero), while the aside is positioned\n // inside it at a fixed width — so its content never reflows mid-collapse,\n // and the same element can float back out as a card while collapsed.\n return (\n <div\n ref={columnRef}\n id={sidebarId}\n className={cn(\n \"[grid-area:sidebar] relative z-10\",\n \"transition-[width] duration-250 ease-out motion-reduce:transition-none\",\n collapsed ? (icons ? RAIL_WIDTH : \"w-0\") : SIDEBAR_WIDTH[size],\n )}\n >\n {collapsed && !icons && (\n // The hot strip along the start edge that brings the card back. Before\n // the aside in the DOM so a peeking card paints over it.\n <div\n aria-hidden\n data-sidebar-edge=\"\"\n className=\"absolute inset-y-0 inset-s-0 w-4\"\n onPointerEnter={onPointerEnter}\n onPointerLeave={onPointerLeave}\n />\n )}\n <ark.aside\n {...props({\n \"data-testid\": testId,\n \"data-collapsed\": collapsed,\n \"data-peeking\": peeking,\n \"data-sidebar-rail\": rail,\n })}\n {...rest}\n ref={asideRef}\n // Off-screen links must not take Tab focus, nor be read out. A rail\n // is on screen, so it stays interactive.\n inert={collapsed && !icons && !peeking}\n onPointerEnter={(event) => {\n rest.onPointerEnter?.(event)\n onPointerEnter(event)\n }}\n // Capture: `scroll` doesn't bubble from SidebarBody, and a wheel\n // that can't scroll (at an end) is still the user scrolling.\n onWheelCapture={(event) => {\n rest.onWheelCapture?.(event)\n onScrollActivity()\n }}\n onScrollCapture={(event) => {\n rest.onScrollCapture?.(event)\n onScrollActivity()\n }}\n onPointerMove={(event) => {\n rest.onPointerMove?.(event)\n onPointerMove(event)\n }}\n onPointerLeave={(event) => {\n rest.onPointerLeave?.(event)\n onPointerLeave(event)\n }}\n className={cn(\n \"absolute inset-y-0 inset-s-0 flex flex-col overflow-hidden\",\n TEXT_COLOR_CLASSES.primary,\n // Brand-derived border/fill, matching InputBase/Popover/Modal/Drawer/Table's\n // own chrome (border-brand-900/20 dark:border-white/15, bg-brand-50/90\n // dark:bg-brand-950/85) rather than a neutral gray.\n \"border-e border-brand-900/20 bg-brand-50/90 dark:border-white/15 dark:bg-brand-950/85\",\n \"transition-[width,translate,inset-block,border-radius,box-shadow] duration-250 ease-out motion-reduce:transition-none\",\n rail ? RAIL_WIDTH : SIDEBAR_WIDTH[size],\n // A peeking rail widens in place, over the page.\n icons && peeking && \"shadow-lg backdrop-blur-sm\",\n collapsed &&\n !icons && [\n // Collapsed, it's a floating panel over scrolling content — so it\n // takes Popover's blur, which the docked column doesn't need.\n \"inset-y-2 rounded-xl border backdrop-blur-sm\",\n peeking\n ? \"translate-x-2 shadow-lg rtl:-translate-x-2\"\n : \"-translate-x-full rtl:translate-x-full\",\n ],\n className,\n )}\n >\n <SidebarRailContext.Provider value={icons ? { active: rail } : null}>\n {children}\n </SidebarRailContext.Provider>\n </ark.aside>\n </div>\n )\n}\n\n/** Pointer-leave grace period (ms) when the pointer leaves near the shell's\n * edge — overshooting the window edge shouldn't snap the card shut. */\nconst PEEK_LEAVE_DELAY = 500\n/** How close to the shell's edge (px) a pointer-leave counts as \"near\". */\nconst PEEK_EDGE_DISTANCE = 100\n\n/**\n * Hover-to-peek for a collapsed sidebar, ported from fumadocs'\n * `SidebarContent`. Entering the edge strip (or the card itself) shows the\n * card; leaving hides it — at once when the pointer heads into the page, after\n * a grace period when it leaves near the edge. An icon rail (`enterDelay`)\n * instead waits for the pointer to come to rest: the count restarts whenever\n * it moves more than `RAIL_REST_TOLERANCE`, and leaving cancels it. Touch is\n * ignored (there is no hover to end it), and so is arming while the aside is\n * still animating —\n * otherwise collapsing with the pointer over the sidebar would peek it right\n * back. Leaving is never ignored, so a card can't get stuck open.\n */\nfunction useSidebarPeek(\n collapsed: boolean,\n columnRef: RefObject<HTMLElement | null>,\n asideRef: RefObject<HTMLElement | null>,\n /** How long the pointer must stay before the card shows — 0 at the hide\n * mode's edge strip, a dwell on an icon rail, where hovering an icon\n * should show its tooltip first. */\n enterDelay: number,\n) {\n const [hovered, setHovered] = useState(false)\n const [wasCollapsed, setWasCollapsed] = useState(collapsed)\n const timer = useRef<number | undefined>(undefined)\n /** Where the pointer was when the current rest began; null when not armed. */\n const restOrigin = useRef<{ x: number; y: number } | null>(null)\n /** Where the pointer rested when the rail last peeked open. */\n const restPoint = useRef<{ x: number; y: number } | null>(null)\n\n // Any collapse or expand starts from a hidden card.\n if (wasCollapsed !== collapsed) {\n setWasCollapsed(collapsed)\n setHovered(false)\n }\n useEffect(() => () => window.clearTimeout(timer.current), [])\n\n const ignored = (event: PointerEvent<HTMLElement>) =>\n !collapsed ||\n event.pointerType === \"touch\" ||\n (asideRef.current?.getAnimations?.().length ?? 0) > 0\n\n /** (Re)start the rest count from where the pointer is now. */\n const armRest = (event: PointerEvent<HTMLElement>) => {\n restOrigin.current = { x: event.clientX, y: event.clientY }\n restartRest()\n }\n\n const restartRest = () => {\n window.clearTimeout(timer.current)\n timer.current = window.setTimeout(() => {\n restPoint.current = restOrigin.current\n restOrigin.current = null\n setHovered(true)\n }, enterDelay)\n }\n\n const onPointerEnter = (event: PointerEvent<HTMLElement>) => {\n if (ignored(event)) return\n if (enterDelay > 0) return armRest(event)\n window.clearTimeout(timer.current)\n setHovered(true)\n }\n\n const onPointerMove = (event: PointerEvent<HTMLElement>) => {\n if (enterDelay === 0 || hovered || ignored(event)) return\n const origin = restOrigin.current\n // Also arms a rest the enter couldn't (the pointer was already over the\n // aside when it finished animating).\n if (\n !origin ||\n Math.hypot(event.clientX - origin.x, event.clientY - origin.y) > RAIL_REST_TOLERANCE\n ) {\n armRest(event)\n }\n }\n\n /**\n * Scrolling the rail is not resting on it, even with the pointer parked:\n * the rows are sliding under it, and the one it ends on is the one the user\n * means. So a wheel or scroll restarts the count, and the rail opens only\n * once both the pointer *and* the list have been still — not mid-scroll, on\n * whichever row happened to be passing. Only while a rest is pending (the\n * pointer is over the rail), so the anchoring's own scrolling, which runs\n * while open or after the pointer left, never arms one.\n */\n const onScrollActivity = () => {\n if (enterDelay === 0 || hovered || !restOrigin.current) return\n restartRest()\n }\n\n const onPointerLeave = (event: PointerEvent<HTMLElement>) => {\n if (!collapsed || event.pointerType === \"touch\") return\n restOrigin.current = null\n window.clearTimeout(timer.current)\n // Measured against the shell, not the viewport: AppShell may be embedded.\n const shell = columnRef.current?.parentElement ?? document.documentElement\n const { left, right } = shell.getBoundingClientRect()\n const fromEdge = Math.min(event.clientX - left, right - event.clientX)\n timer.current = window.setTimeout(\n () => setHovered(false),\n fromEdge > PEEK_EDGE_DISTANCE ? 0 : PEEK_LEAVE_DELAY,\n )\n }\n\n return {\n peeking: collapsed && hovered,\n restPoint,\n onPointerEnter,\n onPointerMove,\n onPointerLeave,\n onScrollActivity,\n }\n}\n\n/** The nearest scrolling ancestor of `node` inside `within` — SidebarBody,\n * unless a consumer put the row in a scroller of their own. */\nfunction scrollerOf(node: Element, within: Element): HTMLElement | null {\n for (let el = node.parentElement; el && el !== within; el = el.parentElement) {\n const { overflowY } = getComputedStyle(el)\n if (overflowY === \"auto\" || overflowY === \"scroll\") return el\n }\n return null\n}\n\n/** Longest gap (ms) between wheel events that still counts as one stream —\n * trackpad momentum fires every frame or so; a new, deliberate scroll starts\n * after a pause. */\nconst WHEEL_STREAM_GAP = 150\n\n/** Safety stop (ms) for the anchoring: it normally ends with the transition's\n * own animations (width 250ms, Collapse 300ms). */\nconst ANCHOR_MAX_DURATION = 1000\n\n/**\n * Keeps the row under the pointer where it is while an icon rail peeks open,\n * and while it closes again. Opening unfolds nested rows (NavLink's Collapse)\n * above it, which would otherwise push it down and out from under the pointer;\n * so every time the scroller's content resizes during the transition, the\n * scroller scrolls by exactly the distance it drifted. Self-correcting (it\n * re-measures against the starting position each time), it follows the\n * transition until its animations finish. Meanwhile it owns the list's scroll:\n * wheel events wait the ~300ms out (trackpad momentum would otherwise fight\n * it).\n *\n * The element is picked once, under the pointer at the moment the rail opens,\n * and reused on close: folding everything back above the same element walks\n * the scroll back to where the rail was, so a rail is never left scrolled.\n * Where the list is too short to scroll that far, it stays as close as the\n * scroll allows.\n */\nfunction useRailAnchor(\n enabled: boolean,\n peeking: boolean,\n asideRef: RefObject<HTMLElement | null>,\n restPoint: RefObject<{ x: number; y: number } | null>,\n) {\n const anchor = useRef<Element | null>(null)\n\n // A layout effect: it runs before the first frame of the transition paints,\n // while everything still sits where it did, so the starting position is\n // the true pre-open one.\n useIsomorphicLayoutEffect(() => {\n const aside = asideRef.current\n if (!enabled || !aside) return\n if (peeking) {\n const point = restPoint.current\n const hit = point ? document.elementFromPoint?.(point.x, point.y) : null\n anchor.current = hit && aside.contains(hit) ? hit : null\n }\n const target = anchor.current\n if (!peeking) anchor.current = null\n if (!target?.isConnected) return\n const scroller = scrollerOf(target, aside)\n if (!scroller) return\n\n const top = target.getBoundingClientRect().top\n // No \"a scroll we didn't make means the user took over\" check: the\n // browser makes some itself. Scrolled to the bottom, anything that changes\n // the scroller's height mid-transition (a footer whose text rewraps as the\n // rail widens) clamps the scroll and fires one, and treating that as the\n // user dropped the correction halfway, at random. The wheel is held below,\n // and nothing else scrolls a sidebar in a 300ms window.\n const correct = () => {\n const drift = target.getBoundingClientRect().top - top\n if (drift !== 0) scroller.scrollTop += drift\n }\n // A ResizeObserver, not requestAnimationFrame: its callbacks run after\n // layout and before paint, so each frame is corrected before it's drawn.\n // rAF runs before layout, sees the previous frame, and always lags one —\n // visible as a jolt on Collapse's fast-starting first frame.\n const observer = new ResizeObserver(correct)\n // The scroller too, not just its content: its own height changing (a\n // footer rewrapping) can move the row as well.\n observer.observe(scroller)\n for (const child of scroller.children) observer.observe(child)\n // The browser's own scroll anchoring would adjust the same scroll from its\n // own anchor node; keep it out while this one runs.\n const overflowAnchor = scroller.style.overflowAnchor\n scroller.style.overflowAnchor = \"none\"\n // Wheel scrolling waits out the transition (~300ms), and any wheel stream\n // already running through it. A trackpad keeps sending momentum wheel\n // events for a second or more after a flick: the user has stopped\n // scrolling, but the events still scroll the list (which, corrected, is no\n // longer resting against the edge that absorbed them), and nothing in a\n // WheelEvent tells inertia from intent. Letting them through dragged the\n // row out from under the pointer, at random. Momentum is one unbroken\n // stream, so the first wheel event after a pause is the user's again.\n let stopped = false\n let lastWheel = Number.NEGATIVE_INFINITY\n const holdWheel = (event: WheelEvent) => {\n const continuing = event.timeStamp - lastWheel < WHEEL_STREAM_GAP\n lastWheel = event.timeStamp\n if (!stopped || continuing) event.preventDefault()\n else releaseWheel()\n }\n const releaseWheel = () => scroller.removeEventListener(\"wheel\", holdWheel)\n const stop = () => {\n if (stopped) return\n stopped = true\n observer.disconnect()\n scroller.style.overflowAnchor = overflowAnchor\n }\n scroller.addEventListener(\"wheel\", holdWheel, { passive: false })\n // Done once the transition is: reading the animations here also flushes\n // the style change, so the width and Collapse transitions already exist.\n // Without getAnimations, only the timeout ends it.\n let settle = 0\n if (aside.getAnimations) {\n const running = aside.getAnimations({ subtree: true })\n Promise.allSettled(running.map((animation) => animation.finished)).then(() => {\n // One frame late, on purpose. `finished` resolves at the start of the\n // final frame, before that frame lays out the animations' end values;\n // stopping right away skipped the last few px of the unfold, leaving\n // the row 3px off (more or less, by frame timing). The next frame's\n // rAF runs after that layout and its ResizeObserver correction.\n settle = requestAnimationFrame(stop)\n })\n }\n const timeout = window.setTimeout(stop, ANCHOR_MAX_DURATION)\n return () => {\n stop()\n releaseWheel()\n window.clearTimeout(timeout)\n cancelAnimationFrame(settle)\n }\n }, [enabled, peeking])\n}\n\n// Shared by SidebarHeader and Header so the two sit at the same height and\n// Header's bottom border lines up level with SidebarHeader's own bottom edge\n// — sizing each off its own padding + content independently (the original\n// approach) drifts out of sync as soon as one holds taller content than the\n// other.\nconst HEADER_HEIGHT_CLASS = \"h-14\"\n\nexport type AppShellSidebarHeaderProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n// Plain flex sibling, not routed through the `ark.*` factory — mirrors\n// Drawer.Header/.Body/.Footer, which aren't either.\nconst AppShellSidebarHeader = ({ className, testId, ...rest }: AppShellSidebarHeaderProps) => (\n <div\n className={cn(HEADER_HEIGHT_CLASS, \"flex shrink-0 items-center gap-2 px-4\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type AppShellSidebarBodyProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/**\n * The scroll region — the only part of Sidebar that scrolls. A vertical `ScrollArea`, so the\n * nav list shows the kit's thin overlay bars on every OS. Its edges fade (`fade`, 12px) only\n * where there is more to scroll to, instead of a static mask that also dimmed the first and\n * last links at rest; `overscroll-contain` stops scrolling the list from chaining into\n * scrolling the rest of the page once it hits either end. On an icon rail the bar stays\n * invisible (it would sit over the centred icons); the rail still scrolls by wheel, touch and\n * focus, and the fade still shows there's more.\n *\n * `className` and the other props land on the scrolled content, which holds the padding and\n * the links' layout.\n */\nconst AppShellSidebarBody = ({ className, testId, ...rest }: AppShellSidebarBodyProps) => (\n <ScrollArea.Root scrollbars=\"y\" fade className=\"min-h-0 flex-1 [--scroll-area-fade:12px]\">\n <ScrollArea.Viewport className=\"overscroll-contain\">\n <ScrollArea.Content\n className={cn(\"p-4\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n </ScrollArea.Viewport>\n {/* `invisible`, not `hidden`: the machine measures the track to size the thumb. */}\n <ScrollArea.Scrollbar orientation=\"vertical\" className=\"sidebar-rail:invisible\">\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n)\n\nexport type AppShellSidebarFooterProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nconst AppShellSidebarFooter = ({ className, testId, ...rest }: AppShellSidebarFooterProps) => (\n <div className={cn(\"shrink-0 p-4\", className)} {...props({ \"data-testid\": testId })} {...rest} />\n)\n\nexport type AppShellHeaderProps = HTMLArkProps<\"header\"> & WithTestId\n\nconst AppShellHeader = ({ className, testId, ...rest }: AppShellHeaderProps) => (\n <ark.header\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n HEADER_HEIGHT_CLASS,\n // Brand-derived border/fill, matching InputBase/Popover/Modal/Drawer/Table's\n // own chrome (border-brand-900/20 dark:border-white/15, bg-brand-50/90\n // dark:bg-brand-950/85) rather than a neutral gray.\n \"[grid-area:header] flex shrink-0 items-center gap-3 border-b border-brand-900/20 bg-brand-50/90 px-4 text-brand-950\",\n \"dark:border-white/15 dark:bg-brand-950/85 dark:text-white\",\n className,\n )}\n />\n)\n\nexport type AppShellMainSize = \"sm\" | \"md\" | \"lg\" | \"xl\"\n\n// A local scale rather than the shared Size one: these are page widths, not\n// control widths, so they read off the kit's own `--width-*` tokens\n// (theme.css) — the vocabulary Modal already uses — instead of inventing a\n// second set. Static class strings so Tailwind's build-time scanner picks them\n// up, in the same lookup-map shape as SIDEBAR_WIDTH/ASIDE_WIDTH above.\nconst MAIN_MEASURE: Record<AppShellMainSize, string> = {\n sm: \"[--app-shell-measure:var(--width-xl)]\", // 48rem / 768px\n md: \"[--app-shell-measure:var(--width-2xl)]\", // 64rem / 1024px\n lg: \"[--app-shell-measure:var(--width-3xl)]\", // 80rem / 1280px\n xl: \"[--app-shell-measure:var(--width-4xl)]\", // 90rem / 1440px\n}\n\nexport type AppShellMainProps = HTMLArkProps<\"main\"> &\n WithTestId & {\n /** Width of the content column, from the kit's `--width-*` tokens:\n * `sm` 48rem · `md` 64rem · `lg` 80rem · `xl` 90rem. @default \"lg\" */\n size?: AppShellMainSize\n /** Drop the content column entirely — children fill Main edge to edge, as\n * they did before the column existed. For pages whose Main *is* one\n * full-canvas component (a Schedule, a DataTable sized to the viewport)\n * rather than a document. @default false */\n fluid?: boolean\n }\n\n/**\n * The page region. By default its children sit in a centered content column,\n * so a page of prose and forms doesn't stretch to whatever width the window\n * happens to be; `AppShell.Full` opts one child out to the full width, and\n * `AppShell.Content` puts arbitrary content back in.\n *\n * The column is three grid tracks — `1fr`, the column, `1fr` — rather than\n * inline padding, which is what lets a child span *past* the gutters without\n * negative margins, `100vw`, or any JS measurement. Percentages in track\n * sizing resolve against Main's own content box, so the column is correct\n * beside a sidebar, inside a resizable pane, or in a bounded docs preview\n * frame, with no media query and no `ResizeObserver` involved. Below\n * `measure + 2 × gutter` the middle track collapses to `100% - 2 × gutter`\n * and the `1fr` tracks land exactly on the gutter, so the column degrades\n * into plain padding continuously, without a breakpoint.\n *\n * `align-content: start` is load-bearing: grid's default (`normal`, i.e.\n * `stretch`) hands leftover vertical space to every auto row, which would\n * space a short page's blocks out down the viewport.\n *\n * <AppShell.Main>\n * <Title>Quarterly sales</Title>\n * <AppShell.Full asChild>\n * <DataTable … />\n * </AppShell.Full>\n * </AppShell.Main>\n */\nconst AppShellMain = ({\n size = \"lg\",\n fluid = false,\n className,\n testId,\n ...rest\n}: AppShellMainProps) => (\n <ark.main\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"[grid-area:main] min-h-0 overflow-y-auto\",\n !fluid && [\n // Gutter doubles as Main's block padding, so content never butts\n // against Header. Overridable per page with\n // `className=\"[--app-shell-gutter:2rem]\"`; both vars inherit, which is\n // what lets `AppShell.Content` re-derive the column at any depth.\n \"[--app-shell-gutter:1.5rem] py-(--app-shell-gutter)\",\n MAIN_MEASURE[size],\n \"grid content-start grid-cols-[1fr_min(100%-2*var(--app-shell-gutter),var(--app-shell-measure))_1fr]\",\n // Both placement rules are authored here, on the same element, so\n // their relative weight is decided by specificity — `.main > [data-full]`\n // (0,2,0) over `.main > *` (0,1,0) — and never by where Tailwind\n // happens to sort two same-weight utilities. `min-w-0` stops a wide\n // child (a DataTable) overflowing the column, and zeroes a spanning\n // child's min-content contribution so it can't inflate the gutters.\n \"[&>*]:col-start-2 [&>*]:min-w-0\",\n \"[&>[data-full]]:col-span-full\",\n ],\n className,\n )}\n />\n)\n\nexport type AppShellFullProps = HTMLArkProps<\"div\"> & WithTestId\n\n/**\n * Opts one child of `AppShell.Main` out of the content column, spanning every\n * track so it reaches Main's true edges — for the things a column actively\n * hurts: data tables, carousels, heroes, full-width backgrounds.\n *\n * Carries no layout class of its own; it only marks itself with `data-full`,\n * and Main's own rule does the placement (see `AppShellMain`). `asChild`\n * merges that marker onto the component itself, so nothing extra lands in the\n * DOM:\n *\n * <AppShell.Full asChild>\n * <DataTable … />\n * </AppShell.Full>\n *\n * Only works as a *direct* child of Main — breaking out of a grid means being\n * in it. Wrap content in a `Full` band and use `AppShell.Content` inside it\n * rather than nesting `Full` deeper.\n */\nconst AppShellFull = ({ testId, ...rest }: AppShellFullProps) => (\n <ark.div data-full=\"\" {...props({ \"data-testid\": testId })} {...rest} />\n)\n\nexport type AppShellContentProps = HTMLArkProps<\"div\"> & WithTestId\n\n/**\n * Puts content back into Main's column — the counterpart to `AppShell.Full`,\n * for a full-width band whose *text* should still line up with the rest of the\n * page:\n *\n * <AppShell.Full asChild>\n * <section className=\"bg-brand-50 py-16\">\n * <AppShell.Content>\n * <Title>Welcome back</Title>\n * </AppShell.Content>\n * </section>\n * </AppShell.Full>\n *\n * The width expression is the same one Main gives its middle track, resolved\n * against this element's own containing block, so the edges line up exactly at\n * both ends of the range — full measure when there's room, gutter-only when\n * there isn't. Reading the inherited custom properties rather than using\n * `subgrid` is deliberate: subgrid would only reach one level down, only from\n * an element spanning every track, and would break on any wrapper in between.\n * This works at any depth, including inside a `fluid` Main.\n */\nconst AppShellContent = ({ className, testId, ...rest }: AppShellContentProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"mx-auto w-[min(100%-2*var(--app-shell-gutter),var(--app-shell-measure))]\",\n className,\n )}\n />\n)\n\nconst ASIDE_WIDTH: Record<Size, string> = {\n xs: \"@xl:w-56\",\n sm: \"@xl:w-64\",\n md: \"@xl:w-72\",\n lg: \"@xl:w-80\",\n xl: \"@xl:w-96\",\n}\n\nexport type AppShellAsideProps = HTMLArkProps<\"aside\"> &\n WithTestId & {\n /** Width when visible, from the kit's Size scale. @default \"md\" */\n size?: Size\n }\n\n/**\n * The right region, below `Header` (unlike `Sidebar`, which spans the full\n * height beside it). Unlike `Sidebar`, always mounted — hidden below a\n * `@xl` *container* breakpoint (1280px of `AppShell`'s own width, via\n * Tailwind's native container queries — `AppShell`'s root carries\n * `@container`) and shown above it, purely via static classes, no\n * `useContainerQuery`/context involved. Matches fumadocs' own docs layout,\n * which keeps its table-of-contents rail always in the DOM rather than\n * conditionally unmounting it — no hydration mismatch is possible when\n * nothing renders differently based on client-only state. Fixed to `@xl`\n * rather than a configurable prop like Sidebar's `breakpoint`: Sidebar's is\n * JS-driven and can take any pixel value at runtime, but a static Tailwind\n * class can't take an arbitrary runtime breakpoint without breaking the\n * build-time class scanner.\n */\nconst AppShellAside = ({ size = \"md\", className, testId, ...rest }: AppShellAsideProps) => (\n <ark.aside\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"[grid-area:aside] hidden flex-col overflow-y-auto\",\n TEXT_COLOR_CLASSES.primary,\n \"@xl:flex\",\n ASIDE_WIDTH[size],\n className,\n )}\n />\n)\n\nexport type AppShellSidebarTriggerProps = HTMLArkProps<\"button\"> & WithTestId\n\n/**\n * Opens/closes the mobile `Drawer`. Renders nothing above `breakpoint`,\n * where the sidebar is a grid column — `SidebarCollapseTrigger` is the\n * desktop counterpart that collapses it.\n * `asChild`-able, like every other kit trigger. Carries `aria-expanded` and\n * `aria-controls` (the drawer's content), like any disclosure button.\n */\nconst AppShellSidebarTrigger = ({ onClick, testId, ...rest }: AppShellSidebarTriggerProps) => {\n const { isMobile, mobileOpen, setMobileOpen, sidebarId } = useAppShell()\n\n if (!isMobile) return null\n\n return (\n <ark.button\n type=\"button\"\n aria-expanded={mobileOpen}\n aria-controls={sidebarId}\n {...props({ \"data-testid\": testId })}\n {...rest}\n onClick={(event) => {\n onClick?.(event)\n setMobileOpen((open) => !open)\n }}\n />\n )\n}\n\nexport type AppShellSidebarCollapseTriggerProps = HTMLArkProps<\"button\"> & WithTestId\n\n/**\n * Collapses/expands the desktop sidebar — `SidebarTrigger`'s desktop\n * counterpart, and its mirror image: renders nothing below `breakpoint`,\n * where the sidebar is a drawer and there's nothing to collapse. Rendering one\n * is what opts a shell into collapsing. `asChild`-able; carries\n * `aria-expanded`, `aria-controls` and `data-collapsed`.\n *\n * Usually rendered twice: in `SidebarHeader` to collapse, and in `Header` to\n * expand again (the one in the sidebar slides away with it) — the Header one\n * often only while `useAppShell().collapsed`. Collapsing from the one inside\n * the sidebar hands focus to a collapse trigger outside it, including one\n * that only just rendered, since the collapsed sidebar is `inert` and would\n * otherwise drop focus on the floor.\n */\nconst AppShellSidebarCollapseTrigger = ({\n onClick,\n testId,\n ...rest\n}: AppShellSidebarCollapseTriggerProps) => {\n const { isMobile, collapsed, setCollapsed, sidebarId } = useAppShell()\n\n if (isMobile) return null\n\n return (\n <ark.button\n type=\"button\"\n aria-expanded={!collapsed}\n aria-controls={sidebarId}\n data-app-shell-collapse-trigger=\"\"\n {...props({ \"data-testid\": testId, \"data-collapsed\": collapsed })}\n {...rest}\n onClick={(event) => {\n onClick?.(event)\n const button = event.currentTarget\n // Commit synchronously, so a trigger that only renders while\n // collapsed (an \"expand\" button in Header) exists to take focus.\n flushSync(() => setCollapsed((value) => !value))\n // Collapsed out of sight (`collapse=\"hide\"`), the sidebar is now\n // inert and this button with it. A rail stays usable, so focus stays.\n const sidebar = document.getElementById(sidebarId)\n if (sidebar && button.closest(\"[inert]\")) {\n const outside = [\n ...(sidebar.parentElement?.querySelectorAll<HTMLElement>(\n \"[data-app-shell-collapse-trigger]\",\n ) ?? []),\n ].find((trigger) => !sidebar.contains(trigger))\n outside?.focus()\n }\n }}\n />\n )\n}\n\nexport const AppShell = Object.assign(AppShellRoot, {\n Sidebar: AppShellSidebar,\n SidebarHeader: AppShellSidebarHeader,\n SidebarBody: AppShellSidebarBody,\n SidebarFooter: AppShellSidebarFooter,\n SidebarTrigger: AppShellSidebarTrigger,\n SidebarCollapseTrigger: AppShellSidebarCollapseTrigger,\n Header: AppShellHeader,\n Main: AppShellMain,\n Full: AppShellFull,\n Content: AppShellContent,\n Aside: AppShellAside,\n})\n"]}
@@ -72,6 +72,6 @@ export type AutocompleteProps<Data extends SelectData = SelectData> = Pick<Field
72
72
  };
73
73
  /** The combobox family's wording, as `Autocomplete` uses it — see `ComboboxTranslations`. */
74
74
  export type AutocompleteTranslations = ComboboxTranslations;
75
- export declare const Autocomplete: <const Data extends SelectData = SelectData>({ data, value, defaultValue, onChange, renderItem, placeholder, clearable, clearSectionMode, startSlot, endSlot, empty, size, variant, disabled, readOnly, required, invalid, name, onBlur, ref, label, description, error, className, classNames, testId, translations, }: AutocompleteProps<Data>) => import("react").JSX.Element;
75
+ export declare const Autocomplete: <const Data extends SelectData = SelectData>({ data, value, defaultValue, onChange, renderItem, placeholder, clearable, clearSectionMode, startSlot, endSlot, empty, size, variant, disabled: disabledProp, readOnly, required, invalid, name, onBlur, ref, label, description, error, className, classNames, testId, translations, }: AutocompleteProps<Data>) => import("react").JSX.Element;
76
76
  export {};
77
77
  //# sourceMappingURL=autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAW,MAAM,OAAO,CAAA;AAI1E,O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4CAA4C;IAC5C,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iEAAiE;IACjE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACtD,2DAA2D;IAC3D,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,sBAAsB,CAAA;IACnC;;4CAEwC;IACxC,YAAY,CAAC,EAAE,wBAAwB,CAAA;CACxC,CAAA;AAEH,6FAA6F;AAC7F,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAA;AAE3D,eAAO,MAAM,YAAY,GAAI,KAAK,CAAC,IAAI,SAAS,UAAU,GAAG,UAAU,4RA4BpE,iBAAiB,CAAC,IAAI,CAAC,gCA4HzB,CAAA"}
@@ -1,19 +1,24 @@
1
1
  "use client";
2
2
  import { normalizeSelectData, useLabelSearch, filterSelectData } from '../../chunk-7TDHT3QD.js';
3
- import { resolveComboboxTranslations, Combobox } from '../../chunk-QRNQQIQM.js';
3
+ import { resolveComboboxTranslations, Combobox } from '../../chunk-WJUY6YWF.js';
4
4
  import { controlOpenProps } from '../../chunk-5FDOOG4J.js';
5
- import { inputControlClasses, inputSlot } from '../../chunk-I4B3N3UX.js';
6
- import { FieldShell } from '../../chunk-X6DESK37.js';
7
- import { popoverClearTrigger } from '../../chunk-RKCUXOU2.js';
8
- import '../../chunk-HWBFRDX7.js';
5
+ import { inputControlClasses, inputSlot } from '../../chunk-HTVICHT4.js';
6
+ import { useInheritedDisabled, useInheritedInvalid, FieldShell } from '../../chunk-2RRTT4AF.js';
7
+ import { popoverClearTrigger } from '../../chunk-YUVKROMA.js';
8
+ import '../../chunk-TPOV3OCC.js';
9
+ import '../../chunk-SI7C3W5M.js';
10
+ import '../../chunk-HBWV5EPU.js';
11
+ import '../../chunk-OBSZ4NE2.js';
9
12
  import '../../chunk-V6PY7C6S.js';
10
13
  import '../../chunk-SLUOF7XW.js';
11
- import { useUncontrolled } from '../../chunk-PMUCGFY5.js';
12
- import '../../chunk-BUIHQJGE.js';
13
14
  import { CloseIcon } from '../../chunk-6YNLRQ25.js';
14
15
  import '../../chunk-XXOR34T4.js';
16
+ import '../../chunk-PQZSTI3R.js';
17
+ import { useUncontrolled } from '../../chunk-PMUCGFY5.js';
18
+ import '../../chunk-BUIHQJGE.js';
15
19
  import '../../chunk-R5LYFTHA.js';
16
20
  import { props } from '../../chunk-WYCMIIRR.js';
21
+ import '../../chunk-C6NVU4F7.js';
17
22
  import '../../chunk-GIPQUKCN.js';
18
23
  import { cn } from '../../chunk-4ASNIDV7.js';
19
24
  import { Combobox as Combobox$1 } from '@ark-ui/react/combobox';
@@ -34,7 +39,7 @@ var Autocomplete = ({
34
39
  empty = "Nothing found",
35
40
  size = "md",
36
41
  variant = "default",
37
- disabled,
42
+ disabled: disabledProp,
38
43
  readOnly,
39
44
  required,
40
45
  invalid,
@@ -50,7 +55,8 @@ var Autocomplete = ({
50
55
  translations
51
56
  }) => {
52
57
  const resolvedTranslations = resolveComboboxTranslations(translations);
53
- const isInvalid = invalid || error != null;
58
+ const disabled = useInheritedDisabled(disabledProp);
59
+ const isInvalid = useInheritedInvalid(invalid || error != null);
54
60
  const [query, setQuery] = useUncontrolled({
55
61
  value,
56
62
  defaultValue,
@@ -1 +1 @@
1
- {"version":3,"sources":["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AA,yBACT,QAAA,CAAS,KAAA,EAAT,EAAiC,KAAA,EAAO,KAAA,CAAM,KAAA,EAC5C,gBAAM,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA,EAAA,EADV,KAAA,CAAM,KAE3B,CACD,CAAA,GACD,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA;AAAA,UACzB,SAAS,IAAA,oBAAQ,GAAA,CAAC,QAAA,CAAS,KAAA,EAAT,EAAgB,QAAA,EAAA,KAAA,EAAM;AAAA,SAAA,EAC3C;AAAA;AAAA;AAAA,GACF;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MAEtB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { Combobox as ArkCombobox } from \"@ark-ui/react/combobox\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport { props } from \"../../lib/props\"\nimport {\n type ClearSectionMode,\n filterSelectData,\n type ItemRenderState,\n type NormalizedItem,\n type NormalizedItemOf,\n normalizeSelectData,\n type SelectData,\n type SelectPayload,\n useLabelSearch,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport {\n Combobox,\n type ComboboxTranslations,\n resolveComboboxTranslations,\n} from \"../combobox/combobox\"\nimport { type FieldProps, FieldShell } from \"../field/field\"\nimport { type InputSize, type InputVariant, inputControlClasses, inputSlot } from \"../input/input\"\nimport { CloseIcon } from \"../popover/icons\"\nimport { popoverClearTrigger } from \"../popover/popover\"\n\n/**\n * Autocomplete — free-text input with a suggestion popover, on the `Combobox`\n * engine. Unlike `Select`, the **value is the typed string** (`allowCustomValue`):\n * `data` are only suggestions, and the user can type anything or pick one.\n *\n * - `data` accepts the same shapes as `Select` (strings / objects / groups).\n * - Suggestions filter as you type. Once the query exactly\n * matches a suggestion (e.g. right after picking one) the full list shows\n * again rather than collapsing to that single match.\n * - Label / description / error come from the built-in `Field` wrapper.\n */\n\ntype AutocompleteClassNames = {\n field?: string\n control?: string\n input?: string\n option?: string\n popover?: string\n}\n\nexport type AutocompleteProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Suggestions: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled input text (this is the value). */\n value?: string\n /** Uncontrolled initial text. */\n defaultValue?: string\n /** Fires with the input text on every change (typing or picking a suggestion). */\n onChange?: (value: string) => void\n /**\n * Render each suggestion yourself. Receives the item — including its typed\n * `payload` — and its live `{ selected, highlighted }` state; you own the whole\n * row, including any check affordance. Omit it to render the label + selected\n * check.\n */\n renderItem?: (item: NormalizedItem<SelectPayload<Data>>, state: ItemRenderState) => ReactNode\n /** Placeholder shown while the field is empty — this same field also filters the\n * suggestion list, so there's no separate search placeholder. */\n placeholder?: string\n /** Show a clear button once there's text. */\n clearable?: boolean\n /** Whether the clear button replaces the chevron (`\"replace\"`, default) or sits beside it (`\"both\"`). */\n clearSectionMode?: ClearSectionMode\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before the clear button / chevron. */\n endSlot?: ReactNode\n /** Message shown when no suggestion matches. Pass `null` to render nothing. */\n empty?: ReactNode\n size?: InputSize\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for the underlying input (form submission). */\n name?: string\n /** Forwarded to the input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: AutocompleteClassNames\n /** Overrides the clear button's (`clearTriggerLabel`, default `\"Clear value\"`) and the\n * chevron's (`triggerLabel`, default `\"Show options\"`) accessible names. A partial\n * override keeps the other default. */\n translations?: AutocompleteTranslations\n }\n\n/** The combobox family's wording, as `Autocomplete` uses it — see `ComboboxTranslations`. */\nexport type AutocompleteTranslations = ComboboxTranslations\n\nexport const Autocomplete = <const Data extends SelectData = SelectData>({\n data,\n value,\n defaultValue,\n onChange,\n renderItem,\n placeholder,\n clearable,\n clearSectionMode = \"replace\",\n startSlot,\n endSlot,\n empty = \"Nothing found\",\n size = \"md\",\n variant = \"default\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n}: AutocompleteProps<Data>) => {\n const resolvedTranslations = resolveComboboxTranslations(translations)\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n const [query, setQuery] = useUncontrolled({\n value,\n defaultValue,\n onChange,\n finalValue: \"\",\n })\n\n // Clear shows once there's text; in \"replace\" mode it hides the chevron.\n const showClear = Boolean(clearable && query)\n\n // Normalize once per `data`; only the filter re-runs as the query changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const search = useLabelSearch()\n const { collection, items, groups } = useMemo(() => {\n // Once the query exactly matches an option (e.g. right after\n // picking one) show the full list again rather than just that match.\n const exact = normalized.items.some((i) => search.equals(i.label, query))\n return filterSelectData(normalized, (item) => exact || search.matches(item.label, query))\n }, [normalized, query, search])\n\n const renderOption = (item: NormalizedItemOf<Data>) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={classNames?.option}\n >\n {renderItem ? (state) => renderItem(item, state) : item.label}\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root\n collection={collection}\n inputValue={query}\n onInputValueChange={(details) => setQuery(details.inputValue)}\n allowCustomValue\n openOnClick\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n variant={variant}\n className={className}\n translations={resolvedTranslations}\n >\n <Combobox.Context>\n {(api) => (\n <Combobox.Control\n className={classNames?.control}\n startSlot={startSlot}\n {...props({ \"data-invalid\": isInvalid })}\n // Tablet affordance: a tap on the field's dead zones (start/end slots,\n // padding) opens the suggestions and focuses the input. The input,\n // clear ✕ and chevron keep their own taps. Inert when disabled/readOnly.\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n >\n {/* Ark's own Input (a forwardRef) so the caller's `ref` lands on the\n real focusable `<input>` for RHF focus-on-error; the kit's\n `Combobox.Input` wrapper only adds `inputControlClasses`, replicated\n here. `onBlur` / `aria-invalid` pass straight through. */}\n <ArkCombobox.Input\n placeholder={placeholder}\n name={name}\n onBlur={onBlur}\n ref={ref}\n {...props({ \"aria-invalid\": isInvalid, \"data-testid\": testId })}\n className={cn(inputControlClasses, classNames?.input)}\n />\n {endSlot != null && <span className={inputSlot}>{endSlot}</span>}\n {/* The value here is the typed text, not a machine selection, so Ark's\n `value`-gated ClearTrigger stays hidden — clear the input directly\n instead. A real (tabbable) button; `preventDefault` keeps focus on\n the input through the tap. */}\n {showClear && (\n <button\n type=\"button\"\n aria-label={resolvedTranslations.clearTriggerLabel}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => setQuery(\"\")}\n className={popoverClearTrigger}\n >\n <CloseIcon />\n </button>\n )}\n {(clearSectionMode === \"both\" || !showClear) && <Combobox.Trigger data-chevron />}\n </Combobox.Control>\n )}\n </Combobox.Context>\n\n <Combobox.Content className={classNames?.popover}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Content>\n </Combobox.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":["ArkCombobox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+GO,IAAM,eAAe,CAA6C;AAAA,EACvE,IAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA,GAAmB,SAAA;AAAA,EACnB,SAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA,GAAQ,eAAA;AAAA,EACR,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,SAAA;AAAA,EACV,QAAA,EAAU,YAAA;AAAA,EACV,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAA+B;AAC7B,EAAA,MAAM,oBAAA,GAAuB,4BAA4B,YAAY,CAAA;AAGrE,EAAA,MAAM,QAAA,GAAW,qBAAqB,YAAY,CAAA;AAGlD,EAAA,MAAM,SAAA,GAAY,mBAAA,CAAoB,OAAA,IAAW,KAAA,IAAS,IAAI,CAAA;AAE9D,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,eAAA,CAAgB;AAAA,IACxC,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA,EAAY;AAAA,GACb,CAAA;AAGD,EAAA,MAAM,SAAA,GAAY,OAAA,CAAQ,SAAA,IAAa,KAAK,CAAA;AAG5C,EAAA,MAAM,UAAA,GAAa,QAAQ,MAAM,mBAAA,CAAoB,IAAI,CAAA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iB,cAAA,EAAY,IAAA,EAAC;AAAA;AAAA;AAAA,SACjF,EAEJ,CAAA;AAAA,6BAEC,QAAA,CAAS,OAAA,EAAT,EAAiB,SAAA,EAAW,YAAY,OAAA,EACtC,QAAA,EAAA;AAAA,UAAA,MAAA,GACG,MAAA,CAAO,IAAI,CAAC,KAAA,yBACT,QAAA,CAAS,KAAA,EAAT,EAAiC,KAAA,EAAO,KAAA,CAAM,KAAA,EAC5C,gBAAM,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA,EAAA,EADV,KAAA,CAAM,KAE3B,CACD,CAAA,GACD,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA;AAAA,UACzB,SAAS,IAAA,oBAAQ,GAAA,CAAC,QAAA,CAAS,KAAA,EAAT,EAAgB,QAAA,EAAA,KAAA,EAAM;AAAA,SAAA,EAC3C;AAAA;AAAA;AAAA,GACF;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MAEtB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { Combobox as ArkCombobox } from \"@ark-ui/react/combobox\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport { props } from \"../../lib/props\"\nimport {\n type ClearSectionMode,\n filterSelectData,\n type ItemRenderState,\n type NormalizedItem,\n type NormalizedItemOf,\n normalizeSelectData,\n type SelectData,\n type SelectPayload,\n useLabelSearch,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport {\n Combobox,\n type ComboboxTranslations,\n resolveComboboxTranslations,\n} from \"../combobox/combobox\"\nimport {\n type FieldProps,\n FieldShell,\n useInheritedDisabled,\n useInheritedInvalid,\n} from \"../field/field\"\nimport { type InputSize, type InputVariant, inputControlClasses, inputSlot } from \"../input/input\"\nimport { CloseIcon } from \"../popover/icons\"\nimport { popoverClearTrigger } from \"../popover/popover\"\n\n/**\n * Autocomplete — free-text input with a suggestion popover, on the `Combobox`\n * engine. Unlike `Select`, the **value is the typed string** (`allowCustomValue`):\n * `data` are only suggestions, and the user can type anything or pick one.\n *\n * - `data` accepts the same shapes as `Select` (strings / objects / groups).\n * - Suggestions filter as you type. Once the query exactly\n * matches a suggestion (e.g. right after picking one) the full list shows\n * again rather than collapsing to that single match.\n * - Label / description / error come from the built-in `Field` wrapper.\n */\n\ntype AutocompleteClassNames = {\n field?: string\n control?: string\n input?: string\n option?: string\n popover?: string\n}\n\nexport type AutocompleteProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Suggestions: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled input text (this is the value). */\n value?: string\n /** Uncontrolled initial text. */\n defaultValue?: string\n /** Fires with the input text on every change (typing or picking a suggestion). */\n onChange?: (value: string) => void\n /**\n * Render each suggestion yourself. Receives the item — including its typed\n * `payload` — and its live `{ selected, highlighted }` state; you own the whole\n * row, including any check affordance. Omit it to render the label + selected\n * check.\n */\n renderItem?: (item: NormalizedItem<SelectPayload<Data>>, state: ItemRenderState) => ReactNode\n /** Placeholder shown while the field is empty — this same field also filters the\n * suggestion list, so there's no separate search placeholder. */\n placeholder?: string\n /** Show a clear button once there's text. */\n clearable?: boolean\n /** Whether the clear button replaces the chevron (`\"replace\"`, default) or sits beside it (`\"both\"`). */\n clearSectionMode?: ClearSectionMode\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before the clear button / chevron. */\n endSlot?: ReactNode\n /** Message shown when no suggestion matches. Pass `null` to render nothing. */\n empty?: ReactNode\n size?: InputSize\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for the underlying input (form submission). */\n name?: string\n /** Forwarded to the input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: AutocompleteClassNames\n /** Overrides the clear button's (`clearTriggerLabel`, default `\"Clear value\"`) and the\n * chevron's (`triggerLabel`, default `\"Show options\"`) accessible names. A partial\n * override keeps the other default. */\n translations?: AutocompleteTranslations\n }\n\n/** The combobox family's wording, as `Autocomplete` uses it — see `ComboboxTranslations`. */\nexport type AutocompleteTranslations = ComboboxTranslations\n\nexport const Autocomplete = <const Data extends SelectData = SelectData>({\n data,\n value,\n defaultValue,\n onChange,\n renderItem,\n placeholder,\n clearable,\n clearSectionMode = \"replace\",\n startSlot,\n endSlot,\n empty = \"Nothing found\",\n size = \"md\",\n variant = \"default\",\n disabled: disabledProp,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n}: AutocompleteProps<Data>) => {\n const resolvedTranslations = resolveComboboxTranslations(translations)\n // With no `label` there is no `Field` to pass a `Fieldset`'s state on, so\n // read it here: the shell, the pills and the clear button all key off it.\n const disabled = useInheritedDisabled(disabledProp)\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = useInheritedInvalid(invalid || error != null)\n\n const [query, setQuery] = useUncontrolled({\n value,\n defaultValue,\n onChange,\n finalValue: \"\",\n })\n\n // Clear shows once there's text; in \"replace\" mode it hides the chevron.\n const showClear = Boolean(clearable && query)\n\n // Normalize once per `data`; only the filter re-runs as the query changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const search = useLabelSearch()\n const { collection, items, groups } = useMemo(() => {\n // Once the query exactly matches an option (e.g. right after\n // picking one) show the full list again rather than just that match.\n const exact = normalized.items.some((i) => search.equals(i.label, query))\n return filterSelectData(normalized, (item) => exact || search.matches(item.label, query))\n }, [normalized, query, search])\n\n const renderOption = (item: NormalizedItemOf<Data>) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={classNames?.option}\n >\n {renderItem ? (state) => renderItem(item, state) : item.label}\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root\n collection={collection}\n inputValue={query}\n onInputValueChange={(details) => setQuery(details.inputValue)}\n allowCustomValue\n openOnClick\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n variant={variant}\n className={className}\n translations={resolvedTranslations}\n >\n <Combobox.Context>\n {(api) => (\n <Combobox.Control\n className={classNames?.control}\n startSlot={startSlot}\n {...props({ \"data-invalid\": isInvalid })}\n // Tablet affordance: a tap on the field's dead zones (start/end slots,\n // padding) opens the suggestions and focuses the input. The input,\n // clear ✕ and chevron keep their own taps. Inert when disabled/readOnly.\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n >\n {/* Ark's own Input (a forwardRef) so the caller's `ref` lands on the\n real focusable `<input>` for RHF focus-on-error; the kit's\n `Combobox.Input` wrapper only adds `inputControlClasses`, replicated\n here. `onBlur` / `aria-invalid` pass straight through. */}\n <ArkCombobox.Input\n placeholder={placeholder}\n name={name}\n onBlur={onBlur}\n ref={ref}\n {...props({ \"aria-invalid\": isInvalid, \"data-testid\": testId })}\n className={cn(inputControlClasses, classNames?.input)}\n />\n {endSlot != null && <span className={inputSlot}>{endSlot}</span>}\n {/* The value here is the typed text, not a machine selection, so Ark's\n `value`-gated ClearTrigger stays hidden — clear the input directly\n instead. A real (tabbable) button; `preventDefault` keeps focus on\n the input through the tap. */}\n {showClear && (\n <button\n type=\"button\"\n aria-label={resolvedTranslations.clearTriggerLabel}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => setQuery(\"\")}\n className={popoverClearTrigger}\n >\n <CloseIcon />\n </button>\n )}\n {(clearSectionMode === \"both\" || !showClear) && <Combobox.Trigger data-chevron />}\n </Combobox.Control>\n )}\n </Combobox.Context>\n\n <Combobox.Content className={classNames?.popover}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Content>\n </Combobox.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { graphemes } from '../../chunk-DHM4IG2O.js';
3
3
  import { useLocale } from '../../chunk-OBSZ4NE2.js';
4
- import '../../chunk-PQZSTI3R.js';
5
4
  import { mergeIcons, iconStroke } from '../../chunk-XXOR34T4.js';
5
+ import '../../chunk-PQZSTI3R.js';
6
6
  import { props } from '../../chunk-WYCMIIRR.js';
7
7
  import { cn } from '../../chunk-4ASNIDV7.js';
8
8
  import { Avatar as Avatar$1, ark } from '@ark-ui/react';
@@ -2,6 +2,7 @@ import { type HTMLArkProps } from "@ark-ui/react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  import type { ReactNode } from "react";
4
4
  import type { Color } from "../../lib/colors";
5
+ import { type ForbidHref, type PressedProps } from "../../lib/pressed";
5
6
  import type { WithTestId } from "../../lib/test-id";
6
7
  /**
7
8
  * Button — interactive but stateless primitive.
@@ -61,6 +62,18 @@ import type { WithTestId } from "../../lib/test-id";
61
62
  * element, which `disabled` doesn't affect. `cursor-progress` and the hover
62
63
  * suppression are keyed off `data-loading` rather than `:disabled`, which
63
64
  * never matches a non-form element like an `<a>`.
65
+ *
66
+ * `pressed` / `defaultPressed` / `onPressedChange` make it a toggle button
67
+ * (`lib/pressed.ts`): `aria-pressed`, a click that flips the state, and the
68
+ * look swapping from `variant` to `pressedVariant` — `ButtonSelect`'s
69
+ * `variant` / `selectedVariant` swap, with the same `light` / `filled`
70
+ * defaults. Nothing else changes, so a pressed button keeps every other
71
+ * behaviour: `loading` and `disabled` still block the click (and so the
72
+ * flip) and keep the pressed look, and under `asChild` the attribute, the
73
+ * click and the classes all land on the child. A link child is the one
74
+ * exception: `aria-pressed` means nothing on a link, so the pressed props are
75
+ * ignored there with a dev warning, and `href` is typed out of Button
76
+ * altogether (`ForbidHref`).
64
77
  */
65
78
  declare const buttonVariants: (props?: ({
66
79
  variant?: "filled" | "light" | "link" | "outline" | "subtle" | null | undefined;
@@ -68,7 +81,7 @@ declare const buttonVariants: (props?: ({
68
81
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
69
82
  export type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>["variant"]>;
70
83
  export type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>["size"]>;
71
- export type ButtonProps = Omit<HTMLArkProps<"button">, "color"> & VariantProps<typeof buttonVariants> & WithTestId & {
84
+ export type ButtonProps = Omit<HTMLArkProps<"button">, "color"> & VariantProps<typeof buttonVariants> & PressedProps<ButtonVariant> & ForbidHref & WithTestId & {
72
85
  /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */
73
86
  color?: Color;
74
87
  /**
@@ -90,6 +103,6 @@ export type ButtonProps = Omit<HTMLArkProps<"button">, "color"> & VariantProps<t
90
103
  */
91
104
  endSlot?: ReactNode;
92
105
  };
93
- export declare const Button: ({ className, variant, size, color, loading: loadingProp, startSlot, endSlot, children, disabled, type, asChild, testId, onClick, ...rest }: ButtonProps) => import("react").JSX.Element;
106
+ export declare const Button: ({ className, variant, size, color, loading: loadingProp, startSlot, endSlot, children, disabled, type, asChild, testId, onClick, pressed: pressedProp, defaultPressed, onPressedChange, pressedVariant, ...rest }: ButtonProps) => import("react").JSX.Element;
94
107
  export {};
95
108
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAIlD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,QAAA,MAAM,cAAc;;;8EAqCnB,CAAA;AAyBD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AACvF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAEjF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,GAC7D,YAAY,CAAC,OAAO,cAAc,CAAC,GACnC,UAAU,GAAG;IACX,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AA+EH,eAAO,MAAM,MAAM,+IAehB,WAAW,gCAqDb,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,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import '../../chunk-NDI4HLQE.js';
4
5
  import '../../chunk-6B2GNPJP.js';
5
6
  import '../../chunk-W3XX7BYT.js';
7
+ import '../../chunk-PQZSTI3R.js';
8
+ import '../../chunk-PMUCGFY5.js';
9
+ import '../../chunk-BUIHQJGE.js';
6
10
  import '../../chunk-R5LYFTHA.js';
7
11
  import '../../chunk-WYCMIIRR.js';
8
12
  import '../../chunk-C6NVU4F7.js';
@@ -1,12 +1,14 @@
1
1
  "use client";
2
- import { Context, Item, MultiRoot, ButtonSelectControl } from '../../chunk-G3AD3NJG.js';
2
+ import { Context, Item, MultiRoot, ButtonSelectControl } from '../../chunk-RNTDM3RP.js';
3
3
  import '../../chunk-PBSVX5DB.js';
4
- import '../../chunk-X6DESK37.js';
5
- import '../../chunk-SP6LCCTZ.js';
4
+ import '../../chunk-KZDMVOL6.js';
5
+ import '../../chunk-2RRTT4AF.js';
6
+ import '../../chunk-NDI4HLQE.js';
6
7
  import '../../chunk-6B2GNPJP.js';
8
+ import '../../chunk-W3XX7BYT.js';
9
+ import '../../chunk-PQZSTI3R.js';
7
10
  import { useUncontrolled } from '../../chunk-PMUCGFY5.js';
8
11
  import '../../chunk-BUIHQJGE.js';
9
- import '../../chunk-W3XX7BYT.js';
10
12
  import '../../chunk-R5LYFTHA.js';
11
13
  import '../../chunk-WYCMIIRR.js';
12
14
  import '../../chunk-C6NVU4F7.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/button-multi-select/button-multi-select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmCA,IAAM,6BAA6B,CAAyD;AAAA,EAC1F,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAoC;AAClC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,eAAA,CAAwD;AAAA,IACtF,KAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAY,EAAC;AAAA,IACb,UAAU,CAAC,IAAA,KAAS,WAAW,CAAC,GAAG,IAAI,CAAC;AAAA,GACzC,CAAA;AAED,EAAA,uBACE,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,QAAA,EAAQ,IAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MAGP,aAAA,EAAe,CAAC,IAAA,KAAS,WAAA,CAAY,IAAiC,CAAA;AAAA,MACtE,UAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;AAWO,IAAM,iBAAA,GAAoB,MAAA,CAAO,MAAA,CAAO,0BAAA,EAA4B;AAAA,EACzE,IAAA,EAAM,SAAA;AAAA,EACN,IAAA;AAAA,EACA;AACF,CAAC","file":"index.js","sourcesContent":["\"use client\"\n\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Context, Item, MultiRoot } from \"../button-select/button-select\"\nimport {\n type ButtonSelectBaseProps,\n ButtonSelectControl,\n} from \"../button-select/button-select-control\"\nimport type {\n ButtonSelectData,\n ButtonSelectValue,\n RenderButtonSelectItem,\n} from \"../button-select/button-select-items\"\n\n/**\n * ButtonMultiSelect — `ButtonSelect`'s multiple-choice twin: a row of joined\n * `Button`s where each item toggles independently. The selected items take\n * `selectedVariant` (default `filled`), the rest `variant` (default `light`).\n * Text formatting toggles, weekday pickers, filter rows.\n *\n * - Same `data` items as `ButtonSelect`; `value` is an array of the data's\n * literal values, in selection order.\n * - The group is a `role=\"group\"` of toggle buttons carrying `aria-pressed`.\n * - `name` submits one hidden input per selected value.\n */\nexport type ButtonMultiSelectProps<Data extends ButtonSelectData = ButtonSelectData> =\n ButtonSelectBaseProps<Data> & {\n /** Controlled value. */\n value?: ReadonlyArray<ButtonSelectValue<Data>>\n /** Uncontrolled initial value. */\n defaultValue?: ReadonlyArray<ButtonSelectValue<Data>>\n /** Fires with every selected value. */\n onChange?: (value: ButtonSelectValue<Data>[]) => void\n }\n\nconst ButtonMultiSelectComponent = <const Data extends ButtonSelectData = ButtonSelectData>({\n value,\n defaultValue,\n onChange,\n renderItem,\n ...rest\n}: ButtonMultiSelectProps<Data>) => {\n const [selected, setSelected] = useUncontrolled<ReadonlyArray<ButtonSelectValue<Data>>>({\n value,\n defaultValue,\n finalValue: [],\n onChange: (next) => onChange?.([...next]),\n })\n\n return (\n <ButtonSelectControl\n multiple\n value={selected}\n // The machine's values are `string`s that always originate from `data`,\n // so they narrow back to the caller's union.\n onValueChange={(next) => setSelected(next as ButtonSelectValue<Data>[])}\n renderItem={renderItem as RenderButtonSelectItem<ButtonSelectData> | undefined}\n {...rest}\n />\n )\n}\n\n/**\n * The public `ButtonMultiSelect` — the data-driven form, with the composable\n * parts attached:\n *\n * <ButtonMultiSelect.Root aria-label=\"Formatting\" defaultValue={[\"bold\"]}>\n * <ButtonMultiSelect.Item value=\"bold\" aria-label=\"Bold\"><BoldIcon /></ButtonMultiSelect.Item>\n * <ButtonMultiSelect.Item value=\"italic\" aria-label=\"Italic\"><ItalicIcon /></ButtonMultiSelect.Item>\n * </ButtonMultiSelect.Root>\n */\nexport const ButtonMultiSelect = Object.assign(ButtonMultiSelectComponent, {\n Root: MultiRoot,\n Item,\n Context,\n})\n"]}
1
+ {"version":3,"sources":["../../../src/components/button-multi-select/button-multi-select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmCA,IAAM,6BAA6B,CAAyD;AAAA,EAC1F,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAoC;AAClC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,eAAA,CAAwD;AAAA,IACtF,KAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAY,EAAC;AAAA,IACb,UAAU,CAAC,IAAA,KAAS,WAAW,CAAC,GAAG,IAAI,CAAC;AAAA,GACzC,CAAA;AAED,EAAA,uBACE,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,QAAA,EAAQ,IAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MAGP,aAAA,EAAe,CAAC,IAAA,KAAS,WAAA,CAAY,IAAiC,CAAA;AAAA,MACtE,UAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAA;AAWO,IAAM,iBAAA,GAAoB,MAAA,CAAO,MAAA,CAAO,0BAAA,EAA4B;AAAA,EACzE,IAAA,EAAM,SAAA;AAAA,EACN,IAAA;AAAA,EACA;AACF,CAAC","file":"index.js","sourcesContent":["\"use client\"\n\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Context, Item, MultiRoot } from \"../button-select/button-select\"\nimport {\n type ButtonSelectBaseProps,\n ButtonSelectControl,\n} from \"../button-select/button-select-control\"\nimport type {\n ButtonSelectData,\n ButtonSelectValue,\n RenderButtonSelectItem,\n} from \"../button-select/button-select-items\"\n\n/**\n * ButtonMultiSelect — `ButtonSelect`'s multiple-choice twin: a row of joined\n * `Button`s where each item toggles independently. The selected items take\n * `selectedVariant` (default `filled`), the rest `variant` (default `light`).\n * Text formatting toggles, weekday pickers, filter rows.\n *\n * - Same `data` items as `ButtonSelect`; `value` is an array of the data's\n * literal values, in selection order.\n * - The group is a `role=\"group\"` of toggle buttons carrying `aria-pressed`.\n * - `name` submits one hidden input per selected value.\n */\nexport type ButtonMultiSelectProps<Data extends ButtonSelectData = ButtonSelectData> =\n ButtonSelectBaseProps<Data> & {\n /** Controlled value. */\n value?: ReadonlyArray<ButtonSelectValue<Data>>\n /** Uncontrolled initial value. */\n defaultValue?: ReadonlyArray<ButtonSelectValue<Data>>\n /** Fires with every selected value. */\n onChange?: (value: ButtonSelectValue<Data>[]) => void\n }\n\nconst ButtonMultiSelectComponent = <const Data extends ButtonSelectData = ButtonSelectData>({\n value,\n defaultValue,\n onChange,\n renderItem,\n ...rest\n}: ButtonMultiSelectProps<Data>) => {\n const [selected, setSelected] = useUncontrolled<ReadonlyArray<ButtonSelectValue<Data>>>({\n value,\n defaultValue,\n finalValue: [],\n onChange: (next) => onChange?.([...next]),\n })\n\n return (\n <ButtonSelectControl\n multiple\n value={selected}\n // The machine's values are `string`s that always originate from `data`,\n // so they narrow back to the caller's union.\n onValueChange={(next) => setSelected(next as ButtonSelectValue<Data>[])}\n renderItem={renderItem as RenderButtonSelectItem<ButtonSelectData> | undefined}\n {...rest}\n />\n )\n}\n\n/**\n * The public `ButtonMultiSelect` — the data-driven form, with the composable\n * parts attached:\n *\n * <ButtonMultiSelect.Root aria-label=\"Formatting\" defaultValue={[\"bold\"]}>\n * <ButtonMultiSelect.Item value=\"bold\" aria-label=\"Bold\"><BoldIcon /></ButtonMultiSelect.Item>\n * <ButtonMultiSelect.Item value=\"italic\" aria-label=\"Italic\"><ItalicIcon /></ButtonMultiSelect.Item>\n * </ButtonMultiSelect.Root>\n */\nexport const ButtonMultiSelect = Object.assign(ButtonMultiSelectComponent, {\n Root: MultiRoot,\n Item,\n Context,\n})\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"button-select-control.d.ts","sourceRoot":"","sources":["../../../src/components/button-select/button-select-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,gBAAgB,CAAA;AAE5D,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAA;AAE9B,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;8BAC0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAA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,MAAM,EAAE,CAAA;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACzC,gCA4DA,CAAA"}
1
+ {"version":3,"file":"button-select-control.d.ts","sourceRoot":"","sources":["../../../src/components/button-select/button-select-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,KAAK,UAAU,EAAmC,MAAM,gBAAgB,CAAA;AAEjF,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAA;AAE9B,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;8BAC0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,8EAA8E;AAC9E,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,gBAAgB,IAAI,IAAI,CACrE,UAAU,EACV,OAAO,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,CAC/C,GACC,UAAU,GAAG;IACX,qFAAqF;IACrF,IAAI,EAAE,IAAI,CAAA;IACV,qEAAqE;IACrE,UAAU,CAAC,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAA;IACzC,oDAAoD;IACpD,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;oDACgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,aAAa,CAAA;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;IACzB,gEAAgE;IAChE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,sBAAsB,CAAA;CACpC,CAAA;AAEH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,gPA0B7B,qBAAqB,CAAC,gBAAgB,CAAC,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACzC,gCA4DA,CAAA"}
@@ -22,7 +22,7 @@ type BaseRootProps = Omit<Ark.RootProps, "color" | "multiple" | "value" | "defau
22
22
  children?: ReactNode;
23
23
  };
24
24
  /** The shared root behind both `ButtonSelect.Root` and `ButtonMultiSelect.Root`. */
25
- export declare const RootBase: ({ multiple, value, defaultValue, onValueChange, deselectable, orientation, color, variant, selectedVariant, size, invalid, grow, loopFocus, className, testId, children, ...rest }: BaseRootProps & {
25
+ export declare const RootBase: ({ multiple, value, defaultValue, onValueChange, deselectable, orientation, color, variant, selectedVariant, size, invalid, disabled, grow, loopFocus, className, testId, children, ...rest }: BaseRootProps & {
26
26
  multiple: boolean;
27
27
  value?: string[];
28
28
  defaultValue?: string[];
@@ -57,7 +57,7 @@ type SelectableControlProps = {
57
57
  variant?: ButtonVariant;
58
58
  size?: ButtonSize;
59
59
  };
60
- export type ButtonSelectItemProps = (Omit<ButtonProps, "value" | "variant" | "size" | "loading" | "asChild"> & {
60
+ export type ButtonSelectItemProps = (Omit<ButtonProps, "value" | "variant" | "size" | "loading" | "asChild" | "pressed" | "defaultPressed" | "onPressedChange" | "pressedVariant"> & {
61
61
  /** The value this item selects. */
62
62
  value: string;
63
63
  asChild?: false;