@womp/kookie-ui 0.26.2 → 0.27.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 (340) hide show
  1. package/components.css +165 -4
  2. package/dist/cjs/components/_internal/base-button.js +1 -1
  3. package/dist/cjs/components/_internal/base-button.js.map +2 -2
  4. package/dist/cjs/components/_internal/pane-band-context.d.ts +4 -3
  5. package/dist/cjs/components/_internal/pane-band-context.d.ts.map +1 -1
  6. package/dist/cjs/components/_internal/pane-band-context.js.map +2 -2
  7. package/dist/cjs/components/_internal/pane-chrome.d.ts +7 -1
  8. package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
  9. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  10. package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
  11. package/dist/cjs/components/_internal/portal-theme.d.ts +9 -0
  12. package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -0
  13. package/dist/cjs/components/_internal/portal-theme.js +3 -0
  14. package/dist/cjs/components/_internal/portal-theme.js.map +7 -0
  15. package/dist/cjs/components/_internal/shell-page-scroll.d.ts +15 -0
  16. package/dist/cjs/components/_internal/shell-page-scroll.d.ts.map +1 -0
  17. package/dist/cjs/components/_internal/shell-page-scroll.js +3 -0
  18. package/dist/cjs/components/_internal/shell-page-scroll.js.map +7 -0
  19. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  20. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  21. package/dist/cjs/components/alert-dialog.js +1 -1
  22. package/dist/cjs/components/alert-dialog.js.map +4 -4
  23. package/dist/cjs/components/button.js +1 -1
  24. package/dist/cjs/components/button.js.map +4 -4
  25. package/dist/cjs/components/chatbar.js +1 -1
  26. package/dist/cjs/components/chatbar.js.map +4 -4
  27. package/dist/cjs/components/chip.js +1 -1
  28. package/dist/cjs/components/chip.js.map +4 -4
  29. package/dist/cjs/components/combobox.d.ts.map +1 -1
  30. package/dist/cjs/components/combobox.js +1 -1
  31. package/dist/cjs/components/combobox.js.map +4 -4
  32. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  33. package/dist/cjs/components/context-menu.js +1 -1
  34. package/dist/cjs/components/context-menu.js.map +4 -4
  35. package/dist/cjs/components/dialog.js +1 -1
  36. package/dist/cjs/components/dialog.js.map +4 -4
  37. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  38. package/dist/cjs/components/dropdown-menu.js +1 -1
  39. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  40. package/dist/cjs/components/index.js +2 -2
  41. package/dist/cjs/components/index.js.map +4 -4
  42. package/dist/cjs/components/message-scroller.js +1 -1
  43. package/dist/cjs/components/message-scroller.js.map +4 -4
  44. package/dist/cjs/components/notice.js +1 -1
  45. package/dist/cjs/components/notice.js.map +4 -4
  46. package/dist/cjs/components/popover.js +1 -1
  47. package/dist/cjs/components/popover.js.map +4 -4
  48. package/dist/cjs/components/schemas/index.js +1 -1
  49. package/dist/cjs/components/schemas/index.js.map +2 -2
  50. package/dist/cjs/components/schemas/shell.schema.d.ts +1 -0
  51. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  52. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  53. package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
  54. package/dist/cjs/components/select.d.ts.map +1 -1
  55. package/dist/cjs/components/select.js +1 -1
  56. package/dist/cjs/components/select.js.map +4 -4
  57. package/dist/cjs/components/sheet.js +1 -1
  58. package/dist/cjs/components/sheet.js.map +4 -4
  59. package/dist/cjs/components/shell.d.ts +11 -0
  60. package/dist/cjs/components/shell.d.ts.map +1 -1
  61. package/dist/cjs/components/shell.js +1 -1
  62. package/dist/cjs/components/shell.js.map +4 -4
  63. package/dist/cjs/components/sidebar.js +1 -1
  64. package/dist/cjs/components/sidebar.js.map +4 -4
  65. package/dist/cjs/components/spinner.d.ts.map +1 -1
  66. package/dist/cjs/components/spinner.js +1 -1
  67. package/dist/cjs/components/spinner.js.map +2 -2
  68. package/dist/cjs/components/text-area.d.ts.map +1 -1
  69. package/dist/cjs/components/text-area.js +1 -1
  70. package/dist/cjs/components/text-area.js.map +2 -2
  71. package/dist/cjs/components/text-field.d.ts.map +1 -1
  72. package/dist/cjs/components/text-field.js +2 -2
  73. package/dist/cjs/components/text-field.js.map +2 -2
  74. package/dist/cjs/components/theme.d.ts.map +1 -1
  75. package/dist/cjs/components/theme.js +1 -1
  76. package/dist/cjs/components/theme.js.map +4 -4
  77. package/dist/cjs/components/toggle.js +1 -1
  78. package/dist/cjs/components/toggle.js.map +4 -4
  79. package/dist/cjs/components/toolbar.js +1 -1
  80. package/dist/cjs/components/toolbar.js.map +4 -4
  81. package/dist/cjs/components/tooltip.js +1 -1
  82. package/dist/cjs/components/tooltip.js.map +4 -4
  83. package/dist/cjs/index.js +4 -4
  84. package/dist/cjs/index.js.map +4 -4
  85. package/dist/esm/{chunk-6M6HGIGN.js → chunk-25ZRMILM.js} +2 -2
  86. package/dist/esm/chunk-2E57H3NH.js +3 -0
  87. package/dist/esm/chunk-2E57H3NH.js.map +7 -0
  88. package/dist/esm/chunk-2S7HPQVX.js +3 -0
  89. package/dist/esm/chunk-2S7HPQVX.js.map +7 -0
  90. package/dist/esm/{chunk-UG73IGRF.js → chunk-2ZKEQS76.js} +2 -2
  91. package/dist/esm/{chunk-H2TSRYQ5.js → chunk-324VC67W.js} +2 -2
  92. package/dist/esm/{chunk-UR5BUNNT.js → chunk-3MFSQ6PN.js} +2 -2
  93. package/dist/esm/{chunk-OTCVSJT7.js → chunk-4MNRLB57.js} +2 -2
  94. package/dist/esm/{chunk-TFFU435D.js → chunk-5BX2YZV6.js} +2 -2
  95. package/dist/esm/chunk-5BX2YZV6.js.map +7 -0
  96. package/dist/esm/chunk-67UEMB4K.js +3 -0
  97. package/dist/esm/chunk-67UEMB4K.js.map +7 -0
  98. package/dist/esm/chunk-6HEORZNJ.js +3 -0
  99. package/dist/esm/chunk-6HEORZNJ.js.map +7 -0
  100. package/dist/esm/{chunk-K55IQP5H.js → chunk-6YWHNLSC.js} +2 -2
  101. package/dist/esm/chunk-6YWHNLSC.js.map +7 -0
  102. package/dist/esm/{chunk-NYBE3U3V.js → chunk-7QBNXNEN.js} +2 -2
  103. package/dist/esm/{chunk-E6BDD3PN.js → chunk-7V6M3MIR.js} +2 -2
  104. package/dist/esm/{chunk-KQIZMPSW.js → chunk-ANQLWGFN.js} +1 -1
  105. package/dist/esm/{chunk-KQIZMPSW.js.map → chunk-ANQLWGFN.js.map} +2 -2
  106. package/dist/esm/chunk-AQKSO3SW.js +3 -0
  107. package/dist/esm/chunk-AQKSO3SW.js.map +7 -0
  108. package/dist/esm/{chunk-ONJYRJ66.js → chunk-B6OFKABP.js} +2 -2
  109. package/dist/esm/chunk-BUXK5VGR.js +3 -0
  110. package/dist/esm/chunk-BUXK5VGR.js.map +7 -0
  111. package/dist/esm/{chunk-7QP6JFPO.js → chunk-C67MM24U.js} +2 -2
  112. package/dist/esm/chunk-CZ24FOFS.js +3 -0
  113. package/dist/esm/chunk-CZ24FOFS.js.map +7 -0
  114. package/dist/esm/{chunk-LFAUMDU5.js → chunk-D2C2A2ZK.js} +2 -2
  115. package/dist/esm/{chunk-UBUGG2OB.js → chunk-DP7MPGR7.js} +2 -2
  116. package/dist/esm/{chunk-BVQDDN5Q.js → chunk-EB4AG3OL.js} +2 -2
  117. package/dist/esm/{chunk-5PQCTVZB.js → chunk-ENQV6SEA.js} +2 -2
  118. package/dist/esm/{chunk-VVLUY4WR.js → chunk-EPGIYTFK.js} +2 -2
  119. package/dist/esm/{chunk-2TWPPDII.js → chunk-FMVOB367.js} +2 -2
  120. package/dist/esm/chunk-FVRVBB6O.js +3 -0
  121. package/dist/esm/chunk-FVRVBB6O.js.map +7 -0
  122. package/dist/esm/{chunk-TFFMELAL.js → chunk-FYTLUDL3.js} +2 -2
  123. package/dist/esm/{chunk-W4CPV4PO.js → chunk-H2J25HXP.js} +2 -2
  124. package/dist/esm/{chunk-C2WKAIZM.js → chunk-H73AMXCH.js} +2 -2
  125. package/dist/esm/{chunk-AJANJ22M.js → chunk-HBO7W7SS.js} +2 -2
  126. package/dist/esm/{chunk-F364PDDM.js → chunk-HLIOHDEX.js} +2 -2
  127. package/dist/esm/{chunk-5FWEGTP6.js → chunk-HR2VHGJ5.js} +2 -2
  128. package/dist/esm/chunk-HR2VHGJ5.js.map +7 -0
  129. package/dist/esm/{chunk-ZKQCSGL3.js → chunk-ISCZ57VL.js} +2 -2
  130. package/dist/esm/{chunk-TFGUTYZK.js → chunk-J54GYD7A.js} +2 -2
  131. package/dist/esm/{chunk-HVMRB3AH.js → chunk-JD4KR6VZ.js} +2 -2
  132. package/dist/esm/{chunk-MS2ONKJJ.js → chunk-JKQN6QCP.js} +2 -2
  133. package/dist/esm/{chunk-NS573D6O.js → chunk-JP36JSNP.js} +2 -2
  134. package/dist/esm/chunk-K3GDM26A.js +3 -0
  135. package/dist/esm/{chunk-M7IQIKB4.js.map → chunk-K3GDM26A.js.map} +2 -2
  136. package/dist/esm/{chunk-ULCHGKI3.js → chunk-KJZSXLIX.js} +2 -2
  137. package/dist/esm/{chunk-N3B6EGXL.js → chunk-LABMK6Q7.js} +2 -2
  138. package/dist/esm/{chunk-VIVM525H.js → chunk-MGWGD6KI.js} +2 -2
  139. package/dist/esm/{chunk-RD4T2MCC.js → chunk-MJKVVGGV.js} +2 -2
  140. package/dist/esm/chunk-MJKVVGGV.js.map +7 -0
  141. package/dist/esm/{chunk-TXVZOS3E.js → chunk-MMDZBPSX.js} +2 -2
  142. package/dist/esm/{chunk-EERKYRYI.js → chunk-NWXODCTD.js} +2 -2
  143. package/dist/esm/{chunk-VCZ2GYOF.js → chunk-Q5SANVIW.js} +2 -2
  144. package/dist/esm/chunk-QEDKL23P.js +3 -0
  145. package/dist/esm/chunk-QEDKL23P.js.map +7 -0
  146. package/dist/esm/{chunk-LGZCNQBS.js → chunk-QPRUTOLI.js} +2 -2
  147. package/dist/esm/{chunk-TTW3EAQT.js → chunk-QRV32INS.js} +2 -2
  148. package/dist/esm/{chunk-3QN4C5LW.js → chunk-REORAMUH.js} +2 -2
  149. package/dist/esm/{chunk-GOXGRJO6.js → chunk-SUQJ7DD4.js} +2 -2
  150. package/dist/esm/chunk-TSWHVZ47.js +3 -0
  151. package/dist/esm/chunk-TSWHVZ47.js.map +7 -0
  152. package/dist/esm/chunk-VQDCHBZR.js +3 -0
  153. package/dist/esm/chunk-VQDCHBZR.js.map +7 -0
  154. package/dist/esm/{chunk-TF6WAIUQ.js → chunk-W4Z6ORYO.js} +2 -2
  155. package/dist/esm/{chunk-F2722F7B.js → chunk-WAXRIARV.js} +2 -2
  156. package/dist/esm/chunk-WAXRIARV.js.map +7 -0
  157. package/dist/esm/{chunk-ADL3LEOQ.js → chunk-WD66RYF6.js} +2 -2
  158. package/dist/esm/{chunk-DIY2XQKR.js → chunk-X7JHZ3HA.js} +2 -2
  159. package/dist/esm/{chunk-H33NTGVF.js → chunk-XD3C3GVF.js} +2 -2
  160. package/dist/esm/{chunk-VPUFKJQA.js → chunk-YMUERC2J.js} +2 -2
  161. package/dist/esm/chunk-ZOUIIO4C.js +6 -0
  162. package/dist/esm/chunk-ZOUIIO4C.js.map +7 -0
  163. package/dist/esm/components/_internal/base-button.js +1 -1
  164. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  165. package/dist/esm/components/_internal/menu-context.js +1 -1
  166. package/dist/esm/components/_internal/pane-band-context.d.ts +4 -3
  167. package/dist/esm/components/_internal/pane-band-context.d.ts.map +1 -1
  168. package/dist/esm/components/_internal/pane-band-context.js +1 -1
  169. package/dist/esm/components/_internal/pane-chrome.d.ts +7 -1
  170. package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
  171. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  172. package/dist/esm/components/_internal/portal-theme.d.ts +9 -0
  173. package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -0
  174. package/dist/esm/components/_internal/portal-theme.js +3 -0
  175. package/dist/esm/components/_internal/portal-theme.js.map +7 -0
  176. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  177. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  178. package/dist/esm/components/_internal/shell-page-scroll.d.ts +15 -0
  179. package/dist/esm/components/_internal/shell-page-scroll.d.ts.map +1 -0
  180. package/dist/esm/components/_internal/shell-page-scroll.js +3 -0
  181. package/dist/esm/components/_internal/shell-page-scroll.js.map +7 -0
  182. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  183. package/dist/esm/components/accordion.js +1 -1
  184. package/dist/esm/components/alert-dialog.js +1 -1
  185. package/dist/esm/components/avatar.js +1 -1
  186. package/dist/esm/components/blockquote.js +1 -1
  187. package/dist/esm/components/box.js +1 -1
  188. package/dist/esm/components/button.js +1 -1
  189. package/dist/esm/components/card.js +1 -1
  190. package/dist/esm/components/chatbar.js +1 -1
  191. package/dist/esm/components/checkbox-group.js +1 -1
  192. package/dist/esm/components/checkbox.js +1 -1
  193. package/dist/esm/components/chip.js +1 -1
  194. package/dist/esm/components/code.js +1 -1
  195. package/dist/esm/components/combobox.d.ts.map +1 -1
  196. package/dist/esm/components/combobox.js +1 -1
  197. package/dist/esm/components/context-menu.d.ts.map +1 -1
  198. package/dist/esm/components/context-menu.js +1 -1
  199. package/dist/esm/components/dialog.js +1 -1
  200. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  201. package/dist/esm/components/dropdown-menu.js +1 -1
  202. package/dist/esm/components/flex.js +1 -1
  203. package/dist/esm/components/grid.js +1 -1
  204. package/dist/esm/components/heading.js +1 -1
  205. package/dist/esm/components/image.js +1 -1
  206. package/dist/esm/components/index.js +1 -1
  207. package/dist/esm/components/kbd.js +1 -1
  208. package/dist/esm/components/link.js +1 -1
  209. package/dist/esm/components/message-scroller.js +1 -1
  210. package/dist/esm/components/navbar.js +1 -1
  211. package/dist/esm/components/notice.js +1 -1
  212. package/dist/esm/components/popover.js +1 -1
  213. package/dist/esm/components/progress.js +1 -1
  214. package/dist/esm/components/radio-group.js +1 -1
  215. package/dist/esm/components/radio.js +1 -1
  216. package/dist/esm/components/schemas/index.js +1 -1
  217. package/dist/esm/components/schemas/shell.schema.d.ts +1 -0
  218. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  219. package/dist/esm/components/schemas/shell.schema.js +1 -1
  220. package/dist/esm/components/scroll-area.js +1 -1
  221. package/dist/esm/components/segmented-control.js +1 -1
  222. package/dist/esm/components/select.d.ts.map +1 -1
  223. package/dist/esm/components/select.js +1 -1
  224. package/dist/esm/components/separator.js +1 -1
  225. package/dist/esm/components/sheet.js +1 -1
  226. package/dist/esm/components/shell.d.ts +11 -0
  227. package/dist/esm/components/shell.d.ts.map +1 -1
  228. package/dist/esm/components/shell.js +1 -1
  229. package/dist/esm/components/sidebar.js +1 -1
  230. package/dist/esm/components/slider.js +1 -1
  231. package/dist/esm/components/spinner.d.ts.map +1 -1
  232. package/dist/esm/components/spinner.js +1 -1
  233. package/dist/esm/components/switch.js +1 -1
  234. package/dist/esm/components/table.js +1 -1
  235. package/dist/esm/components/tabs.js +1 -1
  236. package/dist/esm/components/text-area.d.ts.map +1 -1
  237. package/dist/esm/components/text-area.js +1 -1
  238. package/dist/esm/components/text-field.d.ts.map +1 -1
  239. package/dist/esm/components/text-field.js +1 -1
  240. package/dist/esm/components/text.js +1 -1
  241. package/dist/esm/components/theme.d.ts.map +1 -1
  242. package/dist/esm/components/theme.js +1 -1
  243. package/dist/esm/components/toggle.js +1 -1
  244. package/dist/esm/components/toolbar.js +1 -1
  245. package/dist/esm/components/tooltip.js +1 -1
  246. package/dist/esm/components/virtual-menu.js +1 -1
  247. package/dist/esm/index.js +1 -1
  248. package/package.json +1 -1
  249. package/schemas/index.json +6 -1
  250. package/schemas/shell-root.json +6 -1
  251. package/src/components/_internal/pane-band-context.ts +4 -3
  252. package/src/components/_internal/pane-chrome.tsx +15 -2
  253. package/src/components/_internal/portal-theme.tsx +18 -0
  254. package/src/components/_internal/shell-page-scroll.ts +49 -0
  255. package/src/components/alert-dialog.tsx +3 -3
  256. package/src/components/combobox.tsx +4 -3
  257. package/src/components/context-menu.tsx +6 -5
  258. package/src/components/dialog.tsx +3 -3
  259. package/src/components/dropdown-menu.tsx +6 -5
  260. package/src/components/popover.tsx +3 -3
  261. package/src/components/schemas/shell.schema.ts +4 -1
  262. package/src/components/select.tsx +4 -3
  263. package/src/components/sheet.tsx +3 -3
  264. package/src/components/shell.css +201 -0
  265. package/src/components/shell.tsx +128 -22
  266. package/src/components/spinner.css +16 -1
  267. package/src/components/spinner.tsx +14 -13
  268. package/src/components/text-area.css +7 -2
  269. package/src/components/text-area.tsx +10 -8
  270. package/src/components/text-field.css +7 -2
  271. package/src/components/text-field.tsx +10 -8
  272. package/src/components/theme.tsx +24 -30
  273. package/src/components/tooltip.tsx +3 -3
  274. package/styles.css +165 -4
  275. package/dist/esm/chunk-3C4Q6PMS.js +0 -3
  276. package/dist/esm/chunk-3C4Q6PMS.js.map +0 -7
  277. package/dist/esm/chunk-3ZWHKNHI.js +0 -3
  278. package/dist/esm/chunk-3ZWHKNHI.js.map +0 -7
  279. package/dist/esm/chunk-457Z4R5W.js +0 -3
  280. package/dist/esm/chunk-457Z4R5W.js.map +0 -7
  281. package/dist/esm/chunk-5FWEGTP6.js.map +0 -7
  282. package/dist/esm/chunk-5MEWNLNH.js +0 -3
  283. package/dist/esm/chunk-5MEWNLNH.js.map +0 -7
  284. package/dist/esm/chunk-BEHAT3GI.js +0 -3
  285. package/dist/esm/chunk-BEHAT3GI.js.map +0 -7
  286. package/dist/esm/chunk-DG2KIH54.js +0 -6
  287. package/dist/esm/chunk-DG2KIH54.js.map +0 -7
  288. package/dist/esm/chunk-DQCE7DHY.js +0 -3
  289. package/dist/esm/chunk-DQCE7DHY.js.map +0 -7
  290. package/dist/esm/chunk-F2722F7B.js.map +0 -7
  291. package/dist/esm/chunk-GE7FRBZ4.js +0 -3
  292. package/dist/esm/chunk-GE7FRBZ4.js.map +0 -7
  293. package/dist/esm/chunk-K55IQP5H.js.map +0 -7
  294. package/dist/esm/chunk-M7IQIKB4.js +0 -3
  295. package/dist/esm/chunk-POP5NB33.js +0 -3
  296. package/dist/esm/chunk-POP5NB33.js.map +0 -7
  297. package/dist/esm/chunk-RD4T2MCC.js.map +0 -7
  298. package/dist/esm/chunk-SCIFT27R.js +0 -3
  299. package/dist/esm/chunk-SCIFT27R.js.map +0 -7
  300. package/dist/esm/chunk-TFFU435D.js.map +0 -7
  301. /package/dist/esm/{chunk-6M6HGIGN.js.map → chunk-25ZRMILM.js.map} +0 -0
  302. /package/dist/esm/{chunk-UG73IGRF.js.map → chunk-2ZKEQS76.js.map} +0 -0
  303. /package/dist/esm/{chunk-H2TSRYQ5.js.map → chunk-324VC67W.js.map} +0 -0
  304. /package/dist/esm/{chunk-UR5BUNNT.js.map → chunk-3MFSQ6PN.js.map} +0 -0
  305. /package/dist/esm/{chunk-OTCVSJT7.js.map → chunk-4MNRLB57.js.map} +0 -0
  306. /package/dist/esm/{chunk-NYBE3U3V.js.map → chunk-7QBNXNEN.js.map} +0 -0
  307. /package/dist/esm/{chunk-E6BDD3PN.js.map → chunk-7V6M3MIR.js.map} +0 -0
  308. /package/dist/esm/{chunk-ONJYRJ66.js.map → chunk-B6OFKABP.js.map} +0 -0
  309. /package/dist/esm/{chunk-7QP6JFPO.js.map → chunk-C67MM24U.js.map} +0 -0
  310. /package/dist/esm/{chunk-LFAUMDU5.js.map → chunk-D2C2A2ZK.js.map} +0 -0
  311. /package/dist/esm/{chunk-UBUGG2OB.js.map → chunk-DP7MPGR7.js.map} +0 -0
  312. /package/dist/esm/{chunk-BVQDDN5Q.js.map → chunk-EB4AG3OL.js.map} +0 -0
  313. /package/dist/esm/{chunk-5PQCTVZB.js.map → chunk-ENQV6SEA.js.map} +0 -0
  314. /package/dist/esm/{chunk-VVLUY4WR.js.map → chunk-EPGIYTFK.js.map} +0 -0
  315. /package/dist/esm/{chunk-2TWPPDII.js.map → chunk-FMVOB367.js.map} +0 -0
  316. /package/dist/esm/{chunk-TFFMELAL.js.map → chunk-FYTLUDL3.js.map} +0 -0
  317. /package/dist/esm/{chunk-W4CPV4PO.js.map → chunk-H2J25HXP.js.map} +0 -0
  318. /package/dist/esm/{chunk-C2WKAIZM.js.map → chunk-H73AMXCH.js.map} +0 -0
  319. /package/dist/esm/{chunk-AJANJ22M.js.map → chunk-HBO7W7SS.js.map} +0 -0
  320. /package/dist/esm/{chunk-F364PDDM.js.map → chunk-HLIOHDEX.js.map} +0 -0
  321. /package/dist/esm/{chunk-ZKQCSGL3.js.map → chunk-ISCZ57VL.js.map} +0 -0
  322. /package/dist/esm/{chunk-TFGUTYZK.js.map → chunk-J54GYD7A.js.map} +0 -0
  323. /package/dist/esm/{chunk-HVMRB3AH.js.map → chunk-JD4KR6VZ.js.map} +0 -0
  324. /package/dist/esm/{chunk-MS2ONKJJ.js.map → chunk-JKQN6QCP.js.map} +0 -0
  325. /package/dist/esm/{chunk-NS573D6O.js.map → chunk-JP36JSNP.js.map} +0 -0
  326. /package/dist/esm/{chunk-ULCHGKI3.js.map → chunk-KJZSXLIX.js.map} +0 -0
  327. /package/dist/esm/{chunk-N3B6EGXL.js.map → chunk-LABMK6Q7.js.map} +0 -0
  328. /package/dist/esm/{chunk-VIVM525H.js.map → chunk-MGWGD6KI.js.map} +0 -0
  329. /package/dist/esm/{chunk-TXVZOS3E.js.map → chunk-MMDZBPSX.js.map} +0 -0
  330. /package/dist/esm/{chunk-EERKYRYI.js.map → chunk-NWXODCTD.js.map} +0 -0
  331. /package/dist/esm/{chunk-VCZ2GYOF.js.map → chunk-Q5SANVIW.js.map} +0 -0
  332. /package/dist/esm/{chunk-LGZCNQBS.js.map → chunk-QPRUTOLI.js.map} +0 -0
  333. /package/dist/esm/{chunk-TTW3EAQT.js.map → chunk-QRV32INS.js.map} +0 -0
  334. /package/dist/esm/{chunk-3QN4C5LW.js.map → chunk-REORAMUH.js.map} +0 -0
  335. /package/dist/esm/{chunk-GOXGRJO6.js.map → chunk-SUQJ7DD4.js.map} +0 -0
  336. /package/dist/esm/{chunk-TF6WAIUQ.js.map → chunk-W4Z6ORYO.js.map} +0 -0
  337. /package/dist/esm/{chunk-ADL3LEOQ.js.map → chunk-WD66RYF6.js.map} +0 -0
  338. /package/dist/esm/{chunk-DIY2XQKR.js.map → chunk-X7JHZ3HA.js.map} +0 -0
  339. /package/dist/esm/{chunk-H33NTGVF.js.map → chunk-XD3C3GVF.js.map} +0 -0
  340. /package/dist/esm/{chunk-VPUFKJQA.js.map → chunk-YMUERC2J.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/pane-chrome.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null;\n if (inContent) {\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
5
- "mappings": ";wHAWA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAgBvB,IAAMC,EAA6B,gBAAgD,IAAI,EAEvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAGA,IAAME,EAAyB,gBAAwB,GAAG,EAOpDC,EAA4B,gBAAc,EAAK,EAMrD,SAASC,EAAgB,CAAE,SAAAC,EAAU,aAAAC,CAAa,EAAyD,CACzG,IAAMC,EAAa,aAAWL,CAAgB,EACxCM,EAAc,UAAmC,K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EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDuB,EAAW,YAAc,mBAczB,IAAMC,EAAe,aAAwC,CAAC,CAAE,UAAAP,EAAW,MAAAQ,EAAO,IAAAC,EAAK,SAAA1B,EAAU,KAAA2B,EAAO,GAAO,GAAGR,CAAM,EAAGC,IAAiB,CAC1I,IAAMC,EAASjB,EAAiB,EAE1BwB,EAAoB,aAAW9B,CAAmB,EAClDO,EAAST,EAAiB,EAEhC,OADkBgC,GAAevB,IAAW,KAGxC,gBAACwB,EAAA,CAAY,GAAGV,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,yBAA0BL,CAAS,GACnFjB,CACH,CACF,EAIF,gBAAC6B,EAAA,CAAY,GAAGV,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,sBAAuB,qBAAsB,GAAGD,EAAQJ,CAAS,GAElH,gBAACL,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAAC,OAAI,UAAU,wBAAwBZ,CAAS,CAClD,CACF,CACF,CAEJ,CAAC,EACDwB,EAAO,YAAc",
6
- "names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "contentPane", "ScrollArea"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as I,b as y,c as z,d as _,e as K}from"./chunk-2ACVWLFA.js";import{a as te}from"./chunk-TGRHRMQI.js";import{b as re,c as G}from"./chunk-GE7FRBZ4.js";import{b as H,c as U,d as k,e as Y,f as q}from"./chunk-GKDGNPBD.js";import{c as X}from"./chunk-5ON3XLRD.js";import{a as M,b as v,c as J,d as Q,e as E,f as Z,g as ee,h as N}from"./chunk-5JYSYTHA.js";import{c as B,e as oe,g,h as O,i as ne}from"./chunk-ZKQCSGL3.js";import{b as h,c as $,d as T,e as x}from"./chunk-BVQDDN5Q.js";import{a as L}from"./chunk-VIVM525H.js";import{c as S}from"./chunk-OKQAVYW4.js";import{a as he}from"./chunk-VQPANPMI.js";var Oe={};he(Oe,{CheckboxItem:()=>Me,Content:()=>de,Group:()=>me,Item:()=>ce,Label:()=>le,RadioGroup:()=>De,RadioItem:()=>we,Root:()=>ue,Separator:()=>be,Sub:()=>fe,SubContent:()=>Re,SubTrigger:()=>Pe,Trigger:()=>se,TriggerIcon:()=>Ie});import*as e from"react";import l from"classnames";import{DropdownMenu as s,Slot as W}from"radix-ui";import{useCallbackRef as ie}from"radix-ui/internal";var ae=e.createContext(!1),ue=o=>{let{open:n,defaultOpen:t=!1,onOpenChange:u}=o,[i,r]=e.useState(t),a=n??i,c=ie(u),p=e.useCallback(D=>{r(D),c(D)},[c]),m=e.useCallback(()=>p(!1),[p]);return e.createElement(ae.Provider,{value:a},e.createElement(oe,{value:m},e.createElement(s.Root,{...o,open:a,onOpenChange:p})))};ue.displayName="DropdownMenu.Root";var se=e.forwardRef(({children:o,...n},t)=>e.createElement(s.Trigger,{...n,ref:t,asChild:!0},te(o)));se.displayName="DropdownMenu.Trigger";var V=e.createContext({}),Te={ltr:"ArrowLeft",rtl:"ArrowRight"},xe={ltr:"ArrowRight",rtl:"ArrowLeft"};function Ee(o){return o instanceof HTMLElement&&(o.isContentEditable||o.tagName==="INPUT"||o.tagName==="TEXTAREA")}function pe(o){return o?.closest("[dir]")?.getAttribute("dir")==="rtl"?"rtl":"ltr"}var de=e.forwardRef((o,n)=>{let t=X(o,I.size),u=re(),{size:i=I.size.default}=t,{className:r,children:a,color:c,container:p,forceMount:m,submenuBehavior:D,virtualized:d=!1,onEscapeKeyDown:P,onKeyDown:R,...f}=S(t,I),b=c||u.accentColor,A=h(D,"cascade"),F=A==="drill-down",ge=e.useContext(ae),C=J(),ye=w=>{P?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(w.preventDefault(),C.pop("keyboard"))},Se=w=>{R?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(Ee(w.target)||w.key===Te[pe(w.currentTarget)]&&(w.preventDefault(),C.pop("keyboard")))},ke=e.useMemo(()=>({size:i,color:b}),[i,b]),j=e.createElement(B,{size:i},e.createElement(V.Provider,{value:ke},e.createElement(Q,{store:C,behavior:A,open:ge},a)));return e.createElement(s.Portal,{container:p,forceMount:m},e.createElement(G,{asChild:!0},e.createElement(s.Content,{"data-accent-color":b,align:"start",sideOffset:4,collisionPadding:10,...f,onEscapeKeyDown:ye,onKeyDown:Se,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-DropdownMenuContent",r)},d?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},j):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},j)))))});de.displayName="DropdownMenu.Content";var le=e.forwardRef(({className:o,id:n,...t},u)=>{let i=e.useContext(M),r=ne(n,i);return i?e.createElement(s.Label,{...t,id:r,asChild:!1,ref:u,className:l("kui-BaseMenuLabel","kui-DropdownMenuLabel",o)}):null});le.displayName="DropdownMenu.Label";var ce=e.forwardRef((o,n)=>{let{className:t,children:u,color:i=z.color.default,shortcut:r,...a}=o;return e.useContext(M)?e.createElement(s.Item,{"data-accent-color":i,"aria-keyshortcuts":r?T(r):void 0,...a,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem",t)},e.createElement(W.Slottable,null,u),r&&e.createElement(x,{shortcut:r,className:"kui-DropdownMenuShortcut"})):null});ce.displayName="DropdownMenu.Item";var me=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.Group,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuGroup","kui-DropdownMenuGroup",o)}))});me.displayName="DropdownMenu.Group";var De=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.RadioGroup,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuRadioGroup","kui-DropdownMenuRadioGroup",o)}))});De.displayName="DropdownMenu.RadioGroup";var we=e.forwardRef((o,n)=>{let{children:t,className:u,color:i=K.color.default,...r}=o;return e.useContext(M)?e.createElement(s.RadioItem,{...r,asChild:!1,ref:n,"data-accent-color":i,className:l("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-DropdownMenuItem","kui-DropdownMenuRadioItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(q,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"}))):null});we.displayName="DropdownMenu.RadioItem";var Me=e.forwardRef((o,n)=>{let{children:t,className:u,shortcut:i,color:r=_.color.default,...a}=o;return e.useContext(M)?e.createElement(s.CheckboxItem,{"aria-keyshortcuts":i?T(i):void 0,...a,asChild:!1,ref:n,"data-accent-color":r,className:l("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-DropdownMenuItem","kui-DropdownMenuCheckboxItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(H,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"})),i&&e.createElement(x,{shortcut:i,className:"kui-DropdownMenuShortcut"})):null});Me.displayName="DropdownMenu.CheckboxItem";var fe=({label:o="Back",open:n,defaultOpen:t,onOpenChange:u,children:i})=>{let r=v(),a=e.useId(),c=e.useMemo(()=>({id:a,label:o}),[a,o]),p=E(r,a)!=="closed",m=ie(u),D=n!==void 0;e.useLayoutEffect(()=>{if(!(!r||!D))return r.setController(a,m),()=>r.setController(a,null)},[r,D,a,m]),e.useLayoutEffect(()=>{!r||n===void 0||(n&&!r.isOpen(a)?r.open(a,r.takePendingModality(a)):!n&&r.isOpen(a)&&r.close(a,r.takePendingModality(a)))},[r,n,a]);let d=e.useRef(n===void 0&&!!t);e.useLayoutEffect(()=>{r&&d.current?r.open(a):d.current=!1},[]);let P=e.useRef(p);return e.useEffect(()=>{if(!(!r||P.current===p)){if(P.current=p,p&&d.current){d.current=!1;return}n!==void 0&&n===p||m(p)}},[r,p,m,n]),e.createElement(ee.Provider,{value:c},e.createElement(s.Sub,{open:n,defaultOpen:t,onOpenChange:r?void 0:u},i))};fe.displayName="DropdownMenu.Sub";var Pe=e.forwardRef((o,n)=>{let{className:t,children:u,onKeyDown:i,...r}=o,a=v(),c=N(),p=e.useContext(M);if(a&&c){if(!p)return null;let m=d=>{d.preventDefault(),a.push(c.id)},D=d=>{i?.(d),!(d.defaultPrevented||r.disabled)&&d.key===xe[pe(d.currentTarget)]&&(d.preventDefault(),a.push(c.id,"keyboard"))};return e.createElement(s.Item,{...r,"data-drill-down-trigger":c.id,"data-drill-down-name":r.textValue,onSelect:m,onKeyDown:D,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger","kui-DropdownMenuDrillDownSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))}return e.createElement(s.SubTrigger,{...r,onKeyDown:i,asChild:!1,ref:n,className:l("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))});Pe.displayName="DropdownMenu.SubTrigger";var be=e.forwardRef(({className:o,...n},t)=>e.useContext(M)?e.createElement(s.Separator,{...n,asChild:!1,ref:t,className:l("kui-BaseMenuSeparator","kui-DropdownMenuSeparator",o)}):null);be.displayName="DropdownMenu.Separator";function Ne({label:o,name:n}){let t=v(),u=e.useCallback(a=>{a.preventDefault(),t?.pop()},[t]),i=typeof o=="string"?o:n,r=i&&i!=="Back"?`Back from ${i}`:void 0;return e.createElement(s.Item,{"aria-label":r,textValue:i||"Back",onSelect:u,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem","kui-DropdownMenuDrillDownBackItem")},e.createElement(Y,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon"}),e.createElement("span",{className:"kui-DropdownMenuDrillDownBackLabel"},o))}function Be(o){let{loop:n,onEscapeKeyDown:t,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:r,sideOffset:a,alignOffset:c,avoidCollisions:p,collisionBoundary:m,collisionPadding:D,arrowPadding:d,sticky:P,hideWhenDetached:R,updatePositionStrategy:f,...b}=o;return b}var Re=e.forwardRef((o,n)=>{let t=v(),u=N();return t&&u?e.createElement(ve,{...o,ref:n,store:t,sub:u}):e.createElement(Ce,{...o,ref:n})});Re.displayName="DropdownMenu.SubContent";var Ce=e.forwardRef((o,n)=>{let t=e.useContext(V),u=o.size??t.size,i=o.color??t.color,{className:r,children:a,container:c,forceMount:p,color:m,virtualized:D=!1,...d}=S({...o,size:u},y),P=h(u,y.size.default),R=e.useMemo(()=>({size:u,color:i}),[u,i]),f=e.createElement(B,{size:u},e.createElement(V.Provider,{value:R},a));return e.createElement(s.Portal,{container:c,forceMount:p},e.createElement(G,{asChild:!0},e.createElement(s.SubContent,{"data-accent-color":i,alignOffset:$(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-DropdownMenuContent","kui-DropdownMenuSubContent",r)},D?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},f):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},f)))))});Ce.displayName="DropdownMenu.CascadeSubContent";var ve=e.forwardRef(({store:o,sub:n,...t},u)=>{let i=E(o,n.id),r=Z(o,n.id);if(i==="closed")return null;let{className:a,children:c,container:p,forceMount:m,virtualized:D,size:d,color:P,...R}=Be(t),f=i==="top",b=r?.name||(typeof n.label=="string"?n.label:"");return e.createElement("div",{role:"group","aria-label":b||void 0,...R,ref:u,"data-drill-down-panel":n.id,"data-drill-down-active":f?!0:void 0,className:l("kui-DropdownMenuDrillDownPanel",a)},f&&e.createElement(e.Fragment,null,e.createElement(Ne,{label:n.label,name:b}),e.createElement(s.Separator,{className:"kui-BaseMenuSeparator kui-DropdownMenuSeparator"})),e.createElement(g,{value:null},e.createElement(M.Provider,{value:f},c)))});ve.displayName="DropdownMenu.DrillDownPanel";var Ie=e.forwardRef(({className:o,...n},t)=>e.createElement(U,{...n,ref:t,className:l("kui-DropdownMenuTriggerIcon",o)}));Ie.displayName="DropdownMenu.TriggerIcon";export{ue as a,se as b,de as c,le as d,ce as e,me as f,De as g,we as h,Me as i,fe as j,Pe as k,be as l,Re as m,Ie as n,Oe as o};
3
- //# sourceMappingURL=chunk-457Z4R5W.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/dropdown-menu.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\nimport { useCallbackRef } from 'radix-ui/internal';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuSubContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport {\n DrillDownLevelContext,\n DrillDownRoot,\n SubContext,\n useCreateDrillDownStore,\n useDrillDownStore,\n usePanelPosition,\n useStackEntry,\n useSubContext,\n} from './_internal/dropdown-menu-drill-down.js';\nimport {\n MenuCloseProvider,\n MenuGroupLabelProvider,\n MenuProvider,\n useMenuGroupLabelId,\n useMenuGroupLabelledBy,\n} from './_internal/menu-context.js';\nimport {\n MenuShortcut,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n useResolvedResponsiveValue,\n} from './_internal/base-menu.utils.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\n/**\n * Open state of the menu, mirrored from Root so Content can reset drill-down\n * navigation when a force-mounted menu opens again.\n */\nconst DropdownMenuOpenContext = React.createContext(false);\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => {\n const { open: openProp, defaultOpen = false, onOpenChange } = props;\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const open = openProp ?? uncontrolledOpen;\n\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n handleOpenChangeProp(next);\n },\n [handleOpenChangeProp],\n );\n\n const close = React.useCallback(() => handleOpenChange(false), [handleOpenChange]);\n\n return (\n <DropdownMenuOpenContext.Provider value={open}>\n <MenuCloseProvider value={close}>\n <DropdownMenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange} />\n </MenuCloseProvider>\n </DropdownMenuOpenContext.Provider>\n );\n};\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\n/** Visual props shared by Content and SubContent. */\ntype DropdownMenuSurfaceProps = GetPropDefTypes<typeof dropdownMenuSubContentPropDefs>;\n\ntype DropdownMenuContentContextValue = {\n size?: DropdownMenuSurfaceProps['size'];\n color?: DropdownMenuSurfaceProps['color'];\n};\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\n\n/** Keys that navigate back one drill-down level, by writing direction. */\nconst BACK_KEYS = { ltr: 'ArrowLeft', rtl: 'ArrowRight' } as const;\nconst FORWARD_KEYS = { ltr: 'ArrowRight', rtl: 'ArrowLeft' } as const;\n\nfunction isTextEntryTarget(target: EventTarget | null) {\n return (\n target instanceof HTMLElement &&\n (target.isContentEditable || target.tagName === 'INPUT' || target.tagName === 'TEXTAREA')\n );\n}\n\nfunction getDirection(element: HTMLElement | null): 'ltr' | 'rtl' {\n return element?.closest('[dir]')?.getAttribute('dir') === 'rtl' ? 'rtl' : 'ltr';\n}\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the dropdown.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, dropdownMenuContentPropDefs.size);\n const themeContext = useThemeContext();\n const {\n size = dropdownMenuContentPropDefs.size.default,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n submenuBehavior,\n virtualized = false,\n onEscapeKeyDown,\n onKeyDown,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n const resolvedColor = color || themeContext.accentColor;\n const behavior = useResolvedResponsiveValue<SubmenuBehavior>(submenuBehavior, 'cascade');\n const isDrillDown = behavior === 'drill-down';\n const open = React.useContext(DropdownMenuOpenContext);\n const drillDownStore = useCreateDrillDownStore();\n\n // Escape goes back one drill-down level before it closes the menu.\n const handleEscapeKeyDown = (event: KeyboardEvent) => {\n onEscapeKeyDown?.(event);\n if (event.defaultPrevented || !isDrillDown || drillDownStore.getDepth() === 0) return;\n event.preventDefault();\n drillDownStore.pop('keyboard');\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !isDrillDown || drillDownStore.getDepth() === 0) return;\n if (isTextEntryTarget(event.target)) return;\n if (event.key === BACK_KEYS[getDirection(event.currentTarget)]) {\n event.preventDefault();\n drillDownStore.pop('keyboard');\n }\n };\n\n const contextValue = React.useMemo(\n () => ({ size, color: resolvedColor }),\n [size, resolvedColor],\n );\n\n const contentBody = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider value={contextValue}>\n <DrillDownRoot store={drillDownStore} behavior={behavior} open={open}>\n {children}\n </DrillDownRoot>\n </DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n onEscapeKeyDown={handleEscapeKeyDown}\n onKeyDown={handleKeyDown}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-DropdownMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport', 'kui-virtualized')}>\n {contentBody}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport')}>\n {contentBody}\n </div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, id: idProp, ...props }, forwardedRef) => {\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n const id = useMenuGroupLabelId(idProp, isLevelVisible);\n if (!isLevelVisible) return null;\n return (\n <DropdownMenuPrimitive.Label\n {...props}\n id={id}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-DropdownMenuLabel', className)}\n />\n );\n },\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n // In drill-down mode, items of levels that are not on screen do not mount.\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-DropdownMenuShortcut\" />}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n // A drill-down level that is not on screen keeps its groups only to hold the open path.\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <DropdownMenuPrimitive.Group\n {...(isLevelVisible ? { 'aria-labelledby': labelledBy } : { role: 'none' })}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuGroup', 'kui-DropdownMenuGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n },\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <DropdownMenuPrimitive.RadioGroup\n {...(isLevelVisible ? { 'aria-labelledby': labelledBy } : { role: 'none' })}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuRadioGroup', 'kui-DropdownMenuRadioGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n});\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuRadioItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuRadioItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <DropdownMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuCheckboxItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuCheckboxItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <DropdownMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-DropdownMenuShortcut\" />}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {\n /**\n * Label displayed in the back button when using drill-down mode.\n * If not provided, defaults to \"Back\".\n */\n label?: React.ReactNode;\n}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = ({\n label = 'Back',\n open,\n defaultOpen,\n onOpenChange,\n children,\n}) => {\n const drillDownStore = useDrillDownStore();\n const id = React.useId();\n const subContextValue = React.useMemo(() => ({ id, label }), [id, label]);\n const isOpenInDrillDown = usePanelPosition(drillDownStore, id) !== 'closed';\n\n const handleOpenChange = useCallbackRef(onOpenChange);\n const isControlled = open !== undefined;\n\n // Drill-down, controlled: navigating asks `onOpenChange` and leaves the stack to `open`.\n React.useLayoutEffect(() => {\n if (!drillDownStore || !isControlled) return;\n drillDownStore.setController(id, handleOpenChange);\n return () => drillDownStore.setController(id, null);\n }, [drillDownStore, isControlled, id, handleOpenChange]);\n\n React.useLayoutEffect(() => {\n if (!drillDownStore || open === undefined) return;\n if (open && !drillDownStore.isOpen(id)) drillDownStore.open(id, drillDownStore.takePendingModality(id));\n else if (!open && drillDownStore.isOpen(id)) drillDownStore.close(id, drillDownStore.takePendingModality(id));\n }, [drillDownStore, open, id]);\n\n // A `defaultOpen` push on mount is the starting state, not a change to report.\n const defaultOpenRef = React.useRef(open === undefined && Boolean(defaultOpen));\n React.useLayoutEffect(() => {\n if (drillDownStore && defaultOpenRef.current) drillDownStore.open(id);\n else defaultOpenRef.current = false;\n // Only on mount, like an uncontrolled default.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Uncontrolled, the stack drives `onOpenChange`. Controlled, it reports only a close\n // the `open` prop did not ask for, such as a parent level closing.\n const wasOpenRef = React.useRef(isOpenInDrillDown);\n React.useEffect(() => {\n if (!drillDownStore || wasOpenRef.current === isOpenInDrillDown) return;\n wasOpenRef.current = isOpenInDrillDown;\n if (isOpenInDrillDown && defaultOpenRef.current) {\n defaultOpenRef.current = false;\n return;\n }\n if (open !== undefined && open === isOpenInDrillDown) return;\n handleOpenChange(isOpenInDrillDown);\n }, [drillDownStore, isOpenInDrillDown, handleOpenChange, open]);\n\n // Radix Sub stays mounted in both behaviors so switching behavior does not\n // remount the subtree. It only renders context; in drill-down its trigger\n // and content are never rendered, so it reports no open changes of its own.\n return (\n <SubContext.Provider value={subContextValue}>\n <DropdownMenuPrimitive.Sub\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={drillDownStore ? undefined : onOpenChange}\n >\n {children}\n </DropdownMenuPrimitive.Sub>\n </SubContext.Provider>\n );\n};\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, onKeyDown, ...subTriggerProps } = props;\n const drillDownStore = useDrillDownStore();\n const subContext = useSubContext();\n const isLevelVisible = React.useContext(DrillDownLevelContext);\n\n if (drillDownStore && subContext) {\n if (!isLevelVisible) return null;\n\n const handleSelect = (event: Event) => {\n // Navigating does not close the menu.\n event.preventDefault();\n drillDownStore.push(subContext.id);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || subTriggerProps.disabled) return;\n if (event.key === FORWARD_KEYS[getDirection(event.currentTarget)]) {\n event.preventDefault();\n drillDownStore.push(subContext.id, 'keyboard');\n }\n };\n\n return (\n // The row navigates within the same menu, so it announces no popup.\n <DropdownMenuPrimitive.Item\n {...subTriggerProps}\n data-drill-down-trigger={subContext.id}\n data-drill-down-name={subTriggerProps.textValue}\n onSelect={handleSelect}\n onKeyDown={handleKeyDown}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuSubTrigger',\n 'kui-DropdownMenuDrillDownSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.Item>\n );\n }\n\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n onKeyDown={onKeyDown}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => {\n if (!React.useContext(DrillDownLevelContext)) return null;\n return (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-DropdownMenuSeparator', className)}\n />\n );\n});\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\n/** The row at the top of a drill-down panel that returns to the parent level. */\nfunction DrillDownBackItem({ label, name }: { label: React.ReactNode; name: string }) {\n const drillDownStore = useDrillDownStore();\n\n const handleSelect = React.useCallback(\n (event: Event) => {\n // Navigating does not close the menu.\n event.preventDefault();\n drillDownStore?.pop();\n },\n [drillDownStore],\n );\n\n // The visible label is often the submenu title, so the accessible name says\n // what the row does while still containing the visible text.\n const labelText = typeof label === 'string' ? label : name;\n const ariaLabel = labelText && labelText !== 'Back' ? `Back from ${labelText}` : undefined;\n\n return (\n <DropdownMenuPrimitive.Item\n aria-label={ariaLabel}\n textValue={labelText || 'Back'}\n onSelect={handleSelect}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-DropdownMenuItem',\n 'kui-DropdownMenuDrillDownBackItem',\n )}\n >\n <ThickChevronLeftIcon className=\"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon\" />\n <span className=\"kui-DropdownMenuDrillDownBackLabel\">{label}</span>\n </DropdownMenuPrimitive.Item>\n );\n}\n\n/** Radix positioning and layer props that have no meaning for an inline drill-down panel. */\ntype PopperOnlyProps =\n | 'loop'\n | 'onEscapeKeyDown'\n | 'onPointerDownOutside'\n | 'onFocusOutside'\n | 'onInteractOutside'\n | 'sideOffset'\n | 'alignOffset'\n | 'avoidCollisions'\n | 'collisionBoundary'\n | 'collisionPadding'\n | 'arrowPadding'\n | 'sticky'\n | 'hideWhenDetached'\n | 'updatePositionStrategy';\n\nfunction omitPopperProps<T extends Record<string, unknown>>(props: T): Omit<T, PopperOnlyProps> {\n const {\n loop: _loop,\n onEscapeKeyDown: _onEscapeKeyDown,\n onPointerDownOutside: _onPointerDownOutside,\n onFocusOutside: _onFocusOutside,\n onInteractOutside: _onInteractOutside,\n sideOffset: _sideOffset,\n alignOffset: _alignOffset,\n avoidCollisions: _avoidCollisions,\n collisionBoundary: _collisionBoundary,\n collisionPadding: _collisionPadding,\n arrowPadding: _arrowPadding,\n sticky: _sticky,\n hideWhenDetached: _hideWhenDetached,\n updatePositionStrategy: _updatePositionStrategy,\n ...rest\n } = props;\n return rest;\n}\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper so a VirtualMenu can handle its own\n * scrolling. Applies to cascade submenus; a drill-down panel scrolls with the\n * root content.\n */\n virtualized?: boolean;\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n const drillDownStore = useDrillDownStore();\n const subContext = useSubContext();\n\n if (drillDownStore && subContext) {\n return (\n <DrillDownPanel {...props} ref={forwardedRef} store={drillDownStore} sub={subContext} />\n );\n }\n return <CascadeSubContent {...props} ref={forwardedRef} />;\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\nconst CascadeSubContent = React.forwardRef<DropdownMenuSubContentElement, DropdownMenuSubContentProps>(\n (props, forwardedRef) => {\n const parent = React.useContext(DropdownMenuContentContext);\n\n // A submenu inherits the parent surface, and its own props win.\n const size = props.size ?? parent.size;\n const color = props.color ?? parent.color;\n\n const {\n className,\n children,\n container,\n forceMount,\n color: _color,\n virtualized = false,\n ...subContentProps\n } = extractProps({ ...props, size }, dropdownMenuSubContentPropDefs);\n\n const scalarSize = useResolvedResponsiveValue(size, dropdownMenuSubContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color }),\n [size, color],\n );\n\n const body = (\n <MenuProvider size={size}>\n <DropdownMenuContentContext.Provider value={contextValue}>{children}</DropdownMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n alignOffset={getMenuAlignOffset(scalarSize)}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-BaseMenuSubContent',\n 'kui-DropdownMenuContent',\n 'kui-DropdownMenuSubContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-DropdownMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nCascadeSubContent.displayName = 'DropdownMenu.CascadeSubContent';\n\ninterface DrillDownPanelProps extends DropdownMenuSubContentProps {\n store: NonNullable<ReturnType<typeof useDrillDownStore>>;\n sub: NonNullable<ReturnType<typeof useSubContext>>;\n}\n\n/**\n * A submenu rendered inline in drill-down mode. It mounts its children only\n * while it is on the navigation stack, and shows its own items only while it\n * is the top level; deeper panels inside it stay mounted.\n */\nconst DrillDownPanel = React.forwardRef<DropdownMenuSubContentElement, DrillDownPanelProps>(\n ({ store, sub, ...props }, forwardedRef) => {\n const position = usePanelPosition(store, sub.id);\n const entry = useStackEntry(store, sub.id);\n\n if (position === 'closed') return null;\n\n const {\n className,\n children,\n container: _container,\n forceMount: _forceMount,\n virtualized: _virtualized,\n size: _size,\n color: _color,\n ...panelProps\n } = omitPopperProps(props);\n\n const isTop = position === 'top';\n const name = entry?.name || (typeof sub.label === 'string' ? sub.label : '');\n\n return (\n <div\n role=\"group\"\n aria-label={name || undefined}\n {...panelProps}\n ref={forwardedRef}\n data-drill-down-panel={sub.id}\n data-drill-down-active={isTop ? true : undefined}\n className={classNames('kui-DropdownMenuDrillDownPanel', className)}\n >\n {isTop && (\n <>\n <DrillDownBackItem label={sub.label} name={name} />\n <DropdownMenuPrimitive.Separator className=\"kui-BaseMenuSeparator kui-DropdownMenuSeparator\" />\n </>\n )}\n <MenuGroupLabelProvider value={null}>\n <DrillDownLevelContext.Provider value={isTop}>{children}</DrillDownLevelContext.Provider>\n </MenuGroupLabelProvider>\n </div>\n );\n },\n);\nDrillDownPanel.displayName = 'DropdownMenu.DrillDownPanel';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>(({ className, ...props }, forwardedRef) => (\n <ChevronDownIcon\n {...props}\n ref={forwardedRef}\n className={classNames('kui-DropdownMenuTriggerIcon', className)}\n />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n SubmenuBehavior,\n};\n"],
5
- "mappings": ";0lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,YAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,eAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,QAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,YAAAC,GAAA,gBAAAC,KAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,gBAAgBC,EAAuB,QAAAC,MAAY,WAC5D,OAAS,kBAAAC,OAAsB,oBAgD/B,IAAMC,GAAgC,gBAAc,EAAK,EAInDC,GAAqDC,GAAU,CACnE,GAAM,CAAE,KAAMC,EAAU,YAAAC,EAAc,GAAO,aAAAC,CAAa,EAAIH,EACxD,CAACI,EAAkBC,CAAmB,EAAU,WAASH,CAAW,EACpEI,EAAOL,GAAYG,EAEnBG,EAAuBC,GAA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AAU,SAAWA,EAAI,MAAQ,IAEzE,OACE,gBAAC,OACC,KAAK,QACL,aAAY/B,GAAQ,OACnB,GAAGuC,EACJ,IAAK7H,EACL,wBAAuBqH,EAAI,GAC3B,yBAAwBS,EAAQ,GAAO,OACvC,UAAWtF,EAAW,iCAAkCxB,CAAS,GAEhE8G,GACC,gCACE,gBAACzC,GAAA,CAAkB,MAAOgC,EAAI,MAAO,KAAM/B,EAAM,EACjD,gBAACzF,EAAsB,UAAtB,CAAgC,UAAU,kDAAkD,CAC/F,EAEF,gBAAC+D,EAAA,CAAuB,MAAO,MAC7B,gBAACf,EAAsB,SAAtB,CAA+B,MAAOiF,GAAQ/H,CAAS,CAC1D,CACF,CAEJ,CACF,EACA4G,GAAe,YAAc,8BAI7B,IAAMoB,GAAgC,aAGpC,CAAC,CAAE,UAAA/G,EAAW,GAAGhC,CAAM,EAAGgB,IAC1B,gBAACgI,EAAA,CACE,GAAGhJ,EACJ,IAAKgB,EACL,UAAWwC,EAAW,8BAA+BxB,CAAS,EAChE,CACD,EACD+G,GAAwB,YAAc",
6
- "names": ["dropdown_menu_exports", "__export", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuRoot", "DropdownMenuSeparator", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "DropdownMenuTriggerIcon", "React", "classNames", "DropdownMenuPrimitive", "Slot", "useCallbackRef", "DropdownMenuOpenContext", "DropdownMenuRoot", "props", "openProp", "defaultOpen", "onOpenChange", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChangeProp", "useCallbackRef", "handleOpenChange", "next", "close", "MenuCloseProvider", "DropdownMenuPrimitive", "DropdownMenuTrigger", "children", "forwardedRef", "requireReactElement", "DropdownMenuContentContext", "BACK_KEYS", "FORWARD_KEYS", "isTextEntryTarget", "target", "getDirection", "element", "DropdownMenuContent", "ownProps", "useThemeSizeProps", "baseMenuContentPropDefs", "themeContext", "useThemeContext", "size", "className", "color", "container", "forceMount", "submenuBehavior", "virtualized", "onEscapeKeyDown", "onKeyDown", "contentProps", "extractProps", "resolvedColor", "behavior", "useResolvedResponsiveValue", "isDrillDown", "drillDownStore", "useCreateDrillDownStore", "handleEscapeKeyDown", "event", "handleKeyDown", "contextValue", "contentBody", "MenuProvider", "DrillDownRoot", "Theme", "classNames", "ScrollArea", "DropdownMenuLabel", "idProp", "isLevelVisible", "DrillDownLevelContext", "id", "useMenuGroupLabelId", "DropdownMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "toAriaKeyShortcuts", "Slot", "MenuShortcut", "DropdownMenuGroup", "ariaLabelledBy", "labelledBy", "setLabelId", "useMenuGroupLabelledBy", "MenuGroupLabelProvider", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "DropdownMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "DropdownMenuSub", "label", "useDrillDownStore", "subContextValue", "isOpenInDrillDown", "usePanelPosition", "isControlled", "defaultOpenRef", "wasOpenRef", "SubContext", "DropdownMenuSubTrigger", "subTriggerProps", "subContext", "useSubContext", "handleSelect", "ThickChevronRightIcon", "DropdownMenuSeparator", "DrillDownBackItem", "name", "labelText", "ariaLabel", "ThickChevronLeftIcon", "omitPopperProps", "_loop", "_onEscapeKeyDown", "_onPointerDownOutside", "_onFocusOutside", "_onInteractOutside", "_sideOffset", "_alignOffset", "_avoidCollisions", "_collisionBoundary", "_collisionPadding", "_arrowPadding", "_sticky", "_hideWhenDetached", "_updatePositionStrategy", "rest", "DropdownMenuSubContent", "DrillDownPanel", "CascadeSubContent", "parent", "_color", "subContentProps", "baseMenuSubContentPropDefs", "scalarSize", "body", "getMenuAlignOffset", "store", "sub", "position", "entry", "useStackEntry", "_container", "_forceMount", "_virtualized", "_size", "panelProps", "isTop", "DropdownMenuTriggerIcon", "ChevronDownIcon"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/sheet.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * Sheet\n *\n * A side-placed overlay built on top of Radix Dialog. It inherits accessibility,\n * focus management, overlay behavior, and sizing scales from the base dialog, and\n * adds side placement and slide motion suited for navigation panels and drawers.\n *\n * Structure mirrors Dialog:\n * - Root, Trigger, Content, Title, Description, Close\n *\n * Notes\n * - Side: set with `side` on `Sheet.Content`. Aliases: `left` \u2192 `start`, `right` \u2192 `end`.\n * - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Size follows the\n * Theme size; start/end sheets cap at the size's overlay width unless maxWidth is set.\n * - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.\n * Radix owns the focus trap, initial focus and the return of focus to the trigger.\n *\n * Example\n * <Sheet.Root>\n * <Sheet.Trigger>\n * <Button>Open</Button>\n * </Sheet.Trigger>\n * <Sheet.Content side=\"end\" width={{ initial: '280px', md: '360px' }}>\n * <Sheet.Title>Details</Sheet.Title>\n * ...\n * <Sheet.Close>\n * <Button>Close</Button>\n * </Sheet.Close>\n * </Sheet.Content>\n * </Sheet.Root>\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport { Theme } from './theme.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { HeadingProps } from './heading.js';\n\n/**\n * Supported sides for the Sheet.\n * Aliases are normalized RTL-aware: `left` \u2192 `start`, `right` \u2192 `end`.\n */\ntype SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Sheet is a side-placed overlay built on the Dialog primitive.\n * It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.\n */\n\n// Root\n/**\n * Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).\n */\ninterface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst Root: React.FC<SheetRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nRoot.displayName = 'Sheet.Root';\n\n// Trigger\n/** Element type for `Sheet.Trigger`. */\ntype SheetTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\n/** Props for `Sheet.Trigger` (expects a single element child). */\ninterface SheetTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst Trigger = React.forwardRef<SheetTriggerElement, SheetTriggerProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Trigger {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nTrigger.displayName = 'Sheet.Trigger';\n\n// Content\n/** Element type for `Sheet.Content`. */\n// Reuse dialog content prop defs for size/width/height tokens.\n// Built once at module scope: `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them every time a sheet renders.\nconst { align: _alignPropDef, ...dialogPropDefsForSheet } = dialogContentPropDefs;\nconst sheetPropDefs = dialogPropDefsForSheet;\n\n/** Counts the Sheet.Title elements mounted inside a Sheet.Content, for the dev-only name check. */\nconst SheetTitleCountContext = React.createContext<React.MutableRefObject<number> | null>(null);\n\ntype SheetContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface SheetContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n Omit<DialogContentOwnProps, 'align'> {\n /** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */\n side?: SheetSide;\n /** Optional DOM container to portal into. Defaults to `document.body`. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n\n/**\n * Renders the Sheet panel. Normalizes left/right to logical start/end and\n * forwards dialog sizing props. Provide an accessible name via `Sheet.Title`\n * or `aria-label`.\n */\nconst Content = React.forwardRef<SheetContentElement, SheetContentProps>((allProps, forwardedRef) => {\n const { side = 'start', forceMount, container, className, ...ownProps } = allProps;\n const restProps = useThemeSizeProps(ownProps, sheetPropDefs.size);\n const normalizedSideMap: Record<SheetSide, 'start' | 'end' | 'top' | 'bottom'> = {\n left: 'start',\n right: 'end',\n start: 'start',\n end: 'end',\n top: 'top',\n bottom: 'bottom',\n };\n const normalizedSide = normalizedSideMap[side];\n // Size/width/height class names come from the dialog defs \u2014 see `sheetPropDefs`.\n const { className: extractedClassName, ...contentProps } = extractProps(restProps, sheetPropDefs);\n\n // Dev-only a11y guard: the panel needs a name. A Sheet.Title anywhere inside counts it\n // in a layout effect, which runs before this ref is attached, so nesting doesn't matter.\n const titleCountRef = React.useRef(0);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n if (process.env.NODE_ENV !== 'production' && node) {\n const hasName = titleCountRef.current > 0 || Boolean(node.getAttribute('aria-label')) || Boolean(node.getAttribute('aria-labelledby'));\n if (!hasName) {\n console.warn('Sheet.Content: Missing accessible name. Include Sheet.Title inside it or provide aria-label.');\n }\n }\n },\n [forwardedRef],\n );\n\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <SheetTitleCountContext.Provider value={titleCountRef}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay\">\n <DialogPrimitive.Content\n {...contentProps}\n ref={combinedRef}\n className={classNames('kui-BaseDialogContent', 'kui-SheetContent', className, extractedClassName)}\n data-side={normalizedSide}\n aria-modal=\"true\"\n />\n </DialogPrimitive.Overlay>\n </Theme>\n </SheetTitleCountContext.Provider>\n </DialogPrimitive.Portal>\n );\n});\nContent.displayName = 'Sheet.Content';\n\n// Title - renders as Heading with sensible defaults\ntype SheetTitleElement = React.ElementRef<typeof Heading>;\ntype SheetTitleProps = HeadingProps;\n/** Accessible title for the Sheet. Renders as Heading with sensible defaults. */\nconst Title = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ size = '4', weight = 'medium', ...props }, ref) => {\n const titleCountRef = React.useContext(SheetTitleCountContext);\n React.useLayoutEffect(() => {\n if (!titleCountRef) return;\n titleCountRef.current += 1;\n return () => {\n titleCountRef.current -= 1;\n };\n }, [titleCountRef]);\n return (\n <DialogPrimitive.Title asChild>\n <Heading ref={ref} size={size} weight={weight} {...props} />\n </DialogPrimitive.Title>\n );\n});\nTitle.displayName = 'Sheet.Title';\n\n// Description - renders as Text with sensible defaults\ntype SheetDescriptionElement = React.ElementRef<typeof Text>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof Text>;\n/** Supplementary description text for Sheet content. Renders as Text with sensible defaults. */\nconst Description = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(({ size = '2', emphasis = 'medium', ...rest }, ref) => (\n <DialogPrimitive.Description asChild>\n <Text ref={ref} size={size} emphasis={emphasis} {...rest} />\n </DialogPrimitive.Description>\n));\nDescription.displayName = 'Sheet.Description';\n\ntype SheetCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface SheetCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\n/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */\nconst Close = React.forwardRef<SheetCloseElement, SheetCloseProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Close {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nClose.displayName = 'Sheet.Close';\n\nexport { Root, Trigger, Content, Title, Description, Close };\nexport type {\n SheetRootProps as RootProps,\n SheetTriggerProps as TriggerProps,\n SheetContentProps as ContentProps,\n SheetTitleProps as TitleProps,\n SheetDescriptionProps as DescriptionProps,\n SheetCloseProps as CloseProps,\n};\n"],
5
- "mappings": ";mWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAkCA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WA+B1C,IAAMC,EAAkCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EACzFD,EAAK,YAAc,aAOnB,IAAMG,EAAgB,aAAmD,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IAChG,gBAACH,EAAgB,QAAhB,CAAyB,GAAGD,EAAO,IAAKI,EAAK,QAAO,IAClDC,EAAoBF,CAAQ,CAC/B,CACD,EACDD,EAAQ,YAAc,gBAQtB,GAAM,CAAE,MAAOI,EAAe,GAAGC,CAAuB,EAAIC,EACtDC,EAAgBF,EAGhBG,EAA+B,gBAAqD,IAAI,EAiBxFC,EAAgB,aAAmD,CAACC,EAAUC,IAAiB,CACnG,GAAM,CAAE,KAAAC,EAAO,QAAS,WAAAC,EAAY,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAS,EAAIN,EACpEO,EAAYC,EAAkBF,EAAUT,EAAc,IAAI,EAS1DY,EAR2E,CAC/E,KAAM,QACN,MAAO,MACP,MAAO,QACP,IAAK,MACL,IAAK,MACL,OAAQ,QACV,EACyCP,CAAI,EAEvC,CAAE,UAAWQ,EAAoB,GAAGC,CAAa,EAAIC,EAAaL,EAAWV,CAAa,EAI1FgB,EAAsB,SAAO,CAAC,EAC9BC,EAAoB,cACvBC,GAAgC,CAC3B,OAAOd,GAAiB,WAC1BA,EAAac,CAAI,EACRd,IACTA,EAAa,QAAUc,EAQ3B,EACA,CAACd,CAAY,CACf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C,EAAoBF,CAAQ,CAC/B,CACD,EACDoC,EAAM,YAAc",
6
- "names": ["sheet_exports", "__export", "Close", "Content", "Description", "Root", "Title", "Trigger", "React", "classNames", "DialogPrimitive", "Root", "props", "DialogPrimitive", "Trigger", "children", "ref", "requireReactElement", "_alignPropDef", "dialogPropDefsForSheet", "dialogContentPropDefs", "sheetPropDefs", "SheetTitleCountContext", "Content", "allProps", "forwardedRef", "side", "forceMount", "container", "className", "ownProps", "restProps", "useThemeSizeProps", "normalizedSide", "extractedClassName", "contentProps", "extractProps", "titleCountRef", "combinedRef", "node", "useBodyPointerEventsCleanup", "Theme", "classNames", "Title", "size", "weight", "Heading", "Description", "emphasis", "rest", "Text", "Close"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{b as O,c as z}from"./chunk-GE7FRBZ4.js";import{a as N}from"./chunk-DQCE7DHY.js";import{b as E,c as w}from"./chunk-GKDGNPBD.js";import{c as C}from"./chunk-HBWBPBSA.js";import{b as x}from"./chunk-5ON3XLRD.js";import{a as L}from"./chunk-KOAWATCI.js";import{b as D}from"./chunk-XU74PNM2.js";import{c as g}from"./chunk-OKQAVYW4.js";import{a as q}from"./chunk-VQPANPMI.js";var $={};q($,{Content:()=>W,Group:()=>H,Item:()=>K,Label:()=>j,Root:()=>A,Separator:()=>U,Trigger:()=>B});import*as e from"react";import S from"classnames";import{Select as r,ScrollArea as R}from"radix-ui";var J=["1","2","3","4"],v={size:{type:"enum",className:"kui-r-size",values:J,default:"2",responsive:!0}},Q=["raised","surface","soft","outline","ghost"],G={variant:{type:"enum",className:"kui-variant",values:Q,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...C,...D,placeholder:{type:"ReactNode"}},M={...C};var V={size:v.size},X=[" ","Enter","ArrowUp","ArrowDown"],h=e.createContext({}),A=o=>{let{children:t,size:a,open:s,defaultOpen:n,onOpenChange:c,...f}=o,p=x(a,v.size),[P,i]=e.useState(n??!1),m=s??P,u=e.useCallback(d=>{i(d),c?.(d)},[c]);return e.createElement(r.Root,{...f,open:m,onOpenChange:u},e.createElement(h.Provider,{value:e.useMemo(()=>({size:p,open:m}),[p,m])},t))};A.displayName="Select.Root";var B=e.forwardRef((o,t)=>{let a=e.useContext(h),{children:s,className:n,color:c,radius:f,placeholder:p,error:P,loading:i,disabled:m,readOnly:u,...d}=g({size:a?.size,...o},V,G),{"aria-invalid":y,"aria-busy":b,"aria-disabled":T,"aria-readonly":k}=d,I=!!P||y===!0||y==="true",Y=e.useMemo(()=>({"aria-invalid":I?!0:y,"aria-busy":i||b,"aria-disabled":m||T,"aria-readonly":u||k}),[I,y,i,b,m,T,u,k]),F=!!(u||i)?{onPointerDown:l=>l.preventDefault(),onClick:l=>{l.preventDefault(),l.currentTarget.focus()},onKeyDown:l=>{let _=l.ctrlKey||l.altKey||l.metaKey;(X.includes(l.key)||!_&&l.key.length===1)&&l.preventDefault()}}:void 0;return e.createElement(r.Trigger,{asChild:!0,disabled:m,...F},e.createElement("button",{"data-accent-color":c,"data-radius":f,"data-error":P,"data-loading":i,...d,...Y,ref:t,className:S("kui-reset","kui-SelectTrigger",n)},e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement(r.Value,{placeholder:p},s)),e.createElement(r.Icon,{asChild:!0},i?e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(N,null)):e.createElement(w,{className:"kui-SelectIcon"}))))});B.displayName="Select.Trigger";var W=e.forwardRef((o,t)=>{let a=e.useContext(h),{className:s,children:n,color:c,container:f,...p}=g({size:a?.size,...o},V,M),P=O();if(a.open===!1&&!p.forceMount)return e.createElement(r.Portal,{container:f},e.createElement(r.Content,{...p,asChild:!1,ref:t},n));let i=c||P.accentColor;return e.createElement(r.Portal,{container:f},e.createElement(z,{asChild:!0},e.createElement(r.Content,{"data-accent-color":i,sideOffset:4,...p,asChild:!1,ref:t,className:S("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-SelectContent",s)},e.createElement(Z,null,n))))});W.displayName="Select.Content";function Z({children:o}){let t=L();return e.createElement(R.Root,{type:"auto",className:"kui-ScrollAreaRoot"},e.createElement(r.Viewport,{asChild:!0,className:S("kui-BaseMenuViewport","kui-SelectViewport")},e.createElement(R.Viewport,{ref:t,className:"kui-ScrollAreaViewport",style:{overflowY:void 0}},o)),e.createElement(R.Scrollbar,{className:"kui-ScrollAreaScrollbar",orientation:"vertical"},e.createElement(R.Thumb,{className:"kui-ScrollAreaThumb"})))}var K=e.forwardRef((o,t)=>{let{className:a,children:s,...n}=o,c=typeof s!="string";return e.createElement(r.Item,{...n,asChild:!1,ref:t,className:S("kui-reset","kui-BaseMenuItem","kui-SelectItem",{"kui-SelectItemRich":c},a)},e.createElement(r.ItemIndicator,{className:"kui-SelectItemIndicator"},e.createElement(E,{className:"kui-SelectItemIndicatorIcon"})),e.createElement(r.ItemText,null,s))});K.displayName="Select.Item";var H=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Group,{...t,asChild:!1,ref:a,className:S("kui-SelectGroup",o)}));H.displayName="Select.Group";var j=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Label,{...t,asChild:!1,ref:a,className:S("kui-BaseMenuLabel","kui-SelectLabel",o)}));j.displayName="Select.Label";var U=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Separator,{...t,asChild:!1,ref:a,className:S("kui-BaseMenuSeparator","kui-SelectSeparator",o)}));U.displayName="Select.Separator";export{A as a,B as b,W as c,K as d,H as e,j as f,U as g,$ as h};
3
- //# sourceMappingURL=chunk-5MEWNLNH.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/select.tsx", "../../src/components/select.props.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.js';\nimport {\n selectRootPropDefs,\n selectTriggerPropDefs,\n selectContentPropDefs,\n} from './select.props.js';\nimport { useThemeContext, Theme } from './theme.js';\nimport { useThumbSync } from '../hooks/use-thumb-sync.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype SelectRootOwnProps = GetPropDefTypes<typeof selectRootPropDefs>;\n\n// Trigger and Content pass the size prop def as its own record. It is hoisted because\n// extractProps caches its compiled prop defs on the identity of each record it is given:\n// a literal written at the call site would be a new object, and a recompile, every render.\nconst selectSizePropDefs = { size: selectRootPropDefs.size };\n\n// Keys that open the list from the trigger, as in Radix.\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\n\ninterface SelectContextValue extends SelectRootOwnProps {\n /** Whether the list is open. Undefined when Content is rendered outside a Kookie Select.Root. */\n open?: boolean;\n}\nconst SelectContext = React.createContext<SelectContextValue>({});\n\ninterface SelectRootProps extends SelectPrimitive.SelectProps, SelectRootOwnProps {}\nconst SelectRoot: React.FC<SelectRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n open: openProp,\n defaultOpen,\n onOpenChange,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, selectRootPropDefs.size);\n\n // Root owns the open state and hands Radix a controlled `open`, so Content learns of a\n // change in the same render Radix does. Radix's uncontrolled state reports changes from an\n // effect, a render late, which would mount the open list once without its wrappers.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);\n const open = openProp ?? uncontrolledOpen;\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n return (\n <SelectPrimitive.Root {...rootProps} open={open} onOpenChange={handleOpenChange}>\n <SelectContext.Provider value={React.useMemo(() => ({ size, open }), [size, open])}>\n {children}\n </SelectContext.Provider>\n </SelectPrimitive.Root>\n );\n};\nSelectRoot.displayName = 'Select.Root';\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerOwnProps = GetPropDefTypes<typeof selectTriggerPropDefs>;\ninterface SelectTriggerProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Trigger, RemovedProps>,\n SelectTriggerOwnProps {}\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const {\n children,\n className,\n color,\n radius,\n placeholder,\n error,\n loading,\n disabled,\n readOnly,\n ...triggerProps\n } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectTriggerPropDefs,\n );\n\n // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid)\n // stays, so both paths reach the accessibility tree and the CSS, as on TextField.\n const {\n 'aria-invalid': ariaInvalid,\n 'aria-busy': ariaBusy,\n 'aria-disabled': ariaDisabled,\n 'aria-readonly': ariaReadOnly,\n } = triggerProps;\n const isInvalid = Boolean(error) || ariaInvalid === true || ariaInvalid === 'true';\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-busy': loading || ariaBusy,\n 'aria-disabled': disabled || ariaDisabled,\n 'aria-readonly': readOnly || ariaReadOnly,\n }),\n [isInvalid, ariaInvalid, loading, ariaBusy, disabled, ariaDisabled, readOnly, ariaReadOnly],\n );\n\n // Read-only and loading triggers stay focusable but do not open or take typeahead,\n // as on Combobox. Radix skips its own handler when the event is default-prevented.\n const isBlocked = Boolean(readOnly || loading);\n const blockedHandlers = isBlocked\n ? {\n onPointerDown: (event: React.PointerEvent<HTMLButtonElement>) => event.preventDefault(),\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.currentTarget.focus();\n },\n onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (OPEN_KEYS.includes(event.key) || (!isModifierKey && event.key.length === 1)) {\n event.preventDefault();\n }\n },\n }\n : undefined;\n\n return (\n // `disabled` goes to Radix, which merges it with Root's and sets the native attribute.\n <SelectPrimitive.Trigger asChild disabled={disabled} {...blockedHandlers}>\n <button\n data-accent-color={color}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n {...triggerProps}\n {...ariaProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', className)}\n >\n <span className=\"kui-SelectTriggerInner\">\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n </span>\n <SelectPrimitive.Icon asChild>\n {loading ? (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n ) : (\n <ChevronDownIcon className=\"kui-SelectIcon\" />\n )}\n </SelectPrimitive.Icon>\n </button>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = 'Select.Trigger';\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentOwnProps = GetPropDefTypes<typeof selectContentPropDefs>;\ninterface SelectContentProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Content, RemovedProps>,\n SelectContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>['container'];\n}\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const { className, children, color, container, ...contentProps } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectContentPropDefs,\n );\n const themeContext = useThemeContext();\n\n // While closed, Radix still renders Content's children, into a detached fragment: the\n // items must exist for the trigger's value label, typeahead and the native form select.\n // Nothing in that fragment is ever shown, so the theme wrapper and the scroll area, with\n // its two resize observers, are left out until the list opens.\n if (context.open === false && !contentProps.forceMount) {\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content {...contentProps} asChild={false} ref={forwardedRef}>\n {children}\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n }\n\n const resolvedColor = color || themeContext.accentColor;\n return (\n <SelectPrimitive.Portal container={container}>\n <Theme asChild>\n <SelectPrimitive.Content\n data-accent-color={resolvedColor}\n sideOffset={4}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-SelectContent',\n className,\n )}\n >\n <SelectScrollArea>{children}</SelectScrollArea>\n </SelectPrimitive.Content>\n </Theme>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = 'Select.Content';\n\n/** The open list's scroll area. Its own component so the thumb sync hook runs only while open. */\nfunction SelectScrollArea({ children }: { children: React.ReactNode }) {\n const setThumbViewport = useThumbSync<HTMLDivElement>();\n return (\n <ScrollAreaPrimitive.Root type=\"auto\" className=\"kui-ScrollAreaRoot\">\n <SelectPrimitive.Viewport\n asChild\n className={classNames('kui-BaseMenuViewport', 'kui-SelectViewport')}\n >\n <ScrollAreaPrimitive.Viewport\n ref={setThumbViewport}\n className=\"kui-ScrollAreaViewport\"\n style={{ overflowY: undefined }}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar className=\"kui-ScrollAreaScrollbar\" orientation=\"vertical\">\n <ScrollAreaPrimitive.Thumb className=\"kui-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n );\n}\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ninterface SelectItemProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Item, RemovedProps> {}\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>((props, forwardedRef) => {\n const { className, children, ...itemProps } = props;\n\n // Detect if this is rich content (not just a string)\n const isRichContent = typeof children !== 'string';\n\n return (\n <SelectPrimitive.Item\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-SelectItem',\n { 'kui-SelectItemRich': isRichContent },\n className,\n )}\n >\n <SelectPrimitive.ItemIndicator className=\"kui-SelectItemIndicator\">\n <ThickCheckIcon className=\"kui-SelectItemIndicatorIcon\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n});\nSelectItem.displayName = 'Select.Item';\n\ntype SelectGroupElement = React.ElementRef<typeof SelectPrimitive.Group>;\ninterface SelectGroupProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Group, RemovedProps> {}\nconst SelectGroup = React.forwardRef<SelectGroupElement, SelectGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-SelectGroup', className)}\n />\n ),\n);\nSelectGroup.displayName = 'Select.Group';\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ninterface SelectLabelProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Label, RemovedProps> {}\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-SelectLabel', className)}\n />\n ),\n);\nSelectLabel.displayName = 'Select.Label';\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ninterface SelectSeparatorProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Separator, RemovedProps> {}\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-SelectSeparator', className)}\n />\n ),\n);\nSelectSeparator.displayName = 'Select.Separator';\n\nexport {\n SelectRoot as Root,\n SelectTrigger as Trigger,\n SelectContent as Content,\n SelectItem as Item,\n SelectGroup as Group,\n SelectLabel as Label,\n SelectSeparator as Separator,\n};\n\nexport type {\n SelectRootProps as RootProps,\n SelectTriggerProps as TriggerProps,\n SelectContentProps as ContentProps,\n SelectItemProps as ItemProps,\n SelectGroupProps as GroupProps,\n SelectLabelProps as LabelProps,\n SelectSeparatorProps as SeparatorProps,\n};\n", "import type React from 'react';\n\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst selectRootPropDefs = {\n size: { type: 'enum', className: 'kui-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\nconst selectTriggerPropDefs = {\n variant: { type: 'enum', className: 'kui-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 placeholder: { type: 'ReactNode' },\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 placeholder: PropDef<React.ReactNode>;\n};\n\n\nconst selectContentPropDefs = {\n ...colorPropDef,\n} satisfies {\n};\n\nexport { selectRootPropDefs, selectTriggerPropDefs, selectContentPropDefs };\n"],
5
- "mappings": ";sXAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EA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pB,CAAS,EACzE,CAEJ,EACAwC,EAAY,YAAc,eAK1B,IAAMC,EAAwB,aAC5B,CAAC,CAAE,UAAAzC,EAAW,GAAGlB,CAAM,EAAGgB,IACxB,gBAACF,EAAgB,UAAhB,CACE,GAAGd,EACJ,QAAS,GACT,IAAKgB,EACL,UAAWsB,EAAW,wBAAyB,sBAAuBpB,CAAS,EACjF,CAEJ,EACAyC,EAAgB,YAAc",
6
- "names": ["select_exports", "__export", "SelectContent", "SelectGroup", "SelectItem", "SelectLabel", "SelectRoot", "SelectSeparator", "SelectTrigger", "React", "classNames", "SelectPrimitive", "ScrollAreaPrimitive", "sizes", "selectRootPropDefs", "triggerVariants", "selectTriggerPropDefs", "colorPropDef", "radiusPropDef", "selectContentPropDefs", "selectSizePropDefs", "selectRootPropDefs", "OPEN_KEYS", "SelectContext", "SelectRoot", "props", "children", "sizeProp", "openProp", "defaultOpen", "onOpenChange", "rootProps", "size", "useThemeSize", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChange", "next", "SelectPrimitive", "SelectTrigger", "forwardedRef", "context", "className", "color", "radius", "placeholder", "error", "loading", "disabled", "readOnly", "triggerProps", "extractProps", "selectTriggerPropDefs", "ariaInvalid", "ariaBusy", "ariaDisabled", "ariaReadOnly", "isInvalid", "ariaProps", "blockedHandlers", "event", "isModifierKey", "classNames", "Spinner", "ChevronDownIcon", "SelectContent", "container", "contentProps", "selectContentPropDefs", "themeContext", "useThemeContext", "resolvedColor", "Theme", "SelectScrollArea", "setThumbViewport", "useThumbSync", "ScrollAreaPrimitive", "SelectItem", "itemProps", "isRichContent", "ThickCheckIcon", "SelectGroup", "SelectLabel", "SelectSeparator"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as se,b as ie}from"./chunk-RD4T2MCC.js";import{a as ae}from"./chunk-TGRHRMQI.js";import{a as ne}from"./chunk-WUCBFB25.js";import{b as te,c as re}from"./chunk-GE7FRBZ4.js";import{a as Y}from"./chunk-DQCE7DHY.js";import{b as Z,c as ee}from"./chunk-GKDGNPBD.js";import{c as W}from"./chunk-HBWBPBSA.js";import{c as X}from"./chunk-5KMEUZWN.js";import{b as oe}from"./chunk-5ON3XLRD.js";import{b as J}from"./chunk-XU74PNM2.js";import{a as Q}from"./chunk-LPLW7OWA.js";import{a as I}from"./chunk-L54FWKJE.js";import{c as O}from"./chunk-OKQAVYW4.js";import{a as Le}from"./chunk-VQPANPMI.js";var je={};Le(je,{Content:()=>ye,Empty:()=>Se,Group:()=>Ve,Input:()=>Re,Item:()=>Te,Label:()=>Ee,List:()=>ve,Root:()=>Pe,Separator:()=>ke,Trigger:()=>ge,Value:()=>he});import*as e from"react";import d from"classnames";import{Popover as me}from"radix-ui";import{useCallbackRef as H,useComposedRefs as pe,useControllableState as A,useLayoutEffect as K}from"radix-ui/internal";import{Command as T,useCommandState as ce}from"cmdk";var Oe=["1","2","3","4"],G={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0}},ze=["raised","surface","soft","outline","ghost"],le={variant:{type:"enum",className:"kui-variant",values:ze,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...W,...J,width:I.width,placeholder:{type:"string"}},Me=["1","2","3","4"],z={size:{type:"enum",className:"kui-r-size",values:Me,default:"2",responsive:!0},...W,width:I.width,minWidth:I.minWidth,maxWidth:{...I.maxWidth,default:"480px"},...Q};var Fe={size:G.size},Be={size:z.size},be=new Set;function We(o){be.has(o)||(be.add(o),console.warn(o))}function Ge(o){let r=o,t=new Set;return{get:()=>r,set:a=>{Object.is(a,r)||(r=a,t.forEach(n=>n()))},subscribe:a=>(t.add(a),()=>{t.delete(a)})}}var ue=e.createContext(null),M=o=>{let r=e.useContext(ue);if(!r)throw new Error(`Combobox.${o} must be used within Combobox.Root`);return r},de=e.createContext(null),fe=e.createContext(null),Ce=e.createContext(null),xe=()=>e.useContext(Ce);function Ae(o){let r=o.getAttribute("aria-label")?.trim();if(r)return r;let t=o.getAttribute("aria-labelledby");if(t){let n=t.split(/\s+/).map(s=>o.ownerDocument.getElementById(s)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let a=o.labels;if(a&&a.length>0){let n=Array.from(a).map(s=>s.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}}var Pe=o=>{let{children:r,size:t,value:a,defaultValue:n=null,onValueChange:s,open:m,defaultOpen:f=!1,onOpenChange:l,placeholder:c="Select an option",searchPlaceholder:P="Search...",searchValue:g,defaultSearchValue:h="",onSearchValueChange:y,filter:C,shouldFilter:i=!0,loop:b=!0,disabled:R,resetSearchOnSelect:x=!0,resetSearchOnClose:S=!0,color:V,displayValue:v,...k}=o,u=oe(t,G.size),[E,w]=A({prop:m,defaultProp:f,onChange:l}),[p,we]=A({prop:a,defaultProp:n,onChange:s}),[q,N]=A({prop:g,defaultProp:h,onChange:y}),$=typeof v=="function"?v(p):v,[D]=e.useState(()=>Ge(p));K(()=>{D.set(p)},[D,p]);let F=H(L=>{w(L),!L&&S&&N("")}),_=H(L=>{we(L),w(!1),x&&N("")}),B=e.useRef(null),U=e.useCallback(()=>B.current?Ae(B.current):void 0,[]),Ie=e.useMemo(()=>({value:p,displayValue:$,setOpen:F,size:u,placeholder:c,searchPlaceholder:P,disabled:R,color:V,loop:b,shouldFilter:i,filter:C,triggerRef:B,getTriggerLabel:U}),[p,$,F,u,c,P,R,V,b,i,C,U]),Ne=e.useMemo(()=>({value:q,setValue:N}),[q,N]),De=e.useMemo(()=>({store:D,onSelect:_,disabled:R}),[D,_,R]);return e.createElement(ue.Provider,{value:Ie},e.createElement(de.Provider,{value:Ne},e.createElement(fe.Provider,{value:De},e.createElement(se,{open:E,onOpenChange:F,...k},r))))};Pe.displayName="Combobox.Root";var ge=e.forwardRef((o,r)=>{let t=M("Trigger"),{children:a,className:n,placeholder:s,disabled:m,readOnly:f,error:l,loading:c,color:P,radius:g,onClick:h,onKeyDown:y,type:C,...i}=O({size:t.size,...o},Fe,le),b=m??t.disabled,R=P??t.color,x=!!(f||c),S=t.value==null&&t.displayValue==null,V=pe(r,t.triggerRef),{getTriggerLabel:v}=t;e.useEffect(()=>{},[v]);let k=p=>{h?.(p),x&&p.preventDefault()},u=p=>{y?.(p),!(p.defaultPrevented||x||b)&&(p.key==="ArrowDown"||p.key==="ArrowUp")&&(p.preventDefault(),t.setOpen(!0))},E=e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(Y,null)),w=e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement("span",{className:"kui-ComboboxValue"},t.displayValue??t.value??s??t.placeholder)),c?E:e.createElement(ee,{className:"kui-SelectIcon"}));return e.createElement(ie,{disabled:b},e.createElement("button",{"data-accent-color":R,"data-radius":g,"data-error":l,"data-loading":c,"data-disabled":b||void 0,"data-read-only":f||void 0,"data-placeholder":S?"":void 0,...i,role:"combobox","aria-disabled":b||i["aria-disabled"],"aria-readonly":f||i["aria-readonly"],"aria-invalid":l||i["aria-invalid"],"aria-busy":c||i["aria-busy"],type:C??"button",disabled:b,onClick:k,onKeyDown:u,ref:V,className:d("kui-reset","kui-SelectTrigger","kui-ComboboxTrigger",n)},a?e.createElement(e.Fragment,null,ae(a),c?E:null):w))});ge.displayName="Combobox.Trigger";var he=e.forwardRef(({placeholder:o,children:r,className:t,...a},n)=>{let s=M("Value"),m=s.displayValue??s.value??void 0;return e.createElement("span",{...a,ref:n,className:d("kui-ComboboxValue",t)},m??r??o??s.placeholder)});he.displayName="Combobox.Value";function He(){let o=ce(n=>n.filtered.count),r=ce(n=>n.search),[t,a]=e.useState("");return e.useEffect(()=>{let n=r?o===0?"No results":`${o} result${o===1?"":"s"}`:"",s=window.setTimeout(()=>a(n),r?400:0);return()=>window.clearTimeout(s)},[o,r]),e.createElement(ne,{role:"status","aria-live":"polite","aria-atomic":"true"},t)}var ye=e.forwardRef((o,r)=>{let t=M("Content"),a=te(),n=o.size??t.size??z.size.default,{className:s,children:m,color:f,forceMount:l,container:c,onOpenAutoFocus:P,"aria-label":g,"aria-labelledby":h,...y}=O({...o,size:n},z),C=f||t.color||a.accentColor,{getTriggerLabel:i}=t,[b,R]=e.useState(i);K(()=>{if(b!==void 0)return;let u=i();u!==void 0&&R(u)},[i,b]);let x=o["aria-label"]??b,S=e.useMemo(()=>({sizeClassName:O({size:n},Be).className||void 0,color:C,label:x}),[n,C,x]),V=e.useRef(null),v=u=>{if(P?.(u),u.defaultPrevented)return;let E=V.current;if(!E||E.querySelector("[cmdk-input]"))return;u.preventDefault(),(E.querySelector("[cmdk-list]")??E).focus({preventScroll:!0})},k=t.value?.trim()||void 0;return e.createElement(me.Portal,{container:c,forceMount:l?!0:void 0},e.createElement(re,{asChild:!0},e.createElement(me.Content,{"data-accent-color":C,align:"start",sideOffset:4,collisionPadding:10,"aria-label":h?void 0:x,"aria-labelledby":h,...y,forceMount:l?!0:void 0,onOpenAutoFocus:v,ref:r,className:d("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ComboboxContent",s)},e.createElement(Ce.Provider,{value:S},e.createElement(T,{ref:V,loop:t.loop,shouldFilter:t.shouldFilter,filter:t.filter,label:x,defaultValue:k,className:"kui-ComboboxCommand"},m,e.createElement(He,null))))))});ye.displayName="Combobox.Content";var Re=e.forwardRef(({className:o,startAdornment:r,endAdornment:t,placeholder:a,variant:n,value:s,onValueChange:m,...f},l)=>{let c=M("Input"),P=e.useContext(de),g=xe(),h=n??"soft",y=s??P?.value??"",C=m??P?.setValue,i=e.createElement("div",{className:d("kui-TextFieldRoot","kui-ComboboxInputRoot",g?.sizeClassName,`kui-variant-${h}`),"data-accent-color":g?.color},r?e.createElement("div",{className:"kui-TextFieldSlot"},r):null,e.createElement(T.Input,{...f,ref:l,value:y,onValueChange:C,placeholder:a??c.searchPlaceholder,className:d("kui-reset","kui-TextFieldInput",o)}),t?e.createElement("div",{className:"kui-TextFieldSlot","data-side":"right"},t):null);return g?e.createElement("div",{className:"kui-ComboboxSearch"},i):i});Re.displayName="Combobox.Input";var ve=e.forwardRef(({className:o,children:r,label:t,...a},n)=>{let s=xe();return e.createElement("div",{className:"kui-ComboboxScrollArea"},e.createElement("div",{className:d("kui-BaseMenuViewport","kui-ComboboxViewport")},e.createElement(T.List,{...a,label:t??s?.label,ref:n,className:d("kui-ComboboxList",o)},r)))});ve.displayName="Combobox.List";var Se=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Empty,{...r,ref:t,className:d("kui-ComboboxEmpty",o)}));Se.displayName="Combobox.Empty";var Ve=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Group,{...r,ref:t,className:d("kui-BaseMenuGroup","kui-ComboboxGroup",o)}));Ve.displayName="Combobox.Group";var Ee=e.forwardRef(({className:o,id:r,...t},a)=>{let n=e.useId(),s=r??n,m=e.useRef(null),f=pe(a,m);return K(()=>{let l=m.current?.closest("[cmdk-group-items]");if(!(!l||l.hasAttribute("aria-labelledby")))return l.setAttribute("aria-labelledby",s),()=>{l.getAttribute("aria-labelledby")===s&&l.removeAttribute("aria-labelledby")}},[s]),e.createElement("div",{...t,id:s,ref:f,className:d("kui-BaseMenuLabel","kui-ComboboxLabel",o)})});Ee.displayName="Combobox.Label";var ke=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Separator,{...r,ref:t,className:d("kui-BaseMenuSeparator","kui-ComboboxSeparator",o)}));ke.displayName="Combobox.Separator";function j(o){return o==null||typeof o=="boolean"?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(j).join(""):e.isValidElement(o)?j(o.props.children):""}var Te=e.forwardRef(({className:o,children:r,label:t,value:a,disabled:n,onSelect:s,keywords:m,...f},l)=>{let c=e.useContext(fe);if(!c)throw new Error("Combobox.Item must be used within Combobox.Root");let{store:P,onSelect:g,disabled:h}=c,y=a??(typeof r=="string"?r.trim():void 0),C=()=>y!==void 0&&P.get()===y,i=e.useSyncExternalStore(P.subscribe,C,C),b=H(s),R=e.useCallback(k=>{let u=a??k;g(u),b(u)},[a,g,b]),x=(t??j(r)).replace(/\s+/g," ").trim(),S=x?m?[x,...m]:[x]:m,V=S?S.join("\0"):"",v=n??h??!1;return e.createElement(T.Item,{key:V,...f,value:a,keywords:S,"aria-checked":i,disabled:v||void 0,ref:l,onSelect:R,className:d("kui-reset","kui-BaseMenuItem","kui-ComboboxItem",o)},i?e.createElement("span",{className:d("kui-BaseMenuItemIndicator","kui-ComboboxItemIndicator")},e.createElement(Z,{className:d("kui-BaseMenuItemIndicatorIcon","kui-ComboboxItemIndicatorIcon")})):null,e.createElement(X,null,r))});Te.displayName="Combobox.Item";export{Pe as a,ge as b,he as c,ye as d,Re as e,ve as f,Se as g,Ve as h,Ee as i,ke as j,Te as k,je as l};
3
- //# sourceMappingURL=chunk-BEHAT3GI.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/combobox.tsx", "../../src/components/combobox.props.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 '../hooks/theme-size.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.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 { 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, 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);\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 // Both arrows open the list, as on Select (APG select-only combobox).\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const loadingIcon = (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n );\n\n const defaultContent = (\n <>\n <span className=\"kui-SelectTriggerInner\">\n <span className=\"kui-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? loadingIcon : <ChevronDownIcon className=\"kui-SelectIcon\" />}\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 // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid) stays, as on Select.\n aria-disabled={isDisabled || triggerProps['aria-disabled']}\n aria-readonly={readOnly || triggerProps['aria-readonly']}\n aria-invalid={error || triggerProps['aria-invalid']}\n aria-busy={loading || triggerProps['aria-busy']}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', 'kui-ComboboxTrigger', className)}\n >\n {/* Custom children replace the value and chevron; the spinner still shows while loading. */}\n {children ? (\n <>\n {requireReactElement(children)}\n {loading ? loadingIcon : null}\n </>\n ) : (\n defaultContent\n )}\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('kui-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 // The list takes the field's size.\n const size = props.size ?? ctx.size ?? 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('kui-PopperContent', 'kui-BaseMenuContent',\n 'kui-variant-soft', 'kui-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=\"kui-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('kui-TextFieldRoot', 'kui-ComboboxInputRoot', contentContext?.sizeClassName, `kui-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"kui-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('kui-reset', 'kui-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"kui-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"kui-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=\"kui-ComboboxScrollArea\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('kui-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('kui-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('kui-BaseMenuGroup', 'kui-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('kui-BaseMenuLabel', 'kui-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('kui-BaseMenuSeparator', 'kui-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('kui-reset', 'kui-BaseMenuItem', 'kui-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('kui-BaseMenuItemIndicator', 'kui-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('kui-BaseMenuItemIndicatorIcon', 'kui-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 { 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: 'kui-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: 'kui-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 takes sizes 1 to 4, like every menu.\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'kui-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"],
5
- "mappings": ";8kBAAA,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,KAoBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,OAAwB,WAC5C,OAAS,kBAAAC,EAAgB,mBAAAC,GAAiB,wBAAAC,EAAsB,mBAAAC,MAAuB,oBACvF,OAAS,WAAWC,EAAkB,mBAAAC,OAAuB,OCjB7D,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAK3BC,EAAuB,CAC3B,KA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,EACJ,GAAGX,EACJ,MAAOxG,EACP,SAAUkH,EAEV,eAAcJ,EACd,SAAU/E,GAAc,OACxB,IAAKZ,EACL,SAAU6F,EACV,UAAWnE,EAAW,YAAa,mBAAoB,mBAAoBzB,CAAS,GAEnF0F,EACC,gBAAC,QAAK,UAAWjE,EAAW,4BAA6B,2BAA2B,GAClF,gBAACuE,EAAA,CAAe,UAAWvE,EAAW,gCAAiC,+BAA+B,EAAG,CAC3G,EACE,KACJ,gBAACwE,EAAA,KAAWhJ,CAAS,CACvB,CAEJ,CACF,EACAiI,GAAa,YAAc",
6
- "names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "React", "classNames", "PopoverPrimitive", "useCallbackRef", "useComposedRefs", "useControllableState", "useLayoutEffect", "CommandPrimitive", "useCommandState", "sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs", "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", "useControllableState", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "useLayoutEffect", "handleOpenChange", "useCallbackRef", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "useComposedRefs", "handleClick", "event", "handleKeyDown", "loadingIcon", "Spinner", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "useCommandState", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "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
- }
@@ -1,6 +0,0 @@
1
- "use client";
2
- import{a as pe}from"./chunk-YCLPURTD.js";import{c as re}from"./chunk-HBWBPBSA.js";import{a as j}from"./chunk-OAJ5DARR.js";import{c as fe}from"./chunk-5ON3XLRD.js";import{b as ce}from"./chunk-XU74PNM2.js";import{b as de,c as oe}from"./chunk-OKQAVYW4.js";import{a as Ce}from"./chunk-VQPANPMI.js";var Le={};Ce(Le,{Root:()=>Re,Slot:()=>Pe});import*as e from"react";import*as be from"react-dom";import se from"classnames";import{composeEventHandlers as U,composeRefs as xe,useLayoutEffect as ke}from"radix-ui/internal";var De=["1","2","3","4"],Ee=["raised","surface","soft","ghost","outline"],ne={size:{type:"enum",className:"kui-r-size",values:De,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Ee,default:"raised"},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...re,...ce},we=["left","right"],me={side:{type:"enum",values:we},...re,gap:pe.gap,px:j.px,pl:j.pl,pr:j.pr};var ye=e.createContext(null),ie="button, a, input, select, textarea, label, [tabindex], [contenteditable]",Re=e.forwardRef((R,v)=>{let{className:s,style:m,...k}=fe(R,ne.size),M=e.useRef(null),{children:L,className:I,color:N,radius:V,style:T,...d}=oe(k,ne),F=!!d.errorMessage,C=e.useId(),[z,D]=e.useState([]),E=e.useCallback(r=>(D(n=>n.includes(r)?n:[...n,r]),()=>D(n=>n.filter(i=>i!==r))),[]),H=e.useMemo(()=>({registerSlot:E}),[E]),{"aria-describedby":P,"aria-labelledby":g,"aria-invalid":h}=d,b=!!d.error||h===!0||h==="true",w=e.useMemo(()=>{let r=[];return d.errorMessage&&r.push(C),P&&r.push(P),r.push(...z),r.length>0?r.join(" "):void 0},[d.errorMessage,P,C,z]),x=e.useMemo(()=>({"aria-invalid":b?!0:h,"aria-describedby":w,"aria-labelledby":g}),[b,h,w,g]),{error:K,errorMessage:ae,required:a,"aria-describedby":O,"aria-labelledby":_,...G}=d,X=e.useCallback(r=>{let n=r.target;if(n.closest(ie))return;let i=M.current;if(!i)return;let p=n.closest(`
3
- .kui-TextFieldSlot[data-side='right'],
4
- .kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])
5
- `)?i.value.length:0;r.preventDefault(),i.focus();try{i.setSelectionRange(p,p)}catch{}},[]),S=e.createElement("div",{"data-accent-color":N,"data-radius":V,style:F?T:de(T,m),className:se("kui-TextFieldRoot",I,!F&&s,{"kui-error":b}),onMouseDown:X},e.createElement("input",{...G,required:a||void 0,...x,ref:xe(M,v),className:"kui-reset kui-TextFieldInput"}),e.createElement(ye.Provider,{value:H},L));return F?e.createElement("div",{className:se("kui-TextFieldWrapper",s),style:m},S,e.createElement("div",{id:C,className:"kui-TextFieldErrorMessage",role:"alert"},d.errorMessage)):S});Re.displayName="TextField.Root";var y=(()=>{if(typeof navigator>"u")return!1;let R=navigator.userAgent,v=/^((?!chrome|android).)*safari/i.test(R),s=/firefox/i.test(R);return v||s})(),Pe=e.forwardRef((R,v)=>{let{scrub:s,scrubValue:m,scrubStep:k=1,scrubSensitivity:M=1,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N=10,scrubAltMultiplier:V=.1,onScrub:T,...d}=R,{className:F,color:C,side:z,onPointerDown:D,onPointerMove:E,onPointerUp:H,onLostPointerCapture:P,...g}=oe(d,me),h=e.useId(),b=g.id??h,w=e.useContext(ye)?.registerSlot,x=e.useRef(null),[K,ae]=e.useState(null);ke(()=>{let t=!!x.current?.querySelector(ie);ae(o=>o===t?o:t)}),e.useEffect(()=>K===!1?w?.(b):void 0,[w,b,K]);let[a,O]=e.useState(!1),[_,G]=e.useState({x:0,y:0}),X=e.useRef(null),S=e.useRef(0),r=e.useRef(!1),n=e.useRef(0),i=e.useRef(0),l=e.useRef(0),p=e.useRef(null),$=e.useRef(0),A=e.useRef({scrubValue:m,scrubStep:k,scrubSensitivity:M,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N,scrubAltMultiplier:V,onScrub:T});A.current={scrubValue:m,scrubStep:k,scrubSensitivity:M,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N,scrubAltMultiplier:V,onScrub:T};let ge=e.useCallback(t=>{if(!s||t.target.closest(ie))return;t.preventDefault(),n.current=0,i.current=m??0,l.current=t.clientX,S.current=t.clientY,G({x:t.clientX,y:t.clientY});let u=x.current;u&&(y?(p.current=t.pointerId,$.current=t.clientX,u.setPointerCapture(t.pointerId),O(!0)):(r.current=!0,u.requestPointerLock()))},[s,m]);e.useEffect(()=>{if(y||!s)return;let t=()=>{if(!r.current)return;let o=document.pointerLockElement===x.current;O(o),o||(r.current=!1,A.current.onScrub?.(0,!1),n.current=0,i.current=0)};return document.addEventListener("pointerlockchange",t),()=>{document.removeEventListener("pointerlockchange",t)}},[s]);let B=e.useCallback((t,o,u,Te)=>{let c=A.current,W=window.innerWidth,Y=window.innerHeight;l.current+=t,l.current>W?l.current=l.current%W:l.current<0&&(l.current=W+l.current%W);let f=S.current+o;f>Y?f=f%Y:f<0&&(f=Y+f%Y),S.current=f;let Z=X.current;Z&&(Z.style.left=`${l.current}px`,Z.style.top=`${f}px`),n.current+=t;let J=n.current/c.scrubSensitivity;if(Math.abs(J)>=1){let Q=1;u?Q=c.scrubShiftMultiplier:Te&&(Q=c.scrubAltMultiplier);let le=Math.trunc(J),ee=le*c.scrubStep*Q,te=ee;if(c.scrubMin!==void 0||c.scrubMax!==void 0){let Fe=i.current+ee,ue=Math.max(c.scrubMin??-1/0,Math.min(c.scrubMax??1/0,Fe));te=ue-i.current,i.current=ue}else i.current+=ee;te!==0&&c.onScrub?.(te,!0),n.current=(J-le)*c.scrubSensitivity}},[]),q=e.useCallback(()=>{A.current.onScrub?.(0,!1),n.current=0,i.current=0,p.current=null,O(!1)},[]),he=e.useCallback(t=>{if(!a||!y)return;let o=t.clientX-$.current;$.current=t.clientX,B(o,t.movementY,t.shiftKey,t.altKey)},[a,B]),Se=e.useCallback(t=>{if(!y||p.current!==t.pointerId)return;let o=x.current;o&&p.current!==null&&o.releasePointerCapture(p.current),q()},[q]),ve=e.useCallback(()=>{y&&a&&q()},[a,q]);e.useEffect(()=>{if(!a||y)return;let t=u=>{B(u.movementX,u.movementY,u.shiftKey,u.altKey)},o=()=>{document.exitPointerLock()};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",o),document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",o),document.body.style.userSelect=""}},[a,B]),e.useEffect(()=>{if(!a||!y)return;let t=document.createElement("style");return t.textContent="* { cursor: none !important; user-select: none !important; }",document.head.appendChild(t),()=>{document.head.removeChild(t)}},[a]);let Me=a?be.createPortal(e.createElement("img",{ref:X,className:"kui-TextFieldSlotScrubCursor",src:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E",alt:"",style:{position:"fixed",left:_.x,top:_.y,transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:99999,width:24,height:24},"aria-hidden":"true"}),document.body):null;return e.createElement("div",{"data-accent-color":C,"data-side":z,"data-scrub":s||void 0,"data-scrubbing":a||void 0,...g,id:b,ref:xe(x,v),className:se("kui-TextFieldSlot",F),onPointerDown:s?U(D,ge):D,onPointerMove:s?U(E,he):E,onPointerUp:s?U(H,Se):H,onLostPointerCapture:s?U(P,ve):P},g.children,Me)});Pe.displayName="TextField.Slot";export{Re as a,Pe as b,Le as c};
6
- //# sourceMappingURL=chunk-DG2KIH54.js.map