@womp/kookie-ui 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (569) hide show
  1. package/components.css +1397 -2626
  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/base-checkbox.props.d.ts +1 -1
  6. package/dist/cjs/components/_internal/base-checkbox.props.js +1 -1
  7. package/dist/cjs/components/_internal/base-checkbox.props.js.map +2 -2
  8. package/dist/cjs/components/_internal/base-radio.props.d.ts +1 -1
  9. package/dist/cjs/components/_internal/base-radio.props.js +1 -1
  10. package/dist/cjs/components/_internal/base-radio.props.js.map +2 -2
  11. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  12. package/dist/cjs/components/_internal/pane-chrome.js.map +3 -3
  13. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  14. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  15. package/dist/cjs/components/accordion.d.ts.map +1 -1
  16. package/dist/cjs/components/accordion.js +1 -1
  17. package/dist/cjs/components/accordion.js.map +4 -4
  18. package/dist/cjs/components/alert-dialog.js +1 -1
  19. package/dist/cjs/components/alert-dialog.js.map +4 -4
  20. package/dist/cjs/components/badge.js +1 -1
  21. package/dist/cjs/components/badge.js.map +4 -4
  22. package/dist/cjs/components/badge.props.d.ts +1 -1
  23. package/dist/cjs/components/badge.props.js +1 -1
  24. package/dist/cjs/components/badge.props.js.map +1 -1
  25. package/dist/cjs/components/button.js +2 -2
  26. package/dist/cjs/components/button.js.map +4 -4
  27. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  28. package/dist/cjs/components/chatbar.js +2 -2
  29. package/dist/cjs/components/chatbar.js.map +4 -4
  30. package/dist/cjs/components/checkbox-cards.js +1 -1
  31. package/dist/cjs/components/checkbox-cards.js.map +2 -2
  32. package/dist/cjs/components/checkbox-group.d.ts.map +1 -1
  33. package/dist/cjs/components/checkbox-group.js +1 -1
  34. package/dist/cjs/components/checkbox-group.js.map +4 -4
  35. package/dist/cjs/components/checkbox-group.props.d.ts +1 -1
  36. package/dist/cjs/components/checkbox-group.props.js +1 -1
  37. package/dist/cjs/components/checkbox-group.props.js.map +2 -2
  38. package/dist/cjs/components/checkbox.d.ts.map +1 -1
  39. package/dist/cjs/components/checkbox.js +1 -1
  40. package/dist/cjs/components/checkbox.js.map +4 -4
  41. package/dist/cjs/components/checkbox.props.js +1 -1
  42. package/dist/cjs/components/checkbox.props.js.map +2 -2
  43. package/dist/cjs/components/combobox.d.ts.map +1 -1
  44. package/dist/cjs/components/combobox.js +1 -1
  45. package/dist/cjs/components/combobox.js.map +4 -4
  46. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  47. package/dist/cjs/components/context-menu.js +1 -1
  48. package/dist/cjs/components/context-menu.js.map +4 -4
  49. package/dist/cjs/components/data-list.d.ts.map +1 -1
  50. package/dist/cjs/components/data-list.js +1 -1
  51. package/dist/cjs/components/data-list.js.map +4 -4
  52. package/dist/cjs/components/dialog.js +1 -1
  53. package/dist/cjs/components/dialog.js.map +4 -4
  54. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  55. package/dist/cjs/components/dropdown-menu.js +1 -1
  56. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  57. package/dist/cjs/components/hover-card.d.ts.map +1 -1
  58. package/dist/cjs/components/hover-card.js +1 -1
  59. package/dist/cjs/components/hover-card.js.map +4 -4
  60. package/dist/cjs/components/icon-button.js +2 -2
  61. package/dist/cjs/components/icon-button.js.map +4 -4
  62. package/dist/cjs/components/index.js +5 -5
  63. package/dist/cjs/components/index.js.map +4 -4
  64. package/dist/cjs/components/message-scroller.js +2 -2
  65. package/dist/cjs/components/message-scroller.js.map +4 -4
  66. package/dist/cjs/components/navbar.d.ts.map +1 -1
  67. package/dist/cjs/components/navbar.js +1 -1
  68. package/dist/cjs/components/navbar.js.map +4 -4
  69. package/dist/cjs/components/notice.d.ts +1 -1
  70. package/dist/cjs/components/notice.d.ts.map +1 -1
  71. package/dist/cjs/components/notice.js +2 -2
  72. package/dist/cjs/components/notice.js.map +4 -4
  73. package/dist/cjs/components/popover.d.ts.map +1 -1
  74. package/dist/cjs/components/popover.js +1 -1
  75. package/dist/cjs/components/popover.js.map +4 -4
  76. package/dist/cjs/components/progress.js +1 -1
  77. package/dist/cjs/components/progress.js.map +3 -3
  78. package/dist/cjs/components/progress.props.d.ts +0 -7
  79. package/dist/cjs/components/progress.props.d.ts.map +1 -1
  80. package/dist/cjs/components/progress.props.js +1 -1
  81. package/dist/cjs/components/progress.props.js.map +3 -3
  82. package/dist/cjs/components/radio-group.d.ts.map +1 -1
  83. package/dist/cjs/components/radio-group.js +1 -1
  84. package/dist/cjs/components/radio-group.js.map +4 -4
  85. package/dist/cjs/components/radio-group.props.d.ts +1 -1
  86. package/dist/cjs/components/radio-group.props.js +1 -1
  87. package/dist/cjs/components/radio-group.props.js.map +2 -2
  88. package/dist/cjs/components/radio.d.ts.map +1 -1
  89. package/dist/cjs/components/radio.js +1 -1
  90. package/dist/cjs/components/radio.js.map +4 -4
  91. package/dist/cjs/components/radio.props.js +1 -1
  92. package/dist/cjs/components/radio.props.js.map +2 -2
  93. package/dist/cjs/components/scroll-area.d.ts.map +1 -1
  94. package/dist/cjs/components/scroll-area.js +1 -1
  95. package/dist/cjs/components/scroll-area.js.map +3 -3
  96. package/dist/cjs/components/scroll-area.props.d.ts +0 -7
  97. package/dist/cjs/components/scroll-area.props.d.ts.map +1 -1
  98. package/dist/cjs/components/scroll-area.props.js +1 -1
  99. package/dist/cjs/components/scroll-area.props.js.map +3 -3
  100. package/dist/cjs/components/segmented-control.d.ts.map +1 -1
  101. package/dist/cjs/components/segmented-control.js +1 -1
  102. package/dist/cjs/components/segmented-control.js.map +4 -4
  103. package/dist/cjs/components/select.d.ts.map +1 -1
  104. package/dist/cjs/components/select.js +1 -1
  105. package/dist/cjs/components/select.js.map +4 -4
  106. package/dist/cjs/components/separator.js +1 -1
  107. package/dist/cjs/components/separator.js.map +3 -3
  108. package/dist/cjs/components/separator.props.d.ts +0 -7
  109. package/dist/cjs/components/separator.props.d.ts.map +1 -1
  110. package/dist/cjs/components/separator.props.js +1 -1
  111. package/dist/cjs/components/separator.props.js.map +3 -3
  112. package/dist/cjs/components/sheet.js +1 -1
  113. package/dist/cjs/components/sheet.js.map +4 -4
  114. package/dist/cjs/components/shell.d.ts +1 -1
  115. package/dist/cjs/components/shell.d.ts.map +1 -1
  116. package/dist/cjs/components/shell.js +1 -1
  117. package/dist/cjs/components/shell.js.map +4 -4
  118. package/dist/cjs/components/sidebar.js +1 -1
  119. package/dist/cjs/components/sidebar.js.map +4 -4
  120. package/dist/cjs/components/slider.d.ts.map +1 -1
  121. package/dist/cjs/components/slider.js +1 -1
  122. package/dist/cjs/components/slider.js.map +4 -4
  123. package/dist/cjs/components/spinner.js +1 -1
  124. package/dist/cjs/components/spinner.js.map +3 -3
  125. package/dist/cjs/components/spinner.props.d.ts +0 -7
  126. package/dist/cjs/components/spinner.props.d.ts.map +1 -1
  127. package/dist/cjs/components/spinner.props.js +1 -1
  128. package/dist/cjs/components/spinner.props.js.map +3 -3
  129. package/dist/cjs/components/switch.d.ts.map +1 -1
  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.d.ts.map +1 -1
  133. package/dist/cjs/components/tab-nav.js +1 -1
  134. package/dist/cjs/components/tab-nav.js.map +4 -4
  135. package/dist/cjs/components/table.d.ts.map +1 -1
  136. package/dist/cjs/components/table.js +1 -1
  137. package/dist/cjs/components/table.js.map +4 -4
  138. package/dist/cjs/components/table.props.d.ts +1 -1
  139. package/dist/cjs/components/table.props.js +1 -1
  140. package/dist/cjs/components/table.props.js.map +2 -2
  141. package/dist/cjs/components/tabs.d.ts.map +1 -1
  142. package/dist/cjs/components/tabs.js +1 -1
  143. package/dist/cjs/components/tabs.js.map +4 -4
  144. package/dist/cjs/components/text-area.d.ts.map +1 -1
  145. package/dist/cjs/components/text-area.js +1 -1
  146. package/dist/cjs/components/text-area.js.map +4 -4
  147. package/dist/cjs/components/text-field.d.ts.map +1 -1
  148. package/dist/cjs/components/text-field.js +2 -2
  149. package/dist/cjs/components/text-field.js.map +4 -4
  150. package/dist/cjs/components/theme-panel.js +3 -3
  151. package/dist/cjs/components/theme-panel.js.map +4 -4
  152. package/dist/cjs/components/theme.d.ts +3 -0
  153. package/dist/cjs/components/theme.d.ts.map +1 -1
  154. package/dist/cjs/components/theme.js +1 -1
  155. package/dist/cjs/components/theme.js.map +4 -4
  156. package/dist/cjs/components/theme.props.d.ts +12 -0
  157. package/dist/cjs/components/theme.props.d.ts.map +1 -1
  158. package/dist/cjs/components/theme.props.js +1 -1
  159. package/dist/cjs/components/theme.props.js.map +3 -3
  160. package/dist/cjs/components/toggle-button.js +3 -3
  161. package/dist/cjs/components/toggle-button.js.map +4 -4
  162. package/dist/cjs/components/toggle-icon-button.js +3 -3
  163. package/dist/cjs/components/toggle-icon-button.js.map +4 -4
  164. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  165. package/dist/cjs/components/toolbar.js +2 -2
  166. package/dist/cjs/components/toolbar.js.map +4 -4
  167. package/dist/cjs/components/tooltip.js +1 -1
  168. package/dist/cjs/components/tooltip.js.map +4 -4
  169. package/dist/cjs/helpers/index.d.ts +1 -0
  170. package/dist/cjs/helpers/index.d.ts.map +1 -1
  171. package/dist/cjs/helpers/index.js +3 -3
  172. package/dist/cjs/helpers/index.js.map +4 -4
  173. package/dist/cjs/helpers/map-prop-values.d.ts +1 -4
  174. package/dist/cjs/helpers/map-prop-values.d.ts.map +1 -1
  175. package/dist/cjs/helpers/map-prop-values.js +1 -1
  176. package/dist/cjs/helpers/map-prop-values.js.map +3 -3
  177. package/dist/cjs/helpers/theme-size.d.ts +41 -0
  178. package/dist/cjs/helpers/theme-size.d.ts.map +1 -0
  179. package/dist/cjs/helpers/theme-size.js +2 -0
  180. package/dist/cjs/helpers/theme-size.js.map +7 -0
  181. package/dist/cjs/index.js +7 -7
  182. package/dist/cjs/index.js.map +4 -4
  183. package/dist/cjs/props/index.js +1 -1
  184. package/dist/cjs/props/index.js.map +3 -3
  185. package/dist/esm/{chunk-XZ5XZS5O.js → chunk-35HNDWWM.js} +2 -2
  186. package/dist/esm/chunk-3YLYGKFB.js +2 -0
  187. package/dist/esm/chunk-3YLYGKFB.js.map +7 -0
  188. package/dist/esm/chunk-4DE3ONED.js +2 -0
  189. package/dist/esm/chunk-4DE3ONED.js.map +7 -0
  190. package/dist/esm/chunk-4M55YJMR.js +2 -0
  191. package/dist/esm/chunk-4M55YJMR.js.map +7 -0
  192. package/dist/esm/chunk-4YQXYWDQ.js +2 -0
  193. package/dist/esm/chunk-4YQXYWDQ.js.map +7 -0
  194. package/dist/esm/chunk-54KMG7NX.js +2 -0
  195. package/dist/esm/chunk-54KMG7NX.js.map +7 -0
  196. package/dist/esm/chunk-5R2WX2FU.js +2 -0
  197. package/dist/esm/chunk-5R2WX2FU.js.map +7 -0
  198. package/dist/esm/chunk-5VBJT2VY.js +2 -0
  199. package/dist/esm/chunk-5VBJT2VY.js.map +7 -0
  200. package/dist/esm/chunk-6AZV4VFW.js +2 -0
  201. package/dist/esm/chunk-6AZV4VFW.js.map +7 -0
  202. package/dist/esm/{chunk-YDRFILTX.js → chunk-6YWDEANN.js} +2 -2
  203. package/dist/esm/{chunk-MZQDDG5K.js → chunk-7FZPCM7W.js} +2 -2
  204. package/dist/esm/chunk-7J2QS2UT.js +5 -0
  205. package/dist/esm/chunk-7J2QS2UT.js.map +7 -0
  206. package/dist/esm/chunk-ABS275QZ.js +2 -0
  207. package/dist/esm/chunk-AKPAHQYE.js +2 -0
  208. package/dist/esm/chunk-AKPAHQYE.js.map +7 -0
  209. package/dist/esm/chunk-BN24ZBO7.js +2 -0
  210. package/dist/esm/chunk-BN24ZBO7.js.map +7 -0
  211. package/dist/esm/chunk-BZ6YBP2S.js +2 -0
  212. package/dist/esm/chunk-BZ6YBP2S.js.map +7 -0
  213. package/dist/esm/chunk-CHPZ3LNC.js +2 -0
  214. package/dist/esm/chunk-CHPZ3LNC.js.map +7 -0
  215. package/dist/esm/chunk-CRK34MWY.js +2 -0
  216. package/dist/esm/chunk-CRK34MWY.js.map +7 -0
  217. package/dist/esm/{chunk-YZABQ4LS.js → chunk-DFSW4QR4.js} +2 -2
  218. package/dist/esm/{chunk-SM27AC7E.js → chunk-DJFTDR6Y.js} +2 -2
  219. package/dist/esm/chunk-EA2XSEFH.js +2 -0
  220. package/dist/esm/chunk-EA2XSEFH.js.map +7 -0
  221. package/dist/esm/{chunk-CRYT55SY.js → chunk-EHUSLPWN.js} +2 -2
  222. package/dist/esm/chunk-ENSDQ3XQ.js +2 -0
  223. package/dist/esm/chunk-ENSDQ3XQ.js.map +7 -0
  224. package/dist/esm/chunk-F3XBIUXB.js +2 -0
  225. package/dist/esm/chunk-F3XBIUXB.js.map +7 -0
  226. package/dist/esm/chunk-GHD3TKCA.js +2 -0
  227. package/dist/esm/chunk-GHD3TKCA.js.map +7 -0
  228. package/dist/esm/chunk-GQBQHGEF.js +2 -0
  229. package/dist/esm/chunk-GQBQHGEF.js.map +7 -0
  230. package/dist/esm/{chunk-6XHM724Y.js → chunk-GTVFQXLJ.js} +2 -2
  231. package/dist/esm/chunk-HIEGLLY7.js +2 -0
  232. package/dist/esm/chunk-HIEGLLY7.js.map +7 -0
  233. package/dist/esm/chunk-HZYE46V2.js +2 -0
  234. package/dist/esm/chunk-HZYE46V2.js.map +7 -0
  235. package/dist/esm/chunk-IWT3Q2PD.js +2 -0
  236. package/dist/esm/chunk-IWT3Q2PD.js.map +7 -0
  237. package/dist/esm/chunk-JCRBBT4X.js +2 -0
  238. package/dist/esm/chunk-JCRBBT4X.js.map +7 -0
  239. package/dist/esm/chunk-KFQ4B5YC.js +2 -0
  240. package/dist/esm/chunk-KFQ4B5YC.js.map +7 -0
  241. package/dist/esm/{chunk-6HRBG5H2.js → chunk-KPPIW4OJ.js} +2 -2
  242. package/dist/esm/{chunk-6WFEMPCF.js → chunk-KRXCFIRK.js} +2 -2
  243. package/dist/esm/{chunk-5SQL4ZRC.js → chunk-KSZOVI57.js} +2 -2
  244. package/dist/esm/{chunk-5SQL4ZRC.js.map → chunk-KSZOVI57.js.map} +1 -1
  245. package/dist/esm/{chunk-COSHAOEK.js → chunk-MJEYJI5G.js} +2 -2
  246. package/dist/esm/chunk-MLXHD7YF.js +2 -0
  247. package/dist/esm/chunk-MLXHD7YF.js.map +7 -0
  248. package/dist/esm/{chunk-CG54MBMW.js → chunk-MPN33CKR.js} +2 -2
  249. package/dist/esm/chunk-MQDZBF4J.js +2 -0
  250. package/dist/esm/chunk-MQDZBF4J.js.map +7 -0
  251. package/dist/esm/{chunk-IGBEDJBC.js → chunk-NFVOEHZS.js} +2 -2
  252. package/dist/esm/{chunk-ORMCQAPS.js → chunk-PAQS6C2A.js} +2 -2
  253. package/dist/esm/chunk-PUVZFRTQ.js +2 -0
  254. package/dist/esm/chunk-PUVZFRTQ.js.map +7 -0
  255. package/dist/esm/chunk-QAUYOVVL.js +2 -0
  256. package/dist/esm/chunk-QAUYOVVL.js.map +7 -0
  257. package/dist/esm/chunk-RC7TBVLO.js +2 -0
  258. package/dist/esm/chunk-RC7TBVLO.js.map +7 -0
  259. package/dist/esm/chunk-STMTXK7U.js +2 -0
  260. package/dist/esm/chunk-STMTXK7U.js.map +7 -0
  261. package/dist/esm/chunk-U7PDXTRX.js +2 -0
  262. package/dist/esm/chunk-U7PDXTRX.js.map +7 -0
  263. package/dist/esm/chunk-UNRG6Z5I.js +2 -0
  264. package/dist/esm/chunk-UNRG6Z5I.js.map +7 -0
  265. package/dist/esm/chunk-UONSKZQT.js +2 -0
  266. package/dist/esm/chunk-UONSKZQT.js.map +7 -0
  267. package/dist/esm/{chunk-2IPVLV6B.js → chunk-UQZHW3EJ.js} +2 -2
  268. package/dist/esm/chunk-VIDXAECE.js +2 -0
  269. package/dist/esm/chunk-VIDXAECE.js.map +7 -0
  270. package/dist/esm/chunk-VLLJ7A6P.js +2 -0
  271. package/dist/esm/chunk-VLLJ7A6P.js.map +7 -0
  272. package/dist/esm/{chunk-DP3OWU5T.js → chunk-VT4AAF7Q.js} +2 -2
  273. package/dist/esm/chunk-XVKFQSLI.js +2 -0
  274. package/dist/esm/chunk-XVKFQSLI.js.map +7 -0
  275. package/dist/esm/{chunk-RFURPE7W.js → chunk-YF3MFME4.js} +2 -2
  276. package/dist/esm/{chunk-4STOJSJZ.js → chunk-YVMQWSHA.js} +2 -2
  277. package/dist/esm/{chunk-4STOJSJZ.js.map → chunk-YVMQWSHA.js.map} +2 -2
  278. package/dist/esm/chunk-ZCAI2PRH.js +2 -0
  279. package/dist/esm/chunk-ZCAI2PRH.js.map +7 -0
  280. package/dist/esm/{chunk-S53ZQNHK.js → chunk-ZFBLPW3X.js} +2 -2
  281. package/dist/esm/chunk-ZH2B7WEH.js +2 -0
  282. package/dist/esm/chunk-ZH2B7WEH.js.map +7 -0
  283. package/dist/esm/chunk-ZJZIV2JH.js +2 -0
  284. package/dist/esm/chunk-ZJZIV2JH.js.map +7 -0
  285. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  286. package/dist/esm/components/_internal/base-button.js +1 -1
  287. package/dist/esm/components/_internal/base-checkbox.props.d.ts +1 -1
  288. package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
  289. package/dist/esm/components/_internal/base-radio.props.d.ts +1 -1
  290. package/dist/esm/components/_internal/base-radio.props.js +1 -1
  291. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  292. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  293. package/dist/esm/components/accordion.d.ts.map +1 -1
  294. package/dist/esm/components/accordion.js +1 -1
  295. package/dist/esm/components/alert-dialog.js +1 -1
  296. package/dist/esm/components/badge.js +1 -1
  297. package/dist/esm/components/badge.props.d.ts +1 -1
  298. package/dist/esm/components/badge.props.js +1 -1
  299. package/dist/esm/components/button.js +1 -1
  300. package/dist/esm/components/chatbar.d.ts.map +1 -1
  301. package/dist/esm/components/chatbar.js +1 -1
  302. package/dist/esm/components/checkbox-cards.js +1 -1
  303. package/dist/esm/components/checkbox-group.d.ts.map +1 -1
  304. package/dist/esm/components/checkbox-group.js +1 -1
  305. package/dist/esm/components/checkbox-group.props.d.ts +1 -1
  306. package/dist/esm/components/checkbox-group.props.js +1 -1
  307. package/dist/esm/components/checkbox.d.ts.map +1 -1
  308. package/dist/esm/components/checkbox.js +1 -1
  309. package/dist/esm/components/checkbox.props.js +1 -1
  310. package/dist/esm/components/combobox.d.ts.map +1 -1
  311. package/dist/esm/components/combobox.js +1 -1
  312. package/dist/esm/components/context-menu.d.ts.map +1 -1
  313. package/dist/esm/components/context-menu.js +1 -1
  314. package/dist/esm/components/data-list.d.ts.map +1 -1
  315. package/dist/esm/components/data-list.js +1 -1
  316. package/dist/esm/components/dialog.js +1 -1
  317. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  318. package/dist/esm/components/dropdown-menu.js +1 -1
  319. package/dist/esm/components/hover-card.d.ts.map +1 -1
  320. package/dist/esm/components/hover-card.js +1 -1
  321. package/dist/esm/components/icon-button.js +1 -1
  322. package/dist/esm/components/index.js +1 -1
  323. package/dist/esm/components/message-scroller.js +1 -1
  324. package/dist/esm/components/navbar.d.ts.map +1 -1
  325. package/dist/esm/components/navbar.js +1 -1
  326. package/dist/esm/components/notice.d.ts +1 -1
  327. package/dist/esm/components/notice.d.ts.map +1 -1
  328. package/dist/esm/components/notice.js +1 -1
  329. package/dist/esm/components/popover.d.ts.map +1 -1
  330. package/dist/esm/components/popover.js +1 -1
  331. package/dist/esm/components/progress.js +1 -1
  332. package/dist/esm/components/progress.props.d.ts +0 -7
  333. package/dist/esm/components/progress.props.d.ts.map +1 -1
  334. package/dist/esm/components/progress.props.js +1 -1
  335. package/dist/esm/components/radio-group.d.ts.map +1 -1
  336. package/dist/esm/components/radio-group.js +1 -1
  337. package/dist/esm/components/radio-group.props.d.ts +1 -1
  338. package/dist/esm/components/radio-group.props.js +1 -1
  339. package/dist/esm/components/radio.d.ts.map +1 -1
  340. package/dist/esm/components/radio.js +1 -1
  341. package/dist/esm/components/radio.props.js +1 -1
  342. package/dist/esm/components/scroll-area.d.ts.map +1 -1
  343. package/dist/esm/components/scroll-area.js +1 -1
  344. package/dist/esm/components/scroll-area.props.d.ts +0 -7
  345. package/dist/esm/components/scroll-area.props.d.ts.map +1 -1
  346. package/dist/esm/components/scroll-area.props.js +1 -1
  347. package/dist/esm/components/segmented-control.d.ts.map +1 -1
  348. package/dist/esm/components/segmented-control.js +1 -1
  349. package/dist/esm/components/select.d.ts.map +1 -1
  350. package/dist/esm/components/select.js +1 -1
  351. package/dist/esm/components/separator.js +1 -1
  352. package/dist/esm/components/separator.props.d.ts +0 -7
  353. package/dist/esm/components/separator.props.d.ts.map +1 -1
  354. package/dist/esm/components/separator.props.js +1 -1
  355. package/dist/esm/components/sheet.js +1 -1
  356. package/dist/esm/components/shell.d.ts +1 -1
  357. package/dist/esm/components/shell.d.ts.map +1 -1
  358. package/dist/esm/components/shell.js +1 -1
  359. package/dist/esm/components/sidebar.js +1 -1
  360. package/dist/esm/components/slider.d.ts.map +1 -1
  361. package/dist/esm/components/slider.js +1 -1
  362. package/dist/esm/components/spinner.js +1 -1
  363. package/dist/esm/components/spinner.props.d.ts +0 -7
  364. package/dist/esm/components/spinner.props.d.ts.map +1 -1
  365. package/dist/esm/components/spinner.props.js +1 -1
  366. package/dist/esm/components/switch.d.ts.map +1 -1
  367. package/dist/esm/components/switch.js +1 -1
  368. package/dist/esm/components/tab-nav.d.ts.map +1 -1
  369. package/dist/esm/components/tab-nav.js +1 -1
  370. package/dist/esm/components/table.d.ts.map +1 -1
  371. package/dist/esm/components/table.js +1 -1
  372. package/dist/esm/components/table.props.d.ts +1 -1
  373. package/dist/esm/components/table.props.js +1 -1
  374. package/dist/esm/components/tabs.d.ts.map +1 -1
  375. package/dist/esm/components/tabs.js +1 -1
  376. package/dist/esm/components/text-area.d.ts.map +1 -1
  377. package/dist/esm/components/text-area.js +1 -1
  378. package/dist/esm/components/text-field.d.ts.map +1 -1
  379. package/dist/esm/components/text-field.js +1 -1
  380. package/dist/esm/components/theme-panel.js +1 -1
  381. package/dist/esm/components/theme.d.ts +3 -0
  382. package/dist/esm/components/theme.d.ts.map +1 -1
  383. package/dist/esm/components/theme.js +1 -1
  384. package/dist/esm/components/theme.props.d.ts +12 -0
  385. package/dist/esm/components/theme.props.d.ts.map +1 -1
  386. package/dist/esm/components/theme.props.js +1 -1
  387. package/dist/esm/components/toggle-button.js +1 -1
  388. package/dist/esm/components/toggle-icon-button.js +1 -1
  389. package/dist/esm/components/toolbar.d.ts.map +1 -1
  390. package/dist/esm/components/toolbar.js +1 -1
  391. package/dist/esm/components/tooltip.js +1 -1
  392. package/dist/esm/helpers/index.d.ts +1 -0
  393. package/dist/esm/helpers/index.d.ts.map +1 -1
  394. package/dist/esm/helpers/index.js +1 -1
  395. package/dist/esm/helpers/map-prop-values.d.ts +1 -4
  396. package/dist/esm/helpers/map-prop-values.d.ts.map +1 -1
  397. package/dist/esm/helpers/map-prop-values.js +1 -1
  398. package/dist/esm/helpers/theme-size.d.ts +41 -0
  399. package/dist/esm/helpers/theme-size.d.ts.map +1 -0
  400. package/dist/esm/helpers/theme-size.js +2 -0
  401. package/dist/esm/helpers/theme-size.js.map +7 -0
  402. package/dist/esm/index.js +1 -1
  403. package/dist/esm/props/index.js +1 -1
  404. package/layout/tokens.css +14 -0
  405. package/layout.css +14 -0
  406. package/package.json +1 -1
  407. package/src/components/_internal/base-button.css +114 -78
  408. package/src/components/_internal/base-button.tsx +48 -9
  409. package/src/components/_internal/base-checkbox.css +91 -8
  410. package/src/components/_internal/base-checkbox.props.ts +1 -1
  411. package/src/components/_internal/base-radio.css +68 -6
  412. package/src/components/_internal/base-radio.props.ts +1 -1
  413. package/src/components/_internal/base-tab-list.css +33 -25
  414. package/src/components/accordion.tsx +3 -1
  415. package/src/components/avatar.css +21 -15
  416. package/src/components/badge.css +14 -23
  417. package/src/components/badge.props.tsx +1 -1
  418. package/src/components/button.css +5 -175
  419. package/src/components/chatbar.tsx +9 -4
  420. package/src/components/checkbox-group.css +6 -11
  421. package/src/components/checkbox-group.tsx +3 -1
  422. package/src/components/checkbox.css +6 -11
  423. package/src/components/checkbox.tsx +3 -1
  424. package/src/components/combobox.tsx +3 -1
  425. package/src/components/context-menu.tsx +3 -1
  426. package/src/components/data-list.tsx +3 -1
  427. package/src/components/dropdown-menu.tsx +3 -1
  428. package/src/components/hover-card.tsx +3 -1
  429. package/src/components/icon-button.css +4 -152
  430. package/src/components/message-scroller.tsx +1 -1
  431. package/src/components/navbar.tsx +3 -1
  432. package/src/components/notice.tsx +7 -3
  433. package/src/components/popover.tsx +3 -1
  434. package/src/components/progress.css +4 -37
  435. package/src/components/progress.props.tsx +0 -3
  436. package/src/components/radio-group.props.tsx +1 -1
  437. package/src/components/radio-group.tsx +3 -1
  438. package/src/components/radio.tsx +3 -1
  439. package/src/components/scroll-area.css +2 -23
  440. package/src/components/scroll-area.props.tsx +0 -3
  441. package/src/components/scroll-area.tsx +2 -18
  442. package/src/components/segmented-control.css +34 -27
  443. package/src/components/segmented-control.tsx +3 -1
  444. package/src/components/select.css +76 -74
  445. package/src/components/select.tsx +4 -2
  446. package/src/components/separator.css +2 -23
  447. package/src/components/separator.props.tsx +0 -3
  448. package/src/components/shell.tsx +8 -2
  449. package/src/components/slider.css +19 -11
  450. package/src/components/slider.tsx +3 -1
  451. package/src/components/spinner.css +2 -23
  452. package/src/components/spinner.props.tsx +0 -4
  453. package/src/components/switch.css +51 -17
  454. package/src/components/switch.tsx +3 -1
  455. package/src/components/tab-nav.tsx +3 -1
  456. package/src/components/table.props.tsx +1 -1
  457. package/src/components/table.tsx +3 -1
  458. package/src/components/tabs.css +2 -1
  459. package/src/components/tabs.tsx +3 -1
  460. package/src/components/text-area.css +55 -107
  461. package/src/components/text-area.tsx +8 -6
  462. package/src/components/text-field.css +129 -127
  463. package/src/components/text-field.tsx +8 -6
  464. package/src/components/theme.props.tsx +10 -0
  465. package/src/components/theme.tsx +86 -71
  466. package/src/components/toolbar.tsx +3 -1
  467. package/src/helpers/index.ts +1 -0
  468. package/src/helpers/map-prop-values.ts +1 -18
  469. package/src/helpers/theme-size.ts +73 -0
  470. package/src/styles/tokens/constants.css +4 -0
  471. package/src/styles/tokens/space.css +16 -0
  472. package/styles.css +1428 -2641
  473. package/tokens/base.css +14 -0
  474. package/tokens.css +16 -0
  475. package/dist/esm/chunk-2HUAVZZL.js +0 -2
  476. package/dist/esm/chunk-2HUAVZZL.js.map +0 -7
  477. package/dist/esm/chunk-2XSRO44Q.js +0 -2
  478. package/dist/esm/chunk-2XSRO44Q.js.map +0 -7
  479. package/dist/esm/chunk-3KB2XWBE.js +0 -2
  480. package/dist/esm/chunk-3KB2XWBE.js.map +0 -7
  481. package/dist/esm/chunk-4D7OU2UA.js +0 -2
  482. package/dist/esm/chunk-4D7OU2UA.js.map +0 -7
  483. package/dist/esm/chunk-5GYIQIPW.js +0 -2
  484. package/dist/esm/chunk-5GYIQIPW.js.map +0 -7
  485. package/dist/esm/chunk-655TAWHX.js +0 -2
  486. package/dist/esm/chunk-655TAWHX.js.map +0 -7
  487. package/dist/esm/chunk-6VPYP3VN.js +0 -2
  488. package/dist/esm/chunk-6VPYP3VN.js.map +0 -7
  489. package/dist/esm/chunk-7BE6N3KY.js +0 -2
  490. package/dist/esm/chunk-7BE6N3KY.js.map +0 -7
  491. package/dist/esm/chunk-AHOUZS3V.js +0 -2
  492. package/dist/esm/chunk-AHOUZS3V.js.map +0 -7
  493. package/dist/esm/chunk-BALS3AVM.js +0 -2
  494. package/dist/esm/chunk-BALS3AVM.js.map +0 -7
  495. package/dist/esm/chunk-BOLRYGFQ.js +0 -2
  496. package/dist/esm/chunk-BOLRYGFQ.js.map +0 -7
  497. package/dist/esm/chunk-BUEYZEAY.js +0 -2
  498. package/dist/esm/chunk-BUEYZEAY.js.map +0 -7
  499. package/dist/esm/chunk-DKALDTCN.js +0 -2
  500. package/dist/esm/chunk-DKALDTCN.js.map +0 -7
  501. package/dist/esm/chunk-EJOVE3JH.js +0 -2
  502. package/dist/esm/chunk-EJOVE3JH.js.map +0 -7
  503. package/dist/esm/chunk-FPDLBLO3.js +0 -2
  504. package/dist/esm/chunk-FPDLBLO3.js.map +0 -7
  505. package/dist/esm/chunk-GOYI2U6F.js +0 -2
  506. package/dist/esm/chunk-GOYI2U6F.js.map +0 -7
  507. package/dist/esm/chunk-HKRQ3E3I.js +0 -2
  508. package/dist/esm/chunk-HKRQ3E3I.js.map +0 -7
  509. package/dist/esm/chunk-HSFQO4QM.js +0 -2
  510. package/dist/esm/chunk-HSFQO4QM.js.map +0 -7
  511. package/dist/esm/chunk-HVQ3SLQC.js +0 -2
  512. package/dist/esm/chunk-HVQ3SLQC.js.map +0 -7
  513. package/dist/esm/chunk-JCOALADA.js +0 -5
  514. package/dist/esm/chunk-JCOALADA.js.map +0 -7
  515. package/dist/esm/chunk-K7J23OPW.js +0 -2
  516. package/dist/esm/chunk-K7J23OPW.js.map +0 -7
  517. package/dist/esm/chunk-M55KFXYV.js +0 -2
  518. package/dist/esm/chunk-M55KFXYV.js.map +0 -7
  519. package/dist/esm/chunk-MGSHX5N5.js +0 -2
  520. package/dist/esm/chunk-MGSHX5N5.js.map +0 -7
  521. package/dist/esm/chunk-MJC4NKYG.js +0 -2
  522. package/dist/esm/chunk-MJC4NKYG.js.map +0 -7
  523. package/dist/esm/chunk-MOYLXCMW.js +0 -2
  524. package/dist/esm/chunk-MOYLXCMW.js.map +0 -7
  525. package/dist/esm/chunk-MVW2SY4F.js +0 -2
  526. package/dist/esm/chunk-MVW2SY4F.js.map +0 -7
  527. package/dist/esm/chunk-NOSR2XWD.js +0 -2
  528. package/dist/esm/chunk-NOSR2XWD.js.map +0 -7
  529. package/dist/esm/chunk-OMUUPPJO.js +0 -2
  530. package/dist/esm/chunk-OMUUPPJO.js.map +0 -7
  531. package/dist/esm/chunk-PNIVUG5D.js +0 -2
  532. package/dist/esm/chunk-PNIVUG5D.js.map +0 -7
  533. package/dist/esm/chunk-PSS45RHX.js +0 -2
  534. package/dist/esm/chunk-PSS45RHX.js.map +0 -7
  535. package/dist/esm/chunk-PYYI64XK.js +0 -2
  536. package/dist/esm/chunk-PYYI64XK.js.map +0 -7
  537. package/dist/esm/chunk-QJFAGWBO.js +0 -2
  538. package/dist/esm/chunk-QJFAGWBO.js.map +0 -7
  539. package/dist/esm/chunk-QWFFYUFH.js +0 -2
  540. package/dist/esm/chunk-QWFFYUFH.js.map +0 -7
  541. package/dist/esm/chunk-RVHKSNMJ.js +0 -2
  542. package/dist/esm/chunk-RVHKSNMJ.js.map +0 -7
  543. package/dist/esm/chunk-RYURXQLJ.js +0 -2
  544. package/dist/esm/chunk-RYURXQLJ.js.map +0 -7
  545. package/dist/esm/chunk-UA6FP7HS.js +0 -2
  546. package/dist/esm/chunk-V7UP4SLZ.js +0 -2
  547. package/dist/esm/chunk-V7UP4SLZ.js.map +0 -7
  548. package/dist/esm/chunk-X5KCVLKG.js +0 -2
  549. package/dist/esm/chunk-X5KCVLKG.js.map +0 -7
  550. package/dist/esm/chunk-XPRPYCII.js +0 -2
  551. package/dist/esm/chunk-XPRPYCII.js.map +0 -7
  552. /package/dist/esm/{chunk-XZ5XZS5O.js.map → chunk-35HNDWWM.js.map} +0 -0
  553. /package/dist/esm/{chunk-YDRFILTX.js.map → chunk-6YWDEANN.js.map} +0 -0
  554. /package/dist/esm/{chunk-MZQDDG5K.js.map → chunk-7FZPCM7W.js.map} +0 -0
  555. /package/dist/esm/{chunk-UA6FP7HS.js.map → chunk-ABS275QZ.js.map} +0 -0
  556. /package/dist/esm/{chunk-YZABQ4LS.js.map → chunk-DFSW4QR4.js.map} +0 -0
  557. /package/dist/esm/{chunk-SM27AC7E.js.map → chunk-DJFTDR6Y.js.map} +0 -0
  558. /package/dist/esm/{chunk-CRYT55SY.js.map → chunk-EHUSLPWN.js.map} +0 -0
  559. /package/dist/esm/{chunk-6XHM724Y.js.map → chunk-GTVFQXLJ.js.map} +0 -0
  560. /package/dist/esm/{chunk-6HRBG5H2.js.map → chunk-KPPIW4OJ.js.map} +0 -0
  561. /package/dist/esm/{chunk-6WFEMPCF.js.map → chunk-KRXCFIRK.js.map} +0 -0
  562. /package/dist/esm/{chunk-COSHAOEK.js.map → chunk-MJEYJI5G.js.map} +0 -0
  563. /package/dist/esm/{chunk-CG54MBMW.js.map → chunk-MPN33CKR.js.map} +0 -0
  564. /package/dist/esm/{chunk-IGBEDJBC.js.map → chunk-NFVOEHZS.js.map} +0 -0
  565. /package/dist/esm/{chunk-ORMCQAPS.js.map → chunk-PAQS6C2A.js.map} +0 -0
  566. /package/dist/esm/{chunk-2IPVLV6B.js.map → chunk-UQZHW3EJ.js.map} +0 -0
  567. /package/dist/esm/{chunk-DP3OWU5T.js.map → chunk-VT4AAF7Q.js.map} +0 -0
  568. /package/dist/esm/{chunk-RFURPE7W.js.map → chunk-YF3MFME4.js.map} +0 -0
  569. /package/dist/esm/{chunk-S53ZQNHK.js.map → chunk-ZFBLPW3X.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/combobox.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.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/color.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/props/width.props.ts", "../../../src/props/height.props.ts", "../../../src/components/combobox.props.tsx", "../../../src/props/margin.props.ts", "../../../src/components/icons.tsx", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/props/as-child.prop.ts", "../../../src/components/theme.props.tsx", "../../../src/helpers/require-react-element.ts", "../../../src/components/popover.tsx", "../../../src/components/popover.props.tsx", "../../../src/components/slot.tsx", "../../../src/components/visually-hidden.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * Combobox: Radix Popover for positioning, dismissal and focus; cmdk for search,\n * filtering and keyboard navigation.\n *\n * Render path. State is split so an interaction re-renders only what reads it:\n * - `ComboboxContext` (Trigger, Value, Content): config and the selected value.\n * Open state is not in it, so opening and closing re-render no consumer.\n * - `ComboboxSearchContext` (Input only): the search text.\n * - `ComboboxItemContext` (Items): stable values only. Items read \"am I selected\"\n * from a store through `useSyncExternalStore`, so a selection re-renders the old\n * and the new selected item, not all N.\n *\n * Highlight. cmdk's `data-selected` is the single highlight source, driven by both\n * the pointer and the keyboard. There is no separate CSS `:hover` highlight, so two\n * items are never lit at once and Enter always picks the lit item.\n */\n\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { useCallbackRef, useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { Slottable } from './slot.js';\nimport { VisuallyHidden } from './visually-hidden.js';\n\nimport type { textFieldRootPropDefs } from './text-field.props.js';\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 TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n// Hoisted so extractProps' compiled prop-def cache (keyed by object identity) hits.\nconst triggerSizingPropDefs = { size: comboboxRootPropDefs.size };\nconst contentSizePropDefs = { size: comboboxContentPropDefs.size };\n\nconst warned = new Set<string>();\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n// ============================================================================\n// Selection store\n// ============================================================================\n\ninterface SelectionStore {\n get: () => ComboboxValue;\n set: (value: ComboboxValue) => void;\n subscribe: (listener: () => void) => () => void;\n}\n\nfunction createSelectionStore(initial: ComboboxValue): SelectionStore {\n let current = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => current,\n set: (next) => {\n if (Object.is(next, current)) return;\n current = next;\n listeners.forEach((listener) => listener());\n },\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\n// ============================================================================\n// Contexts\n// ============================================================================\n\ninterface ComboboxContextValue {\n value: ComboboxValue;\n displayValue?: string;\n setOpen: (open: boolean) => void;\n size?: ComboboxRootOwnProps['size'];\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n color?: string;\n loop: boolean;\n shouldFilter: boolean;\n filter?: CommandFilter;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n /** Reads the trigger's accessible name from the DOM (aria-label, aria-labelledby or <label>). */\n getTriggerLabel: () => string | undefined;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\nconst useComboboxContext = (componentName: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`Combobox.${componentName} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\ninterface ComboboxSearchContextValue {\n value: string;\n setValue: (value: string) => void;\n}\n\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\n\ninterface ComboboxItemContextValue {\n store: SelectionStore;\n onSelect: (value: string) => void;\n disabled?: boolean;\n}\n\nconst ComboboxItemContext = React.createContext<ComboboxItemContextValue | null>(null);\n\n/** Values resolved by Content and read by Input and List. */\ninterface ComboboxContentContextValue {\n sizeClassName?: string;\n color?: string;\n label?: string;\n}\n\nconst ComboboxContentContext = React.createContext<ComboboxContentContextValue | null>(null);\n\nconst useComboboxContentContext = () => React.useContext(ComboboxContentContext);\n\n// ============================================================================\n// Root\n// ============================================================================\n\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /** Clear the search text when an option is selected. Defaults to true. */\n resetSearchOnSelect?: boolean;\n /** Clear the search text when the popup is dismissed without a selection. Defaults to true. */\n resetSearchOnClose?: boolean;\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Text shown in the trigger for the selected value. Without it the raw value is shown.\n * Can be a string or a function that receives the current value. Pass a stable\n * function (module scope or `useCallback`): an inline function runs on every render.\n * @example displayValue={(v) => items.find(i => i.value === v)?.label}\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n\nfunction readElementLabel(el: HTMLElement): string | undefined {\n const ariaLabel = el.getAttribute('aria-label')?.trim();\n if (ariaLabel) return ariaLabel;\n\n const labelledBy = el.getAttribute('aria-labelledby');\n if (labelledBy) {\n const text = labelledBy\n .split(/\\s+/)\n .map((id) => el.ownerDocument.getElementById(id)?.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n const labels = (el as HTMLButtonElement).labels;\n if (labels && labels.length > 0) {\n const text = Array.from(labels)\n .map((label) => label.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n return undefined;\n}\n\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size = comboboxRootPropDefs.size.default,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n resetSearchOnClose = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const resolvedDisplayValue = typeof displayValueProp === 'function' ? displayValueProp(value) : displayValueProp;\n\n // Items subscribe to this store instead of the context, so a selection\n // re-renders only the items whose selected state flips.\n const [store] = React.useState(() => createSelectionStore(value));\n useLayoutEffect(() => {\n store.set(value);\n }, [store, value]);\n\n // The radix setters change identity whenever their controlled prop changes.\n // Reading them through callback refs keeps these handlers stable, so the\n // contexts below do not change on every keystroke or selection.\n const handleOpenChange = useCallbackRef((nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen && resetSearchOnClose) setSearchValue('');\n });\n\n const onSelect = useCallbackRef((nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) setSearchValue('');\n });\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const getTriggerLabel = React.useCallback(() => (triggerRef.current ? readElementLabel(triggerRef.current) : undefined), []);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n value,\n displayValue: resolvedDisplayValue,\n setOpen: handleOpenChange,\n size,\n placeholder,\n searchPlaceholder,\n disabled,\n color,\n loop,\n shouldFilter,\n filter,\n triggerRef,\n getTriggerLabel,\n }),\n [value, resolvedDisplayValue, handleOpenChange, size, placeholder, searchPlaceholder, disabled, color, loop, shouldFilter, filter, getTriggerLabel],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(() => ({ value: searchValue, setValue: setSearchValue }), [searchValue, setSearchValue]);\n\n const itemContextValue = React.useMemo<ComboboxItemContextValue>(() => ({ store, onSelect, disabled }), [store, onSelect, disabled]);\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxItemContext.Provider value={itemContextValue}>\n <Popover.Root open={open} onOpenChange={handleOpenChange} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxItemContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\n// ============================================================================\n// Trigger\n// ============================================================================\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, MarginProps, ComboboxTriggerOwnProps {}\n\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Trigger');\n\n const {\n children,\n className,\n placeholder,\n disabled,\n readOnly,\n error,\n loading,\n color,\n radius,\n onClick,\n onKeyDown,\n type: buttonType,\n ...triggerProps\n } = extractProps({ size: ctx.size, ...props }, triggerSizingPropDefs, comboboxTriggerPropDefs, marginPropDefs);\n\n const isDisabled = disabled ?? ctx.disabled;\n const resolvedColor = color ?? ctx.color;\n // Read-only and loading triggers stay focusable but do not open.\n const isBlocked = Boolean(readOnly || loading);\n const isPlaceholder = ctx.value == null && ctx.displayValue == null;\n\n const composedRef = useComposedRefs(forwardedRef, ctx.triggerRef);\n\n const { getTriggerLabel } = ctx;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (!getTriggerLabel()) {\n warnOnce(\n 'Combobox.Trigger has no accessible name. The combobox role does not take its name from its content. Add `aria-label`, `aria-labelledby`, or a `<label htmlFor>` that points at the trigger.',\n );\n }\n }, [getTriggerLabel]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n // Radix skips its open toggle when the event is default-prevented.\n if (isBlocked) event.preventDefault();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isBlocked || isDisabled) return;\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const defaultContent = (\n <>\n <span className=\"rt-SelectTriggerInner\">\n <span className=\"rt-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray=\"32\"\n strokeDashoffset=\"32\"\n className=\"rt-SelectLoadingIconCircle\"\n />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </>\n );\n\n // Radix Popover.Trigger supplies aria-expanded, aria-controls (the popup id) and\n // aria-haspopup=\"dialog\", which matches the Popover dialog this opens.\n return (\n <Popover.Trigger disabled={isDisabled}>\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n data-placeholder={isPlaceholder ? '' : undefined}\n {...triggerProps}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props -- Popover.Trigger (Slot) adds aria-expanded and aria-controls\n role=\"combobox\"\n aria-disabled={isDisabled || undefined}\n aria-readonly={readOnly || undefined}\n aria-invalid={error || undefined}\n aria-busy={loading || undefined}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', 'rt-ComboboxTrigger', className)}\n >\n {children ? requireReactElement(children) : defaultContent}\n </button>\n </Popover.Trigger>\n );\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\n// ============================================================================\n// Value (standalone, for custom trigger layouts)\n// ============================================================================\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const ctx = useComboboxContext('Value');\n const display = ctx.displayValue ?? ctx.value ?? undefined;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('rt-ComboboxValue', className)}>\n {display ?? children ?? placeholder ?? ctx.placeholder}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\n// ============================================================================\n// Content\n// ============================================================================\n\ntype ComboboxContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n\n/** Announces the filtered result count to screen readers after typing settles. */\nfunction ComboboxAnnouncer() {\n const count = useCommandState((state) => state.filtered.count);\n const search = useCommandState((state) => state.search);\n const [message, setMessage] = React.useState('');\n\n React.useEffect(() => {\n const next = !search ? '' : count === 0 ? 'No results' : `${count} result${count === 1 ? '' : 's'}`;\n const timeout = window.setTimeout(() => setMessage(next), search ? 400 : 0);\n return () => window.clearTimeout(timeout);\n }, [count, search]);\n\n return (\n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {message}\n </VisuallyHidden>\n );\n}\n\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Content');\n const themeContext = useThemeContext();\n\n // Menus stop at size 3; a size 4 field opens a size 3 list.\n const rootSize = ctx.size === '4' ? '3' : ctx.size;\n const size = props.size ?? rootSize ?? comboboxContentPropDefs.size.default;\n\n const {\n className,\n children,\n color,\n forceMount,\n container,\n onOpenAutoFocus,\n 'aria-label': _ariaLabel,\n 'aria-labelledby': ariaLabelledByProp,\n ...contentProps\n } = extractProps({ ...props, size }, comboboxContentPropDefs);\n\n const resolvedColor = color || ctx.color || themeContext.accentColor;\n\n\n // The trigger's name labels the popup, the search field and the listbox.\n // Read once per mount (the content remounts on every open); fall back to a\n // layout effect when the trigger was not attached yet (defaultOpen, forceMount).\n const { getTriggerLabel } = ctx;\n const [triggerLabel, setTriggerLabel] = React.useState(getTriggerLabel);\n useLayoutEffect(() => {\n if (triggerLabel !== undefined) return;\n const label = getTriggerLabel();\n if (label !== undefined) setTriggerLabel(label);\n }, [getTriggerLabel, triggerLabel]);\n\n const label = props['aria-label'] ?? triggerLabel;\n\n const contentContextValue = React.useMemo<ComboboxContentContextValue>(\n () => ({\n // Responsive-aware size class for the search field (never String() a responsive object).\n sizeClassName: extractProps({ size }, contentSizePropDefs).className || undefined,\n color: resolvedColor,\n label,\n }),\n [size, resolvedColor, label],\n );\n\n const commandRef = React.useRef<HTMLDivElement>(null);\n\n // Without a search field, focus would land on the popup itself, outside cmdk's\n // keydown handler. Focus the listbox instead so arrow keys and Enter work.\n const handleOpenAutoFocus = (event: Event) => {\n onOpenAutoFocus?.(event);\n if (event.defaultPrevented) return;\n const command = commandRef.current;\n if (!command || command.querySelector('[cmdk-input]')) return;\n event.preventDefault();\n const list = command.querySelector<HTMLElement>('[cmdk-list]');\n (list ?? command).focus({ preventScroll: true });\n };\n\n // Start the highlight on the selected option (cmdk trims item values).\n const initialHighlight = ctx.value?.trim() || undefined;\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount ? true : undefined}>\n <Theme asChild>\n <PopoverPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n aria-label={ariaLabelledByProp ? undefined : label}\n aria-labelledby={ariaLabelledByProp}\n {...contentProps}\n forceMount={forceMount ? true : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-BaseMenuContent',\n 'rt-variant-soft', 'rt-ComboboxContent', className)}\n >\n <ComboboxContentContext.Provider value={contentContextValue}>\n <CommandPrimitive\n ref={commandRef}\n loop={ctx.loop}\n shouldFilter={ctx.shouldFilter}\n filter={ctx.filter}\n label={label}\n defaultValue={initialHighlight}\n className=\"rt-ComboboxCommand\"\n >\n {children}\n <ComboboxAnnouncer />\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\n// ============================================================================\n// Input\n// ============================================================================\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(\n ({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const ctx = useComboboxContext('Input');\n const search = React.useContext(ComboboxSearchContext);\n const contentContext = useComboboxContentContext();\n\n const textFieldVariant = inputVariant ?? 'soft';\n\n // The search text lives in Root; only this component subscribes to it.\n const searchValue = value ?? search?.value ?? '';\n const handleSearchChange = onValueChange ?? search?.setValue;\n\n const inputField = (\n <div\n className={classNames('rt-TextFieldRoot', 'rt-ComboboxInputRoot', contentContext?.sizeClassName, `rt-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"rt-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? ctx.searchPlaceholder}\n className={classNames('rt-reset', 'rt-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"rt-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"rt-ComboboxSearch\">{inputField}</div> : inputField;\n },\n);\nComboboxInput.displayName = 'Combobox.Input';\n\n// ============================================================================\n// List\n// ============================================================================\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n\n// cmdk's List owns its id (referenced by the input's aria-controls), role and\n// aria-label (set from `label`), so none of them are overridden here.\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, children, label, ...listProps }, forwardedRef) => {\n const contentContext = useComboboxContentContext();\n return (\n <div className=\"rt-ComboboxScrollArea\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('rt-ComboboxList', className)}>\n {children}\n </CommandPrimitive.List>\n </div>\n </div>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\n// ============================================================================\n// Empty\n// ============================================================================\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('rt-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\n// ============================================================================\n// Group\n// ============================================================================\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\n// ============================================================================\n// Label\n// ============================================================================\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, id: idProp, ...labelProps }, forwardedRef) => {\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n const localRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, localRef);\n\n // cmdk renders the group's role=\"group\" element itself and gives no way to\n // label it from a child, so name it after this label when inside a Group.\n useLayoutEffect(() => {\n const group = localRef.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n\n return <div {...labelProps} id={id} ref={composedRef} className={classNames('rt-BaseMenuLabel', 'rt-ComboboxLabel', className)} />;\n});\nComboboxLabel.displayName = 'Combobox.Label';\n\n// ============================================================================\n// Separator\n// ============================================================================\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('rt-BaseMenuSeparator', 'rt-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\n// ============================================================================\n// Item\n// ============================================================================\n\n/** Plain text of a React node tree, used as the item's search text. */\nfunction getNodeText(node: React.ReactNode): string {\n if (node == null || typeof node === 'boolean') return '';\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n}\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords' | 'onSelect'> {\n /**\n * Text matched by search. Defaults to the text of `children`. Set it when the\n * children are components whose text is not in the JSX (it cannot be read).\n */\n label?: string;\n /** Additional keywords for search filtering. */\n keywords?: string[];\n /** Called when the item is selected. */\n onSelect?: (value: string) => void;\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(\n ({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const itemContext = React.useContext(ComboboxItemContext);\n if (!itemContext) {\n throw new Error('Combobox.Item must be used within Combobox.Root');\n }\n const { store, onSelect: onSelectFromRoot, disabled: rootDisabled } = itemContext;\n\n // Without `value`, cmdk uses the trimmed text of string children.\n const itemValue = value ?? (typeof children === 'string' ? children.trim() : undefined);\n const getIsSelected = () => itemValue !== undefined && store.get() === itemValue;\n const isSelected = React.useSyncExternalStore(store.subscribe, getIsSelected, getIsSelected);\n\n const onSelectProp = useCallbackRef(onSelect);\n // cmdk passes its resolved value (the `value` prop, or the text when `value` is omitted).\n const handleSelect = React.useCallback(\n (resolvedValue: string) => {\n const nextValue = value ?? resolvedValue;\n onSelectFromRoot(nextValue);\n onSelectProp(nextValue);\n },\n [value, onSelectFromRoot, onSelectProp],\n );\n\n // cmdk matches only `value` and `keywords`, so add the visible text as a keyword.\n const text = (label ?? getNodeText(children)).replace(/\\s+/g, ' ').trim();\n const searchKeywords = text ? (keywords ? [text, ...keywords] : [text]) : keywords;\n // cmdk stores keywords only when `value` changes. Remount the cmdk item when\n // they change so a new label or keyword list is picked up.\n const keywordsKey = searchKeywords ? searchKeywords.join('\u0000') : '';\n\n const isDisabled = disabled ?? rootDisabled ?? false;\n\n return (\n <CommandPrimitive.Item\n key={keywordsKey}\n {...itemProps}\n value={value}\n keywords={searchKeywords}\n // cmdk owns aria-selected (the highlighted option); the chosen option is aria-checked.\n aria-checked={isSelected}\n disabled={isDisabled || undefined}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('rt-BaseMenuItemIndicator', 'rt-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('rt-BaseMenuItemIndicatorIcon', 'rt-ComboboxItemIndicatorIcon')} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n },\n);\nComboboxItem.displayName = 'Combobox.Item';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\n\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\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", "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 } 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. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\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\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\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 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 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 { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Shared responsive sizing inherited by Combobox.Root.\n */\nconst comboboxRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\n/**\n * Token-aware props specific to Combobox.Trigger.\n */\nconst comboboxTriggerPropDefs = {\n variant: { type: 'enum', className: 'rt-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n width: widthPropDefs.width,\n placeholder: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n width: PropDef<string>;\n placeholder: PropDef<string>;\n};\n\n// The list is a menu, and menus stop at size 3.\nconst contentSizes = ['1', '2', '3'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: contentSizes, default: '2', responsive: true },\n ...colorPropDef,\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\nexport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs };\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 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", "'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 { 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 ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n radius: ThemeRadius;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\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 radius: themePropDefs.radius.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onRadiusChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: 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 // Direction is inherited: a Radix DirectionProvider above the Theme (for a right-to-left app)\n // wins, and left-to-right stays the default when there is none.\n const dir = Direction.useDirection();\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir={dir}>\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 radius: radiusProp = themePropDefs.radius.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\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 const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\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 radius={radius}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onRadiusChange={setRadius}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\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 radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onRadiusChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = 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 radius,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\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-radius={radius}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\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 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 { 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 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: 'gray' },\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: 'gray' },\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: 'full' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\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 radius: PropDef<(typeof radii)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\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 { 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';\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 {\n className,\n forceMount,\n container,\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 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 { 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;\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 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};\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 { 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", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n"],
5
- "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,UAAAC,GAAA,UAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,YAAAC,GAAA,UAAAC,KAAA,eAAAC,GAAAb,IAoBA,IAAAc,EAAuB,oBACvBC,EAAuB,yBACvBC,GAA4C,oBAC5CC,EAAuF,6BACvFC,EAA6D,gBCxB7D,IAAAC,GAAuB,yBC0CvB,IAAMC,GAAkC,CAAC,EACnCC,GAAiC,IAAI,IAE3C,SAASC,GAAQC,EAAgE,CAC/E,IAAMC,EAAkC,OAAO,OAAO,CAAC,EAAG,GAAGD,CAAQ,EAC/DE,EAA6B,CAAC,EAC9BC,EAAiC,CAAC,EAClCC,EAAc,IAAI,IAExB,QAAWC,KAAOJ,EAAQ,CAGxB,IAAMK,EAAML,EAAOI,CAAG,EAShBE,EAASD,EAAI,QAAUT,GACvBW,EAA4B,CAChC,IAAAH,EACA,KAAMC,EAAI,KACV,QAASA,EAAI,QACb,WAAYA,EAAI,UAAY,OAC5B,WAAY,eAAgBA,EAC5B,UAAWA,EAA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BAA8B,EAAG,CACzG,EACE,KACJ,gBAACwE,GAAA,KAAWzI,CAAS,CACvB,CAEJ,CACF,EACA0H,GAAa,YAAc",
6
- "names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_internal", "import_cmdk", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "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", "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", "accentColors", "grayColors", "colorPropDef", "radii", "radiusPropDef", "widthPropDefs", "heightPropDefs", "sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "asChildPropDef", "appearances", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "context", "dir", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "radiusProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "radius", "setRadius", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onRadiusChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "contentSizes", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "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", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "import_radix_ui", "VisuallyHidden", "VisuallyHiddenPrimitive", "Root", "triggerSizingPropDefs", "comboboxRootPropDefs", "contentSizePropDefs", "comboboxContentPropDefs", "warned", "warnOnce", "message", "createSelectionStore", "initial", "current", "listeners", "next", "listener", "ComboboxContext", "useComboboxContext", "componentName", "ctx", "ComboboxSearchContext", "ComboboxItemContext", "ComboboxContentContext", "useComboboxContentContext", "readElementLabel", "el", "ariaLabel", "labelledBy", "text", "id", "labels", "label", "ComboboxRoot", "props", "children", "size", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "resetSearchOnClose", "color", "displayValueProp", "rootProps", "open", "setOpen", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "handleOpenChange", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "marginPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "handleClick", "event", "handleKeyDown", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "rootSize", "forceMount", "container", "onOpenAutoFocus", "_ariaLabel", "ariaLabelledByProp", "contentProps", "triggerLabel", "setTriggerLabel", "contentContextValue", "commandRef", "handleOpenAutoFocus", "command", "initialHighlight", "PopoverPrimitive", "Theme", "CommandPrimitive", "ComboboxInput", "startAdornment", "endAdornment", "inputVariant", "inputProps", "contentContext", "textFieldVariant", "handleSearchChange", "inputField", "ComboboxList", "listProps", "ComboboxEmpty", "emptyProps", "ComboboxGroup", "groupProps", "ComboboxLabel", "idProp", "labelProps", "generatedId", "localRef", "group", "ComboboxSeparator", "separatorProps", "getNodeText", "node", "ComboboxItem", "keywords", "itemProps", "itemContext", "onSelectFromRoot", "rootDisabled", "itemValue", "getIsSelected", "isSelected", "onSelectProp", "handleSelect", "resolvedValue", "searchKeywords", "keywordsKey", "ThickCheckIcon", "Slottable"]
3
+ "sources": ["../../../src/components/combobox.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.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/helpers/theme-size.ts", "../../../src/props/color.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/props/width.props.ts", "../../../src/props/height.props.ts", "../../../src/components/combobox.props.tsx", "../../../src/props/margin.props.ts", "../../../src/components/icons.tsx", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/props/as-child.prop.ts", "../../../src/components/theme.props.tsx", "../../../src/helpers/require-react-element.ts", "../../../src/components/popover.tsx", "../../../src/components/popover.props.tsx", "../../../src/components/slot.tsx", "../../../src/components/visually-hidden.tsx"],
4
+ "sourcesContent": ["'use client';\n\n/**\n * Combobox: Radix Popover for positioning, dismissal and focus; cmdk for search,\n * filtering and keyboard navigation.\n *\n * Render path. State is split so an interaction re-renders only what reads it:\n * - `ComboboxContext` (Trigger, Value, Content): config and the selected value.\n * Open state is not in it, so opening and closing re-render no consumer.\n * - `ComboboxSearchContext` (Input only): the search text.\n * - `ComboboxItemContext` (Items): stable values only. Items read \"am I selected\"\n * from a store through `useSyncExternalStore`, so a selection re-renders the old\n * and the new selected item, not all N.\n *\n * Highlight. cmdk's `data-selected` is the single highlight source, driven by both\n * the pointer and the keyboard. There is no separate CSS `:hover` highlight, so two\n * items are never lit at once and Enter always picks the lit item.\n */\n\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { useCallbackRef, useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../helpers/theme-size.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { Slottable } from './slot.js';\nimport { VisuallyHidden } from './visually-hidden.js';\n\nimport type { textFieldRootPropDefs } from './text-field.props.js';\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 TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n// Hoisted so extractProps' compiled prop-def cache (keyed by object identity) hits.\nconst triggerSizingPropDefs = { size: comboboxRootPropDefs.size };\nconst contentSizePropDefs = { size: comboboxContentPropDefs.size };\n\nconst warned = new Set<string>();\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n// ============================================================================\n// Selection store\n// ============================================================================\n\ninterface SelectionStore {\n get: () => ComboboxValue;\n set: (value: ComboboxValue) => void;\n subscribe: (listener: () => void) => () => void;\n}\n\nfunction createSelectionStore(initial: ComboboxValue): SelectionStore {\n let current = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => current,\n set: (next) => {\n if (Object.is(next, current)) return;\n current = next;\n listeners.forEach((listener) => listener());\n },\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\n// ============================================================================\n// Contexts\n// ============================================================================\n\ninterface ComboboxContextValue {\n value: ComboboxValue;\n displayValue?: string;\n setOpen: (open: boolean) => void;\n size?: ComboboxRootOwnProps['size'];\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n color?: string;\n loop: boolean;\n shouldFilter: boolean;\n filter?: CommandFilter;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n /** Reads the trigger's accessible name from the DOM (aria-label, aria-labelledby or <label>). */\n getTriggerLabel: () => string | undefined;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\nconst useComboboxContext = (componentName: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`Combobox.${componentName} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\ninterface ComboboxSearchContextValue {\n value: string;\n setValue: (value: string) => void;\n}\n\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\n\ninterface ComboboxItemContextValue {\n store: SelectionStore;\n onSelect: (value: string) => void;\n disabled?: boolean;\n}\n\nconst ComboboxItemContext = React.createContext<ComboboxItemContextValue | null>(null);\n\n/** Values resolved by Content and read by Input and List. */\ninterface ComboboxContentContextValue {\n sizeClassName?: string;\n color?: string;\n label?: string;\n}\n\nconst ComboboxContentContext = React.createContext<ComboboxContentContextValue | null>(null);\n\nconst useComboboxContentContext = () => React.useContext(ComboboxContentContext);\n\n// ============================================================================\n// Root\n// ============================================================================\n\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /** Clear the search text when an option is selected. Defaults to true. */\n resetSearchOnSelect?: boolean;\n /** Clear the search text when the popup is dismissed without a selection. Defaults to true. */\n resetSearchOnClose?: boolean;\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Text shown in the trigger for the selected value. Without it the raw value is shown.\n * Can be a string or a function that receives the current value. Pass a stable\n * function (module scope or `useCallback`): an inline function runs on every render.\n * @example displayValue={(v) => items.find(i => i.value === v)?.label}\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n\nfunction readElementLabel(el: HTMLElement): string | undefined {\n const ariaLabel = el.getAttribute('aria-label')?.trim();\n if (ariaLabel) return ariaLabel;\n\n const labelledBy = el.getAttribute('aria-labelledby');\n if (labelledBy) {\n const text = labelledBy\n .split(/\\s+/)\n .map((id) => el.ownerDocument.getElementById(id)?.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n const labels = (el as HTMLButtonElement).labels;\n if (labels && labels.length > 0) {\n const text = Array.from(labels)\n .map((label) => label.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n return undefined;\n}\n\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n resetSearchOnClose = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, comboboxRootPropDefs.size);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const resolvedDisplayValue = typeof displayValueProp === 'function' ? displayValueProp(value) : displayValueProp;\n\n // Items subscribe to this store instead of the context, so a selection\n // re-renders only the items whose selected state flips.\n const [store] = React.useState(() => createSelectionStore(value));\n useLayoutEffect(() => {\n store.set(value);\n }, [store, value]);\n\n // The radix setters change identity whenever their controlled prop changes.\n // Reading them through callback refs keeps these handlers stable, so the\n // contexts below do not change on every keystroke or selection.\n const handleOpenChange = useCallbackRef((nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen && resetSearchOnClose) setSearchValue('');\n });\n\n const onSelect = useCallbackRef((nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) setSearchValue('');\n });\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const getTriggerLabel = React.useCallback(() => (triggerRef.current ? readElementLabel(triggerRef.current) : undefined), []);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n value,\n displayValue: resolvedDisplayValue,\n setOpen: handleOpenChange,\n size,\n placeholder,\n searchPlaceholder,\n disabled,\n color,\n loop,\n shouldFilter,\n filter,\n triggerRef,\n getTriggerLabel,\n }),\n [value, resolvedDisplayValue, handleOpenChange, size, placeholder, searchPlaceholder, disabled, color, loop, shouldFilter, filter, getTriggerLabel],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(() => ({ value: searchValue, setValue: setSearchValue }), [searchValue, setSearchValue]);\n\n const itemContextValue = React.useMemo<ComboboxItemContextValue>(() => ({ store, onSelect, disabled }), [store, onSelect, disabled]);\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxItemContext.Provider value={itemContextValue}>\n <Popover.Root open={open} onOpenChange={handleOpenChange} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxItemContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\n// ============================================================================\n// Trigger\n// ============================================================================\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, MarginProps, ComboboxTriggerOwnProps {}\n\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Trigger');\n\n const {\n children,\n className,\n placeholder,\n disabled,\n readOnly,\n error,\n loading,\n color,\n radius,\n onClick,\n onKeyDown,\n type: buttonType,\n ...triggerProps\n } = extractProps({ size: ctx.size, ...props }, triggerSizingPropDefs, comboboxTriggerPropDefs, marginPropDefs);\n\n const isDisabled = disabled ?? ctx.disabled;\n const resolvedColor = color ?? ctx.color;\n // Read-only and loading triggers stay focusable but do not open.\n const isBlocked = Boolean(readOnly || loading);\n const isPlaceholder = ctx.value == null && ctx.displayValue == null;\n\n const composedRef = useComposedRefs(forwardedRef, ctx.triggerRef);\n\n const { getTriggerLabel } = ctx;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (!getTriggerLabel()) {\n warnOnce(\n 'Combobox.Trigger has no accessible name. The combobox role does not take its name from its content. Add `aria-label`, `aria-labelledby`, or a `<label htmlFor>` that points at the trigger.',\n );\n }\n }, [getTriggerLabel]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n // Radix skips its open toggle when the event is default-prevented.\n if (isBlocked) event.preventDefault();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isBlocked || isDisabled) return;\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const defaultContent = (\n <>\n <span className=\"rt-SelectTriggerInner\">\n <span className=\"rt-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray=\"32\"\n strokeDashoffset=\"32\"\n className=\"rt-SelectLoadingIconCircle\"\n />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </>\n );\n\n // Radix Popover.Trigger supplies aria-expanded, aria-controls (the popup id) and\n // aria-haspopup=\"dialog\", which matches the Popover dialog this opens.\n return (\n <Popover.Trigger disabled={isDisabled}>\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n data-placeholder={isPlaceholder ? '' : undefined}\n {...triggerProps}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props -- Popover.Trigger (Slot) adds aria-expanded and aria-controls\n role=\"combobox\"\n aria-disabled={isDisabled || undefined}\n aria-readonly={readOnly || undefined}\n aria-invalid={error || undefined}\n aria-busy={loading || undefined}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', 'rt-ComboboxTrigger', className)}\n >\n {children ? requireReactElement(children) : defaultContent}\n </button>\n </Popover.Trigger>\n );\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\n// ============================================================================\n// Value (standalone, for custom trigger layouts)\n// ============================================================================\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const ctx = useComboboxContext('Value');\n const display = ctx.displayValue ?? ctx.value ?? undefined;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('rt-ComboboxValue', className)}>\n {display ?? children ?? placeholder ?? ctx.placeholder}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\n// ============================================================================\n// Content\n// ============================================================================\n\ntype ComboboxContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n\n/** Announces the filtered result count to screen readers after typing settles. */\nfunction ComboboxAnnouncer() {\n const count = useCommandState((state) => state.filtered.count);\n const search = useCommandState((state) => state.search);\n const [message, setMessage] = React.useState('');\n\n React.useEffect(() => {\n const next = !search ? '' : count === 0 ? 'No results' : `${count} result${count === 1 ? '' : 's'}`;\n const timeout = window.setTimeout(() => setMessage(next), search ? 400 : 0);\n return () => window.clearTimeout(timeout);\n }, [count, search]);\n\n return (\n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {message}\n </VisuallyHidden>\n );\n}\n\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Content');\n const themeContext = useThemeContext();\n\n // Menus stop at size 3; a size 4 field opens a size 3 list.\n const rootSize = ctx.size === '4' ? '3' : ctx.size;\n const size = props.size ?? rootSize ?? comboboxContentPropDefs.size.default;\n\n const {\n className,\n children,\n color,\n forceMount,\n container,\n onOpenAutoFocus,\n 'aria-label': _ariaLabel,\n 'aria-labelledby': ariaLabelledByProp,\n ...contentProps\n } = extractProps({ ...props, size }, comboboxContentPropDefs);\n\n const resolvedColor = color || ctx.color || themeContext.accentColor;\n\n\n // The trigger's name labels the popup, the search field and the listbox.\n // Read once per mount (the content remounts on every open); fall back to a\n // layout effect when the trigger was not attached yet (defaultOpen, forceMount).\n const { getTriggerLabel } = ctx;\n const [triggerLabel, setTriggerLabel] = React.useState(getTriggerLabel);\n useLayoutEffect(() => {\n if (triggerLabel !== undefined) return;\n const label = getTriggerLabel();\n if (label !== undefined) setTriggerLabel(label);\n }, [getTriggerLabel, triggerLabel]);\n\n const label = props['aria-label'] ?? triggerLabel;\n\n const contentContextValue = React.useMemo<ComboboxContentContextValue>(\n () => ({\n // Responsive-aware size class for the search field (never String() a responsive object).\n sizeClassName: extractProps({ size }, contentSizePropDefs).className || undefined,\n color: resolvedColor,\n label,\n }),\n [size, resolvedColor, label],\n );\n\n const commandRef = React.useRef<HTMLDivElement>(null);\n\n // Without a search field, focus would land on the popup itself, outside cmdk's\n // keydown handler. Focus the listbox instead so arrow keys and Enter work.\n const handleOpenAutoFocus = (event: Event) => {\n onOpenAutoFocus?.(event);\n if (event.defaultPrevented) return;\n const command = commandRef.current;\n if (!command || command.querySelector('[cmdk-input]')) return;\n event.preventDefault();\n const list = command.querySelector<HTMLElement>('[cmdk-list]');\n (list ?? command).focus({ preventScroll: true });\n };\n\n // Start the highlight on the selected option (cmdk trims item values).\n const initialHighlight = ctx.value?.trim() || undefined;\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount ? true : undefined}>\n <Theme asChild>\n <PopoverPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n aria-label={ariaLabelledByProp ? undefined : label}\n aria-labelledby={ariaLabelledByProp}\n {...contentProps}\n forceMount={forceMount ? true : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-BaseMenuContent',\n 'rt-variant-soft', 'rt-ComboboxContent', className)}\n >\n <ComboboxContentContext.Provider value={contentContextValue}>\n <CommandPrimitive\n ref={commandRef}\n loop={ctx.loop}\n shouldFilter={ctx.shouldFilter}\n filter={ctx.filter}\n label={label}\n defaultValue={initialHighlight}\n className=\"rt-ComboboxCommand\"\n >\n {children}\n <ComboboxAnnouncer />\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\n// ============================================================================\n// Input\n// ============================================================================\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(\n ({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const ctx = useComboboxContext('Input');\n const search = React.useContext(ComboboxSearchContext);\n const contentContext = useComboboxContentContext();\n\n const textFieldVariant = inputVariant ?? 'soft';\n\n // The search text lives in Root; only this component subscribes to it.\n const searchValue = value ?? search?.value ?? '';\n const handleSearchChange = onValueChange ?? search?.setValue;\n\n const inputField = (\n <div\n className={classNames('rt-TextFieldRoot', 'rt-ComboboxInputRoot', contentContext?.sizeClassName, `rt-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"rt-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? ctx.searchPlaceholder}\n className={classNames('rt-reset', 'rt-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"rt-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"rt-ComboboxSearch\">{inputField}</div> : inputField;\n },\n);\nComboboxInput.displayName = 'Combobox.Input';\n\n// ============================================================================\n// List\n// ============================================================================\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n\n// cmdk's List owns its id (referenced by the input's aria-controls), role and\n// aria-label (set from `label`), so none of them are overridden here.\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, children, label, ...listProps }, forwardedRef) => {\n const contentContext = useComboboxContentContext();\n return (\n <div className=\"rt-ComboboxScrollArea\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('rt-ComboboxList', className)}>\n {children}\n </CommandPrimitive.List>\n </div>\n </div>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\n// ============================================================================\n// Empty\n// ============================================================================\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('rt-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\n// ============================================================================\n// Group\n// ============================================================================\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\n// ============================================================================\n// Label\n// ============================================================================\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, id: idProp, ...labelProps }, forwardedRef) => {\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n const localRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, localRef);\n\n // cmdk renders the group's role=\"group\" element itself and gives no way to\n // label it from a child, so name it after this label when inside a Group.\n useLayoutEffect(() => {\n const group = localRef.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n\n return <div {...labelProps} id={id} ref={composedRef} className={classNames('rt-BaseMenuLabel', 'rt-ComboboxLabel', className)} />;\n});\nComboboxLabel.displayName = 'Combobox.Label';\n\n// ============================================================================\n// Separator\n// ============================================================================\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('rt-BaseMenuSeparator', 'rt-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\n// ============================================================================\n// Item\n// ============================================================================\n\n/** Plain text of a React node tree, used as the item's search text. */\nfunction getNodeText(node: React.ReactNode): string {\n if (node == null || typeof node === 'boolean') return '';\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n}\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords' | 'onSelect'> {\n /**\n * Text matched by search. Defaults to the text of `children`. Set it when the\n * children are components whose text is not in the JSX (it cannot be read).\n */\n label?: string;\n /** Additional keywords for search filtering. */\n keywords?: string[];\n /** Called when the item is selected. */\n onSelect?: (value: string) => void;\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(\n ({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const itemContext = React.useContext(ComboboxItemContext);\n if (!itemContext) {\n throw new Error('Combobox.Item must be used within Combobox.Root');\n }\n const { store, onSelect: onSelectFromRoot, disabled: rootDisabled } = itemContext;\n\n // Without `value`, cmdk uses the trimmed text of string children.\n const itemValue = value ?? (typeof children === 'string' ? children.trim() : undefined);\n const getIsSelected = () => itemValue !== undefined && store.get() === itemValue;\n const isSelected = React.useSyncExternalStore(store.subscribe, getIsSelected, getIsSelected);\n\n const onSelectProp = useCallbackRef(onSelect);\n // cmdk passes its resolved value (the `value` prop, or the text when `value` is omitted).\n const handleSelect = React.useCallback(\n (resolvedValue: string) => {\n const nextValue = value ?? resolvedValue;\n onSelectFromRoot(nextValue);\n onSelectProp(nextValue);\n },\n [value, onSelectFromRoot, onSelectProp],\n );\n\n // cmdk matches only `value` and `keywords`, so add the visible text as a keyword.\n const text = (label ?? getNodeText(children)).replace(/\\s+/g, ' ').trim();\n const searchKeywords = text ? (keywords ? [text, ...keywords] : [text]) : keywords;\n // cmdk stores keywords only when `value` changes. Remount the cmdk item when\n // they change so a new label or keyword list is picked up.\n const keywordsKey = searchKeywords ? searchKeywords.join('\u0000') : '';\n\n const isDisabled = disabled ?? rootDisabled ?? false;\n\n return (\n <CommandPrimitive.Item\n key={keywordsKey}\n {...itemProps}\n value={value}\n keywords={searchKeywords}\n // cmdk owns aria-selected (the highlighted option); the chosen option is aria-checked.\n aria-checked={isSelected}\n disabled={isDisabled || undefined}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('rt-BaseMenuItemIndicator', 'rt-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('rt-BaseMenuItemIndicatorIcon', 'rt-ComboboxItemIndicatorIcon')} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n },\n);\nComboboxItem.displayName = 'Combobox.Item';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\n\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\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", "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", "'use client';\n\nimport * as React from 'react';\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\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. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\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\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\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 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 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 { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Shared responsive sizing inherited by Combobox.Root.\n */\nconst comboboxRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\n/**\n * Token-aware props specific to Combobox.Trigger.\n */\nconst comboboxTriggerPropDefs = {\n variant: { type: 'enum', className: 'rt-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n width: widthPropDefs.width,\n placeholder: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n width: PropDef<string>;\n placeholder: PropDef<string>;\n};\n\n// The list is a menu, and menus stop at size 3.\nconst contentSizes = ['1', '2', '3'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: contentSizes, default: '2', responsive: true },\n ...colorPropDef,\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\nexport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs };\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 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", "'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 { ThemeSizeContext } from '../helpers/theme-size.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.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 ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\ntype ThemeSize = (typeof themePropDefs.size.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n onSizeChange: (size: ThemeSize) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n radius: ThemeRadius;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n size: ThemeSize;\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 radius: themePropDefs.radius.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n size: themePropDefs.size.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onRadiusChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n onSizeChange: 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 // Direction is inherited: a Radix DirectionProvider above the Theme (for a right-to-left app)\n // wins, and left-to-right stays the default when there is none.\n const dir = Direction.useDirection();\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir={dir}>\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>((props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n radius: radiusProp = themePropDefs.radius.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n size: sizeProp = themePropDefs.size.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\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 const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n const [size, setSize] = usePropSyncedState(sizeProp);\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 radius={radius}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n size={size}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onRadiusChange={setRadius}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n onSizeChange={setSize}\n />\n );\n});\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps extends ComponentPropsWithout<'div', RemovedProps | 'dir'>, 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 radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n size = props.size ?? context?.size ?? themePropDefs.size.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onRadiusChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n onSizeChange = 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 = 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 radius,\n fontFamily,\n headingFontFamily,\n size,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n onSizeChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n size,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n onSizeChange,\n ],\n )}\n >\n {/* Size travels on its own context as a bare string, so the components\n that read it do not re-render when another theme value changes. */}\n <ThemeSizeContext.Provider value={size}>\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-radius={radius}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\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 </ThemeSizeContext.Provider>\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 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 { 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 fontFamilies = ['sans', 'mono', 'serif'] as const;\nconst sizes = ['1', '2', '3', '4'] 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: 'gray' },\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: 'gray' },\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: 'full' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n /**\n * The app-wide size index. Every component on the 1-4 control and surface\n * scale that states no `size` of its own takes this one; an explicit\n * `size` always wins. Nested Themes override it for their subtree.\n *\n * @default '2'\n */\n size: { type: 'enum', values: sizes, default: '2' },\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 radius: PropDef<(typeof radii)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\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 { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } 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 (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, popoverContentPropDefs.size);\n const {\n className,\n forceMount,\n container,\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 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 { 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;\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 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};\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 { 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", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n"],
5
+ "mappings": "2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,UAAAC,GAAA,UAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,YAAAC,GAAA,UAAAC,KAAA,eAAAC,GAAAb,IAoBA,IAAAc,EAAuB,oBACvBC,EAAuB,yBACvBC,GAA4C,oBAC5CC,EAAuF,6BACvFC,EAA6D,gBCxB7D,IAAAC,GAAuB,yBC0CvB,IAAMC,GAAkC,CAAC,EACnCC,GAAiC,IAAI,IAE3C,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GmI,CAAQ,EAAI,CAACnI,CAAI,EAAKmI,EAGpEY,EAAcD,EAAiBA,EAAe,KAAK,IAAG,EAAI,GAE1DhF,EAAaxC,GAAYiH,GAAgB,GAE/C,OACE,gBAAC,EAAA/B,QAAiB,KAAjB,CACC,IAAKuC,EACJ,GAAGX,EACJ,MAAOpG,EACP,SAAU8G,EAEV,eAAcJ,EACd,SAAU5E,GAAc,OACxB,IAAKb,EACL,SAAU2F,EACV,aAAW,EAAAnE,SAAW,WAAY,kBAAmB,kBAAmBvB,CAAS,GAEhFwF,EACC,gBAAC,QAAK,aAAW,EAAAjE,SAAW,2BAA4B,0BAA0B,GAChF,gBAACuE,GAAA,CAAe,aAAW,EAAAvE,SAAW,+BAAgC,8BAA8B,EAAG,CACzG,EACE,KACJ,gBAACwE,GAAA,KAAW3I,CAAS,CACvB,CAEJ,CACF,EACA4H,GAAa,YAAc",
6
+ "names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_internal", "import_cmdk", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "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", "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", "THEME_SIZE_DEFAULT", "ThemeSizeContext", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "useThemeSize", "explicit", "propDef", "themeSize", "useThemeSizeProps", "props", "accentColors", "grayColors", "colorPropDef", "radii", "radiusPropDef", "widthPropDefs", "heightPropDefs", "sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "asChildPropDef", "appearances", "fontFamilies", "sizes", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "context", "dir", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "radiusProp", "fontFamilyProp", "headingFontFamilyProp", "sizeProp", "hasBackground", "rootProps", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "radius", "setRadius", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "size", "setSize", "getClientOS", "ua", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onRadiusChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "onSizeChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "ThemeSizeContext", "classNames", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "contentSizes", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "ownProps", "useThemeSizeProps", "popoverContentPropDefs", "className", "forceMount", "container", "contentProps", "extractProps", "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", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "import_radix_ui", "VisuallyHidden", "VisuallyHiddenPrimitive", "Root", "triggerSizingPropDefs", "comboboxRootPropDefs", "contentSizePropDefs", "comboboxContentPropDefs", "warned", "warnOnce", "message", "createSelectionStore", "initial", "current", "listeners", "next", "listener", "ComboboxContext", "useComboboxContext", "componentName", "ctx", "ComboboxSearchContext", "ComboboxItemContext", "ComboboxContentContext", "useComboboxContentContext", "readElementLabel", "el", "ariaLabel", "labelledBy", "text", "id", "labels", "label", "ComboboxRoot", "props", "children", "sizeProp", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "resetSearchOnClose", "color", "displayValueProp", "rootProps", "size", "useThemeSize", "open", "setOpen", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "handleOpenChange", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "marginPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "handleClick", "event", "handleKeyDown", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "rootSize", "forceMount", "container", "onOpenAutoFocus", "_ariaLabel", "ariaLabelledByProp", "contentProps", "triggerLabel", "setTriggerLabel", "contentContextValue", "commandRef", "handleOpenAutoFocus", "command", "initialHighlight", "PopoverPrimitive", "Theme", "CommandPrimitive", "ComboboxInput", "startAdornment", "endAdornment", "inputVariant", "inputProps", "contentContext", "textFieldVariant", "handleSearchChange", "inputField", "ComboboxList", "listProps", "ComboboxEmpty", "emptyProps", "ComboboxGroup", "groupProps", "ComboboxLabel", "idProp", "labelProps", "generatedId", "localRef", "group", "ComboboxSeparator", "separatorProps", "getNodeText", "node", "ComboboxItem", "keywords", "itemProps", "itemContext", "onSelectFromRoot", "rootDisabled", "itemValue", "getIsSelected", "isSelected", "onSelectProp", "handleSelect", "resolvedValue", "searchKeywords", "keywordsKey", "ThickCheckIcon", "Slottable"]
7
7
  }