@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,3 +0,0 @@
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"),b=e.enum(["fixed","overlay","stacked"]).describe("Presentation mode"),z=e.enum(["initial","xs","sm","md","lg","xl"]).describe("Responsive breakpoint"),u=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 r(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=r(h).describe("Responsive pane mode configuration"),p=r(l).describe("Responsive sidebar state"),o=r(b).describe("Responsive presentation configuration"),c=r(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.")},i={id:e.string().optional().describe("The pane id. A Trigger points `aria-controls` at it."),presentation:o.optional(),expandedSize:e.number().optional(),inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),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"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Header content")}).strict(),v=e.object({...i,...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({...i,...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({...i,...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({inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Main content")}).strict(),C=e.object({...i,...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(),N=e.object({...i,...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(),k=e.object({target:u.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 O(n){return n}function j(n){return n}function D(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,C as g,N as h,k as i,A as j,M as k,E as l,O as m,j as n,D as o,H as p,W as q,_ as r,I as s,V as t};
3
- //# sourceMappingURL=chunk-CZ24FOFS.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/schemas/shell.schema.ts"],
4
- "sourcesContent": ["import { z } from 'zod';\n\n/**\n * Shell Zod schema: the Shell's props, for tools that read a schema\n * (editors, assistants, documentation).\n *\n * Shell is the frame of an application. Each pane holds its own open state;\n * a pane nobody has touched follows the window, and the stylesheet resolves\n * it at each breakpoint. Callbacks report user actions only.\n *\n * @example\n * ```tsx\n * const props = ShellRootSchema.parse({ height: 'full' });\n *\n * const sidebarProps = ShellSidebarSchema.parse({\n * defaultState: { initial: 'collapsed', md: 'expanded' },\n * presentation: { initial: 'overlay', sm: 'fixed' },\n * });\n * ```\n */\n\n// Common types\nconst PaneModeSchema = z.enum(['expanded', 'collapsed']).describe('Pane state mode');\nconst SidebarModeSchema = z.enum(['collapsed', 'expanded']).describe('Sidebar state');\nconst PresentationValueSchema = z.enum(['fixed', 'overlay', 'stacked']).describe('Presentation mode');\nconst _BreakpointSchema = z.enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl']).describe('Responsive breakpoint');\nconst PaneTargetSchema = z.enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target. `left` is deprecated: use `rail`.');\nconst TriggerActionSchema = z.enum(['toggle', 'expand', 'collapse']).describe('Trigger action');\nconst OpenChangeReasonSchema = z.enum(['toggle', 'dismiss']).describe('Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim');\nconst SizeChangeReasonSchema = z.enum(['init', 'resize', 'controlled']).describe('Why the size changed');\n\nfunction responsive<T extends z.ZodTypeAny>(value: T) {\n return z.union([\n value,\n z.object({\n initial: value.optional(),\n xs: value.optional(),\n sm: value.optional(),\n md: value.optional(),\n lg: value.optional(),\n xl: value.optional(),\n }),\n ]);\n}\n\n// Responsive schemas\nconst _ResponsiveModeSchema = responsive(PaneModeSchema).describe('Responsive pane mode configuration');\nconst ResponsiveSidebarModeSchema = responsive(SidebarModeSchema).describe('Responsive sidebar state');\nconst ResponsivePresentationSchema = responsive(PresentationValueSchema).describe('Responsive presentation configuration');\nconst ResponsiveOpenSchema = responsive(z.boolean()).describe('Responsive open state');\n\n// Size persistence adapter (deprecated)\nconst PaneSizePersistenceSchema = z\n .object({\n load: z.function({ output: z.union([z.number(), z.promise(z.number()), z.undefined()]) }).optional(),\n save: z.function({ input: [z.number()], output: z.union([z.void(), z.promise(z.void())]) }).optional(),\n })\n .describe('Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n\nconst StyleSchema = z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles');\n\nconst OpenPropsSchema = {\n open: z.union([z.boolean(), ResponsiveOpenSchema]).optional().describe('The open state, when controlled. A responsive object is deprecated.'),\n defaultOpen: z\n .union([z.boolean(), ResponsiveOpenSchema])\n .optional()\n .describe('The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint.'),\n onOpenChange: z\n .function({ input: [z.boolean(), z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user opens or closes the pane. Never called on mount or on a resize.'),\n};\n\n// Props shared by every pane\nconst PaneBaseShape = {\n id: z.string().optional().describe('The pane id. A Trigger points `aria-controls` at it.'),\n presentation: ResponsivePresentationSchema.optional(),\n expandedSize: z.number().optional(),\n inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),\n onExpand: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),\n onCollapse: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional(),\n};\n\n// Props of a pane that resizes\nconst ResizeShape = {\n minSize: z.number().optional(),\n maxSize: z.number().optional().describe('The largest size. A drag also stops before the handle leaves the frame.'),\n resizable: z.boolean().optional(),\n collapsible: z.boolean().optional().describe('A double-click on the handle closes the pane'),\n size: z.union([z.number(), z.string()]).optional().describe('The size, when controlled'),\n defaultSize: z.union([z.number(), z.string()]).optional().describe('The starting size'),\n onSizeChange: z.function({ input: [z.number(), z.object({ reason: SizeChangeReasonSchema })], output: z.void() }).optional(),\n sizeUpdate: z\n .enum(['throttle', 'debounce'])\n .optional()\n .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.'),\n sizeUpdateMs: z.number().optional(),\n onResize: z\n .function({ input: [z.number()], output: z.void() })\n .optional()\n .describe('Called during a drag, at most once per animation frame'),\n onResizeStart: z.function({ input: [z.number()], output: z.void() }).optional(),\n onResizeEnd: z.function({ input: [z.number()], output: z.void() }).optional(),\n snapPoints: z.array(z.number()).optional().describe('Deprecated, removed in 1.0'),\n snapTolerance: z.number().optional().describe('Deprecated, removed in 1.0'),\n collapseThreshold: z.number().optional().describe('Deprecated, removed in 1.0'),\n paneId: z.string().optional().describe('Deprecated, removed in 1.0'),\n persistence: PaneSizePersistenceSchema.optional(),\n};\n\n/**\n * Shell.Root component schema\n */\nexport const ShellRootSchema = z\n .object({\n height: z\n .union([z.literal('full'), z.literal('auto'), z.string(), z.number()])\n .default('full')\n .describe(\n '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.',\n ),\n contained: z.boolean().default(false).describe('Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it.'),\n size: z.enum(['1', '2', '3']).default('2').describe('Index of the pane chrome and the Sidebar rows in it'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('The Shell parts, and anything else, rendered in order'),\n })\n .strict();\n\n/**\n * Shell.Header component schema\n */\nexport const ShellHeaderSchema = z\n .object({\n height: z.number().default(64).describe('Height of the header, in pixels'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Header content'),\n })\n .strict();\n\n/**\n * Shell.Rail component schema\n */\nexport const ShellRailSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(64).describe('Width in pixels'),\n collapsible: z.boolean().optional(),\n })\n .strict();\n\n/**\n * Shell.Panel component schema\n */\nexport const ShellPanelSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.optional().describe(\"Presentation mode. With no value the panel follows the Rail's.\"),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(100).describe('Minimum width when resizing'),\n maxSize: z.number().default(800).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Sidebar component schema\n */\nexport const ShellSidebarSchema = z\n .object({\n ...PaneBaseShape,\n ...ResizeShape,\n state: z.union([SidebarModeSchema, ResponsiveSidebarModeSchema]).optional().describe('The state, when controlled. A responsive object is deprecated.'),\n defaultState: ResponsiveSidebarModeSchema.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.'),\n onStateChange: z\n .function({ input: [SidebarModeSchema, z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user changes the state. Never called on mount or on a resize.'),\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(400).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the sidebar can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the sidebar'),\n })\n .strict();\n\n/**\n * Shell.Content component schema\n */\nexport const ShellContentSchema = z\n .object({\n inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Main content'),\n })\n .strict();\n\n/**\n * Shell.Inspector component schema\n */\nexport const ShellInspectorSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(320).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(500).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the inspector can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the inspector'),\n })\n .strict();\n\n/**\n * Shell.Bottom component schema\n */\nexport const ShellBottomSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(200).describe('Open height in pixels'),\n minSize: z.number().default(100).describe('Minimum height when resizing'),\n maxSize: z.number().default(400).describe('Maximum height when resizing'),\n resizable: z.boolean().default(false).describe('Whether the bottom panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Trigger component schema\n */\nexport const ShellTriggerSchema = z\n .object({\n target: PaneTargetSchema.describe('Which pane to drive'),\n action: TriggerActionSchema.default('toggle').describe('Action to perform'),\n peekOnHover: z.boolean().default(false).describe('Deprecated, removed in 1.0. Shows a preview of a closed pane on hover.'),\n type: z.enum(['button', 'submit', 'reset']).default('button').describe('The button type'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Trigger content'),\n onClick: z.function().optional().describe('Runs before the trigger acts. Call `event.preventDefault()` to cancel it.'),\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n })\n .strict();\n\n/**\n * Shell.Handle component schema (for resize handles)\n */\nexport const ShellHandleSchema = z\n .object({\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Handle content'),\n })\n .strict();\n\n// Type exports\nexport type ShellRootProps = z.infer<typeof ShellRootSchema>;\nexport type ShellHeaderProps = z.infer<typeof ShellHeaderSchema>;\nexport type ShellRailProps = z.infer<typeof ShellRailSchema>;\nexport type ShellPanelProps = z.infer<typeof ShellPanelSchema>;\nexport type ShellSidebarProps = z.infer<typeof ShellSidebarSchema>;\nexport type ShellContentProps = z.infer<typeof ShellContentSchema>;\nexport type ShellInspectorProps = z.infer<typeof ShellInspectorSchema>;\nexport type ShellBottomProps = z.infer<typeof ShellBottomSchema>;\nexport type ShellTriggerProps = z.infer<typeof ShellTriggerSchema>;\nexport type ShellHandleProps = z.infer<typeof ShellHandleSchema>;\n\n// Common type exports\nexport type PaneMode = z.infer<typeof PaneModeSchema>;\nexport type SidebarMode = z.infer<typeof SidebarModeSchema>;\nexport type PresentationValue = z.infer<typeof PresentationValueSchema>;\nexport type Breakpoint = z.infer<typeof _BreakpointSchema>;\nexport type PaneTarget = z.infer<typeof PaneTargetSchema>;\nexport type TriggerAction = z.infer<typeof TriggerActionSchema>;\nexport type ResponsiveMode = z.infer<typeof _ResponsiveModeSchema>;\nexport type ResponsiveSidebarMode = z.infer<typeof ResponsiveSidebarModeSchema>;\nexport type ResponsivePresentation = z.infer<typeof ResponsivePresentationSchema>;\nexport type PaneSizePersistence = z.infer<typeof PaneSizePersistenceSchema>;\n\n/**\n * Development-only helper to validate and normalize Shell 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 = parseShellRootProps({ height: 'invalid' });\n * // Throws validation errors for invalid values\n * ```\n */\nexport function parseShellRootProps(props: unknown): ShellRootProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRootSchema.parse(props);\n }\n return props as ShellRootProps;\n}\n\nexport function parseShellHeaderProps(props: unknown): ShellHeaderProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHeaderSchema.parse(props);\n }\n return props as ShellHeaderProps;\n}\n\nexport function parseShellRailProps(props: unknown): ShellRailProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRailSchema.parse(props);\n }\n return props as ShellRailProps;\n}\n\nexport function parseShellPanelProps(props: unknown): ShellPanelProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellPanelSchema.parse(props);\n }\n return props as ShellPanelProps;\n}\n\nexport function parseShellSidebarProps(props: unknown): ShellSidebarProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellSidebarSchema.parse(props);\n }\n return props as ShellSidebarProps;\n}\n\nexport function parseShellContentProps(props: unknown): ShellContentProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellContentSchema.parse(props);\n }\n return props as ShellContentProps;\n}\n\nexport function parseShellInspectorProps(props: unknown): ShellInspectorProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellInspectorSchema.parse(props);\n }\n return props as ShellInspectorProps;\n}\n\nexport function parseShellBottomProps(props: unknown): ShellBottomProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellBottomSchema.parse(props);\n }\n return props as ShellBottomProps;\n}\n\nexport function parseShellTriggerProps(props: unknown): ShellTriggerProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellTriggerSchema.parse(props);\n }\n return props as ShellTriggerProps;\n}\n\nexport function parseShellHandleProps(props: unknown): ShellHandleProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHandleSchema.parse(props);\n }\n return props as ShellHandleProps;\n}\n"],
5
- "mappings": ";AAAA,OAAS,KAAAA,MAAS,MAsBlB,IAAMC,EAAiBD,EAAE,KAAK,CAAC,WAAY,WAAW,CAAC,EAAE,SAAS,iBAAiB,EAC7EE,EAAoBF,EAAE,KAAK,CAAC,YAAa,UAAU,CAAC,EAAE,SAAS,eAAe,EAC9EG,EAA0BH,EAAE,KAAK,CAAC,QAAS,UAAW,SAAS,CAAC,EAAE,SAAS,mBAAmB,EAC9FI,EAAoBJ,EAAE,KAAK,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,CAAC,EAAE,SAAS,uBAAuB,EACtGK,EAAmBL,EAAE,KAAK,CAAC,OAAQ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AAS,EAAE,SAAS,iBAAiB,EACvD,QAASA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,2EAA2E,EACrH,aAAcA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,qBAAqB,EACpE,aAAcA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,qBAAqB,EACpE,aAAcA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,8BAA8B,EAC3E,kBAAmBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,4BAA4B,EAC9E,mBAAoBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,CAClF,CAAC,EACA,OAAO,EAKG6B,EAAoB7B,EAC9B,OAAO,CACN,UAAWA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,2BAA2B,EACrE,MAAOgB,EACP,SAAUhB,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,gBAAgB,CACxD,CAAC,EACA,OAAO,EAwCH,SAAS8B,EAAoBC,EAAgC,CAIlE,OAAOA,CACT,CAEO,SAASC,EAAsBD,EAAkC,CAItE,OAAOA,CACT,CAEO,SAASE,EAAoBF,EAAgC,CAIlE,OAAOA,CACT,CAEO,SAASG,EAAqBH,EAAiC,CAIpE,OAAOA,CACT,CAEO,SAASI,EAAuBJ,EAAmC,CAIxE,OAAOA,CACT,CAEO,SAASK,EAAuBL,EAAmC,CAIxE,OAAOA,CACT,CAEO,SAASM,EAAyBN,EAAqC,CAI5E,OAAOA,CACT,CAEO,SAASO,EAAsBP,EAAkC,CAItE,OAAOA,CACT,CAEO,SAASQ,EAAuBR,EAAmC,CAIxE,OAAOA,CACT,CAEO,SAASS,EAAsBT,EAAkC,CAItE,OAAOA,CACT",
6
- "names": ["z", "PaneModeSchema", "SidebarModeSchema", "PresentationValueSchema", "_BreakpointSchema", "PaneTargetSchema", "TriggerActionSchema", "OpenChangeReasonSchema", "SizeChangeReasonSchema", "responsive", "value", "_ResponsiveModeSchema", "ResponsiveSidebarModeSchema", "ResponsivePresentationSchema", "ResponsiveOpenSchema", "PaneSizePersistenceSchema", "StyleSchema", "OpenPropsSchema", "PaneBaseShape", "ResizeShape", "ShellRootSchema", "ShellHeaderSchema", "ShellRailSchema", "ShellPanelSchema", "ShellSidebarSchema", "ShellContentSchema", "ShellInspectorSchema", "ShellBottomSchema", "ShellTriggerSchema", "ShellHandleSchema", "parseShellRootProps", "props", "parseShellHeaderProps", "parseShellRailProps", "parseShellPanelProps", "parseShellSidebarProps", "parseShellContentProps", "parseShellInspectorProps", "parseShellBottomProps", "parseShellTriggerProps", "parseShellHandleProps"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as i}from"./chunk-KVVRFWGQ.js";import{c as l}from"./chunk-5ON3XLRD.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as y}from"./chunk-VQPANPMI.js";var u={};y(u,{Actions:()=>c,Logo:()=>N,Navigation:()=>b,Root:()=>f});import*as o from"react";import n from"classnames";var g=["static","fixed","sticky"],R=["1","2","3","4"],v={position:{type:"enum",values:g,default:"fixed"},size:{type:"enum",values:R,default:"2"}};var f=o.forwardRef((r,t)=>{let a=l(r,v.size),{children:s,className:e,...p}=m(a,v),P=a.position??"fixed",d=a.size??"2";return o.createElement("header",{...p,ref:t,className:n("kui-NavbarRoot",e),"data-position":P,"data-size":d},o.createElement("div",{className:"kui-NavbarContainer"},s))});f.displayName="Navbar.Root";var N=o.forwardRef(({gap:r="2",align:t="center",justify:a="start",className:s,...e},p)=>o.createElement(i,{ref:p,gap:r,align:t,justify:a,className:n("kui-NavbarLogo",s),...e}));N.displayName="Navbar.Logo";var b=o.forwardRef(({gap:r="4",align:t="center",justify:a="center",className:s,...e},p)=>o.createElement(i,{ref:p,gap:r,align:t,justify:a,className:n("kui-NavbarNavigation",s),role:"navigation","aria-label":e["aria-labelledby"]===void 0?"Main":void 0,...e}));b.displayName="Navbar.Navigation";var c=o.forwardRef(({gap:r="4",align:t="center",justify:a="end",className:s,...e},p)=>o.createElement(i,{ref:p,gap:r,align:t,justify:a,className:n("kui-NavbarActions",s),...e}));c.displayName="Navbar.Actions";export{f as a,N as b,b as c,c as d,u as e};
3
- //# sourceMappingURL=chunk-EERKYRYI.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/navbar.tsx", "../../src/components/navbar.props.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Flex } from './flex.js';\n\nimport type { FlexProps } from './flex.js';\nimport type { MarginProps } from '../props/margin.props.js';\n\n// Navbar slots are parts, not layout primitives: the bar owns their spacing.\ntype NavbarSlotFlexProps = Omit<FlexProps, keyof MarginProps>;\n\nimport { navbarRootPropDefs } from './navbar.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\n/**\n * Navbar Component\n *\n * A horizontal navigation bar component with semantic slots for organizing\n * content. Follows the Shell and Sidebar compound component patterns.\n *\n * @example\n * <Navbar.Root>\n * <Navbar.Logo>Brand/logo content</Navbar.Logo>\n * <Navbar.Navigation>Navigation links</Navbar.Navigation>\n * <Navbar.Actions>CTAs, user menu, etc</Navbar.Actions>\n * </Navbar.Root>\n */\n\n// Root Component\ntype NavbarRootElement = React.ElementRef<'header'>;\ntype NavbarRootOwnProps = GetPropDefTypes<typeof navbarRootPropDefs>;\ninterface NavbarRootProps\n extends ComponentPropsWithout<'header', RemovedProps>,\n NavbarRootOwnProps {}\n\nconst NavbarRoot = React.forwardRef<NavbarRootElement, NavbarRootProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, navbarRootPropDefs.size);\n const { children, className, ...rootProps } = extractProps(\n props,\n navbarRootPropDefs,\n );\n\n const position = props.position ?? 'fixed';\n const size = props.size ?? '2';\n\n return (\n <header\n {...rootProps}\n ref={forwardedRef}\n className={classNames('kui-NavbarRoot', className)}\n data-position={position}\n data-size={size}\n >\n <div className=\"kui-NavbarContainer\">{children}</div>\n </header>\n );\n },\n);\nNavbarRoot.displayName = 'Navbar.Root';\n\n// Logo Slot - extends FlexProps\ntype NavbarLogoProps = NavbarSlotFlexProps & {\n asChild?: boolean;\n};\n\n// With `asChild`, Flex renders the child, so the layout props become classes on it, not attributes.\nconst NavbarLogo = React.forwardRef<HTMLDivElement, NavbarLogoProps>(\n ({ gap = '2', align = 'center', justify = 'start', className, ...props }, ref) => (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('kui-NavbarLogo', className)}\n {...props}\n />\n ),\n);\nNavbarLogo.displayName = 'Navbar.Logo';\n\n// Navigation Slot - extends FlexProps\ntype NavbarNavigationProps = NavbarSlotFlexProps & {\n asChild?: boolean;\n};\n\nconst NavbarNavigation = React.forwardRef<HTMLDivElement, NavbarNavigationProps>(\n ({ gap = '4', align = 'center', justify = 'center', className, ...props }, ref) => (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('kui-NavbarNavigation', className)}\n role=\"navigation\"\n // A landmark needs a name to be told apart from other navigation on the page.\n aria-label={props['aria-labelledby'] === undefined ? 'Main' : undefined}\n {...props}\n />\n ),\n);\nNavbarNavigation.displayName = 'Navbar.Navigation';\n\n// Actions Slot - extends FlexProps\ntype NavbarActionsProps = NavbarSlotFlexProps & {\n asChild?: boolean;\n};\n\nconst NavbarActions = React.forwardRef<HTMLDivElement, NavbarActionsProps>(\n ({ gap = '4', align = 'center', justify = 'end', className, ...props }, ref) => (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('kui-NavbarActions', className)}\n {...props}\n />\n ),\n);\nNavbarActions.displayName = 'Navbar.Actions';\n\nexport {\n NavbarRoot as Root,\n NavbarLogo as Logo,\n NavbarNavigation as Navigation,\n NavbarActions as Actions,\n};\n\nexport type {\n NavbarRootProps as RootProps,\n NavbarLogoProps as LogoProps,\n NavbarNavigationProps as NavigationProps,\n NavbarActionsProps as ActionsProps,\n};\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst positions = ['static', 'fixed', 'sticky'] as const;\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst navbarRootPropDefs = {\n position: {\n type: 'enum',\n values: positions,\n default: 'fixed',\n },\n size: {\n type: 'enum',\n values: sizes,\n default: '2',\n },\n} satisfies {\n position: PropDef<(typeof positions)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { navbarRootPropDefs };\n"],
5
- "mappings": ";gKAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,eAAAC,EAAA,SAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aCDvB,IAAMC,EAAY,CAAC,SAAU,QAAS,QAAQ,EACxCC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAqB,CACzB,SAAU,CACR,KAAM,OACN,OAAQF,EACR,QAAS,OACX,EACA,KAAM,CACJ,KAAM,OACN,OAAQC,EACR,QAAS,GACX,CACF,EDwBA,IAAME,EAAmB,aACvB,CAACC,EAAUC,IAAiB,CAC1B,IAAMC,EAAQC,EAAkBH,EAAUI,EAAmB,IAAI,EAC3D,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAU,EAAIC,EAC5CN,EACAE,CACF,EAEMK,EAAWP,EAAM,UAAY,QAC7BQ,EAAOR,EAAM,MAAQ,IAE3B,OACE,gBAAC,UACE,GAAGK,EACJ,IAAKN,EACL,UAAWU,EAAW,iBAAkBL,CAAS,EACjD,gBAAeG,EACf,YAAWC,GAEX,gBAAC,OAAI,UAAU,uBAAuBL,CAAS,CACjD,CAEJ,CACF,EACAN,EAAW,YAAc,cAQzB,IAAMa,EAAmB,aACvB,CAAC,CAAE,IAAAC,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAC,EAAU,QAAS,UAAAT,EAAW,GAAGJ,CAAM,EAAGc,IACxE,gBAACC,EAAA,CACC,IAAKD,EACL,IAAKH,EACL,MAAOC,EACP,QAASC,EACT,UAAWJ,EAAW,iBAAkBL,CAAS,EAChD,GAAGJ,EACN,CAEJ,EACAU,EAAW,YAAc,cAOzB,IAAMM,EAAyB,aAC7B,CAAC,CAAE,IAAAL,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAC,EAAU,SAAU,UAAAT,EAAW,GAAGJ,CAAM,EAAGc,IACzE,gBAACC,EAAA,CACC,IAAKD,EACL,IAAKH,EACL,MAAOC,EACP,QAASC,EACT,UAAWJ,EAAW,uBAAwBL,CAAS,EACvD,KAAK,aAEL,aAAYJ,EAAM,iBAAiB,IAAM,OAAY,OAAS,OAC7D,GAAGA,EACN,CAEJ,EACAgB,EAAiB,YAAc,oBAO/B,IAAMC,EAAsB,aAC1B,CAAC,CAAE,IAAAN,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAC,EAAU,MAAO,UAAAT,EAAW,GAAGJ,CAAM,EAAGc,IACtE,gBAACC,EAAA,CACC,IAAKD,EACL,IAAKH,EACL,MAAOC,EACP,QAASC,EACT,UAAWJ,EAAW,oBAAqBL,CAAS,EACnD,GAAGJ,EACN,CAEJ,EACAiB,EAAc,YAAc",
6
- "names": ["navbar_exports", "__export", "NavbarActions", "NavbarLogo", "NavbarNavigation", "NavbarRoot", "React", "classNames", "positions", "sizes", "navbarRootPropDefs", "NavbarRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "navbarRootPropDefs", "children", "className", "rootProps", "extractProps", "position", "size", "classNames", "NavbarLogo", "gap", "align", "justify", "ref", "Flex", "NavbarNavigation", "NavbarActions"]
7
- }
@@ -1,2 +0,0 @@
1
- function s(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,p])=>[n,t(p)]))}export{s as a};
2
- //# sourceMappingURL=chunk-HZYE46V2.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/helpers/map-prop-values.ts"],
4
- "sourcesContent": ["import type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nexport { mapResponsiveProp };\n"],
5
- "mappings": "AAGA,SAASA,EACPC,EACAC,EACgC,CAChC,GAAID,IAAc,OAClB,OAAI,OAAOA,GAAc,SAChBC,EAASD,CAAS,EAEpB,OAAO,YACZ,OAAO,QAAQA,CAAS,EAAE,IAAI,CAAC,CAACE,EAAKC,CAAK,IAAM,CAACD,EAAKD,EAASE,CAAK,CAAC,CAAC,CACxE,CACF",
6
- "names": ["mapResponsiveProp", "propValue", "mapValue", "key", "value"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as s}from"./chunk-WN3WMFAM.js";import{z as r}from"zod";var l=s.extend({pressed:r.boolean().optional().describe("Controlled pressed state"),onPressedChange:r.function().optional().describe("Callback when pressed state changes"),defaultPressed:r.boolean().optional().describe("Default pressed state for uncontrolled usage")}).refine(e=>!e.iconOnly||!!(e["aria-label"]||e["aria-labelledby"]),{message:"An iconOnly Toggle must have either 'aria-label' or 'aria-labelledby' for accessibility",path:["aria-label"]}).refine(e=>!(e.pressed!==void 0&&e.onPressedChange===void 0),{message:"When using controlled mode (pressed prop), onPressedChange must also be provided",path:["onPressedChange"]}).refine(e=>!(e.pressed!==void 0&&e.defaultPressed!==void 0),{message:"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together",path:["pressed","defaultPressed"]});function a(e){return e}export{l as a,a as b};
3
- //# sourceMappingURL=chunk-IN2WND4B.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/schemas/toggle.schema.ts"],
4
- "sourcesContent": ["import { z } from 'zod';\nimport { ButtonObjectSchema } from './button.schema.js';\n\n/**\n * Toggle Zod schema - Single source of truth for Toggle component props\n *\n * Toggle is a Button that stays pressed, built on Radix UI's Toggle primitive. Set `iconOnly`\n * for a square toggle holding only an icon; it then needs `aria-label` or `aria-labelledby`.\n *\n * @example\n * ```tsx\n * const props = ToggleSchema.parse({ defaultPressed: false, variant: 'outline' });\n *\n * const iconProps = ToggleSchema.parse({ iconOnly: true, 'aria-label': 'Bold' });\n * ```\n */\nexport const ToggleSchema = ButtonObjectSchema.extend({\n /**\n * Controlled pressed state\n * When provided, the component is controlled and the pressed state is managed externally\n */\n pressed: z.boolean().optional().describe('Controlled pressed state'),\n\n /**\n * Callback when pressed state changes\n * Called with the new pressed state when the toggle is activated\n */\n onPressedChange: z.function().optional().describe('Callback when pressed state changes'),\n\n /**\n * Default pressed state for uncontrolled usage\n * Used as the initial pressed state when the component is uncontrolled\n */\n defaultPressed: z.boolean().optional().describe('Default pressed state for uncontrolled usage'),\n})\n .refine((data) => !data.iconOnly || Boolean(data['aria-label'] || data['aria-labelledby']), {\n message: \"An iconOnly Toggle must have either 'aria-label' or 'aria-labelledby' for accessibility\",\n path: ['aria-label'],\n })\n .refine(\n (data) => {\n // If pressed is provided, onPressedChange should also be provided for controlled usage\n if (data.pressed !== undefined && data.onPressedChange === undefined) {\n return false;\n }\n return true;\n },\n {\n message: 'When using controlled mode (pressed prop), onPressedChange must also be provided',\n path: ['onPressedChange'],\n },\n )\n .refine(\n (data) => {\n // Cannot have both controlled and uncontrolled props\n if (data.pressed !== undefined && data.defaultPressed !== undefined) {\n return false;\n }\n return true;\n },\n {\n message:\n 'Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together',\n path: ['pressed', 'defaultPressed'],\n },\n );\n\n/**\n * Type derived from Toggle Zod schema\n * This ensures type safety and consistency with the schema\n */\nexport type ToggleProps = z.infer<typeof ToggleSchema>;\n\n/**\n * Development-only helper to validate and normalize Toggle 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 invalidProps = parseToggleProps({\n * pressed: true,\n * defaultPressed: false\n * // Missing onPressedChange and conflicting controlled/uncontrolled\n * });\n * // Throws: \"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together\"\n *\n * const validProps = parseToggleProps({\n * pressed: true,\n * onPressedChange: (pressed) => setPressed(pressed)\n * });\n * ```\n */\nexport function parseToggleProps(props: unknown): ToggleProps {\n if (process.env.NODE_ENV === 'development') {\n return ToggleSchema.parse(props);\n }\n return props as ToggleProps;\n}\n"],
5
- "mappings": ";wCAAA,OAAS,KAAAA,MAAS,MAgBX,IAAMC,EAAeC,EAAmB,OAAO,CAKpD,QAASC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,0BAA0B,EAMnE,gBAAiBA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,qCAAqC,EAMvF,eAAgBA,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,8CAA8C,CAChG,CAAC,EACE,OAAQC,GAAS,CAACA,EAAK,UAAY,GAAQA,EAAK,YAAY,GAAKA,EAAK,iBAAiB,GAAI,CAC1F,QAAS,0FACT,KAAM,CAAC,YAAY,CACrB,CAAC,EACA,OACEA,GAEK,EAAAA,EAAK,UAAY,QAAaA,EAAK,kBAAoB,QAK7D,CACE,QAAS,mFACT,KAAM,CAAC,iBAAiB,CAC1B,CACF,EACC,OACEA,GAEK,EAAAA,EAAK,UAAY,QAAaA,EAAK,iBAAmB,QAK5D,CACE,QACE,wFACF,KAAM,CAAC,UAAW,gBAAgB,CACpC,CACF,EA+BK,SAASC,EAAiBC,EAA6B,CAI5D,OAAOA,CACT",
6
- "names": ["z", "ToggleSchema", "ButtonObjectSchema", "z", "data", "parseToggleProps", "props"]
7
- }
@@ -1,7 +0,0 @@
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 inset set. 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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AcjB,CAAM,EACtD,UAAW,IAAMiB,EAAc,IAAI,EACnC,WAAYR,EACZ,cAAeA,EACf,WAAaT,GAAuBE,EAAM,QAAQ,IAAIH,EAASC,CAAM,CAAC,GAAG,OAAO,QAAQ,EACxF,WAAaA,GAAuBE,EAAM,QAAQ,IAAIH,EAASC,CAAM,CAAC,GAAG,SAAS,OAAQ,QAAQ,EAClG,aAAeA,GAAuBE,EAAM,QAAQ,IAAIH,EAASC,CAAM,CAAC,GAAG,SAAS,SAAU,QAAQ,CACxG,CACF,EAAG,CAACE,CAAK,CAAC,EACJP,EAASqB,GAAmBd,EAAM,QAAQ,IAAIc,CAAI,GAAG,MACrDG,EAAOjB,EAAM,QAAQ,IAAI,MAAM,EACrC,MAAO,CACL,SAAUJ,EAAWH,EAAM,MAAM,CAAC,EAClC,mBAAoBwB,GAAM,QAAU,OAAY,OAAYA,EAAK,QAAU,SAC3E,UAAWrB,EAAWH,EAAM,OAAO,CAAC,EACpC,YAAaD,EAAcC,EAAM,SAAS,CAAC,GAAK,WAChD,cAAeG,EAAWH,EAAM,WAAW,CAAC,EAC5C,WAAYG,EAAWH,EAAM,QAAQ,CAAC,EACtC,WAAYO,EAAM,KAClB,QAASA,EAAM,QAAQ,IAAI,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
- }
@@ -1,3 +0,0 @@
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 C,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 y,c as K}from"./chunk-ODHCDJ3Y.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*as f from"@radix-ui/react-accordion";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 A(t){if(typeof t=="function"){let r=t;return r.displayName||r.name}if(t&&typeof t=="object"){let r=t;return r.displayName||A(r.render)||A(r.type)}}function ce(t){return t.type==="svg"||t.props?.icon?!0:A(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=y(),k=e.useContext(K),g=c?.size??k,M=c?.presentation==="thin",N=t?L:"button",P=i=>{p?.(i),i.defaultPrevented||_(i)},m=M?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))),h=i=>{if(M){let{icons:v,labels:w}=de(i);if(v.length>0)return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},v),w)}return e.createElement(e.Fragment,null,pe(i),m)},S;return t&&e.isValidElement(u)&&e.Children.count(u)===1?S=e.cloneElement(u,void 0,h(u.props.children)):t?S=u:S=h(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},S)});T.displayName="Sidebar.MenuButton";var x=e.createContext("accordion"),ee=e.forwardRef(({defaultOpen:t=!1,children:r,...n},o)=>(y()?.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(f.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(f.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(f.Header,{asChild:!0},e.createElement("div",null,e.createElement(f.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(C,{key:r,...c,asChild:!0},s):e.createElement(C,{key:r,...c},s)}return e.isValidElement(t)?e.createElement(C,{key:r,asChild:!0},t):e.createElement(C,{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=y();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(f.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=y(),l=s?.presentation==="thin",c=e.useRef(null),k=e.useRef(null),M=`${e.useId()}-results`,N=e.useRef(t);N.current=t;let P=e.useRef(r);P.current=r;let m=n.replace(/\.+$/,""),h=e.useCallback(i=>{i.key==="Escape"&&N.current&&(i.preventDefault(),i.stopPropagation(),P.current(""),c.current?.focus())},[]),S=e.useCallback(i=>{if(i.defaultPrevented)return;let v=k.current;if(!v)return;let w=v.querySelector('[role="group"]');if(!w)return;let b=Array.from(w.querySelectorAll("a, button"));if(b.length===0)return;let G=document.activeElement,I=G===c.current,R=b.indexOf(G);if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!I&&R!==-1){c.current?.focus();return}switch(i.key){case"ArrowDown":{i.preventDefault(),I||R===-1?b[0]?.focus():R<b.length-1&&b[R+1]?.focus();break}case"ArrowUp":{i.preventDefault(),R<=0?c.current?.focus():b[R-1]?.focus();break}case"Home":{I||(i.preventDefault(),b[0]?.focus());break}case"End":{I||(i.preventDefault(),b[b.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":m},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":m},e.createElement("div",{ref:k,className:"kui-SidebarSearchPopover",role:"search",onKeyDown:S},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:h,placeholder:n,"aria-label":m,"aria-controls":o?M: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:M,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:h,placeholder:n,"aria-label":m}),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-J6B7UCZN.js.map
@@ -1,7 +0,0 @@
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 * as Accordion from '@radix-ui/react-accordion';\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,eAA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CrE,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,gBAAC4E,EAAA,CAAW,UAAU,wBAAwB,EAC9C,gBAAC,SACC,IAAKO,EACL,KAAK,SACL,UAAU,yBACV,MAAOJ,EACP,SAAWU,GAAMT,EAAcS,EAAE,OAAO,KAAK,EAC7C,UAAWhD,EACX,YAAawC,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", "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
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as c}from"./chunk-Y2DBXOLT.js";import{b as p}from"./chunk-NJ7RQYLX.js";import{a as u}from"./chunk-SGKLJDA3.js";import*as t from"react";import O from"classnames";var C={loud:"solid",medium:"raised",quiet:"ghost"};function T(e){if(e["aria-label"]||e["aria-labelledby"])return;console.error("Button: an `iconOnly` button must have an accessible name. Pass `aria-label`, or `aria-labelledby` referencing a label element.")}var w=t.forwardRef(({className:e,style:a,tooltip:r,tooltipSide:d="top",tooltipAlign:m="center",tooltipDelayDuration:B,tooltipDisableHoverableContent:b,iconOnly:s=!1,emphasis:n,variant:i,...o},y)=>{let{tooltipId:f,hasTooltip:P,accessibilityProps:R}=c(r);s&&(T(o),o.fullWidth=!1);let h=n!==void 0?C[n]:i,g=o["aria-describedby"],v=R["aria-describedby"],E=[g,v].filter(Boolean).join(" ")||void 0,l=t.createElement(u,{...o,variant:h,"aria-describedby":E,ref:y,"data-icon-only":s||void 0,className:O("kui-Button",e),style:a});return P?t.createElement(p,{content:r,side:d,align:m,delayDuration:B,disableHoverableContent:b,id:f},l):l});w.displayName="Button";export{w as a};
3
- //# sourceMappingURL=chunk-JQMWNI62.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Tooltip configuration props that can be passed to Button\n * These props are forwarded to the underlying Tooltip component\n */\nexport interface ButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core Button props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with tooltip functionality\n */\ntype ButtonEmphasis = 'loud' | 'medium' | 'quiet';\n\n/** `emphasis` is a button's rank: loud is `solid`, medium is `raised`, quiet is `ghost`. */\nconst EMPHASIS_VARIANT = { loud: 'solid', medium: 'raised', quiet: 'ghost' } as const;\n\n/**\n * A button states its rank with `emphasis` or its look with `variant`, never both.\n */\ntype ButtonRankProps =\n | {\n /** The button's look. `outline` and `surface` have no emphasis of their own. */\n variant?: BaseButtonProps['variant'];\n emphasis?: never;\n }\n | {\n /** The button's rank: `loud` (solid, the default), `medium` (raised) or `quiet` (ghost). */\n emphasis?: ButtonEmphasis;\n variant?: never;\n };\n\n/**\n * An icon-only button is square and holds only its icon, so it has no visible text: the type\n * requires `aria-label` or `aria-labelledby`. It never takes the full width.\n */\ntype ButtonIconOnlyProps =\n | {\n /** Makes the button square and shows only the icon in `children`. Requires `aria-label` or `aria-labelledby`. */\n iconOnly: true;\n /** The button's name for screen readers. Required with `iconOnly` unless `aria-labelledby` is set. */\n 'aria-label': string;\n fullWidth?: never;\n }\n | {\n /** Makes the button square and shows only the icon in `children`. Requires `aria-label` or `aria-labelledby`. */\n iconOnly: true;\n /** The id of an element that names this button. Use it instead of `aria-label`. */\n 'aria-labelledby': string;\n fullWidth?: never;\n }\n | { iconOnly?: false };\n\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as' | 'variant'> & ButtonRankProps & ButtonTooltipProps & ButtonIconOnlyProps;\n\n/**\n * Polymorphic Button props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\n/**\n * Button component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> }) => React.ReactElement | null;\n\n/**\n * An icon-only button must have an accessible name. Logs an error, never throws: a name that is\n * still loading (an empty `aria-label` while a translation loads) must not crash the tree.\n */\nfunction validateIconButtonName(props: Record<string, unknown>) {\n if (props['aria-label'] || props['aria-labelledby']) return;\n const errorMessage =\n 'Button: an `iconOnly` button must have an accessible name. Pass `aria-label`, or ' +\n '`aria-labelledby` referencing a label element.';\n console.error(errorMessage);\n}\n\n/**\n * Button component for triggering actions throughout your interface\n *\n * The Button component is the primary interactive element in the Kookie User Interface.\n * It provides six visual variants, four sizes, comprehensive color options, and built-in\n * tooltip support. The component automatically handles icon sizing, supports responsive\n * layouts, and provides accessibility compliance out of the box.\n *\n * @example\n * ```tsx\n * // Basic button\n * <Button>Click me</Button>\n *\n * // Button with variant and size\n * <Button variant=\"solid\" size=\"3\">Primary Action</Button>\n *\n * // Button with tooltip\n * <Button tooltip=\"Save your progress\">Save</Button>\n *\n * // Polymorphic button as link\n * <Button as=\"a\" href=\"/dashboard\">Go to Dashboard</Button>\n *\n * // Square, icon-only button: needs an accessible name\n * <Button iconOnly aria-label=\"Settings\"><Settings /></Button>\n * ```\n */\nconst Button = React.forwardRef(\n (\n {\n className,\n style,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n iconOnly = false,\n emphasis,\n variant,\n ...props\n }: ButtonProps,\n forwardedRef: React.ForwardedRef<ButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // An icon-only button is square, so it never takes the full width.\n if (iconOnly) {\n validateIconButtonName(props as Record<string, unknown>);\n (props as { fullWidth?: boolean }).fullWidth = false;\n }\n\n // Both set the same thing. The types forbid it; an untyped spread that sets both logs and\n // `emphasis` wins, rather than crashing the tree.\n if (emphasis !== undefined && variant !== undefined && process.env.NODE_ENV !== 'production') {\n console.error('Button: pass `emphasis` or `variant`, not both. They set the same thing; `emphasis` wins.');\n }\n const resolvedVariant = emphasis !== undefined ? EMPHASIS_VARIANT[emphasis] : variant;\n\n // The tooltip's description joins the caller's aria-describedby rather than replacing it.\n const callerDescribedBy = (props as { 'aria-describedby'?: string })['aria-describedby'];\n const tooltipDescribedBy = (tooltipAccessibilityProps as { 'aria-describedby'?: string })['aria-describedby'];\n const ariaDescribedBy = [callerDescribedBy, tooltipDescribedBy].filter(Boolean).join(' ') || undefined;\n\n const button = (\n <BaseButton\n {...props}\n variant={resolvedVariant}\n aria-describedby={ariaDescribedBy}\n ref={forwardedRef}\n data-icon-only={iconOnly || undefined}\n className={classNames('kui-Button', className)}\n style={style}\n />\n );\n\n // If no tooltip is provided, return the button as-is for better performance\n if (!hasTooltip) {\n return button;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {button}\n </Tooltip>\n );\n },\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps, ButtonEmphasis, ButtonRankProps, ButtonIconOnlyProps };\n"],
5
- "mappings": ";wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAiCvB,IAAMC,EAAmB,CAAE,KAAM,QAAS,OAAQ,SAAU,MAAO,OAAQ,EA2D3E,SAASC,EAAuBC,EAAgC,CAC9D,GAAIA,EAAM,YAAY,GAAKA,EAAM,iBAAiB,EAAG,OAIrD,QAAQ,MAFN,iIAEwB,CAC5B,CA4BA,IAAMC,EAAe,aACnB,CACE,CACE,UAAAC,EACA,MAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,MACd,aAAAC,EAAe,SACf,qBAAAC,EACA,+BAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EACA,QAAAC,EACA,GAAGX,CACL,EACAY,IACG,CAEH,GAAM,CAAE,UAAAC,EAAW,WAAAC,EAAY,mBAAoBC,CAA0B,EAAIC,EAAkBZ,CAAO,EAGtGK,IACFV,EAAuBC,CAAgC,EACtDA,EAAkC,UAAY,IAQjD,IAAMiB,EAAkBP,IAAa,OAAYZ,EAAiBY,CAAQ,EAAIC,EAGxEO,EAAqBlB,EAA0C,kBAAkB,EACjFmB,EAAsBJ,EAA8D,kBAAkB,EACtGK,EAAkB,CAACF,EAAmBC,CAAkB,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAEvFE,EACJ,gBAACC,EAAA,CACE,GAAGtB,EACJ,QAASiB,EACT,mBAAkBG,EAClB,IAAKR,EACL,iBAAgBH,GAAY,OAC5B,UAAWc,EAAW,aAAcrB,CAAS,EAC7C,MAAOC,EACT,EAIF,OAAKW,EAOH,gBAACU,EAAA,CAAQ,QAASpB,EAAS,KAAMC,EAAa,MAAOC,EAAc,cAAeC,EAAsB,wBAAyBC,EAAgC,GAAIK,GAClKQ,CACH,EAROA,CAUX,CACF,EAEApB,EAAO,YAAc",
6
- "names": ["React", "classNames", "EMPHASIS_VARIANT", "validateIconButtonName", "props", "Button", "className", "style", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "iconOnly", "emphasis", "variant", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "resolvedVariant", "callerDescribedBy", "tooltipDescribedBy", "ariaDescribedBy", "button", "BaseButton", "classNames", "Tooltip"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/pane-chrome.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\nimport { usePageScrollMedia } from './shell-page-scroll.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * True inside a window Shell: one with no `contained` and no `height`, which lets the page scroll\n * on a narrow touch screen. Each `Shell.Root` sets its own, so a Shell nested in another answers\n * for itself.\n */\nconst ShellWindowContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n /**\n * Keeps the pane's list (its menu rows) when React puts this under `Shell.Content`, as when an\n * app renders a pane's content in its page and portals it into `Shell.Panel`. In a Rail, Panel\n * or Sidebar it is already the pane's list.\n */\n pane?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, pane = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null && !pane;\n // While the page scrolls, the content's viewport scrolls nothing: as a tab stop it would take a\n // Tab, ring the whole page and move nothing. Resolved after mount; a `tabIndex` of the caller's wins.\n const windowShell = React.useContext(ShellWindowContext);\n const pageScrolls = usePageScrollMedia();\n if (inContent) {\n const tabIndex = props.tabIndex ?? (windowShell && pageScrolls ? -1 : undefined);\n return (\n <ScrollArea {...props} tabIndex={tabIndex} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, ShellWindowContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
5
- "mappings": ";gKAWA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAiBvB,IAAMC,EAA6B,gBAAgD,IAAI,EAEvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAGA,IAAME,EAAyB,gBAAwB,GAAG,EAOpDC,EAA4B,gBAAc,EAAK,EAO/CC,EAA2B,gBAAc,EAAK,EAMpD,SAASC,EAAgB,CAAE,SAAAC,EAAU,aAAAC,CAAa,EAAyD,CACzG,IAAMC,EAAa,aAAWN,CAAgB,EACxCO,EAAc,UAAmC,KAAO,CAAE,KAAAD,EAAM,YAAa,OAAQ,aAAAD,CAAa,GAAI,CAACC,EAAMD,CAAY,CAAC,EAChI,OAAO,gBAACP,EAAqB,SAArB,CAA8B,MAAOS,GAAQH,CAAS,CAChE,CAEA,SAASI,GAAmB,CAC1B,IAAMC,EAASV,EAAiB,EAE1BW,EAAkB,aAAWV,CAAgB,EAC7CM,EAAOG,GAAQ,MAAQC,EACvBC,EAAcF,GAAQ,aAAe,OAC3C,MAAO,CAAC,sBAAuB,cAAcH,CAAI,GAAI,oBAAoBK,CAAW,EAAE,CACxF,CAMA,IAAMC,EAAY,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAE3D,SAASC,GAAwB,CAC/B,IAAMJ,EAASV,EAAiB,EAC1BW,EAAkB,aAAWV,CAAgB,EACnD,OAAOY,EAAUH,GAAQ,MAAQC,CAAS,CAC5C,CAUA,SAASI,GAAmC,CAC1C,IAAMC,EAAa,aAAWC,CAAmB,EAC3CC,EAAgB,aAAWC,CAAiB,IAAM,KAClDC,EAAON,EAAY,EACzB,OAAIE,IAAS,OAAkBA,EACxBE,EAAUE,EAAO,IAC1B,CAaA,IAAMC,EAAmB,aAA4C,CAAC,CAAE,UAAAC,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,UAAU,mBAC/F,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,yBAA0BL,CAAS,GACnFjB,CACH,CACF,CAEJ,CACA,OACE,gBAACmC,EAAA,CAAY,GAAGhB,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,sBAAuB,qBAAsB,GAAGD,EAAQJ,CAAS,GAElH,gBAACL,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAAC,OAAI,UAAU,wBAAwBZ,CAAS,CAClD,CACF,CACF,CAEJ,CAAC,EACDwB,EAAO,YAAc",
6
- "names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "pane", "contentPane", "inContent", "windowShell", "pageScrolls", "usePageScrollMedia", "tabIndex", "ScrollArea"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import*as t from"react";import{useLayoutEffect as h}from"radix-ui/internal";function I(e,o="horizontal"){if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;let i=String(e).trim();if(!i)return;if(i.endsWith("px"))return Number.parseFloat(i);if(i.endsWith("rem")){let u=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(i)*u}if(i.endsWith("%")){let u=Number.parseFloat(i),a=o==="horizontal"?document.documentElement.clientWidth||window.innerWidth||0:document.documentElement.clientHeight||window.innerHeight||0;return u/100*a}let l=Number.parseFloat(i);return Number.isFinite(l)?l:void 0}var S=(e,o,i)=>Math.max(o??e,Math.min(i??e,e));function D(e,o,i,l){let[u]=t.useState(()=>{let a=e??o;return typeof a=="number"&&Number.isFinite(a)?`${S(a,i,l)}px`:void 0});return u}function H(e){let{name:o,elementRef:i,cssVarName:l,orientation:u,minSize:a,maxSize:m,resizable:x,size:g,defaultSize:C,paneId:y,persistence:q}=e,s=t.useRef(e);h(()=>{s.current=e});let b=t.useRef(null),P=t.useRef(0);t.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]);let p=t.useCallback((n,r)=>{let{onSizeChange:c,sizeUpdate:d,sizeUpdateMs:R}=s.current;if(c){if(d==="debounce"){b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,s.current.onSizeChange?.(n,r)},R);return}if(d==="throttle"){let V=Date.now();if(V-P.current<R)return;P.current=V}c(n,r)}},[]),w=t.useCallback(n=>I(n,u==="vertical"?"horizontal":"vertical"),[u]),N=t.useRef(!1),f=t.useCallback((n,r)=>{let c=i.current;if(c){c.style.setProperty(l,`${n}px`);for(let d of c.querySelectorAll(":scope > .kui-ShellResizer"))d.setAttribute("aria-valuenow",String(Math.round(n)));r&&(N.current=!0)}},[i,l]);h(()=>{N.current||f(e.expandedSize,!1)},[e.expandedSize,f]),h(()=>{if(g!==void 0||C===void 0)return;let n=w(C);if(typeof n!="number"||!Number.isFinite(n))return;let r=S(n,a,m);f(r,!0),p(r,{reason:"init"})},[]),h(()=>{if(g===void 0||s.current.overlayingNow())return;let n=w(g);if(typeof n!="number"||!Number.isFinite(n))return;let r=S(n,a,m);f(r,!0),p(r,{reason:"controlled"})},[g,a,m,e.overlaying,w,f,p]);let T=q!==void 0,z=t.useMemo(()=>{if(T)return{load:()=>s.current.persistence?.load?.(),save:r=>s.current.persistence?.save?.(r)};if(!y)return;let n=`kookie-ui:shell:${o}:${y}`;return{load:()=>{if(!(typeof window>"u"))try{let r=window.localStorage.getItem(n);return r?Number(r):void 0}catch{return}},save:r=>{if(!(typeof window>"u"))try{window.localStorage.setItem(n,String(r))}catch{}}}},[o,y,T]);h(()=>{if(!x||!z?.load||s.current.overlayingNow())return;let n=!0,r=d=>{if(!n||typeof d!="number"||!Number.isFinite(d))return;let R=S(d,a,m);f(R,!0),s.current.onResize?.(R)},c=z.load();return c instanceof Promise?c.then(r).catch(d=>{}):r(c),()=>{n=!1}},[x,z,e.overlaying,f,a,m,o]);let E=t.useCallback(n=>s.current.onResize?.(n),[]),v=t.useCallback(n=>{N.current=!0,s.current.onResizeStart?.(n)},[]),k=t.useCallback(n=>{s.current.onResizeEnd?.(n),p(n,{reason:"resize"}),z?.save?.(n)},[p,z]),F=t.useCallback(()=>s.current.requestCollapse(),[]),M=t.useCallback(()=>s.current.requestToggle(),[]);return t.useMemo(()=>({containerRef:i,controls:e.elementId,cssVarName:l,minSize:a,maxSize:m,defaultSize:e.expandedSize,orientation:u,edge:e.edge,growth:e.growth,onResize:E,onResizeStart:v,onResizeEnd:k,target:o,collapsible:e.collapsible,snapPoints:e.snapPoints,snapTolerance:e.snapTolerance??8,collapseThreshold:e.collapseThreshold,requestCollapse:F,requestToggle:M}),[i,e.elementId,l,a,m,e.expandedSize,u,e.edge,e.growth,E,v,k,o,e.collapsible,e.snapPoints,e.snapTolerance,e.collapseThreshold,F,M])}function U(e,o){let i=t.Children.toArray(e),l=i.filter(a=>t.isValidElement(a)&&a.type===o),u=i.filter(a=>!(t.isValidElement(a)&&a.type===o));return{handles:l,content:u}}export{D as a,H as b,U as c};
3
- //# sourceMappingURL=chunk-QKCNGEX4.js.map
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a}from"./chunk-WTP2KIK3.js";import*as e from"react";function p({pressed:r,onPressedChange:n,getAccessibleName:o,componentName:d}){let t=a(),i=e.useRef(!1),c=e.useCallback(s=>{let u=o();t(`${u} ${s?"pressed":"unpressed"}`),n?.(s)},[t,n,o]);return e.useEffect(()=>{},[r,n,d]),{handlePressedChange:c}}export{p as a};
3
- //# sourceMappingURL=chunk-RIHTVZVJ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/hooks/use-toggle-state.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { useLiveAnnouncer } from './use-live-announcer.js';\n\n/**\n * Options for the useToggleState hook\n */\ninterface UseToggleStateOptions {\n /** Controlled pressed state */\n pressed?: boolean;\n /** Callback when pressed state changes */\n onPressedChange?: (pressed: boolean) => void;\n /** Function to get the accessible name for announcements */\n getAccessibleName: () => string;\n /** Component name for warning messages */\n componentName: string;\n}\n\n/**\n * Hook for shared toggle button state management.\n * Provides accessibility announcements and controlled/uncontrolled warnings.\n *\n * @param options - Configuration options for the toggle state\n * @returns Object containing the handlePressedChange callback\n *\n * @example\n * ```tsx\n * const getAccessibleName = React.useCallback(() => 'Toggle button', []);\n *\n * const { handlePressedChange } = useToggleState({\n * pressed,\n * onPressedChange,\n * getAccessibleName,\n * componentName: 'Toggle',\n * });\n * ```\n */\nexport function useToggleState({ pressed, onPressedChange, getAccessibleName, componentName }: UseToggleStateOptions) {\n const announce = useLiveAnnouncer();\n\n // Track if we've already warned about controlled without handler\n const warnedRef = React.useRef(false);\n\n /**\n * Memoized handler for state changes with accessibility announcements.\n * Announces the new state immediately for screen readers.\n */\n const handlePressedChange = React.useCallback(\n (newPressed: boolean) => {\n const accessibleName = getAccessibleName();\n // Announce the state change for screen readers\n announce(`${accessibleName} ${newPressed ? 'pressed' : 'unpressed'}`);\n // Call the user's change handler\n onPressedChange?.(newPressed);\n },\n [announce, onPressedChange, getAccessibleName],\n );\n\n // Development-only warning for controlled/uncontrolled pattern\n // Only warns once to avoid console spam\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'development' && pressed !== undefined && onPressedChange === undefined && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(\n `${componentName}: You provided a \\`pressed\\` prop without an \\`onPressedChange\\` handler. ` +\n 'This will result in a read-only toggle button. If you want the button to be interactive, ' +\n 'you should provide an `onPressedChange` handler.',\n );\n }\n }, [pressed, onPressedChange, componentName]);\n\n return { handlePressedChange };\n}\n"],
5
- "mappings": ";mCAAA,UAAYA,MAAW,QAoChB,SAASC,EAAe,CAAE,QAAAC,EAAS,gBAAAC,EAAiB,kBAAAC,EAAmB,cAAAC,CAAc,EAA0B,CACpH,IAAMC,EAAWC,EAAiB,EAG5BC,EAAkB,SAAO,EAAK,EAM9BC,EAA4B,cAC/BC,GAAwB,CACvB,IAAMC,EAAiBP,EAAkB,EAEzCE,EAAS,GAAGK,CAAc,IAAID,EAAa,UAAY,WAAW,EAAE,EAEpEP,IAAkBO,CAAU,CAC9B,EACA,CAACJ,EAAUH,EAAiBC,CAAiB,CAC/C,EAIA,OAAM,YAAU,IAAM,CAStB,EAAG,CAACF,EAASC,EAAiBE,CAAa,CAAC,EAErC,CAAE,oBAAAI,CAAoB,CAC/B",
6
- "names": ["React", "useToggleState", "pressed", "onPressedChange", "getAccessibleName", "componentName", "announce", "useLiveAnnouncer", "warnedRef", "handlePressedChange", "newPressed", "accessibleName"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as z}from"./chunk-HGF4CKRY.js";import{b as O}from"./chunk-FVRVBB6O.js";import{a as N}from"./chunk-BUXK5VGR.js";import{b as E,c as w}from"./chunk-GKDGNPBD.js";import{b as x}from"./chunk-5ON3XLRD.js";import{c as g}from"./chunk-HBWBPBSA.js";import{a as L}from"./chunk-KOAWATCI.js";import{b as D}from"./chunk-XU74PNM2.js";import{c as C}from"./chunk-OKQAVYW4.js";import{a as _}from"./chunk-VQPANPMI.js";var te={};_(te,{Content:()=>H,Group:()=>K,Item:()=>W,Label:()=>j,Root:()=>B,Separator:()=>F,Trigger:()=>V});import*as e from"react";import u from"classnames";import{Select as r,ScrollArea as y}from"radix-ui";import{useComposedRefs as X,useLayoutEffect as Z}from"radix-ui/internal";var J=["1","2","3","4"],v={size:{type:"enum",className:"kui-r-size",values:J,default:"2",responsive:!0}},Q=["raised","surface","soft","outline","ghost"],G={variant:{type:"enum",className:"kui-variant",values:Q,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...g,...D,placeholder:{type:"ReactNode"}},M={...g};var A={size:v.size},$=[" ","Enter","ArrowUp","ArrowDown"],h=e.createContext({}),B=o=>{let{children:t,size:a,open:S,defaultOpen:f,onOpenChange:c,...p}=o,n=x(a,v.size),[l,i]=e.useState(f??!1),m=S??l,P=e.useCallback(d=>{i(d),c?.(d)},[c]);return e.createElement(r.Root,{...p,open:m,onOpenChange:P},e.createElement(h.Provider,{value:e.useMemo(()=>({size:n,open:m}),[n,m])},t))};B.displayName="Select.Root";var V=e.forwardRef((o,t)=>{let a=e.useContext(h),{children:S,className:f,color:c,radius:p,placeholder:n,error:l,loading:i,disabled:m,readOnly:P,...d}=C({size:a?.size,...o},A,G),{"aria-invalid":R,"aria-busy":b,"aria-disabled":T,"aria-readonly":k}=d,I=!!l||R===!0||R==="true",U=e.useMemo(()=>({"aria-invalid":I?!0:R,"aria-busy":i||b,"aria-disabled":m||T,"aria-readonly":P||k}),[I,R,i,b,m,T,P,k]),Y=!!(P||i)?{onPointerDown:s=>s.preventDefault(),onClick:s=>{s.preventDefault(),s.currentTarget.focus()},onKeyDown:s=>{let q=s.ctrlKey||s.altKey||s.metaKey;($.includes(s.key)||!q&&s.key.length===1)&&s.preventDefault()}}:void 0;return e.createElement(r.Trigger,{asChild:!0,disabled:m,...Y},e.createElement("button",{"data-accent-color":c,"data-radius":p,"data-error":l,"data-loading":i,...d,...U,ref:t,className:u("kui-reset","kui-SelectTrigger",f)},e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement(r.Value,{placeholder:n},S)),e.createElement(r.Icon,{asChild:!0},i?e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(N,null)):e.createElement(w,{className:"kui-SelectIcon"}))))});V.displayName="Select.Trigger";var H=e.forwardRef((o,t)=>{let a=e.useContext(h),{className:S,children:f,color:c,container:p,...n}=C({size:a?.size,...o},A,M),l=O();if(a.open===!1&&!n.forceMount)return e.createElement(r.Portal,{container:p},e.createElement(r.Content,{...n,asChild:!1,ref:t},f));let i=c||l.accentColor;return e.createElement(r.Portal,{container:p},e.createElement(z,{asChild:!0},e.createElement(r.Content,{"data-accent-color":i,sideOffset:4,...n,asChild:!1,ref:t,className:u("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-SelectContent",S)},e.createElement(ee,null,f))))});H.displayName="Select.Content";function ee({children:o}){let t=L();return e.createElement(y.Root,{type:"auto",className:"kui-ScrollAreaRoot"},e.createElement(r.Viewport,{asChild:!0,className:u("kui-BaseMenuViewport","kui-SelectViewport")},e.createElement(y.Viewport,{ref:t,className:"kui-ScrollAreaViewport",style:{overflowY:void 0}},o)),e.createElement(y.Scrollbar,{className:"kui-ScrollAreaScrollbar",orientation:"vertical"},e.createElement(y.Thumb,{className:"kui-ScrollAreaThumb"})))}var W=e.forwardRef((o,t)=>{let{className:a,children:S,...f}=o,c=typeof S!="string",p=e.useRef(null),n=X(t,p);return Z(()=>{let l=p.current,i=l?.querySelector(":scope > :not(.kui-SelectItemIndicator)");if(!l||!i||!c)return;let m=parseFloat(getComputedStyle(l).lineHeight);l.toggleAttribute("data-multiline",i.getBoundingClientRect().height>m*1.5)}),e.createElement(r.Item,{...f,asChild:!1,ref:n,className:u("kui-reset","kui-BaseMenuItem","kui-SelectItem",{"kui-SelectItemRich":c},a)},e.createElement(r.ItemIndicator,{className:"kui-SelectItemIndicator"},e.createElement(E,{className:"kui-SelectItemIndicatorIcon"})),e.createElement(r.ItemText,null,S))});W.displayName="Select.Item";var K=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Group,{...t,asChild:!1,ref:a,className:u("kui-SelectGroup",o)}));K.displayName="Select.Group";var j=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Label,{...t,asChild:!1,ref:a,className:u("kui-BaseMenuLabel","kui-SelectLabel",o)}));j.displayName="Select.Label";var F=e.forwardRef(({className:o,...t},a)=>e.createElement(r.Separator,{...t,asChild:!1,ref:a,className:u("kui-BaseMenuSeparator","kui-SelectSeparator",o)}));F.displayName="Select.Separator";export{B as a,V as b,H as c,W as d,K as e,j as f,F as g,te as h};
3
- //# sourceMappingURL=chunk-TMINGBSQ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/select.tsx", "../../src/components/select.props.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.js';\nimport {\n selectRootPropDefs,\n selectTriggerPropDefs,\n selectContentPropDefs,\n} from './select.props.js';\nimport { useThemeContext } from './theme.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { useThumbSync } from '../hooks/use-thumb-sync.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype SelectRootOwnProps = GetPropDefTypes<typeof selectRootPropDefs>;\n\n// Trigger and Content pass the size prop def as its own record. It is hoisted because\n// extractProps caches its compiled prop defs on the identity of each record it is given:\n// a literal written at the call site would be a new object, and a recompile, every render.\nconst selectSizePropDefs = { size: selectRootPropDefs.size };\n\n// Keys that open the list from the trigger, as in Radix.\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\n\ninterface SelectContextValue extends SelectRootOwnProps {\n /** Whether the list is open. Undefined when Content is rendered outside a Kookie Select.Root. */\n open?: boolean;\n}\nconst SelectContext = React.createContext<SelectContextValue>({});\n\ninterface SelectRootProps extends SelectPrimitive.SelectProps, SelectRootOwnProps {}\nconst SelectRoot: React.FC<SelectRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n open: openProp,\n defaultOpen,\n onOpenChange,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, selectRootPropDefs.size);\n\n // Root owns the open state and hands Radix a controlled `open`, so Content learns of a\n // change in the same render Radix does. Radix's uncontrolled state reports changes from an\n // effect, a render late, which would mount the open list once without its wrappers.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);\n const open = openProp ?? uncontrolledOpen;\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n return (\n <SelectPrimitive.Root {...rootProps} open={open} onOpenChange={handleOpenChange}>\n <SelectContext.Provider value={React.useMemo(() => ({ size, open }), [size, open])}>\n {children}\n </SelectContext.Provider>\n </SelectPrimitive.Root>\n );\n};\nSelectRoot.displayName = 'Select.Root';\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerOwnProps = GetPropDefTypes<typeof selectTriggerPropDefs>;\ninterface SelectTriggerProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Trigger, RemovedProps>,\n SelectTriggerOwnProps {}\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const {\n children,\n className,\n color,\n radius,\n placeholder,\n error,\n loading,\n disabled,\n readOnly,\n ...triggerProps\n } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectTriggerPropDefs,\n );\n\n // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid)\n // stays, so both paths reach the accessibility tree and the CSS, as on TextField.\n const {\n 'aria-invalid': ariaInvalid,\n 'aria-busy': ariaBusy,\n 'aria-disabled': ariaDisabled,\n 'aria-readonly': ariaReadOnly,\n } = triggerProps;\n const isInvalid = Boolean(error) || ariaInvalid === true || ariaInvalid === 'true';\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-busy': loading || ariaBusy,\n 'aria-disabled': disabled || ariaDisabled,\n 'aria-readonly': readOnly || ariaReadOnly,\n }),\n [isInvalid, ariaInvalid, loading, ariaBusy, disabled, ariaDisabled, readOnly, ariaReadOnly],\n );\n\n // Read-only and loading triggers stay focusable but do not open or take typeahead,\n // as on Combobox. Radix skips its own handler when the event is default-prevented.\n const isBlocked = Boolean(readOnly || loading);\n const blockedHandlers = isBlocked\n ? {\n onPointerDown: (event: React.PointerEvent<HTMLButtonElement>) => event.preventDefault(),\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.currentTarget.focus();\n },\n onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (OPEN_KEYS.includes(event.key) || (!isModifierKey && event.key.length === 1)) {\n event.preventDefault();\n }\n },\n }\n : undefined;\n\n return (\n // `disabled` goes to Radix, which merges it with Root's and sets the native attribute.\n <SelectPrimitive.Trigger asChild disabled={disabled} {...blockedHandlers}>\n <button\n data-accent-color={color}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n {...triggerProps}\n {...ariaProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', className)}\n >\n <span className=\"kui-SelectTriggerInner\">\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n </span>\n <SelectPrimitive.Icon asChild>\n {loading ? (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n ) : (\n <ChevronDownIcon className=\"kui-SelectIcon\" />\n )}\n </SelectPrimitive.Icon>\n </button>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = 'Select.Trigger';\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentOwnProps = GetPropDefTypes<typeof selectContentPropDefs>;\ninterface SelectContentProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Content, RemovedProps>,\n SelectContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>['container'];\n}\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const { className, children, color, container, ...contentProps } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectContentPropDefs,\n );\n const themeContext = useThemeContext();\n\n // While closed, Radix still renders Content's children, into a detached fragment: the\n // items must exist for the trigger's value label, typeahead and the native form select.\n // Nothing in that fragment is ever shown, so the theme wrapper and the scroll area, with\n // its two resize observers, are left out until the list opens.\n if (context.open === false && !contentProps.forceMount) {\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content {...contentProps} asChild={false} ref={forwardedRef}>\n {children}\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n }\n\n const resolvedColor = color || themeContext.accentColor;\n return (\n <SelectPrimitive.Portal container={container}>\n <PortalTheme asChild>\n <SelectPrimitive.Content\n data-accent-color={resolvedColor}\n sideOffset={4}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-SelectContent',\n className,\n )}\n >\n <SelectScrollArea>{children}</SelectScrollArea>\n </SelectPrimitive.Content>\n </PortalTheme>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = 'Select.Content';\n\n/** The open list's scroll area. Its own component so the thumb sync hook runs only while open. */\nfunction SelectScrollArea({ children }: { children: React.ReactNode }) {\n const setThumbViewport = useThumbSync<HTMLDivElement>();\n return (\n <ScrollAreaPrimitive.Root type=\"auto\" className=\"kui-ScrollAreaRoot\">\n <SelectPrimitive.Viewport\n asChild\n className={classNames('kui-BaseMenuViewport', 'kui-SelectViewport')}\n >\n <ScrollAreaPrimitive.Viewport\n ref={setThumbViewport}\n className=\"kui-ScrollAreaViewport\"\n style={{ overflowY: undefined }}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar className=\"kui-ScrollAreaScrollbar\" orientation=\"vertical\">\n <ScrollAreaPrimitive.Thumb className=\"kui-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n );\n}\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ninterface SelectItemProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Item, RemovedProps> {}\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>((props, forwardedRef) => {\n const { className, children, ...itemProps } = props;\n\n // Detect if this is rich content (not just a string)\n const isRichContent = typeof children !== 'string';\n\n // Rich content is not the same as several lines: an icon and a label is one line, and its mark\n // stays centred. Only content taller than one and a half lines pins the mark to the first line.\n // Written to the DOM, not state, so measuring never re-renders the list.\n const itemRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, itemRef);\n useLayoutEffect(() => {\n const item = itemRef.current;\n const text = item?.querySelector(':scope > :not(.kui-SelectItemIndicator)');\n if (!item || !text || !isRichContent) return;\n const lineHeight = parseFloat(getComputedStyle(item).lineHeight);\n item.toggleAttribute('data-multiline', text.getBoundingClientRect().height > lineHeight * 1.5);\n });\n\n return (\n <SelectPrimitive.Item\n {...itemProps}\n asChild={false}\n ref={composedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-SelectItem',\n { 'kui-SelectItemRich': isRichContent },\n className,\n )}\n >\n <SelectPrimitive.ItemIndicator className=\"kui-SelectItemIndicator\">\n <ThickCheckIcon className=\"kui-SelectItemIndicatorIcon\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n});\nSelectItem.displayName = 'Select.Item';\n\ntype SelectGroupElement = React.ElementRef<typeof SelectPrimitive.Group>;\ninterface SelectGroupProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Group, RemovedProps> {}\nconst SelectGroup = React.forwardRef<SelectGroupElement, SelectGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-SelectGroup', className)}\n />\n ),\n);\nSelectGroup.displayName = 'Select.Group';\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ninterface SelectLabelProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Label, RemovedProps> {}\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-SelectLabel', className)}\n />\n ),\n);\nSelectLabel.displayName = 'Select.Label';\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ninterface SelectSeparatorProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Separator, RemovedProps> {}\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-SelectSeparator', className)}\n />\n ),\n);\nSelectSeparator.displayName = 'Select.Separator';\n\nexport {\n SelectRoot as Root,\n SelectTrigger as Trigger,\n SelectContent as Content,\n SelectItem as Item,\n SelectGroup as Group,\n SelectLabel as Label,\n SelectSeparator as Separator,\n};\n\nexport type {\n SelectRootProps as RootProps,\n SelectTriggerProps as TriggerProps,\n SelectContentProps as ContentProps,\n SelectItemProps as ItemProps,\n SelectGroupProps as GroupProps,\n SelectLabelProps as LabelProps,\n SelectSeparatorProps as SeparatorProps,\n};\n", "import type React from 'react';\n\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst selectRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\nconst selectTriggerPropDefs = {\n variant: { type: 'enum', className: 'kui-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n placeholder: { type: 'ReactNode' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n placeholder: PropDef<React.ReactNode>;\n};\n\n\nconst selectContentPropDefs = {\n ...colorPropDef,\n} satisfies {\n};\n\nexport { selectRootPropDefs, selectTriggerPropDefs, selectContentPropDefs };\n"],
5
- "mappings": ";uZAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,EAAA,UAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,SAAAC,EAAA,cAAAC,EAAA,YAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,EAAiB,cAAcC,MAA2B,WAC7E,OAAS,mBAAAC,EAAiB,mBAAAC,MAAuB,oBCEjD,IAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAqB,CACzB,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC/F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAElEC,EAAwB,CAC5B,QAAS,CAA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eAK1B,IAAMC,EAAwB,aAC5B,CAAC,CAAE,UAAAhD,EAAW,GAAGlB,CAAM,EAAGgB,IACxB,gBAACF,EAAgB,UAAhB,CACE,GAAGd,EACJ,QAAS,GACT,IAAKgB,EACL,UAAWsB,EAAW,wBAAyB,sBAAuBpB,CAAS,EACjF,CAEJ,EACAgD,EAAgB,YAAc",
6
- "names": ["select_exports", "__export", "SelectContent", "SelectGroup", "SelectItem", "SelectLabel", "SelectRoot", "SelectSeparator", "SelectTrigger", "React", "classNames", "SelectPrimitive", "ScrollAreaPrimitive", "useComposedRefs", "useLayoutEffect", "sizes", "selectRootPropDefs", "triggerVariants", "selectTriggerPropDefs", "colorPropDef", "radiusPropDef", "selectContentPropDefs", "selectSizePropDefs", "selectRootPropDefs", "OPEN_KEYS", "SelectContext", "SelectRoot", "props", "children", "sizeProp", "openProp", "defaultOpen", "onOpenChange", "rootProps", "size", "useThemeSize", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChange", "next", "SelectPrimitive", "SelectTrigger", "forwardedRef", "context", "className", "color", "radius", "placeholder", "error", "loading", "disabled", "readOnly", "triggerProps", "extractProps", "selectTriggerPropDefs", "ariaInvalid", "ariaBusy", "ariaDisabled", "ariaReadOnly", "isInvalid", "ariaProps", "blockedHandlers", "event", "isModifierKey", "classNames", "Spinner", "ChevronDownIcon", "SelectContent", "container", "contentProps", "selectContentPropDefs", "themeContext", "useThemeContext", "resolvedColor", "PortalTheme", "SelectScrollArea", "setThumbViewport", "useThumbSync", "ScrollAreaPrimitive", "SelectItem", "itemProps", "isRichContent", "itemRef", "composedRef", "useComposedRefs", "useLayoutEffect", "item", "text", "lineHeight", "ThickCheckIcon", "SelectGroup", "SelectLabel", "SelectSeparator"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/shell-resize.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport type { PaneName } from '../shell.types.js';\n\nexport interface PaneResizeContextValue {\n containerRef: React.RefObject<HTMLElement | null>;\n /** The pane the handle resizes, for `aria-controls`. */\n controls: string;\n cssVarName: string;\n minSize: number;\n maxSize: number;\n defaultSize: number;\n orientation: 'vertical' | 'horizontal';\n edge: 'start' | 'end';\n /**\n * +1 when moving the pointer toward the end of its axis grows the pane, -1\n * when it shrinks it. Read once when a drag starts, with the pane's\n * resolved direction, so no move pays for a style read.\n */\n growth: (isRtl: boolean) => 1 | -1;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n target: PaneName;\n collapsible: boolean;\n snapPoints?: number[];\n snapTolerance: number;\n collapseThreshold?: number;\n requestCollapse?: () => void;\n requestToggle?: () => void;\n}\n\nexport const PaneResizeContext = React.createContext<PaneResizeContextValue | null>(null);\n\nexport function usePaneResize() {\n const ctx = React.useContext(PaneResizeContext);\n if (!ctx) throw new Error('Shell.Handle must be used within a resizable pane');\n return ctx;\n}\n"],
5
- "mappings": ";AAAA,UAAYA,MAAW,QA+BhB,IAAMC,EAA0B,gBAA6C,IAAI,EAEjF,SAASC,GAAgB,CAC9B,IAAMC,EAAY,aAAWF,CAAiB,EAC9C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,mDAAmD,EAC7E,OAAOA,CACT",
6
- "names": ["React", "PaneResizeContext", "usePaneResize", "ctx"]
7
- }
@@ -1,11 +0,0 @@
1
- "use client";
2
- import*as n from"react";var o=0;function r(){let i=n.useRef(void 0);return n.useEffect(()=>{let e=document.getElementById("kui-live-announcer");return e||(e=document.createElement("div"),e.id="kui-live-announcer",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.style.cssText=`
3
- position: absolute;
4
- left: -10000px;
5
- width: 1px;
6
- height: 1px;
7
- overflow: hidden;
8
- clip: rect(0, 0, 0, 0);
9
- white-space: nowrap;
10
- `,document.body.appendChild(e)),o++,()=>{if(o--,i.current&&clearTimeout(i.current),o===0){let t=document.getElementById("kui-live-announcer");t&&t.remove()}}},[]),n.useCallback(e=>{let t=document.getElementById("kui-live-announcer");t&&(i.current&&clearTimeout(i.current),t.textContent="",i.current=setTimeout(()=>{t.textContent=e},100))},[])}export{r as a};
11
- //# sourceMappingURL=chunk-WTP2KIK3.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/hooks/use-live-announcer.ts"],
4
- "sourcesContent": ["import * as React from 'react';\n\n/**\n * Reference counter to track how many components are using the live region.\n * Only remove the live region when no components are using it.\n */\nlet liveRegionRefCount = 0;\n\n/**\n * Hook for making live announcements to screen readers\n * Creates a hidden aria-live region for announcing dynamic content changes\n */\nexport function useLiveAnnouncer() {\n // Track the timeout so we can clean it up on unmount\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // Create aria-live region if it doesn't exist\n React.useEffect(() => {\n let liveRegion = document.getElementById('kui-live-announcer');\n\n if (!liveRegion) {\n liveRegion = document.createElement('div');\n liveRegion.id = 'kui-live-announcer';\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = `\n position: absolute;\n left: -10000px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n `;\n document.body.appendChild(liveRegion);\n }\n\n // Increment ref count when component mounts\n liveRegionRefCount++;\n\n return () => {\n // Decrement ref count when component unmounts\n liveRegionRefCount--;\n\n // Clean up timeout on unmount\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Only remove the live region if no components are using it\n if (liveRegionRefCount === 0) {\n const region = document.getElementById('kui-live-announcer');\n if (region) {\n region.remove();\n }\n }\n };\n }, []);\n\n const announce = React.useCallback((message: string) => {\n const liveRegion = document.getElementById('kui-live-announcer');\n if (liveRegion) {\n // Clear any pending timeout\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Clear previous announcements\n liveRegion.textContent = '';\n\n // Add new announcement with a small delay to ensure it's announced\n timeoutRef.current = setTimeout(() => {\n liveRegion.textContent = message;\n }, 100);\n }\n }, []);\n\n return announce;\n}\n"],
5
- "mappings": ";AAAA,UAAYA,MAAW,QAMvB,IAAIC,EAAqB,EAMlB,SAASC,GAAmB,CAEjC,IAAMC,EAAmB,SAAkD,MAAS,EAGpF,OAAM,YAAU,IAAM,CACpB,IAAIC,EAAa,SAAS,eAAe,oBAAoB,EAE7D,OAAKA,IACHA,EAAa,SAAS,cAAc,KAAK,EACzCA,EAAW,GAAK,qBAChBA,EAAW,aAAa,YAAa,QAAQ,EAC7CA,EAAW,aAAa,cAAe,MAAM,EAC7CA,EAAW,MAAM,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAS3B,SAAS,KAAK,YAAYA,CAAU,GAItCH,IAEO,IAAM,CAUX,GARAA,IAGIE,EAAW,SACb,aAAaA,EAAW,OAAO,EAI7BF,IAAuB,EAAG,CAC5B,IAAMI,EAAS,SAAS,eAAe,oBAAoB,EACvDA,GACFA,EAAO,OAAO,CAElB,CACF,CACF,EAAG,CAAC,CAAC,EAEkB,cAAaC,GAAoB,CACtD,IAAMF,EAAa,SAAS,eAAe,oBAAoB,EAC3DA,IAEED,EAAW,SACb,aAAaA,EAAW,OAAO,EAIjCC,EAAW,YAAc,GAGzBD,EAAW,QAAU,WAAW,IAAM,CACpCC,EAAW,YAAcE,CAC3B,EAAG,GAAG,EAEV,EAAG,CAAC,CAAC,CAGP",
6
- "names": ["React", "liveRegionRefCount", "useLiveAnnouncer", "timeoutRef", "liveRegion", "region", "message"]
7
- }