@womp/kookie-ui 0.29.2 → 0.31.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 (307) hide show
  1. package/components.css +127 -0
  2. package/dist/cjs/components/_internal/navigator-host.d.ts +21 -0
  3. package/dist/cjs/components/_internal/navigator-host.d.ts.map +1 -0
  4. package/dist/cjs/components/_internal/navigator-host.js +3 -0
  5. package/dist/cjs/components/_internal/navigator-host.js.map +7 -0
  6. package/dist/cjs/components/_internal/page-scope.d.ts +48 -0
  7. package/dist/cjs/components/_internal/page-scope.d.ts.map +1 -0
  8. package/dist/cjs/components/_internal/page-scope.js +3 -0
  9. package/dist/cjs/components/_internal/page-scope.js.map +7 -0
  10. package/dist/cjs/components/_internal/portal-theme.d.ts +2 -1
  11. package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -1
  12. package/dist/cjs/components/_internal/portal-theme.js +1 -1
  13. package/dist/cjs/components/_internal/portal-theme.js.map +4 -4
  14. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  15. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  16. package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
  17. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  18. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  19. package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
  20. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  21. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  22. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  23. package/dist/cjs/components/alert-dialog.js +1 -1
  24. package/dist/cjs/components/alert-dialog.js.map +4 -4
  25. package/dist/cjs/components/button.js +1 -1
  26. package/dist/cjs/components/button.js.map +4 -4
  27. package/dist/cjs/components/chatbar.js +1 -1
  28. package/dist/cjs/components/chatbar.js.map +4 -4
  29. package/dist/cjs/components/chip.js +1 -1
  30. package/dist/cjs/components/chip.js.map +4 -4
  31. package/dist/cjs/components/combobox.js +1 -1
  32. package/dist/cjs/components/combobox.js.map +4 -4
  33. package/dist/cjs/components/context-menu.js +1 -1
  34. package/dist/cjs/components/context-menu.js.map +4 -4
  35. package/dist/cjs/components/dialog.d.ts.map +1 -1
  36. package/dist/cjs/components/dialog.js +1 -1
  37. package/dist/cjs/components/dialog.js.map +4 -4
  38. package/dist/cjs/components/dropdown-menu.js +1 -1
  39. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  40. package/dist/cjs/components/index.d.ts +2 -0
  41. package/dist/cjs/components/index.d.ts.map +1 -1
  42. package/dist/cjs/components/index.js +2 -2
  43. package/dist/cjs/components/index.js.map +4 -4
  44. package/dist/cjs/components/message-scroller.js +1 -1
  45. package/dist/cjs/components/message-scroller.js.map +4 -4
  46. package/dist/cjs/components/navigator.d.ts +103 -0
  47. package/dist/cjs/components/navigator.d.ts.map +1 -0
  48. package/dist/cjs/components/navigator.js +3 -0
  49. package/dist/cjs/components/navigator.js.map +7 -0
  50. package/dist/cjs/components/notice.js +1 -1
  51. package/dist/cjs/components/notice.js.map +4 -4
  52. package/dist/cjs/components/page.d.ts +31 -0
  53. package/dist/cjs/components/page.d.ts.map +1 -0
  54. package/dist/cjs/components/page.js +3 -0
  55. package/dist/cjs/components/page.js.map +7 -0
  56. package/dist/cjs/components/popover.d.ts.map +1 -1
  57. package/dist/cjs/components/popover.js +1 -1
  58. package/dist/cjs/components/popover.js.map +4 -4
  59. package/dist/cjs/components/select.js +1 -1
  60. package/dist/cjs/components/select.js.map +4 -4
  61. package/dist/cjs/components/sheet.d.ts.map +1 -1
  62. package/dist/cjs/components/sheet.js +1 -1
  63. package/dist/cjs/components/sheet.js.map +4 -4
  64. package/dist/cjs/components/shell.d.ts.map +1 -1
  65. package/dist/cjs/components/shell.js +1 -1
  66. package/dist/cjs/components/shell.js.map +4 -4
  67. package/dist/cjs/components/sidebar.js +1 -1
  68. package/dist/cjs/components/sidebar.js.map +4 -4
  69. package/dist/cjs/components/toggle.js +1 -1
  70. package/dist/cjs/components/toggle.js.map +4 -4
  71. package/dist/cjs/components/toolbar.d.ts +5 -1
  72. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  73. package/dist/cjs/components/toolbar.js +1 -1
  74. package/dist/cjs/components/toolbar.js.map +4 -4
  75. package/dist/cjs/components/tooltip.js +1 -1
  76. package/dist/cjs/components/tooltip.js.map +4 -4
  77. package/dist/cjs/index.js +5 -5
  78. package/dist/cjs/index.js.map +4 -4
  79. package/dist/esm/{chunk-HBO7W7SS.js → chunk-26O4RBOJ.js} +2 -2
  80. package/dist/esm/{chunk-FYTLUDL3.js → chunk-3M5ZM67R.js} +2 -2
  81. package/dist/esm/chunk-4B3S2DM7.js +3 -0
  82. package/dist/esm/chunk-4B3S2DM7.js.map +7 -0
  83. package/dist/esm/chunk-4KBKS3ZE.js +3 -0
  84. package/dist/esm/chunk-4KBKS3ZE.js.map +7 -0
  85. package/dist/esm/{chunk-2FYUM6TA.js → chunk-4ZHBNYXM.js} +2 -2
  86. package/dist/esm/{chunk-TSS4K2U5.js → chunk-5VYQDA5S.js} +2 -2
  87. package/dist/esm/chunk-65URNXF2.js +3 -0
  88. package/dist/esm/chunk-65URNXF2.js.map +7 -0
  89. package/dist/esm/chunk-6SGJWML7.js +3 -0
  90. package/dist/esm/chunk-6SGJWML7.js.map +7 -0
  91. package/dist/esm/{chunk-WAXRIARV.js → chunk-6WHKGVWY.js} +2 -2
  92. package/dist/esm/{chunk-7V6M3MIR.js → chunk-7YXHLU4C.js} +2 -2
  93. package/dist/esm/chunk-AKMRPGNP.js +3 -0
  94. package/dist/esm/chunk-AKMRPGNP.js.map +7 -0
  95. package/dist/esm/{chunk-ENQV6SEA.js → chunk-AKSAKP35.js} +2 -2
  96. package/dist/esm/{chunk-C67MM24U.js → chunk-B7STVZPU.js} +2 -2
  97. package/dist/esm/{chunk-2E57H3NH.js → chunk-BQOFHLDP.js} +2 -2
  98. package/dist/esm/{chunk-324VC67W.js → chunk-COLJWVN7.js} +2 -2
  99. package/dist/esm/{chunk-K3GDM26A.js → chunk-D42VCLKH.js} +2 -2
  100. package/dist/esm/{chunk-MGWGD6KI.js → chunk-DFQIIYLD.js} +2 -2
  101. package/dist/esm/{chunk-NWXODCTD.js → chunk-EERKYRYI.js} +2 -2
  102. package/dist/esm/{chunk-4MNRLB57.js → chunk-FICBVI4M.js} +2 -2
  103. package/dist/esm/chunk-HGF4CKRY.js +3 -0
  104. package/dist/esm/chunk-HGF4CKRY.js.map +7 -0
  105. package/dist/esm/{chunk-JD4KR6VZ.js → chunk-HVMRB3AH.js} +2 -2
  106. package/dist/esm/{chunk-HLIOHDEX.js → chunk-IFHBMTFX.js} +2 -2
  107. package/dist/esm/{chunk-J54GYD7A.js → chunk-JFJV4HL3.js} +2 -2
  108. package/dist/esm/{chunk-KJZSXLIX.js → chunk-JQMWNI62.js} +2 -2
  109. package/dist/esm/chunk-K35JUIUT.js +3 -0
  110. package/dist/esm/chunk-K35JUIUT.js.map +7 -0
  111. package/dist/esm/{chunk-67UEMB4K.js → chunk-KBSH6CBD.js} +2 -2
  112. package/dist/esm/{chunk-SUQJ7DD4.js → chunk-L7PRLW6A.js} +2 -2
  113. package/dist/esm/{chunk-D2C2A2ZK.js → chunk-LFAUMDU5.js} +2 -2
  114. package/dist/esm/{chunk-LABMK6Q7.js → chunk-LG5DPQ46.js} +2 -2
  115. package/dist/esm/{chunk-MJROOEPE.js → chunk-NFSW36RG.js} +2 -2
  116. package/dist/esm/{chunk-6YWHNLSC.js → chunk-NJ7RQYLX.js} +2 -2
  117. package/dist/esm/{chunk-WD66RYF6.js → chunk-NYIYRILR.js} +2 -2
  118. package/dist/esm/{chunk-JP36JSNP.js → chunk-OBSZOD5M.js} +2 -2
  119. package/dist/esm/{chunk-DP7MPGR7.js → chunk-OMPLFDS6.js} +2 -2
  120. package/dist/esm/{chunk-H2J25HXP.js → chunk-OPYTQ34H.js} +2 -2
  121. package/dist/esm/{chunk-REORAMUH.js → chunk-QBONJMSE.js} +2 -2
  122. package/dist/esm/chunk-QDAM2I6O.js +3 -0
  123. package/dist/esm/chunk-QDAM2I6O.js.map +7 -0
  124. package/dist/esm/chunk-RSG4XWHU.js +2 -0
  125. package/dist/esm/{chunk-2ZKEQS76.js → chunk-SGKLJDA3.js} +2 -2
  126. package/dist/esm/{chunk-676Y7ZUT.js → chunk-TMINGBSQ.js} +2 -2
  127. package/dist/esm/{chunk-2S7HPQVX.js → chunk-TRJAVWCK.js} +2 -2
  128. package/dist/esm/chunk-TUZ665BA.js +3 -0
  129. package/dist/esm/chunk-TUZ665BA.js.map +7 -0
  130. package/dist/esm/{chunk-JKQN6QCP.js → chunk-VBF3XALY.js} +2 -2
  131. package/dist/esm/chunk-VWRPVM5K.js +3 -0
  132. package/dist/esm/chunk-VWRPVM5K.js.map +7 -0
  133. package/dist/esm/{chunk-B6OFKABP.js → chunk-VYF6KKYM.js} +2 -2
  134. package/dist/esm/chunk-W35ZKQMQ.js +3 -0
  135. package/dist/esm/chunk-W35ZKQMQ.js.map +7 -0
  136. package/dist/esm/{chunk-EPGIYTFK.js → chunk-X7DGYRAY.js} +2 -2
  137. package/dist/esm/{chunk-X7JHZ3HA.js → chunk-XF6Z5NKE.js} +2 -2
  138. package/dist/esm/{chunk-K5V53KTJ.js → chunk-Y44DYJA5.js} +2 -2
  139. package/dist/esm/{chunk-MMDZBPSX.js → chunk-YOTTLPJ3.js} +2 -2
  140. package/dist/esm/chunk-ZBSGH74F.js +3 -0
  141. package/dist/esm/chunk-ZBSGH74F.js.map +7 -0
  142. package/dist/esm/chunk-ZHXEEOGI.js +3 -0
  143. package/dist/esm/chunk-ZHXEEOGI.js.map +7 -0
  144. package/dist/esm/{chunk-FMVOB367.js → chunk-ZLGOZKB3.js} +2 -2
  145. package/dist/esm/components/_internal/base-button.js +1 -1
  146. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  147. package/dist/esm/components/_internal/menu-context.js +1 -1
  148. package/dist/esm/components/_internal/navigator-host.d.ts +21 -0
  149. package/dist/esm/components/_internal/navigator-host.d.ts.map +1 -0
  150. package/dist/esm/components/_internal/navigator-host.js +3 -0
  151. package/dist/esm/components/_internal/navigator-host.js.map +7 -0
  152. package/dist/esm/components/_internal/page-scope.d.ts +48 -0
  153. package/dist/esm/components/_internal/page-scope.d.ts.map +1 -0
  154. package/dist/esm/components/_internal/page-scope.js +3 -0
  155. package/dist/esm/components/_internal/page-scope.js.map +7 -0
  156. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  157. package/dist/esm/components/_internal/portal-theme.d.ts +2 -1
  158. package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -1
  159. package/dist/esm/components/_internal/portal-theme.js +1 -1
  160. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  161. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  162. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  163. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  164. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  165. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  166. package/dist/esm/components/accordion.js +1 -1
  167. package/dist/esm/components/alert-dialog.js +1 -1
  168. package/dist/esm/components/avatar.js +1 -1
  169. package/dist/esm/components/blockquote.js +1 -1
  170. package/dist/esm/components/button.js +1 -1
  171. package/dist/esm/components/card.js +1 -1
  172. package/dist/esm/components/chatbar.js +1 -1
  173. package/dist/esm/components/checkbox-group.js +1 -1
  174. package/dist/esm/components/checkbox.js +1 -1
  175. package/dist/esm/components/chip.js +1 -1
  176. package/dist/esm/components/code.js +1 -1
  177. package/dist/esm/components/combobox.js +1 -1
  178. package/dist/esm/components/context-menu.js +1 -1
  179. package/dist/esm/components/dialog.d.ts.map +1 -1
  180. package/dist/esm/components/dialog.js +1 -1
  181. package/dist/esm/components/dropdown-menu.js +1 -1
  182. package/dist/esm/components/heading.js +1 -1
  183. package/dist/esm/components/image.js +1 -1
  184. package/dist/esm/components/index.d.ts +2 -0
  185. package/dist/esm/components/index.d.ts.map +1 -1
  186. package/dist/esm/components/index.js +1 -1
  187. package/dist/esm/components/link.js +1 -1
  188. package/dist/esm/components/message-scroller.js +1 -1
  189. package/dist/esm/components/navbar.js +1 -1
  190. package/dist/esm/components/navigator.d.ts +103 -0
  191. package/dist/esm/components/navigator.d.ts.map +1 -0
  192. package/dist/esm/components/navigator.js +3 -0
  193. package/dist/esm/components/navigator.js.map +7 -0
  194. package/dist/esm/components/notice.js +1 -1
  195. package/dist/esm/components/page.d.ts +31 -0
  196. package/dist/esm/components/page.d.ts.map +1 -0
  197. package/dist/esm/components/page.js +3 -0
  198. package/dist/esm/components/page.js.map +7 -0
  199. package/dist/esm/components/popover.d.ts.map +1 -1
  200. package/dist/esm/components/popover.js +1 -1
  201. package/dist/esm/components/progress.js +1 -1
  202. package/dist/esm/components/radio-group.js +1 -1
  203. package/dist/esm/components/radio.js +1 -1
  204. package/dist/esm/components/schemas/index.js +1 -1
  205. package/dist/esm/components/scroll-area.js +1 -1
  206. package/dist/esm/components/segmented-control.js +1 -1
  207. package/dist/esm/components/select.js +1 -1
  208. package/dist/esm/components/separator.js +1 -1
  209. package/dist/esm/components/sheet.d.ts.map +1 -1
  210. package/dist/esm/components/sheet.js +1 -1
  211. package/dist/esm/components/shell.d.ts.map +1 -1
  212. package/dist/esm/components/shell.js +1 -1
  213. package/dist/esm/components/sidebar.js +1 -1
  214. package/dist/esm/components/slider.js +1 -1
  215. package/dist/esm/components/switch.js +1 -1
  216. package/dist/esm/components/table.js +1 -1
  217. package/dist/esm/components/tabs.js +1 -1
  218. package/dist/esm/components/text-area.js +1 -1
  219. package/dist/esm/components/text-field.js +1 -1
  220. package/dist/esm/components/text.js +1 -1
  221. package/dist/esm/components/toggle.js +1 -1
  222. package/dist/esm/components/toolbar.d.ts +5 -1
  223. package/dist/esm/components/toolbar.d.ts.map +1 -1
  224. package/dist/esm/components/toolbar.js +1 -1
  225. package/dist/esm/components/tooltip.js +1 -1
  226. package/dist/esm/components/virtual-menu.js +1 -1
  227. package/dist/esm/hooks/index.js +1 -1
  228. package/dist/esm/index.js +1 -1
  229. package/package.json +1 -1
  230. package/src/components/_internal/navigator-host.ts +17 -0
  231. package/src/components/_internal/page-scope.tsx +119 -0
  232. package/src/components/_internal/portal-theme.tsx +6 -2
  233. package/src/components/_internal/shell-bottom.tsx +4 -1
  234. package/src/components/_internal/shell-inspector.tsx +4 -1
  235. package/src/components/_internal/shell-sidebar.tsx +4 -1
  236. package/src/components/dialog.tsx +8 -0
  237. package/src/components/index.css +2 -0
  238. package/src/components/index.tsx +15 -0
  239. package/src/components/navigator.css +85 -0
  240. package/src/components/navigator.tsx +415 -0
  241. package/src/components/page.css +38 -0
  242. package/src/components/page.tsx +93 -0
  243. package/src/components/popover.tsx +18 -1
  244. package/src/components/sheet.tsx +8 -0
  245. package/src/components/shell.tsx +8 -2
  246. package/src/components/toolbar.css +11 -0
  247. package/src/components/toolbar.tsx +17 -5
  248. package/styles.css +127 -0
  249. package/dist/esm/chunk-4LV37PHM.js +0 -3
  250. package/dist/esm/chunk-4LV37PHM.js.map +0 -7
  251. package/dist/esm/chunk-5BX2YZV6.js +0 -3
  252. package/dist/esm/chunk-5BX2YZV6.js.map +0 -7
  253. package/dist/esm/chunk-AQKSO3SW.js +0 -3
  254. package/dist/esm/chunk-AQKSO3SW.js.map +0 -7
  255. package/dist/esm/chunk-AS2STDGA.js +0 -3
  256. package/dist/esm/chunk-AS2STDGA.js.map +0 -7
  257. package/dist/esm/chunk-HR2VHGJ5.js +0 -3
  258. package/dist/esm/chunk-HR2VHGJ5.js.map +0 -7
  259. package/dist/esm/chunk-JTMLFTNZ.js +0 -3
  260. package/dist/esm/chunk-JTMLFTNZ.js.map +0 -7
  261. package/dist/esm/chunk-MJKVVGGV.js +0 -3
  262. package/dist/esm/chunk-MJKVVGGV.js.map +0 -7
  263. package/dist/esm/chunk-NG54K6FL.js +0 -2
  264. package/dist/esm/chunk-QRV32INS.js +0 -3
  265. package/dist/esm/chunk-QRV32INS.js.map +0 -7
  266. package/dist/esm/chunk-YMUERC2J.js +0 -3
  267. package/dist/esm/chunk-YMUERC2J.js.map +0 -7
  268. /package/dist/esm/{chunk-HBO7W7SS.js.map → chunk-26O4RBOJ.js.map} +0 -0
  269. /package/dist/esm/{chunk-FYTLUDL3.js.map → chunk-3M5ZM67R.js.map} +0 -0
  270. /package/dist/esm/{chunk-2FYUM6TA.js.map → chunk-4ZHBNYXM.js.map} +0 -0
  271. /package/dist/esm/{chunk-TSS4K2U5.js.map → chunk-5VYQDA5S.js.map} +0 -0
  272. /package/dist/esm/{chunk-WAXRIARV.js.map → chunk-6WHKGVWY.js.map} +0 -0
  273. /package/dist/esm/{chunk-7V6M3MIR.js.map → chunk-7YXHLU4C.js.map} +0 -0
  274. /package/dist/esm/{chunk-ENQV6SEA.js.map → chunk-AKSAKP35.js.map} +0 -0
  275. /package/dist/esm/{chunk-C67MM24U.js.map → chunk-B7STVZPU.js.map} +0 -0
  276. /package/dist/esm/{chunk-2E57H3NH.js.map → chunk-BQOFHLDP.js.map} +0 -0
  277. /package/dist/esm/{chunk-324VC67W.js.map → chunk-COLJWVN7.js.map} +0 -0
  278. /package/dist/esm/{chunk-K3GDM26A.js.map → chunk-D42VCLKH.js.map} +0 -0
  279. /package/dist/esm/{chunk-MGWGD6KI.js.map → chunk-DFQIIYLD.js.map} +0 -0
  280. /package/dist/esm/{chunk-NWXODCTD.js.map → chunk-EERKYRYI.js.map} +0 -0
  281. /package/dist/esm/{chunk-4MNRLB57.js.map → chunk-FICBVI4M.js.map} +0 -0
  282. /package/dist/esm/{chunk-JD4KR6VZ.js.map → chunk-HVMRB3AH.js.map} +0 -0
  283. /package/dist/esm/{chunk-HLIOHDEX.js.map → chunk-IFHBMTFX.js.map} +0 -0
  284. /package/dist/esm/{chunk-J54GYD7A.js.map → chunk-JFJV4HL3.js.map} +0 -0
  285. /package/dist/esm/{chunk-KJZSXLIX.js.map → chunk-JQMWNI62.js.map} +0 -0
  286. /package/dist/esm/{chunk-67UEMB4K.js.map → chunk-KBSH6CBD.js.map} +0 -0
  287. /package/dist/esm/{chunk-SUQJ7DD4.js.map → chunk-L7PRLW6A.js.map} +0 -0
  288. /package/dist/esm/{chunk-D2C2A2ZK.js.map → chunk-LFAUMDU5.js.map} +0 -0
  289. /package/dist/esm/{chunk-LABMK6Q7.js.map → chunk-LG5DPQ46.js.map} +0 -0
  290. /package/dist/esm/{chunk-MJROOEPE.js.map → chunk-NFSW36RG.js.map} +0 -0
  291. /package/dist/esm/{chunk-6YWHNLSC.js.map → chunk-NJ7RQYLX.js.map} +0 -0
  292. /package/dist/esm/{chunk-WD66RYF6.js.map → chunk-NYIYRILR.js.map} +0 -0
  293. /package/dist/esm/{chunk-JP36JSNP.js.map → chunk-OBSZOD5M.js.map} +0 -0
  294. /package/dist/esm/{chunk-DP7MPGR7.js.map → chunk-OMPLFDS6.js.map} +0 -0
  295. /package/dist/esm/{chunk-H2J25HXP.js.map → chunk-OPYTQ34H.js.map} +0 -0
  296. /package/dist/esm/{chunk-REORAMUH.js.map → chunk-QBONJMSE.js.map} +0 -0
  297. /package/dist/esm/{chunk-NG54K6FL.js.map → chunk-RSG4XWHU.js.map} +0 -0
  298. /package/dist/esm/{chunk-2ZKEQS76.js.map → chunk-SGKLJDA3.js.map} +0 -0
  299. /package/dist/esm/{chunk-676Y7ZUT.js.map → chunk-TMINGBSQ.js.map} +0 -0
  300. /package/dist/esm/{chunk-2S7HPQVX.js.map → chunk-TRJAVWCK.js.map} +0 -0
  301. /package/dist/esm/{chunk-JKQN6QCP.js.map → chunk-VBF3XALY.js.map} +0 -0
  302. /package/dist/esm/{chunk-B6OFKABP.js.map → chunk-VYF6KKYM.js.map} +0 -0
  303. /package/dist/esm/{chunk-EPGIYTFK.js.map → chunk-X7DGYRAY.js.map} +0 -0
  304. /package/dist/esm/{chunk-X7JHZ3HA.js.map → chunk-XF6Z5NKE.js.map} +0 -0
  305. /package/dist/esm/{chunk-K5V53KTJ.js.map → chunk-Y44DYJA5.js.map} +0 -0
  306. /package/dist/esm/{chunk-MMDZBPSX.js.map → chunk-YOTTLPJ3.js.map} +0 -0
  307. /package/dist/esm/{chunk-FMVOB367.js.map → chunk-ZLGOZKB3.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
- import { useLayoutEffect } from 'radix-ui/internal';
4
+ import { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';
5
5
  import classNames from 'classnames';
6
6
  import { Toolbar as ToolbarPrimitive } from 'radix-ui';
7
7
 
@@ -13,6 +13,7 @@ import { extractProps } from '../helpers/extract-props.js';
13
13
  import { useThemeSize } from '../hooks/theme-size.js';
14
14
  import { layoutPropDefs } from '../props/layout.props.js';
15
15
  import { usePaneBandSize } from './_internal/pane-chrome.js';
16
+ import { usePageMirror, usePageScope, usePageTitle } from './_internal/page-scope.js';
16
17
 
17
18
  import type { ButtonProps } from './button.js';
18
19
  import type { LayoutProps } from '../props/layout.props.js';
@@ -671,7 +672,11 @@ ToolbarSeparator.displayName = 'Toolbar.Separator';
671
672
  const TITLE_SIZE = { '1': '2', '2': '3', '3': '4', '4': '5' } as const satisfies Record<ToolbarSize, TextProps['size']>;
672
673
 
673
674
  interface ToolbarTitleProps {
674
- /** The title text. With none, the title renders nothing. */
675
+ /**
676
+ * The title text. With none, the title mirrors the page in this Shell pane: it shows the
677
+ * `Page`'s title once that title has scrolled behind the band. Outside a pane with a page, it
678
+ * renders nothing.
679
+ */
675
680
  children?: React.ReactNode;
676
681
  className?: string;
677
682
  style?: React.CSSProperties;
@@ -689,10 +694,16 @@ const ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(
689
694
  const toolbar = React.useContext(ToolbarContext);
690
695
  const themeSize = useThemeSize<ToolbarSize>(undefined, toolbarRootPropDefs.size);
691
696
  const size = toolbar?.size ?? themeSize;
692
- if (children === undefined || children === null || children === false) return null;
697
+ const store = usePageScope();
698
+ const pageTitle = usePageTitle(store);
699
+ const mirrorRef = usePageMirror(store);
700
+ const mirroring = children === undefined || children === null || children === false;
701
+ const words = mirroring ? pageTitle : children;
702
+ const ref = useComposedRefs(forwardedRef, mirroring ? mirrorRef : undefined);
703
+ if (words === undefined || words === null) return null;
693
704
  return (
694
705
  <Text
695
- ref={forwardedRef}
706
+ ref={ref}
696
707
  as="span"
697
708
  size={TITLE_SIZE[size]}
698
709
  weight="medium"
@@ -700,8 +711,9 @@ const ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(
700
711
  id={id}
701
712
  style={style}
702
713
  className={classNames('kui-ToolbarTitle', className)}
714
+ data-mirror={mirroring || undefined}
703
715
  >
704
- {children}
716
+ {words}
705
717
  </Text>
706
718
  );
707
719
  },
package/styles.css CHANGED
@@ -20480,6 +20480,12 @@
20480
20480
  -ms-flex-negative: 1;
20481
20481
  flex-shrink: 1;
20482
20482
  }
20483
+ .kui-ToolbarTitle:where([data-mirror]) {
20484
+ opacity: 0;
20485
+ }
20486
+ .kui-ToolbarTitle:where([data-mirror][data-collapsed]) {
20487
+ opacity: 1;
20488
+ }
20483
20489
  :where(.kui-Toolbar) .kui-ToolbarTitle:where(:not(:first-child)) {
20484
20490
  -webkit-margin-start: calc(var(--toolbar-title-gap) - var(--toolbar-gap));
20485
20491
  margin-inline-start: calc(var(--toolbar-title-gap) - var(--toolbar-gap));
@@ -20496,6 +20502,127 @@
20496
20502
  border-style: none;
20497
20503
  }
20498
20504
  }
20505
+ .kui-Navigator,
20506
+ .kui-NavigatorLevel,
20507
+ .kui-NavigatorScreen {
20508
+ display: -webkit-box;
20509
+ display: -ms-flexbox;
20510
+ display: flex;
20511
+ -webkit-box-orient: vertical;
20512
+ -webkit-box-direction: normal;
20513
+ -ms-flex-direction: column;
20514
+ flex-direction: column;
20515
+ min-block-size: 0;
20516
+ }
20517
+ .kui-NavigatorBar {
20518
+ -webkit-margin-before: calc(-1 * var(--layout-space-2));
20519
+ margin-block-start: calc(-1 * var(--layout-space-2));
20520
+ margin-inline: calc(-1 * var(--layout-space-2));
20521
+ -webkit-margin-after: var(--layout-space-6);
20522
+ margin-block-end: var(--layout-space-6);
20523
+ }
20524
+ .kui-NavigatorBarTitle {
20525
+ -webkit-margin-end: auto;
20526
+ margin-inline-end: auto;
20527
+ min-inline-size: 0;
20528
+ }
20529
+ .kui-NavigatorBarTitle:where(:first-child) {
20530
+ -webkit-padding-start: var(--layout-space-2);
20531
+ padding-inline-start: var(--layout-space-2);
20532
+ }
20533
+ .kui-NavigatorBackGlyph,
20534
+ .kui-NavigatorLinkGlyph {
20535
+ inline-size: 1em;
20536
+ block-size: 1em;
20537
+ }
20538
+ .kui-NavigatorBackGlyph:where(:dir(rtl)),
20539
+ .kui-NavigatorLinkGlyph:where(:dir(rtl)) {
20540
+ -webkit-transform: scaleX(-1);
20541
+ transform: scaleX(-1);
20542
+ }
20543
+ .kui-NavigatorLink {
20544
+ display: -webkit-box;
20545
+ display: -ms-flexbox;
20546
+ display: flex;
20547
+ -webkit-box-align: center;
20548
+ -ms-flex-align: center;
20549
+ align-items: center;
20550
+ gap: var(--layout-space-3);
20551
+ inline-size: 100%;
20552
+ min-block-size: var(--control-height-3);
20553
+ padding-inline: var(--layout-space-3);
20554
+ border-radius: var(--radius-control-3);
20555
+ color: var(--gray-12);
20556
+ font-size: var(--font-size-3);
20557
+ line-height: var(--line-height-3);
20558
+ text-align: start;
20559
+ cursor: var(--cursor-button);
20560
+ }
20561
+ .kui-NavigatorLinkLabel {
20562
+ display: -webkit-box;
20563
+ display: -ms-flexbox;
20564
+ display: flex;
20565
+ -webkit-box-align: center;
20566
+ -ms-flex-align: center;
20567
+ align-items: center;
20568
+ gap: var(--layout-space-3);
20569
+ -webkit-box-flex: 1;
20570
+ -ms-flex: 1;
20571
+ flex: 1;
20572
+ min-inline-size: 0;
20573
+ }
20574
+ .kui-NavigatorLinkGlyph {
20575
+ -ms-flex-negative: 0;
20576
+ flex-shrink: 0;
20577
+ color: var(--gray-a10);
20578
+ }
20579
+ @media (hover: hover) {
20580
+ .kui-NavigatorLink:where(:hover) {
20581
+ background-color: var(--gray-a3);
20582
+ }
20583
+ }
20584
+ .kui-NavigatorLink:where(:active) {
20585
+ background-color: var(--gray-a4);
20586
+ }
20587
+ .kui-NavigatorLink:where(:focus-visible) {
20588
+ outline: 2px solid var(--focus-8);
20589
+ outline-offset: -2px;
20590
+ }
20591
+ .kui-Page {
20592
+ display: -webkit-box;
20593
+ display: -ms-flexbox;
20594
+ display: flex;
20595
+ -webkit-box-orient: vertical;
20596
+ -webkit-box-direction: normal;
20597
+ -ms-flex-direction: column;
20598
+ flex-direction: column;
20599
+ gap: var(--layout-space-8);
20600
+ -webkit-padding-before: var(--layout-space-7);
20601
+ padding-block-start: var(--layout-space-7);
20602
+ }
20603
+ .kui-PageHeader {
20604
+ position: relative;
20605
+ display: -webkit-box;
20606
+ display: -ms-flexbox;
20607
+ display: flex;
20608
+ -webkit-box-orient: vertical;
20609
+ -webkit-box-direction: normal;
20610
+ -ms-flex-direction: column;
20611
+ flex-direction: column;
20612
+ gap: var(--layout-space-6);
20613
+ }
20614
+ .kui-PageMark {
20615
+ -webkit-margin-after: calc(var(--layout-space-4) - var(--layout-space-6));
20616
+ margin-block-end: calc(var(--layout-space-4) - var(--layout-space-6));
20617
+ }
20618
+ .kui-PageMarker {
20619
+ position: absolute;
20620
+ inset-block-end: var(--kui-pane-inset-start, 0px);
20621
+ inset-inline-start: 0;
20622
+ block-size: 1px;
20623
+ inline-size: 100%;
20624
+ pointer-events: none;
20625
+ }
20499
20626
  .kui-TooltipContent {
20500
20627
  -webkit-box-sizing: border-box;
20501
20628
  box-sizing: border-box;
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as Ge,b as Ye}from"./chunk-4G3FJUER.js";import{a as Xe}from"./chunk-ZG2XQUOH.js";import{a as Ke}from"./chunk-YMUERC2J.js";import{a as je}from"./chunk-AS2STDGA.js";import{c as ue,d as pe,e as we,f as fe,i as Ae,j as Ie,k as Ne}from"./chunk-MJROOEPE.js";import{c as xe,d as ke}from"./chunk-QEDKL23P.js";import{b as Ee}from"./chunk-5ON3XLRD.js";import{a as Le}from"./chunk-ANQLWGFN.js";import{a as $e}from"./chunk-QRV32INS.js";import{a as Fe,b as me}from"./chunk-3QWGSRYC.js";import{a as Pe,b as he,c as ve}from"./chunk-LTUW36HM.js";import{a as De,b as Be,c as Ve}from"./chunk-QKCNGEX4.js";import{a as Oe}from"./chunk-WEBNIUEX.js";import{a as J,b as We,c as _e,d as Ue,g as qe}from"./chunk-XUCR7L4G.js";import{a as ye}from"./chunk-G66WDIIV.js";import{e as ie,f as Te,h as Me,i as ne,j as ze,k as ce,l as de,n as He,o as oe}from"./chunk-GHWEXMF6.js";import{a as st}from"./chunk-VQPANPMI.js";var Pt={};st(Pt,{Bottom:()=>$e,Content:()=>at,Header:()=>nt,Inspector:()=>Ke,Left:()=>ot,PaneFooter:()=>Ie,PaneHeader:()=>Ae,Panel:()=>Ce,Rail:()=>lt,Root:()=>tt,Scroll:()=>Ne,Sidebar:()=>je,Trigger:()=>rt,useResponsivePresentation:()=>Xe,useShell:()=>Ye,useSidebarMode:()=>Ge});import*as e from"react";import $ from"classnames";import{Slot as it}from"radix-ui";import{useComposedRefs as be,useLayoutEffect as ct}from"radix-ui/internal";var Re=0;function Je(a){Re=Math.max(0,Re+a);let r=document.documentElement;Re>0?r.setAttribute("data-kui-shell-lock",""):r.removeAttribute("data-kui-shell-lock")}var Se="data-kui-shell-inert",dt=30;function Q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Qe(a,r,s){for(let u of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(u.getAttribute("aria-controls")!==r||u.closest("[inert]"))&&!(s&&!s.some(R=>R.contains(u))))return u;return null}var ut={values:["1","2","3"]},et=e.createContext(null),Ze=64;function ge(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var tt=e.forwardRef(({className:a,children:r,height:s="full",contained:u,size:R,style:g,onKeyDown:F,onFocus:x,...k},T)=>{let P=Ee(R,ut),[i]=e.useState(Te),C=e.useCallback(t=>Me(i,t),[i]);e.useSyncExternalStore(C,()=>i.version,()=>0);let S=e.useRef(null),D=be(T,S),[E,w]=e.useState(()=>new Set),A=e.useCallback(t=>{w(n=>n.has(t)?n:new Set(n).add(t))},[]),f=e.useCallback(t=>{w(n=>{if(!n.has(t))return n;let o=new Set(n);return o.delete(t),o})},[]),m=e.useMemo(()=>({registerInset:A,unregisterInset:f}),[A,f]),I=e.useCallback(()=>{for(let t of i.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[i]),M=e.useCallback(()=>[...i.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[i]),y=[...i.entries.values()].filter(t=>t.overlayLive&&t.el).length,N=u===!0||s!=="full"&&s!=="auto",V=!N&&s==="full",[Z,le]=e.useState(void 0);e.useEffect(()=>{if(!V)return;let t=S.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let o=xe(),c=o?n.scrollY:ge(t)?.scrollTop??0,h=0,v=0,L=()=>{v&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{v=0})},U=()=>{o&&!v&&(c=n.scrollY)},q=l=>{!o&&!v&&l.target instanceof HTMLElement&&l.target===ge(t)&&(c=l.target.scrollTop)};n.addEventListener("resize",L),n.addEventListener("scroll",U,{passive:!0}),t.addEventListener("scroll",q,{passive:!0,capture:!0});let se=ke(l=>{o=l;let d=c;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,l)n.scrollTo(0,d);else{let p=ge(t);p&&(p.scrollTop=d)}})});return()=>{h&&cancelAnimationFrame(h),v&&cancelAnimationFrame(v),n.removeEventListener("resize",L),n.removeEventListener("scroll",U),t.removeEventListener("scroll",q,{capture:!0}),se()}},[V]);let K=e.useCallback(()=>{let t=S.current;if(!t)return;let n=M().map(o=>o.el);for(let o of t.children){if(!(o instanceof HTMLElement)||o.classList.contains("kui-ShellScrim"))continue;let c=n.some(h=>o===h||o.contains(h));n.length===0||c?o.hasAttribute(Se)&&(o.removeAttribute(Se),o.inert=!1):o.inert||(o.setAttribute(Se,""),o.inert=!0)}},[M]),j=e.useRef(null),G=e.useRef([]),ee=e.useRef(null),O=e.useRef(!1),z=e.useRef(0),W=e.useCallback(()=>{z.current&&cancelAnimationFrame(z.current),z.current=0},[]),_=e.useCallback((t,n)=>{W();let o=0,c=()=>{if(z.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}o+=1,o<dt&&(z.current=requestAnimationFrame(c))}};z.current=requestAnimationFrame(c)},[W]);e.useEffect(()=>()=>{W(),O.current&&(O.current=!1,Je(-1))},[W]),e.useEffect(()=>{let t=S.current;if(!t)return;let n=t.ownerDocument,o=M(),c=o.map(l=>l.el),h=!N&&o.length>0;h!==O.current&&(O.current=h,Je(h?1:-1));let v=G.current;G.current=o;let L=v.filter(l=>{if(c.includes(l.el))return!1;let d=i.entries.get(l.name);return!l.el.isConnected||!d||d.el!==l.el||d.value==="closed"}),U=l=>l!==null&&L.some(d=>d.el.contains(l));if(v.length===0&&o.length>0){let l=n.activeElement,d=l instanceof HTMLElement&&!Q(n,l)&&!c.some(p=>p.contains(l))?l:null;if(d&&!t.contains(d)){let p=ee.current;p&&p.isConnected&&!c.some(te=>te.contains(p))&&(d=p)}j.current=d}if(K(),o.length===0){let l=j.current;if(j.current=null,L.length===0)return;let p=(H=>H!==null&&H.isConnected&&!H.closest("[inert]")&&!U(H))(l)?l:null;for(let H of L)p??(p=Qe(n,H.id));if(!p)return;let te=H=>Q(n,H)||U(H);te(n.activeElement)?p.focus({preventScroll:!0}):_(p,te);return}if(L.length>0){let l=n.activeElement;if(Q(n,l)||U(l)){let d=null;for(let p of L)d??(d=Qe(n,p.id,c));(d??c[c.length-1]).focus({preventScroll:!0})}}let q=c.filter(l=>!v.some(d=>d.el===l)),se=n.activeElement;q.length>0&&!c.some(l=>l.contains(se))&&(q[0].focus({preventScroll:!0}),_(q[0],l=>Q(n,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=S.current;if(!t||y===0||typeof MutationObserver>"u")return;let n=new MutationObserver(K);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[y,K]);let Y=t=>{F?.(t),!(t.key!=="Escape"||t.defaultPrevented||y===0)&&(I(),t.stopPropagation())};e.useEffect(()=>{let t=S.current;if(!t||y===0)return;let n=t.ownerDocument,o=c=>{c.key!=="Escape"||c.defaultPrevented||!Q(n,c.target)||I()};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[y,I]);let ae=t=>{x?.(t),t.target instanceof HTMLElement&&S.current?.contains(t.target)&&(ee.current=t.target)},B=i.entries.get("rail"),X=B!==void 0&&B.value!==void 0&&B.value!=="closed"?E.has("rail")?`calc(${B.size}px + 2 * var(--shell-inset-gap))`:`${B.size}px`:void 0,re=s==="full"?{}:s==="auto"?{height:"auto"}:typeof s=="number"?{height:`${s}px`}:{height:s};return e.createElement(ze.Provider,{value:i},e.createElement(ue.Provider,{value:P},e.createElement(pe.Provider,{value:!1},e.createElement(we.Provider,{value:V},e.createElement(et.Provider,{value:le},e.createElement(He.Provider,{value:m},e.createElement(Le.Provider,{value:void 0},e.createElement("div",{...k,ref:D,className:$("kui-ShellRoot",a),"data-height":s==="auto"&&!N?"auto":void 0,"data-contained":N||void 0,"data-window":V||void 0,"data-has-inset":E.size>0||void 0,"data-overlay-live":y>0||void 0,onKeyDown:Y,onFocus:ae,style:{...re,...X?{"--shell-rail-offset":X}:{},...Z!==void 0?{"--kui-shell-header-h":`${Z}px`}:{},...g}},r,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:I})))))))))});tt.displayName="Shell.Root";var nt=e.forwardRef(({className:a,height:r=Ze,style:s,...u},R)=>{let g=e.useContext(et);return ct(()=>{if(g)return g(r===Ze?void 0:r),()=>g(void 0)},[g,r]),e.createElement("header",{...u,ref:R,className:$("kui-ShellHeader",a),style:{...s,"--shell-header-height":`${r}px`}})});nt.displayName="Shell.Header";var ot=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));ot.displayName="Shell.Left";var pt={controlled:"open",default:"defaultOpen"},lt=e.forwardRef((a,r)=>{let{className:s,presentation:u,expandedSize:R=64,collapsible:g,onExpand:F,onCollapse:x,children:k,style:T,open:P,defaultOpen:i,onOpenChange:C,inset:S,id:D,...E}=a,{table:w,attributes:A}=ve(u,"fixed"),f=Pe({name:"rail",label:"Rail",propNames:pt,id:D,controlled:J(P),defaultValue:J(i),presentationTable:w,builtIn:We,onChange:(I,M)=>C?.(I!=="closed",{reason:M}),onExpand:F,onCollapse:x,size:R});oe("rail",S);let m=be(r,f.setElement);return e.createElement("div",{...E,role:E.role??"navigation",id:f.id,ref:m,className:$("kui-ShellPane","kui-ShellRail",s),...he(f,A),"data-inset":S||void 0,tabIndex:f.overlaying?-1:E.tabIndex,style:{...T,"--rail-size":`${R}px`}},e.createElement(ft,null,k))});lt.displayName="Shell.Rail";function ft({children:a}){let r=e.useContext(ue);return e.createElement("div",{className:$("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(fe,{presentation:"thin"},a))}var mt={controlled:"open",default:"defaultOpen"},Ce=e.forwardRef((a,r)=>{let{className:s,presentation:u,defaultOpen:R,open:g,onOpenChange:F,size:x,defaultSize:k,expandedSize:T=288,minSize:P=100,maxSize:i=800,resizable:C=!1,collapsible:S=!0,onExpand:D,onCollapse:E,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,children:V,style:Z,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j=50,inset:G,id:ee,...O}=a,z=ce("Shell.Panel"),W=de(z,"rail"),_=ve(u,"fixed"),Y=u===void 0,ae=Y?W?.presentationTable??ie:_.table,B=Y?{"data-presentation-follows":""}:_.attributes,b=Pe({name:"panel",label:"Panel",propNames:mt,id:ee,controlled:J(g),defaultValue:J(R),presentationTable:ae,builtIn:_e,onChange:(v,L)=>F?.(v!=="closed",{reason:L}),onExpand:D,onCollapse:E,size:T});oe("panel",G),e.useEffect(()=>{(m!==void 0||M!==void 0||y!==void 0||N!==void 0)&&void 0},[m,M,y,N]);let X=e.useRef(null),re=be(r,b.setElement,X),t=Be({name:"panel",elementId:b.id,elementRef:X,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Ue,expandedSize:T,minSize:P,maxSize:i,resizable:C,collapsible:S,size:x,defaultSize:k,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,overlaying:b.overlaying,overlayingNow:()=>(Y?z.entries.get("rail")?.presentationTable??ie:_.table)[ye()]==="overlay",requestCollapse:()=>b.setValue("closed","toggle"),requestToggle:()=>b.toggle("toggle")}),n=De(x,k,P,i),{handles:o,content:c}=Ve(V,me),h=C&&b.shown!==!1&&!b.overlaying?e.createElement(Oe.Provider,{value:t},o.length>0?o:e.createElement(Fe,null)):null;return e.createElement("div",{...qe(O),role:O.role??"navigation",id:b.id,ref:re,className:$("kui-ShellPane","kui-ShellPanel",s),...he(b,B),"data-inset":G||void 0,tabIndex:b.overlaying?-1:O.tabIndex,style:{...Z,"--panel-expanded-size":`${T}px`,...n?{"--panel-size":n}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(fe,null,c)),h)});Ce.displayName="Shell.Panel";Ce.Handle=me;var at=e.forwardRef(({className:a,inset:r,children:s,...u},R)=>(oe("content",r),e.createElement("main",{...u,ref:R,className:$("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(pe.Provider,{value:!0},s))));at.displayName="Shell.Content";var rt=e.forwardRef(({target:a,action:r="toggle",peekOnHover:s,asChild:u=!1,onClick:R,onMouseEnter:g,onMouseLeave:F,children:x,...k},T)=>{let P=ce("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,s&&void 0},[a,s]);let i=a==="left"?"rail":a,C=de(P,i),S=C?.value===void 0?void 0:C.value!=="closed",D=f=>{if(R?.(f),f.defaultPrevented)return;let m=P.entries.get(i);m&&(P.peek===i&&ne(P,null),r==="toggle"?m.toggle("toggle"):r==="expand"?m.setValue("open","toggle"):m.setValue("closed","toggle"))},E=f=>{if(g?.(f),!s)return;let m=P.entries.get(i);m&&m.value==="closed"&&m.presentation!=="overlay"&&ne(P,i)},w=f=>{F?.(f),s&&P.peek===i&&ne(P,null)},A=u?it.Root:"button";return e.createElement(A,{...!u&&{type:"button"},"aria-controls":C?.id,"aria-expanded":S,...k,ref:T,onClick:D,onMouseEnter:E,onMouseLeave:w,"data-shell-trigger":a,"data-shell-action":r},x)});rt.displayName="Shell.Trigger";export{tt as a,nt as b,ot as c,lt as d,Ce as e,at as f,rt as g,Pt as h};
3
- //# sourceMappingURL=chunk-4LV37PHM.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/shell.tsx"],
4
- "sourcesContent": ["/**\n * Shell: the app frame.\n *\n * Since 0.8.0 the Shell is built on kookie-ui-v2's model, behind v1's API:\n *\n * - The Root is a CSS grid and renders its children as given, in JSX order.\n * Each pane claims its own grid area, so the Root never scans or reorders\n * children, any child renders, and a pane mounted after the Root works.\n * - State lives on each pane: `auto` (untouched), `open` or `closed`. An\n * untouched pane follows the window, resolved by the\n * stylesheet, so first paint needs no script and no open-state callback\n * fires on mount or on a resize.\n * - A pane is one element at every width. `overlay` is a posture of that\n * element, not a Sheet swapped in: crossing a breakpoint keeps its scroll\n * position, its focus and its children's state.\n * - The Root owns what an overlay needs: one scrim, `inert` on everything\n * else, focus moved in and returned, Escape, and a scroll lock.\n * - Nothing links panes to each other. A Rail closing no longer closes the\n * Panel; an app that wants that writes it in `onOpenChange`.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport type { SidebarPublicProps } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport type { BottomPublicProps } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { InspectorPublicProps } from './_internal/shell-inspector.js';\nimport { usePane, paneAttributes, usePresentationTable } from './_internal/shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane } from './_internal/shell-resizable.js';\nimport {\n FIXED_TABLE,\n ShellInsetContext,\n ShellStoreContext,\n createShellStore,\n setShellPeek,\n subscribeShellStore,\n useInsetRegistration,\n usePaneEntry,\n useShellStore,\n warnOnce,\n type InsetPaneId,\n} from './_internal/shell-store.js';\nimport { navigationRest, detailRest, toPaneValue, startAnchoredGrowth, withoutRemovedPaneProps } from './_internal/shell-rest.js';\nimport { useShell, useSidebarMode } from './shell.context.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { readBreakpoint } from '../hooks/use-breakpoint.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext, ShellWindowContext } from './_internal/pane-chrome.js';\nimport { onPageScrollMediaChange, pageScrollMatches } from './_internal/shell-page-scroll.js';\nimport type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';\nimport { PaneBandSizeContext } from './_internal/pane-band-context.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';\n\n/* \u2500\u2500 Root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n /**\n * The Shell's height. `full` (the default) is the window's height; on a narrow touch screen the\n * page scrolls instead of the content, so the browser can hide its toolbars. `auto` grows with\n * the content. Any other value is the Shell's own height, and makes it contained.\n */\n height?: 'full' | 'auto' | string | number;\n /**\n * Makes the Shell fill its parent instead of the window, and always scroll inside itself. Its\n * overlays cover only its own box and leave the page free to scroll. Use it for a Shell in a\n * card, a demo or a canvas. An explicit `height` implies it.\n */\n contained?: boolean;\n /** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Defaults to the nearest Theme's size (3 when the Theme is 4), else `2`. */\n size?: PaneSize;\n}\n\n/**\n * Every Shell with a live overlay holds the page still, counted across Shells,\n * through an attribute the stylesheet reads. Saving and restoring the\n * document's inline `overflow` would fight any other scroll lock on the page.\n */\nlet pageLockHolders = 0;\nfunction updatePageLock(delta: 1 | -1) {\n pageLockHolders = Math.max(0, pageLockHolders + delta);\n const doc = document.documentElement;\n if (pageLockHolders > 0) doc.setAttribute('data-kui-shell-lock', '');\n else doc.removeAttribute('data-kui-shell-lock');\n}\n\n/** Marks a child the Root made inert, so closing removes only what the Root added. */\nconst INERT_MARK = 'data-kui-shell-inert';\n\n/** How many frames a focus rescue watches after an overlay opens or closes. */\nconst RESCUE_FRAMES = 30;\n\n/** Focus that is nowhere useful: the document, or nothing at all. */\nfunction isNowhere(doc: Document, el: Element | EventTarget | null): boolean {\n return el === null || el === doc || el === doc.body || el === doc.documentElement;\n}\n\n/** A Trigger that drives the pane with this id and can take focus, optionally only inside `within`. */\nfunction triggerFor(doc: Document, id: string, within?: HTMLElement[]): HTMLElement | null {\n for (const el of doc.querySelectorAll<HTMLElement>('[data-shell-trigger][aria-controls]')) {\n if (el.getAttribute('aria-controls') !== id || el.closest('[inert]')) continue;\n if (within && !within.some((pane) => pane.contains(el))) continue;\n return el;\n }\n return null;\n}\n\ntype LivePane = { name: PaneName; id: string; el: HTMLElement };\n\n/** Shell.Root's own range; a Theme size above it maps to 3. */\nconst shellSizePropDef = { values: ['1', '2', '3'] as const };\n\n/** Lets a Shell.Header tell the Root its height, for the rows that stick beneath it while the page scrolls. */\nconst ShellHeaderHeightContext = React.createContext<((height: number | undefined) => void) | null>(null);\n\n/** The Shell.Header's default height, which the stylesheet assumes until a Header says otherwise. */\nconst DEFAULT_HEADER_HEIGHT = 64;\n\n/** The content's scroller while the frame scrolls: the Shell.Scroll's viewport, or the content itself. */\nfunction frameScroller(rootEl: HTMLElement): HTMLElement | null {\n return rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport') ?? rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent');\n}\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', contained: containedProp, size: sizeProp, style, onKeyDown, onFocus, ...props }, ref) => {\n // No size of its own: the nearest Theme's, mapped into 1-3.\n const size = useThemeSize(sizeProp, shellSizePropDef);\n const [store] = React.useState(createShellStore);\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n // Subscribed for the re-render, not for a value: a pane opening or closing\n // must bring the Root back so containment and the scrim follow it.\n React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, rootRef);\n\n // Inset: the Root paints the backdrop while any pane is inset.\n const [insetPanes, setInsetPanes] = React.useState<ReadonlySet<InsetPaneId>>(() => new Set());\n const registerInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => (prev.has(id) ? prev : new Set(prev).add(id)));\n }, []);\n const unregisterInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, []);\n const insetContext = React.useMemo(() => ({ registerInset, unregisterInset }), [registerInset, unregisterInset]);\n\n const closeOverlays = React.useCallback(() => {\n for (const entry of store.entries.values()) {\n if (entry.overlayLive) entry.setValue('closed', 'dismiss');\n }\n }, [store]);\n\n const livePanes = React.useCallback(\n (): LivePane[] => [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).map((entry) => ({ name: entry.name, id: entry.id, el: entry.el as HTMLElement })),\n [store],\n );\n const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;\n\n // A contained Shell sits inside a page, and its overlays cover only its box:\n // it holds no page lock. A height of its own implies it. `full` is the\n // window, and `auto` grows with its content, so its overlays are placed on\n // the window. Only a `full` Shell lets the page scroll on a phone.\n const contained = containedProp === true || (height !== 'full' && height !== 'auto');\n const windowShell = !contained && height === 'full';\n\n const [headerHeight, setHeaderHeight] = React.useState<number | undefined>(undefined);\n\n /*\n * The reading position crosses with the scroller. When a touch window\n * crosses the narrow boundary (a phone rotating, an iPad entering Split\n * View), the scroller changes between the content and the page, and the new\n * one starts at the top. The offset is remembered on `scroll` from whichever\n * scroller is live, because by the time the change is reported the old one\n * has already been laid out again and clamped. Only the live scroller is\n * heard. The clamp itself is reported as a scroll in the same frame as the\n * resize and before the media change, so scrolls are not heard from a resize\n * until that frame's animation callbacks.\n */\n React.useEffect(() => {\n if (!windowShell) return;\n const rootEl = rootRef.current;\n const win = rootEl?.ownerDocument.defaultView;\n if (!rootEl || !win || typeof win.matchMedia !== 'function') return;\n let pageScrolls = pageScrollMatches();\n let offset = pageScrolls ? win.scrollY : (frameScroller(rootEl)?.scrollTop ?? 0);\n let frame = 0;\n let resizing = 0;\n const onResize = () => {\n if (resizing) cancelAnimationFrame(resizing);\n resizing = requestAnimationFrame(() => {\n resizing = 0;\n });\n };\n const fromPage = () => {\n if (pageScrolls && !resizing) offset = win.scrollY;\n };\n const fromFrame = (event: Event) => {\n if (!pageScrolls && !resizing && event.target instanceof HTMLElement && event.target === frameScroller(rootEl)) offset = event.target.scrollTop;\n };\n win.addEventListener('resize', onResize);\n win.addEventListener('scroll', fromPage, { passive: true });\n rootEl.addEventListener('scroll', fromFrame, { passive: true, capture: true });\n const stop = onPageScrollMediaChange((matches) => {\n pageScrolls = matches;\n const carried = offset;\n if (frame) cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n frame = 0;\n if (matches) win.scrollTo(0, carried);\n else {\n const el = frameScroller(rootEl);\n if (el) el.scrollTop = carried;\n }\n });\n });\n return () => {\n if (frame) cancelAnimationFrame(frame);\n if (resizing) cancelAnimationFrame(resizing);\n win.removeEventListener('resize', onResize);\n win.removeEventListener('scroll', fromPage);\n rootEl.removeEventListener('scroll', fromFrame, { capture: true });\n stop();\n };\n }, [windowShell]);\n\n /*\n * Containment is the Root's, not the pane's. Only the Root can see every live\n * overlay and every child at once. A per-pane effect, given two overlays,\n * inerts the other live overlay and restores values the other effect wrote,\n * which can leave the whole frame inert for good.\n *\n * Exempt are the scrim and each root child that CONTAINS a live overlay, so\n * a pane wrapped in a plain element is not inerted with its wrapper. A child\n * the Root inerts is marked, and closing clears only marked children, so\n * `inert` the app sets on a child is the app's before, during and after.\n */\n const contain = React.useCallback(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const liveEls = livePanes().map((pane) => pane.el);\n for (const child of rootEl.children) {\n if (!(child instanceof HTMLElement) || child.classList.contains('kui-ShellScrim')) continue;\n const holdsLive = liveEls.some((el) => child === el || child.contains(el));\n if (liveEls.length === 0 || holdsLive) {\n if (child.hasAttribute(INERT_MARK)) {\n child.removeAttribute(INERT_MARK);\n child.inert = false;\n }\n } else if (!child.inert) {\n child.setAttribute(INERT_MARK, '');\n child.inert = true;\n }\n }\n }, [livePanes]);\n\n const returnFocusTo = React.useRef<HTMLElement | null>(null);\n const lastLive = React.useRef<LivePane[]>([]);\n const lastFocusInRoot = React.useRef<HTMLElement | null>(null);\n const holdsLock = React.useRef(false);\n\n /*\n * Focus can be taken away after the commit that moved it: a menu that\n * opened or closed a pane restores focus to its own trigger when it\n * finishes closing, which may be inert or hidden by then. For a few frames\n * after an overlay opens or closes, focus that ends up nowhere useful is\n * put back where it belongs.\n */\n const rescueFrame = React.useRef(0);\n const cancelRescue = React.useCallback(() => {\n if (rescueFrame.current) cancelAnimationFrame(rescueFrame.current);\n rescueFrame.current = 0;\n }, []);\n const rescueFocus = React.useCallback(\n (target: HTMLElement, lost: (active: Element | null) => boolean) => {\n cancelRescue();\n let frames = 0;\n const tick = () => {\n rescueFrame.current = 0;\n if (!target.isConnected) return;\n if (lost(target.ownerDocument.activeElement)) {\n target.focus({ preventScroll: true });\n return;\n }\n frames += 1;\n if (frames < RESCUE_FRAMES) rescueFrame.current = requestAnimationFrame(tick);\n };\n rescueFrame.current = requestAnimationFrame(tick);\n },\n [cancelRescue],\n );\n\n React.useEffect(\n () => () => {\n cancelRescue();\n if (holdsLock.current) {\n holdsLock.current = false;\n updatePageLock(-1);\n }\n },\n [cancelRescue],\n );\n\n // No dependency array, on purpose: a pane opening or closing is a render\n // of this component, and so is a child appearing through the Root.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const doc = rootEl.ownerDocument;\n const live = livePanes();\n const liveEls = live.map((pane) => pane.el);\n\n const wantsLock = !contained && live.length > 0;\n if (wantsLock !== holdsLock.current) {\n holdsLock.current = wantsLock;\n updatePageLock(wantsLock ? 1 : -1);\n }\n\n const previous = lastLive.current;\n lastLive.current = live;\n // A pane that left the live set because it closed, as opposed to one\n // that is still open but stopped being an overlay at a breakpoint.\n const closed = previous.filter((pane) => {\n if (liveEls.includes(pane.el)) return false;\n const entry = store.entries.get(pane.name);\n return !pane.el.isConnected || !entry || entry.el !== pane.el || entry.value === 'closed';\n });\n const inClosed = (active: Element | null) => active !== null && closed.some((pane) => pane.el.contains(active));\n\n // The return target is taken on the opening edge, before inerting: inerting\n // the subtree that holds the trigger blurs it. Focus already inside the\n // overlay (a pane that became one at a breakpoint) is no place to return\n // to, and an opener in a portal (a menu item) goes away with its menu, so\n // the last place focus held inside the frame stands in for it.\n if (previous.length === 0 && live.length > 0) {\n const active = doc.activeElement;\n let target = active instanceof HTMLElement && !isNowhere(doc, active) && !liveEls.some((el) => el.contains(active)) ? active : null;\n if (target && !rootEl.contains(target)) {\n const inRoot = lastFocusInRoot.current;\n if (inRoot && inRoot.isConnected && !liveEls.some((el) => el.contains(inRoot))) target = inRoot;\n }\n returnFocusTo.current = target;\n }\n\n contain();\n\n if (live.length === 0) {\n const before = returnFocusTo.current;\n returnFocusTo.current = null;\n // Every overlay that left only stopped being one: focus stays where it is.\n if (closed.length === 0) return;\n const usable = (el: HTMLElement | null) => el !== null && el.isConnected && !el.closest('[inert]') && !inClosed(el);\n let target = usable(before) ? before : null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id);\n if (!target) return;\n const lost = (active: Element | null) => isNowhere(doc, active) || inClosed(active);\n if (lost(doc.activeElement)) target.focus({ preventScroll: true });\n else rescueFocus(target, lost);\n return;\n }\n\n // Some overlays closed while others stay: focus left in a closed one goes\n // to the Trigger that opened it, if a live pane holds it, or to the pane\n // on top.\n if (closed.length > 0) {\n const active = doc.activeElement;\n if (isNowhere(doc, active) || inClosed(active)) {\n let target: HTMLElement | null = null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id, liveEls);\n (target ?? liveEls[liveEls.length - 1]).focus({ preventScroll: true });\n }\n }\n\n // Focus moves in on the opening edge and nowhere else, and only when it\n // is not already somewhere the user put it inside the live set.\n const opened = liveEls.filter((el) => !previous.some((pane) => pane.el === el));\n const active = doc.activeElement;\n if (opened.length > 0 && !liveEls.some((el) => el.contains(active))) {\n opened[0].focus({ preventScroll: true });\n rescueFocus(opened[0], (now) => isNowhere(doc, now) || (now instanceof Element && now.closest('[inert]') !== null));\n }\n });\n\n // A child that appears through its own state while an overlay is live does\n // not render the Root, so the Root watches its children while one is.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0 || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(contain);\n observer.observe(rootEl, { childList: true, subtree: true, attributes: true, attributeFilter: ['inert'] });\n return () => observer.disconnect();\n }, [liveCount, contain]);\n\n /*\n * Escape closes the overlays. It is handled as a React event on the Root, so\n * a component inside a pane that answers Escape in its own onKeyDown runs\n * first, and its preventDefault() or stopPropagation() keeps the pane open.\n * When the Root closes something it stops the event there, so a React\n * Escape handler above the Shell does not act on it too. A layer that\n * listens on the document in the capture phase (Radix dialogs, menus and\n * popovers) answers first and calls preventDefault() when it closes, so an\n * enclosing Kookie Dialog closes before a Shell inside it is asked.\n */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'Escape' || event.defaultPrevented || liveCount === 0) return;\n closeOverlays();\n event.stopPropagation();\n };\n\n // With focus on the document itself (a pane closed under it, or a menu that\n // closed and took focus with it), the Root never sees the key. While an\n // overlay is live the document answers that one case.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0) return;\n const doc = rootEl.ownerDocument;\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented || !isNowhere(doc, event.target)) return;\n closeOverlays();\n };\n doc.addEventListener('keydown', onDocumentKeyDown);\n return () => doc.removeEventListener('keydown', onDocumentKeyDown);\n }, [liveCount, closeOverlays]);\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n onFocus?.(event);\n if (event.target instanceof HTMLElement && rootRef.current?.contains(event.target)) lastFocusInRoot.current = event.target;\n };\n\n // A floating Panel sits beside the Rail when the Rail is showing, and\n // beside its card when the Rail is inset.\n const rail = store.entries.get('rail');\n const railShown = rail !== undefined && rail.value !== undefined && rail.value !== 'closed';\n const railOffset = railShown ? (insetPanes.has('rail') ? `calc(${rail.size}px + 2 * var(--shell-inset-gap))` : `${rail.size}px`) : undefined;\n\n // `full` writes no inline height: the stylesheet states it as 100vh with a\n // 100dvh override where supported, and an inline value would beat both.\n const heightStyle: React.CSSProperties = height === 'full' ? {} : height === 'auto' ? { height: 'auto' } : typeof height === 'number' ? { height: `${height}px` } : { height };\n\n return (\n <ShellStoreContext.Provider value={store}>\n <ShellSizeContext.Provider value={size}>\n <ShellContentContext.Provider value={false}>\n <ShellWindowContext.Provider value={windowShell}>\n <ShellHeaderHeightContext.Provider value={setHeaderHeight}>\n <ShellInsetContext.Provider value={insetContext}>\n {/* A Shell inside a portalled surface's Theme starts with no band, like any other. */}\n <PaneBandSizeContext.Provider value={undefined}>\n {/* The Root is not a widget: it hears Escape bubbling up from the panes,\n after their own handlers, to close the overlays. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n {...props}\n ref={composedRef}\n className={classNames('kui-ShellRoot', className)}\n data-height={height === 'auto' && !contained ? 'auto' : undefined}\n data-contained={contained || undefined}\n data-window={windowShell || undefined}\n data-has-inset={insetPanes.size > 0 || undefined}\n data-overlay-live={liveCount > 0 || undefined}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n style={{\n ...heightStyle,\n ...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}),\n ...(headerHeight !== undefined ? ({ '--kui-shell-header-h': `${headerHeight}px` } as CSSPropertiesWithVars) : {}),\n ...style,\n }}\n >\n {children}\n {/* Root-owned and always mounted. The stylesheet shows it while an\n overlay is live; containment takes the rest of the frame out of\n the accessibility tree, so the scrim itself is hidden from it. */}\n <div className=\"kui-ShellScrim\" aria-hidden onClick={closeOverlays} />\n </div>\n </PaneBandSizeContext.Provider>\n </ShellInsetContext.Provider>\n </ShellHeaderHeightContext.Provider>\n </ShellWindowContext.Provider>\n </ShellContentContext.Provider>\n </ShellSizeContext.Provider>\n </ShellStoreContext.Provider>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = DEFAULT_HEADER_HEIGHT, style, ...props }, ref) => {\n // Rows that stick beneath the header while the page scrolls need its height. The stylesheet\n // assumes the default, so only another height is told to the Root.\n const setHeaderHeight = React.useContext(ShellHeaderHeightContext);\n useLayoutEffect(() => {\n if (!setHeaderHeight) return;\n setHeaderHeight(height === DEFAULT_HEADER_HEIGHT ? undefined : height);\n return () => setHeaderHeight(undefined);\n }, [setHeaderHeight, height]);\n return (\n <header\n {...props}\n ref={ref}\n className={classNames('kui-ShellHeader', className)}\n style={\n {\n ...style,\n '--shell-header-height': `${height}px`,\n } as CSSPropertiesWithVars\n }\n />\n );\n});\nHeader.displayName = 'Shell.Header';\n\n/* \u2500\u2500 Left (deprecated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, meta: { reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss' }) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n inset?: boolean;\n}\n\n/**\n * @deprecated The Root no longer wraps the Rail and Panel in a Left\n * container: each is its own pane. `Shell.Left` renders its children and\n * ignores its own props. Removed in 1.0.\n */\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(({ children }, _ref) => {\n React.useEffect(() => {\n warnOnce('Shell.Left is deprecated and is removed in 1.0. Render Shell.Rail and Shell.Panel directly in Shell.Root.');\n }, []);\n return <>{children}</>;\n});\nLeft.displayName = 'Shell.Left';\n\n/* \u2500\u2500 Rail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype RailOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss' };\n\ntype RailControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; defaultOpen?: never };\ntype RailUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; open?: never };\n\ntype RailProps = React.ComponentPropsWithoutRef<'div'> & {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. */\n onCollapse?: () => void;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (RailControlledProps | RailUncontrolledProps);\n\nconst RAIL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>((props, ref) => {\n const { className, presentation, expandedSize = 64, collapsible: _collapsible, onExpand, onCollapse, children, style, open, defaultOpen, onOpenChange, inset, id, ...domProps } = props;\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'rail',\n label: 'Rail',\n propNames: RAIL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('rail', inset);\n const composedRef = useComposedRefs(ref, pane.setElement);\n\n return (\n <div\n {...domProps}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellRail', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={{ ...style, '--rail-size': `${expandedSize}px` } as CSSPropertiesWithVars}\n >\n <RailContent>{children}</RailContent>\n </div>\n );\n});\nRail.displayName = 'Shell.Rail';\n\n/** The Rail's content carries the index, so the thin row styles can size themselves by it. */\nfunction RailContent({ children }: { children: React.ReactNode }) {\n const size = React.useContext(ShellSizeContext);\n return (\n <div className={classNames('kui-ShellRailContent', `kui-r-size-${size}`)}>\n <PaneChromeScope presentation=\"thin\">{children}</PaneChromeScope>\n </div>\n );\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelOpenChangeMeta = { reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss' };\ntype PanelControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; defaultOpen?: never };\ntype PanelUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; open?: never };\n\ntype PanelSizeControlledProps = { size: number | string; defaultSize?: never };\ntype PanelSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\n\ntype PanelSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype PanelPublicProps = PaneBaseProps &\n (PanelControlledProps | PanelUncontrolledProps) &\n (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\ntype PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {\n Handle: HandleComponent;\n};\n\nconst PANEL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/**\n * A Panel with a `presentation` of its own uses it. One without follows the\n * Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet\n * reads the Rail's attributes for the first paint and the registry carries\n * the Rail's table for the JS mirror.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) => {\n const {\n className,\n presentation,\n defaultOpen,\n open,\n onOpenChange,\n size,\n defaultSize,\n expandedSize = 288,\n minSize = 100,\n maxSize = 800,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n const store = useShellStore('Shell.Panel');\n const rail = usePaneEntry(store, 'rail');\n const own = usePresentationTable(presentation, 'fixed');\n const followsRail = presentation === undefined;\n const presentationTable = followsRail ? (rail?.presentationTable ?? FIXED_TABLE) : own.table;\n const presentationAttributes = followsRail ? { 'data-presentation-follows': '' } : own.attributes;\n\n const pane = usePane({\n name: 'panel',\n label: 'Panel',\n propNames: PANEL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('panel', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Panel: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'panel',\n elementId: pane.id,\n elementRef,\n cssVarName: '--panel-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n // Asked when the effect runs: the Rail registers its table after this\n // Panel first renders, so the render's answer can be out of date.\n overlayingNow: () => {\n const table = followsRail ? (store.entries.get('rail')?.presentationTable ?? FIXED_TABLE) : own.table;\n return table[readBreakpoint()] === 'overlay';\n },\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, PanelHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellPanel', className)}\n {...paneAttributes(pane, presentationAttributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--panel-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--panel-size': initialSize } : {}),\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellPanelContent\">\n <PaneChromeScope>{content}</PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n/* \u2500\u2500 Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n}\n\n/**\n * The work area. It scrolls as it is; with a `Shell.Scroll` child it becomes a column and the\n * Scroll scrolls instead, so a `Shell.PaneHeader float` beside it stays pinned over the page.\n */\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, inset, children, ...props }, ref) => {\n useInsetRegistration('content', inset);\n return (\n <main {...props} ref={ref} className={classNames('kui-ShellContent', className)} data-inset={inset || undefined}>\n <ShellContentContext.Provider value={true}>{children}</ShellContentContext.Provider>\n </main>\n );\n});\nContent.displayName = 'Shell.Content';\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Renders the single child in place of the trigger's own button, with the trigger's click,\n * `aria-controls`, `aria-expanded` and data attributes merged onto it. Use it to make a\n * `Button` the trigger: `<Shell.Trigger asChild><Button iconOnly aria-label=\"Toggle sidebar\">\u2026</Button></Shell.Trigger>`.\n */\n asChild?: boolean;\n /**\n * Whether to show a preview of the target pane on hover while it is closed\n * and not an overlay. Defaults to false.\n *\n * @deprecated Removed in 1.0. A preview reachable only by mouse hover has no\n * keyboard or touch equivalent; open the pane instead.\n */\n peekOnHover?: boolean;\n}\n\n/**\n * A button that drives a pane by name, through the registry. It sets\n * `aria-controls` and `aria-expanded` (left off while an untouched pane\n * cannot know its state yet), renders `type=\"button\"`, and runs the\n * consumer's `onClick` first: calling `preventDefault()` there cancels it. With `asChild` the\n * child is the button, and its own `type` stands.\n */\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, asChild = false, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const store = useShellStore('Shell.Trigger');\n React.useEffect(() => {\n if (target === 'left') warnOnce('Shell.Trigger target=\"left\" is deprecated and is removed in 1.0. Use target=\"rail\".');\n if (peekOnHover) warnOnce('Shell.Trigger: `peekOnHover` is deprecated and is removed in 1.0.');\n }, [target, peekOnHover]);\n const name: PaneName = target === 'left' ? 'rail' : target;\n // Subscribes to its own pane only.\n const entry = usePaneEntry(store, name);\n const shown = entry?.value === undefined ? undefined : entry.value !== 'closed';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented) return;\n const current = store.entries.get(name);\n if (!current) return;\n if (store.peek === name) setShellPeek(store, null);\n if (action === 'toggle') current.toggle('toggle');\n else if (action === 'expand') current.setValue('open', 'toggle');\n else current.setValue('closed', 'toggle');\n };\n\n const handleMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover) return;\n const current = store.entries.get(name);\n if (current && current.value === 'closed' && current.presentation !== 'overlay') setShellPeek(store, name);\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (peekOnHover && store.peek === name) setShellPeek(store, null);\n };\n\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n // A button's default type is `submit`. Stated before the spread, so a consumer's own wins.\n // An asChild child states its own (Button already says `button`; a link has none), so the\n // key is left off rather than passed as undefined.\n {...(!asChild && { type: 'button' as const })}\n aria-controls={entry?.id}\n aria-expanded={shown}\n {...props}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-shell-trigger={target}\n data-shell-action={action}\n >\n {children}\n </Comp>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n PaneHeader,\n PaneFooter,\n Scroll,\n useShell,\n useSidebarMode,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n type ShellRootProps as RootProps,\n type ShellHeaderProps as HeaderProps,\n type RailProps,\n type PanelPublicProps as PanelProps,\n type SidebarPublicProps as SidebarProps,\n type ShellContentProps as ContentProps,\n type InspectorPublicProps as InspectorProps,\n type BottomPublicProps as BottomProps,\n type TriggerProps,\n type PaneHeaderProps,\n type PaneFooterProps,\n type ScrollProps,\n};\n"],
5
- "mappings": ";g4BAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,GAAA,YAAAC,GAAA,WAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,YAAAC,GAAA,8BAAAC,GAAA,aAAAC,GAAA,mBAAAC,KAsBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,OAAY,WACrB,OAAS,mBAAAC,GAAiB,mBAAAC,OAAuB,oBA4DjD,IAAIC,GAAkB,EACtB,SAASC,GAAeC,EAAe,CACrCF,GAAkB,KAAK,IAAI,EAAGA,GAAkBE,CAAK,EACrD,IAAMC,EAA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AQ0G,GAAa1H,EAAOwJ,CAAI,EAChCC,EAAQzI,GAAO,QAAU,OAAY,OAAYA,EAAM,QAAU,SAEjE0I,EAAe1H,GAA+C,CAElE,GADAqH,IAAUrH,CAAK,EACXA,EAAM,iBAAkB,OAC5B,IAAM2H,EAAU3J,EAAM,QAAQ,IAAIwJ,CAAI,EACjCG,IACD3J,EAAM,OAASwJ,GAAMI,GAAa5J,EAAO,IAAI,EAC7CkJ,IAAW,SAAUS,EAAQ,OAAO,QAAQ,EACvCT,IAAW,SAAUS,EAAQ,SAAS,OAAQ,QAAQ,EAC1DA,EAAQ,SAAS,SAAU,QAAQ,EAC1C,EAEME,EAAoB7H,GAA+C,CAEvE,GADAsH,IAAetH,CAAK,EAChB,CAACmH,EAAa,OAClB,IAAMQ,EAAU3J,EAAM,QAAQ,IAAIwJ,CAAI,EAClCG,GAAWA,EAAQ,QAAU,UAAYA,EAAQ,eAAiB,WAAWC,GAAa5J,EAAOwJ,CAAI,CAC3G,EAEMM,EAAoB9H,GAA+C,CACvEuH,IAAevH,CAAK,EAChBmH,GAAenJ,EAAM,OAASwJ,GAAMI,GAAa5J,EAAO,IAAI,CAClE,EAEM+J,EAAOX,EAAUY,GAAK,KAAO,SACnC,OACE,gBAACD,EAAA,CAIE,GAAI,CAACX,GAAW,CAAE,KAAM,QAAkB,EAC3C,gBAAepI,GAAO,GACtB,gBAAeyI,EACd,GAAG7J,EACJ,IAAKC,EACL,QAAS6J,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoB9G,EACpB,oBAAmBkG,GAElB7J,CACH,CAEJ,CAAC,EACD4J,GAAQ,YAAc",
6
- "names": ["shell_exports", "__export", "Bottom", "Content", "Header", "Inspector", "Left", "PaneFooter", "PaneHeader", "Panel", "Rail", "Root", "Scroll", "Sidebar", "Trigger", "useResponsivePresentation", "useShell", "useSidebarMode", "React", "classNames", "Slot", "useComposedRefs", "useLayoutEffect", "pageLockHolders", "updatePageLock", "delta", "doc", "INERT_MARK", "RESCUE_FRAMES", "isNowhere", "el", "triggerFor", "id", "within", "pane", "shellSizePropDef", "ShellHeaderHeightContext", "DEFAULT_HEADER_HEIGHT", "frameScroller", "rootEl", "Root", "className", "children", "height", "containedProp", "sizeProp", "style", "onKeyDown", "onFocus", "props", "ref", "size", "useThemeSize", "store", "createShellStore", "subscribe", "listener", "subscribeShellStore", "rootRef", "composedRef", "useComposedRefs", "insetPanes", "setInsetPanes", "registerInset", "prev", "unregisterInset", "next", "insetContext", "closeOverlays", "entry", "livePanes", "liveCount", "contained", "windowShell", "headerHeight", "setHeaderHeight", "win", "pageScrolls", "pageScrollMatches", "offset", "frame", "resizing", "onResize", "fromPage", "fromFrame", "event", "stop", "onPageScrollMediaChange", "matches", "carried", "contain", "liveEls", "child", "holdsLive", "returnFocusTo", "lastLive", "lastFocusInRoot", "holdsLock", "rescueFrame", "cancelRescue", "rescueFocus", "target", "lost", "frames", "tick", "live", "wantsLock", "previous", "closed", "inClosed", "active", "inRoot", "before", "opened", "now", "observer", "handleKeyDown", "onDocumentKeyDown", "handleFocus", "rail", "railOffset", "heightStyle", "ShellStoreContext", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "ShellInsetContext", "PaneBandSizeContext", "classNames", "Header", "useLayoutEffect", "Left", "_ref", "RAIL_PROP_NAMES", "Rail", "presentation", "expandedSize", "_collapsible", "onExpand", "onCollapse", "open", "defaultOpen", "onOpenChange", "inset", "domProps", "table", "attributes", "usePresentationTable", "usePane", "toPaneValue", "navigationRest", "value", "reason", "useInsetRegistration", "paneAttributes", "RailContent", "PaneChromeScope", "PANEL_PROP_NAMES", "Panel", "defaultSize", "minSize", "maxSize", "resizable", "collapsible", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "useShellStore", "usePaneEntry", "own", "followsRail", "presentationTable", "FIXED_TABLE", "presentationAttributes", "detailRest", "elementRef", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "PanelHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "Content", "Trigger", "action", "peekOnHover", "asChild", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave", "Comp", "Slot"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as p}from"./chunk-FATCGZZE.js";import{a as D}from"./chunk-7VJF6EXN.js";import{a as g}from"./chunk-JP36JSNP.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as m}from"./chunk-4MNRLB57.js";import{c as r}from"./chunk-OKQAVYW4.js";import{a as n}from"./chunk-AQKSO3SW.js";import{c as s}from"./chunk-5ON3XLRD.js";import{a as w}from"./chunk-VQPANPMI.js";var S={};w(S,{Close:()=>y,Content:()=>C,Description:()=>R,Root:()=>c,Title:()=>d,Trigger:()=>f});import*as o from"react";import W from"classnames";import{Dialog as t}from"radix-ui";var c=e=>o.createElement(t.Root,{...e,modal:!0});c.displayName="Dialog.Root";var f=o.forwardRef(({children:e,...i},a)=>o.createElement(t.Trigger,{...i,ref:a,asChild:!0},l(e)));f.displayName="Dialog.Trigger";var{align:O,...P}=p,B={align:O},C=o.forwardRef(({align:e,...i},a)=>{let T=s(i,P.size),{className:v}=r({align:e},B),{className:u,forceMount:h,container:E,onCloseAutoFocus:N,...x}=r(T,P);return D(),o.createElement(t.Portal,{container:E,forceMount:h},o.createElement(n,{asChild:!0},o.createElement(t.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay"},o.createElement("div",{className:"kui-BaseDialogScroll kui-DialogScroll"},o.createElement("div",{className:`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${v}`},o.createElement(t.Content,{...x,ref:a,className:W("kui-BaseDialogContent","kui-DialogContent",u),"aria-modal":"true",onCloseAutoFocus:k=>{N?.(k),document.body.style.pointerEvents=""}}))))))});C.displayName="Dialog.Content";var d=o.forwardRef((e,i)=>o.createElement(t.Title,{asChild:!0},o.createElement(g,{size:"5",trim:"start",...e,asChild:!1,ref:i})));d.displayName="Dialog.Title";var R=o.forwardRef((e,i)=>o.createElement(t.Description,{asChild:!0},o.createElement(m,{as:"p",size:"3",...e,asChild:!1,ref:i})));R.displayName="Dialog.Description";var y=o.forwardRef(({children:e,...i},a)=>o.createElement(t.Close,{...i,ref:a,asChild:!0},l(e)));y.displayName="Dialog.Close";export{c as a,f as b,C as c,d,R as e,y as f,S as g};
3
- //# sourceMappingURL=chunk-5BX2YZV6.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/dialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nDialogTrigger.displayName = 'Dialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = dialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>, DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n // Cleanup stuck pointer-events on body\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-DialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${alignClassName}`}>\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-BaseDialogContent', 'kui-DialogContent', className)}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n document.body.style.pointerEvents = '';\n }}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </DialogPrimitive.Portal>\n );\n});\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>((props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>((props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = 'Dialog.Close';\n\nexport { DialogRoot as Root, DialogTrigger as Trigger, DialogContent as Content, DialogTitle as Title, DialogDescription as Description, DialogClose as Close };\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
5
- "mappings": ";wWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAe1C,IAAMC,EAAyCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EAChGD,EA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AAS,GAAO,IAAKI,EAAc,CAC/E,CACD,EACDqB,EAAY,YAAc,eAI1B,IAAME,EAA0B,aAA6D,CAAC3B,EAAOI,IACnG,gBAACH,EAAgB,YAAhB,CAA4B,QAAO,IAClC,gBAAC2B,EAAA,CAAK,GAAG,IAAI,KAAK,IAAK,GAAG5B,EAAO,QAAS,GAAO,IAAKI,EAAc,CACtE,CACD,EACDuB,EAAkB,YAAc,qBAIhC,IAAME,EAAoB,aAAiD,CAAC,CAAE,SAAA1B,EAAU,GAAGH,CAAM,EAAGI,IAClG,gBAACH,EAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKI,EAAc,QAAO,IACzDC,EAAoBF,CAAQ,CAC/B,CACD,EACD0B,EAAY,YAAc",
6
- "names": ["dialog_exports", "__export", "DialogClose", "DialogContent", "DialogDescription", "DialogRoot", "DialogTitle", "DialogTrigger", "React", "classNames", "DialogPrimitive", "DialogRoot", "props", "DialogPrimitive", "DialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "dialogContentPropDefs", "alignPropDefs", "DialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "event", "DialogTitle", "Heading", "DialogDescription", "Text", "DialogClose"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{c as t}from"./chunk-FVRVBB6O.js";import{a as o}from"./chunk-ANQLWGFN.js";import*as e from"react";var m=e.forwardRef((r,a)=>e.createElement(o.Provider,{value:null},e.createElement(t,{...r,ref:a})));m.displayName="PortalTheme";export{m as a};
3
- //# sourceMappingURL=chunk-AQKSO3SW.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/portal-theme.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\n\nimport { Theme } from '../theme.js';\nimport { PaneBandSizeContext } from './pane-band-context.js';\n\n/**\n * The Theme at the root of a portalled surface (Popover, Dialog, Sheet, menus, Tooltip). The\n * surface renders outside any Shell pane even though context flows into it, so a Toolbar in it\n * does not take the pane's band size. A `Theme asChild` an app nests in a pane keeps the band.\n */\nconst PortalTheme = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<typeof Theme>>((props, forwardedRef) => (\n <PaneBandSizeContext.Provider value={null}>\n <Theme {...props} ref={forwardedRef} />\n </PaneBandSizeContext.Provider>\n));\nPortalTheme.displayName = 'PortalTheme';\n\nexport { PortalTheme };\n"],
5
- "mappings": ";gFAAA,UAAYA,MAAW,QAUvB,IAAMC,EAAoB,aAAyE,CAACC,EAAOC,IACzG,gBAACC,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAACC,EAAA,CAAO,GAAGH,EAAO,IAAKC,EAAc,CACvC,CACD,EACDF,EAAY,YAAc",
6
- "names": ["React", "PortalTheme", "props", "forwardedRef", "PaneBandSizeContext", "Theme"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{f as x}from"./chunk-MJROOEPE.js";import{a as T,c as b}from"./chunk-3QWGSRYC.js";import{a as V,b as k,c as I}from"./chunk-LTUW36HM.js";import{a as N,b as w,c as B}from"./chunk-QKCNGEX4.js";import{a as E}from"./chunk-WEBNIUEX.js";import{b as A,d as H,g as U}from"./chunk-XUCR7L4G.js";import{a as y}from"./chunk-G66WDIIV.js";import{o as M}from"./chunk-GHWEXMF6.js";import*as e from"react";import pe from"classnames";import{useComposedRefs as ue}from"radix-ui/internal";var D=t=>t==="collapsed"?"closed":"open",Se=t=>t==="closed"?"collapsed":"expanded";function L(t){if(t===void 0)return;if(typeof t=="string")return D(t);let n={};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=D(i));return n}var ce={controlled:"state",default:"defaultState"},be={initial:"overlay",sm:"fixed"},O=e.forwardRef((t,n)=>{let{className:r,presentation:i=be,expandedSize:o=288,minSize:s=200,maxSize:d=400,resizable:m=!1,collapsible:_=!0,onExpand:$,onCollapse:W,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,children:K,style:J,state:Q,defaultState:X,onStateChange:Y,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae=50,inset:h,id:te,...c}=t,{table:g,attributes:ne}=I(i,"fixed"),a=V({name:"sidebar",label:"Sidebar",propNames:ce,id:te,controlled:L(Q),defaultValue:L(X),presentationTable:g,builtIn:A,onChange:(de,le)=>Y?.(Se(de),{reason:le}),onExpand:$,onCollapse:W,size:o});M("sidebar",h),e.useEffect(()=>{(l!==void 0||p!==void 0||u!==void 0||S!==void 0)&&void 0},[l,p,u,S]);let z=e.useRef(null),ie=ue(n,a.setElement,z),oe=w({name:"sidebar",elementId:a.id,elementRef:z,cssVarName:"--sidebar-size",orientation:"vertical",edge:"end",growth:H,expandedSize:o,minSize:s,maxSize:d,resizable:m,collapsible:_,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,overlaying:a.overlaying,overlayingNow:()=>g[y()]==="overlay",requestCollapse:()=>a.setValue("closed","toggle"),requestToggle:()=>a.toggle("toggle")}),{handles:v,content:re}=B(K,b),se=m&&a.value!=="closed"&&!a.overlaying?e.createElement(E.Provider,{value:oe},v.length>0?v:e.createElement(T,null)):null,R=a.peeking?`var(--sidebar-size, ${o}px)`:void 0,C=N(f,P,s,d);return e.createElement("div",{...U(c),role:c.role??"navigation",id:a.id,ref:ie,className:pe("kui-ShellPane","kui-ShellSidebar",r),...k(a,ne),"data-inset":h||void 0,tabIndex:a.overlaying?-1:c.tabIndex,style:{...J,"--sidebar-expanded-size":`${o}px`,...C?{"--sidebar-size":C}:{},"--sidebar-min-size":`${s}px`,"--sidebar-max-size":`${d}px`,...R?{"--peek-sidebar-width":R}:{}}},e.createElement("div",{className:"kui-ShellSidebarContent"},e.createElement(x,null,re)),se)});O.displayName="Shell.Sidebar";O.Handle=b;export{O as a};
3
- //# sourceMappingURL=chunk-AS2STDGA.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/shell-sidebar.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { PaneHandle, SidebarHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce, type PaneValue } from './shell-store.js';\nimport { navigationRest, startAnchoredGrowth, withoutRemovedPaneProps } from './shell-rest.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport { PaneChromeScope } from './pane-chrome.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, Responsive, SidebarMode } from '../shell.types.js';\n\ntype SidebarStateChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype SidebarControlledProps = { state: Responsive<SidebarMode>; onStateChange?: (state: SidebarMode, meta: SidebarStateChangeMeta) => void; defaultState?: never };\ntype SidebarUncontrolledProps = { defaultState?: SidebarMode | Partial<Record<Breakpoint, SidebarMode>>; onStateChange?: (state: SidebarMode, meta: SidebarStateChangeMeta) => void; state?: never };\ntype SidebarPublicProps = PaneBaseProps & {\n size?: number | string;\n defaultSize?: number | string;\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (SidebarControlledProps | SidebarUncontrolledProps);\n\ntype SidebarComponent = React.ForwardRefExoticComponent<SidebarPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof SidebarHandle };\n\nconst toValue = (mode: SidebarMode): PaneValue => (mode === 'collapsed' ? 'closed' : 'open');\nconst toMode = (value: PaneValue): SidebarMode => (value === 'closed' ? 'collapsed' : 'expanded');\n\nfunction modeToValue(state: Responsive<SidebarMode> | undefined): PaneValue | Partial<Record<Breakpoint, PaneValue>> | undefined {\n if (state === undefined) return undefined;\n if (typeof state === 'string') return toValue(state);\n const map: Partial<Record<Breakpoint, PaneValue>> = {};\n for (const [bp, mode] of Object.entries(state) as Array<[Breakpoint, SidebarMode | undefined]>) {\n if (mode !== undefined) map[bp] = toValue(mode);\n }\n return map;\n}\n\nconst SIDEBAR_PROP_NAMES = { controlled: 'state', default: 'defaultState' };\n\n/** Since 0.8.0 the Sidebar is in the frame from 768px up, the boundary kookie-ui-v2 uses everywhere. It was 1024px. */\nconst SIDEBAR_DEFAULT_PRESENTATION = { initial: 'overlay', sm: 'fixed' } as const;\n\n\nexport const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>((props, ref) => {\n const {\n className,\n presentation = SIDEBAR_DEFAULT_PRESENTATION,\n expandedSize = 288,\n minSize = 200,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n state,\n defaultState,\n onStateChange,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'sidebar',\n label: 'Sidebar',\n propNames: SIDEBAR_PROP_NAMES,\n id,\n controlled: modeToValue(state),\n defaultValue: modeToValue(defaultState),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onStateChange?.(toMode(value), { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('sidebar', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Sidebar: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'sidebar',\n elementId: pane.id,\n elementRef,\n cssVarName: '--sidebar-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, SidebarHandle);\n const handle =\n resizable && pane.value !== 'closed' && !pane.overlaying ? (\n <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider>\n ) : null;\n\n // A peek previews the width the next toggle opens to.\n const peekWidth = pane.peeking ? `var(--sidebar-size, ${expandedSize}px)` : undefined;\n\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellSidebar', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--sidebar-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--sidebar-size': initialSize } : {}),\n '--sidebar-min-size': `${minSize}px`,\n '--sidebar-max-size': `${maxSize}px`,\n ...(peekWidth ? { '--peek-sidebar-width': peekWidth } : {}),\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellSidebarContent\">\n <PaneChromeScope>{content}</PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as SidebarComponent;\n\nSidebar.displayName = 'Shell.Sidebar';\nSidebar.Handle = SidebarHandle;\n\nexport type { SidebarPublicProps };\n"],
5
- "mappings": ";iXAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBA0BhC,IAAMC,EAAWC,GAAkCA,IAAS,YAAc,SAAW,OAC/EC,GAAUC,GAAmCA,IAAU,SAAW,YAAc,WAEtF,SAASC,EAAYC,EAA4G,CAC/H,GAAIA,IAAU,OAAW,OACzB,GAAI,OAAOA,GAAU,SAAU,OAAOL,EAAQK,CAAK,EACnD,IAAMC,EAA8C,CAAC,EACrD,OAAW,CAACC,EAAIN,CAAI,IAAK,OAAO,QAAQI,CAAK,EACvCJ,IAAS,SAAWK,EAAIC,CAAE,EAAIP,EAAQC,CAAI,GAEhD,OAAOK,CACT,CAEA,IAAME,GAAqB,CAAE,WAAY,QAAS,QAAS,cAAe,EAGpEC,GAA+B,CAAE,QAAS,UAAW,GAAI,OAAQ,EAG1DC,EAAgB,aAA+C,CAACC,EAAOC,IAAQ,CAC1F,GAAM,CACJ,UAAAC,EACA,aAAAC,EAAeL,GACf,aAAAM,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,OAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,MAAA1B,EACA,aAAA2B,EACA,cAAAC,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,GAC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AAU8B,CAAa,EAC3DC,GACJ3C,GAAa2B,EAAK,QAAU,UAAY,CAACA,EAAK,WAC5C,gBAACiB,EAAkB,SAAlB,CAA2B,MAAOT,IAASI,EAAQ,OAAS,EAAIA,EAAU,gBAACM,EAAA,IAAW,CAAG,EACxF,KAGAC,EAAYnB,EAAK,QAAU,uBAAuB9B,CAAY,MAAQ,OAEtEkD,EAAcC,EAAmBhC,EAAMC,EAAanB,EAASC,CAAO,EAC1E,OACE,gBAAC,OACE,GAAGkD,EAAwB1B,CAAQ,EACpC,KAAMA,EAAS,MAAQ,aACvB,GAAII,EAAK,GACT,IAAKM,GACL,UAAWiB,GAAW,gBAAiB,mBAAoBvD,CAAS,EACnE,GAAGwD,EAAexB,EAAMF,EAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGV,EACH,0BAA2B,GAAGhB,CAAY,KAC1C,GAAIkD,EAAc,CAAE,iBAAkBA,CAAY,EAAI,CAAC,EACvD,qBAAsB,GAAGjD,CAAO,KAChC,qBAAsB,GAAGC,CAAO,KAChC,GAAI+C,EAAY,CAAE,uBAAwBA,CAAU,EAAI,CAAC,CAC3D,GAGF,gBAAC,OAAI,UAAU,2BACb,gBAACM,EAAA,KAAiBZ,EAAQ,CAC5B,EACCG,EACH,CAEJ,CAAC,EAEDnD,EAAQ,YAAc,gBACtBA,EAAQ,OAASkD",
6
- "names": ["React", "classNames", "useComposedRefs", "toValue", "mode", "toMode", "value", "modeToValue", "state", "map", "bp", "SIDEBAR_PROP_NAMES", "SIDEBAR_DEFAULT_PRESENTATION", "Sidebar", "props", "ref", "className", "presentation", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "defaultState", "onStateChange", "size", "defaultSize", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "navigationRest", "reason", "useInsetRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "SidebarHandle", "handle", "PaneResizeContext", "PaneHandle", "peekWidth", "initialSize", "useInitialPaneSize", "withoutRemovedPaneProps", "classNames", "paneAttributes", "PaneChromeScope"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as P}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-7VJF6EXN.js";import{a as h}from"./chunk-JP36JSNP.js";import{a}from"./chunk-TGRHRMQI.js";import{a as f}from"./chunk-4MNRLB57.js";import{c as p}from"./chunk-OKQAVYW4.js";import{a as c}from"./chunk-AQKSO3SW.js";import{c as m}from"./chunk-5ON3XLRD.js";import{a as W}from"./chunk-VQPANPMI.js";var B={};W(B,{Close:()=>T,Content:()=>R,Description:()=>D,Root:()=>C,Title:()=>y,Trigger:()=>u});import*as e from"react";import k from"classnames";import{Dialog as r}from"radix-ui";var C=o=>e.createElement(r.Root,{...o,modal:!0});C.displayName="Sheet.Root";var u=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Trigger,{...t,ref:i,asChild:!0},a(o)));u.displayName="Sheet.Trigger";var{align:Q,...w}=P,d=w,S=e.createContext(null),R=e.forwardRef((o,t)=>{let{side:i="start",forceMount:s,container:n,className:v,...E}=o,b=m(E,d.size),N={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[i],{className:x,...O}=p(b,d),z=e.useRef(0),M=e.useCallback(l=>{typeof t=="function"?t(l):t&&(t.current=l)},[t]);return g(),e.createElement(r.Portal,{container:n,forceMount:s},e.createElement(S.Provider,{value:z},e.createElement(c,{asChild:!0},e.createElement(r.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay"},e.createElement(r.Content,{...O,ref:M,className:k("kui-BaseDialogContent","kui-SheetContent",v,x),"data-side":N,"aria-modal":"true"})))))});R.displayName="Sheet.Content";var y=e.forwardRef(({size:o="4",weight:t="medium",...i},s)=>{let n=e.useContext(S);return e.useLayoutEffect(()=>{if(n)return n.current+=1,()=>{n.current-=1}},[n]),e.createElement(r.Title,{asChild:!0},e.createElement(h,{ref:s,size:o,weight:t,...i}))});y.displayName="Sheet.Title";var D=e.forwardRef(({size:o="2",emphasis:t="medium",...i},s)=>e.createElement(r.Description,{asChild:!0},e.createElement(f,{ref:s,size:o,emphasis:t,...i})));D.displayName="Sheet.Description";var T=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Close,{...t,ref:i,asChild:!0},a(o)));T.displayName="Sheet.Close";export{C as a,u as b,R as c,y as d,D as e,T as f,B as g};
3
- //# sourceMappingURL=chunk-HR2VHGJ5.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/sheet.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * Sheet\n *\n * A side-placed overlay built on top of Radix Dialog. It inherits accessibility,\n * focus management, overlay behavior, and sizing scales from the base dialog, and\n * adds side placement and slide motion suited for navigation panels and drawers.\n *\n * Structure mirrors Dialog:\n * - Root, Trigger, Content, Title, Description, Close\n *\n * Notes\n * - Side: set with `side` on `Sheet.Content`. Aliases: `left` \u2192 `start`, `right` \u2192 `end`.\n * - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Size follows the\n * Theme size; start/end sheets cap at the size's overlay width unless maxWidth is set.\n * - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.\n * Radix owns the focus trap, initial focus and the return of focus to the trigger.\n *\n * Example\n * <Sheet.Root>\n * <Sheet.Trigger>\n * <Button>Open</Button>\n * </Sheet.Trigger>\n * <Sheet.Content side=\"end\" width={{ initial: '280px', md: '360px' }}>\n * <Sheet.Title>Details</Sheet.Title>\n * ...\n * <Sheet.Close>\n * <Button>Close</Button>\n * </Sheet.Close>\n * </Sheet.Content>\n * </Sheet.Root>\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { HeadingProps } from './heading.js';\n\n/**\n * Supported sides for the Sheet.\n * Aliases are normalized RTL-aware: `left` \u2192 `start`, `right` \u2192 `end`.\n */\ntype SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Sheet is a side-placed overlay built on the Dialog primitive.\n * It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.\n */\n\n// Root\n/**\n * Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).\n */\ninterface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst Root: React.FC<SheetRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nRoot.displayName = 'Sheet.Root';\n\n// Trigger\n/** Element type for `Sheet.Trigger`. */\ntype SheetTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\n/** Props for `Sheet.Trigger` (expects a single element child). */\ninterface SheetTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst Trigger = React.forwardRef<SheetTriggerElement, SheetTriggerProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Trigger {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nTrigger.displayName = 'Sheet.Trigger';\n\n// Content\n/** Element type for `Sheet.Content`. */\n// Reuse dialog content prop defs for size/width/height tokens.\n// Built once at module scope: `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them every time a sheet renders.\nconst { align: _alignPropDef, ...dialogPropDefsForSheet } = dialogContentPropDefs;\nconst sheetPropDefs = dialogPropDefsForSheet;\n\n/** Counts the Sheet.Title elements mounted inside a Sheet.Content, for the dev-only name check. */\nconst SheetTitleCountContext = React.createContext<React.MutableRefObject<number> | null>(null);\n\ntype SheetContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface SheetContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n Omit<DialogContentOwnProps, 'align'> {\n /** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */\n side?: SheetSide;\n /** Optional DOM container to portal into. Defaults to `document.body`. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n\n/**\n * Renders the Sheet panel. Normalizes left/right to logical start/end and\n * forwards dialog sizing props. Provide an accessible name via `Sheet.Title`\n * or `aria-label`.\n */\nconst Content = React.forwardRef<SheetContentElement, SheetContentProps>((allProps, forwardedRef) => {\n const { side = 'start', forceMount, container, className, ...ownProps } = allProps;\n const restProps = useThemeSizeProps(ownProps, sheetPropDefs.size);\n const normalizedSideMap: Record<SheetSide, 'start' | 'end' | 'top' | 'bottom'> = {\n left: 'start',\n right: 'end',\n start: 'start',\n end: 'end',\n top: 'top',\n bottom: 'bottom',\n };\n const normalizedSide = normalizedSideMap[side];\n // Size/width/height class names come from the dialog defs \u2014 see `sheetPropDefs`.\n const { className: extractedClassName, ...contentProps } = extractProps(restProps, sheetPropDefs);\n\n // Dev-only a11y guard: the panel needs a name. A Sheet.Title anywhere inside counts it\n // in a layout effect, which runs before this ref is attached, so nesting doesn't matter.\n const titleCountRef = React.useRef(0);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n if (process.env.NODE_ENV !== 'production' && node) {\n const hasName = titleCountRef.current > 0 || Boolean(node.getAttribute('aria-label')) || Boolean(node.getAttribute('aria-labelledby'));\n if (!hasName) {\n console.warn('Sheet.Content: Missing accessible name. Include Sheet.Title inside it or provide aria-label.');\n }\n }\n },\n [forwardedRef],\n );\n\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <SheetTitleCountContext.Provider value={titleCountRef}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay\">\n <DialogPrimitive.Content\n {...contentProps}\n ref={combinedRef}\n className={classNames('kui-BaseDialogContent', 'kui-SheetContent', className, extractedClassName)}\n data-side={normalizedSide}\n aria-modal=\"true\"\n />\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </SheetTitleCountContext.Provider>\n </DialogPrimitive.Portal>\n );\n});\nContent.displayName = 'Sheet.Content';\n\n// Title - renders as Heading with sensible defaults\ntype SheetTitleElement = React.ElementRef<typeof Heading>;\ntype SheetTitleProps = HeadingProps;\n/** Accessible title for the Sheet. Renders as Heading with sensible defaults. */\nconst Title = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ size = '4', weight = 'medium', ...props }, ref) => {\n const titleCountRef = React.useContext(SheetTitleCountContext);\n React.useLayoutEffect(() => {\n if (!titleCountRef) return;\n titleCountRef.current += 1;\n return () => {\n titleCountRef.current -= 1;\n };\n }, [titleCountRef]);\n return (\n <DialogPrimitive.Title asChild>\n <Heading ref={ref} size={size} weight={weight} {...props} />\n </DialogPrimitive.Title>\n );\n});\nTitle.displayName = 'Sheet.Title';\n\n// Description - renders as Text with sensible defaults\ntype SheetDescriptionElement = React.ElementRef<typeof Text>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof Text>;\n/** Supplementary description text for Sheet content. Renders as Text with sensible defaults. */\nconst Description = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(({ size = '2', emphasis = 'medium', ...rest }, ref) => (\n <DialogPrimitive.Description asChild>\n <Text ref={ref} size={size} emphasis={emphasis} {...rest} />\n </DialogPrimitive.Description>\n));\nDescription.displayName = 'Sheet.Description';\n\ntype SheetCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface SheetCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\n/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */\nconst Close = React.forwardRef<SheetCloseElement, SheetCloseProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Close {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nClose.displayName = 'Sheet.Close';\n\nexport { Root, Trigger, Content, Title, Description, Close };\nexport type {\n SheetRootProps as RootProps,\n SheetTriggerProps as TriggerProps,\n SheetContentProps as ContentProps,\n SheetTitleProps as TitleProps,\n SheetDescriptionProps as DescriptionProps,\n SheetCloseProps as CloseProps,\n};\n"],
5
- "mappings": ";mWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAkCA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WA+B1C,IAAMC,EAAkCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EACzFD,EAAK,YAAc,aAOnB,IAAMG,EAAgB,aAAmD,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IAChG,gBAACH,EAAgB,QAAhB,CAAyB,GAAGD,EAAO,IAAKI,EAAK,QAAO,IAClDC,EAAoBF,CAAQ,CAC/B,CACD,EACDD,EAAQ,YAAc,gBAQtB,GAAM,CAAE,MAAOI,EAAe,GAAGC,CAAuB,EAAIC,EACtDC,EAAgBF,EAGhBG,EAA+B,gBAAqD,IAAI,EAiBxFC,EAAgB,aAAmD,CAACC,EAAUC,IA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M,OAAQC,EAAS,GAAGjC,EAAO,CAC5D,CAEJ,CAAC,EACD+B,EAAM,YAAc,cAMpB,IAAMI,EAAoB,aAA2D,CAAC,CAAE,KAAAH,EAAO,IAAK,SAAAI,EAAW,SAAU,GAAGC,CAAK,EAAGjC,IAClI,gBAACH,EAAgB,YAAhB,CAA4B,QAAO,IAClC,gBAACqC,EAAA,CAAK,IAAKlC,EAAK,KAAM4B,EAAM,SAAUI,EAAW,GAAGC,EAAM,CAC5D,CACD,EACDF,EAAY,YAAc,oBAK1B,IAAMI,EAAc,aAA+C,CAAC,CAAE,SAAApC,EAAU,GAAGH,CAAM,EAAGI,IAC1F,gBAACH,EAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKI,EAAK,QAAO,IAChDC,EAAoBF,CAAQ,CAC/B,CACD,EACDoC,EAAM,YAAc",
6
- "names": ["sheet_exports", "__export", "Close", "Content", "Description", "Root", "Title", "Trigger", "React", "classNames", "DialogPrimitive", "Root", "props", "DialogPrimitive", "Trigger", "children", "ref", "requireReactElement", "_alignPropDef", "dialogPropDefsForSheet", "dialogContentPropDefs", "sheetPropDefs", "SheetTitleCountContext", "Content", "allProps", "forwardedRef", "side", "forceMount", "container", "className", "ownProps", "restProps", "useThemeSizeProps", "normalizedSide", "extractedClassName", "contentProps", "extractProps", "titleCountRef", "combinedRef", "node", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "Title", "size", "weight", "Heading", "Description", "emphasis", "rest", "Text", "Close"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as X,b as oo,c as eo,e as W,f as to,i as ro,l as no}from"./chunk-67UEMB4K.js";import{a as B}from"./chunk-KJZSXLIX.js";import{a as Q}from"./chunk-4MNRLB57.js";import{a as q}from"./chunk-7N2Q5WOM.js";import{h as J}from"./chunk-MJROOEPE.js";import{c as U}from"./chunk-OKQAVYW4.js";import{b as L}from"./chunk-5ON3XLRD.js";import*as o from"react";import{useLayoutEffect as D}from"radix-ui/internal";import x from"classnames";import{Toolbar as N}from"radix-ui";var bo=["1","2","3","4"],To=["horizontal","vertical"],g={size:{type:"enum",className:"kui-r-size",values:bo,default:"2"},orientation:{type:"enum",values:To,default:"horizontal"}};var E=o.createContext(null),F=o.createContext(null),M=o.createContext(!1);function Io(){return o.useContext(M)}var H=o.forwardRef((e,t)=>{let r=J(),a=L(e.size??r??void 0,g.size),s=e.orientation??g.orientation.default,{className:i,orientation:n,backdrop:l=!1,children:u,...d}=U({...e,size:a},g,q),p=o.useMemo(()=>({size:a,orientation:s,backdrop:l}),[a,s,l]);return o.createElement(N.Root,{...d,ref:t,orientation:s,"data-backdrop":l||void 0,className:x("kui-Toolbar",i)},o.createElement(E.Provider,{value:p},u))});H.displayName="Toolbar";var so=o.forwardRef(({className:e,disabled:t=!1,children:r,...a},s)=>{let i=o.useContext(E),n=o.useContext(M),l=o.useMemo(()=>({disabled:t}),[t]);return n?o.createElement(to,{...a,ref:s,className:e},o.createElement(F.Provider,{value:l},r)):o.createElement("div",{role:"group","data-orientation":i?.orientation??"horizontal","data-disabled":t||void 0,...a,ref:s,className:x("kui-ToolbarGroup",e)},o.createElement(F.Provider,{value:l},r))});so.displayName="Toolbar.Group";var mo=new Set(["id","className","style","title"]);function ao(e){return e===!0||e==="true"}function Po(e){return o.isValidElement(e)&&e.type==="button"}var A=o.forwardRef((e,t)=>{let r=o.useContext(E),a=o.useContext(F),s=o.useContext(M),{iconOnly:i,size:n,variant:l,emphasis:u,color:d,disabled:p,asChild:v,onKeyDown:y,...w}=e,h=p||a?.disabled||void 0;if(s){let T={};for(let m of Object.keys(w))(/^on[A-Z]/.test(m)||m.startsWith("aria-")||m.startsWith("data-")||mo.has(m))&&(T[m]=w[m]);return y&&(T.onKeyDown=y),o.createElement(io,{...T,ref:t,asChild:v,iconOnly:i,disabled:h,color:d,pressed:e["aria-pressed"]===void 0?void 0:ao(e["aria-pressed"])},w.children)}let O=r?.orientation==="vertical"&&y?T=>{T.key==="ArrowDown"||T.key==="ArrowUp"||y(T)}:y,I=ao(e["aria-pressed"]),c="data-state"in e||e["aria-pressed"]===void 0?{}:{"data-state":I?"on":"off"},f={size:n??r?.size,...u!==void 0?{emphasis:u}:{variant:l??(a?"ghost":r?.backdrop?"raised":"soft")},color:d??(l||u?void 0:"gray"),...c},b={...w,...i?{iconOnly:!0}:{},...v?{asChild:!0}:{},...O?{onKeyDown:O}:{},...f};return r?v&&!Po(w.children)?o.createElement(N.Link,{asChild:!0,ref:t},o.createElement(B,{...b,disabled:h})):o.createElement(N.Button,{asChild:!0,ref:t,disabled:h},o.createElement(B,{...b})):o.createElement(B,{...b,ref:t,disabled:h})});A.displayName="Toolbar.Button";var io=o.forwardRef(({asChild:e,iconOnly:t,disabled:r,color:a,pressed:s,children:i,"aria-label":n,...l},u)=>{let d=t?n:void 0,p={...l,...t?{}:n?{"aria-label":n}:{},disabled:r,...a?{color:a}:{}};if(e&&o.isValidElement(i)){let v=d?o.cloneElement(i,void 0,i.props.children,o.createElement("span",null,d)):i;return o.createElement(W,{...p,ref:u,asChild:!0},v)}return s!==void 0?o.createElement(ro,{...p,ref:u,checked:s},i,d):o.createElement(W,{...p,ref:u},i,d)});io.displayName="Toolbar.OverflowItem";function Ro(){return o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentcolor","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"3.25",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"8",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"12.75",cy:"8",r:"1.25"}))}var lo=o.forwardRef(({label:e="More",className:t,children:r,...a},s)=>{let i=o.Children.toArray(r),n=i.length,l=o.useRef(null),u=o.useRef([]),d=o.useRef(0),[p,v]=o.useState(n),[y,w]=o.useState(0),[h,O]=o.useState(n);h!==n&&(O(n),v(n)),D(()=>{u.current=[]},[n]),D(()=>{let c=l.current;if(!c)return;let f=Array.from(c.children),b=Math.min(p,n);for(let P=0;P<b;P++){let R=f[P];R&&(u.current[P]=R.offsetWidth)}let T=f[b];T&&(d.current=T.offsetWidth);let m=Number.parseFloat(getComputedStyle(c).columnGap)||0,K=c.clientWidth,V=0,_=0;for(let P=0;P<n;P++){let R=u.current[P];if(R===void 0)return;R!==0&&(V+=R+(_>0?m:0),_+=1)}let k=n;if(V>K){let P=K-(d.current||c.clientHeight)-m,R=0,Y=0;k=0;for(let G=0;G<n;G++){let Z=u.current[G];if(Z>0){let $=Z+(Y>0?m:0);if(R+$>P)break;R+=$,Y+=1}k+=1}}k!==p&&v(k)},[p,n,y]),o.useEffect(()=>{let c=l.current;if(!c||typeof ResizeObserver>"u")return;let f=new ResizeObserver(()=>w(b=>b+1));f.observe(c);for(let b of Array.from(c.children))f.observe(b);return()=>f.disconnect()},[p,n]);let I=o.useCallback(c=>{l.current=c,typeof s=="function"?s(c):s&&(s.current=c)},[s]);return o.createElement("div",{...a,ref:I,className:x("kui-ToolbarOverflow",t)},i.slice(0,p).map((c,f)=>o.createElement("div",{key:f,className:"kui-ToolbarOverflowSeat"},c)),p<n?o.createElement(X,null,o.createElement(oo,null,o.createElement(A,{iconOnly:!0,"aria-label":e},o.createElement(Ro,null))),o.createElement(eo,{align:"end"},o.createElement(M.Provider,{value:!0},i.slice(p)))):null)});lo.displayName="Toolbar.Overflow";var j=[],S=new Map,z=new Set,C=new Map;function vo(e){return z.add(e),()=>{z.delete(e)}}function yo(e,t,r){let a=S.get(e)??j,i=a.findIndex(n=>n.id===t)===-1?[...a,{id:t,node:r}]:a.map(n=>n.id===t?{id:t,node:r}:n);S.set(e,i),z.forEach(n=>n())}function wo(e,t){let r=S.get(e);if(!r)return;let a=r.filter(s=>s.id!==t);a.length===0?S.delete(e):S.set(e,a),z.forEach(s=>s())}function co({name:e="default"}){D(()=>{let r=(C.get(e)??0)+1;return C.set(e,r),r>1,()=>{let a=(C.get(e)??1)-1;a>0?C.set(e,a):C.delete(e)}},[e]);let t=o.useSyncExternalStore(vo,()=>S.get(e)??j,()=>j);return o.createElement(o.Fragment,null,t.map(r=>o.createElement(o.Fragment,{key:r.id},r.node)))}co.displayName="Toolbar.Slot";function po({name:e="default",children:t}){let r=o.useId();return D(()=>{yo(e,r,t)},[e,r,t]),D(()=>()=>wo(e,r),[e,r]),null}po.displayName="Toolbar.Fill";var uo=o.forwardRef(({className:e,...t},r)=>{let a=o.useContext(E);return o.useContext(M)?o.createElement(no,{...t,ref:r,className:e}):a?o.createElement(N.Separator,{...t,ref:r,className:x("kui-ToolbarSeparator",e)}):o.createElement("div",{role:"separator","aria-orientation":"vertical","data-orientation":"vertical",...t,ref:r,className:x("kui-ToolbarSeparator",e)})});uo.displayName="Toolbar.Separator";var ho={1:"2",2:"3",3:"4",4:"5"},fo=o.forwardRef(({className:e,children:t,style:r,id:a},s)=>{let i=o.useContext(E),n=L(void 0,g.size),l=i?.size??n;return t==null||t===!1?null:o.createElement(Q,{ref:s,as:"span",size:ho[l],weight:"medium",truncate:!0,id:a,style:r,className:x("kui-ToolbarTitle",e)},t)});fo.displayName="Toolbar.Title";var Go=Object.assign(H,{Root:H,Group:so,Button:A,Separator:uo,Title:fo,Overflow:lo,Slot:co,Fill:po});export{Io as a,H as b,so as c,A as d,lo as e,co as f,po as g,uo as h,fo as i,Go as j};
3
- //# sourceMappingURL=chunk-JTMLFTNZ.js.map