@womp/kookie-ui 0.34.1 → 0.35.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 (371) hide show
  1. package/README.md +1 -1
  2. package/components.css +20 -7
  3. package/dist/cjs/components/_internal/pane-chrome.d.ts +1 -2
  4. package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
  5. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  6. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  7. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  8. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  9. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  10. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  11. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  12. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  13. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
  14. package/dist/cjs/components/_internal/shell-resizable.js +1 -1
  15. package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
  16. package/dist/cjs/components/_internal/shell-resize.d.ts +2 -0
  17. package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
  18. package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
  19. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  20. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  21. package/dist/cjs/components/avatar.d.ts.map +1 -1
  22. package/dist/cjs/components/avatar.js +1 -1
  23. package/dist/cjs/components/avatar.js.map +2 -2
  24. package/dist/cjs/components/button.js +1 -1
  25. package/dist/cjs/components/button.js.map +3 -3
  26. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  27. package/dist/cjs/components/chatbar.js +1 -1
  28. package/dist/cjs/components/chatbar.js.map +3 -3
  29. package/dist/cjs/components/combobox.d.ts +16 -0
  30. package/dist/cjs/components/combobox.d.ts.map +1 -1
  31. package/dist/cjs/components/combobox.js +1 -1
  32. package/dist/cjs/components/combobox.js.map +2 -2
  33. package/dist/cjs/components/index.js +2 -2
  34. package/dist/cjs/components/index.js.map +3 -3
  35. package/dist/cjs/components/message-scroller.js +1 -1
  36. package/dist/cjs/components/message-scroller.js.map +3 -3
  37. package/dist/cjs/components/navbar.d.ts.map +1 -1
  38. package/dist/cjs/components/navbar.js +1 -1
  39. package/dist/cjs/components/navbar.js.map +3 -3
  40. package/dist/cjs/components/navigator.js +1 -1
  41. package/dist/cjs/components/navigator.js.map +3 -3
  42. package/dist/cjs/components/notice.js +1 -1
  43. package/dist/cjs/components/notice.js.map +3 -3
  44. package/dist/cjs/components/schemas/base-button.schema.d.ts +7 -0
  45. package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
  46. package/dist/cjs/components/schemas/base-button.schema.js +1 -1
  47. package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
  48. package/dist/cjs/components/schemas/button.schema.d.ts +14 -0
  49. package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
  50. package/dist/cjs/components/schemas/button.schema.js +1 -1
  51. package/dist/cjs/components/schemas/button.schema.js.map +2 -2
  52. package/dist/cjs/components/schemas/index.js +1 -1
  53. package/dist/cjs/components/schemas/index.js.map +2 -2
  54. package/dist/cjs/components/schemas/shell.schema.d.ts +7 -6
  55. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  56. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  57. package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
  58. package/dist/cjs/components/schemas/toggle.schema.d.ts +83 -77
  59. package/dist/cjs/components/schemas/toggle.schema.d.ts.map +1 -1
  60. package/dist/cjs/components/schemas/toggle.schema.js +1 -1
  61. package/dist/cjs/components/schemas/toggle.schema.js.map +2 -2
  62. package/dist/cjs/components/segmented-control.d.ts.map +1 -1
  63. package/dist/cjs/components/segmented-control.js +1 -1
  64. package/dist/cjs/components/segmented-control.js.map +3 -3
  65. package/dist/cjs/components/select.js +1 -1
  66. package/dist/cjs/components/select.js.map +2 -2
  67. package/dist/cjs/components/sheet.d.ts +2 -2
  68. package/dist/cjs/components/sheet.js.map +1 -1
  69. package/dist/cjs/components/shell.context.js.map +1 -1
  70. package/dist/cjs/components/shell.js +1 -1
  71. package/dist/cjs/components/shell.js.map +3 -3
  72. package/dist/cjs/components/sidebar.d.ts +1 -1
  73. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  74. package/dist/cjs/components/sidebar.js +1 -1
  75. package/dist/cjs/components/sidebar.js.map +3 -3
  76. package/dist/cjs/components/table.d.ts.map +1 -1
  77. package/dist/cjs/components/table.js +1 -1
  78. package/dist/cjs/components/table.js.map +3 -3
  79. package/dist/cjs/components/toggle.js +1 -1
  80. package/dist/cjs/components/toggle.js.map +3 -3
  81. package/dist/cjs/components/toolbar.js +1 -1
  82. package/dist/cjs/components/toolbar.js.map +3 -3
  83. package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
  84. package/dist/cjs/components/virtual-menu.js +1 -1
  85. package/dist/cjs/components/virtual-menu.js.map +3 -3
  86. package/dist/cjs/helpers/index.d.ts +0 -1
  87. package/dist/cjs/helpers/index.d.ts.map +1 -1
  88. package/dist/cjs/helpers/index.js +2 -2
  89. package/dist/cjs/helpers/index.js.map +4 -4
  90. package/dist/cjs/hooks/index.d.ts +0 -2
  91. package/dist/cjs/hooks/index.d.ts.map +1 -1
  92. package/dist/cjs/hooks/index.js +3 -11
  93. package/dist/cjs/hooks/index.js.map +4 -4
  94. package/dist/cjs/index.js +3 -11
  95. package/dist/cjs/index.js.map +4 -4
  96. package/dist/cjs/props/index.d.ts +6 -1
  97. package/dist/cjs/props/index.d.ts.map +1 -1
  98. package/dist/cjs/props/index.js +1 -1
  99. package/dist/cjs/props/index.js.map +4 -4
  100. package/dist/esm/chunk-25FNCKUM.js +2 -0
  101. package/dist/esm/chunk-25FNCKUM.js.map +7 -0
  102. package/dist/esm/{chunk-KDJM4NQQ.js → chunk-2WFN4D52.js} +2 -2
  103. package/dist/esm/chunk-4OJRLS5N.js +3 -0
  104. package/dist/esm/chunk-4OJRLS5N.js.map +7 -0
  105. package/dist/esm/chunk-4TTRPCGG.js +3 -0
  106. package/dist/esm/{chunk-QKCNGEX4.js.map → chunk-4TTRPCGG.js.map} +3 -3
  107. package/dist/esm/chunk-4X64QOAR.js +3 -0
  108. package/dist/esm/chunk-4X64QOAR.js.map +7 -0
  109. package/dist/esm/{chunk-L7PRLW6A.js → chunk-5APRBJRR.js} +2 -2
  110. package/dist/esm/{chunk-L7PRLW6A.js.map → chunk-5APRBJRR.js.map} +2 -2
  111. package/dist/esm/chunk-7HD5LS3M.js +3 -0
  112. package/dist/esm/chunk-7HD5LS3M.js.map +7 -0
  113. package/dist/esm/chunk-7ZOGH5NT.js +2 -0
  114. package/dist/esm/chunk-7ZOGH5NT.js.map +7 -0
  115. package/dist/esm/chunk-BJA75XKG.js +2 -0
  116. package/dist/esm/chunk-BJA75XKG.js.map +7 -0
  117. package/dist/esm/{chunk-NO2JCJWI.js → chunk-BJVXB3PN.js} +2 -2
  118. package/dist/esm/{chunk-BR6Z2CAE.js → chunk-C6VGCYFQ.js} +2 -2
  119. package/dist/esm/chunk-EZYXYLR2.js +2 -0
  120. package/dist/esm/chunk-EZYXYLR2.js.map +7 -0
  121. package/dist/esm/chunk-FTNZWAPB.js +3 -0
  122. package/dist/esm/{chunk-7QBNXNEN.js.map → chunk-FTNZWAPB.js.map} +3 -3
  123. package/dist/esm/{chunk-ZLGOZKB3.js → chunk-FYZXC7AL.js} +2 -2
  124. package/dist/esm/{chunk-XD676L6S.js → chunk-HQT32HQ6.js} +2 -2
  125. package/dist/esm/{chunk-XKYPJTRN.js → chunk-I5TPDYJO.js} +2 -2
  126. package/dist/esm/chunk-I77CYEBT.js +2 -0
  127. package/dist/esm/chunk-I77CYEBT.js.map +7 -0
  128. package/dist/esm/{chunk-API4DAPY.js → chunk-J7MIXG6M.js} +1 -1
  129. package/dist/esm/chunk-J7MIXG6M.js.map +7 -0
  130. package/dist/esm/{chunk-UMQOTGJC.js → chunk-M26LLCQC.js} +2 -2
  131. package/dist/esm/{chunk-WN3WMFAM.js → chunk-MLHS2GWL.js} +2 -2
  132. package/dist/esm/chunk-MPLBIPJ6.js +3 -0
  133. package/dist/esm/chunk-MPLBIPJ6.js.map +7 -0
  134. package/dist/esm/{chunk-WEBNIUEX.js → chunk-MXEOE4LA.js} +1 -1
  135. package/dist/esm/chunk-MXEOE4LA.js.map +7 -0
  136. package/dist/esm/chunk-OGVKMDO7.js +3 -0
  137. package/dist/esm/chunk-OGVKMDO7.js.map +7 -0
  138. package/dist/esm/{chunk-ODHCDJ3Y.js → chunk-PMXIQ5B4.js} +1 -1
  139. package/dist/esm/chunk-PMXIQ5B4.js.map +7 -0
  140. package/dist/esm/{chunk-LG5DPQ46.js → chunk-R4DMVTM3.js} +2 -2
  141. package/dist/esm/{chunk-LG5DPQ46.js.map → chunk-R4DMVTM3.js.map} +3 -3
  142. package/dist/esm/chunk-S6SEWECR.js +3 -0
  143. package/dist/esm/{chunk-5VYQDA5S.js.map → chunk-S6SEWECR.js.map} +3 -3
  144. package/dist/esm/{chunk-7YXHLU4C.js → chunk-TANYRHGP.js} +2 -2
  145. package/dist/esm/{chunk-INGT6DB6.js → chunk-TS4QCDSI.js} +1 -1
  146. package/dist/esm/chunk-TS4QCDSI.js.map +7 -0
  147. package/dist/esm/chunk-VRWZLGR7.js +2 -0
  148. package/dist/esm/chunk-X4PWBFOT.js +3 -0
  149. package/dist/esm/chunk-X4PWBFOT.js.map +7 -0
  150. package/dist/esm/chunk-XFMAA4MD.js +3 -0
  151. package/dist/esm/chunk-XFMAA4MD.js.map +7 -0
  152. package/dist/esm/chunk-XGV7KNSE.js +3 -0
  153. package/dist/esm/chunk-XGV7KNSE.js.map +7 -0
  154. package/dist/esm/chunk-XOAOSRTH.js +3 -0
  155. package/dist/esm/chunk-XOAOSRTH.js.map +7 -0
  156. package/dist/esm/{chunk-YOTTLPJ3.js → chunk-Y5ITMKC6.js} +2 -2
  157. package/dist/esm/chunk-YLPCYCYA.js +3 -0
  158. package/dist/esm/chunk-YLPCYCYA.js.map +7 -0
  159. package/dist/esm/components/_internal/pane-chrome.d.ts +1 -2
  160. package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
  161. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  162. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  163. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  164. package/dist/esm/components/_internal/shell-handles.js +1 -1
  165. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  166. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  167. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  168. package/dist/esm/components/_internal/shell-resize.d.ts +2 -0
  169. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  170. package/dist/esm/components/_internal/shell-resize.js +1 -1
  171. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  172. package/dist/esm/components/accordion.props.js +1 -1
  173. package/dist/esm/components/accordion.props.js.map +4 -4
  174. package/dist/esm/components/avatar.d.ts.map +1 -1
  175. package/dist/esm/components/avatar.js +1 -1
  176. package/dist/esm/components/button.js +1 -1
  177. package/dist/esm/components/chatbar.d.ts.map +1 -1
  178. package/dist/esm/components/chatbar.js +1 -1
  179. package/dist/esm/components/combobox.d.ts +16 -0
  180. package/dist/esm/components/combobox.d.ts.map +1 -1
  181. package/dist/esm/components/combobox.js +1 -1
  182. package/dist/esm/components/combobox.props.js +1 -1
  183. package/dist/esm/components/combobox.props.js.map +4 -4
  184. package/dist/esm/components/image.props.js +1 -1
  185. package/dist/esm/components/image.props.js.map +4 -4
  186. package/dist/esm/components/index.js +1 -1
  187. package/dist/esm/components/message-scroller.js +1 -1
  188. package/dist/esm/components/navbar.d.ts.map +1 -1
  189. package/dist/esm/components/navbar.js +1 -1
  190. package/dist/esm/components/navbar.props.js +1 -1
  191. package/dist/esm/components/navbar.props.js.map +4 -4
  192. package/dist/esm/components/navigator.js +1 -1
  193. package/dist/esm/components/notice.js +1 -1
  194. package/dist/esm/components/schemas/base-button.schema.d.ts +7 -0
  195. package/dist/esm/components/schemas/base-button.schema.d.ts.map +1 -1
  196. package/dist/esm/components/schemas/base-button.schema.js +1 -1
  197. package/dist/esm/components/schemas/button.schema.d.ts +14 -0
  198. package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
  199. package/dist/esm/components/schemas/button.schema.js +1 -1
  200. package/dist/esm/components/schemas/index.js +1 -1
  201. package/dist/esm/components/schemas/shell.schema.d.ts +7 -6
  202. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  203. package/dist/esm/components/schemas/shell.schema.js +1 -1
  204. package/dist/esm/components/schemas/toggle.schema.d.ts +83 -77
  205. package/dist/esm/components/schemas/toggle.schema.d.ts.map +1 -1
  206. package/dist/esm/components/schemas/toggle.schema.js +1 -1
  207. package/dist/esm/components/segmented-control.d.ts.map +1 -1
  208. package/dist/esm/components/segmented-control.js +1 -1
  209. package/dist/esm/components/select.js +1 -1
  210. package/dist/esm/components/sheet.d.ts +2 -2
  211. package/dist/esm/components/sheet.js +1 -1
  212. package/dist/esm/components/shell.context.js +1 -1
  213. package/dist/esm/components/shell.js +1 -1
  214. package/dist/esm/components/sidebar.d.ts +1 -1
  215. package/dist/esm/components/sidebar.d.ts.map +1 -1
  216. package/dist/esm/components/sidebar.js +1 -1
  217. package/dist/esm/components/table.d.ts.map +1 -1
  218. package/dist/esm/components/table.js +1 -1
  219. package/dist/esm/components/toggle.js +1 -1
  220. package/dist/esm/components/toolbar.js +1 -1
  221. package/dist/esm/components/toolbar.props.js +1 -1
  222. package/dist/esm/components/toolbar.props.js.map +4 -4
  223. package/dist/esm/components/virtual-menu.d.ts.map +1 -1
  224. package/dist/esm/components/virtual-menu.js +1 -1
  225. package/dist/esm/helpers/index.d.ts +0 -1
  226. package/dist/esm/helpers/index.d.ts.map +1 -1
  227. package/dist/esm/helpers/index.js +1 -1
  228. package/dist/esm/helpers/index.js.map +2 -2
  229. package/dist/esm/hooks/index.d.ts +0 -2
  230. package/dist/esm/hooks/index.d.ts.map +1 -1
  231. package/dist/esm/hooks/index.js +1 -1
  232. package/dist/esm/index.js +1 -1
  233. package/dist/esm/props/index.d.ts +6 -1
  234. package/dist/esm/props/index.d.ts.map +1 -1
  235. package/dist/esm/props/index.js +1 -1
  236. package/layout/utilities.css +810 -0
  237. package/layout.css +810 -0
  238. package/package.json +3 -4
  239. package/schemas/base-button.json +13 -0
  240. package/schemas/button.json +13 -0
  241. package/schemas/index.json +51 -12
  242. package/schemas/shell-bottom.json +2 -2
  243. package/schemas/shell-content.json +2 -2
  244. package/schemas/shell-header.json +4 -0
  245. package/schemas/shell-inspector.json +2 -2
  246. package/schemas/shell-panel.json +2 -2
  247. package/schemas/shell-rail.json +2 -2
  248. package/schemas/shell-sidebar.json +2 -2
  249. package/schemas/toggle.json +9 -0
  250. package/src/components/_internal/base-checkbox.css +0 -2
  251. package/src/components/_internal/base-dialog.css +1 -1
  252. package/src/components/_internal/base-sidebar-menu.css +0 -3
  253. package/src/components/_internal/base-sidebar.css +0 -2
  254. package/src/components/_internal/base-tab-list.css +0 -1
  255. package/src/components/_internal/pane-chrome.tsx +2 -3
  256. package/src/components/_internal/shell-handles.tsx +3 -0
  257. package/src/components/_internal/shell-resizable.tsx +9 -0
  258. package/src/components/_internal/shell-resize.tsx +2 -0
  259. package/src/components/accordion.css +0 -1
  260. package/src/components/avatar.tsx +3 -1
  261. package/src/components/button.tsx +1 -1
  262. package/src/components/chatbar.css +0 -2
  263. package/src/components/chatbar.tsx +2 -1
  264. package/src/components/combobox.tsx +2 -3
  265. package/src/components/navbar.tsx +3 -4
  266. package/src/components/navigator.css +4 -4
  267. package/src/components/notice.css +1 -1
  268. package/src/components/schemas/base-button.schema.ts +7 -0
  269. package/src/components/schemas/shell.schema.ts +3 -2
  270. package/src/components/schemas/toggle.schema.ts +2 -1
  271. package/src/components/segmented-control.css +13 -3
  272. package/src/components/segmented-control.tsx +10 -2
  273. package/src/components/select.tsx +2 -2
  274. package/src/components/sheet.tsx +2 -2
  275. package/src/components/shell.context.tsx +1 -1
  276. package/src/components/sidebar.css +2 -7
  277. package/src/components/sidebar.tsx +1 -1
  278. package/src/components/table.tsx +4 -1
  279. package/src/components/text-area.css +0 -1
  280. package/src/components/text-field.css +2 -2
  281. package/src/components/virtual-menu.css +0 -1
  282. package/src/components/virtual-menu.tsx +8 -1
  283. package/src/helpers/index.ts +0 -1
  284. package/src/hooks/index.ts +0 -2
  285. package/src/props/index.ts +6 -1
  286. package/src/styles/utilities/inset.css +135 -0
  287. package/styles.css +830 -7
  288. package/utilities.css +810 -0
  289. package/dist/cjs/helpers/map-prop-values.d.ts +0 -4
  290. package/dist/cjs/helpers/map-prop-values.d.ts.map +0 -1
  291. package/dist/cjs/helpers/map-prop-values.js +0 -2
  292. package/dist/cjs/helpers/map-prop-values.js.map +0 -7
  293. package/dist/cjs/hooks/use-live-announcer.d.ts +0 -6
  294. package/dist/cjs/hooks/use-live-announcer.d.ts.map +0 -1
  295. package/dist/cjs/hooks/use-live-announcer.js +0 -11
  296. package/dist/cjs/hooks/use-live-announcer.js.map +0 -7
  297. package/dist/cjs/hooks/use-toggle-state.d.ts +0 -37
  298. package/dist/cjs/hooks/use-toggle-state.d.ts.map +0 -1
  299. package/dist/cjs/hooks/use-toggle-state.js +0 -11
  300. package/dist/cjs/hooks/use-toggle-state.js.map +0 -7
  301. package/dist/cjs/props/shadow.props.d.ts +0 -24
  302. package/dist/cjs/props/shadow.props.d.ts.map +0 -1
  303. package/dist/cjs/props/shadow.props.js +0 -2
  304. package/dist/cjs/props/shadow.props.js.map +0 -7
  305. package/dist/esm/chunk-3QWGSRYC.js +0 -3
  306. package/dist/esm/chunk-3QWGSRYC.js.map +0 -7
  307. package/dist/esm/chunk-5KQCG7AV.js +0 -3
  308. package/dist/esm/chunk-5KQCG7AV.js.map +0 -7
  309. package/dist/esm/chunk-5VYQDA5S.js +0 -3
  310. package/dist/esm/chunk-677CX2QF.js +0 -2
  311. package/dist/esm/chunk-677CX2QF.js.map +0 -7
  312. package/dist/esm/chunk-7QBNXNEN.js +0 -3
  313. package/dist/esm/chunk-API4DAPY.js.map +0 -7
  314. package/dist/esm/chunk-AYKOOEZR.js +0 -2
  315. package/dist/esm/chunk-BQOFHLDP.js +0 -3
  316. package/dist/esm/chunk-BQOFHLDP.js.map +0 -7
  317. package/dist/esm/chunk-CZ24FOFS.js +0 -3
  318. package/dist/esm/chunk-CZ24FOFS.js.map +0 -7
  319. package/dist/esm/chunk-EERKYRYI.js +0 -3
  320. package/dist/esm/chunk-EERKYRYI.js.map +0 -7
  321. package/dist/esm/chunk-HZYE46V2.js +0 -2
  322. package/dist/esm/chunk-HZYE46V2.js.map +0 -7
  323. package/dist/esm/chunk-IN2WND4B.js +0 -3
  324. package/dist/esm/chunk-IN2WND4B.js.map +0 -7
  325. package/dist/esm/chunk-INGT6DB6.js.map +0 -7
  326. package/dist/esm/chunk-J6B7UCZN.js +0 -3
  327. package/dist/esm/chunk-J6B7UCZN.js.map +0 -7
  328. package/dist/esm/chunk-JQMWNI62.js +0 -3
  329. package/dist/esm/chunk-JQMWNI62.js.map +0 -7
  330. package/dist/esm/chunk-ODHCDJ3Y.js.map +0 -7
  331. package/dist/esm/chunk-QKCNGEX4.js +0 -3
  332. package/dist/esm/chunk-RIHTVZVJ.js +0 -3
  333. package/dist/esm/chunk-RIHTVZVJ.js.map +0 -7
  334. package/dist/esm/chunk-TMINGBSQ.js +0 -3
  335. package/dist/esm/chunk-TMINGBSQ.js.map +0 -7
  336. package/dist/esm/chunk-WEBNIUEX.js.map +0 -7
  337. package/dist/esm/chunk-WTP2KIK3.js +0 -11
  338. package/dist/esm/chunk-WTP2KIK3.js.map +0 -7
  339. package/dist/esm/chunk-XF6Z5NKE.js +0 -3
  340. package/dist/esm/chunk-XF6Z5NKE.js.map +0 -7
  341. package/dist/esm/helpers/map-prop-values.d.ts +0 -4
  342. package/dist/esm/helpers/map-prop-values.d.ts.map +0 -1
  343. package/dist/esm/helpers/map-prop-values.js +0 -2
  344. package/dist/esm/helpers/map-prop-values.js.map +0 -7
  345. package/dist/esm/hooks/use-live-announcer.d.ts +0 -6
  346. package/dist/esm/hooks/use-live-announcer.d.ts.map +0 -1
  347. package/dist/esm/hooks/use-live-announcer.js +0 -3
  348. package/dist/esm/hooks/use-live-announcer.js.map +0 -7
  349. package/dist/esm/hooks/use-toggle-state.d.ts +0 -37
  350. package/dist/esm/hooks/use-toggle-state.d.ts.map +0 -1
  351. package/dist/esm/hooks/use-toggle-state.js +0 -3
  352. package/dist/esm/hooks/use-toggle-state.js.map +0 -7
  353. package/dist/esm/props/shadow.props.d.ts +0 -24
  354. package/dist/esm/props/shadow.props.d.ts.map +0 -1
  355. package/dist/esm/props/shadow.props.js +0 -2
  356. package/dist/esm/props/shadow.props.js.map +0 -7
  357. package/src/helpers/map-prop-values.ts +0 -17
  358. package/src/hooks/use-live-announcer.ts +0 -79
  359. package/src/hooks/use-toggle-state.ts +0 -72
  360. package/src/props/shadow.props.ts +0 -30
  361. /package/dist/esm/{chunk-KDJM4NQQ.js.map → chunk-2WFN4D52.js.map} +0 -0
  362. /package/dist/esm/{chunk-NO2JCJWI.js.map → chunk-BJVXB3PN.js.map} +0 -0
  363. /package/dist/esm/{chunk-BR6Z2CAE.js.map → chunk-C6VGCYFQ.js.map} +0 -0
  364. /package/dist/esm/{chunk-ZLGOZKB3.js.map → chunk-FYZXC7AL.js.map} +0 -0
  365. /package/dist/esm/{chunk-XD676L6S.js.map → chunk-HQT32HQ6.js.map} +0 -0
  366. /package/dist/esm/{chunk-XKYPJTRN.js.map → chunk-I5TPDYJO.js.map} +0 -0
  367. /package/dist/esm/{chunk-UMQOTGJC.js.map → chunk-M26LLCQC.js.map} +0 -0
  368. /package/dist/esm/{chunk-WN3WMFAM.js.map → chunk-MLHS2GWL.js.map} +0 -0
  369. /package/dist/esm/{chunk-7YXHLU4C.js.map → chunk-TANYRHGP.js.map} +0 -0
  370. /package/dist/esm/{chunk-AYKOOEZR.js.map → chunk-VRWZLGR7.js.map} +0 -0
  371. /package/dist/esm/{chunk-YOTTLPJ3.js.map → chunk-Y5ITMKC6.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/segmented-control.tsx", "../../src/components/segmented-control.props.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\nimport { useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\n\nimport { segmentedControlRootPropDefs } from './segmented-control.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SegmentedControlRootOwnProps = GetPropDefTypes<typeof segmentedControlRootPropDefs>;\n\ninterface SegmentedControlRootProps extends ComponentPropsWithout<'div', RemovedProps | 'dir'>, SegmentedControlRootOwnProps {\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n}\n\n// Arrow keys select as they move focus, as in a radio group. The root marks a key press, and the\n// item that takes focus from it selects itself. A click or Tab focuses without selecting.\nconst SegmentedControlContext = React.createContext<{ selectFromKeyboard(value: string): void } | null>(null);\n\nconst NAVIGATION_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);\n\nconst SegmentedControlRoot = React.forwardRef<HTMLDivElement, SegmentedControlRootProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, segmentedControlRootPropDefs.size);\n const {\n className,\n children,\n radius,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange: onValueChangeProp,\n style,\n disabled,\n onKeyDown,\n onPointerDown,\n ...rootProps\n } = extractProps(props, segmentedControlRootPropDefs);\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChangeProp,\n defaultProp: defaultValueProp ?? '',\n });\n\n // The indicator is sized and placed from the item count and the selected index, written\n // as custom properties. They are read from the children on render, so the server markup\n // is right, then corrected from the DOM, which also sees items inside fragments or\n // wrapper components.\n const keyboardNavigationRef = React.useRef(false);\n const context = React.useMemo(\n () => ({\n selectFromKeyboard(itemValue: string) {\n if (!keyboardNavigationRef.current) return;\n keyboardNavigationRef.current = false;\n setValue(itemValue);\n },\n }),\n [setValue],\n );\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const items = React.Children.toArray(children).filter(React.isValidElement);\n const renderedCount = items.length;\n const renderedIndex = Math.max(\n 0,\n items.findIndex((child) => (child.props as { value?: unknown }).value === value),\n );\n useLayoutEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n const domItems = Array.from(root.querySelectorAll(':scope > .kui-SegmentedControlItem'));\n const index = domItems.findIndex((item) => item.getAttribute('data-state') === 'on');\n root.style.setProperty('--segmented-control-count', String(domItems.length || 1));\n root.style.setProperty('--segmented-control-index', String(Math.max(0, index)));\n });\n\n return (\n <SegmentedControlContext.Provider value={context}>\n <ToggleGroupPrimitive.Root\n data-disabled={disabled || undefined}\n data-radius={radius}\n ref={composedRef}\n style={\n {\n '--segmented-control-count': renderedCount || 1,\n '--segmented-control-index': renderedIndex,\n ...style,\n } as React.CSSProperties\n }\n className={classNames('kui-SegmentedControlRoot', className)}\n onValueChange={(value) => {\n if (value) {\n setValue(value);\n }\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n keyboardNavigationRef.current = NAVIGATION_KEYS.has(event.key);\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event);\n keyboardNavigationRef.current = false;\n }}\n {...rootProps}\n type=\"single\"\n value={value}\n asChild={false}\n disabled={!!disabled}\n >\n {children}\n <div className=\"kui-SegmentedControlIndicator\" />\n </ToggleGroupPrimitive.Root>\n </SegmentedControlContext.Provider>\n );\n});\n\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ninterface SegmentedControlItemOwnProps {\n value: string;\n /** When true, this segment can't be selected. */\n disabled?: boolean;\n /** When true, applies fixed square width for icon-only segments */\n iconOnly?: boolean;\n}\n\ninterface SegmentedControlItemProps extends ComponentPropsWithout<typeof ToggleGroupPrimitive.Item, RemovedProps | 'type' | 'value'>, SegmentedControlItemOwnProps {}\n\nconst SegmentedControlItem = React.forwardRef<HTMLButtonElement, SegmentedControlItemProps>(({ children, className, iconOnly, onFocus, ...props }, forwardedRef) => {\n const context = React.useContext(SegmentedControlContext);\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SegmentedControlItem', className)}\n data-icon-only={iconOnly || undefined}\n onFocus={(event) => {\n onFocus?.(event);\n context?.selectFromKeyboard(props.value);\n }}\n {...props}\n asChild={false}\n >\n <span className=\"kui-SegmentedControlItemSeparator\" />\n <span className=\"kui-SegmentedControlItemLabel\">\n <span className=\"kui-SegmentedControlItemLabelActive\">{children}</span>\n <span className=\"kui-SegmentedControlItemLabelInactive\" aria-hidden>\n {children}\n </span>\n </span>\n </ToggleGroupPrimitive.Item>\n );\n});\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport { SegmentedControlRoot as Root, SegmentedControlItem as Item };\nexport type { SegmentedControlRootProps as RootProps, SegmentedControlItemProps as ItemProps };\n", "import { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n// soft is a filled track. raised and outline match the TextField variants of the same name, for\n// panels where every other control is raised or outlined.\nconst variants = ['soft', 'raised', 'outline'] as const;\n\nconst segmentedControlRootPropDefs = {\n disabled: { type: 'boolean', default: false },\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'soft' },\n orientation: {\n type: 'enum',\n className: 'kui-r-orientation',\n values: orientations,\n default: 'horizontal',\n responsive: true,\n },\n ...radiusPropDef,\n} satisfies {\n disabled?: PropDef<boolean>;\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { segmentedControlRootPropDefs };\n"],
5
- "mappings": ";gKAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,SAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WACpD,OAAS,mBAAAC,EAAiB,wBAAAC,EAAsB,mBAAAC,MAAuB,oBCDvE,IAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAGxCC,EAAW,CAAC,OAAQ,SAAU,SAAS,EAEvCC,EAA+B,CACnC,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAC5C,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQE,EAAU,QAAS,MAAO,EACrF,YAAa,CACX,KAAM,OACN,UAAW,oBACX,OAAQD,EACR,QAAS,aACT,WAAY,EACd,EACA,GAAGG,CACL,EDEA,IAAMC,EAAgC,gBAAkE,IAAI,EAEtGC,EAAkB,IAAI,IAAI,CAAC,YAAa,aAAc,UAAW,YAAa,OAAQ,KAAK,CAAC,EAE5FC,EAA6B,aAAsD,CAACC,EAAUC,IAAiB,CACnH,IAAMC,EAAQC,EAAkBH,EAAUI,EAA6B,IAAI,EACrE,CACJ,UAAAC,EACA,SAAAC,EACA,OAAAC,EACA,MAAOC,EACP,aAAcC,EACd,cAAeC,EACf,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,cAAAC,EAC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AAUtB,EAAgB,IAAIuC,EAAM,GAAG,CAC/D,EACA,cAAgBA,GAAU,CACxBvB,IAAgBuB,CAAK,EACrBjB,EAAsB,QAAU,EAClC,EACC,GAAGL,EACJ,KAAK,SACL,MAAOE,EACP,QAAS,GACT,SAAU,CAAC,CAACL,GAEXN,EACD,gBAAC,OAAI,UAAU,gCAAgC,CACjD,CACF,CAEJ,CAAC,EAEDP,EAAqB,YAAc,wBAYnC,IAAMuC,EAA6B,aAAyD,CAAC,CAAE,SAAAhC,EAAU,UAAAD,EAAW,SAAAkC,EAAU,QAAAC,EAAS,GAAGtC,CAAM,EAAGD,IAAiB,CAClK,IAAMoB,EAAgB,aAAWxB,CAAuB,EACxD,OACE,gBAACsC,EAAqB,KAArB,CACC,IAAKlC,EACL,UAAWmC,EAAW,YAAa,2BAA4B/B,CAAS,EACxE,iBAAgBkC,GAAY,OAC5B,QAAUF,GAAU,CAClBG,IAAUH,CAAK,EACfhB,GAAS,mBAAmBnB,EAAM,KAAK,CACzC,EACC,GAAGA,EACJ,QAAS,IAET,gBAAC,QAAK,UAAU,oCAAoC,EACpD,gBAAC,QAAK,UAAU,iCACd,gBAAC,QAAK,UAAU,uCAAuCI,CAAS,EAChE,gBAAC,QAAK,UAAU,wCAAwC,cAAW,IAChEA,CACH,CACF,CACF,CAEJ,CAAC,EAEDgC,EAAqB,YAAc",
6
- "names": ["segmented_control_exports", "__export", "SegmentedControlItem", "SegmentedControlRoot", "React", "classNames", "ToggleGroupPrimitive", "useComposedRefs", "useControllableState", "useLayoutEffect", "sizes", "orientations", "variants", "segmentedControlRootPropDefs", "radiusPropDef", "SegmentedControlContext", "NAVIGATION_KEYS", "SegmentedControlRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "segmentedControlRootPropDefs", "className", "children", "radius", "valueProp", "defaultValueProp", "onValueChangeProp", "style", "disabled", "onKeyDown", "onPointerDown", "rootProps", "extractProps", "value", "setValue", "useControllableState", "keyboardNavigationRef", "context", "itemValue", "rootRef", "composedRef", "useComposedRefs", "items", "renderedCount", "renderedIndex", "child", "useLayoutEffect", "root", "domItems", "index", "item", "ToggleGroupPrimitive", "classNames", "event", "SegmentedControlItem", "iconOnly", "onFocus"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\nimport { useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\n\nimport { segmentedControlRootPropDefs } from './segmented-control.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SegmentedControlRootOwnProps = GetPropDefTypes<typeof segmentedControlRootPropDefs>;\n\ninterface SegmentedControlRootProps extends ComponentPropsWithout<'div', RemovedProps | 'dir'>, SegmentedControlRootOwnProps {\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n}\n\n// Arrow keys select as they move focus, as in a radio group. The root marks a key press, and the\n// item that takes focus from it selects itself. A click or Tab focuses without selecting.\nconst SegmentedControlContext = React.createContext<{ selectFromKeyboard(value: string): void } | null>(null);\n\nconst NAVIGATION_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);\n\nconst SegmentedControlRoot = React.forwardRef<HTMLDivElement, SegmentedControlRootProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, segmentedControlRootPropDefs.size);\n const {\n className,\n children,\n radius,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange: onValueChangeProp,\n style,\n disabled,\n onKeyDown,\n onPointerDown,\n ...rootProps\n } = extractProps(props, segmentedControlRootPropDefs);\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChangeProp,\n defaultProp: defaultValueProp ?? '',\n });\n\n // The indicator is sized and placed from the item count and the selected index, written\n // as custom properties. They are read from the children on render, so the server markup\n // is right, then corrected from the DOM, which also sees items inside fragments or\n // wrapper components.\n const keyboardNavigationRef = React.useRef(false);\n const context = React.useMemo(\n () => ({\n selectFromKeyboard(itemValue: string) {\n if (!keyboardNavigationRef.current) return;\n keyboardNavigationRef.current = false;\n setValue(itemValue);\n },\n }),\n [setValue],\n );\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const items = React.Children.toArray(children).filter(React.isValidElement);\n const renderedCount = items.length;\n const renderedIndex = Math.max(\n 0,\n items.findIndex((child) => (child.props as { value?: unknown }).value === value),\n );\n useLayoutEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n const domItems = Array.from(root.querySelectorAll(':scope > .kui-SegmentedControlItem'));\n const index = domItems.findIndex((item) => item.getAttribute('data-state') === 'on');\n root.style.setProperty('--segmented-control-count', String(domItems.length || 1));\n root.style.setProperty('--segmented-control-index', String(Math.max(0, index)));\n });\n\n return (\n <SegmentedControlContext.Provider value={context}>\n <ToggleGroupPrimitive.Root\n data-disabled={disabled || undefined}\n data-radius={radius}\n ref={composedRef}\n style={\n {\n '--segmented-control-count': renderedCount || 1,\n '--segmented-control-index': renderedIndex,\n ...style,\n } as React.CSSProperties\n }\n className={classNames('kui-SegmentedControlRoot', className)}\n onValueChange={(value) => {\n if (value) {\n setValue(value);\n }\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n keyboardNavigationRef.current = NAVIGATION_KEYS.has(event.key);\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event);\n keyboardNavigationRef.current = false;\n }}\n {...rootProps}\n type=\"single\"\n value={value}\n asChild={false}\n disabled={!!disabled}\n >\n {children}\n <div className=\"kui-SegmentedControlIndicator\" />\n </ToggleGroupPrimitive.Root>\n </SegmentedControlContext.Provider>\n );\n});\n\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ninterface SegmentedControlItemOwnProps {\n value: string;\n /** When true, this segment can't be selected. */\n disabled?: boolean;\n /** When true, applies fixed square width for icon-only segments */\n iconOnly?: boolean;\n}\n\ninterface SegmentedControlItemProps extends ComponentPropsWithout<typeof ToggleGroupPrimitive.Item, RemovedProps | 'type' | 'value'>, SegmentedControlItemOwnProps {}\n\nconst SegmentedControlItem = React.forwardRef<HTMLButtonElement, SegmentedControlItemProps>(({ children, className, iconOnly, onFocus, ...props }, forwardedRef) => {\n const context = React.useContext(SegmentedControlContext);\n // The label is drawn twice, at both weights, so selecting a segment never changes its width.\n // Only plain text is copied, as in Tabs: copying an element would duplicate its id and mount\n // it twice. A segment holding an icon draws once and takes the weight of its state.\n const isText = React.Children.toArray(children).every((child) => typeof child === 'string' || typeof child === 'number');\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SegmentedControlItem', className)}\n data-icon-only={iconOnly || undefined}\n onFocus={(event) => {\n onFocus?.(event);\n context?.selectFromKeyboard(props.value);\n }}\n {...props}\n asChild={false}\n >\n <span className=\"kui-SegmentedControlItemSeparator\" />\n <span className=\"kui-SegmentedControlItemLabel\">\n <span className=\"kui-SegmentedControlItemLabelActive\" data-single={isText ? undefined : ''}>\n {children}\n </span>\n {isText ? (\n <span className=\"kui-SegmentedControlItemLabelInactive\" aria-hidden>\n {children}\n </span>\n ) : null}\n </span>\n </ToggleGroupPrimitive.Item>\n );\n});\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport { SegmentedControlRoot as Root, SegmentedControlItem as Item };\nexport type { SegmentedControlRootProps as RootProps, SegmentedControlItemProps as ItemProps };\n", "import { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n// soft is a filled track. raised and outline match the TextField variants of the same name, for\n// panels where every other control is raised or outlined.\nconst variants = ['soft', 'raised', 'outline'] as const;\n\nconst segmentedControlRootPropDefs = {\n disabled: { type: 'boolean', default: false },\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'soft' },\n orientation: {\n type: 'enum',\n className: 'kui-r-orientation',\n values: orientations,\n default: 'horizontal',\n responsive: true,\n },\n ...radiusPropDef,\n} satisfies {\n disabled?: PropDef<boolean>;\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { segmentedControlRootPropDefs };\n"],
5
+ "mappings": ";gKAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,SAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WACpD,OAAS,mBAAAC,EAAiB,wBAAAC,EAAsB,mBAAAC,MAAuB,oBCDvE,IAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAGxCC,EAAW,CAAC,OAAQ,SAAU,SAAS,EAEvCC,EAA+B,CACnC,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAC5C,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQE,EAAU,QAAS,MAAO,EACrF,YAAa,CACX,KAAM,OACN,UAAW,oBACX,OAAQD,EACR,QAAS,aACT,WAAY,EACd,EACA,GAAGG,CACL,EDEA,IAAMC,EAAgC,gBAAkE,IAAI,EAEtGC,EAAkB,IAAI,IAAI,CAAC,YAAa,aAAc,UAAW,YAAa,OAAQ,KAAK,CAAC,EAE5FC,EAA6B,aAAsD,CAACC,EAAUC,IAAiB,CACnH,IAAMC,EAAQC,EAAkBH,EAAUI,EAA6B,IAAI,EACrE,CACJ,UAAAC,EACA,SAAAC,EACA,OAAAC,EACA,MAAOC,EACP,aAAcC,EACd,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ACA,UAAYoB,GAAU,CACpBxB,IAAYwB,CAAK,EACjBjB,EAAsB,QAAUtB,EAAgB,IAAIuC,EAAM,GAAG,CAC/D,EACA,cAAgBA,GAAU,CACxBvB,IAAgBuB,CAAK,EACrBjB,EAAsB,QAAU,EAClC,EACC,GAAGL,EACJ,KAAK,SACL,MAAOE,EACP,QAAS,GACT,SAAU,CAAC,CAACL,GAEXN,EACD,gBAAC,OAAI,UAAU,gCAAgC,CACjD,CACF,CAEJ,CAAC,EAEDP,EAAqB,YAAc,wBAYnC,IAAMuC,EAA6B,aAAyD,CAAC,CAAE,SAAAhC,EAAU,UAAAD,EAAW,SAAAkC,EAAU,QAAAC,EAAS,GAAGtC,CAAM,EAAGD,IAAiB,CAClK,IAAMoB,EAAgB,aAAWxB,CAAuB,EAIlD4C,EAAe,WAAS,QAAQnC,CAAQ,EAAE,MAAOuB,GAAU,OAAOA,GAAU,UAAY,OAAOA,GAAU,QAAQ,EACvH,OACE,gBAACM,EAAqB,KAArB,CACC,IAAKlC,EACL,UAAWmC,EAAW,YAAa,2BAA4B/B,CAAS,EACxE,iBAAgBkC,GAAY,OAC5B,QAAUF,GAAU,CAClBG,IAAUH,CAAK,EACfhB,GAAS,mBAAmBnB,EAAM,KAAK,CACzC,EACC,GAAGA,EACJ,QAAS,IAET,gBAAC,QAAK,UAAU,oCAAoC,EACpD,gBAAC,QAAK,UAAU,iCACd,gBAAC,QAAK,UAAU,sCAAsC,cAAauC,EAAS,OAAY,IACrFnC,CACH,EACCmC,EACC,gBAAC,QAAK,UAAU,wCAAwC,cAAW,IAChEnC,CACH,EACE,IACN,CACF,CAEJ,CAAC,EAEDgC,EAAqB,YAAc",
6
+ "names": ["segmented_control_exports", "__export", "SegmentedControlItem", "SegmentedControlRoot", "React", "classNames", "ToggleGroupPrimitive", "useComposedRefs", "useControllableState", "useLayoutEffect", "sizes", "orientations", "variants", "segmentedControlRootPropDefs", "radiusPropDef", "SegmentedControlContext", "NAVIGATION_KEYS", "SegmentedControlRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "segmentedControlRootPropDefs", "className", "children", "radius", "valueProp", "defaultValueProp", "onValueChangeProp", "style", "disabled", "onKeyDown", "onPointerDown", "rootProps", "extractProps", "value", "setValue", "useControllableState", "keyboardNavigationRef", "context", "itemValue", "rootRef", "composedRef", "useComposedRefs", "items", "renderedCount", "renderedIndex", "child", "useLayoutEffect", "root", "domItems", "index", "item", "ToggleGroupPrimitive", "classNames", "event", "SegmentedControlItem", "iconOnly", "onFocus", "isText"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as d}from"./chunk-JQMWNI62.js";import{a as R}from"./chunk-FICBVI4M.js";import{a as u,b as f}from"./chunk-5ON3XLRD.js";import*as e from"react";import z from"classnames";var v=e.createContext(void 0),C={values:["1","2","3","4"]},N=e.forwardRef(({kind:r,size:o="2",color:t="gray",className:c,children:a,trailing:s,leading:i,...l},n)=>e.createElement("div",{role:"status","aria-live":"polite",...l,ref:n,className:z("kui-NoticeRoot",`kui-r-size-${o}`,c),"data-kind":r,"data-accent-color":t},i?e.createElement("span",{className:"kui-NoticeIcon","aria-hidden":!0},i):null,e.createElement(R,{as:"div",size:o,className:"kui-NoticeText"},a),s));N.displayName="Strip";var g=e.forwardRef(({icon:r,action:o,onDismiss:t,dismissLabel:c="Dismiss",size:a,...s},i)=>{let l=e.useContext(v),n=f(a??l,C),p=o||t?e.createElement("span",{className:"kui-NoticeActions"},o?e.createElement(u.Provider,{value:n},o):null,t?e.createElement(d,{iconOnly:!0,size:n,variant:"ghost",color:"gray","aria-label":c,className:"kui-NoticeDismiss",onClick:t},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},e.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null;return e.createElement(N,{...s,size:n,ref:i,kind:"notice",leading:r,trailing:p})});g.displayName="Notice";var k=e.forwardRef(({confirmLabel:r,cancelLabel:o="Not now",onConfirm:t,onCancel:c,busy:a=!1,size:s,color:i="gray",...l},n)=>{let p=e.useContext(v),m=f(s??p,C);return e.createElement(N,{...l,size:m,color:i,ref:n,kind:"confirmation",trailing:e.createElement("span",{className:"kui-NoticeActions"},e.createElement(d,{size:m,variant:"ghost",color:"gray",disabled:a,onClick:c},o),e.createElement(d,{size:m,variant:"solid",color:i,loading:a,onClick:t},r))})});k.displayName="Confirmation";export{v as a,g as b,k as c};
3
- //# sourceMappingURL=chunk-7YXHLU4C.js.map
2
+ import{a as d}from"./chunk-YLPCYCYA.js";import{a as R}from"./chunk-FICBVI4M.js";import{a as u,b as f}from"./chunk-5ON3XLRD.js";import*as e from"react";import z from"classnames";var v=e.createContext(void 0),C={values:["1","2","3","4"]},N=e.forwardRef(({kind:r,size:o="2",color:t="gray",className:c,children:a,trailing:s,leading:i,...l},n)=>e.createElement("div",{role:"status","aria-live":"polite",...l,ref:n,className:z("kui-NoticeRoot",`kui-r-size-${o}`,c),"data-kind":r,"data-accent-color":t},i?e.createElement("span",{className:"kui-NoticeIcon","aria-hidden":!0},i):null,e.createElement(R,{as:"div",size:o,className:"kui-NoticeText"},a),s));N.displayName="Strip";var g=e.forwardRef(({icon:r,action:o,onDismiss:t,dismissLabel:c="Dismiss",size:a,...s},i)=>{let l=e.useContext(v),n=f(a??l,C),p=o||t?e.createElement("span",{className:"kui-NoticeActions"},o?e.createElement(u.Provider,{value:n},o):null,t?e.createElement(d,{iconOnly:!0,size:n,variant:"ghost",color:"gray","aria-label":c,className:"kui-NoticeDismiss",onClick:t},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},e.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null;return e.createElement(N,{...s,size:n,ref:i,kind:"notice",leading:r,trailing:p})});g.displayName="Notice";var k=e.forwardRef(({confirmLabel:r,cancelLabel:o="Not now",onConfirm:t,onCancel:c,busy:a=!1,size:s,color:i="gray",...l},n)=>{let p=e.useContext(v),m=f(s??p,C);return e.createElement(N,{...l,size:m,color:i,ref:n,kind:"confirmation",trailing:e.createElement("span",{className:"kui-NoticeActions"},e.createElement(d,{size:m,variant:"ghost",color:"gray",disabled:a,onClick:c},o),e.createElement(d,{size:m,variant:"solid",color:i,loading:a,onClick:t},r))})});k.displayName="Confirmation";export{v as a,g as b,k as c};
3
+ //# sourceMappingURL=chunk-TANYRHGP.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
2
  import{b as P}from"./chunk-G66WDIIV.js";import{h as p,i as b,k as M}from"./chunk-5BXCPANF.js";import*as o from"react";var S=e=>e===void 0?void 0:e==="closed"?"collapsed":"expanded",f=e=>e==="collapsed"?"closed":"open",s=e=>e===void 0||e==="closed"?"collapsed":"expanded",l=e=>e==="left"?"rail":e;function v(e){let d=o.useCallback(r=>p(e,r),[e]);return o.useSyncExternalStore(d,()=>e.version,()=>0)}function V(){let e=M("useSidebarMode"),d=o.useCallback(t=>p(e,t),[e]),r=o.useSyncExternalStore(d,()=>e.entries.get("sidebar")?.value,()=>{}),i=o.useCallback(t=>{e.entries.get("sidebar")?.setValue(f(t),"toggle")},[e]);return{sidebarMode:S(r)??"expanded",setSidebarMode:i}}var g=()=>{};function x(){let e=M("useShell");o.useEffect(()=>{},[]),v(e);let{breakpoint:d,ready:r}=P(),i=o.useMemo(()=>{let n=a=>m=>e.entries.get(a)?.setValue(m==="collapsed"?"closed":"open","toggle"),u=a=>b(e,a===null?null:l(a));return{setLeftMode:n("rail"),setPanelMode:n("panel"),setInspectorMode:n("inspector"),setBottomMode:n("bottom"),setSidebarMode:a=>e.entries.get("sidebar")?.setValue(f(a),"toggle"),setPeekTarget:u,peekPane:a=>u(a),clearPeek:()=>u(null),setHasLeft:g,setHasSidebar:g,togglePane:a=>e.entries.get(l(a))?.toggle("toggle"),expandPane:a=>e.entries.get(l(a))?.setValue("open","toggle"),collapsePane:a=>e.entries.get(l(a))?.setValue("closed","toggle")}},[e]),t=n=>e.entries.get(n)?.value,c=e.entries.get("rail");return{leftMode:s(t("rail")),leftControlledOpen:c?.value===void 0?void 0:c.value!=="closed",panelMode:s(t("panel")),sidebarMode:S(t("sidebar"))??"expanded",inspectorMode:s(t("inspector")),bottomMode:s(t("bottom")),peekTarget:e.peek,hasLeft:e.entries.has("rail"),hasSidebar:e.entries.has("sidebar"),currentBreakpoint:d,currentBreakpointReady:r,leftResolvedPresentation:c?.presentation,...i}}export{V as a,x as b};
3
- //# sourceMappingURL=chunk-INGT6DB6.js.map
3
+ //# sourceMappingURL=chunk-TS4QCDSI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/shell.context.tsx"],
4
+ "sourcesContent": ["'use client';\n\n/**\n * Since 0.8.0 the Shell has two contexts: the pane registry (the store) and\n * the set of panes off the frame. They live in `_internal/shell-store.tsx`. This module keeps\n * the two hooks consumers can reach: `useSidebarMode`, and the deprecated\n * `useShell`.\n */\nimport * as React from 'react';\nimport { useBreakpoint } from '../hooks/use-breakpoint.js';\nimport type { Breakpoint, PaneMode, PaneName, PaneTarget, PresentationValue, SidebarMode } from './shell.types.js';\nimport { setShellPeek, subscribeShellStore, useShellStore, warnOnce, type PaneValue, type ShellStore } from './_internal/shell-store.js';\n\nconst toSidebarMode = (value: PaneValue | undefined): SidebarMode | undefined => (value === undefined ? undefined : value === 'closed' ? 'collapsed' : 'expanded');\n\nconst fromSidebarMode = (mode: SidebarMode): PaneValue => (mode === 'collapsed' ? 'closed' : 'open');\n\nconst toPaneMode = (value: PaneValue | undefined): PaneMode => (value === undefined || value === 'closed' ? 'collapsed' : 'expanded');\n\nconst paneName = (target: PaneTarget): PaneName => (target === 'left' ? 'rail' : target);\n\n/** Re-renders on every change to the registry. For the deprecated whole-shell reader only. */\nfunction useStoreVersion(store: ShellStore) {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n}\n\n/**\n * The Sidebar's mode, and a setter. The setter is a user action: it reports\n * through the Sidebar's `onStateChange` the way a Trigger does.\n */\nexport function useSidebarMode(): { sidebarMode: SidebarMode; setSidebarMode: (mode: SidebarMode) => void } {\n const store = useShellStore('useSidebarMode');\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const value = React.useSyncExternalStore(\n subscribe,\n () => store.entries.get('sidebar')?.value,\n () => undefined,\n );\n const setSidebarMode = React.useCallback(\n (mode: SidebarMode) => {\n store.entries.get('sidebar')?.setValue(fromSidebarMode(mode), 'toggle');\n },\n [store],\n );\n return { sidebarMode: toSidebarMode(value) ?? 'expanded', setSidebarMode };\n}\n\nexport interface ShellContextValue {\n leftMode: PaneMode;\n setLeftMode: (mode: PaneMode) => void;\n /** The Rail's open state, resolved, when it is controlled. */\n leftControlledOpen?: boolean;\n panelMode: PaneMode;\n setPanelMode: (mode: PaneMode) => void;\n sidebarMode: SidebarMode;\n setSidebarMode: (mode: SidebarMode) => void;\n inspectorMode: PaneMode;\n setInspectorMode: (mode: PaneMode) => void;\n bottomMode: PaneMode;\n setBottomMode: (mode: PaneMode) => void;\n peekTarget: PaneTarget | null;\n setPeekTarget: (target: PaneTarget | null) => void;\n peekPane: (target: PaneTarget) => void;\n clearPeek: () => void;\n /** Whether a Rail is mounted. */\n hasLeft: boolean;\n /** No effect since 0.8.0: the registry knows which panes are mounted. */\n setHasLeft: (has: boolean) => void;\n /** Whether a Sidebar is mounted. */\n hasSidebar: boolean;\n /** No effect since 0.8.0: the registry knows which panes are mounted. */\n setHasSidebar: (has: boolean) => void;\n currentBreakpoint: Breakpoint;\n currentBreakpointReady: boolean;\n /** The Rail's presentation at the current breakpoint, when known. */\n leftResolvedPresentation?: PresentationValue;\n togglePane: (target: PaneTarget) => void;\n expandPane: (target: PaneTarget) => void;\n collapsePane: (target: PaneTarget) => void;\n}\n\nconst noop = () => {};\n\n/**\n * @deprecated The whole-shell reader re-renders its consumer on every change\n * to any pane. Use `Shell.Trigger` to drive a pane, `Shell.useSidebarMode`\n * for the Sidebar, and each pane's `open`/`onOpenChange` for its state.\n * Removed in 1.0.\n *\n * Keeps 0.7's shape. The setters act as a user would: they report through\n * the pane's own callback with `reason: 'toggle'`, and a controlled pane\n * changes only when the app passes the new value.\n */\nexport function useShell(): ShellContextValue {\n const store = useShellStore('useShell');\n React.useEffect(() => {\n warnOnce(\"Shell.useShell is deprecated and is removed in 1.0. Use Shell.Trigger, Shell.useSidebarMode, or a pane's own open/onOpenChange.\");\n }, []);\n useStoreVersion(store);\n const { breakpoint, ready } = useBreakpoint();\n const actions = React.useMemo(() => {\n const setMode = (name: PaneName) => (mode: PaneMode) => store.entries.get(name)?.setValue(mode === 'collapsed' ? 'closed' : 'open', 'toggle');\n const setPeekTarget = (target: PaneTarget | null) => setShellPeek(store, target === null ? null : paneName(target));\n return {\n setLeftMode: setMode('rail'),\n setPanelMode: setMode('panel'),\n setInspectorMode: setMode('inspector'),\n setBottomMode: setMode('bottom'),\n setSidebarMode: (mode: SidebarMode) => store.entries.get('sidebar')?.setValue(fromSidebarMode(mode), 'toggle'),\n setPeekTarget,\n peekPane: (target: PaneTarget) => setPeekTarget(target),\n clearPeek: () => setPeekTarget(null),\n setHasLeft: noop,\n setHasSidebar: noop,\n togglePane: (target: PaneTarget) => store.entries.get(paneName(target))?.toggle('toggle'),\n expandPane: (target: PaneTarget) => store.entries.get(paneName(target))?.setValue('open', 'toggle'),\n collapsePane: (target: PaneTarget) => store.entries.get(paneName(target))?.setValue('closed', 'toggle'),\n };\n }, [store]);\n const value = (name: PaneName) => store.entries.get(name)?.value;\n const rail = store.entries.get('rail');\n return {\n leftMode: toPaneMode(value('rail')),\n leftControlledOpen: rail?.value === undefined ? undefined : rail.value !== 'closed',\n panelMode: toPaneMode(value('panel')),\n sidebarMode: toSidebarMode(value('sidebar')) ?? 'expanded',\n inspectorMode: toPaneMode(value('inspector')),\n bottomMode: toPaneMode(value('bottom')),\n peekTarget: store.peek,\n hasLeft: store.entries.has('rail'),\n hasSidebar: store.entries.has('sidebar'),\n currentBreakpoint: breakpoint,\n currentBreakpointReady: ready,\n leftResolvedPresentation: rail?.presentation,\n ...actions,\n };\n}\n"],
5
+ "mappings": ";8FAQA,UAAYA,MAAW,QAKvB,IAAMC,EAAiBC,GAA2DA,IAAU,OAAY,OAAYA,IAAU,SAAW,YAAc,WAEjJC,EAAmBC,GAAkCA,IAAS,YAAc,SAAW,OAEvFC,EAAcH,GAA4CA,IAAU,QAAaA,IAAU,SAAW,YAAc,WAEpHI,EAAYC,GAAkCA,IAAW,OAAS,OAASA,EAGjF,SAASC,EAAgBC,EAAmB,CAC1C,IAAMC,EAAkB,cAAaC,GAAyBC,EAAoBH,EAAOE,CAAQ,EAAG,CAACF,CAAK,CAAC,EAC3G,OAAa,uBACXC,EACA,IAAMD,EAAM,QACZ,IAAM,CACR,CACF,CAMO,SAASI,GAA4F,CAC1G,IAAMJ,EAAQK,EAAc,gBAAgB,EACtCJ,EAAkB,cAAaC,GAAyBC,EAAoBH,EAAOE,CAAQ,EAAG,CAACF,CAAK,CAAC,EACrGP,EAAc,uBAClBQ,EACA,IAAMD,EAAM,QAAQ,IAAI,SAAS,GAAG,MACpC,IAAG,EACL,EACMM,EAAuB,cAC1BX,GAAsB,CACrBK,EAAM,QAAQ,IAAI,SAAS,GAAG,SAASN,EAAgBC,CAAI,EAAG,QAAQ,CACxE,EACA,CAACK,CAAK,CACR,EACA,MAAO,CAAE,YAAaR,EAAcC,CAAK,GAAK,WAAY,eAAAa,CAAe,CAC3E,CAoCA,IAAMC,EAAO,IAAM,CAAC,EAYb,SAASC,GAA8B,CAC5C,IAAMR,EAAQK,EAAc,UAAU,EAChC,YAAU,IAAM,CAEtB,EAAG,CAAC,CAAC,EACLN,EAAgBC,CAAK,EACrB,GAAM,CAAE,WAAAS,EAAY,MAAAC,CAAM,EAAIC,EAAc,EACtCC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AI,MAAM,EACjC,WAAYA,EAAM,QAAQ,IAAI,SAAS,EACvC,kBAAmBS,EACnB,uBAAwBC,EACxB,yBAA0BO,GAAM,aAChC,GAAGL,CACL,CACF",
6
+ "names": ["React", "toSidebarMode", "value", "fromSidebarMode", "mode", "toPaneMode", "paneName", "target", "useStoreVersion", "store", "subscribe", "listener", "subscribeShellStore", "useSidebarMode", "useShellStore", "setSidebarMode", "noop", "useShell", "breakpoint", "ready", "useBreakpoint", "actions", "setMode", "name", "setPeekTarget", "setShellPeek", "rail"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ //# sourceMappingURL=chunk-VRWZLGR7.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as F}from"./chunk-COLJWVN7.js";import{a as z,b as V,c as j}from"./chunk-TUZ665BA.js";import{a as O,b as U,c as q,e as y,f as $}from"./chunk-KBSH6CBD.js";import{a as E}from"./chunk-JFJV4HL3.js";import{b as L}from"./chunk-5KMEUZWN.js";import{d as H}from"./chunk-GKDGNPBD.js";import{a as W}from"./chunk-QPRUTOLI.js";import{b as v,c as K}from"./chunk-PMXIQ5B4.js";import{a as ue}from"./chunk-VQPANPMI.js";var fe={};ue(fe,{Group:()=>oe,GroupContent:()=>ie,GroupLabel:()=>ae,Menu:()=>Y,MenuButton:()=>T,MenuItem:()=>D,MenuSub:()=>ee,MenuSubContent:()=>re,MenuSubTrigger:()=>te,Search:()=>se,Separator:()=>Q});import*as e from"react";import d from"classnames";import{Accordion as C}from"radix-ui";var Q=e.forwardRef(({className:t,...r},n)=>e.createElement(F,{...r,ref:n,className:d("kui-SidebarSeparator",t)}));Q.displayName="Sidebar.Separator";var Y=e.forwardRef(({className:t,...r},n)=>e.createElement("ul",{...r,ref:n,className:d("kui-SidebarMenu",t)}));Y.displayName="Sidebar.Menu";var D=e.forwardRef(({className:t,...r},n)=>e.createElement("li",{...r,ref:n,className:d("kui-SidebarMenuItem",t)}));D.displayName="Sidebar.MenuItem";function G(t){if(typeof t=="function"){let r=t;return r.displayName||r.name}if(t&&typeof t=="object"){let r=t;return r.displayName||G(r.render)||G(r.type)}}function ce(t){return t.type==="svg"||t.props?.icon?!0:G(t.type)?.includes("Icon")??!1}function Z(t){return typeof t=="string"||typeof t=="number"}function de(t){let r=e.Children.toArray(t),n=[],o=[];for(let a of r)e.isValidElement(a)&&ce(a)?n.push(a):o.push(Z(a)?e.createElement("span",{key:o.length,className:"kui-SidebarMenuLabel"},a):a);return n.length===0&&r.length>1&&e.isValidElement(r[0])&&(n.push(r[0]),o.shift()),{icons:n,labels:o}}function pe(t){return e.Children.map(t,r=>Z(r)?e.createElement("span",{className:"kui-SidebarMenuLabel"},r):r)}function _(t){if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;let r=t.currentTarget.closest(".kui-SidebarContent, .kui-SidebarSearchPopover"),n=r?Array.from(r.querySelectorAll(".kui-SidebarMenuButton")).filter(u=>u.offsetParent!==null):[],o=n.indexOf(t.currentTarget),a=n[o+(t.key==="ArrowDown"?1:-1)];o!==-1&&a&&(t.preventDefault(),a.focus())}var T=e.forwardRef(({asChild:t=!1,isActive:r=!1,shortcut:n,badge:o,className:a,children:u,onKeyDown:p,...s},l)=>{let c=v(),k=e.useContext(K),g=c?.size??k,R=c?.presentation==="thin",N=t?L:"button",P=i=>{p?.(i),i.defaultPrevented||_(i)},b=R?null:e.createElement(e.Fragment,null,o&&e.createElement("div",{className:"kui-SidebarMenuBadge"},typeof o=="string"?e.createElement(E,{size:g,variant:"soft"},o):e.createElement(E,{size:o.size||g,variant:o.variant||"soft",color:o.color,radius:o.radius},o.content)),n&&e.createElement("div",{className:"kui-BaseMenuShortcut kui-SidebarMenuShortcut"},e.createElement(W,{size:g},n))),M=i=>{if(R){let{icons:h,labels:w}=de(i);if(h.length>0)return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},h),w)}return e.createElement(e.Fragment,null,pe(i),b)},m;return t&&e.isValidElement(u)&&e.Children.count(u)===1?m=e.cloneElement(u,void 0,M(u.props.children)):t?m=u:m=M(u),e.createElement(N,{type:t?void 0:"button",...s,ref:l,"aria-current":r?"page":void 0,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton",a),"data-active":r||void 0,onKeyDown:P},m)});T.displayName="Sidebar.MenuButton";var x=e.createContext("accordion"),ee=e.forwardRef(({defaultOpen:t=!1,children:r,...n},o)=>(v()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...n,ref:o},e.createElement(O,null,e.createElement(x.Provider,{value:"dropdown"},r))):e.createElement("div",{...n,ref:o},e.createElement(x.Provider,{value:"accordion"},e.createElement(C.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(C.Item,{value:"item"},r)))));ee.displayName="Sidebar.MenuSub";var te=e.forwardRef(({asChild:t=!1,className:r,children:n,onKeyDown:o,...a},u)=>e.useContext(x)==="dropdown"?e.createElement(U,null,e.createElement("button",{...a,onKeyDown:o,ref:u,type:"button","aria-haspopup":"menu",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},n)):e.createElement(C.Header,{asChild:!0},e.createElement("div",null,e.createElement(C.Trigger,{...a,onKeyDown:s=>{_(s),o?.(s)},ref:u,asChild:t,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},t?n:e.createElement(e.Fragment,null,n,e.createElement(H,{className:d("kui-BaseMenuSubTriggerIcon","kui-SidebarMenuSubTriggerIcon")}))))));te.displayName="Sidebar.MenuSubTrigger";function X(t,r){if(e.isValidElement(t)&&t.type===T){let{asChild:n,isActive:o,shortcut:a,badge:u,type:p,children:s,...l}=t.props,c={...l,"data-active":o||void 0,"aria-current":o?"page":void 0};return n&&e.isValidElement(s)&&e.Children.count(s)===1?e.createElement(y,{key:r,...c,asChild:!0},s):e.createElement(y,{key:r,...c},s)}return e.isValidElement(t)?e.createElement(y,{key:r,asChild:!0},t):e.createElement(y,{key:r},t)}function le(t){return e.Children.map(t,(r,n)=>e.isValidElement(r)&&r.type===T?e.createElement(D,{key:r.key??n},r):r)}var re=e.forwardRef(({className:t,children:r,...n},o)=>{let a=v();if(e.useContext(x)==="dropdown"){let p=e.Children.map(r,(s,l)=>{if(e.isValidElement(s)&&s.type===D){let c=e.Children.toArray(s.props.children);return X(c.length===1?c[0]:c,l)}return X(s,l)});return e.createElement(q,{...n,ref:o,size:a?.size,className:d(t)},e.createElement($,null,p))}return e.createElement(C.Content,{...n,ref:o,className:d("kui-SidebarMenuSubContent",t)},e.createElement("ul",{className:"kui-SidebarMenuSubList"},le(r)))});re.displayName="Sidebar.MenuSubContent";var ne=e.createContext(null),oe=e.forwardRef(({className:t,...r},n)=>{let o=e.useId(),[a,u]=e.useState(null),p=e.useMemo(()=>({labelId:o,setLabelId:u}),[o]);return e.createElement(ne.Provider,{value:p},e.createElement("div",{role:a?"group":void 0,"aria-labelledby":a??void 0,...r,ref:n,className:d("kui-BaseMenuGroup","kui-SidebarGroup",t)}))});oe.displayName="Sidebar.Group";var ae=e.forwardRef(({asChild:t=!1,className:r,id:n,...o},a)=>{let u=t?L:"div",p=e.useContext(ne),s=n??p?.labelId,l=p?.setLabelId;return e.useEffect(()=>{if(!(!l||!s))return l(s),()=>l(null)},[l,s]),e.createElement(u,{...o,id:s,ref:a,className:d("kui-BaseMenuLabel","kui-SidebarGroupLabel",r)})});ae.displayName="Sidebar.GroupLabel";var ie=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{...r,ref:n,className:d("kui-SidebarGroupContent",t)}));ie.displayName="Sidebar.GroupContent";var B=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),J=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),se=e.forwardRef(({value:t,onValueChange:r,placeholder:n="Search...",children:o,className:a,...u},p)=>{let s=v(),l=s?.presentation==="thin",c=e.useRef(null),k=e.useRef(null),R=`${e.useId()}-results`,N=e.useRef(t);N.current=t;let P=e.useRef(r);P.current=r;let b=n.replace(/\.+$/,""),M=e.useCallback(i=>{i.key==="Escape"&&N.current&&(i.preventDefault(),i.stopPropagation(),P.current(""),c.current?.focus())},[]),m=e.useCallback(i=>{if(i.defaultPrevented)return;let h=k.current;if(!h)return;let w=h.querySelector('[role="group"]');if(!w)return;let f=Array.from(w.querySelectorAll("a, button"));if(f.length===0)return;let A=document.activeElement,I=A===c.current,S=f.indexOf(A);if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!I&&S!==-1){c.current?.focus();return}switch(i.key){case"ArrowDown":{i.preventDefault(),I||S===-1?f[0]?.focus():S<f.length-1&&f[S+1]?.focus();break}case"ArrowUp":{i.preventDefault(),S<=0?c.current?.focus():f[S-1]?.focus();break}case"Home":{I||(i.preventDefault(),f[0]?.focus());break}case"End":{I||(i.preventDefault(),f[f.length-1]?.focus());break}}},[]);return l?e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--thin",a)},e.createElement(z,null,e.createElement(V,null,e.createElement("button",{type:"button",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarSearchTrigger"),"aria-label":b},e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},e.createElement(B,null)),e.createElement("span",{className:"kui-SidebarMenuLabel"},"Search"))),e.createElement(j,{side:"right",align:"start",size:"2",width:"280px","aria-label":b},e.createElement("div",{ref:k,className:"kui-SidebarSearchPopover",role:"search",onKeyDown:m},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:M,placeholder:n,"aria-label":b,"aria-controls":o?R:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))),o&&e.createElement("div",{id:R,role:"group","aria-label":"Search results"},o))))):e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--expanded","kui-ShellPaneChrome",`kui-r-size-${s?.size??"2"}`,a),role:"search"},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:M,placeholder:n,"aria-label":b}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))))});se.displayName="Sidebar.Search";export{Q as a,Y as b,D as c,T as d,ee as e,te as f,re as g,oe as h,ae as i,ie as j,se as k,fe as l};
3
+ //# sourceMappingURL=chunk-X4PWBFOT.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/sidebar.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport { Accordion } from 'radix-ui';\nimport * as DropdownMenu from './dropdown-menu.js';\nimport * as Popover from './popover.js';\n\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { Kbd } from './kbd.js';\nimport { Chip } from './chip.js';\nimport { ShellSizeContext, useSidebarVisual } from './_internal/pane-chrome.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { ChipProps } from './chip.js';\n\n// Chip configuration for the `badge` slot of sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: ChipProps['variant'];\n size?: ChipProps['size'];\n color?: ChipProps['color'];\n radius?: ChipProps['radius'];\n};\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('kui-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - styled like dropdown menus, but semantically a navigation list.\n// No menu/menuitem roles: those promise an application menu, which a list of links is not.\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} className={classNames('kui-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('kui-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\n// The name a component type goes by: a function, or the function inside forwardRef or memo.\nfunction componentName(type: unknown): string | undefined {\n if (typeof type === 'function') {\n const fn = type as { displayName?: string; name?: string };\n return fn.displayName || fn.name;\n }\n if (type && typeof type === 'object') {\n const wrapped = type as { displayName?: string; render?: unknown; type?: unknown };\n return wrapped.displayName || componentName(wrapped.render) || componentName(wrapped.type);\n }\n return undefined;\n}\n\nfunction isIconElement(el: React.ReactElement<{ icon?: unknown }>): boolean {\n if (el.type === 'svg') return true;\n if (el.props?.icon) return true;\n return componentName(el.type)?.includes('Icon') ?? false;\n}\n\nfunction isText(node: React.ReactNode): node is string | number {\n return typeof node === 'string' || typeof node === 'number';\n}\n\n// Thin mode puts the row's icon in a wrapper that carries the hover and active tile. An icon is\n// an svg, a HugeiconsIcon, or a component named *Icon. Failing that, the first element ahead of\n// other content is taken as the icon (Lucide and other icon sets).\nfunction separateIconsAndLabels(node: React.ReactNode): { icons: React.ReactNode[]; labels: React.ReactNode[] } {\n const children = React.Children.toArray(node);\n const icons: React.ReactNode[] = [];\n const labels: React.ReactNode[] = [];\n\n for (const child of children) {\n if (React.isValidElement<{ icon?: unknown }>(child) && isIconElement(child)) icons.push(child);\n else labels.push(isText(child) ? <span key={labels.length} className=\"kui-SidebarMenuLabel\">{child}</span> : child);\n }\n\n if (icons.length === 0 && children.length > 1 && React.isValidElement(children[0])) {\n icons.push(children[0]);\n labels.shift();\n }\n\n return { icons, labels };\n}\n\n// Wraps the row's own text in a label span. Text inside the caller's elements is left alone.\nfunction wrapTextNodes(node: React.ReactNode): React.ReactNode {\n return React.Children.map(node, (child) => (isText(child) ? <span className=\"kui-SidebarMenuLabel\">{child}</span> : child));\n}\n\n// Arrow Up and Down move between the visible buttons of the same sidebar, as a\n// convenience on top of Tab. Sub-menu triggers take part, so the one-item Accordion\n// behind each sub-menu doesn't keep focus on its own trigger.\nfunction focusAdjacentSidebarButton(event: React.KeyboardEvent<HTMLElement>) {\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;\n const scope = event.currentTarget.closest('.kui-SidebarContent, .kui-SidebarSearchPopover');\n const buttons = scope\n ? Array.from(scope.querySelectorAll<HTMLElement>('.kui-SidebarMenuButton')).filter((el) => el.offsetParent !== null)\n : [];\n const index = buttons.indexOf(event.currentTarget);\n const next = buttons[index + (event.key === 'ArrowDown' ? 1 : -1)];\n if (index !== -1 && next) {\n event.preventDefault();\n next.focus();\n }\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onKeyDown, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const sidebarSize = visual?.size ?? shellSize;\n const isThinMode = visual?.presentation === 'thin';\n\n const Comp = asChild ? Slot : 'button';\n\n // Enter and Space are left to the native button or link. The caller's handler runs first,\n // so it can preventDefault to keep the arrow keys for itself.\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (!event.defaultPrevented) focusAdjacentSidebarButton(event);\n };\n\n const extras = isThinMode ? null : (\n <>\n {badge && (\n <div className=\"kui-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Chip size={sidebarSize} variant=\"soft\">\n {badge}\n </Chip>\n ) : (\n <Chip size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} radius={badge.radius}>\n {badge.content}\n </Chip>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"kui-BaseMenuShortcut kui-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n\n const renderContent = (content: React.ReactNode): React.ReactNode => {\n if (isThinMode) {\n const { icons, labels } = separateIconsAndLabels(content);\n if (icons.length > 0) {\n return (\n <>\n <span className=\"kui-SidebarMenuIconWrapper\">{icons}</span>\n {labels}\n </>\n );\n }\n }\n return (\n <>\n {wrapTextNodes(content)}\n {extras}\n </>\n );\n };\n\n // When rendering asChild, Slot expects a single child element. The row's content goes\n // inside that element, so a Link gets the label, icon tile, badge and shortcut.\n let body: React.ReactNode;\n if (asChild && React.isValidElement<{ children?: React.ReactNode }>(children) && React.Children.count(children) === 1) {\n body = React.cloneElement(children, undefined, renderContent(children.props.children));\n } else if (asChild) {\n body = children;\n } else {\n body = renderContent(children);\n }\n\n return (\n <Comp\n type={asChild ? undefined : 'button'}\n {...props}\n ref={forwardedRef}\n aria-current={isActive ? 'page' : undefined}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n onKeyDown={handleKeyDown}\n >\n {body}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, onKeyDown, ...props }, forwardedRef) => {\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n onKeyDown={onKeyDown}\n ref={forwardedRef as any}\n type=\"button\"\n aria-haspopup=\"menu\"\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-SidebarMenuButton', 'kui-SidebarMenuSubTrigger', className)}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n onKeyDown={(event) => {\n // Runs before the Accordion's own arrow handling, which would keep focus here.\n focusAdjacentSidebarButton(event);\n onKeyDown?.(event);\n }}\n ref={forwardedRef}\n asChild={asChild}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-SidebarMenuButton', 'kui-SidebarMenuSubTrigger', className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('kui-BaseMenuSubTriggerIcon', 'kui-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\n// In a Rail a sub-menu is a dropdown. Each row becomes a menu item: a MenuButton hands the item\n// its props (onClick, disabled, active), and an asChild one hands it its link.\nfunction toDropdownItem(node: React.ReactNode, key: React.Key): React.ReactNode {\n if (React.isValidElement<SidebarMenuButtonProps>(node) && node.type === SidebarMenuButton) {\n // The badge and shortcut have no place in a dropdown row; `type` belongs to a button only.\n const { asChild, isActive, shortcut, badge, type, children, ...rest } = node.props;\n const itemProps = {\n ...(rest as Omit<React.ComponentPropsWithoutRef<typeof DropdownMenu.Item>, 'color'>),\n 'data-active': isActive || undefined,\n 'aria-current': isActive ? ('page' as const) : undefined,\n };\n if (asChild && React.isValidElement(children) && React.Children.count(children) === 1) {\n return (\n <DropdownMenu.Item key={key} {...itemProps} asChild>\n {children}\n </DropdownMenu.Item>\n );\n }\n return (\n <DropdownMenu.Item key={key} {...itemProps}>\n {children}\n </DropdownMenu.Item>\n );\n }\n if (React.isValidElement(node)) {\n return (\n <DropdownMenu.Item key={key} asChild>\n {node}\n </DropdownMenu.Item>\n );\n }\n return <DropdownMenu.Item key={key}>{node}</DropdownMenu.Item>;\n}\n\n// The sub-list is a <ul>, so each row needs its own <li>. A MenuButton written straight into\n// MenuSubContent gets a MenuItem around it, rather than leaving an <a> or <button> in the list.\nfunction wrapBareMenuButtons(children: React.ReactNode): React.ReactNode {\n return React.Children.map(children, (child, index) =>\n React.isValidElement(child) && child.type === SidebarMenuButton ? (\n <SidebarMenuItem key={child.key ?? index}>{child}</SidebarMenuItem>\n ) : (\n child\n ),\n );\n}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const items = React.Children.map(children, (child, index) => {\n if (React.isValidElement<{ children?: React.ReactNode }>(child) && child.type === SidebarMenuItem) {\n const rows = React.Children.toArray(child.props.children);\n return toDropdownItem(rows.length === 1 ? rows[0] : rows, index);\n }\n return toDropdownItem(child, index);\n });\n\n return (\n <DropdownMenu.Content\n {...(props as Omit<React.ComponentPropsWithoutRef<typeof DropdownMenu.Content>, 'color'>)}\n ref={forwardedRef}\n size={visual?.size}\n className={classNames(className)}\n >\n <DropdownMenu.Group>{items}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('kui-SidebarMenuSubContent', className)}>\n <ul className=\"kui-SidebarMenuSubList\">{wrapBareMenuButtons(children)}</ul>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components. A group with a label is a named group; one without stays a plain div, so it\n// isn't announced as an empty group.\ntype SidebarGroupContextValue = { labelId: string; setLabelId: (id: string | null) => void };\nconst SidebarGroupContext = React.createContext<SidebarGroupContextValue | null>(null);\n\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => {\n const labelId = React.useId();\n const [renderedLabelId, setLabelId] = React.useState<string | null>(null);\n const context = React.useMemo(() => ({ labelId, setLabelId }), [labelId]);\n return (\n <SidebarGroupContext.Provider value={context}>\n <div\n role={renderedLabelId ? 'group' : undefined}\n aria-labelledby={renderedLabelId ?? undefined}\n {...props}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuGroup', 'kui-SidebarGroup', className)}\n />\n </SidebarGroupContext.Provider>\n );\n});\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, id, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n const group = React.useContext(SidebarGroupContext);\n const labelId = id ?? group?.labelId;\n const setLabelId = group?.setLabelId;\n\n React.useEffect(() => {\n if (!setLabelId || !labelId) return;\n setLabelId(labelId);\n return () => setLabelId(null);\n }, [setLabelId, labelId]);\n\n return <Comp {...props} id={labelId} ref={forwardedRef} className={classNames('kui-BaseMenuLabel', 'kui-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('kui-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Search component: inline input in expanded, popover trigger in thin\ninterface SidebarSearchProps extends React.ComponentPropsWithoutRef<'div'> {\n value: string;\n onValueChange: (value: string) => void;\n placeholder?: string;\n children?: React.ReactNode;\n}\n\nconst SearchIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\n </svg>\n);\n\nconst ClearIcon = ({ className }: { className?: string }) => (\n <svg className={className} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\nconst SidebarSearch = React.forwardRef<HTMLDivElement, SidebarSearchProps>(\n ({ value, onValueChange, placeholder = 'Search...', children, className, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const isThin = visual?.presentation === 'thin';\n const inputRef = React.useRef<HTMLInputElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const searchId = React.useId();\n const resultsId = `${searchId}-results`;\n\n // Stable refs for values used in callbacks \u2014 avoids recreating handlers on every keystroke\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const onValueChangeRef = React.useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n\n // Derive a clean aria-label from placeholder (strip trailing dots/ellipsis)\n const searchLabel = placeholder.replace(/\\.+$/, '');\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Escape' && valueRef.current) {\n e.preventDefault();\n e.stopPropagation();\n onValueChangeRef.current('');\n inputRef.current?.focus();\n }\n },\n [],\n );\n\n // Arrow key navigation within the popover (input \u2194 results)\n const handlePopoverKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n // A result row already moved focus with its own arrow handling (focusAdjacentSidebarButton\n // scopes to this popover); moving again would skip a row.\n if (e.defaultPrevented) return;\n const container = popoverRef.current;\n if (!container) return;\n\n const resultsGroup = container.querySelector('[role=\"group\"]');\n if (!resultsGroup) return;\n\n const items = Array.from(\n resultsGroup.querySelectorAll<HTMLElement>('a, button'),\n );\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement;\n const isOnInput = active === inputRef.current;\n const currentIndex = items.indexOf(active);\n\n // Typing while a result is focused \u2192 redirect focus to input\n if (\n e.key.length === 1 &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey &&\n !isOnInput &&\n currentIndex !== -1\n ) {\n inputRef.current?.focus();\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n if (isOnInput || currentIndex === -1) {\n items[0]?.focus();\n } else if (currentIndex < items.length - 1) {\n items[currentIndex + 1]?.focus();\n }\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n if (currentIndex <= 0) {\n inputRef.current?.focus();\n } else {\n items[currentIndex - 1]?.focus();\n }\n break;\n }\n case 'Home': {\n // Only intercept when focused on a result, not the input (where Home moves cursor)\n if (!isOnInput) {\n e.preventDefault();\n items[0]?.focus();\n }\n break;\n }\n case 'End': {\n if (!isOnInput) {\n e.preventDefault();\n items[items.length - 1]?.focus();\n }\n break;\n }\n }\n },\n [],\n );\n\n if (isThin) {\n return (\n <div {...props} ref={forwardedRef} className={classNames('kui-SidebarSearch', 'kui-SidebarSearch--thin', className)}>\n <Popover.Root>\n <Popover.Trigger>\n <button\n type=\"button\"\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-SidebarMenuButton', 'kui-SidebarSearchTrigger')}\n aria-label={searchLabel}\n >\n <span className=\"kui-SidebarMenuIconWrapper\">\n <SearchIcon />\n </span>\n <span className=\"kui-SidebarMenuLabel\">Search</span>\n </button>\n </Popover.Trigger>\n <Popover.Content side=\"right\" align=\"start\" size=\"2\" width=\"280px\" aria-label={searchLabel}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- keyDown manages arrow-key navigation between input and results, which is accessibility-enhancing */}\n <div\n ref={popoverRef}\n className=\"kui-SidebarSearchPopover\"\n role=\"search\"\n onKeyDown={handlePopoverKeyDown}\n >\n <div className=\"kui-SidebarSearchInputWrapper\">\n <SearchIcon className=\"kui-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"kui-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n aria-controls={children ? resultsId : undefined}\n // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: popover opens on user action, focusing the input is expected UX\n autoFocus\n />\n {value && (\n <button\n type=\"button\"\n className=\"kui-reset kui-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n {children && (\n <div id={resultsId} role=\"group\" aria-label=\"Search results\">\n {children}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n }\n\n // Expanded mode: inline input\n return (\n <div {...props} ref={forwardedRef} className={classNames('kui-SidebarSearch', 'kui-SidebarSearch--expanded', 'kui-ShellPaneChrome', `kui-r-size-${visual?.size ?? '2'}`, className)} role=\"search\">\n <div className=\"kui-SidebarSearchInputWrapper\">\n <SearchIcon className=\"kui-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"kui-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n />\n {value && (\n <button\n type=\"button\"\n className=\"kui-reset kui-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n </div>\n );\n },\n);\nSidebarSearch.displayName = 'Sidebar.Search';\n\n// Export all components following shadcn's pattern\nexport {\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n SidebarSearch as Search,\n};\n\nexport type { BadgeConfig };\n"],
5
+ "mappings": ";0ZAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,GAAA,iBAAAC,GAAA,eAAAC,GAAA,SAAAC,EAAA,eAAAC,EAAA,aAAAC,EAAA,YAAAC,GAAA,mBAAAC,GAAA,mBAAAC,GAAA,WAAAC,GAAA,cAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,aAAAC,MAAiB,WAyB1B,IAAMC,EAAyB,aAAwE,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC/H,gBAACC,EAAA,CAAW,GAAGF,EAAO,IAAKC,EAAc,UAAWE,EAAW,uBAAwBJ,CAAS,EAAG,CACpG,EACDD,EAAiB,YAAc,oBAM/B,IAAMM,EAAoB,aAA+C,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAGC,IACjG,gBAAC,MAAI,GAAGD,EAAO,IAAKC,EAAc,UAAWE,EAAW,kBAAmBJ,CAAS,EAAG,CACxF,EACDK,EAAY,YAAc,eAI1B,IAAMC,EAAwB,aAAgD,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IACtG,gBAAC,MAAI,GAAGD,EAAO,IAAKC,EAAc,UAAWE,EAAW,sBAAuBJ,CA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AAK,IAAI,MAAM,QAAQ,aAAYV,GAE7E,gBAAC,OACC,IAAKJ,EACL,UAAU,2BACV,KAAK,SACL,UAAWM,GAEX,gBAAC,OAAI,UAAU,iCACb,gBAACd,EAAA,CAAW,UAAU,wBAAwB,EAC9C,gBAAC,SACC,IAAKO,EACL,KAAK,SACL,UAAU,yBACV,MAAOJ,EACP,SAAWU,GAAMT,EAAcS,EAAE,OAAO,KAAK,EAC7C,UAAWjD,EACX,YAAayC,EACb,aAAYO,EACZ,gBAAezE,EAAWsE,EAAY,OAEtC,UAAS,GACX,EACCN,GACC,gBAAC,UACC,KAAK,SACL,UAAU,mCACV,QAAS,IAAM,CACbC,EAAc,EAAE,EAChBG,EAAS,SAAS,MAAM,CAC1B,EACA,aAAW,gBAEX,gBAACN,EAAA,IAAU,CACb,CAEJ,EACC9D,GACC,gBAAC,OAAI,GAAIsE,EAAW,KAAK,QAAQ,aAAW,kBACzCtE,CACH,CAEJ,CACF,CACF,CACF,EAMF,gBAAC,OAAK,GAAGf,EAAO,IAAKC,EAAc,UAAWE,EAAW,oBAAqB,8BAA+B,sBAAuB,cAAc6B,GAAQ,MAAQ,GAAG,GAAIjC,CAAS,EAAG,KAAK,UACxL,gBAAC,OAAI,UAAU,iCACb,gBAAC6E,EAAA,CAAW,UAAU,wBAAwB,EAC9C,gBAAC,SACC,IAAKO,EACL,KAAK,SACL,UAAU,yBACV,MAAOJ,EACP,SAAWU,GAAMT,EAAcS,EAAE,OAAO,KAAK,EAC7C,UAAWjD,EACX,YAAayC,EACb,aAAYO,EACd,EACCT,GACC,gBAAC,UACC,KAAK,SACL,UAAU,mCACV,QAAS,IAAM,CACbC,EAAc,EAAE,EAChBG,EAAS,SAAS,MAAM,CAC1B,EACA,aAAW,gBAEX,gBAACN,EAAA,IAAU,CACb,CAEJ,CACF,CAEJ,CACF,EACAC,GAAc,YAAc",
6
+ "names": ["sidebar_exports", "__export", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "SidebarSearch", "SidebarSeparator", "React", "classNames", "Accordion", "SidebarSeparator", "className", "props", "forwardedRef", "Separator", "classNames", "SidebarMenu", "SidebarMenuItem", "componentName", "type", "fn", "wrapped", "isIconElement", "el", "isText", "node", "separateIconsAndLabels", "children", "icons", "labels", "child", "wrapTextNodes", "focusAdjacentSidebarButton", "event", "scope", "buttons", "index", "next", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onKeyDown", "visual", "useSidebarVisual", "shellSize", "ShellSizeContext", "sidebarSize", "isThinMode", "Comp", "Slot", "handleKeyDown", "extras", "Chip", "Kbd", "renderContent", "content", "body", "SidebarSubMenuModeContext", "SidebarMenuSub", "defaultOpen", "DropdownMenuRoot", "Accordion", "SidebarMenuSubTrigger", "DropdownMenuTrigger", "ThickChevronRightIcon", "toDropdownItem", "key", "rest", "itemProps", "DropdownMenuItem", "wrapBareMenuButtons", "SidebarMenuSubContent", "items", "rows", "DropdownMenuContent", "DropdownMenuGroup", "SidebarGroupContext", "SidebarGroup", "labelId", "renderedLabelId", "setLabelId", "context", "SidebarGroupLabel", "id", "group", "SidebarGroupContent", "SearchIcon", "ClearIcon", "SidebarSearch", "value", "onValueChange", "placeholder", "isThin", "inputRef", "popoverRef", "resultsId", "valueRef", "onValueChangeRef", "searchLabel", "e", "handlePopoverKeyDown", "container", "resultsGroup", "active", "isOnInput", "currentIndex", "PopoverRoot", "PopoverTrigger", "PopoverContent"]
7
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as se,b as ie}from"./chunk-TUZ665BA.js";import{a as ne}from"./chunk-WUCBFB25.js";import{a as ae}from"./chunk-TGRHRMQI.js";import{a as re}from"./chunk-HGF4CKRY.js";import{b as te}from"./chunk-FVRVBB6O.js";import{a as Y}from"./chunk-BUXK5VGR.js";import{c as X}from"./chunk-5KMEUZWN.js";import{b as Z,c as ee}from"./chunk-GKDGNPBD.js";import{b as oe}from"./chunk-5ON3XLRD.js";import{c as W}from"./chunk-HBWBPBSA.js";import{a as Q}from"./chunk-LPLW7OWA.js";import{a as I}from"./chunk-L54FWKJE.js";import{b as J}from"./chunk-XU74PNM2.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 ue,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 pe=e.createContext(null),M=o=>{let r=e.useContext(pe);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,p=oe(t,G.size),[E,w]=A({prop:m,defaultProp:f,onChange:l}),[u,we]=A({prop:a,defaultProp:n,onChange:s}),[q,N]=A({prop:g,defaultProp:h,onChange:y}),$=typeof v=="function"?v(u):v,[D]=e.useState(()=>Ge(u));K(()=>{D.set(u)},[D,u]);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:u,displayValue:$,setOpen:F,size:p,placeholder:c,searchPlaceholder:P,disabled:R,color:V,loop:b,shouldFilter:i,filter:C,triggerRef:B,getTriggerLabel:U}),[u,$,F,p,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(pe.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=ue(r,t.triggerRef),{getTriggerLabel:v}=t;e.useEffect(()=>{},[v]);let k=u=>{h?.(u),x&&u.preventDefault()},p=u=>{y?.(u),!(u.defaultPrevented||x||b)&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.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||void 0,"data-loading":c||void 0,"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:p,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 p=i();p!==void 0&&R(p)},[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=p=>{if(P?.(p),p.defaultPrevented)return;let E=V.current;if(!E||E.querySelector("[cmdk-input]"))return;p.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=ue(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 p=a??k;g(p),b(p)},[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-XFMAA4MD.js.map
@@ -0,0 +1,7 @@
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 * 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 { useThemeContext } from './theme.js';\nimport { PortalTheme } from './_internal/portal-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 || undefined}\n data-loading={loading || undefined}\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 <PortalTheme 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 </PortalTheme>\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": ";+mBAAA,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,KAmBA,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,OChB7D,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAK3BC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,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ACJ,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", "PortalTheme", "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
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{z as e}from"zod";var t=e.object({as:e.string().optional().describe("HTML element type to render as"),asChild:e.boolean().optional().describe("Merge props with child element instead of rendering wrapper"),size:e.union([e.enum(["1","2","3","4"]),e.object({initial:e.enum(["1","2","3","4"]).optional(),xs:e.enum(["1","2","3","4"]).optional(),sm:e.enum(["1","2","3","4"]).optional(),md:e.enum(["1","2","3","4"]).optional(),lg:e.enum(["1","2","3","4"]).optional(),xl:e.enum(["1","2","3","4"]).optional()})]).default("2").describe("Button size for responsive design and interface density"),variant:e.enum(["raised","solid","soft","surface","outline","ghost"]).default("solid").describe("Visual variant that determines the button's appearance and context"),color:e.enum(["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]).optional().describe("Accent color for the button"),radius:e.enum(["none","small","medium","large","full"]).optional().describe("Border radius for the button"),loading:e.boolean().optional().default(!1).describe("Loading state that shows a spinner and disables interaction"),disabled:e.boolean().optional().default(!1).describe("Disabled state"),done:e.boolean().optional().describe("Shows a tick in place of the icon to say the action finished"),type:e.enum(["button","submit","reset"]).optional().describe("Type attribute for form buttons"),className:e.string().optional().describe("Additional CSS class name"),style:e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),onClick:e.function().optional().describe("Click handler"),onFocus:e.function().optional().describe("Focus handler"),onBlur:e.function().optional().describe("Blur handler"),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),onKeyDown:e.function().optional().describe("Key down handler"),onKeyUp:e.function().optional().describe("Key up handler"),onSubmit:e.function().optional().describe("Form submission handler"),tabIndex:e.number().optional().describe("Tab index for keyboard navigation"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference"),"aria-expanded":e.boolean().optional().describe("ARIA expanded state"),"aria-pressed":e.boolean().optional().describe("ARIA pressed state"),"aria-current":e.union([e.boolean(),e.enum(["page","step","location","date","time"])]).optional().describe("ARIA current state"),"aria-controls":e.string().optional().describe("ARIA controls reference"),"aria-owns":e.string().optional().describe("ARIA owns reference"),"data-*":e.record(e.string(),e.string()).optional().describe("Data attributes"),id:e.string().optional().describe("ID attribute"),title:e.string().optional().describe("Title attribute for tooltip"),role:e.string().optional().describe("Role attribute"),children:e.any().optional().describe("Children elements")}).strict();function i(o){return o}export{t as a,i as b};
3
+ //# sourceMappingURL=chunk-XGV7KNSE.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/schemas/base-button.schema.ts"],
4
+ "sourcesContent": ["import { z } from 'zod';\n\n/**\n * BaseButton Zod schema - Single source of truth for all button component props\n *\n * This schema defines the core button functionality used by the Button and Toggle\n * components. It ensures consistency across\n * the design system and provides machine-readable validation.\n *\n * @example\n * ```tsx\n * // Basic validation\n * const props = BaseButtonSchema.parse({ size: '2', variant: 'solid' });\n *\n * // With responsive props\n * const responsiveProps = BaseButtonSchema.parse({\n * size: { initial: '1', sm: '2', md: '3' },\n * variant: 'solid'\n * });\n * ```\n */\nexport const BaseButtonSchema = z\n .object({\n /**\n * Polymorphic rendering - render as different HTML elements\n * @default 'button'\n */\n as: z.string().optional().describe('HTML element type to render as'),\n\n /**\n * Use asChild to merge props with child element\n * @default false\n */\n asChild: z\n .boolean()\n .optional()\n .describe('Merge props with child element instead of rendering wrapper'),\n\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n * @default '2'\n */\n size: z\n .union([\n z.enum(['1', '2', '3', '4']),\n z.object({\n initial: z.enum(['1', '2', '3', '4']).optional(),\n xs: z.enum(['1', '2', '3', '4']).optional(),\n sm: z.enum(['1', '2', '3', '4']).optional(),\n md: z.enum(['1', '2', '3', '4']).optional(),\n lg: z.enum(['1', '2', '3', '4']).optional(),\n xl: z.enum(['1', '2', '3', '4']).optional(),\n }),\n ])\n .default('2')\n .describe('Button size for responsive design and interface density'),\n\n /**\n * Visual variant that determines the button's appearance and context\n * @default 'solid'\n */\n variant: z\n .enum(['raised', 'solid', 'soft', 'surface', 'outline', 'ghost'])\n .default('solid')\n .describe(\"Visual variant that determines the button's appearance and context\"),\n\n /**\n * Accent color for the button\n */\n color: z\n .enum([\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'orange',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'gold',\n 'bronze',\n 'gray',\n ])\n .optional()\n .describe('Accent color for the button'),\n\n /**\n * Border radius for the button\n */\n radius: z\n .enum(['none', 'small', 'medium', 'large', 'full'])\n .optional()\n .describe('Border radius for the button'),\n\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n * @default false\n */\n loading: z\n .boolean()\n .optional()\n .default(false)\n .describe('Loading state that shows a spinner and disables interaction'),\n\n /**\n * Disabled state\n * @default false\n */\n disabled: z.boolean().optional().default(false).describe('Disabled state'),\n\n /**\n * Shows a tick in place of the icon to say the action finished\n * @default false\n */\n done: z.boolean().optional().describe('Shows a tick in place of the icon to say the action finished'),\n\n /**\n * Type attribute for form buttons\n * @default 'button'\n */\n type: z\n .enum(['button', 'submit', 'reset'])\n .optional()\n .describe('Type attribute for form buttons'),\n\n /**\n * Additional CSS class name\n */\n className: z.string().optional().describe('Additional CSS class name'),\n\n /**\n * Inline styles\n */\n style: z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles'),\n\n /**\n * Click handler\n */\n onClick: z.function().optional().describe('Click handler'),\n\n /**\n * Focus handler\n */\n onFocus: z.function().optional().describe('Focus handler'),\n\n /**\n * Blur handler\n */\n onBlur: z.function().optional().describe('Blur handler'),\n\n /**\n * Mouse enter handler\n */\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n\n /**\n * Mouse leave handler\n */\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n\n /**\n * Key down handler\n */\n onKeyDown: z.function().optional().describe('Key down handler'),\n\n /**\n * Key up handler\n */\n onKeyUp: z.function().optional().describe('Key up handler'),\n\n /**\n * Form submission handler\n */\n onSubmit: z.function().optional().describe('Form submission handler'),\n\n /**\n * Tab index for keyboard navigation\n */\n tabIndex: z.number().optional().describe('Tab index for keyboard navigation'),\n\n /**\n * ARIA label for accessibility\n */\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n\n /**\n * ARIA labelled by reference\n */\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n\n /**\n * ARIA described by reference\n */\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n\n /**\n * ARIA expanded state\n */\n 'aria-expanded': z.boolean().optional().describe('ARIA expanded state'),\n\n /**\n * ARIA pressed state\n */\n 'aria-pressed': z.boolean().optional().describe('ARIA pressed state'),\n\n /**\n * ARIA current state\n */\n 'aria-current': z\n .union([z.boolean(), z.enum(['page', 'step', 'location', 'date', 'time'])])\n .optional()\n .describe('ARIA current state'),\n\n /**\n * ARIA controls reference\n */\n 'aria-controls': z.string().optional().describe('ARIA controls reference'),\n\n /**\n * ARIA owns reference\n */\n 'aria-owns': z.string().optional().describe('ARIA owns reference'),\n\n /**\n * Data attributes\n */\n 'data-*': z.record(z.string(), z.string()).optional().describe('Data attributes'),\n\n /**\n * ID attribute\n */\n id: z.string().optional().describe('ID attribute'),\n\n /**\n * Title attribute for tooltip\n */\n title: z.string().optional().describe('Title attribute for tooltip'),\n\n /**\n * Role attribute\n */\n role: z.string().optional().describe('Role attribute'),\n\n /**\n * Children elements\n */\n children: z.any().optional().describe('Children elements'),\n })\n .strict();\n\n/**\n * Type derived from BaseButton Zod schema\n * This ensures type safety and consistency with the schema\n */\nexport type BaseButtonProps = z.infer<typeof BaseButtonSchema>;\n\n/**\n * Development-only helper to validate and normalize props\n * This function should only be used in development mode\n *\n * @param props - Props to validate and normalize\n * @returns Validated and normalized props\n *\n * @example\n * ```tsx\n * // In development, this will validate props and show helpful errors\n * const validatedProps = parseBaseButtonProps({ size: 'invalid', variant: 'solid' });\n * // Throws: \"Invalid enum value. Expected '1' | '2' | '3' | '4', received 'invalid'\"\n * ```\n */\nexport function parseBaseButtonProps(props: unknown): BaseButtonProps {\n if (process.env.NODE_ENV === 'development') {\n return BaseButtonSchema.parse(props);\n }\n return props as BaseButtonProps;\n}\n"],
5
+ "mappings": ";AAAA,OAAS,KAAAA,MAAS,MAqBX,IAAMC,EAAmBD,EAC7B,OAAO,CAKN,GAAIA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gCAAgC,EAMnE,QAASA,EACN,QAAQ,EACR,SAAS,EACT,SAAS,6DAA6D,EAOzE,KAAMA,EACH,MAAM,CACLA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAC3BA,EAAE,OAAO,CACP,QAASA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC/C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,CAC5C,CAAC,CACH,CAAC,EACA,QAAQ,GAAG,EACX,SAAS,yDAAyD,EAMrE,QAASA,EACN,KAAK,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,OAAO,CAAC,EAC/D,QAAQ,OAAO,EACf,SAAS,oEAAoE,EAKhF,MAAOA,EACJ,KAAK,CACJ,SACA,MACA,OACA,UACA,OACA,OACA,SACA,SACA,OACA,SACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,SACA,MACA,OACA,OACA,SACA,QACA,OACA,SACA,MACF,CAAC,EACA,SAAS,EACT,SAAS,6BAA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AAS,4BAA4B,EAK9E,mBAAoBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,EAKhF,gBAAiBA,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKtE,eAAgBA,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,oBAAoB,EAKpE,eAAgBA,EACb,MAAM,CAACA,EAAE,QAAQ,EAAGA,EAAE,KAAK,CAAC,OAAQ,OAAQ,WAAY,OAAQ,MAAM,CAAC,CAAC,CAAC,EACzE,SAAS,EACT,SAAS,oBAAoB,EAKhC,gBAAiBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,yBAAyB,EAKzE,YAAaA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKjE,SAAUA,EAAE,OAAOA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS,iBAAiB,EAKhF,GAAIA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,cAAc,EAKjD,MAAOA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,EAKnE,KAAMA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gBAAgB,EAKrD,SAAUA,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,mBAAmB,CAC3D,CAAC,EACA,OAAO,EAsBH,SAASE,EAAqBC,EAAiC,CAIpE,OAAOA,CACT",
6
+ "names": ["z", "BaseButtonSchema", "parseBaseButtonProps", "props"]
7
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{z as e}from"zod";var h=e.enum(["expanded","collapsed"]).describe("Pane state mode"),l=e.enum(["collapsed","expanded"]).describe("Sidebar state"),u=e.enum(["fixed","overlay","stacked"]).describe("Presentation mode"),z=e.enum(["initial","xs","sm","md","lg","xl"]).describe("Responsive breakpoint"),b=e.enum(["left","rail","panel","sidebar","inspector","bottom"]).describe("Pane target. `left` is deprecated: use `rail`."),m=e.enum(["toggle","expand","collapse"]).describe("Trigger action"),d=e.enum(["toggle","dismiss"]).describe("Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim"),S=e.enum(["init","resize","controlled"]).describe("Why the size changed");function i(n){return e.union([n,e.object({initial:n.optional(),xs:n.optional(),sm:n.optional(),md:n.optional(),lg:n.optional(),xl:n.optional()})])}var x=i(h).describe("Responsive pane mode configuration"),p=i(l).describe("Responsive sidebar state"),o=i(u).describe("Responsive presentation configuration"),c=i(e.boolean()).describe("Responsive open state"),f=e.object({load:e.function({output:e.union([e.number(),e.promise(e.number()),e.undefined()])}).optional(),save:e.function({input:[e.number()],output:e.union([e.void(),e.promise(e.void())])}).optional()}).describe("Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`."),t=e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),a={open:e.union([e.boolean(),c]).optional().describe("The open state, when controlled. A responsive object is deprecated."),defaultOpen:e.union([e.boolean(),c]).optional().describe("The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint."),onOpenChange:e.function({input:[e.boolean(),e.object({reason:d})],output:e.void()}).optional().describe("Called when a user opens or closes the pane. Never called on mount or on a resize.")},r={id:e.string().optional().describe("The pane id. A Trigger points `aria-controls` at it."),presentation:o.optional(),expandedSize:e.number().optional(),flush:e.boolean().optional().describe("Whether the pane joins the app frame. Defaults to true. `false` pulls it off the frame as a card."),onExpand:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),onCollapse:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional()},s={minSize:e.number().optional(),maxSize:e.number().optional().describe("The largest size. A drag also stops before the handle leaves the frame."),resizable:e.boolean().optional(),collapsible:e.boolean().optional().describe("A double-click on the handle closes the pane"),size:e.union([e.number(),e.string()]).optional().describe("The size, when controlled"),defaultSize:e.union([e.number(),e.string()]).optional().describe("The starting size"),onSizeChange:e.function({input:[e.number(),e.object({reason:S})],output:e.void()}).optional(),sizeUpdate:e.enum(["throttle","debounce"]).optional().describe("Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes."),sizeUpdateMs:e.number().optional(),onResize:e.function({input:[e.number()],output:e.void()}).optional().describe("Called during a drag, at most once per animation frame"),onResizeStart:e.function({input:[e.number()],output:e.void()}).optional(),onResizeEnd:e.function({input:[e.number()],output:e.void()}).optional(),snapPoints:e.array(e.number()).optional().describe("Deprecated, removed in 1.0"),snapTolerance:e.number().optional().describe("Deprecated, removed in 1.0"),collapseThreshold:e.number().optional().describe("Deprecated, removed in 1.0"),paneId:e.string().optional().describe("Deprecated, removed in 1.0"),persistence:f.optional()},P=e.object({height:e.union([e.literal("full"),e.literal("auto"),e.string(),e.number()]).default("full").describe("Height of the frame. `full` is the window: 100dvh, with 100vh where dvh is not supported, and on a narrow touch screen the page scrolls. Any value other than `full` or `auto` makes the Shell contained."),contained:e.boolean().default(!1).describe("Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it."),size:e.enum(["1","2","3"]).default("2").describe("Index of the pane chrome and the Sidebar rows in it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("The Shell parts, and anything else, rendered in order")}).strict(),y=e.object({height:e.number().default(64).describe("Height of the header, in pixels"),flush:e.boolean().optional().describe("Whether the header joins the app frame. Defaults to true. `false` makes it a card off the frame."),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Header content")}).strict(),v=e.object({...r,...a,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(64).describe("Width in pixels"),collapsible:e.boolean().optional()}).strict(),w=e.object({...r,...a,...s,presentation:o.optional().describe("Presentation mode. With no value the panel follows the Rail's."),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(100).describe("Minimum width when resizing"),maxSize:e.number().default(800).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),R=e.object({...r,...s,state:e.union([l,p]).optional().describe("The state, when controlled. A responsive object is deprecated."),defaultState:p.optional().describe("The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay."),onStateChange:e.function({input:[l,e.object({reason:d})],output:e.void()}).optional().describe("Called when a user changes the state. Never called on mount or on a resize."),presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(400).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the sidebar can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the sidebar")}).strict(),T=e.object({flush:e.boolean().optional().describe("Whether the work area joins the app frame. Defaults to true. `false` makes it a card on the Shell background."),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Main content")}).strict(),k=e.object({...r,...a,...s,presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(320).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(500).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the inspector can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the inspector")}).strict(),C=e.object({...r,...a,...s,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(200).describe("Open height in pixels"),minSize:e.number().default(100).describe("Minimum height when resizing"),maxSize:e.number().default(400).describe("Maximum height when resizing"),resizable:e.boolean().default(!1).describe("Whether the bottom panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),N=e.object({target:b.describe("Which pane to drive"),action:m.default("toggle").describe("Action to perform"),peekOnHover:e.boolean().default(!1).describe("Deprecated, removed in 1.0. Shows a preview of a closed pane on hover."),type:e.enum(["button","submit","reset"]).default("button").describe("The button type"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Trigger content"),onClick:e.function().optional().describe("Runs before the trigger acts. Call `event.preventDefault()` to cancel it."),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference")}).strict(),A=e.object({className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Handle content")}).strict();function M(n){return n}function E(n){return n}function j(n){return n}function D(n){return n}function O(n){return n}function H(n){return n}function W(n){return n}function _(n){return n}function I(n){return n}function V(n){return n}export{P as a,y as b,v as c,w as d,R as e,T as f,k as g,C as h,N as i,A as j,M as k,E as l,j as m,D as n,O as o,H as p,W as q,_ as r,I as s,V as t};
3
+ //# sourceMappingURL=chunk-XOAOSRTH.js.map