@kushagradhawan/kookie-ui 0.3.21 → 0.3.23

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 (548) hide show
  1. package/components.css +264 -329
  2. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +4 -4
  5. package/dist/cjs/components/_internal/dropdown-menu-drill-down.js +1 -1
  6. package/dist/cjs/components/_internal/dropdown-menu-drill-down.js.map +3 -3
  7. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  8. package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
  9. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  10. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  11. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  12. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  13. package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
  14. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  15. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  16. package/dist/cjs/components/accordion.d.ts.map +1 -1
  17. package/dist/cjs/components/accordion.js +1 -1
  18. package/dist/cjs/components/accordion.js.map +4 -4
  19. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  20. package/dist/cjs/components/alert-dialog.js +1 -1
  21. package/dist/cjs/components/alert-dialog.js.map +4 -4
  22. package/dist/cjs/components/avatar.js +1 -1
  23. package/dist/cjs/components/avatar.js.map +4 -4
  24. package/dist/cjs/components/badge.d.ts.map +1 -1
  25. package/dist/cjs/components/badge.js +1 -1
  26. package/dist/cjs/components/badge.js.map +4 -4
  27. package/dist/cjs/components/blockquote.js +1 -1
  28. package/dist/cjs/components/blockquote.js.map +4 -4
  29. package/dist/cjs/components/box.js +1 -1
  30. package/dist/cjs/components/box.js.map +4 -4
  31. package/dist/cjs/components/button.js +1 -1
  32. package/dist/cjs/components/button.js.map +4 -4
  33. package/dist/cjs/components/callout.js +1 -1
  34. package/dist/cjs/components/callout.js.map +4 -4
  35. package/dist/cjs/components/card.js +1 -1
  36. package/dist/cjs/components/card.js.map +4 -4
  37. package/dist/cjs/components/chatbar.js +2 -2
  38. package/dist/cjs/components/chatbar.js.map +4 -4
  39. package/dist/cjs/components/checkbox-cards.js +1 -1
  40. package/dist/cjs/components/checkbox-cards.js.map +4 -4
  41. package/dist/cjs/components/checkbox-group.js +1 -1
  42. package/dist/cjs/components/checkbox-group.js.map +4 -4
  43. package/dist/cjs/components/checkbox.js +1 -1
  44. package/dist/cjs/components/checkbox.js.map +4 -4
  45. package/dist/cjs/components/code.js +1 -1
  46. package/dist/cjs/components/code.js.map +4 -4
  47. package/dist/cjs/components/combobox.js +1 -1
  48. package/dist/cjs/components/combobox.js.map +4 -4
  49. package/dist/cjs/components/container.js +1 -1
  50. package/dist/cjs/components/container.js.map +4 -4
  51. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  52. package/dist/cjs/components/context-menu.js +1 -1
  53. package/dist/cjs/components/context-menu.js.map +4 -4
  54. package/dist/cjs/components/data-list.js +1 -1
  55. package/dist/cjs/components/data-list.js.map +4 -4
  56. package/dist/cjs/components/dialog.d.ts.map +1 -1
  57. package/dist/cjs/components/dialog.js +1 -1
  58. package/dist/cjs/components/dialog.js.map +4 -4
  59. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  60. package/dist/cjs/components/dropdown-menu.js +1 -1
  61. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  62. package/dist/cjs/components/em.js +1 -1
  63. package/dist/cjs/components/em.js.map +4 -4
  64. package/dist/cjs/components/flex.js +1 -1
  65. package/dist/cjs/components/flex.js.map +4 -4
  66. package/dist/cjs/components/grid.js +1 -1
  67. package/dist/cjs/components/grid.js.map +4 -4
  68. package/dist/cjs/components/heading.js +1 -1
  69. package/dist/cjs/components/heading.js.map +4 -4
  70. package/dist/cjs/components/hover-card.js +1 -1
  71. package/dist/cjs/components/hover-card.js.map +4 -4
  72. package/dist/cjs/components/icon-button.js +2 -2
  73. package/dist/cjs/components/icon-button.js.map +4 -4
  74. package/dist/cjs/components/image.js +1 -1
  75. package/dist/cjs/components/image.js.map +4 -4
  76. package/dist/cjs/components/index.js +5 -5
  77. package/dist/cjs/components/index.js.map +4 -4
  78. package/dist/cjs/components/inset.js +1 -1
  79. package/dist/cjs/components/inset.js.map +4 -4
  80. package/dist/cjs/components/kbd.js +1 -1
  81. package/dist/cjs/components/kbd.js.map +4 -4
  82. package/dist/cjs/components/link.js +1 -1
  83. package/dist/cjs/components/link.js.map +4 -4
  84. package/dist/cjs/components/navbar.js +1 -1
  85. package/dist/cjs/components/navbar.js.map +4 -4
  86. package/dist/cjs/components/popover.js +1 -1
  87. package/dist/cjs/components/popover.js.map +4 -4
  88. package/dist/cjs/components/progress.js +1 -1
  89. package/dist/cjs/components/progress.js.map +4 -4
  90. package/dist/cjs/components/quote.js +1 -1
  91. package/dist/cjs/components/quote.js.map +4 -4
  92. package/dist/cjs/components/radio-cards.js +1 -1
  93. package/dist/cjs/components/radio-cards.js.map +4 -4
  94. package/dist/cjs/components/radio-group.js +1 -1
  95. package/dist/cjs/components/radio-group.js.map +4 -4
  96. package/dist/cjs/components/radio.js +1 -1
  97. package/dist/cjs/components/radio.js.map +4 -4
  98. package/dist/cjs/components/schemas/base-button.schema.d.ts +2 -2
  99. package/dist/cjs/components/schemas/button.schema.d.ts +2 -2
  100. package/dist/cjs/components/schemas/icon-button.schema.d.ts +4 -4
  101. package/dist/cjs/components/schemas/shell.schema.d.ts +2 -2
  102. package/dist/cjs/components/schemas/toggle-button.schema.d.ts +6 -6
  103. package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +8 -8
  104. package/dist/cjs/components/scroll-area.js +1 -1
  105. package/dist/cjs/components/scroll-area.js.map +4 -4
  106. package/dist/cjs/components/section.js +1 -1
  107. package/dist/cjs/components/section.js.map +4 -4
  108. package/dist/cjs/components/segmented-control.js +1 -1
  109. package/dist/cjs/components/segmented-control.js.map +4 -4
  110. package/dist/cjs/components/select.js +1 -1
  111. package/dist/cjs/components/select.js.map +4 -4
  112. package/dist/cjs/components/separator.js +1 -1
  113. package/dist/cjs/components/separator.js.map +4 -4
  114. package/dist/cjs/components/sheet.d.ts.map +1 -1
  115. package/dist/cjs/components/sheet.js +1 -1
  116. package/dist/cjs/components/sheet.js.map +4 -4
  117. package/dist/cjs/components/shell.d.ts.map +1 -1
  118. package/dist/cjs/components/shell.js +1 -1
  119. package/dist/cjs/components/shell.js.map +4 -4
  120. package/dist/cjs/components/sidebar.js +1 -1
  121. package/dist/cjs/components/sidebar.js.map +4 -4
  122. package/dist/cjs/components/skeleton.js +1 -1
  123. package/dist/cjs/components/skeleton.js.map +4 -4
  124. package/dist/cjs/components/slider.js +1 -1
  125. package/dist/cjs/components/slider.js.map +4 -4
  126. package/dist/cjs/components/spinner.js +1 -1
  127. package/dist/cjs/components/spinner.js.map +4 -4
  128. package/dist/cjs/components/strong.js +1 -1
  129. package/dist/cjs/components/strong.js.map +4 -4
  130. package/dist/cjs/components/switch.js +1 -1
  131. package/dist/cjs/components/switch.js.map +4 -4
  132. package/dist/cjs/components/tab-nav.js +1 -1
  133. package/dist/cjs/components/tab-nav.js.map +4 -4
  134. package/dist/cjs/components/table.js +1 -1
  135. package/dist/cjs/components/table.js.map +4 -4
  136. package/dist/cjs/components/tabs.js +1 -1
  137. package/dist/cjs/components/tabs.js.map +4 -4
  138. package/dist/cjs/components/text-area.js +1 -1
  139. package/dist/cjs/components/text-area.js.map +4 -4
  140. package/dist/cjs/components/text-field.js +2 -2
  141. package/dist/cjs/components/text-field.js.map +4 -4
  142. package/dist/cjs/components/text.js +1 -1
  143. package/dist/cjs/components/text.js.map +4 -4
  144. package/dist/cjs/components/theme-panel.js +3 -3
  145. package/dist/cjs/components/theme-panel.js.map +4 -4
  146. package/dist/cjs/components/theme.d.ts.map +1 -1
  147. package/dist/cjs/components/theme.js +1 -1
  148. package/dist/cjs/components/theme.js.map +4 -4
  149. package/dist/cjs/components/toggle-button.js +2 -2
  150. package/dist/cjs/components/toggle-button.js.map +4 -4
  151. package/dist/cjs/components/toggle-icon-button.js +3 -3
  152. package/dist/cjs/components/toggle-icon-button.js.map +4 -4
  153. package/dist/cjs/components/toolbar.js +1 -1
  154. package/dist/cjs/components/toolbar.js.map +4 -4
  155. package/dist/cjs/components/tooltip.js +1 -1
  156. package/dist/cjs/components/tooltip.js.map +4 -4
  157. package/dist/cjs/components/user-card.js +1 -1
  158. package/dist/cjs/components/user-card.js.map +4 -4
  159. package/dist/cjs/helpers/compile-prop-defs.d.ts +49 -0
  160. package/dist/cjs/helpers/compile-prop-defs.d.ts.map +1 -0
  161. package/dist/cjs/helpers/compile-prop-defs.js +2 -0
  162. package/dist/cjs/helpers/compile-prop-defs.js.map +7 -0
  163. package/dist/cjs/helpers/extract-props.d.ts.map +1 -1
  164. package/dist/cjs/helpers/extract-props.js +1 -1
  165. package/dist/cjs/helpers/extract-props.js.map +4 -4
  166. package/dist/cjs/helpers/get-margin-styles.d.ts.map +1 -1
  167. package/dist/cjs/helpers/get-margin-styles.js +1 -1
  168. package/dist/cjs/helpers/get-margin-styles.js.map +3 -3
  169. package/dist/cjs/helpers/get-responsive-styles.d.ts +5 -2
  170. package/dist/cjs/helpers/get-responsive-styles.d.ts.map +1 -1
  171. package/dist/cjs/helpers/get-responsive-styles.js +1 -1
  172. package/dist/cjs/helpers/get-responsive-styles.js.map +3 -3
  173. package/dist/cjs/helpers/index.js +2 -2
  174. package/dist/cjs/helpers/index.js.map +4 -4
  175. package/dist/cjs/helpers/use-deprecation-warning.d.ts +10 -0
  176. package/dist/cjs/helpers/use-deprecation-warning.d.ts.map +1 -0
  177. package/dist/cjs/helpers/use-deprecation-warning.js +2 -0
  178. package/dist/cjs/helpers/use-deprecation-warning.js.map +7 -0
  179. package/dist/cjs/hooks/index.js +2 -2
  180. package/dist/cjs/hooks/index.js.map +3 -3
  181. package/dist/cjs/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
  182. package/dist/cjs/hooks/use-body-pointer-events-cleanup.js +1 -1
  183. package/dist/cjs/hooks/use-body-pointer-events-cleanup.js.map +3 -3
  184. package/dist/cjs/hooks/use-breakpoint.d.ts +7 -3
  185. package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
  186. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  187. package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
  188. package/dist/cjs/hooks/use-prop-synced-state.d.ts +14 -0
  189. package/dist/cjs/hooks/use-prop-synced-state.d.ts.map +1 -0
  190. package/dist/cjs/hooks/use-prop-synced-state.js +2 -0
  191. package/dist/cjs/hooks/use-prop-synced-state.js.map +7 -0
  192. package/dist/cjs/index.js +5 -5
  193. package/dist/cjs/index.js.map +4 -4
  194. package/dist/esm/{chunk-RQ2ZPMHJ.js → chunk-22HGLMPQ.js} +2 -2
  195. package/dist/esm/{chunk-WYA4IRU6.js → chunk-25WZA7ZU.js} +2 -2
  196. package/dist/esm/chunk-2UPAYDKR.js +2 -0
  197. package/dist/esm/chunk-2UPAYDKR.js.map +7 -0
  198. package/dist/esm/{chunk-XHQGMOXV.js → chunk-36ZQVP7F.js} +2 -2
  199. package/dist/esm/{chunk-K3R4AH3E.js → chunk-3MWWP4MW.js} +2 -2
  200. package/dist/esm/{chunk-HQ35PM4O.js → chunk-43A5GUSI.js} +2 -2
  201. package/dist/esm/{chunk-Z5DQ6FSA.js → chunk-4AQTUBVP.js} +2 -2
  202. package/dist/esm/{chunk-25U7DENY.js → chunk-4BBOHEF4.js} +2 -2
  203. package/dist/esm/chunk-4CKDU6FY.js +2 -0
  204. package/dist/esm/chunk-4CKDU6FY.js.map +7 -0
  205. package/dist/esm/{chunk-ZSEFZM5H.js → chunk-4IY2PR6N.js} +2 -2
  206. package/dist/esm/{chunk-QLIELX4I.js → chunk-4ME6O27S.js} +2 -2
  207. package/dist/esm/chunk-4XJY6FIK.js +2 -0
  208. package/dist/esm/chunk-4XJY6FIK.js.map +7 -0
  209. package/dist/esm/{chunk-JQOFJNCV.js → chunk-4YFJWXL2.js} +2 -2
  210. package/dist/esm/{chunk-DNI4QRXQ.js → chunk-5IBGFL6O.js} +2 -2
  211. package/dist/esm/chunk-5TXQLK4G.js +2 -0
  212. package/dist/esm/chunk-5TXQLK4G.js.map +7 -0
  213. package/dist/esm/{chunk-IPJUHVM6.js → chunk-666GX7O5.js} +2 -2
  214. package/dist/esm/chunk-6FLLFCBU.js +2 -0
  215. package/dist/esm/chunk-6FLLFCBU.js.map +7 -0
  216. package/dist/esm/{chunk-DJBPM5QK.js → chunk-7FC7HF76.js} +2 -2
  217. package/dist/esm/{chunk-SVLY6B5F.js → chunk-7QDTSBJF.js} +2 -2
  218. package/dist/esm/chunk-AX5S56DS.js +2 -0
  219. package/dist/esm/chunk-AX5S56DS.js.map +7 -0
  220. package/dist/esm/{chunk-DK5MHD6I.js → chunk-B24BDVG2.js} +2 -2
  221. package/dist/esm/{chunk-WZCZHCVE.js → chunk-BJYUPIXO.js} +2 -2
  222. package/dist/esm/{chunk-BJTJUIYJ.js → chunk-CRWYCLTE.js} +2 -2
  223. package/dist/esm/{chunk-OHJVFZMH.js → chunk-CSKZZOI2.js} +2 -2
  224. package/dist/esm/chunk-D5N627TH.js +2 -0
  225. package/dist/esm/chunk-D5N627TH.js.map +7 -0
  226. package/dist/esm/{chunk-ADYTQCZX.js → chunk-D6B7IMZU.js} +2 -2
  227. package/dist/esm/chunk-DL2O3GKG.js +2 -0
  228. package/dist/esm/chunk-DL2O3GKG.js.map +7 -0
  229. package/dist/esm/{chunk-USGTBZ43.js → chunk-E67CIG6A.js} +2 -2
  230. package/dist/esm/{chunk-42HFGCHX.js → chunk-ETMLMDW4.js} +2 -2
  231. package/dist/esm/{chunk-7CBAHIVG.js → chunk-F2HYQ3ZR.js} +2 -2
  232. package/dist/esm/{chunk-YUZPSUJE.js → chunk-F7IYL2VW.js} +2 -2
  233. package/dist/esm/{chunk-FVCWNSRU.js → chunk-FHOCUZDR.js} +2 -2
  234. package/dist/esm/{chunk-7MURQ6CR.js → chunk-FLFAXVFB.js} +2 -2
  235. package/dist/esm/{chunk-APRBRAOT.js → chunk-FOEZLQTW.js} +2 -2
  236. package/dist/esm/{chunk-WNSPLWRV.js → chunk-GJSGKE7B.js} +2 -2
  237. package/dist/esm/{chunk-OGOOZLUD.js → chunk-GLERJXVS.js} +2 -2
  238. package/dist/esm/{chunk-6VGPTAHM.js → chunk-GWXVETMF.js} +2 -2
  239. package/dist/esm/{chunk-ES7MK2MM.js → chunk-GYBLXQ4R.js} +2 -2
  240. package/dist/esm/{chunk-4OBMRJHC.js → chunk-H7ST535H.js} +2 -2
  241. package/dist/esm/{chunk-QLZ5XAW6.js → chunk-HF5WY5YE.js} +2 -2
  242. package/dist/esm/chunk-ICIGZ3N7.js +2 -0
  243. package/dist/esm/chunk-ICIGZ3N7.js.map +7 -0
  244. package/dist/esm/{chunk-RDP4UQ42.js → chunk-IEWCQU2S.js} +2 -2
  245. package/dist/esm/{chunk-XLOHPURR.js → chunk-IHK3H2OM.js} +2 -2
  246. package/dist/esm/{chunk-3F6I7YOR.js → chunk-JDGJSNWT.js} +2 -2
  247. package/dist/esm/chunk-JQQIPEGY.js +2 -0
  248. package/dist/esm/chunk-JQQIPEGY.js.map +7 -0
  249. package/dist/esm/chunk-JR2YOGII.js +2 -0
  250. package/dist/esm/chunk-JR2YOGII.js.map +7 -0
  251. package/dist/esm/chunk-JUY7CBSL.js +2 -0
  252. package/dist/esm/chunk-JUY7CBSL.js.map +7 -0
  253. package/dist/esm/{chunk-VF5TRT3H.js → chunk-KKM6T5P7.js} +2 -2
  254. package/dist/esm/{chunk-ZHYOJNWV.js → chunk-LKAK5GXF.js} +2 -2
  255. package/dist/esm/chunk-LOGJJF4I.js +2 -0
  256. package/dist/esm/chunk-LOGJJF4I.js.map +7 -0
  257. package/dist/esm/{chunk-JCYI4NTV.js → chunk-MBCBP73P.js} +2 -2
  258. package/dist/esm/{chunk-UYNYUR7O.js → chunk-MBE2YSBU.js} +2 -2
  259. package/dist/esm/chunk-MHANZINI.js +2 -0
  260. package/dist/esm/chunk-MHANZINI.js.map +7 -0
  261. package/dist/esm/chunk-MRECKC4D.js +2 -0
  262. package/dist/esm/chunk-MRECKC4D.js.map +7 -0
  263. package/dist/esm/{chunk-H2G446JG.js → chunk-NMKPFUNP.js} +2 -2
  264. package/dist/esm/{chunk-4N5JU7XQ.js → chunk-O3CDWEZA.js} +2 -2
  265. package/dist/esm/{chunk-TEULZKBM.js → chunk-OGXZHAQL.js} +2 -2
  266. package/dist/esm/{chunk-2AEELIG6.js → chunk-OWAUCLRT.js} +2 -2
  267. package/dist/esm/{chunk-7CXVHFMQ.js → chunk-P7HYVJSU.js} +2 -2
  268. package/dist/esm/{chunk-4532RT2B.js → chunk-P7IAHW4V.js} +2 -2
  269. package/dist/esm/{chunk-M3ZYJANH.js → chunk-PQZXQ4ST.js} +2 -2
  270. package/dist/esm/{chunk-SGU4HUHF.js → chunk-PTLFMWCN.js} +2 -2
  271. package/dist/esm/chunk-S2HA3W3V.js +2 -0
  272. package/dist/esm/chunk-S2HA3W3V.js.map +7 -0
  273. package/dist/esm/{chunk-E6IWYD3U.js → chunk-S5C5YRBS.js} +2 -2
  274. package/dist/esm/{chunk-A24PYRVV.js → chunk-SO67YEVQ.js} +2 -2
  275. package/dist/esm/chunk-TLWTUKKL.js +2 -0
  276. package/dist/esm/chunk-TLWTUKKL.js.map +7 -0
  277. package/dist/esm/{chunk-HACQF6F4.js → chunk-TOOSHJOA.js} +2 -2
  278. package/dist/esm/{chunk-QOWA5LK5.js → chunk-U2X2CAW4.js} +2 -2
  279. package/dist/esm/{chunk-U7AASKZI.js → chunk-UVCH7QKO.js} +2 -2
  280. package/dist/esm/{chunk-GWYFT3EI.js → chunk-VLO7NXSP.js} +2 -2
  281. package/dist/esm/{chunk-DXI5P5O4.js → chunk-VX6ARMWP.js} +2 -2
  282. package/dist/esm/chunk-WAURCNAS.js +2 -0
  283. package/dist/esm/chunk-WAURCNAS.js.map +7 -0
  284. package/dist/esm/{chunk-EJWAAFCI.js → chunk-WO43WW3A.js} +2 -2
  285. package/dist/esm/{chunk-GLC4QJBF.js → chunk-WTYNFBFV.js} +2 -2
  286. package/dist/esm/{chunk-6FAICIYS.js → chunk-XMRIRFM7.js} +2 -2
  287. package/dist/esm/chunk-YV2KYHGR.js +2 -0
  288. package/dist/esm/chunk-YV2KYHGR.js.map +7 -0
  289. package/dist/esm/{chunk-UIEUZLZZ.js → chunk-ZY6SQWHT.js} +2 -2
  290. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  291. package/dist/esm/components/_internal/base-button.js +1 -1
  292. package/dist/esm/components/_internal/dropdown-menu-drill-down.js +1 -1
  293. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  294. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  295. package/dist/esm/components/_internal/shell-handles.js +1 -1
  296. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  297. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  298. package/dist/esm/components/accordion.d.ts.map +1 -1
  299. package/dist/esm/components/accordion.js +1 -1
  300. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  301. package/dist/esm/components/alert-dialog.js +1 -1
  302. package/dist/esm/components/avatar.js +1 -1
  303. package/dist/esm/components/badge.d.ts.map +1 -1
  304. package/dist/esm/components/badge.js +1 -1
  305. package/dist/esm/components/blockquote.js +1 -1
  306. package/dist/esm/components/box.js +1 -1
  307. package/dist/esm/components/button.js +1 -1
  308. package/dist/esm/components/callout.js +1 -1
  309. package/dist/esm/components/card.js +1 -1
  310. package/dist/esm/components/chatbar.js +1 -1
  311. package/dist/esm/components/checkbox-cards.js +1 -1
  312. package/dist/esm/components/checkbox-group.js +1 -1
  313. package/dist/esm/components/checkbox.js +1 -1
  314. package/dist/esm/components/code.js +1 -1
  315. package/dist/esm/components/combobox.js +1 -1
  316. package/dist/esm/components/container.js +1 -1
  317. package/dist/esm/components/context-menu.d.ts.map +1 -1
  318. package/dist/esm/components/context-menu.js +1 -1
  319. package/dist/esm/components/data-list.js +1 -1
  320. package/dist/esm/components/dialog.d.ts.map +1 -1
  321. package/dist/esm/components/dialog.js +1 -1
  322. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  323. package/dist/esm/components/dropdown-menu.js +1 -1
  324. package/dist/esm/components/em.js +1 -1
  325. package/dist/esm/components/flex.js +1 -1
  326. package/dist/esm/components/grid.js +1 -1
  327. package/dist/esm/components/heading.js +1 -1
  328. package/dist/esm/components/hover-card.js +1 -1
  329. package/dist/esm/components/icon-button.js +1 -1
  330. package/dist/esm/components/image.js +1 -1
  331. package/dist/esm/components/index.js +1 -1
  332. package/dist/esm/components/inset.js +1 -1
  333. package/dist/esm/components/kbd.js +1 -1
  334. package/dist/esm/components/link.js +1 -1
  335. package/dist/esm/components/navbar.js +1 -1
  336. package/dist/esm/components/popover.js +1 -1
  337. package/dist/esm/components/progress.js +1 -1
  338. package/dist/esm/components/quote.js +1 -1
  339. package/dist/esm/components/radio-cards.js +1 -1
  340. package/dist/esm/components/radio-group.js +1 -1
  341. package/dist/esm/components/radio.js +1 -1
  342. package/dist/esm/components/schemas/base-button.schema.d.ts +2 -2
  343. package/dist/esm/components/schemas/button.schema.d.ts +2 -2
  344. package/dist/esm/components/schemas/icon-button.schema.d.ts +4 -4
  345. package/dist/esm/components/schemas/shell.schema.d.ts +2 -2
  346. package/dist/esm/components/schemas/toggle-button.schema.d.ts +6 -6
  347. package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +8 -8
  348. package/dist/esm/components/scroll-area.js +1 -1
  349. package/dist/esm/components/section.js +1 -1
  350. package/dist/esm/components/segmented-control.js +1 -1
  351. package/dist/esm/components/select.js +1 -1
  352. package/dist/esm/components/separator.js +1 -1
  353. package/dist/esm/components/sheet.d.ts.map +1 -1
  354. package/dist/esm/components/sheet.js +1 -1
  355. package/dist/esm/components/shell.d.ts.map +1 -1
  356. package/dist/esm/components/shell.js +1 -1
  357. package/dist/esm/components/sidebar.js +1 -1
  358. package/dist/esm/components/skeleton.js +1 -1
  359. package/dist/esm/components/slider.js +1 -1
  360. package/dist/esm/components/spinner.js +1 -1
  361. package/dist/esm/components/strong.js +1 -1
  362. package/dist/esm/components/switch.js +1 -1
  363. package/dist/esm/components/tab-nav.js +1 -1
  364. package/dist/esm/components/table.js +1 -1
  365. package/dist/esm/components/tabs.js +1 -1
  366. package/dist/esm/components/text-area.js +1 -1
  367. package/dist/esm/components/text-field.js +1 -1
  368. package/dist/esm/components/text.js +1 -1
  369. package/dist/esm/components/theme-panel.js +1 -1
  370. package/dist/esm/components/theme.d.ts.map +1 -1
  371. package/dist/esm/components/theme.js +1 -1
  372. package/dist/esm/components/toggle-button.js +1 -1
  373. package/dist/esm/components/toggle-icon-button.js +1 -1
  374. package/dist/esm/components/toolbar.js +1 -1
  375. package/dist/esm/components/tooltip.js +1 -1
  376. package/dist/esm/components/user-card.js +1 -1
  377. package/dist/esm/helpers/compile-prop-defs.d.ts +49 -0
  378. package/dist/esm/helpers/compile-prop-defs.d.ts.map +1 -0
  379. package/dist/esm/helpers/compile-prop-defs.js +2 -0
  380. package/dist/esm/helpers/compile-prop-defs.js.map +7 -0
  381. package/dist/esm/helpers/extract-props.d.ts.map +1 -1
  382. package/dist/esm/helpers/extract-props.js +1 -1
  383. package/dist/esm/helpers/get-margin-styles.d.ts.map +1 -1
  384. package/dist/esm/helpers/get-margin-styles.js +1 -1
  385. package/dist/esm/helpers/get-responsive-styles.d.ts +5 -2
  386. package/dist/esm/helpers/get-responsive-styles.d.ts.map +1 -1
  387. package/dist/esm/helpers/get-responsive-styles.js +1 -1
  388. package/dist/esm/helpers/index.js +1 -1
  389. package/dist/esm/helpers/use-deprecation-warning.d.ts +10 -0
  390. package/dist/esm/helpers/use-deprecation-warning.d.ts.map +1 -0
  391. package/dist/esm/helpers/use-deprecation-warning.js +2 -0
  392. package/dist/esm/helpers/use-deprecation-warning.js.map +7 -0
  393. package/dist/esm/hooks/index.js +1 -1
  394. package/dist/esm/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
  395. package/dist/esm/hooks/use-body-pointer-events-cleanup.js +1 -1
  396. package/dist/esm/hooks/use-breakpoint.d.ts +7 -3
  397. package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
  398. package/dist/esm/hooks/use-breakpoint.js +1 -1
  399. package/dist/esm/hooks/use-prop-synced-state.d.ts +14 -0
  400. package/dist/esm/hooks/use-prop-synced-state.d.ts.map +1 -0
  401. package/dist/esm/hooks/use-prop-synced-state.js +2 -0
  402. package/dist/esm/hooks/use-prop-synced-state.js.map +7 -0
  403. package/dist/esm/index.js +1 -1
  404. package/package.json +2 -1
  405. package/schemas/base-button.json +0 -1
  406. package/schemas/button.json +0 -1
  407. package/schemas/icon-button.json +0 -1
  408. package/schemas/index.json +0 -6
  409. package/schemas/toggle-button.json +0 -1
  410. package/schemas/toggle-icon-button.json +0 -1
  411. package/src/components/_internal/base-button.css +2 -2
  412. package/src/components/_internal/base-button.tsx +3 -58
  413. package/src/components/_internal/base-card.css +19 -4
  414. package/src/components/_internal/base-checkbox.css +2 -2
  415. package/src/components/_internal/base-dialog.css +7 -13
  416. package/src/components/_internal/base-menu.css +7 -0
  417. package/src/components/_internal/base-radio.css +2 -2
  418. package/src/components/_internal/base-sidebar.css +7 -0
  419. package/src/components/_internal/base-tab-list.css +2 -2
  420. package/src/components/_internal/shell-handles.tsx +27 -0
  421. package/src/components/accordion.css +6 -6
  422. package/src/components/accordion.tsx +2 -8
  423. package/src/components/alert-dialog.tsx +22 -20
  424. package/src/components/avatar.css +2 -2
  425. package/src/components/badge.css +2 -2
  426. package/src/components/badge.tsx +2 -8
  427. package/src/components/callout.css +2 -2
  428. package/src/components/chatbar.css +1 -1
  429. package/src/components/context-menu.tsx +2 -8
  430. package/src/components/dialog.tsx +46 -72
  431. package/src/components/dropdown-menu.tsx +2 -8
  432. package/src/components/popover.css +7 -0
  433. package/src/components/progress.css +21 -8
  434. package/src/components/segmented-control.css +2 -2
  435. package/src/components/select.css +9 -2
  436. package/src/components/sheet.tsx +31 -28
  437. package/src/components/shell.css +106 -69
  438. package/src/components/shell.tsx +168 -97
  439. package/src/components/slider.css +2 -2
  440. package/src/components/switch.css +2 -2
  441. package/src/components/table.css +7 -0
  442. package/src/components/text-area.css +2 -2
  443. package/src/components/text-field.css +2 -2
  444. package/src/components/theme.tsx +35 -34
  445. package/src/helpers/compile-prop-defs.ts +121 -0
  446. package/src/helpers/extract-props.ts +104 -83
  447. package/src/helpers/get-margin-styles.ts +38 -71
  448. package/src/helpers/get-responsive-styles.ts +37 -38
  449. package/src/helpers/use-deprecation-warning.ts +26 -0
  450. package/src/hooks/use-body-pointer-events-cleanup.ts +36 -6
  451. package/src/hooks/use-breakpoint.ts +94 -53
  452. package/src/hooks/use-prop-synced-state.ts +24 -0
  453. package/src/styles/tokens/blur.css +28 -0
  454. package/src/styles/tokens/color.css +3 -3
  455. package/src/styles/tokens/constants.css +11 -0
  456. package/styles.css +280 -332
  457. package/tokens/base.css +13 -3
  458. package/tokens.css +16 -3
  459. package/dist/esm/chunk-2SS3FA3N.js +0 -2
  460. package/dist/esm/chunk-2SS3FA3N.js.map +0 -7
  461. package/dist/esm/chunk-5U2Q23K3.js +0 -2
  462. package/dist/esm/chunk-5U2Q23K3.js.map +0 -7
  463. package/dist/esm/chunk-6ELPYR73.js +0 -2
  464. package/dist/esm/chunk-6ELPYR73.js.map +0 -7
  465. package/dist/esm/chunk-DZ4H2KTP.js +0 -2
  466. package/dist/esm/chunk-DZ4H2KTP.js.map +0 -7
  467. package/dist/esm/chunk-H4MMVAGQ.js +0 -2
  468. package/dist/esm/chunk-H4MMVAGQ.js.map +0 -7
  469. package/dist/esm/chunk-HURTSXRY.js +0 -2
  470. package/dist/esm/chunk-HURTSXRY.js.map +0 -7
  471. package/dist/esm/chunk-ITRVKLYU.js +0 -2
  472. package/dist/esm/chunk-ITRVKLYU.js.map +0 -7
  473. package/dist/esm/chunk-KCAFSCOV.js +0 -2
  474. package/dist/esm/chunk-KCAFSCOV.js.map +0 -7
  475. package/dist/esm/chunk-KMPBTEZH.js +0 -2
  476. package/dist/esm/chunk-KMPBTEZH.js.map +0 -7
  477. package/dist/esm/chunk-LN5SP46K.js +0 -2
  478. package/dist/esm/chunk-LN5SP46K.js.map +0 -7
  479. package/dist/esm/chunk-Q73Y5O5P.js +0 -2
  480. package/dist/esm/chunk-Q73Y5O5P.js.map +0 -7
  481. package/dist/esm/chunk-RMBS6CAO.js +0 -2
  482. package/dist/esm/chunk-RMBS6CAO.js.map +0 -7
  483. package/dist/esm/chunk-UUX42HBM.js +0 -2
  484. package/dist/esm/chunk-UUX42HBM.js.map +0 -7
  485. package/dist/esm/chunk-X7BD5FLE.js +0 -2
  486. package/dist/esm/chunk-X7BD5FLE.js.map +0 -7
  487. package/dist/esm/chunk-YEA646GM.js +0 -2
  488. package/dist/esm/chunk-YEA646GM.js.map +0 -7
  489. package/dist/esm/chunk-ZMEXIPWM.js +0 -2
  490. package/dist/esm/chunk-ZMEXIPWM.js.map +0 -7
  491. /package/dist/esm/{chunk-RQ2ZPMHJ.js.map → chunk-22HGLMPQ.js.map} +0 -0
  492. /package/dist/esm/{chunk-WYA4IRU6.js.map → chunk-25WZA7ZU.js.map} +0 -0
  493. /package/dist/esm/{chunk-XHQGMOXV.js.map → chunk-36ZQVP7F.js.map} +0 -0
  494. /package/dist/esm/{chunk-K3R4AH3E.js.map → chunk-3MWWP4MW.js.map} +0 -0
  495. /package/dist/esm/{chunk-HQ35PM4O.js.map → chunk-43A5GUSI.js.map} +0 -0
  496. /package/dist/esm/{chunk-Z5DQ6FSA.js.map → chunk-4AQTUBVP.js.map} +0 -0
  497. /package/dist/esm/{chunk-25U7DENY.js.map → chunk-4BBOHEF4.js.map} +0 -0
  498. /package/dist/esm/{chunk-ZSEFZM5H.js.map → chunk-4IY2PR6N.js.map} +0 -0
  499. /package/dist/esm/{chunk-QLIELX4I.js.map → chunk-4ME6O27S.js.map} +0 -0
  500. /package/dist/esm/{chunk-JQOFJNCV.js.map → chunk-4YFJWXL2.js.map} +0 -0
  501. /package/dist/esm/{chunk-DNI4QRXQ.js.map → chunk-5IBGFL6O.js.map} +0 -0
  502. /package/dist/esm/{chunk-IPJUHVM6.js.map → chunk-666GX7O5.js.map} +0 -0
  503. /package/dist/esm/{chunk-DJBPM5QK.js.map → chunk-7FC7HF76.js.map} +0 -0
  504. /package/dist/esm/{chunk-SVLY6B5F.js.map → chunk-7QDTSBJF.js.map} +0 -0
  505. /package/dist/esm/{chunk-DK5MHD6I.js.map → chunk-B24BDVG2.js.map} +0 -0
  506. /package/dist/esm/{chunk-WZCZHCVE.js.map → chunk-BJYUPIXO.js.map} +0 -0
  507. /package/dist/esm/{chunk-BJTJUIYJ.js.map → chunk-CRWYCLTE.js.map} +0 -0
  508. /package/dist/esm/{chunk-OHJVFZMH.js.map → chunk-CSKZZOI2.js.map} +0 -0
  509. /package/dist/esm/{chunk-ADYTQCZX.js.map → chunk-D6B7IMZU.js.map} +0 -0
  510. /package/dist/esm/{chunk-USGTBZ43.js.map → chunk-E67CIG6A.js.map} +0 -0
  511. /package/dist/esm/{chunk-42HFGCHX.js.map → chunk-ETMLMDW4.js.map} +0 -0
  512. /package/dist/esm/{chunk-7CBAHIVG.js.map → chunk-F2HYQ3ZR.js.map} +0 -0
  513. /package/dist/esm/{chunk-YUZPSUJE.js.map → chunk-F7IYL2VW.js.map} +0 -0
  514. /package/dist/esm/{chunk-FVCWNSRU.js.map → chunk-FHOCUZDR.js.map} +0 -0
  515. /package/dist/esm/{chunk-7MURQ6CR.js.map → chunk-FLFAXVFB.js.map} +0 -0
  516. /package/dist/esm/{chunk-APRBRAOT.js.map → chunk-FOEZLQTW.js.map} +0 -0
  517. /package/dist/esm/{chunk-WNSPLWRV.js.map → chunk-GJSGKE7B.js.map} +0 -0
  518. /package/dist/esm/{chunk-OGOOZLUD.js.map → chunk-GLERJXVS.js.map} +0 -0
  519. /package/dist/esm/{chunk-6VGPTAHM.js.map → chunk-GWXVETMF.js.map} +0 -0
  520. /package/dist/esm/{chunk-ES7MK2MM.js.map → chunk-GYBLXQ4R.js.map} +0 -0
  521. /package/dist/esm/{chunk-4OBMRJHC.js.map → chunk-H7ST535H.js.map} +0 -0
  522. /package/dist/esm/{chunk-QLZ5XAW6.js.map → chunk-HF5WY5YE.js.map} +0 -0
  523. /package/dist/esm/{chunk-RDP4UQ42.js.map → chunk-IEWCQU2S.js.map} +0 -0
  524. /package/dist/esm/{chunk-XLOHPURR.js.map → chunk-IHK3H2OM.js.map} +0 -0
  525. /package/dist/esm/{chunk-3F6I7YOR.js.map → chunk-JDGJSNWT.js.map} +0 -0
  526. /package/dist/esm/{chunk-VF5TRT3H.js.map → chunk-KKM6T5P7.js.map} +0 -0
  527. /package/dist/esm/{chunk-ZHYOJNWV.js.map → chunk-LKAK5GXF.js.map} +0 -0
  528. /package/dist/esm/{chunk-JCYI4NTV.js.map → chunk-MBCBP73P.js.map} +0 -0
  529. /package/dist/esm/{chunk-UYNYUR7O.js.map → chunk-MBE2YSBU.js.map} +0 -0
  530. /package/dist/esm/{chunk-H2G446JG.js.map → chunk-NMKPFUNP.js.map} +0 -0
  531. /package/dist/esm/{chunk-4N5JU7XQ.js.map → chunk-O3CDWEZA.js.map} +0 -0
  532. /package/dist/esm/{chunk-TEULZKBM.js.map → chunk-OGXZHAQL.js.map} +0 -0
  533. /package/dist/esm/{chunk-2AEELIG6.js.map → chunk-OWAUCLRT.js.map} +0 -0
  534. /package/dist/esm/{chunk-7CXVHFMQ.js.map → chunk-P7HYVJSU.js.map} +0 -0
  535. /package/dist/esm/{chunk-4532RT2B.js.map → chunk-P7IAHW4V.js.map} +0 -0
  536. /package/dist/esm/{chunk-M3ZYJANH.js.map → chunk-PQZXQ4ST.js.map} +0 -0
  537. /package/dist/esm/{chunk-SGU4HUHF.js.map → chunk-PTLFMWCN.js.map} +0 -0
  538. /package/dist/esm/{chunk-E6IWYD3U.js.map → chunk-S5C5YRBS.js.map} +0 -0
  539. /package/dist/esm/{chunk-A24PYRVV.js.map → chunk-SO67YEVQ.js.map} +0 -0
  540. /package/dist/esm/{chunk-HACQF6F4.js.map → chunk-TOOSHJOA.js.map} +0 -0
  541. /package/dist/esm/{chunk-QOWA5LK5.js.map → chunk-U2X2CAW4.js.map} +0 -0
  542. /package/dist/esm/{chunk-U7AASKZI.js.map → chunk-UVCH7QKO.js.map} +0 -0
  543. /package/dist/esm/{chunk-GWYFT3EI.js.map → chunk-VLO7NXSP.js.map} +0 -0
  544. /package/dist/esm/{chunk-DXI5P5O4.js.map → chunk-VX6ARMWP.js.map} +0 -0
  545. /package/dist/esm/{chunk-EJWAAFCI.js.map → chunk-WO43WW3A.js.map} +0 -0
  546. /package/dist/esm/{chunk-GLC4QJBF.js.map → chunk-WTYNFBFV.js.map} +0 -0
  547. /package/dist/esm/{chunk-6FAICIYS.js.map → chunk-XMRIRFM7.js.map} +0 -0
  548. /package/dist/esm/{chunk-UIEUZLZZ.js.map → chunk-ZY6SQWHT.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/sidebar.tsx", "../../../src/components/slot.tsx", "../../../src/components/dropdown-menu.tsx", "../../../src/components/scroll-area.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/scroll-area.props.tsx", "../../../src/helpers/extract-margin-props.ts", "../../../src/helpers/get-margin-styles.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/helpers/get-subtree.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/components/_internal/base-menu.props.ts", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/components/theme.props.tsx", "../../../src/components/icons.tsx", "../../../src/helpers/extract-props.ts", "../../../src/components/_internal/dropdown-menu-drill-down.tsx", "../../../src/hooks/use-breakpoint.ts", "../../../src/components/shell.types.ts", "../../../src/components/_internal/menu-context.tsx", "../../../src/helpers/require-react-element.ts", "../../../src/components/kbd.tsx", "../../../src/components/kbd.props.tsx", "../../../src/components/popover.tsx", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/components/popover.props.tsx", "../../../src/components/sidebar.props.tsx", "../../../src/components/separator.tsx", "../../../src/components/separator.props.tsx", "../../../src/components/badge.tsx", "../../../src/components/badge.props.tsx", "../../../src/components/tooltip.tsx", "../../../src/components/text.tsx", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/components/tooltip.props.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\nimport * as DropdownMenu from './dropdown-menu.js';\nimport * as Popover from './popover.js';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2' | '3';\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {\n /**\n * Presentational mode independent of Shell.\n * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.\n * If both `presentation` and `layout` are provided, `presentation` takes precedence.\n */\n presentation?: 'thin' | 'expanded';\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n presentation,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n // Remove internal-only props from DOM\n const { asChild: _, panelBackground: __, presentation: ___, ...safeRootProps } = rootProps;\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel'). `presentation` takes precedence over `layout`.\n const resolvedLayout = presentation === 'thin' ? 'rail' : presentation === 'expanded' ? 'panel' : layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n const visualContextValue = React.useMemo(\n () => ({ size: resolvedSize, menuVariant, presentation, color: resolvedColor }),\n [resolvedSize, menuVariant, presentation, resolvedColor],\n );\n return (\n <div {...safeRootProps} ref={forwardedRef} data-accent-color={resolvedColor} className={classNames('rt-SidebarRoot', className)}>\n <SidebarVisualContext.Provider value={visualContextValue}>\n <div\n className={classNames('rt-SidebarContainer', `rt-variant-${variant}`, `rt-r-size-${resolvedSize}`, `rt-menu-variant-${menuVariant}`, resolvedLayout && `rt-layout-${resolvedLayout}`)}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-presentation={presentation}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, children, role = 'navigation', 'aria-label': ariaLabel = 'Main navigation', id, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames('rt-BaseMenuContent', 'rt-SidebarContent', `rt-r-size-${size}`, `rt-menu-variant-${menuVariant}`, className)}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('rt-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} role=\"menu\" className={classNames('rt-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\n// Extracted to module scope to avoid re-creation on every render\nfunction separateIconsAndLabels(node: React.ReactNode): { icons: React.ReactNode[]; labels: React.ReactNode[] } {\n const icons: React.ReactNode[] = [];\n const labels: React.ReactNode[] = [];\n\n React.Children.forEach(node, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n labels.push(<span key={labels.length} className=\"rt-SidebarMenuLabel\">{child}</span>);\n } else if (React.isValidElement(child)) {\n const el = child as React.ReactElement<any>;\n if (el.type === 'svg' || (el.props && el.props.icon) || (typeof el.type === 'function' && ((el.type as any).displayName?.includes('Icon') || (el.type as any).name?.includes('Icon')))) {\n icons.push(child);\n } else {\n labels.push(child);\n }\n } else if (child) {\n labels.push(child);\n }\n });\n\n return { icons, labels };\n}\n\nfunction wrapTextNodes(node: React.ReactNode): React.ReactNode {\n if (typeof node === 'string' || typeof node === 'number') {\n return <span className=\"rt-SidebarMenuLabel\">{node}</span>;\n }\n if (Array.isArray(node)) {\n return node.map((child, index) => <React.Fragment key={index}>{wrapTextNodes(child)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const el = node as React.ReactElement<any>;\n const className: string = (el.props && (el.props as any).className) || '';\n const isAlreadyLabel = typeof el.type === 'string' && className.split(' ').includes('rt-SidebarMenuLabel');\n if (isAlreadyLabel) return el;\n const newChildren = wrapTextNodes((el.props as any)?.children);\n return React.cloneElement(el, { ...(el.props as any) }, newChildren);\n }\n return node;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onKeyDown, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n const isThinMode = visual?.presentation === 'thin';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (event.currentTarget as HTMLElement).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n // Memoize child processing to avoid re-traversal on every render\n const processedChildren = React.useMemo(() => wrapTextNodes(children), [children]);\n\n // For thin mode, separate icons into a wrapper for targeted background styling\n const { icons, labels } = React.useMemo(\n () => isThinMode ? separateIconsAndLabels(children) : { icons: [] as React.ReactNode[], labels: [] as React.ReactNode[] },\n [isThinMode, children],\n );\n\n // When rendering asChild, Slot expects a single child element. We still want to\n // append optional badge/shortcut inside that element so they render with Link.\n const slottedChildren = React.useMemo(() => {\n if (!asChild) return null;\n try {\n const onlyChild = React.Children.only(processedChildren as React.ReactElement<any>) as React.ReactElement<any>;\n const originalInnerChildren = (onlyChild.props as any)?.children;\n const enhancedInnerChildren = (\n <>\n {originalInnerChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n return React.cloneElement(onlyChild, { ...(onlyChild.props as any) }, enhancedInnerChildren);\n } catch {\n // Fallback: if multiple children were passed incorrectly, just return processedChildren\n return processedChildren as React.ReactNode;\n }\n }, [asChild, processedChildren, badge, shortcut, sidebarSize]);\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n onKeyDown={handleKeyDown}\n >\n {asChild ? (\n slottedChildren\n ) : isThinMode && icons.length > 0 ? (\n <>\n <span className=\"rt-SidebarMenuIconWrapper\">{icons}</span>\n {labels.map((label, index) => (\n <React.Fragment key={index}>\n {typeof label === 'string' || typeof label === 'number' ? (\n <span className=\"rt-SidebarMenuLabel\">{label}</span>\n ) : (\n label\n )}\n </React.Fragment>\n ))}\n </>\n ) : (\n <>\n {processedChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, ...props }, forwardedRef) => {\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n ref={forwardedRef as any}\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('rt-BaseMenuSubTriggerIcon', 'rt-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const unwrapMenuButton = (node: React.ReactNode): React.ReactNode => {\n if (Array.isArray(node)) {\n return node.map((n, i) => <React.Fragment key={i}>{unwrapMenuButton(n)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const typeDisplay = (node.type as any)?.displayName;\n if (typeDisplay === 'Sidebar.MenuButton') {\n return (node.props as any)?.children;\n }\n const child = (node.props as any)?.children;\n if (child !== undefined) {\n return React.cloneElement(node as any, { ...(node.props as any), children: unwrapMenuButton(child) });\n }\n }\n return node;\n };\n\n const normalized = React.Children.map(children as React.ReactNode, (child, index) => {\n if (React.isValidElement(child) && (child.type as any)?.displayName === 'Sidebar.MenuItem') {\n const itemChildren = (child.props as any)?.children;\n const content = unwrapMenuButton(itemChildren);\n return (\n <DropdownMenu.Item key={index} asChild>\n {content as any}\n </DropdownMenu.Item>\n );\n }\n // Fallback: wrap raw nodes too for consistent menu styling\n return (\n <DropdownMenu.Item key={index} asChild>\n {unwrapMenuButton(child) as any}\n </DropdownMenu.Item>\n );\n });\n\n // DropdownMenu only supports sizes 1 and 2, so map size 3 to 2\n const dropdownSize = visual?.size === '3' ? '2' : visual?.size;\n return (\n <DropdownMenu.Content size={dropdownSize} variant={visual?.menuVariant} className={classNames(className)}>\n <DropdownMenu.Group>{normalized}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuSubContent', className)}>\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)} />\n));\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return <Comp {...props} ref={forwardedRef} role=\"group\" className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Search component: inline input in expanded, popover trigger in thin\ninterface SidebarSearchProps extends React.ComponentPropsWithoutRef<'div'> {\n value: string;\n onValueChange: (value: string) => void;\n placeholder?: string;\n children?: React.ReactNode;\n}\n\nconst SearchIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\n </svg>\n);\n\nconst ClearIcon = ({ className }: { className?: string }) => (\n <svg className={className} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\nconst SidebarSearch = React.forwardRef<HTMLDivElement, SidebarSearchProps>(\n ({ value, onValueChange, placeholder = 'Search...', children, className, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const isThin = visual?.presentation === 'thin';\n const inputRef = React.useRef<HTMLInputElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const searchId = React.useId();\n const resultsId = `${searchId}-results`;\n\n // Stable refs for values used in callbacks \u2014 avoids recreating handlers on every keystroke\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const onValueChangeRef = React.useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n\n // Derive a clean aria-label from placeholder (strip trailing dots/ellipsis)\n const searchLabel = placeholder.replace(/\\.+$/, '');\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Escape' && valueRef.current) {\n e.preventDefault();\n e.stopPropagation();\n onValueChangeRef.current('');\n inputRef.current?.focus();\n }\n },\n [],\n );\n\n // Arrow key navigation within the popover (input \u2194 results)\n const handlePopoverKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n const container = popoverRef.current;\n if (!container) return;\n\n const resultsGroup = container.querySelector('[role=\"group\"]');\n if (!resultsGroup) return;\n\n const items = Array.from(\n resultsGroup.querySelectorAll<HTMLElement>('a, button'),\n );\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement;\n const isOnInput = active === inputRef.current;\n const currentIndex = items.indexOf(active);\n\n // Typing while a result is focused \u2192 redirect focus to input\n if (\n e.key.length === 1 &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey &&\n !isOnInput &&\n currentIndex !== -1\n ) {\n inputRef.current?.focus();\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n if (isOnInput || currentIndex === -1) {\n items[0]?.focus();\n } else if (currentIndex < items.length - 1) {\n items[currentIndex + 1]?.focus();\n }\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n if (currentIndex <= 0) {\n inputRef.current?.focus();\n } else {\n items[currentIndex - 1]?.focus();\n }\n break;\n }\n case 'Home': {\n // Only intercept when focused on a result, not the input (where Home moves cursor)\n if (!isOnInput) {\n e.preventDefault();\n items[0]?.focus();\n }\n break;\n }\n case 'End': {\n if (!isOnInput) {\n e.preventDefault();\n items[items.length - 1]?.focus();\n }\n break;\n }\n }\n },\n [],\n );\n\n if (isThin) {\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--thin', className)}>\n <Popover.Root>\n <Popover.Trigger>\n <button\n type=\"button\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarSearchTrigger')}\n aria-label={searchLabel}\n >\n <span className=\"rt-SidebarMenuIconWrapper\">\n <SearchIcon />\n </span>\n <span className=\"rt-SidebarMenuLabel\">Search</span>\n </button>\n </Popover.Trigger>\n <Popover.Content side=\"right\" align=\"start\" size=\"2\" width=\"280px\" aria-label={searchLabel}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- keyDown manages arrow-key navigation between input and results, which is accessibility-enhancing */}\n <div\n ref={popoverRef}\n className=\"rt-SidebarSearchPopover\"\n role=\"search\"\n onKeyDown={handlePopoverKeyDown}\n >\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n aria-controls={children ? resultsId : undefined}\n // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: popover opens on user action, focusing the input is expected UX\n autoFocus\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n {children && (\n <div id={resultsId} role=\"group\" aria-label=\"Search results\">\n {children}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n }\n\n // Expanded mode: inline input\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--expanded', className)} role=\"search\">\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n </div>\n );\n },\n);\nSidebarSearch.displayName = 'Sidebar.Search';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n SidebarSearch as Search,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuSubContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport {\n DrillDownProvider,\n SubContext,\n useDrillDownActionsOptional,\n useDrillDownStateOptional,\n useSubContext,\n} from './_internal/dropdown-menu-drill-down.js';\nimport { MenuProvider } from './_internal/menu-context.js';\nimport type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Kbd } from './kbd.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\n/**\n * Internal component that wraps root menu items and handles visibility in drill-down mode.\n * In drill-down mode, this hides when a submenu is active.\n * Uses state-only hook to subscribe only to state changes, not action changes.\n */\nfunction DrillDownRoot({ children }: { children: React.ReactNode }) {\n const drillDownState = useDrillDownStateOptional();\n\n // In cascade mode or when no drill-down context, always show\n if (!drillDownState || drillDownState.behavior === 'cascade') {\n return <>{children}</>;\n }\n\n // In drill-down mode, hide root when a submenu is active\n return (\n <div\n className=\"rt-DropdownMenuDrillDownRoot\"\n data-drill-down-active={drillDownState.isRoot ? undefined : true}\n data-animation-direction={drillDownState.animationDirection ?? undefined}\n >\n {children}\n </div>\n );\n}\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs> & {\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n};\ntype DropdownMenuContentContextValue = Omit<DropdownMenuContentOwnProps, 'submenuBehavior'>;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n props.material ?? props.panelBackground ?? themeContext.panelBackground;\n\n // Memoize theme context values to prevent unnecessary re-renders\n const memoizedThemeContext = React.useMemo(\n () => ({\n material: effectiveMaterial,\n accentColor: themeContext.accentColor,\n }),\n [effectiveMaterial, themeContext.accentColor],\n );\n\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n material = memoizedThemeContext.material,\n submenuBehavior,\n virtualized = false,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n submenuBehavior: ___,\n virtualized: ____,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n // Memoize color resolution to prevent unnecessary re-renders\n const resolvedColor = React.useMemo(\n () => color || memoizedThemeContext.accentColor,\n [color, memoizedThemeContext.accentColor],\n );\n const contentBody = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast, material }),\n [size, variant, resolvedColor, highContrast, material],\n )}\n >\n <DrillDownProvider submenuBehavior={submenuBehavior}>\n <DrillDownRoot>{children}</DrillDownRoot>\n </DrillDownProvider>\n </DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n data-material={material}\n data-panel-background={material}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport', 'rt-virtualized')}>\n {contentBody}\n </div>\n ) : (\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {contentBody}\n </div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\n// Generate unique submenu IDs using React 18's useId for SSR safety\nfunction useSubId() {\n return React.useId();\n}\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {\n /**\n * Label displayed in the back button when using drill-down mode.\n * If not provided, defaults to \"Back\".\n */\n label?: React.ReactNode;\n}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = ({ label = 'Back', ...props }) => {\n // Use state-only hook since we only need behavior check\n const drillDownState = useDrillDownStateOptional();\n const subId = useSubId();\n\n // Create context value for SubContent and SubTrigger\n const subContextValue = React.useMemo(\n () => ({ id: subId, label }),\n [subId, label]\n );\n\n // In drill-down mode, we don't use Radix's Sub component\n // We just provide the SubContext and render children\n if (drillDownState?.behavior === 'drill-down') {\n return (\n <SubContext.Provider value={subContextValue}>\n {props.children}\n </SubContext.Provider>\n );\n }\n\n // In cascade mode, use Radix's Sub component normally\n return (\n <SubContext.Provider value={subContextValue}>\n <DropdownMenuPrimitive.Sub {...props} />\n </SubContext.Provider>\n );\n};\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, onClick, ...subTriggerProps } = props;\n // Use split hooks: actions for stable push callback, state only for behavior check\n const drillDownActions = useDrillDownActionsOptional();\n const drillDownState = useDrillDownStateOptional();\n const subContext = useSubContext();\n\n // Store onClick in ref to avoid recreating handlers when onClick changes\n const onClickRef = React.useRef(onClick);\n onClickRef.current = onClick;\n\n // Stable click handler - only depends on stable refs\n const handleClick = React.useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n if (subContext && drillDownActions) {\n drillDownActions.push(subContext.id);\n }\n (onClickRef.current as React.MouseEventHandler<HTMLDivElement> | undefined)?.(e);\n }, [subContext, drillDownActions]);\n\n // Stable keydown handler\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (subContext && drillDownActions) {\n drillDownActions.push(subContext.id);\n }\n }\n }, [subContext, drillDownActions]);\n\n // In drill-down mode, render a button that navigates to the submenu\n if (drillDownState?.behavior === 'drill-down' && subContext) {\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n 'rt-DropdownMenuDrillDownSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </div>\n );\n }\n\n // In cascade mode, use Radix's SubTrigger\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n onClick={onClick as React.MouseEventHandler<HTMLDivElement> | undefined}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\n// Separator is defined here (before SubContent) because it's used in drill-down mode\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\n/**\n * Internal component for the drill-down back button.\n * Uses actions-only hook since it only needs to call pop(), never reads state.\n * This prevents re-renders when drill-down state changes.\n */\nfunction DrillDownBackItem({ label }: { label: React.ReactNode }) {\n // Use actions-only hook for stable pop callback - prevents re-renders on stack changes\n const { pop } = useDrillDownActionsOptional() ?? {};\n\n // Stable click handler\n const handleClick = React.useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n pop?.();\n }, [pop]);\n\n // Stable keydown handler\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n pop?.();\n }\n }, [pop]);\n\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuDrillDownBackItem',\n )}\n >\n <ThickChevronLeftIcon className=\"rt-DropdownMenuDrillDownBackIcon\" />\n <span className=\"rt-DropdownMenuDrillDownBackLabel\">{label}</span>\n </div>\n );\n}\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n // Get context values directly - memoization at provider level handles stability\n const { size, variant, color, highContrast, material } = React.useContext(\n DropdownMenuContentContext,\n );\n // Use state-only hook since we only need behavior and isActive (no actions)\n const drillDownState = useDrillDownStateOptional();\n const subContext = useSubContext();\n\n const {\n className,\n children,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n ...subContentProps\n } = extractProps(\n { size, variant, color, highContrast, material, ...props },\n dropdownMenuSubContentPropDefs,\n );\n\n // In drill-down mode, render inline instead of in a portal\n if (drillDownState?.behavior === 'drill-down' && subContext) {\n const isActive = drillDownState.isActive(subContext.id);\n\n return (\n <div\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n role=\"menu\"\n aria-label={typeof subContext.label === 'string' ? subContext.label : undefined}\n data-drill-down-active={isActive ? true : undefined}\n data-animation-direction={drillDownState.animationDirection ?? undefined}\n className={classNames(\n 'rt-DropdownMenuDrillDownPanel',\n className,\n )}\n >\n <DrillDownBackItem label={subContext.label} />\n <DropdownMenuSeparator />\n {children}\n </div>\n );\n }\n\n // In cascade mode, use Portal and Radix's SubContent\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n SubmenuBehavior,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import classNames from 'classnames';\n\nimport { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\n\nexport function getMarginStyles(props: MarginProps) {\n const [mClassNames, mCustomProperties] = getResponsiveStyles({\n className: 'rt-r-m',\n customProperties: ['--margin'],\n propValues: marginValues,\n value: props.m,\n });\n\n const [mxClassNames, mxCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mx',\n customProperties: ['--margin-left', '--margin-right'],\n propValues: marginValues,\n value: props.mx,\n });\n\n const [myClassNames, myCustomProperties] = getResponsiveStyles({\n className: 'rt-r-my',\n customProperties: ['--margin-top', '--margin-bottom'],\n propValues: marginValues,\n value: props.my,\n });\n\n const [mtClassNames, mtCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mt',\n customProperties: ['--margin-top'],\n propValues: marginValues,\n value: props.mt,\n });\n\n const [mrClassNames, mrCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mr',\n customProperties: ['--margin-right'],\n propValues: marginValues,\n value: props.mr,\n });\n\n const [mbClassNames, mbCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mb',\n customProperties: ['--margin-bottom'],\n propValues: marginValues,\n value: props.mb,\n });\n\n const [mlClassNames, mlCustomProperties] = getResponsiveStyles({\n className: 'rt-r-ml',\n customProperties: ['--margin-left'],\n propValues: marginValues,\n value: props.ml,\n });\n\n return [\n classNames(\n mClassNames,\n mxClassNames,\n myClassNames,\n mtClassNames,\n mrClassNames,\n mbClassNames,\n mlClassNames\n ),\n mergeStyles(\n mCustomProperties,\n mxCustomProperties,\n myCustomProperties,\n mtCustomProperties,\n mrCustomProperties,\n mbCustomProperties,\n mlCustomProperties\n ),\n ] as const;\n}\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({\n allowArbitraryValues,\n value,\n className,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveClassNamesOptions): string | undefined {\n const classNames: string[] = [];\n\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string' && propValues.includes(value)) {\n return getBaseClassName(className, value, parseValue);\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (propValues.includes(value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.join(' ');\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(\n className: string,\n value: string,\n parseValue: (value: string) => string | undefined\n): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({\n customProperties,\n value,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveCustomPropertiesOptions) {\n let styles: Record<string, string | undefined> = {};\n\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && propValues.includes(value))) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n styles = Object.fromEntries(customProperties.map((prop) => [prop, value]));\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (propValues.includes(value)) {\n continue;\n }\n\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = value;\n }\n }\n }\n\n for (const key in styles) {\n const value = styles[key];\n if (value !== undefined) {\n styles[key] = parseValue(value);\n }\n }\n\n return styles;\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst submenuBehaviors = ['cascade', 'drill-down'] as const;\n\n// Base props shared between Content and SubContent\nconst baseMenuSharedPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n material: {\n type: 'enum',\n values: materials,\n default: undefined,\n },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\n// Content-specific props (includes submenuBehavior)\nconst baseMenuContentPropDefs = {\n ...baseMenuSharedPropDefs,\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior: {\n type: 'enum',\n values: submenuBehaviors,\n default: 'cascade',\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n submenuBehavior: PropDef<(typeof submenuBehaviors)[number]>;\n};\n\n// SubContent props (no submenuBehavior)\nconst baseMenuSubContentPropDefs = baseMenuSharedPropDefs;\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuSubContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n submenuBehaviors,\n};\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n const [appearance, setAppearance] = React.useState(appearanceProp);\n React.useEffect(() => setAppearance(appearanceProp), [appearanceProp]);\n\n const [accentColor, setAccentColor] = React.useState(accentColorProp);\n React.useEffect(() => setAccentColor(accentColorProp), [accentColorProp]);\n\n const [grayColor, setGrayColor] = React.useState(grayColorProp);\n React.useEffect(() => setGrayColor(grayColorProp), [grayColorProp]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = React.useState(effectiveMaterial);\n React.useEffect(() => setMaterial(effectiveMaterial), [effectiveMaterial]);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = React.useState(panelBackgroundProp);\n React.useEffect(() => setPanelBackground(material), [material]);\n\n const [radius, setRadius] = React.useState(radiusProp);\n React.useEffect(() => setRadius(radiusProp), [radiusProp]);\n\n const [scaling, setScaling] = React.useState(scalingProp);\n React.useEffect(() => setScaling(scalingProp), [scalingProp]);\n\n const [fontFamily, setFontFamily] = React.useState(fontFamilyProp);\n React.useEffect(() => setFontFamily(fontFamilyProp), [fontFamilyProp]);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n const [clientOS, setClientOS] = React.useState<ReturnType<typeof getClientOS>>(undefined);\n React.useEffect(() => {\n if (isRoot) setClientOS(getClientOS());\n }, [isRoot]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-os={isRoot ? clientOS : undefined}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n", "import classNames from 'classnames';\n\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef>\n ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T]\n : never;\n\nfunction mergePropDefs<T extends Record<string, PropDef>[]>(...args: T): Record<string, PropDef> {\n return Object.assign({}, ...args);\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<\n P extends { className?: string; style?: React.CSSProperties; [key: string]: any },\n T extends Record<string, PropDef>[]\n>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n let className: string | undefined;\n let style: ReturnType<typeof mergeStyles>;\n const extractedProps = { ...props };\n const allPropDefs = mergePropDefs(...propDefs);\n\n for (const key in allPropDefs) {\n let value = extractedProps[key];\n const propDef = allPropDefs[key];\n\n // Apply prop def defaults\n if (propDef.default !== undefined && value === undefined) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n }\n\n // Apply the value with defaults\n (extractedProps as Record<string, any>)[key] = value;\n\n if ('className' in propDef && propDef.className) {\n delete extractedProps[key];\n\n const isResponsivePropDef = 'responsive' in propDef;\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!value || (isResponsiveObject(value) && !isResponsivePropDef)) {\n continue;\n }\n\n if (isResponsiveObject(value)) {\n // Apply prop def defaults to the `initial` breakpoint\n if (propDef.default !== undefined && value.initial === undefined) {\n value.initial = propDef.default;\n }\n\n // Apply the default value to the `initial` breakpoint when it is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value.initial)) {\n value.initial = propDef.default;\n }\n }\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className,\n propValues: propDef.values,\n parseValue: propDef.parseValue,\n });\n\n className = classNames(className, propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const propDefValues = propDef.type === 'string' ? [] : propDef.values;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className,\n customProperties: propDef.customProperties,\n propValues: propDefValues,\n parseValue: propDef.parseValue,\n value,\n });\n\n style = mergeStyles(style, propCustomProperties);\n className = classNames(className, propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean' && value) {\n // TODO handle responsive boolean props\n className = classNames(className, propDef.className);\n continue;\n }\n }\n }\n\n extractedProps.className = classNames(className, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps;\n}\n\nexport { extractProps };\n", "'use client';\n\nimport * as React from 'react';\nimport type { Breakpoint, Responsive } from '../../props/prop-def.js';\nimport type { submenuBehaviors } from './base-menu.props.js';\nimport { useBreakpoint } from '../../hooks/use-breakpoint.js';\n\ntype SubmenuBehavior = (typeof submenuBehaviors)[number];\n\n/**\n * Resolves a responsive value to its current value based on the breakpoint.\n * Falls back through smaller breakpoints if the current one isn't defined.\n */\nfunction resolveResponsiveValue<T>(\n value: T | Partial<Record<Breakpoint, T>> | undefined,\n currentBreakpoint: Breakpoint,\n defaultValue: T\n): T {\n if (value === undefined || value === null) {\n return defaultValue;\n }\n\n // Non-object values are returned directly\n if (typeof value !== 'object') {\n return value;\n }\n\n const map = value as Partial<Record<Breakpoint, T>>;\n\n // Check if current breakpoint has a value\n if (map[currentBreakpoint] !== undefined) {\n return map[currentBreakpoint] as T;\n }\n\n // Fall back through smaller breakpoints\n const bpOrder: Breakpoint[] = ['xl', 'lg', 'md', 'sm', 'xs', 'initial'];\n const startIdx = bpOrder.indexOf(currentBreakpoint);\n\n for (let i = startIdx + 1; i < bpOrder.length; i++) {\n const bp = bpOrder[i];\n if (map[bp] !== undefined) {\n return map[bp] as T;\n }\n }\n\n return defaultValue;\n}\n\n// ============================================================================\n// DrillDown Context\n// ============================================================================\n\ntype AnimationDirection = 'forward' | 'backward' | null;\n\n/**\n * Stable actions context - callbacks that don't change identity.\n * Separated from state to prevent unnecessary re-renders of components\n * that only need to call push/pop/reset.\n */\ninterface DrillDownActionsContextValue {\n /** Navigate into a submenu */\n push: (id: string) => void;\n /** Navigate back to parent menu */\n pop: () => void;\n /** Reset to root menu */\n reset: () => void;\n}\n\n/**\n * Mutable state context - values that change when navigation occurs.\n * Subscribers to this context will re-render on stack changes.\n */\ninterface DrillDownStateContextValue {\n /** Current submenu behavior mode */\n behavior: SubmenuBehavior;\n /** Whether the breakpoint has been resolved (client-side only) */\n ready: boolean;\n /** Stack of active submenu IDs. Empty means root menu is shown. */\n stack: string[];\n /** Check if a specific submenu is the currently active one */\n isActive: (id: string) => boolean;\n /** Check if we're at root level (no submenus open) */\n isRoot: boolean;\n /** The currently active submenu ID (or null if at root) */\n currentId: string | null;\n /** Current animation direction for transitions */\n animationDirection: AnimationDirection;\n}\n\nconst DrillDownActionsContext = React.createContext<DrillDownActionsContextValue | null>(null);\nconst DrillDownStateContext = React.createContext<DrillDownStateContextValue | null>(null);\n\ninterface DrillDownProviderProps {\n children: React.ReactNode;\n submenuBehavior: Responsive<SubmenuBehavior> | undefined;\n}\n\nfunction DrillDownProvider({ children, submenuBehavior }: DrillDownProviderProps) {\n const { breakpoint, ready } = useBreakpoint();\n const [stack, setStack] = React.useState<string[]>([]);\n const [animationDirection, setAnimationDirection] = React.useState<AnimationDirection>(null);\n\n // Resolve the current behavior based on breakpoint\n const behavior = React.useMemo(\n () => resolveResponsiveValue(submenuBehavior, breakpoint, 'cascade'),\n [submenuBehavior, breakpoint]\n );\n\n // Reset stack when behavior changes from drill-down to cascade\n const prevBehaviorRef = React.useRef(behavior);\n React.useEffect(() => {\n if (prevBehaviorRef.current === 'drill-down' && behavior === 'cascade') {\n setStack([]);\n setAnimationDirection(null);\n }\n prevBehaviorRef.current = behavior;\n }, [behavior]);\n\n // Stable action callbacks - these never change identity\n const push = React.useCallback((id: string) => {\n setAnimationDirection('forward');\n setStack((prev) => [...prev, id]);\n }, []);\n\n const pop = React.useCallback(() => {\n setAnimationDirection('backward');\n setStack((prev) => prev.slice(0, -1));\n }, []);\n\n const reset = React.useCallback(() => {\n setStack([]);\n setAnimationDirection(null);\n }, []);\n\n // Memoize actions context value - completely stable, never changes\n const actionsValue = React.useMemo(\n (): DrillDownActionsContextValue => ({ push, pop, reset }),\n [push, pop, reset]\n );\n\n // isActive depends on stack - this is expected to change\n const isActive = React.useCallback(\n (id: string) => {\n if (stack.length === 0) return false;\n return stack[stack.length - 1] === id;\n },\n [stack]\n );\n\n // Memoize state context value - changes when stack/behavior changes\n const stateValue = React.useMemo(\n (): DrillDownStateContextValue => ({\n behavior,\n ready,\n stack,\n isActive,\n isRoot: stack.length === 0,\n currentId: stack.length > 0 ? stack[stack.length - 1] : null,\n animationDirection,\n }),\n [behavior, ready, stack, isActive, animationDirection]\n );\n\n return (\n <DrillDownActionsContext.Provider value={actionsValue}>\n <DrillDownStateContext.Provider value={stateValue}>\n {children}\n </DrillDownStateContext.Provider>\n </DrillDownActionsContext.Provider>\n );\n}\n\n/**\n * Hook to access only the stable action callbacks (push, pop, reset).\n * Use this in components that only need to trigger navigation,\n * not react to state changes. Prevents unnecessary re-renders.\n */\nfunction useDrillDownActions() {\n const ctx = React.useContext(DrillDownActionsContext);\n if (!ctx) {\n throw new Error('useDrillDownActions must be used within a DropdownMenu.Content');\n }\n return ctx;\n}\n\n/**\n * Hook to access drill-down state (behavior, stack, isActive, etc.).\n * Components using this will re-render when navigation state changes.\n */\nfunction useDrillDownState() {\n const ctx = React.useContext(DrillDownStateContext);\n if (!ctx) {\n throw new Error('useDrillDownState must be used within a DropdownMenu.Content');\n }\n return ctx;\n}\n\n/**\n * Optional version of useDrillDownActions for components that may be outside Content.\n */\nfunction useDrillDownActionsOptional() {\n return React.useContext(DrillDownActionsContext);\n}\n\n/**\n * Optional version of useDrillDownState for components that may be outside Content.\n */\nfunction useDrillDownStateOptional() {\n return React.useContext(DrillDownStateContext);\n}\n\n// ============================================================================\n// Sub Context (for individual submenu instances)\n// ============================================================================\n\ninterface SubContextValue {\n /** Unique ID for this submenu */\n id: string;\n /** Label for the back button */\n label: React.ReactNode;\n}\n\nconst SubContext = React.createContext<SubContextValue | null>(null);\n\nfunction useSubContext() {\n return React.useContext(SubContext);\n}\n\nexport {\n DrillDownProvider,\n DrillDownActionsContext,\n DrillDownStateContext,\n SubContext,\n useDrillDownActions,\n useDrillDownActionsOptional,\n useDrillDownState,\n useDrillDownStateOptional,\n useSubContext,\n useBreakpoint,\n resolveResponsiveValue,\n};\n\nexport type {\n SubmenuBehavior,\n DrillDownActionsContextValue,\n DrillDownStateContextValue,\n SubContextValue,\n AnimationDirection,\n};\n", "'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\n/**\n * Hook to get the current breakpoint based on window width.\n * Returns 'initial' on the server and during initial hydration.\n * Uses shared breakpoint values from shell.types.js.\n */\nexport function useBreakpoint(): { breakpoint: Breakpoint; ready: boolean } {\n const [currentBp, setCurrentBp] = React.useState<Breakpoint>('initial');\n const [ready, setReady] = React.useState(false);\n\n React.useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const queries = Object.entries(_BREAKPOINTS) as [keyof typeof _BREAKPOINTS, string][];\n const mqls = queries.map(([k, q]) => [k, window.matchMedia(q)] as const);\n\n // Accept optional event param to satisfy MediaQueryList listener signature\n const compute = (_e?: MediaQueryListEvent) => {\n // Highest matched wins\n const matched = mqls.filter(([, m]) => m.matches).map(([k]) => k);\n const next = (matched[matched.length - 1] as Breakpoint | undefined) ?? 'initial';\n setCurrentBp(next);\n setReady(true);\n };\n\n compute();\n const cleanups: Array<() => void> = [];\n mqls.forEach(([, m]) => {\n const mm = m as MediaQueryList & {\n addEventListener?: (type: 'change', listener: (e: MediaQueryListEvent) => void) => void;\n removeEventListener?: (type: 'change', listener: (e: MediaQueryListEvent) => void) => void;\n addListener?: (listener: (e: MediaQueryListEvent) => void) => void;\n removeListener?: (listener: (e: MediaQueryListEvent) => void) => void;\n };\n if (typeof mm.addEventListener === 'function' && typeof mm.removeEventListener === 'function') {\n mm.addEventListener('change', compute);\n cleanups.push(() => mm.removeEventListener?.('change', compute));\n } else if (typeof mm.addListener === 'function' && typeof mm.removeListener === 'function') {\n mm.addListener(compute);\n cleanups.push(() => mm.removeListener?.(compute));\n }\n });\n\n return () => {\n cleanups.forEach((fn) => {\n try {\n fn();\n } catch (e) {\n // MediaQueryList cleanup can fail in edge cases (e.g., already removed)\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', e);\n }\n }\n });\n };\n }, []);\n\n return { breakpoint: currentBp, ready };\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'thin' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n height?: string | number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n", "'use client';\n\nimport * as React from 'react';\nimport type { Responsive } from '../../props/prop-def.js';\n\n/**\n * Context to detect if a component is rendered inside a menu (DropdownMenu, ContextMenu, etc.)\n * Used by VirtualMenu to adjust its behavior:\n * - Skip role=\"menu\" when inside a parent menu (parent owns the role)\n * - Delegate certain keyboard handling to parent\n * - Use the correct item height based on menu size\n */\n\nexport type MenuSize = '1' | '2';\n\ninterface MenuContextValue {\n /** Whether we're inside a menu that owns the menu role */\n isInsideMenu: boolean;\n /** Menu size for calculating item heights (resolved to non-responsive value) */\n size?: MenuSize;\n}\n\nconst MenuContext = React.createContext<MenuContextValue>({ isInsideMenu: false });\n\ninterface MenuProviderProps {\n children: React.ReactNode;\n /** Menu size passed from parent (DropdownMenu.Content, ContextMenu.Content, etc.) */\n size?: Responsive<MenuSize>;\n}\n\n/** Extract the base size from a potentially responsive value */\nfunction resolveSize(size: Responsive<MenuSize> | undefined): MenuSize | undefined {\n if (!size) return undefined;\n if (typeof size === 'string') return size;\n // For responsive objects, use the 'initial' value\n return size.initial;\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = resolveSize(size);\n const value = React.useMemo(() => ({ isInsideMenu: true, size: resolvedSize }), [resolvedSize]);\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>;\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n\n/** Map menu size to item height in pixels */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24, // --space-5\n '2': 32, // --space-6\n};\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, MarginProps, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs, marginPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['classic', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'classic',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={React.useMemo(() => ({ contentRef, setToolbarOffset, setLabelId }), [setToolbarOffset])}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\n// Re-export base menu props for sidebar menu components\nexport {\n baseMenuContentPropDefs as sidebarContentPropDefs,\n baseMenuItemPropDefs as sidebarItemPropDefs,\n baseMenuCheckboxItemPropDefs as sidebarCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as sidebarRadioItemPropDefs,\n} from './_internal/base-menu.props.js';\n\n// Sidebar container props\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['soft', 'outline', 'surface', 'ghost'] as const;\nconst menuVariants = ['solid', 'soft'] as const;\nconst types = ['sidebar'] as const;\nconst sides = ['left', 'right'] as const;\nconst collapsibleModes = ['offcanvas', 'icon', 'none'] as const;\nconst layouts = ['rail', 'panel'] as const;\n\nconst sidebarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'outline' },\n menuVariant: {\n type: 'enum',\n className: 'rt-menu-variant',\n values: menuVariants,\n default: 'soft',\n },\n type: { type: 'enum', className: 'rt-type', values: types, default: 'sidebar' },\n side: { type: 'enum', className: 'rt-side', values: sides, default: 'left' },\n collapsible: {\n type: 'enum',\n className: 'rt-collapsible',\n values: collapsibleModes,\n default: 'offcanvas',\n },\n layout: { type: 'enum', className: 'rt-layout', values: layouts, default: undefined },\n panelBackground: { type: 'enum', values: ['solid', 'translucent'], default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n menuVariant: PropDef<(typeof menuVariants)[number]>;\n type: PropDef<(typeof types)[number]>;\n side: PropDef<(typeof sides)[number]>;\n collapsible: PropDef<(typeof collapsibleModes)[number]>;\n layout: PropDef<(typeof layouts)[number]>;\n panelBackground: PropDef<'solid' | 'translucent'>;\n};\n\nexport { sidebarPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { separatorPropDefs } from './separator.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SeparatorElement = React.ElementRef<'span'>;\ntype SeparatorOwnProps = GetPropDefTypes<typeof separatorPropDefs>;\ninterface SeparatorProps extends ComponentPropsWithout<'span', RemovedProps>, MarginProps, SeparatorOwnProps {}\nconst Separator = React.forwardRef<SeparatorElement, SeparatorProps>((props, forwardedRef) => {\n const { className, color, decorative, ...separatorProps } = extractProps(props, separatorPropDefs, marginPropDefs);\n return <span data-accent-color={color} role={decorative ? undefined : 'separator'} {...separatorProps} ref={forwardedRef} className={classNames('rt-Separator', className)} />;\n});\nSeparator.displayName = 'Separator';\n\nexport { Separator };\nexport type { SeparatorProps };\n", "import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst orientationValues = ['horizontal', 'vertical'] as const;\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst separatorPropDefs = {\n orientation: {\n type: 'enum',\n className: 'rt-r-orientation',\n values: orientationValues,\n default: 'horizontal',\n responsive: true,\n },\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n color: { ...colorPropDef.color, default: 'gray' },\n decorative: { type: 'boolean', default: true },\n light: { type: 'boolean', className: 'rt-light', default: false },\n} satisfies {\n orientation: PropDef<(typeof orientationValues)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n color: typeof colorPropDef.color;\n decorative: PropDef<boolean>;\n light: PropDef<boolean>;\n};\n\nexport { separatorPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { badgePropDefs } from './badge.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Tooltip } from './tooltip.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype BadgeElement = React.ElementRef<'span'>;\ntype BadgeOwnProps = GetPropDefTypes<typeof badgePropDefs>;\n\n// Tooltip props that can be passed to Badge\ninterface BadgeTooltipProps {\n tooltip?: React.ReactNode;\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n tooltipAlign?: 'start' | 'center' | 'end';\n tooltipDelayDuration?: number;\n tooltipDisableHoverableContent?: boolean;\n}\n\ninterface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n BadgeOwnProps,\n BadgeTooltipProps {}\n\nconst Badge = React.forwardRef<BadgeElement, BadgeProps>((props, forwardedRef) => {\n const {\n asChild,\n className,\n children,\n color,\n radius,\n material,\n panelBackground,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n ...badgeProps\n } = extractProps(props, badgePropDefs, marginPropDefs);\n\n // Memoize material calculation for performance\n const effectiveMaterial = React.useMemo(\n () => material ?? panelBackground,\n [material, panelBackground],\n );\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [panelBackground]);\n\n // Memoize component variable to prevent unnecessary re-renders\n const Comp = React.useMemo(() => (asChild ? Slot.Root : 'span'), [asChild]);\n\n const badge = (\n <Comp\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n {...badgeProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Badge', className)}\n >\n {children}\n </Comp>\n );\n\n // If no tooltip is provided, return the badge as-is\n if (!tooltip) {\n return badge;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n return (\n <Tooltip\n content={tooltip}\n side={tooltipSide}\n align={tooltipAlign}\n delayDuration={tooltipDelayDuration}\n disableHoverableContent={tooltipDisableHoverableContent}\n >\n {badge}\n </Tooltip>\n );\n});\nBadge.displayName = 'Badge';\n\nexport { Badge };\nexport type { BadgeProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['solid', 'soft', 'surface', 'outline', 'ghost', 'classic'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst badgePropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nexport { badgePropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n"],
5
- "mappings": "2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,WAAAC,GAAA,UAAAC,GAAA,iBAAAC,GAAA,eAAAC,GAAA,WAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,aAAAC,GAAA,YAAAC,GAAA,mBAAAC,GAAA,mBAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,cAAAC,KAAA,eAAAC,GAAAjB,IAEA,IAAAkB,EAAuB,oBACvBC,EAAuB,yBCHvB,IAAAC,GAAsC,oBACzBC,GAAO,GAAAC,KAAc,KACrBC,GAAO,GAAAD,KAAc,KACrBE,GAA4C,GAAAF,KAAc,UDEvE,IAAAG,EAA2B,wCEH3B,IAAAC,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA4D,oBCJ5D,IAAAC,EAAuB,oBACvBC,GAAuB,yBACvBC,EAAkD,oBCAlD,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECRA,IAAMC,GAAQ,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,EAEnDC,GAAgB,CACpB,OAAQ,CACN,KAAM,OACN,OAAQD,GACR,QAAS,MACX,CACF,ECLA,IAAME,GAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,GAAmB,CAAC,WAAY,aAAc,MAAM,EAEpDC,GAAqB,CACzB,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,GAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,GAAGI,GACH,WAAY,CAAE,KAAM,OAAQ,OAAQH,GAAkB,QAAS,MAAO,CACxE,ECXO,SAASI,GAA0CC,EAAU,CAClE,GAAM,CAAE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AAoB,6BAA8BZ,CAAS,EAAG,KAAK,UAC1H,gBAAC,OAAI,UAAU,gCACb,gBAAC+E,GAAA,CAAW,UAAU,uBAAuB,EAC7C,gBAAC,SACC,IAAKO,EACL,KAAK,SACL,UAAU,wBACV,MAAOJ,EACP,SAAWU,GAAMT,EAAcS,EAAE,OAAO,KAAK,EAC7C,UAAW9C,EACX,YAAasC,EACb,aAAYO,EACd,EACCT,GACC,gBAAC,UACC,KAAK,SACL,UAAU,iCACV,QAAS,IAAM,CACbC,EAAc,EAAE,EAChBG,EAAS,SAAS,MAAM,CAC1B,EACA,aAAW,gBAEX,gBAACN,GAAA,IAAU,CACb,CAEJ,CACF,CAEJ,CACF,EACAC,GAAc,YAAc",
6
- "names": ["sidebar_exports", "__export", "SidebarContent", "SidebarFooter", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarHeader", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "Sidebar", "SidebarSearch", "SidebarSeparator", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "Accordion", "React", "import_classnames", "import_radix_ui", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "radii", "radiusPropDef", "sizes", "scrollbarsValues", "scrollAreaPropDefs", "asChildPropDef", "radiusPropDef", "extractMarginProps", "props", "m", "mx", "my", "mt", "mr", "mb", "ml", "rest", "import_classnames", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "value", "propValues", "parseValue", "classNames", "getBaseClassName", "isResponsiveObject", "object", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "prop", "customProperty", "bpProperty", "key", "mergeStyles", "styles", "result", "style", "marginValues", "marginPropDefs", "marginValues", "marginPropDefs", "getMarginStyles", "props", "mClassNames", "mCustomProperties", "getResponsiveStyles", "mxClassNames", "mxCustomProperties", "myClassNames", "myCustomProperties", "mtClassNames", "mtCustomProperties", "mrClassNames", "mrCustomProperties", "mbClassNames", "mbCustomProperties", "mlClassNames", "mlCustomProperties", "classNames", "mergeStyles", "React", "getSubtree", "options", "content", "asChild", "children", "firstChild", "ScrollArea", "props", "forwardedRef", "marginRest", "marginProps", "extractMarginProps", "marginClassNames", "marginCustomProperties", "getMarginStyles", "asChild", "children", "className", "style", "type", "scrollHideDelay", "dir", "size", "scrollAreaPropDefs", "radius", "scrollbars", "viewportProps", "ScrollAreaPrimitive", "classNames", "mergeStyles", "getSubtree", "getResponsiveClassNames", "accentColors", "grayColors", "colorPropDef", "accentColorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "materials", "submenuBehaviors", "baseMenuSharedPropDefs", "colorPropDef", "highContrastPropDef", "baseMenuContentPropDefs", "baseMenuSubContentPropDefs", "baseMenuItemPropDefs", "asChildPropDef", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs", "React", "import_classnames", "import_radix_ui", "getMatchingGrayColor", "accentColor", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "hasBackground", "rootProps", "appearance", "setAppearance", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "clientOS", "setClientOS", "classNames", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "import_classnames", "mergePropDefs", "args", "extractProps", "props", "propDefs", "className", "style", "extractedProps", "allPropDefs", "key", "value", "propDef", "isResponsiveObject", "isResponsivePropDef", "propClassName", "getResponsiveClassNames", "classNames", "propDefValues", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "React", "React", "_BREAKPOINTS", "useBreakpoint", "currentBp", "setCurrentBp", "ready", "setReady", "mqls", "_BREAKPOINTS", "k", "q", "compute", "_e", "matched", "m", "next", "cleanups", "mm", "fn", "resolveResponsiveValue", "value", "currentBreakpoint", "defaultValue", "map", "bpOrder", "startIdx", "bp", "DrillDownActionsContext", "DrillDownStateContext", "DrillDownProvider", "children", "submenuBehavior", "breakpoint", "ready", "useBreakpoint", "stack", "setStack", "animationDirection", "setAnimationDirection", "behavior", "prevBehaviorRef", "push", "id", "prev", "pop", "reset", "actionsValue", "isActive", "stateValue", "useDrillDownActionsOptional", "DrillDownActionsContext", "useDrillDownStateOptional", "DrillDownStateContext", "SubContext", "useSubContext", "React", "MenuContext", "resolveSize", "size", "MenuProvider", "children", "resolvedSize", "value", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "sizes", "variants", "kbdPropDefs", "asChildPropDef", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "marginPropDefs", "Comp", "classNames", "DropdownMenuRoot", "props", "DropdownMenuPrimitive", "DropdownMenuTrigger", "children", "forwardedRef", "requireReactElement", "DrillDownRoot", "drillDownState", "useDrillDownStateOptional", "DropdownMenuContentContext", "DropdownMenuContent", "themeContext", "useThemeContext", "effectiveMaterial", "memoizedThemeContext", "size", "baseMenuContentPropDefs", "variant", "highContrast", "material", "submenuBehavior", "virtualized", "className", "color", "container", "forceMount", "_", "__", "___", "____", "contentProps", "extractProps", "resolvedColor", "contentBody", "MenuProvider", "DrillDownProvider", "Theme", "classNames", "ScrollArea", "DropdownMenuLabel", "DropdownMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "Kbd", "DropdownMenuGroup", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "DropdownMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "useSubId", "DropdownMenuSub", "label", "subId", "subContextValue", "SubContext", "DropdownMenuSubTrigger", "onClick", "subTriggerProps", "drillDownActions", "useDrillDownActionsOptional", "subContext", "useSubContext", "onClickRef", "handleClick", "e", "handleKeyDown", "ThickChevronRightIcon", "DropdownMenuSeparator", "DrillDownBackItem", "pop", "ThickChevronLeftIcon", "DropdownMenuSubContent", "subContentProps", "baseMenuSubContentPropDefs", "isActive", "DropdownMenuTriggerIcon", "ChevronDownIcon", "React", "import_classnames", "import_radix_ui", "heightPropDefs", "widthPropDefs", "contentSizes", "panelBackgrounds", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "themeContext", "useThemeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "extractProps", "popoverContentPropDefs", "contentRef", "combinedRef", "node", "labelId", "setLabelId", "setToolbarOffset", "offsetPx", "el", "Theme", "classNames", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "localRef", "setRefs", "update", "height", "ro", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar", "sizes", "variants", "menuVariants", "types", "sides", "collapsibleModes", "layouts", "sidebarPropDefs", "asChildPropDef", "colorPropDef", "highContrastPropDef", "React", "import_classnames", "orientationValues", "sizes", "separatorPropDefs", "colorPropDef", "Separator", "props", "forwardedRef", "className", "color", "decorative", "separatorProps", "extractProps", "separatorPropDefs", "marginPropDefs", "classNames", "React", "import_classnames", "import_radix_ui", "sizes", "variants", "panelBackgrounds", "materials", "badgePropDefs", "asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "React", "import_classnames", "import_radix_ui", "React", "import_radix_ui", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "tooltipPropDefs", "widthPropDefs", "Tooltip", "props", "forwardedRef", "children", "className", "open", "defaultOpen", "onOpenChange", "delayDuration", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "TooltipPrimitive", "Theme", "classNames", "Text", "Badge", "props", "forwardedRef", "asChild", "className", "children", "color", "radius", "material", "panelBackground", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "badgeProps", "extractProps", "badgePropDefs", "marginPropDefs", "effectiveMaterial", "Comp", "badge", "classNames", "Tooltip", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "useThemeContext", "size", "sidebarPropDefs", "variant", "menuVariant", "layout", "presentation", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "extractProps", "_", "__", "___", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "visualContextValue", "classNames", "SidebarContent", "role", "ariaLabel", "id", "visual", "ScrollArea", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "Separator", "SidebarMenu", "SidebarMenuItem", "separateIconsAndLabels", "node", "icons", "labels", "child", "el", "wrapTextNodes", "index", "newChildren", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onKeyDown", "sidebarSize", "isThinMode", "Comp", "Slot", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "processedChildren", "slottedChildren", "onlyChild", "originalInnerChildren", "enhancedInnerChildren", "Badge", "Kbd", "label", "SidebarSubMenuModeContext", "SidebarMenuSub", "defaultOpen", "DropdownMenuRoot", "SidebarMenuSubTrigger", "DropdownMenuTrigger", "ThickChevronRightIcon", "SidebarMenuSubContent", "unwrapMenuButton", "n", "i", "normalized", "itemChildren", "content", "DropdownMenuItem", "dropdownSize", "DropdownMenuContent", "DropdownMenuGroup", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent", "SearchIcon", "ClearIcon", "SidebarSearch", "value", "onValueChange", "placeholder", "isThin", "inputRef", "popoverRef", "resultsId", "valueRef", "onValueChangeRef", "searchLabel", "e", "handlePopoverKeyDown", "container", "resultsGroup", "items", "active", "isOnInput", "currentIndex", "PopoverRoot", "PopoverTrigger", "PopoverContent"]
3
+ "sources": ["../../../src/components/sidebar.tsx", "../../../src/components/slot.tsx", "../../../src/components/dropdown-menu.tsx", "../../../src/components/scroll-area.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/scroll-area.props.tsx", "../../../src/helpers/extract-margin-props.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/helpers/get-margin-styles.ts", "../../../src/helpers/get-subtree.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/components/_internal/base-menu.props.ts", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/helpers/use-deprecation-warning.ts", "../../../src/components/theme.props.tsx", "../../../src/components/icons.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/components/_internal/dropdown-menu-drill-down.tsx", "../../../src/hooks/use-breakpoint.ts", "../../../src/components/shell.types.ts", "../../../src/components/_internal/menu-context.tsx", "../../../src/helpers/require-react-element.ts", "../../../src/components/kbd.tsx", "../../../src/components/kbd.props.tsx", "../../../src/components/popover.tsx", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/components/popover.props.tsx", "../../../src/components/sidebar.props.tsx", "../../../src/components/separator.tsx", "../../../src/components/separator.props.tsx", "../../../src/components/badge.tsx", "../../../src/components/badge.props.tsx", "../../../src/components/tooltip.tsx", "../../../src/components/text.tsx", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/components/tooltip.props.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\nimport * as DropdownMenu from './dropdown-menu.js';\nimport * as Popover from './popover.js';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2' | '3';\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {\n /**\n * Presentational mode independent of Shell.\n * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.\n * If both `presentation` and `layout` are provided, `presentation` takes precedence.\n */\n presentation?: 'thin' | 'expanded';\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n presentation,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n // Remove internal-only props from DOM\n const { asChild: _, panelBackground: __, presentation: ___, ...safeRootProps } = rootProps;\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel'). `presentation` takes precedence over `layout`.\n const resolvedLayout = presentation === 'thin' ? 'rail' : presentation === 'expanded' ? 'panel' : layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n const visualContextValue = React.useMemo(\n () => ({ size: resolvedSize, menuVariant, presentation, color: resolvedColor }),\n [resolvedSize, menuVariant, presentation, resolvedColor],\n );\n return (\n <div {...safeRootProps} ref={forwardedRef} data-accent-color={resolvedColor} className={classNames('rt-SidebarRoot', className)}>\n <SidebarVisualContext.Provider value={visualContextValue}>\n <div\n className={classNames('rt-SidebarContainer', `rt-variant-${variant}`, `rt-r-size-${resolvedSize}`, `rt-menu-variant-${menuVariant}`, resolvedLayout && `rt-layout-${resolvedLayout}`)}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-presentation={presentation}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, children, role = 'navigation', 'aria-label': ariaLabel = 'Main navigation', id, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames('rt-BaseMenuContent', 'rt-SidebarContent', `rt-r-size-${size}`, `rt-menu-variant-${menuVariant}`, className)}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('rt-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} role=\"menu\" className={classNames('rt-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\n// Extracted to module scope to avoid re-creation on every render\nfunction separateIconsAndLabels(node: React.ReactNode): { icons: React.ReactNode[]; labels: React.ReactNode[] } {\n const icons: React.ReactNode[] = [];\n const labels: React.ReactNode[] = [];\n\n React.Children.forEach(node, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n labels.push(<span key={labels.length} className=\"rt-SidebarMenuLabel\">{child}</span>);\n } else if (React.isValidElement(child)) {\n const el = child as React.ReactElement<any>;\n if (el.type === 'svg' || (el.props && el.props.icon) || (typeof el.type === 'function' && ((el.type as any).displayName?.includes('Icon') || (el.type as any).name?.includes('Icon')))) {\n icons.push(child);\n } else {\n labels.push(child);\n }\n } else if (child) {\n labels.push(child);\n }\n });\n\n return { icons, labels };\n}\n\nfunction wrapTextNodes(node: React.ReactNode): React.ReactNode {\n if (typeof node === 'string' || typeof node === 'number') {\n return <span className=\"rt-SidebarMenuLabel\">{node}</span>;\n }\n if (Array.isArray(node)) {\n return node.map((child, index) => <React.Fragment key={index}>{wrapTextNodes(child)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const el = node as React.ReactElement<any>;\n const className: string = (el.props && (el.props as any).className) || '';\n const isAlreadyLabel = typeof el.type === 'string' && className.split(' ').includes('rt-SidebarMenuLabel');\n if (isAlreadyLabel) return el;\n const newChildren = wrapTextNodes((el.props as any)?.children);\n return React.cloneElement(el, { ...(el.props as any) }, newChildren);\n }\n return node;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onKeyDown, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n const isThinMode = visual?.presentation === 'thin';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (event.currentTarget as HTMLElement).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n // Memoize child processing to avoid re-traversal on every render\n const processedChildren = React.useMemo(() => wrapTextNodes(children), [children]);\n\n // For thin mode, separate icons into a wrapper for targeted background styling\n const { icons, labels } = React.useMemo(\n () => isThinMode ? separateIconsAndLabels(children) : { icons: [] as React.ReactNode[], labels: [] as React.ReactNode[] },\n [isThinMode, children],\n );\n\n // When rendering asChild, Slot expects a single child element. We still want to\n // append optional badge/shortcut inside that element so they render with Link.\n const slottedChildren = React.useMemo(() => {\n if (!asChild) return null;\n try {\n const onlyChild = React.Children.only(processedChildren as React.ReactElement<any>) as React.ReactElement<any>;\n const originalInnerChildren = (onlyChild.props as any)?.children;\n const enhancedInnerChildren = (\n <>\n {originalInnerChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n return React.cloneElement(onlyChild, { ...(onlyChild.props as any) }, enhancedInnerChildren);\n } catch {\n // Fallback: if multiple children were passed incorrectly, just return processedChildren\n return processedChildren as React.ReactNode;\n }\n }, [asChild, processedChildren, badge, shortcut, sidebarSize]);\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n onKeyDown={handleKeyDown}\n >\n {asChild ? (\n slottedChildren\n ) : isThinMode && icons.length > 0 ? (\n <>\n <span className=\"rt-SidebarMenuIconWrapper\">{icons}</span>\n {labels.map((label, index) => (\n <React.Fragment key={index}>\n {typeof label === 'string' || typeof label === 'number' ? (\n <span className=\"rt-SidebarMenuLabel\">{label}</span>\n ) : (\n label\n )}\n </React.Fragment>\n ))}\n </>\n ) : (\n <>\n {processedChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, ...props }, forwardedRef) => {\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n ref={forwardedRef as any}\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('rt-BaseMenuSubTriggerIcon', 'rt-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const unwrapMenuButton = (node: React.ReactNode): React.ReactNode => {\n if (Array.isArray(node)) {\n return node.map((n, i) => <React.Fragment key={i}>{unwrapMenuButton(n)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const typeDisplay = (node.type as any)?.displayName;\n if (typeDisplay === 'Sidebar.MenuButton') {\n return (node.props as any)?.children;\n }\n const child = (node.props as any)?.children;\n if (child !== undefined) {\n return React.cloneElement(node as any, { ...(node.props as any), children: unwrapMenuButton(child) });\n }\n }\n return node;\n };\n\n const normalized = React.Children.map(children as React.ReactNode, (child, index) => {\n if (React.isValidElement(child) && (child.type as any)?.displayName === 'Sidebar.MenuItem') {\n const itemChildren = (child.props as any)?.children;\n const content = unwrapMenuButton(itemChildren);\n return (\n <DropdownMenu.Item key={index} asChild>\n {content as any}\n </DropdownMenu.Item>\n );\n }\n // Fallback: wrap raw nodes too for consistent menu styling\n return (\n <DropdownMenu.Item key={index} asChild>\n {unwrapMenuButton(child) as any}\n </DropdownMenu.Item>\n );\n });\n\n // DropdownMenu only supports sizes 1 and 2, so map size 3 to 2\n const dropdownSize = visual?.size === '3' ? '2' : visual?.size;\n return (\n <DropdownMenu.Content size={dropdownSize} variant={visual?.menuVariant} className={classNames(className)}>\n <DropdownMenu.Group>{normalized}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuSubContent', className)}>\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)} />\n));\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return <Comp {...props} ref={forwardedRef} role=\"group\" className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Search component: inline input in expanded, popover trigger in thin\ninterface SidebarSearchProps extends React.ComponentPropsWithoutRef<'div'> {\n value: string;\n onValueChange: (value: string) => void;\n placeholder?: string;\n children?: React.ReactNode;\n}\n\nconst SearchIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\n </svg>\n);\n\nconst ClearIcon = ({ className }: { className?: string }) => (\n <svg className={className} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\nconst SidebarSearch = React.forwardRef<HTMLDivElement, SidebarSearchProps>(\n ({ value, onValueChange, placeholder = 'Search...', children, className, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const isThin = visual?.presentation === 'thin';\n const inputRef = React.useRef<HTMLInputElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const searchId = React.useId();\n const resultsId = `${searchId}-results`;\n\n // Stable refs for values used in callbacks \u2014 avoids recreating handlers on every keystroke\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const onValueChangeRef = React.useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n\n // Derive a clean aria-label from placeholder (strip trailing dots/ellipsis)\n const searchLabel = placeholder.replace(/\\.+$/, '');\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Escape' && valueRef.current) {\n e.preventDefault();\n e.stopPropagation();\n onValueChangeRef.current('');\n inputRef.current?.focus();\n }\n },\n [],\n );\n\n // Arrow key navigation within the popover (input \u2194 results)\n const handlePopoverKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n const container = popoverRef.current;\n if (!container) return;\n\n const resultsGroup = container.querySelector('[role=\"group\"]');\n if (!resultsGroup) return;\n\n const items = Array.from(\n resultsGroup.querySelectorAll<HTMLElement>('a, button'),\n );\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement;\n const isOnInput = active === inputRef.current;\n const currentIndex = items.indexOf(active);\n\n // Typing while a result is focused \u2192 redirect focus to input\n if (\n e.key.length === 1 &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey &&\n !isOnInput &&\n currentIndex !== -1\n ) {\n inputRef.current?.focus();\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n if (isOnInput || currentIndex === -1) {\n items[0]?.focus();\n } else if (currentIndex < items.length - 1) {\n items[currentIndex + 1]?.focus();\n }\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n if (currentIndex <= 0) {\n inputRef.current?.focus();\n } else {\n items[currentIndex - 1]?.focus();\n }\n break;\n }\n case 'Home': {\n // Only intercept when focused on a result, not the input (where Home moves cursor)\n if (!isOnInput) {\n e.preventDefault();\n items[0]?.focus();\n }\n break;\n }\n case 'End': {\n if (!isOnInput) {\n e.preventDefault();\n items[items.length - 1]?.focus();\n }\n break;\n }\n }\n },\n [],\n );\n\n if (isThin) {\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--thin', className)}>\n <Popover.Root>\n <Popover.Trigger>\n <button\n type=\"button\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarSearchTrigger')}\n aria-label={searchLabel}\n >\n <span className=\"rt-SidebarMenuIconWrapper\">\n <SearchIcon />\n </span>\n <span className=\"rt-SidebarMenuLabel\">Search</span>\n </button>\n </Popover.Trigger>\n <Popover.Content side=\"right\" align=\"start\" size=\"2\" width=\"280px\" aria-label={searchLabel}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- keyDown manages arrow-key navigation between input and results, which is accessibility-enhancing */}\n <div\n ref={popoverRef}\n className=\"rt-SidebarSearchPopover\"\n role=\"search\"\n onKeyDown={handlePopoverKeyDown}\n >\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n aria-controls={children ? resultsId : undefined}\n // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: popover opens on user action, focusing the input is expected UX\n autoFocus\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n {children && (\n <div id={resultsId} role=\"group\" aria-label=\"Search results\">\n {children}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n }\n\n // Expanded mode: inline input\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--expanded', className)} role=\"search\">\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n </div>\n );\n },\n);\nSidebarSearch.displayName = 'Sidebar.Search';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n SidebarSearch as Search,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuSubContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport {\n DrillDownProvider,\n SubContext,\n useDrillDownActionsOptional,\n useDrillDownStateOptional,\n useSubContext,\n} from './_internal/dropdown-menu-drill-down.js';\nimport { MenuProvider } from './_internal/menu-context.js';\nimport type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Kbd } from './kbd.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\n/**\n * Internal component that wraps root menu items and handles visibility in drill-down mode.\n * In drill-down mode, this hides when a submenu is active.\n * Uses state-only hook to subscribe only to state changes, not action changes.\n */\nfunction DrillDownRoot({ children }: { children: React.ReactNode }) {\n const drillDownState = useDrillDownStateOptional();\n\n // In cascade mode or when no drill-down context, always show\n if (!drillDownState || drillDownState.behavior === 'cascade') {\n return <>{children}</>;\n }\n\n // In drill-down mode, hide root when a submenu is active\n return (\n <div\n className=\"rt-DropdownMenuDrillDownRoot\"\n data-drill-down-active={drillDownState.isRoot ? undefined : true}\n data-animation-direction={drillDownState.animationDirection ?? undefined}\n >\n {children}\n </div>\n );\n}\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs> & {\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n};\ntype DropdownMenuContentContextValue = Omit<DropdownMenuContentOwnProps, 'submenuBehavior'>;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n props.material ?? props.panelBackground ?? themeContext.panelBackground;\n\n // Memoize theme context values to prevent unnecessary re-renders\n const memoizedThemeContext = React.useMemo(\n () => ({\n material: effectiveMaterial,\n accentColor: themeContext.accentColor,\n }),\n [effectiveMaterial, themeContext.accentColor],\n );\n\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n material = memoizedThemeContext.material,\n submenuBehavior,\n virtualized = false,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n submenuBehavior: ___,\n virtualized: ____,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n // Memoize color resolution to prevent unnecessary re-renders\n const resolvedColor = React.useMemo(\n () => color || memoizedThemeContext.accentColor,\n [color, memoizedThemeContext.accentColor],\n );\n const contentBody = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast, material }),\n [size, variant, resolvedColor, highContrast, material],\n )}\n >\n <DrillDownProvider submenuBehavior={submenuBehavior}>\n <DrillDownRoot>{children}</DrillDownRoot>\n </DrillDownProvider>\n </DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n data-material={material}\n data-panel-background={material}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport', 'rt-virtualized')}>\n {contentBody}\n </div>\n ) : (\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {contentBody}\n </div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\n// Generate unique submenu IDs using React 18's useId for SSR safety\nfunction useSubId() {\n return React.useId();\n}\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {\n /**\n * Label displayed in the back button when using drill-down mode.\n * If not provided, defaults to \"Back\".\n */\n label?: React.ReactNode;\n}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = ({ label = 'Back', ...props }) => {\n // Use state-only hook since we only need behavior check\n const drillDownState = useDrillDownStateOptional();\n const subId = useSubId();\n\n // Create context value for SubContent and SubTrigger\n const subContextValue = React.useMemo(\n () => ({ id: subId, label }),\n [subId, label]\n );\n\n // In drill-down mode, we don't use Radix's Sub component\n // We just provide the SubContext and render children\n if (drillDownState?.behavior === 'drill-down') {\n return (\n <SubContext.Provider value={subContextValue}>\n {props.children}\n </SubContext.Provider>\n );\n }\n\n // In cascade mode, use Radix's Sub component normally\n return (\n <SubContext.Provider value={subContextValue}>\n <DropdownMenuPrimitive.Sub {...props} />\n </SubContext.Provider>\n );\n};\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, onClick, ...subTriggerProps } = props;\n // Use split hooks: actions for stable push callback, state only for behavior check\n const drillDownActions = useDrillDownActionsOptional();\n const drillDownState = useDrillDownStateOptional();\n const subContext = useSubContext();\n\n // Store onClick in ref to avoid recreating handlers when onClick changes\n const onClickRef = React.useRef(onClick);\n onClickRef.current = onClick;\n\n // Stable click handler - only depends on stable refs\n const handleClick = React.useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n if (subContext && drillDownActions) {\n drillDownActions.push(subContext.id);\n }\n (onClickRef.current as React.MouseEventHandler<HTMLDivElement> | undefined)?.(e);\n }, [subContext, drillDownActions]);\n\n // Stable keydown handler\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (subContext && drillDownActions) {\n drillDownActions.push(subContext.id);\n }\n }\n }, [subContext, drillDownActions]);\n\n // In drill-down mode, render a button that navigates to the submenu\n if (drillDownState?.behavior === 'drill-down' && subContext) {\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n 'rt-DropdownMenuDrillDownSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </div>\n );\n }\n\n // In cascade mode, use Radix's SubTrigger\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n onClick={onClick as React.MouseEventHandler<HTMLDivElement> | undefined}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\n// Separator is defined here (before SubContent) because it's used in drill-down mode\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\n/**\n * Internal component for the drill-down back button.\n * Uses actions-only hook since it only needs to call pop(), never reads state.\n * This prevents re-renders when drill-down state changes.\n */\nfunction DrillDownBackItem({ label }: { label: React.ReactNode }) {\n // Use actions-only hook for stable pop callback - prevents re-renders on stack changes\n const { pop } = useDrillDownActionsOptional() ?? {};\n\n // Stable click handler\n const handleClick = React.useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n pop?.();\n }, [pop]);\n\n // Stable keydown handler\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n pop?.();\n }\n }, [pop]);\n\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuDrillDownBackItem',\n )}\n >\n <ThickChevronLeftIcon className=\"rt-DropdownMenuDrillDownBackIcon\" />\n <span className=\"rt-DropdownMenuDrillDownBackLabel\">{label}</span>\n </div>\n );\n}\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n // Get context values directly - memoization at provider level handles stability\n const { size, variant, color, highContrast, material } = React.useContext(\n DropdownMenuContentContext,\n );\n // Use state-only hook since we only need behavior and isActive (no actions)\n const drillDownState = useDrillDownStateOptional();\n const subContext = useSubContext();\n\n const {\n className,\n children,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n ...subContentProps\n } = extractProps(\n { size, variant, color, highContrast, material, ...props },\n dropdownMenuSubContentPropDefs,\n );\n\n // In drill-down mode, render inline instead of in a portal\n if (drillDownState?.behavior === 'drill-down' && subContext) {\n const isActive = drillDownState.isActive(subContext.id);\n\n return (\n <div\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n role=\"menu\"\n aria-label={typeof subContext.label === 'string' ? subContext.label : undefined}\n data-drill-down-active={isActive ? true : undefined}\n data-animation-direction={drillDownState.animationDirection ?? undefined}\n className={classNames(\n 'rt-DropdownMenuDrillDownPanel',\n className,\n )}\n >\n <DrillDownBackItem label={subContext.label} />\n <DropdownMenuSeparator />\n {children}\n </div>\n );\n }\n\n // In cascade mode, use Portal and Radix's SubContent\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n SubmenuBehavior,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\nconst marginValueSet: ReadonlySet<string> = new Set(marginValues);\n\n// Static table so the common case \u2014 a component with no margin props at all \u2014\n// is seven property reads and nothing else.\nconst MARGIN_PROPS: ReadonlyArray<{\n key: keyof MarginProps;\n className: string;\n customProperties: `--${string}`[];\n}> = [\n { key: 'm', className: 'rt-r-m', customProperties: ['--margin'] },\n { key: 'mx', className: 'rt-r-mx', customProperties: ['--margin-left', '--margin-right'] },\n { key: 'my', className: 'rt-r-my', customProperties: ['--margin-top', '--margin-bottom'] },\n { key: 'mt', className: 'rt-r-mt', customProperties: ['--margin-top'] },\n { key: 'mr', className: 'rt-r-mr', customProperties: ['--margin-right'] },\n { key: 'mb', className: 'rt-r-mb', customProperties: ['--margin-bottom'] },\n { key: 'ml', className: 'rt-r-ml', customProperties: ['--margin-left'] },\n];\n\nexport function getMarginStyles(props: MarginProps) {\n let classes: string[] | undefined;\n let style: ReturnType<typeof mergeStyles>;\n\n for (let i = 0; i < MARGIN_PROPS.length; i++) {\n const { key, className, customProperties } = MARGIN_PROPS[i];\n const value = props[key];\n if (value === undefined) continue;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className,\n customProperties,\n propValues: marginValues,\n propValueSet: marginValueSet,\n value,\n });\n\n if (propClassNames) (classes ??= []).push(propClassNames);\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n }\n\n return [classes !== undefined ? classes.join(' ') : '', style] as const;\n}\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst submenuBehaviors = ['cascade', 'drill-down'] as const;\n\n// Base props shared between Content and SubContent\nconst baseMenuSharedPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n material: {\n type: 'enum',\n values: materials,\n default: undefined,\n },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\n// Content-specific props (includes submenuBehavior)\nconst baseMenuContentPropDefs = {\n ...baseMenuSharedPropDefs,\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior: {\n type: 'enum',\n values: submenuBehaviors,\n default: 'cascade',\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n submenuBehavior: PropDef<(typeof submenuBehaviors)[number]>;\n};\n\n// SubContent props (no submenuBehavior)\nconst baseMenuSubContentPropDefs = baseMenuSharedPropDefs;\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuSubContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n submenuBehaviors,\n};\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import * as React from 'react';\n\nconst PANEL_BACKGROUND_MESSAGE = 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.';\n\nconst warned = new Set<string>();\n\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n/**\n * Warns, in development only, that `panelBackground` is deprecated.\n *\n * The `process.env.NODE_ENV` check is a compile-time constant, so a production\n * bundle minifies the effect body away to an empty function instead of reading\n * props and formatting a message per mounted component. The message is also\n * logged once per session rather than once per component instance.\n */\nexport function useDeprecatedPanelBackgroundWarning(panelBackground: unknown) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (panelBackground !== undefined) warnOnce(PANEL_BACKGROUND_MESSAGE);\n }, [panelBackground]);\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "'use client';\n\nimport * as React from 'react';\nimport type { Breakpoint, Responsive } from '../../props/prop-def.js';\nimport type { submenuBehaviors } from './base-menu.props.js';\nimport { useBreakpoint } from '../../hooks/use-breakpoint.js';\n\ntype SubmenuBehavior = (typeof submenuBehaviors)[number];\n\n/**\n * Resolves a responsive value to its current value based on the breakpoint.\n * Falls back through smaller breakpoints if the current one isn't defined.\n */\nfunction resolveResponsiveValue<T>(\n value: T | Partial<Record<Breakpoint, T>> | undefined,\n currentBreakpoint: Breakpoint,\n defaultValue: T\n): T {\n if (value === undefined || value === null) {\n return defaultValue;\n }\n\n // Non-object values are returned directly\n if (typeof value !== 'object') {\n return value;\n }\n\n const map = value as Partial<Record<Breakpoint, T>>;\n\n // Check if current breakpoint has a value\n if (map[currentBreakpoint] !== undefined) {\n return map[currentBreakpoint] as T;\n }\n\n // Fall back through smaller breakpoints\n const bpOrder: Breakpoint[] = ['xl', 'lg', 'md', 'sm', 'xs', 'initial'];\n const startIdx = bpOrder.indexOf(currentBreakpoint);\n\n for (let i = startIdx + 1; i < bpOrder.length; i++) {\n const bp = bpOrder[i];\n if (map[bp] !== undefined) {\n return map[bp] as T;\n }\n }\n\n return defaultValue;\n}\n\n// ============================================================================\n// DrillDown Context\n// ============================================================================\n\ntype AnimationDirection = 'forward' | 'backward' | null;\n\n/**\n * Stable actions context - callbacks that don't change identity.\n * Separated from state to prevent unnecessary re-renders of components\n * that only need to call push/pop/reset.\n */\ninterface DrillDownActionsContextValue {\n /** Navigate into a submenu */\n push: (id: string) => void;\n /** Navigate back to parent menu */\n pop: () => void;\n /** Reset to root menu */\n reset: () => void;\n}\n\n/**\n * Mutable state context - values that change when navigation occurs.\n * Subscribers to this context will re-render on stack changes.\n */\ninterface DrillDownStateContextValue {\n /** Current submenu behavior mode */\n behavior: SubmenuBehavior;\n /** Whether the breakpoint has been resolved (client-side only) */\n ready: boolean;\n /** Stack of active submenu IDs. Empty means root menu is shown. */\n stack: string[];\n /** Check if a specific submenu is the currently active one */\n isActive: (id: string) => boolean;\n /** Check if we're at root level (no submenus open) */\n isRoot: boolean;\n /** The currently active submenu ID (or null if at root) */\n currentId: string | null;\n /** Current animation direction for transitions */\n animationDirection: AnimationDirection;\n}\n\nconst DrillDownActionsContext = React.createContext<DrillDownActionsContextValue | null>(null);\nconst DrillDownStateContext = React.createContext<DrillDownStateContextValue | null>(null);\n\ninterface DrillDownProviderProps {\n children: React.ReactNode;\n submenuBehavior: Responsive<SubmenuBehavior> | undefined;\n}\n\nfunction DrillDownProvider({ children, submenuBehavior }: DrillDownProviderProps) {\n const { breakpoint, ready } = useBreakpoint();\n const [stack, setStack] = React.useState<string[]>([]);\n const [animationDirection, setAnimationDirection] = React.useState<AnimationDirection>(null);\n\n // Resolve the current behavior based on breakpoint\n const behavior = React.useMemo(\n () => resolveResponsiveValue(submenuBehavior, breakpoint, 'cascade'),\n [submenuBehavior, breakpoint]\n );\n\n // Reset stack when behavior changes from drill-down to cascade\n const prevBehaviorRef = React.useRef(behavior);\n React.useEffect(() => {\n if (prevBehaviorRef.current === 'drill-down' && behavior === 'cascade') {\n setStack([]);\n setAnimationDirection(null);\n }\n prevBehaviorRef.current = behavior;\n }, [behavior]);\n\n // Stable action callbacks - these never change identity\n const push = React.useCallback((id: string) => {\n setAnimationDirection('forward');\n setStack((prev) => [...prev, id]);\n }, []);\n\n const pop = React.useCallback(() => {\n setAnimationDirection('backward');\n setStack((prev) => prev.slice(0, -1));\n }, []);\n\n const reset = React.useCallback(() => {\n setStack([]);\n setAnimationDirection(null);\n }, []);\n\n // Memoize actions context value - completely stable, never changes\n const actionsValue = React.useMemo(\n (): DrillDownActionsContextValue => ({ push, pop, reset }),\n [push, pop, reset]\n );\n\n // isActive depends on stack - this is expected to change\n const isActive = React.useCallback(\n (id: string) => {\n if (stack.length === 0) return false;\n return stack[stack.length - 1] === id;\n },\n [stack]\n );\n\n // Memoize state context value - changes when stack/behavior changes\n const stateValue = React.useMemo(\n (): DrillDownStateContextValue => ({\n behavior,\n ready,\n stack,\n isActive,\n isRoot: stack.length === 0,\n currentId: stack.length > 0 ? stack[stack.length - 1] : null,\n animationDirection,\n }),\n [behavior, ready, stack, isActive, animationDirection]\n );\n\n return (\n <DrillDownActionsContext.Provider value={actionsValue}>\n <DrillDownStateContext.Provider value={stateValue}>\n {children}\n </DrillDownStateContext.Provider>\n </DrillDownActionsContext.Provider>\n );\n}\n\n/**\n * Hook to access only the stable action callbacks (push, pop, reset).\n * Use this in components that only need to trigger navigation,\n * not react to state changes. Prevents unnecessary re-renders.\n */\nfunction useDrillDownActions() {\n const ctx = React.useContext(DrillDownActionsContext);\n if (!ctx) {\n throw new Error('useDrillDownActions must be used within a DropdownMenu.Content');\n }\n return ctx;\n}\n\n/**\n * Hook to access drill-down state (behavior, stack, isActive, etc.).\n * Components using this will re-render when navigation state changes.\n */\nfunction useDrillDownState() {\n const ctx = React.useContext(DrillDownStateContext);\n if (!ctx) {\n throw new Error('useDrillDownState must be used within a DropdownMenu.Content');\n }\n return ctx;\n}\n\n/**\n * Optional version of useDrillDownActions for components that may be outside Content.\n */\nfunction useDrillDownActionsOptional() {\n return React.useContext(DrillDownActionsContext);\n}\n\n/**\n * Optional version of useDrillDownState for components that may be outside Content.\n */\nfunction useDrillDownStateOptional() {\n return React.useContext(DrillDownStateContext);\n}\n\n// ============================================================================\n// Sub Context (for individual submenu instances)\n// ============================================================================\n\ninterface SubContextValue {\n /** Unique ID for this submenu */\n id: string;\n /** Label for the back button */\n label: React.ReactNode;\n}\n\nconst SubContext = React.createContext<SubContextValue | null>(null);\n\nfunction useSubContext() {\n return React.useContext(SubContext);\n}\n\nexport {\n DrillDownProvider,\n DrillDownActionsContext,\n DrillDownStateContext,\n SubContext,\n useDrillDownActions,\n useDrillDownActionsOptional,\n useDrillDownState,\n useDrillDownStateOptional,\n useSubContext,\n useBreakpoint,\n resolveResponsiveValue,\n};\n\nexport type {\n SubmenuBehavior,\n DrillDownActionsContextValue,\n DrillDownStateContextValue,\n SubContextValue,\n AnimationDirection,\n};\n", "'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\nconst QUERIES = Object.entries(_BREAKPOINTS) as Array<[Breakpoint, string]>;\n\ntype Listener = () => void;\n\n/**\n * One set of `MediaQueryList`s and one set of listeners for the whole\n * application. Every component that asks for the breakpoint used to create and\n * subscribe to its own copy of all five queries.\n */\nlet mediaQueryLists: Array<[Breakpoint, MediaQueryList]> | null = null;\nconst listeners = new Set<Listener>();\nlet cachedBreakpoint: Breakpoint | null = null;\n\nfunction getMediaQueryLists() {\n mediaQueryLists ??= QUERIES.map(([name, query]) => [name, window.matchMedia(query)] as [Breakpoint, MediaQueryList]);\n return mediaQueryLists;\n}\n\nfunction computeBreakpoint(): Breakpoint {\n // The largest matching query wins; `_BREAKPOINTS` is ordered smallest first.\n let matched: Breakpoint = 'initial';\n for (const [name, mql] of getMediaQueryLists()) {\n if (mql.matches) matched = name;\n }\n return matched;\n}\n\nfunction handleChange() {\n const next = computeBreakpoint();\n if (next === cachedBreakpoint) return;\n cachedBreakpoint = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: Listener) {\n if (typeof window === 'undefined') return () => {};\n\n if (listeners.size === 0) {\n cachedBreakpoint = computeBreakpoint();\n for (const [, mql] of getMediaQueryLists()) {\n // Safari below 14 only has the deprecated listener API.\n if (typeof mql.addEventListener === 'function') mql.addEventListener('change', handleChange);\n else mql.addListener?.(handleChange);\n }\n }\n\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n\n for (const [, mql] of getMediaQueryLists()) {\n try {\n if (typeof mql.removeEventListener === 'function') mql.removeEventListener('change', handleChange);\n else mql.removeListener?.(handleChange);\n } catch (error) {\n // Removal can throw in edge cases, e.g. the list was already torn down.\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', error);\n }\n }\n }\n cachedBreakpoint = null;\n };\n}\n\n/**\n * `getSnapshot` must return a referentially stable value between changes, so it\n * reads the cache that `handleChange` maintains rather than recomputing.\n */\nfunction getSnapshot(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n cachedBreakpoint ??= computeBreakpoint();\n return cachedBreakpoint;\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\nconst getReadySnapshot = () => true;\nconst getReadyServerSnapshot = () => false;\n\n/**\n * The current breakpoint, and whether it has been resolved against a real\n * viewport yet (`false` on the server and during hydration).\n *\n * Reads through `useSyncExternalStore` rather than settling into state from an\n * effect. On a client render the very first pass already has the real\n * breakpoint, instead of rendering the whole shell at `initial` and correcting\n * it after the browser has painted.\n */\nexport function useBreakpoint(): { breakpoint: Breakpoint; ready: boolean } {\n const breakpoint = React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n const ready = React.useSyncExternalStore(subscribe, getReadySnapshot, getReadyServerSnapshot);\n\n return React.useMemo(() => ({ breakpoint, ready }), [breakpoint, ready]);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'thin' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n height?: string | number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n", "'use client';\n\nimport * as React from 'react';\nimport type { Responsive } from '../../props/prop-def.js';\n\n/**\n * Context to detect if a component is rendered inside a menu (DropdownMenu, ContextMenu, etc.)\n * Used by VirtualMenu to adjust its behavior:\n * - Skip role=\"menu\" when inside a parent menu (parent owns the role)\n * - Delegate certain keyboard handling to parent\n * - Use the correct item height based on menu size\n */\n\nexport type MenuSize = '1' | '2';\n\ninterface MenuContextValue {\n /** Whether we're inside a menu that owns the menu role */\n isInsideMenu: boolean;\n /** Menu size for calculating item heights (resolved to non-responsive value) */\n size?: MenuSize;\n}\n\nconst MenuContext = React.createContext<MenuContextValue>({ isInsideMenu: false });\n\ninterface MenuProviderProps {\n children: React.ReactNode;\n /** Menu size passed from parent (DropdownMenu.Content, ContextMenu.Content, etc.) */\n size?: Responsive<MenuSize>;\n}\n\n/** Extract the base size from a potentially responsive value */\nfunction resolveSize(size: Responsive<MenuSize> | undefined): MenuSize | undefined {\n if (!size) return undefined;\n if (typeof size === 'string') return size;\n // For responsive objects, use the 'initial' value\n return size.initial;\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = resolveSize(size);\n const value = React.useMemo(() => ({ isInsideMenu: true, size: resolvedSize }), [resolvedSize]);\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>;\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n\n/** Map menu size to item height in pixels */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24, // --space-5\n '2': 32, // --space-6\n};\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, MarginProps, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs, marginPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['classic', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'classic',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={React.useMemo(() => ({ contentRef, setToolbarOffset, setLabelId }), [setToolbarOffset])}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\n// Re-export base menu props for sidebar menu components\nexport {\n baseMenuContentPropDefs as sidebarContentPropDefs,\n baseMenuItemPropDefs as sidebarItemPropDefs,\n baseMenuCheckboxItemPropDefs as sidebarCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as sidebarRadioItemPropDefs,\n} from './_internal/base-menu.props.js';\n\n// Sidebar container props\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['soft', 'outline', 'surface', 'ghost'] as const;\nconst menuVariants = ['solid', 'soft'] as const;\nconst types = ['sidebar'] as const;\nconst sides = ['left', 'right'] as const;\nconst collapsibleModes = ['offcanvas', 'icon', 'none'] as const;\nconst layouts = ['rail', 'panel'] as const;\n\nconst sidebarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'outline' },\n menuVariant: {\n type: 'enum',\n className: 'rt-menu-variant',\n values: menuVariants,\n default: 'soft',\n },\n type: { type: 'enum', className: 'rt-type', values: types, default: 'sidebar' },\n side: { type: 'enum', className: 'rt-side', values: sides, default: 'left' },\n collapsible: {\n type: 'enum',\n className: 'rt-collapsible',\n values: collapsibleModes,\n default: 'offcanvas',\n },\n layout: { type: 'enum', className: 'rt-layout', values: layouts, default: undefined },\n panelBackground: { type: 'enum', values: ['solid', 'translucent'], default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n menuVariant: PropDef<(typeof menuVariants)[number]>;\n type: PropDef<(typeof types)[number]>;\n side: PropDef<(typeof sides)[number]>;\n collapsible: PropDef<(typeof collapsibleModes)[number]>;\n layout: PropDef<(typeof layouts)[number]>;\n panelBackground: PropDef<'solid' | 'translucent'>;\n};\n\nexport { sidebarPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { separatorPropDefs } from './separator.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SeparatorElement = React.ElementRef<'span'>;\ntype SeparatorOwnProps = GetPropDefTypes<typeof separatorPropDefs>;\ninterface SeparatorProps extends ComponentPropsWithout<'span', RemovedProps>, MarginProps, SeparatorOwnProps {}\nconst Separator = React.forwardRef<SeparatorElement, SeparatorProps>((props, forwardedRef) => {\n const { className, color, decorative, ...separatorProps } = extractProps(props, separatorPropDefs, marginPropDefs);\n return <span data-accent-color={color} role={decorative ? undefined : 'separator'} {...separatorProps} ref={forwardedRef} className={classNames('rt-Separator', className)} />;\n});\nSeparator.displayName = 'Separator';\n\nexport { Separator };\nexport type { SeparatorProps };\n", "import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst orientationValues = ['horizontal', 'vertical'] as const;\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst separatorPropDefs = {\n orientation: {\n type: 'enum',\n className: 'rt-r-orientation',\n values: orientationValues,\n default: 'horizontal',\n responsive: true,\n },\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n color: { ...colorPropDef.color, default: 'gray' },\n decorative: { type: 'boolean', default: true },\n light: { type: 'boolean', className: 'rt-light', default: false },\n} satisfies {\n orientation: PropDef<(typeof orientationValues)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n color: typeof colorPropDef.color;\n decorative: PropDef<boolean>;\n light: PropDef<boolean>;\n};\n\nexport { separatorPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { badgePropDefs } from './badge.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Tooltip } from './tooltip.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\n\ntype BadgeElement = React.ElementRef<'span'>;\ntype BadgeOwnProps = GetPropDefTypes<typeof badgePropDefs>;\n\n// Tooltip props that can be passed to Badge\ninterface BadgeTooltipProps {\n tooltip?: React.ReactNode;\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n tooltipAlign?: 'start' | 'center' | 'end';\n tooltipDelayDuration?: number;\n tooltipDisableHoverableContent?: boolean;\n}\n\ninterface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n BadgeOwnProps,\n BadgeTooltipProps {}\n\nconst Badge = React.forwardRef<BadgeElement, BadgeProps>((props, forwardedRef) => {\n const {\n asChild,\n className,\n children,\n color,\n radius,\n material,\n panelBackground,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n ...badgeProps\n } = extractProps(props, badgePropDefs, marginPropDefs);\n\n // Memoize material calculation for performance\n const effectiveMaterial = React.useMemo(\n () => material ?? panelBackground,\n [material, panelBackground],\n );\n\n useDeprecatedPanelBackgroundWarning(panelBackground);\n\n // Memoize component variable to prevent unnecessary re-renders\n const Comp = React.useMemo(() => (asChild ? Slot.Root : 'span'), [asChild]);\n\n const badge = (\n <Comp\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n {...badgeProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Badge', className)}\n >\n {children}\n </Comp>\n );\n\n // If no tooltip is provided, return the badge as-is\n if (!tooltip) {\n return badge;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n return (\n <Tooltip\n content={tooltip}\n side={tooltipSide}\n align={tooltipAlign}\n delayDuration={tooltipDelayDuration}\n disableHoverableContent={tooltipDisableHoverableContent}\n >\n {badge}\n </Tooltip>\n );\n});\nBadge.displayName = 'Badge';\n\nexport { Badge };\nexport type { BadgeProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['solid', 'soft', 'surface', 'outline', 'ghost', 'classic'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst badgePropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'soft' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nexport { badgePropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n"],
5
+ "mappings": "2lBAAA,IAAAA,GAA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ACF,CAEJ,CACF,EACAC,GAAc,YAAc",
6
+ "names": ["sidebar_exports", "__export", "SidebarContent", "SidebarFooter", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarHeader", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "Sidebar", "SidebarSearch", "SidebarSeparator", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "Accordion", "React", "import_classnames", "import_radix_ui", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "radii", "radiusPropDef", "sizes", "scrollbarsValues", "scrollAreaPropDefs", "asChildPropDef", "radiusPropDef", "extractMarginProps", "props", "m", "mx", "my", "mt", "mr", "mb", "ml", "rest", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "marginValues", "marginPropDefs", "marginValues", "marginPropDefs", "marginValueSet", "MARGIN_PROPS", "getMarginStyles", "props", "classes", "style", "i", "key", "className", "customProperties", "value", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "React", "getSubtree", "options", "content", "asChild", "children", "firstChild", "ScrollArea", "props", "forwardedRef", "marginRest", "marginProps", "extractMarginProps", "marginClassNames", "marginCustomProperties", "getMarginStyles", "asChild", "children", "className", "style", "type", "scrollHideDelay", "dir", "size", "scrollAreaPropDefs", "radius", "scrollbars", "viewportProps", "ScrollAreaPrimitive", "classNames", "mergeStyles", "getSubtree", "getResponsiveClassNames", "accentColors", "grayColors", "colorPropDef", "accentColorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "materials", "submenuBehaviors", "baseMenuSharedPropDefs", "colorPropDef", "highContrastPropDef", "baseMenuContentPropDefs", "baseMenuSubContentPropDefs", "baseMenuItemPropDefs", "asChildPropDef", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "React", "PANEL_BACKGROUND_MESSAGE", "warned", "warnOnce", "message", "useDeprecatedPanelBackgroundWarning", "panelBackground", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "React", "React", "_BREAKPOINTS", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "getReadySnapshot", "getReadyServerSnapshot", "useBreakpoint", "breakpoint", "ready", "resolveResponsiveValue", "value", "currentBreakpoint", "defaultValue", "map", "bpOrder", "startIdx", "bp", "DrillDownActionsContext", "DrillDownStateContext", "DrillDownProvider", "children", "submenuBehavior", "breakpoint", "ready", "useBreakpoint", "stack", "setStack", "animationDirection", "setAnimationDirection", "behavior", "prevBehaviorRef", "push", "id", "prev", "pop", "reset", "actionsValue", "isActive", "stateValue", "useDrillDownActionsOptional", "DrillDownActionsContext", "useDrillDownStateOptional", "DrillDownStateContext", "SubContext", "useSubContext", "React", "MenuContext", "resolveSize", "size", "MenuProvider", "children", "resolvedSize", "value", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "sizes", "variants", "kbdPropDefs", "asChildPropDef", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "marginPropDefs", "Comp", "classNames", "DropdownMenuRoot", "props", "DropdownMenuPrimitive", "DropdownMenuTrigger", "children", "forwardedRef", "requireReactElement", "DrillDownRoot", "drillDownState", "useDrillDownStateOptional", "DropdownMenuContentContext", "DropdownMenuContent", "themeContext", "useThemeContext", "useDeprecatedPanelBackgroundWarning", "effectiveMaterial", "memoizedThemeContext", "size", "baseMenuContentPropDefs", "variant", "highContrast", "material", "submenuBehavior", "virtualized", "className", "color", "container", "forceMount", "_", "__", "___", "____", "contentProps", "extractProps", "resolvedColor", "contentBody", "MenuProvider", "DrillDownProvider", "Theme", "classNames", "ScrollArea", "DropdownMenuLabel", "DropdownMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "Kbd", "DropdownMenuGroup", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "DropdownMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "useSubId", "DropdownMenuSub", "label", "subId", "subContextValue", "SubContext", "DropdownMenuSubTrigger", "onClick", "subTriggerProps", "drillDownActions", "useDrillDownActionsOptional", "subContext", "useSubContext", "onClickRef", "handleClick", "e", "handleKeyDown", "ThickChevronRightIcon", "DropdownMenuSeparator", "DrillDownBackItem", "pop", "ThickChevronLeftIcon", "DropdownMenuSubContent", "subContentProps", "baseMenuSubContentPropDefs", "isActive", "DropdownMenuTriggerIcon", "ChevronDownIcon", "React", "import_classnames", "import_radix_ui", "heightPropDefs", "widthPropDefs", "contentSizes", "panelBackgrounds", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "themeContext", "useThemeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "extractProps", "popoverContentPropDefs", "contentRef", "combinedRef", "node", "labelId", "setLabelId", "setToolbarOffset", "offsetPx", "el", "Theme", "classNames", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "localRef", "setRefs", "update", "height", "ro", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar", "sizes", "variants", "menuVariants", "types", "sides", "collapsibleModes", "layouts", "sidebarPropDefs", "asChildPropDef", "colorPropDef", "highContrastPropDef", "React", "import_classnames", "orientationValues", "sizes", "separatorPropDefs", "colorPropDef", "Separator", "props", "forwardedRef", "className", "color", "decorative", "separatorProps", "extractProps", "separatorPropDefs", "marginPropDefs", "classNames", "React", "import_classnames", "import_radix_ui", "sizes", "variants", "panelBackgrounds", "materials", "badgePropDefs", "asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "React", "import_classnames", "import_radix_ui", "React", "import_radix_ui", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "tooltipPropDefs", "widthPropDefs", "Tooltip", "props", "forwardedRef", "children", "className", "open", "defaultOpen", "onOpenChange", "delayDuration", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "TooltipPrimitive", "Theme", "classNames", "Text", "Badge", "props", "forwardedRef", "asChild", "className", "children", "color", "radius", "material", "panelBackground", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "badgeProps", "extractProps", "badgePropDefs", "marginPropDefs", "effectiveMaterial", "useDeprecatedPanelBackgroundWarning", "Comp", "badge", "classNames", "Tooltip", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "useThemeContext", "size", "sidebarPropDefs", "variant", "menuVariant", "layout", "presentation", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "extractProps", "_", "__", "___", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "visualContextValue", "classNames", "SidebarContent", "role", "ariaLabel", "id", "visual", "ScrollArea", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "Separator", "SidebarMenu", "SidebarMenuItem", "separateIconsAndLabels", "node", "icons", "labels", "child", "el", "wrapTextNodes", "index", "newChildren", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onKeyDown", "sidebarSize", "isThinMode", "Comp", "Slot", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "processedChildren", "slottedChildren", "onlyChild", "originalInnerChildren", "enhancedInnerChildren", "Badge", "Kbd", "label", "SidebarSubMenuModeContext", "SidebarMenuSub", "defaultOpen", "DropdownMenuRoot", "SidebarMenuSubTrigger", "DropdownMenuTrigger", "ThickChevronRightIcon", "SidebarMenuSubContent", "unwrapMenuButton", "n", "i", "normalized", "itemChildren", "content", "DropdownMenuItem", "dropdownSize", "DropdownMenuContent", "DropdownMenuGroup", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent", "SearchIcon", "ClearIcon", "SidebarSearch", "value", "onValueChange", "placeholder", "isThin", "inputRef", "popoverRef", "resultsId", "valueRef", "onValueChangeRef", "searchLabel", "e", "handlePopoverKeyDown", "container", "resultsGroup", "items", "active", "isOnInput", "currentIndex", "PopoverRoot", "PopoverTrigger", "PopoverContent"]
7
7
  }