@womp/kookie-ui 0.25.0 → 0.25.2

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 (339) hide show
  1. package/components.css +19 -3
  2. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +4 -4
  5. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  6. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  7. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  8. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  9. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  10. package/dist/cjs/components/_internal/shell-resizable.d.ts +6 -0
  11. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
  12. package/dist/cjs/components/_internal/shell-resizable.js +1 -1
  13. package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
  14. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  15. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  16. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  17. package/dist/cjs/components/accordion.js +1 -1
  18. package/dist/cjs/components/accordion.js.map +4 -4
  19. package/dist/cjs/components/alert-dialog.js +1 -1
  20. package/dist/cjs/components/alert-dialog.js.map +4 -4
  21. package/dist/cjs/components/avatar.js +1 -1
  22. package/dist/cjs/components/avatar.js.map +4 -4
  23. package/dist/cjs/components/button.js +1 -1
  24. package/dist/cjs/components/button.js.map +4 -4
  25. package/dist/cjs/components/card.js +1 -1
  26. package/dist/cjs/components/card.js.map +4 -4
  27. package/dist/cjs/components/chatbar.js +1 -1
  28. package/dist/cjs/components/chatbar.js.map +4 -4
  29. package/dist/cjs/components/checkbox-group.js +1 -1
  30. package/dist/cjs/components/checkbox-group.js.map +4 -4
  31. package/dist/cjs/components/checkbox.js +1 -1
  32. package/dist/cjs/components/checkbox.js.map +4 -4
  33. package/dist/cjs/components/chip.js +1 -1
  34. package/dist/cjs/components/chip.js.map +4 -4
  35. package/dist/cjs/components/combobox.js +1 -1
  36. package/dist/cjs/components/combobox.js.map +4 -4
  37. package/dist/cjs/components/context-menu.js +1 -1
  38. package/dist/cjs/components/context-menu.js.map +4 -4
  39. package/dist/cjs/components/dialog.js +1 -1
  40. package/dist/cjs/components/dialog.js.map +4 -4
  41. package/dist/cjs/components/dropdown-menu.js +1 -1
  42. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  43. package/dist/cjs/components/index.js +2 -2
  44. package/dist/cjs/components/index.js.map +4 -4
  45. package/dist/cjs/components/message-scroller.js +1 -1
  46. package/dist/cjs/components/message-scroller.js.map +4 -4
  47. package/dist/cjs/components/navbar.js +1 -1
  48. package/dist/cjs/components/navbar.js.map +4 -4
  49. package/dist/cjs/components/notice.js +1 -1
  50. package/dist/cjs/components/notice.js.map +4 -4
  51. package/dist/cjs/components/popover.js +1 -1
  52. package/dist/cjs/components/popover.js.map +4 -4
  53. package/dist/cjs/components/radio-group.js +1 -1
  54. package/dist/cjs/components/radio-group.js.map +4 -4
  55. package/dist/cjs/components/radio.js +1 -1
  56. package/dist/cjs/components/radio.js.map +4 -4
  57. package/dist/cjs/components/segmented-control.js +1 -1
  58. package/dist/cjs/components/segmented-control.js.map +4 -4
  59. package/dist/cjs/components/select.js +1 -1
  60. package/dist/cjs/components/select.js.map +4 -4
  61. package/dist/cjs/components/sheet.js +1 -1
  62. package/dist/cjs/components/sheet.js.map +4 -4
  63. package/dist/cjs/components/shell.js +1 -1
  64. package/dist/cjs/components/shell.js.map +4 -4
  65. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  66. package/dist/cjs/components/sidebar.js +1 -1
  67. package/dist/cjs/components/sidebar.js.map +4 -4
  68. package/dist/cjs/components/slider.js +1 -1
  69. package/dist/cjs/components/slider.js.map +4 -4
  70. package/dist/cjs/components/switch.js +1 -1
  71. package/dist/cjs/components/switch.js.map +4 -4
  72. package/dist/cjs/components/table.js +1 -1
  73. package/dist/cjs/components/table.js.map +4 -4
  74. package/dist/cjs/components/tabs.js +1 -1
  75. package/dist/cjs/components/tabs.js.map +4 -4
  76. package/dist/cjs/components/text-area.js +1 -1
  77. package/dist/cjs/components/text-area.js.map +4 -4
  78. package/dist/cjs/components/text-field.js +2 -2
  79. package/dist/cjs/components/text-field.js.map +4 -4
  80. package/dist/cjs/components/theme.js +1 -1
  81. package/dist/cjs/components/theme.js.map +4 -4
  82. package/dist/cjs/components/toggle.js +1 -1
  83. package/dist/cjs/components/toggle.js.map +4 -4
  84. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  85. package/dist/cjs/components/toolbar.js +1 -1
  86. package/dist/cjs/components/toolbar.js.map +4 -4
  87. package/dist/cjs/components/tooltip.js +1 -1
  88. package/dist/cjs/components/tooltip.js.map +4 -4
  89. package/dist/cjs/helpers/index.d.ts +1 -0
  90. package/dist/cjs/helpers/index.d.ts.map +1 -1
  91. package/dist/cjs/helpers/index.js +4 -4
  92. package/dist/cjs/helpers/index.js.map +3 -3
  93. package/dist/cjs/helpers/theme-size.d.ts +8 -30
  94. package/dist/cjs/helpers/theme-size.d.ts.map +1 -1
  95. package/dist/cjs/helpers/theme-size.js +1 -1
  96. package/dist/cjs/helpers/theme-size.js.map +3 -3
  97. package/dist/cjs/hooks/theme-size.d.ts +32 -0
  98. package/dist/cjs/hooks/theme-size.d.ts.map +1 -0
  99. package/dist/cjs/hooks/theme-size.js +3 -0
  100. package/dist/cjs/hooks/theme-size.js.map +7 -0
  101. package/dist/cjs/index.js +4 -4
  102. package/dist/cjs/index.js.map +4 -4
  103. package/dist/cjs/props/index.js +1 -1
  104. package/dist/cjs/props/index.js.map +4 -4
  105. package/dist/esm/chunk-3B25RLWX.js +3 -0
  106. package/dist/esm/chunk-3B25RLWX.js.map +7 -0
  107. package/dist/esm/{chunk-PF67GJ5D.js → chunk-3CY6H4TE.js} +2 -2
  108. package/dist/esm/chunk-3CY6H4TE.js.map +7 -0
  109. package/dist/esm/{chunk-2EXOL2BR.js → chunk-3L2MDOYC.js} +2 -2
  110. package/dist/esm/chunk-3L2MDOYC.js.map +7 -0
  111. package/dist/esm/{chunk-KNBSG2WA.js → chunk-5CFSNNYS.js} +2 -2
  112. package/dist/esm/chunk-5CFSNNYS.js.map +7 -0
  113. package/dist/esm/{chunk-4ABQ6CDI.js → chunk-5EBJOOXE.js} +2 -2
  114. package/dist/esm/chunk-5EBJOOXE.js.map +7 -0
  115. package/dist/esm/{chunk-E4EMG3RC.js → chunk-5L4DZ2D3.js} +2 -2
  116. package/dist/esm/chunk-5L4DZ2D3.js.map +7 -0
  117. package/dist/esm/chunk-5ON3XLRD.js +3 -0
  118. package/dist/esm/chunk-5ON3XLRD.js.map +7 -0
  119. package/dist/esm/{chunk-UZAS4PYM.js → chunk-5TJH35TF.js} +2 -2
  120. package/dist/esm/{chunk-GPQSC6GL.js → chunk-5XR5PTDR.js} +2 -2
  121. package/dist/esm/chunk-5XR5PTDR.js.map +7 -0
  122. package/dist/esm/{chunk-AOBY2OUZ.js → chunk-63MUJFVF.js} +2 -2
  123. package/dist/esm/chunk-63MUJFVF.js.map +7 -0
  124. package/dist/esm/chunk-6AUIIXXE.js +2 -0
  125. package/dist/esm/chunk-6AUIIXXE.js.map +7 -0
  126. package/dist/esm/{chunk-4Q5PUIDJ.js → chunk-6RJQ5LLP.js} +2 -2
  127. package/dist/esm/{chunk-YVZTQA2L.js → chunk-7B3XDZXZ.js} +2 -2
  128. package/dist/esm/chunk-7B3XDZXZ.js.map +7 -0
  129. package/dist/esm/{chunk-7IHBNDCE.js → chunk-7X7VWR3F.js} +2 -2
  130. package/dist/esm/chunk-7X7VWR3F.js.map +7 -0
  131. package/dist/esm/{chunk-45O3JZWQ.js → chunk-7XHE6TOA.js} +2 -2
  132. package/dist/esm/chunk-7XHE6TOA.js.map +7 -0
  133. package/dist/esm/chunk-AQ7VUGQQ.js +3 -0
  134. package/dist/esm/chunk-AQ7VUGQQ.js.map +7 -0
  135. package/dist/esm/{chunk-54HUG34P.js → chunk-BVFHJP5E.js} +2 -2
  136. package/dist/esm/chunk-BVFHJP5E.js.map +7 -0
  137. package/dist/esm/{chunk-CRCYUJMK.js → chunk-BXZSJKWA.js} +2 -2
  138. package/dist/esm/chunk-BXZSJKWA.js.map +7 -0
  139. package/dist/esm/{chunk-IQ2RMFOM.js → chunk-CQG4U5BR.js} +2 -2
  140. package/dist/esm/{chunk-YNCI5PY6.js → chunk-FPGBCCML.js} +2 -2
  141. package/dist/esm/chunk-FPGBCCML.js.map +7 -0
  142. package/dist/esm/{chunk-A7QRPXXB.js → chunk-HHSFAOIO.js} +2 -2
  143. package/dist/esm/chunk-HHSFAOIO.js.map +7 -0
  144. package/dist/esm/{chunk-NMQGDBLD.js → chunk-MQEWEAH5.js} +2 -2
  145. package/dist/esm/chunk-MQEWEAH5.js.map +7 -0
  146. package/dist/esm/{chunk-YIKLO2XL.js → chunk-N3QLHFHB.js} +2 -2
  147. package/dist/esm/chunk-N3QLHFHB.js.map +7 -0
  148. package/dist/esm/{chunk-LCG3JZ3C.js → chunk-N5H7C3PZ.js} +2 -2
  149. package/dist/esm/chunk-N5H7C3PZ.js.map +7 -0
  150. package/dist/esm/{chunk-N53NJCEM.js → chunk-OQWD63AI.js} +2 -2
  151. package/dist/esm/chunk-OQWD63AI.js.map +7 -0
  152. package/dist/esm/chunk-PCLO3ZZY.js +3 -0
  153. package/dist/esm/chunk-PCLO3ZZY.js.map +7 -0
  154. package/dist/esm/{chunk-2XZ7477Y.js → chunk-PZZJH2LR.js} +2 -2
  155. package/dist/esm/chunk-PZZJH2LR.js.map +7 -0
  156. package/dist/esm/chunk-QKCNGEX4.js +3 -0
  157. package/dist/esm/chunk-QKCNGEX4.js.map +7 -0
  158. package/dist/esm/{chunk-PPQ7URZL.js → chunk-R4PGFURL.js} +2 -2
  159. package/dist/esm/{chunk-UUQGOQ5H.js → chunk-RB5VHWAW.js} +2 -2
  160. package/dist/esm/chunk-RB5VHWAW.js.map +7 -0
  161. package/dist/esm/{chunk-AG2YETE6.js → chunk-VPRAXHLL.js} +2 -2
  162. package/dist/esm/chunk-VPRAXHLL.js.map +7 -0
  163. package/dist/esm/{chunk-7J7RPEPB.js → chunk-VRQEWMC6.js} +2 -2
  164. package/dist/esm/chunk-VRQEWMC6.js.map +7 -0
  165. package/dist/esm/{chunk-UFJGZUKK.js → chunk-W4MQ6TEK.js} +2 -2
  166. package/dist/esm/chunk-W4MQ6TEK.js.map +7 -0
  167. package/dist/esm/{chunk-3223MHQK.js → chunk-WJ4H2O2G.js} +2 -2
  168. package/dist/esm/chunk-WMODMXEU.js +3 -0
  169. package/dist/esm/chunk-WMODMXEU.js.map +7 -0
  170. package/dist/esm/{chunk-JZVLP2VF.js → chunk-XPVRXQSW.js} +2 -2
  171. package/dist/esm/chunk-XPVRXQSW.js.map +7 -0
  172. package/dist/esm/{chunk-BUZGRMDD.js → chunk-Y2BTPKK6.js} +2 -2
  173. package/dist/esm/chunk-YOSCUA6Z.js +3 -0
  174. package/dist/esm/chunk-YOSCUA6Z.js.map +7 -0
  175. package/dist/esm/{chunk-X272YV2E.js → chunk-Z563IAE3.js} +2 -2
  176. package/dist/esm/chunk-Z563IAE3.js.map +7 -0
  177. package/dist/esm/{chunk-GZ333J7L.js → chunk-ZDSY6CJL.js} +2 -2
  178. package/dist/esm/chunk-ZDSY6CJL.js.map +7 -0
  179. package/dist/esm/{chunk-ENAW44VE.js → chunk-ZYKJTNAT.js} +2 -2
  180. package/dist/esm/chunk-ZYKJTNAT.js.map +7 -0
  181. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  182. package/dist/esm/components/_internal/base-button.js +1 -1
  183. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  184. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  185. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  186. package/dist/esm/components/_internal/shell-resizable.d.ts +6 -0
  187. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  188. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  189. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  190. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  191. package/dist/esm/components/accordion.js +1 -1
  192. package/dist/esm/components/alert-dialog.js +1 -1
  193. package/dist/esm/components/avatar.js +1 -1
  194. package/dist/esm/components/button.js +1 -1
  195. package/dist/esm/components/card.js +1 -1
  196. package/dist/esm/components/chatbar.js +1 -1
  197. package/dist/esm/components/checkbox-group.js +1 -1
  198. package/dist/esm/components/checkbox.js +1 -1
  199. package/dist/esm/components/chip.js +1 -1
  200. package/dist/esm/components/combobox.js +1 -1
  201. package/dist/esm/components/context-menu.js +1 -1
  202. package/dist/esm/components/dialog.js +1 -1
  203. package/dist/esm/components/dropdown-menu.js +1 -1
  204. package/dist/esm/components/index.js +1 -1
  205. package/dist/esm/components/message-scroller.js +1 -1
  206. package/dist/esm/components/navbar.js +1 -1
  207. package/dist/esm/components/notice.js +1 -1
  208. package/dist/esm/components/popover.js +1 -1
  209. package/dist/esm/components/radio-group.js +1 -1
  210. package/dist/esm/components/radio.js +1 -1
  211. package/dist/esm/components/segmented-control.js +1 -1
  212. package/dist/esm/components/select.js +1 -1
  213. package/dist/esm/components/sheet.js +1 -1
  214. package/dist/esm/components/shell.js +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/slider.js +1 -1
  218. package/dist/esm/components/switch.js +1 -1
  219. package/dist/esm/components/table.js +1 -1
  220. package/dist/esm/components/tabs.js +1 -1
  221. package/dist/esm/components/text-area.js +1 -1
  222. package/dist/esm/components/text-field.js +1 -1
  223. package/dist/esm/components/theme.js +1 -1
  224. package/dist/esm/components/toggle.js +1 -1
  225. package/dist/esm/components/toolbar.d.ts.map +1 -1
  226. package/dist/esm/components/toolbar.js +1 -1
  227. package/dist/esm/components/tooltip.js +1 -1
  228. package/dist/esm/helpers/index.d.ts +1 -0
  229. package/dist/esm/helpers/index.d.ts.map +1 -1
  230. package/dist/esm/helpers/index.js +1 -1
  231. package/dist/esm/helpers/index.js.map +4 -4
  232. package/dist/esm/helpers/theme-size.d.ts +8 -30
  233. package/dist/esm/helpers/theme-size.d.ts.map +1 -1
  234. package/dist/esm/helpers/theme-size.js +1 -1
  235. package/dist/esm/hooks/theme-size.d.ts +32 -0
  236. package/dist/esm/hooks/theme-size.d.ts.map +1 -0
  237. package/dist/esm/hooks/theme-size.js +3 -0
  238. package/dist/esm/hooks/theme-size.js.map +7 -0
  239. package/dist/esm/index.js +1 -1
  240. package/dist/esm/props/font-family.prop.js +1 -1
  241. package/dist/esm/props/font-family.prop.js.map +4 -4
  242. package/dist/esm/props/index.js +1 -1
  243. package/dist/esm/props/index.js.map +4 -4
  244. package/package.json +1 -1
  245. package/src/components/_internal/base-button.tsx +56 -42
  246. package/src/components/_internal/shell-inspector.tsx +3 -1
  247. package/src/components/_internal/shell-resizable.tsx +13 -0
  248. package/src/components/_internal/shell-sidebar.tsx +3 -1
  249. package/src/components/accordion.tsx +1 -1
  250. package/src/components/alert-dialog.tsx +1 -1
  251. package/src/components/avatar.tsx +1 -1
  252. package/src/components/card.tsx +1 -1
  253. package/src/components/chatbar.tsx +1 -1
  254. package/src/components/checkbox-group.tsx +1 -1
  255. package/src/components/checkbox.tsx +1 -1
  256. package/src/components/combobox.tsx +1 -1
  257. package/src/components/context-menu.tsx +1 -1
  258. package/src/components/dialog.tsx +1 -1
  259. package/src/components/dropdown-menu.tsx +1 -1
  260. package/src/components/navbar.tsx +1 -1
  261. package/src/components/notice.tsx +1 -1
  262. package/src/components/popover.css +4 -2
  263. package/src/components/popover.tsx +1 -1
  264. package/src/components/radio-group.tsx +1 -1
  265. package/src/components/radio.tsx +1 -1
  266. package/src/components/segmented-control.tsx +1 -1
  267. package/src/components/select.tsx +1 -1
  268. package/src/components/sheet.css +4 -2
  269. package/src/components/sheet.tsx +1 -1
  270. package/src/components/shell.css +7 -2
  271. package/src/components/shell.tsx +1 -1
  272. package/src/components/sidebar.css +10 -0
  273. package/src/components/sidebar.tsx +16 -1
  274. package/src/components/slider.tsx +1 -1
  275. package/src/components/switch.tsx +1 -1
  276. package/src/components/table.tsx +1 -1
  277. package/src/components/tabs.tsx +1 -1
  278. package/src/components/text-area.tsx +1 -1
  279. package/src/components/text-field.tsx +1 -1
  280. package/src/components/theme.tsx +1 -1
  281. package/src/components/toolbar.tsx +17 -8
  282. package/src/helpers/index.ts +3 -0
  283. package/src/helpers/theme-size.ts +8 -46
  284. package/src/hooks/theme-size.ts +50 -0
  285. package/src/styles/tokens/color.css +3 -0
  286. package/styles.css +21 -3
  287. package/tokens/base.css +2 -0
  288. package/tokens.css +2 -0
  289. package/dist/esm/chunk-2EXOL2BR.js.map +0 -7
  290. package/dist/esm/chunk-2IUGM657.js +0 -3
  291. package/dist/esm/chunk-2IUGM657.js.map +0 -7
  292. package/dist/esm/chunk-2XZ7477Y.js.map +0 -7
  293. package/dist/esm/chunk-3WZLXGUE.js +0 -3
  294. package/dist/esm/chunk-3WZLXGUE.js.map +0 -7
  295. package/dist/esm/chunk-3YLYGKFB.js +0 -2
  296. package/dist/esm/chunk-3YLYGKFB.js.map +0 -7
  297. package/dist/esm/chunk-45O3JZWQ.js.map +0 -7
  298. package/dist/esm/chunk-4ABQ6CDI.js.map +0 -7
  299. package/dist/esm/chunk-54HUG34P.js.map +0 -7
  300. package/dist/esm/chunk-7IHBNDCE.js.map +0 -7
  301. package/dist/esm/chunk-7J7RPEPB.js.map +0 -7
  302. package/dist/esm/chunk-A7QRPXXB.js.map +0 -7
  303. package/dist/esm/chunk-AG2YETE6.js.map +0 -7
  304. package/dist/esm/chunk-AOBY2OUZ.js.map +0 -7
  305. package/dist/esm/chunk-CRCYUJMK.js.map +0 -7
  306. package/dist/esm/chunk-DI7RUMLO.js +0 -3
  307. package/dist/esm/chunk-DI7RUMLO.js.map +0 -7
  308. package/dist/esm/chunk-E4EMG3RC.js.map +0 -7
  309. package/dist/esm/chunk-ENAW44VE.js.map +0 -7
  310. package/dist/esm/chunk-EVCQ6TG5.js +0 -3
  311. package/dist/esm/chunk-EVCQ6TG5.js.map +0 -7
  312. package/dist/esm/chunk-G32GSPNO.js +0 -3
  313. package/dist/esm/chunk-G32GSPNO.js.map +0 -7
  314. package/dist/esm/chunk-GPQSC6GL.js.map +0 -7
  315. package/dist/esm/chunk-GZ333J7L.js.map +0 -7
  316. package/dist/esm/chunk-JIF77MRB.js +0 -3
  317. package/dist/esm/chunk-JIF77MRB.js.map +0 -7
  318. package/dist/esm/chunk-JZVLP2VF.js.map +0 -7
  319. package/dist/esm/chunk-KNBSG2WA.js.map +0 -7
  320. package/dist/esm/chunk-LB2HB4NG.js +0 -3
  321. package/dist/esm/chunk-LB2HB4NG.js.map +0 -7
  322. package/dist/esm/chunk-LCG3JZ3C.js.map +0 -7
  323. package/dist/esm/chunk-N53NJCEM.js.map +0 -7
  324. package/dist/esm/chunk-NMQGDBLD.js.map +0 -7
  325. package/dist/esm/chunk-PF67GJ5D.js.map +0 -7
  326. package/dist/esm/chunk-UFJGZUKK.js.map +0 -7
  327. package/dist/esm/chunk-UUQGOQ5H.js.map +0 -7
  328. package/dist/esm/chunk-VCV7RACK.js +0 -2
  329. package/dist/esm/chunk-VCV7RACK.js.map +0 -7
  330. package/dist/esm/chunk-X272YV2E.js.map +0 -7
  331. package/dist/esm/chunk-YIKLO2XL.js.map +0 -7
  332. package/dist/esm/chunk-YNCI5PY6.js.map +0 -7
  333. package/dist/esm/chunk-YVZTQA2L.js.map +0 -7
  334. /package/dist/esm/{chunk-UZAS4PYM.js.map → chunk-5TJH35TF.js.map} +0 -0
  335. /package/dist/esm/{chunk-4Q5PUIDJ.js.map → chunk-6RJQ5LLP.js.map} +0 -0
  336. /package/dist/esm/{chunk-IQ2RMFOM.js.map → chunk-CQG4U5BR.js.map} +0 -0
  337. /package/dist/esm/{chunk-PPQ7URZL.js.map → chunk-R4PGFURL.js.map} +0 -0
  338. /package/dist/esm/{chunk-3223MHQK.js.map → chunk-WJ4H2O2G.js.map} +0 -0
  339. /package/dist/esm/{chunk-BUZGRMDD.js.map → chunk-Y2BTPKK6.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/select.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../helpers/theme-size.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.js';\nimport {\n selectRootPropDefs,\n selectTriggerPropDefs,\n selectContentPropDefs,\n} from './select.props.js';\nimport { useThemeContext, Theme } from './theme.js';\nimport { useThumbSync } from '../hooks/use-thumb-sync.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype SelectRootOwnProps = GetPropDefTypes<typeof selectRootPropDefs>;\n\n// Trigger and Content pass the size prop def as its own record. It is hoisted because\n// extractProps caches its compiled prop defs on the identity of each record it is given:\n// a literal written at the call site would be a new object, and a recompile, every render.\nconst selectSizePropDefs = { size: selectRootPropDefs.size };\n\n// Keys that open the list from the trigger, as in Radix.\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\n\ninterface SelectContextValue extends SelectRootOwnProps {\n /** Whether the list is open. Undefined when Content is rendered outside a Kookie Select.Root. */\n open?: boolean;\n}\nconst SelectContext = React.createContext<SelectContextValue>({});\n\ninterface SelectRootProps extends SelectPrimitive.SelectProps, SelectRootOwnProps {}\nconst SelectRoot: React.FC<SelectRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n open: openProp,\n defaultOpen,\n onOpenChange,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, selectRootPropDefs.size);\n\n // Root owns the open state and hands Radix a controlled `open`, so Content learns of a\n // change in the same render Radix does. Radix's uncontrolled state reports changes from an\n // effect, a render late, which would mount the open list once without its wrappers.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);\n const open = openProp ?? uncontrolledOpen;\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n return (\n <SelectPrimitive.Root {...rootProps} open={open} onOpenChange={handleOpenChange}>\n <SelectContext.Provider value={React.useMemo(() => ({ size, open }), [size, open])}>\n {children}\n </SelectContext.Provider>\n </SelectPrimitive.Root>\n );\n};\nSelectRoot.displayName = 'Select.Root';\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerOwnProps = GetPropDefTypes<typeof selectTriggerPropDefs>;\ninterface SelectTriggerProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Trigger, RemovedProps>,\n SelectTriggerOwnProps {}\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const {\n children,\n className,\n color,\n radius,\n placeholder,\n error,\n loading,\n disabled,\n readOnly,\n ...triggerProps\n } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectTriggerPropDefs,\n );\n\n // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid)\n // stays, so both paths reach the accessibility tree and the CSS, as on TextField.\n const {\n 'aria-invalid': ariaInvalid,\n 'aria-busy': ariaBusy,\n 'aria-disabled': ariaDisabled,\n 'aria-readonly': ariaReadOnly,\n } = triggerProps;\n const isInvalid = Boolean(error) || ariaInvalid === true || ariaInvalid === 'true';\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-busy': loading || ariaBusy,\n 'aria-disabled': disabled || ariaDisabled,\n 'aria-readonly': readOnly || ariaReadOnly,\n }),\n [isInvalid, ariaInvalid, loading, ariaBusy, disabled, ariaDisabled, readOnly, ariaReadOnly],\n );\n\n // Read-only and loading triggers stay focusable but do not open or take typeahead,\n // as on Combobox. Radix skips its own handler when the event is default-prevented.\n const isBlocked = Boolean(readOnly || loading);\n const blockedHandlers = isBlocked\n ? {\n onPointerDown: (event: React.PointerEvent<HTMLButtonElement>) => event.preventDefault(),\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.currentTarget.focus();\n },\n onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (OPEN_KEYS.includes(event.key) || (!isModifierKey && event.key.length === 1)) {\n event.preventDefault();\n }\n },\n }\n : undefined;\n\n return (\n // `disabled` goes to Radix, which merges it with Root's and sets the native attribute.\n <SelectPrimitive.Trigger asChild disabled={disabled} {...blockedHandlers}>\n <button\n data-accent-color={color}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n {...triggerProps}\n {...ariaProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', className)}\n >\n <span className=\"kui-SelectTriggerInner\">\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n </span>\n <SelectPrimitive.Icon asChild>\n {loading ? (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n ) : (\n <ChevronDownIcon className=\"kui-SelectIcon\" />\n )}\n </SelectPrimitive.Icon>\n </button>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = 'Select.Trigger';\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentOwnProps = GetPropDefTypes<typeof selectContentPropDefs>;\ninterface SelectContentProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Content, RemovedProps>,\n SelectContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>['container'];\n}\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const { className, children, color, container, ...contentProps } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n selectSizePropDefs,\n selectContentPropDefs,\n );\n const themeContext = useThemeContext();\n\n // While closed, Radix still renders Content's children, into a detached fragment: the\n // items must exist for the trigger's value label, typeahead and the native form select.\n // Nothing in that fragment is ever shown, so the theme wrapper and the scroll area, with\n // its two resize observers, are left out until the list opens.\n if (context.open === false && !contentProps.forceMount) {\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content {...contentProps} asChild={false} ref={forwardedRef}>\n {children}\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n }\n\n const resolvedColor = color || themeContext.accentColor;\n return (\n <SelectPrimitive.Portal container={container}>\n <Theme asChild>\n <SelectPrimitive.Content\n data-accent-color={resolvedColor}\n sideOffset={4}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-SelectContent',\n className,\n )}\n >\n <SelectScrollArea>{children}</SelectScrollArea>\n </SelectPrimitive.Content>\n </Theme>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = 'Select.Content';\n\n/** The open list's scroll area. Its own component so the thumb sync hook runs only while open. */\nfunction SelectScrollArea({ children }: { children: React.ReactNode }) {\n const setThumbViewport = useThumbSync<HTMLDivElement>();\n return (\n <ScrollAreaPrimitive.Root type=\"auto\" className=\"kui-ScrollAreaRoot\">\n <SelectPrimitive.Viewport\n asChild\n className={classNames('kui-BaseMenuViewport', 'kui-SelectViewport')}\n >\n <ScrollAreaPrimitive.Viewport\n ref={setThumbViewport}\n className=\"kui-ScrollAreaViewport\"\n style={{ overflowY: undefined }}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar className=\"kui-ScrollAreaScrollbar\" orientation=\"vertical\">\n <ScrollAreaPrimitive.Thumb className=\"kui-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n );\n}\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ninterface SelectItemProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Item, RemovedProps> {}\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>((props, forwardedRef) => {\n const { className, children, ...itemProps } = props;\n\n // Detect if this is rich content (not just a string)\n const isRichContent = typeof children !== 'string';\n\n return (\n <SelectPrimitive.Item\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseMenuItem',\n 'kui-SelectItem',\n { 'kui-SelectItemRich': isRichContent },\n className,\n )}\n >\n <SelectPrimitive.ItemIndicator className=\"kui-SelectItemIndicator\">\n <ThickCheckIcon className=\"kui-SelectItemIndicatorIcon\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n});\nSelectItem.displayName = 'Select.Item';\n\ntype SelectGroupElement = React.ElementRef<typeof SelectPrimitive.Group>;\ninterface SelectGroupProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Group, RemovedProps> {}\nconst SelectGroup = React.forwardRef<SelectGroupElement, SelectGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-SelectGroup', className)}\n />\n ),\n);\nSelectGroup.displayName = 'Select.Group';\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ninterface SelectLabelProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Label, RemovedProps> {}\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-SelectLabel', className)}\n />\n ),\n);\nSelectLabel.displayName = 'Select.Label';\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ninterface SelectSeparatorProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Separator, RemovedProps> {}\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-SelectSeparator', className)}\n />\n ),\n);\nSelectSeparator.displayName = 'Select.Separator';\n\nexport {\n SelectRoot as Root,\n SelectTrigger as Trigger,\n SelectContent as Content,\n SelectItem as Item,\n SelectGroup as Group,\n SelectLabel as Label,\n SelectSeparator as Separator,\n};\n\nexport type {\n SelectRootProps as RootProps,\n SelectTriggerProps as TriggerProps,\n SelectContentProps as ContentProps,\n SelectItemProps as ItemProps,\n SelectGroupProps as GroupProps,\n SelectLabelProps as LabelProps,\n SelectSeparatorProps as SeparatorProps,\n};\n"],
5
- "mappings": ";4VAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,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,WAsB7E,IAAMC,EAAqB,CAAE,KAAMC,EAAmB,IAAK,EAGrDC,EAAY,CAAC,IAAK,QAAS,UAAW,WAAW,EAMjDC,EAAsB,gBAAkC,CAAC,CAAC,EAG1DC,EAAyCC,GAAU,CACvD,GAAM,CACJ,SAAAC,EACA,KAAMC,EACN,KA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B,IAAMI,EAAoB,aACxB,CAAC,CAAE,UAAAvC,EAAW,GAAGlB,CAAM,EAAGgB,IACxB,gBAACF,EAAgB,MAAhB,CACE,GAAGd,EACJ,QAAS,GACT,IAAKgB,EACL,UAAWsB,EAAW,kBAAmBpB,CAAS,EACpD,CAEJ,EACAuC,EAAY,YAAc,eAK1B,IAAMC,EAAoB,aACxB,CAAC,CAAE,UAAAxC,EAAW,GAAGlB,CAAM,EAAGgB,IACxB,gBAACF,EAAgB,MAAhB,CACE,GAAGd,EACJ,QAAS,GACT,IAAKgB,EACL,UAAWsB,EAAW,oBAAqB,kBAAmBpB,CAAS,EACzE,CAEJ,EACAwC,EAAY,YAAc,eAK1B,IAAMC,EAAwB,aAC5B,CAAC,CAAE,UAAAzC,EAAW,GAAGlB,CAAM,EAAGgB,IACxB,gBAACF,EAAgB,UAAhB,CACE,GAAGd,EACJ,QAAS,GACT,IAAKgB,EACL,UAAWsB,EAAW,wBAAyB,sBAAuBpB,CAAS,EACjF,CAEJ,EACAyC,EAAgB,YAAc",
6
- "names": ["select_exports", "__export", "SelectContent", "SelectGroup", "SelectItem", "SelectLabel", "SelectRoot", "SelectSeparator", "SelectTrigger", "React", "classNames", "SelectPrimitive", "ScrollAreaPrimitive", "selectSizePropDefs", "selectRootPropDefs", "OPEN_KEYS", "SelectContext", "SelectRoot", "props", "children", "sizeProp", "openProp", "defaultOpen", "onOpenChange", "rootProps", "size", "useThemeSize", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChange", "next", "SelectPrimitive", "SelectTrigger", "forwardedRef", "context", "className", "color", "radius", "placeholder", "error", "loading", "disabled", "readOnly", "triggerProps", "extractProps", "selectTriggerPropDefs", "ariaInvalid", "ariaBusy", "ariaDisabled", "ariaReadOnly", "isInvalid", "ariaProps", "blockedHandlers", "event", "isModifierKey", "classNames", "Spinner", "ChevronDownIcon", "SelectContent", "container", "contentProps", "selectContentPropDefs", "themeContext", "useThemeContext", "resolvedColor", "Theme", "SelectScrollArea", "setThumbViewport", "useThumbSync", "ScrollAreaPrimitive", "SelectItem", "itemProps", "isRichContent", "ThickCheckIcon", "SelectGroup", "SelectLabel", "SelectSeparator"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import*as r from"react";var a="2",u=r.createContext(a);u.displayName="ThemeSizeContext";function f(e,t){if(t.includes(e))return e;let n=Number(e),i=t[0],s=1/0;for(let o=0;o<t.length;o++){let c=Math.abs(Number(t[o])-n);c<s&&(s=c,i=t[o])}return i}function m(e,t){let n=r.useContext(u);return e!==void 0?e:f(n,t.values)}function z(e,t){let n=r.useContext(u);if(e.size!==void 0)return e;let i=f(n,t.values);return i===t.default?e:{...e,size:i}}export{u as a,m as b,z as c};
3
- //# sourceMappingURL=chunk-2IUGM657.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/helpers/theme-size.ts"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\n"],
5
- "mappings": ";AAEA,UAAYA,MAAW,QAKvB,IAAMC,EAAgC,IAQhCC,EAAyB,gBAAyBD,CAAkB,EAC1EC,EAAiB,YAAc,mBAY/B,SAASC,EAAUC,EAAiBC,EAAmC,CACrE,GAAIA,EAAO,SAASD,CAAI,EAAG,OAAOA,EAClC,IAAM,EAAI,OAAOA,CAAI,EACjBE,EAAUD,EAAO,CAAC,EAClBE,EAAW,IACf,QAASC,EAAI,EAAGA,EAAIH,EAAO,OAAQG,IAAK,CACtC,IAAMC,EAAI,KAAK,IAAI,OAAOJ,EAAOG,CAAC,CAAC,EAAI,CAAC,EACpCC,EAAIF,IACNA,EAAWE,EACXH,EAAUD,EAAOG,CAAC,EAEtB,CACA,OAAOF,CACT,CAMA,SAASI,EAAgBC,EAAyBC,EAAyB,CACzE,IAAMC,EAAkB,aAAWX,CAAgB,EACnD,OAAIS,IAAa,OAAkBA,EAE5BR,EAAUU,EAAWD,EAAQ,MAAM,CAC5C,CAWA,SAASE,EAAgDC,EAAUH,EAAyB,CAC1F,IAAMC,EAAkB,aAAWX,CAAgB,EACnD,GAAIa,EAAM,OAAS,OAAW,OAAOA,EACrC,IAAMX,EAAOD,EAAUU,EAAWD,EAAQ,MAAM,EAChD,OAAIR,IAASQ,EAAQ,QAAgBG,EAC9B,CAAE,GAAGA,EAAO,KAAAX,CAAK,CAC1B",
6
- "names": ["React", "THEME_SIZE_DEFAULT", "ThemeSizeContext", "clampSize", "size", "values", "nearest", "distance", "i", "d", "useThemeSize", "explicit", "propDef", "themeSize", "useThemeSizeProps", "props"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/checkbox.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport { useControllableState } from 'radix-ui/internal';\n\nimport { checkboxPropDefs } from './checkbox.props.js';\nimport { ThickCheckIcon, ThickDividerHorizontalIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype CheckboxElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxOwnProps = GetPropDefTypes<typeof checkboxPropDefs>;\ninterface CheckboxProps\n extends ComponentPropsWithout<\n typeof CheckboxPrimitive.Root,\n 'asChild' | 'color' | 'defaultValue' | 'children'\n >,\n CheckboxOwnProps {}\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, checkboxPropDefs.size);\n const {\n className,\n color,\n checked: checkedProp,\n defaultChecked: defaultCheckedProp,\n onCheckedChange,\n ...checkboxProps\n } = extractProps(props, checkboxPropDefs);\n\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultCheckedProp ?? false,\n onChange: onCheckedChange,\n });\n\n return (\n <CheckboxPrimitive.Root\n data-accent-color={color}\n {...checkboxProps}\n defaultChecked={defaultCheckedProp}\n checked={checked}\n onCheckedChange={setChecked}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseCheckboxRoot', 'kui-CheckboxRoot', className)}\n >\n <CheckboxPrimitive.Indicator\n asChild\n className=\"kui-BaseCheckboxIndicator kui-CheckboxIndicator\"\n >\n {checked === 'indeterminate' ? <ThickDividerHorizontalIcon /> : <ThickCheckIcon />}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n});\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n"],
5
- "mappings": ";kKAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,YAAYC,MAAyB,WAC9C,OAAS,wBAAAC,MAA4B,oBAkBrC,IAAMC,EAAiB,aAA2C,CAACC,EAAUC,IAAiB,CAC5F,IAAMC,EAAQC,EAAkBH,EAAUI,EAAiB,IAAI,EACzD,CACJ,UAAAC,EACA,MAAAC,EACA,QAASC,EACT,eAAgBC,EAChB,gBAAAC,EACA,GAAGC,CACL,EAAIC,EAAaT,EAAOE,CAAgB,EAElC,CAACQ,EAASC,CAAU,EAAIC,EAAqB,CACjD,KAAMP,EACN,YAAaC,GAAsB,GACnC,SAAUC,CACZ,CAAC,EAED,OACE,gBAACM,EAAkB,KAAlB,CACC,oBAAmBT,EAClB,GAAGI,EACJ,eAAgBF,EAChB,QAASI,EACT,gBAAiBC,EACjB,QAAS,GACT,IAAKZ,EACL,UAAWe,EAAW,YAAa,uBAAwB,mBAAoBX,CAAS,GAExF,gBAACU,EAAkB,UAAlB,CACC,QAAO,GACP,UAAU,mDAETH,IAAY,gBAAkB,gBAACK,EAAA,IAA2B,EAAK,gBAACC,EAAA,IAAe,CAClF,CACF,CAEJ,CAAC,EACDnB,EAAS,YAAc",
6
- "names": ["React", "classNames", "CheckboxPrimitive", "useControllableState", "Checkbox", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "baseCheckboxPropDefs", "className", "color", "checkedProp", "defaultCheckedProp", "onCheckedChange", "checkboxProps", "extractProps", "checked", "setChecked", "useControllableState", "CheckboxPrimitive", "classNames", "ThickDividerHorizontalIcon", "ThickCheckIcon"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as v}from"./chunk-ILWS2JUE.js";import{a as O}from"./chunk-WZKSLTBH.js";import{k as H}from"./chunk-GKDGNPBD.js";import{c as I}from"./chunk-2IUGM657.js";import{a as h}from"./chunk-65KD6WS6.js";import{c as L}from"./chunk-OKQAVYW4.js";import*as e from"react";import te from"classnames";import{Slot as ne}from"radix-ui";import{useComposedRefs as oe,useLayoutEffect as ae}from"radix-ui/internal";var se=e.forwardRef((i,n)=>{let o=I(i,h.size),{className:P,children:a,asChild:s,as:f,color:F,radius:V,disabled:R,done:B=!1,...p}=L(o,h),l=!!o.loading,_=o.loading!==void 0,m=!!R||l,{onClick:T,"aria-describedby":M}=p,A=e.useCallback(t=>{if(m){t.preventDefault();return}T?.(t)},[m,T]),z=e.useMemo(()=>{let t=s&&e.isValidElement(a)?a.props.children:a,d=N(t),c=r=>e.isValidElement(r)&&(r.type==="svg"||typeof r.type!="string"&&r.type!==e.Fragment&&!re.has(k(r.type)));return{iconStart:c(d[0]),iconEnd:c(d[d.length-1])}},[s,a]),[G,W]=e.useState(null),S=e.useRef(null),X=oe(n,S);ae(()=>{let t=S.current;if(!t||l||B)return;let d=t.querySelector(":scope > .kui-BaseButtonContent")??t,c=j(d,"start"),r=j(d,"end");W(u=>u&&u.iconStart===c&&u.iconEnd===r?u:{iconStart:c,iconEnd:r})});let{iconStart:b,iconEnd:q}=G??z,D=!!p["data-icon-only"],E=e.useMemo(()=>{if(!B)return a;let t=e.createElement(H,{key:"kui-done-tick",className:"kui-BaseButtonTick","aria-hidden":!0}),d=c=>{if(D)return t;let r=N(c),u=r.findIndex(y=>!(typeof y=="string"&&!y.trim()));return b&&u!==-1?r.map((y,ee)=>ee===u?t:y):[t,...r]};if(s&&e.isValidElement(a)){let c=a;return e.cloneElement(c,void 0,d(c.props.children))}return d(a)},[B,a,D,b,s]),K=s?ne.Root:f||"button",Q=["button","input","textarea","select"],x=s?e.isValidElement(a)?a.type:void 0:f||"button",C=typeof x=="string"&&Q.includes(x),{onClickCapture:w}=p,$=e.useCallback(t=>{if(s&&m){t.preventDefault(),t.stopPropagation();return}w?.(t)},[s,m,w]),J=!s&&(!f||f==="button"),U="type"in p,Y=e.useId(),g=l?`${Y}-loading`:void 0,Z=e.useMemo(()=>l?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":[M,g].filter(Boolean).join(" ")}:R&&(!C||s)?{"aria-disabled":!0}:{},[l,g,M,R,C,s]);return e.createElement(K,{"data-accent-color":F,"data-radius":V,"data-icon-start":b||void 0,"data-icon-end":q||void 0,"data-done":B||void 0,...p,...Z,"data-disabled":m||void 0,onClick:A,onClickCapture:$,ref:X,className:te("kui-reset","kui-BaseButton",P),...C&&{disabled:R},...J&&!U?{type:"button"}:{}},s&&!l?E:e.createElement(e.Fragment,null,_?e.createElement("span",{className:"kui-BaseButtonContent","aria-hidden":l||void 0},E):E,l?e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-sr-only"},e.createElement("span",{id:g,"aria-hidden":!0},"Loading"),a),e.createElement(O,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(v,{"aria-hidden":"true"})))):null))});se.displayName="BaseButton";var re=new Set(["Text","Kbd","Code","Link","Em","Strong","Quote","Badge","Trans"]);function k(i){if(!i||typeof i!="function"&&typeof i!="object")return"";let n=i;return n.displayName||n.name||k(n.render)||k(n.type)}function N(i){return e.Children.toArray(i).flatMap(n=>e.isValidElement(n)&&n.type===e.Fragment?N(n.props.children):[n])}function j(i,n){let o=n==="start"?i.firstChild:i.lastChild;for(;o&&(o.nodeType===Node.COMMENT_NODE||o.nodeType===Node.TEXT_NODE&&!o.textContent?.trim());)o=n==="start"?o.nextSibling:o.previousSibling;return o?.nodeType===Node.ELEMENT_NODE&&o.localName==="svg"}export{se as a};
3
- //# sourceMappingURL=chunk-3WZLXGUE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/base-button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { TickIcon } from '../icons.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n BaseButtonDoneProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | 'as' | 'done'>;\n\ninterface BaseButtonDoneProps {\n /**\n * Shows a tick in place of the icon to say that the action finished. The tick takes the\n * icon's box, so nothing moves, and the icon comes back as soon as `done` is false again. On\n * an `iconOnly` button the tick replaces the content. It doesn't block the press. Screen\n * readers don't announce the tick, so also change the label or `aria-label` (for example,\n * `Copy` to `Copied`).\n */\n done?: boolean;\n}\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button and Toggle to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, baseButtonPropDefs.size);\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n disabled: nativeDisabled,\n done = false,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs);\n\n // Loading blocks activation but keeps the native `disabled` off, so the button keeps focus\n // and its place in the tab order (aria-disabled carries the state). An explicit `disabled`\n // stays native on form controls; on anything else (a link, an asChild child) the `disabled`\n // attribute does nothing, so aria-disabled carries the state and the click is stopped here.\n const loading = Boolean(props.loading);\n const canLoad = props.loading !== undefined;\n const disabled = Boolean(nativeDisabled) || loading;\n const { onClick, 'aria-describedby': ariaDescribedByProp } = baseButtonProps as {\n onClick?: React.MouseEventHandler<HTMLElement>;\n 'aria-describedby'?: string;\n };\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n },\n [disabled, onClick],\n );\n\n // Which edges start or end with an icon. A bare edge pads wider under a full radius; an edge\n // holding an icon keeps the plain padding (the icon already stands between text and curve).\n // Rendering guesses from the children: an svg element, or a component at either end that is\n // not a known text component (`<Text>`, `<Kbd>`, `<Trans>` and the like), counts as an icon,\n // so the server output is right for icon components such as HugeIcons. After mount the\n // rendered DOM settles it: only an svg is an icon, which corrects a wrong guess.\n const childEdges = React.useMemo(() => {\n const content =\n asChild && React.isValidElement(children) ? (children.props as { children?: React.ReactNode }).children : children;\n // Fragments are see-through: their own first and last children are the edges.\n const items = flattenFragments(content);\n const isIcon = (node: React.ReactNode) =>\n React.isValidElement(node) &&\n (node.type === 'svg' ||\n (typeof node.type !== 'string' && node.type !== React.Fragment && !TEXT_COMPONENTS.has(componentName(node.type))));\n return { iconStart: isIcon(items[0]), iconEnd: isIcon(items[items.length - 1]) };\n }, [asChild, children]);\n const [domEdges, setDomEdges] = React.useState<{ iconStart: boolean; iconEnd: boolean } | null>(null);\n const elementRef = React.useRef<HTMLElement>(null);\n const composedRef = useComposedRefs(forwardedRef, elementRef as React.Ref<BaseButtonElement>);\n useLayoutEffect(() => {\n const element = elementRef.current;\n // While loading the sr-only copy and spinner follow the content, and while done the tick\n // stands at the start; keep the edges read before either.\n if (!element || loading || done) return;\n const contentRoot = element.querySelector(':scope > .kui-BaseButtonContent') ?? element;\n const iconStart = edgeIsSvg(contentRoot, 'start');\n const iconEnd = edgeIsSvg(contentRoot, 'end');\n setDomEdges((prev) => (prev && prev.iconStart === iconStart && prev.iconEnd === iconEnd ? prev : { iconStart, iconEnd }));\n });\n const { iconStart, iconEnd } = domEdges ?? childEdges;\n\n // Done swaps the icon for a tick in the same place: the leading icon when there is one, the\n // whole content on an icon-only button. Without a leading icon the tick goes before the label.\n const iconOnly = Boolean((baseButtonProps as Record<string, unknown>)['data-icon-only']);\n const content = React.useMemo(() => {\n if (!done) return children;\n const tick = <TickIcon key=\"kui-done-tick\" className=\"kui-BaseButtonTick\" aria-hidden />;\n const swap = (nodes: React.ReactNode): React.ReactNode => {\n if (iconOnly) return tick;\n const items = flattenFragments(nodes);\n const first = items.findIndex((node) => !(typeof node === 'string' && !node.trim()));\n if (iconStart && first !== -1) return items.map((node, index) => (index === first ? tick : node));\n return [tick, ...items];\n };\n if (asChild && React.isValidElement(children)) {\n const element = children as React.ReactElement<{ children?: React.ReactNode }>;\n return React.cloneElement(element, undefined, swap(element.props.children));\n }\n return swap(children);\n }, [done, children, iconOnly, iconStart, asChild]);\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements. With asChild, the child's own\n // element type decides: a link child gets aria-disabled, not an invalid `disabled`.\n const formElements = ['button', 'input', 'textarea', 'select'];\n const renderedType = asChild ? (React.isValidElement(children) ? children.type : undefined) : (as || 'button');\n const shouldPassDisabled = typeof renderedType === 'string' && formElements.includes(renderedType);\n\n // With asChild, Radix Slot runs the child's own onClick before ours, so a disabled asChild\n // button stops the click in the capture phase, before any bubble handler runs.\n const { onClickCapture } = baseButtonProps as { onClickCapture?: React.MouseEventHandler<HTMLElement> };\n const handleClickCapture = React.useCallback(\n (event: React.MouseEvent<HTMLElement>) => {\n if (asChild && disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClickCapture?.(event);\n },\n [asChild, disabled, onClickCapture],\n );\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = loading ? `${loadingId}-loading` : undefined;\n\n // Loading keeps the caller's name (aria-label, aria-labelledby or the label text) and adds\n // aria-busy plus a description, as v2 does. A disabled element with no native `disabled`\n // announces itself through aria-disabled.\n const accessibilityProps = React.useMemo(() => {\n if (loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': [ariaDescribedByProp, describedById].filter(Boolean).join(' '),\n };\n }\n if (nativeDisabled && (!shouldPassDisabled || asChild)) {\n return { 'aria-disabled': true };\n }\n return {};\n }, [loading, describedById, ariaDescribedByProp, nativeDisabled, shouldPassDisabled, asChild]);\n\n return (\n <Comp\n data-accent-color={color}\n data-radius={radius}\n data-icon-start={iconStart || undefined}\n data-icon-end={iconEnd || undefined}\n data-done={done || undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n // After the spread: `data-disabled` styles `<Button asChild disabled>`, and a wrapping\n // Radix Toggle (asChild) passes `data-disabled={undefined}` that must not erase it.\n data-disabled={disabled || undefined}\n onClick={handleClick}\n onClickCapture={handleClickCapture}\n ref={composedRef}\n className={classNames('kui-reset', 'kui-BaseButton', className)}\n {...(shouldPassDisabled && { disabled: nativeDisabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {asChild && !loading ? (\n // asChild: Slot merges onto the single child, so the content can't take a wrapper or a sibling.\n content\n ) : (\n <>\n {/**\n * A button that takes `loading` (true or false) keeps its content in this wrapper, so\n * starting or stopping `loading` keeps the children in place (their state survives). A\n * button that never loads skips it, which saves a node per button. `display: contents`\n * keeps the button's flex\n * gap; while loading the wrapper is `visibility: hidden` under the spinner.\n *\n * `display: contents` removes the content from the accessibility tree in some browsers,\n * so while loading the wrapper is `aria-hidden` and a `kui-sr-only` copy carries the name.\n */}\n {canLoad ? (\n <span className=\"kui-BaseButtonContent\" aria-hidden={loading || undefined}>\n {content}\n </span>\n ) : (\n content\n )}\n\n {loading ? (\n <>\n {/* The label stays the name; the hidden \"Loading\" only describes (aria-describedby reads hidden text). */}\n <span className=\"kui-sr-only\">\n <span id={describedById} aria-hidden>\n Loading\n </span>\n {children}\n </span>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : null}\n </>\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\n/** Components that render text, never an icon, so the render-time guess skips them. */\nconst TEXT_COMPONENTS = new Set(['Text', 'Kbd', 'Code', 'Link', 'Em', 'Strong', 'Quote', 'Badge', 'Trans']);\n\n/** A component's display name, looking through forwardRef and memo. */\nfunction componentName(type: unknown): string {\n if (!type || (typeof type !== 'function' && typeof type !== 'object')) return '';\n const named = type as { displayName?: string; name?: string; render?: unknown; type?: unknown };\n return named.displayName || named.name || componentName(named.render) || componentName(named.type);\n}\n\n/** The child list with fragments opened up: a fragment's own children are the edges. */\nfunction flattenFragments(nodes: React.ReactNode): React.ReactNode[] {\n return React.Children.toArray(nodes).flatMap((node) =>\n React.isValidElement(node) && node.type === React.Fragment\n ? flattenFragments((node.props as { children?: React.ReactNode }).children)\n : [node],\n );\n}\n\n/** Whether the first or last rendered node of `element` (blank text and comments skipped) is an svg. */\nfunction edgeIsSvg(element: Element, edge: 'start' | 'end'): boolean {\n let node = edge === 'start' ? element.firstChild : element.lastChild;\n while (node) {\n const blank =\n node.nodeType === Node.COMMENT_NODE || (node.nodeType === Node.TEXT_NODE && !node.textContent?.trim());\n if (!blank) break;\n node = edge === 'start' ? node.nextSibling : node.previousSibling;\n }\n return node?.nodeType === Node.ELEMENT_NODE && (node as Element).localName === 'svg';\n}\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
5
- "mappings": ";gPAAA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,QAAAC,OAAY,WACrB,OAAS,mBAAAC,GAAiB,mBAAAC,OAAuB,oBAmEjD,IAAMC,GAAmB,aAA+C,CAACC,EAAUC,IAAiB,CAClG,IAAMC,EAAQC,EAAkBH,EAAUI,EAAmB,IAAI,EAG3D,CACJ,UAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAUC,EACV,KAAAC,EAAO,GACP,GAAGC,CACL,EAAIC,EAAaZ,EAAOE,CAAkB,EAMpCW,EAAU,EAAQb,EA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GAAS,YAAc,OAAOA,GAAS,SAAW,MAAO,GAC9E,IAAMC,EAAQD,EACd,OAAOC,EAAM,aAAeA,EAAM,MAAQpC,EAAcoC,EAAM,MAAM,GAAKpC,EAAcoC,EAAM,IAAI,CACnG,CAGA,SAASxC,EAAiBqB,EAA2C,CACnE,OAAa,WAAS,QAAQA,CAAK,EAAE,QAASnB,GACtC,iBAAeA,CAAI,GAAKA,EAAK,OAAe,WAC9CF,EAAkBE,EAAK,MAAyC,QAAQ,EACxE,CAACA,CAAI,CACX,CACF,CAGA,SAASY,EAAUH,EAAkB8B,EAAgC,CACnE,IAAIvC,EAAOuC,IAAS,QAAU9B,EAAQ,WAAaA,EAAQ,UAC3D,KAAOT,IAEHA,EAAK,WAAa,KAAK,cAAiBA,EAAK,WAAa,KAAK,WAAa,CAACA,EAAK,aAAa,KAAK,IAEtGA,EAAOuC,IAAS,QAAUvC,EAAK,YAAcA,EAAK,gBAEpD,OAAOA,GAAM,WAAa,KAAK,cAAiBA,EAAiB,YAAc,KACjF",
6
- "names": ["React", "classNames", "Slot", "useComposedRefs", "useLayoutEffect", "BaseButton", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "nativeDisabled", "done", "baseButtonProps", "extractProps", "loading", "canLoad", "disabled", "onClick", "ariaDescribedByProp", "handleClick", "event", "childEdges", "content", "items", "flattenFragments", "isIcon", "node", "TEXT_COMPONENTS", "componentName", "domEdges", "setDomEdges", "elementRef", "composedRef", "useComposedRefs", "useLayoutEffect", "element", "contentRoot", "iconStart", "edgeIsSvg", "iconEnd", "prev", "iconOnly", "tick", "TickIcon", "swap", "nodes", "first", "index", "Comp", "Slot", "formElements", "renderedType", "shouldPassDisabled", "onClickCapture", "handleClickCapture", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "accessibilityProps", "classNames", "Flex", "Spinner", "type", "named", "edge"]
7
- }
@@ -1,2 +0,0 @@
1
- import*as r from"react";var a="2",u=r.createContext(a);u.displayName="ThemeSizeContext";function f(e,t){if(t.includes(e))return e;let n=Number(e),i=t[0],s=1/0;for(let o=0;o<t.length;o++){let c=Math.abs(Number(t[o])-n);c<s&&(s=c,i=t[o])}return i}function m(e,t){let n=r.useContext(u);return e!==void 0?e:f(n,t.values)}function z(e,t){let n=r.useContext(u);if(e.size!==void 0)return e;let i=f(n,t.values);return i===t.default?e:{...e,size:i}}export{a,u as b,f as c,m as d,z as e};
2
- //# sourceMappingURL=chunk-3YLYGKFB.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/helpers/theme-size.ts"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\n"],
5
- "mappings": "AAEA,UAAYA,MAAW,QAKvB,IAAMC,EAAgC,IAQhCC,EAAyB,gBAAyBD,CAAkB,EAC1EC,EAAiB,YAAc,mBAY/B,SAASC,EAAUC,EAAiBC,EAAmC,CACrE,GAAIA,EAAO,SAASD,CAAI,EAAG,OAAOA,EAClC,IAAM,EAAI,OAAOA,CAAI,EACjBE,EAAUD,EAAO,CAAC,EAClBE,EAAW,IACf,QAASC,EAAI,EAAGA,EAAIH,EAAO,OAAQG,IAAK,CACtC,IAAMC,EAAI,KAAK,IAAI,OAAOJ,EAAOG,CAAC,CAAC,EAAI,CAAC,EACpCC,EAAIF,IACNA,EAAWE,EACXH,EAAUD,EAAOG,CAAC,EAEtB,CACA,OAAOF,CACT,CAMA,SAASI,EAAgBC,EAAyBC,EAAyB,CACzE,IAAMC,EAAkB,aAAWX,CAAgB,EACnD,OAAIS,IAAa,OAAkBA,EAE5BR,EAAUU,EAAWD,EAAQ,MAAM,CAC5C,CAWA,SAASE,EAAgDC,EAAUH,EAAyB,CAC1F,IAAMC,EAAkB,aAAWX,CAAgB,EACnD,GAAIa,EAAM,OAAS,OAAW,OAAOA,EACrC,IAAMX,EAAOD,EAAUU,EAAWD,EAAQ,MAAM,EAChD,OAAIR,IAASQ,EAAQ,QAAgBG,EAC9B,CAAE,GAAGA,EAAO,KAAAX,CAAK,CAC1B",
6
- "names": ["React", "THEME_SIZE_DEFAULT", "ThemeSizeContext", "clampSize", "size", "values", "nearest", "distance", "i", "d", "useThemeSize", "explicit", "propDef", "themeSize", "useThemeSizeProps", "props"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/text-field.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { composeEventHandlers, composeRefs } from 'radix-ui/internal';\n\nimport { textFieldRootPropDefs, textFieldSlotPropDefs, type TextFieldSlotScrubProps } from './text-field.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { NotInputTextualAttributes } from '../helpers/input-attributes.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldRootElement = React.ElementRef<'input'>;\ntype TextFieldRootOwnProps = GetPropDefTypes<typeof textFieldRootPropDefs> & {\n defaultValue?: string | number;\n value?: string | number;\n type?: 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';\n};\ntype TextFieldInputProps = ComponentPropsWithout<'input', NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'>;\ninterface TextFieldRootProps extends TextFieldInputProps, TextFieldRootOwnProps {}\n\n// Each Slot registers its id here, so the input can list slot content in aria-describedby.\ntype TextFieldContextValue = { registerSlot: (id: string) => () => void };\nconst TextFieldContext = React.createContext<TextFieldContextValue | null>(null);\n\n// Clicking anything a person could mean to press keeps its own press: the guard is a focusability\n// list, not a tag list. `[tabindex]` catches role-based widgets; `label` already redirects a click.\nconst FOCUSABLE_IN_SLOT = 'button, a, input, select, textarea, label, [tabindex], [contenteditable]';\n\nconst TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, textFieldRootPropDefs.size);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { children, className, color, radius, style, ...inputProps } = extractProps(props, textFieldRootPropDefs);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n // Slot content qualifies the value, so it describes the input (as in v2), in mount order.\n const [slotIds, setSlotIds] = React.useState<string[]>([]);\n const registerSlot = React.useCallback((id: string) => {\n setSlotIds((prev) => (prev.includes(id) ? prev : [...prev, id]));\n return () => setSlotIds((prev) => prev.filter((slotId) => slotId !== id));\n }, []);\n const contextValue = React.useMemo(() => ({ registerSlot }), [registerSlot]);\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby, 'aria-invalid': ariaInvalid } = inputProps;\n\n // Invalid when `error` is set or the caller passes aria-invalid; the CSS keys on aria-invalid only.\n const isInvalid = Boolean(inputProps.error) || ariaInvalid === true || ariaInvalid === 'true';\n\n // Build aria-describedby string. The caller's ids stay; ours are appended.\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (inputProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n parts.push(...slotIds);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [inputProps.errorMessage, ariaDescribedby, errorId, slotIds]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, ariaInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const { error, errorMessage, required, 'aria-describedby': _ariaDescribedby, 'aria-labelledby': _ariaLabelledby, ...nativeInputProps } = inputProps;\n\n // Clicking the padding or a passive slot focuses the input. preventDefault stops the browser\n // from moving focus to the root first, so the input is focused once, synchronously.\n const handleMouseDown = React.useCallback((event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n if (target.closest(FOCUSABLE_IN_SLOT)) return;\n\n const input = inputRef.current;\n if (!input) return;\n\n // Same selector as in the CSS to find the right slot\n const isRightSlot = target.closest(`\n .kui-TextFieldSlot[data-side='right'],\n .kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])\n `);\n\n const cursorPosition = isRightSlot ? input.value.length : 0;\n\n event.preventDefault();\n input.focus();\n // Only some input types support this, browsers will throw an error if not supported\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange#:~:text=Note%20that%20according,not%20support%20selection%22.\n try {\n input.setSelectionRange(cursorPosition, cursorPosition);\n } catch {}\n }, []);\n\n // The message is a sibling of the painted root, so it sits below the field rather than inside it.\n return (\n <>\n {/* A pointer-only hit-target redirect to the input; keyboard users reach the input directly. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n data-accent-color={color}\n data-radius={radius}\n style={style}\n className={classNames('kui-TextFieldRoot', className, {\n // Not used by the library's CSS (invalid styling keys on aria-invalid); kept as a hook for app styles.\n 'kui-error': isInvalid,\n })}\n onMouseDown={handleMouseDown}\n >\n <input {...nativeInputProps} required={required || undefined} {...ariaProps} ref={composeRefs(inputRef, forwardedRef)} className=\"kui-reset kui-TextFieldInput\" />\n <TextFieldContext.Provider value={contextValue}>{children}</TextFieldContext.Provider>\n </div>\n {inputProps.errorMessage && (\n <div id={errorId} className=\"kui-TextFieldErrorMessage\" role=\"alert\">\n {inputProps.errorMessage}\n </div>\n )}\n </>\n );\n});\nTextFieldRoot.displayName = 'TextField.Root';\n\ntype TextFieldSlotElement = React.ElementRef<'div'>;\ntype TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs> & TextFieldSlotScrubProps;\ninterface TextFieldSlotProps extends ComponentPropsWithout<'div', RemovedProps>, TextFieldSlotOwnProps {}\n\n// Detect if we should use pointer capture instead of pointer lock\n// Safari and Firefox show intrusive browser warnings with pointer lock\nconst usePointerCapture = (() => {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent;\n const isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n const isFirefox = /firefox/i.test(ua);\n return isSafari || isFirefox;\n})();\n\nconst TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>((props, forwardedRef) => {\n // Extract scrub props first (not part of PropDef system)\n const { scrub, scrubValue, scrubStep = 1, scrubSensitivity = 1, scrubMin, scrubMax, scrubShiftMultiplier = 10, scrubAltMultiplier = 0.1, onScrub, ...restProps } = props;\n\n // Then extract styling props\n const { className, color, side, onPointerDown, onPointerMove, onPointerUp, onLostPointerCapture, ...slotProps } = extractProps(\n restProps,\n textFieldSlotPropDefs,\n );\n\n // The slot describes the input (see TextFieldRoot); a caller's own id is kept.\n const generatedId = React.useId();\n const slotId = slotProps.id ?? generatedId;\n const registerSlot = React.useContext(TextFieldContext)?.registerSlot;\n React.useEffect(() => registerSlot?.(slotId), [registerSlot, slotId]);\n\n const slotRef = React.useRef<HTMLDivElement>(null);\n const [isScrubbing, setIsScrubbing] = React.useState(false);\n // Where the virtual cursor starts. Movement is written straight to the cursor element, so a\n // scrub does not re-render the slot on every mouse move.\n const [cursorStart, setCursorStart] = React.useState({ x: 0, y: 0 });\n const cursorRef = React.useRef<HTMLImageElement>(null);\n // Virtual cursor Y, tracked beside virtualX\n const virtualY = React.useRef(0);\n // Whether this slot asked for the pointer lock, so a lock change elsewhere is not ours\n const lockedByMe = React.useRef(false);\n\n // Track accumulated sub-step movement for precision\n const accumulatedMovement = React.useRef(0);\n // Track current value for clamping (initialized to scrubValue when scrubbing starts)\n const currentValue = React.useRef(0);\n // Track virtual X position for wrap-around (separate from rendered position)\n const virtualX = React.useRef(0);\n // Track pointer ID for capture mode\n const pointerIdRef = React.useRef<number | null>(null);\n // Track last X position for capture mode (movementX calculation)\n const lastXRef = React.useRef(0);\n\n // Store scrub config in refs so document handlers can access latest values\n const scrubConfigRef = React.useRef({\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n });\n scrubConfigRef.current = {\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n };\n\n const handlePointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (!scrub) return;\n\n // Don't start scrubbing if clicking on interactive elements\n const target = event.target as HTMLElement;\n if (target.closest(FOCUSABLE_IN_SLOT)) return;\n\n event.preventDefault();\n accumulatedMovement.current = 0;\n // Initialize to current value so min/max clamping works correctly\n currentValue.current = scrubValue ?? 0;\n\n // Initialize virtual cursor at actual mouse position\n virtualX.current = event.clientX;\n virtualY.current = event.clientY;\n setCursorStart({ x: event.clientX, y: event.clientY });\n\n const slot = slotRef.current;\n if (!slot) return;\n\n if (usePointerCapture) {\n // Safari/Firefox: Use pointer capture (no browser warning)\n pointerIdRef.current = event.pointerId;\n lastXRef.current = event.clientX;\n slot.setPointerCapture(event.pointerId);\n setIsScrubbing(true);\n } else {\n // Chrome: Use pointer lock for infinite movement\n lockedByMe.current = true;\n slot.requestPointerLock();\n }\n },\n [scrub, scrubValue],\n );\n\n // Handle pointer lock state changes (Chrome only). Only a scrub slot listens, and only a lock\n // this slot asked for starts or ends its scrub.\n React.useEffect(() => {\n if (usePointerCapture || !scrub) return;\n\n const handlePointerLockChange = () => {\n if (!lockedByMe.current) return;\n const isLocked = document.pointerLockElement === slotRef.current;\n setIsScrubbing(isLocked);\n if (!isLocked) {\n lockedByMe.current = false;\n // Fire callback with isChanging = false when scrubbing ends\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n }\n };\n\n document.addEventListener('pointerlockchange', handlePointerLockChange);\n return () => {\n document.removeEventListener('pointerlockchange', handlePointerLockChange);\n };\n }, [scrub]);\n\n // Shared scrub calculation logic\n const processScrubMovement = React.useCallback((movementX: number, movementY: number, shiftKey: boolean, altKey: boolean) => {\n const config = scrubConfigRef.current;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Update virtual position with wrap-around at viewport edges\n virtualX.current += movementX;\n if (virtualX.current > viewportWidth) {\n virtualX.current = virtualX.current % viewportWidth;\n } else if (virtualX.current < 0) {\n virtualX.current = viewportWidth + (virtualX.current % viewportWidth);\n }\n\n // Also track Y with wrap-around\n let newY = virtualY.current + movementY;\n if (newY > viewportHeight) {\n newY = newY % viewportHeight;\n } else if (newY < 0) {\n newY = viewportHeight + (newY % viewportHeight);\n }\n virtualY.current = newY;\n\n const cursor = cursorRef.current;\n if (cursor) {\n cursor.style.left = `${virtualX.current}px`;\n cursor.style.top = `${newY}px`;\n }\n\n // Accumulate movement for sensitivity calculation\n accumulatedMovement.current += movementX;\n\n // Calculate how many steps we've moved\n const stepsFromMovement = accumulatedMovement.current / config.scrubSensitivity;\n\n if (Math.abs(stepsFromMovement) >= 1) {\n // Determine modifier multiplier\n let multiplier = 1;\n if (shiftKey) {\n multiplier = config.scrubShiftMultiplier;\n } else if (altKey) {\n multiplier = config.scrubAltMultiplier;\n }\n\n // Calculate delta\n const wholeSteps = Math.trunc(stepsFromMovement);\n const delta = wholeSteps * config.scrubStep * multiplier;\n\n // Apply min/max clamping if bounds are set\n let clampedDelta = delta;\n if (config.scrubMin !== undefined || config.scrubMax !== undefined) {\n const newValue = currentValue.current + delta;\n const clampedValue = Math.max(config.scrubMin ?? -Infinity, Math.min(config.scrubMax ?? Infinity, newValue));\n clampedDelta = clampedValue - currentValue.current;\n currentValue.current = clampedValue;\n } else {\n currentValue.current += delta;\n }\n\n // Fire callback with clamped delta (isChanging = true during drag)\n if (clampedDelta !== 0) {\n config.onScrub?.(clampedDelta, true);\n }\n\n // Keep the fractional remainder for smooth sub-pixel accumulation\n accumulatedMovement.current = (stepsFromMovement - wholeSteps) * config.scrubSensitivity;\n }\n }, []);\n\n // End scrubbing helper\n const endScrubbing = React.useCallback(() => {\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n pointerIdRef.current = null;\n setIsScrubbing(false);\n }, []);\n\n // Handle pointer capture mode events (Safari/Firefox)\n const handlePointerMove = React.useCallback(\n (event: React.PointerEvent) => {\n if (!isScrubbing || !usePointerCapture) return;\n\n const movementX = event.clientX - lastXRef.current;\n lastXRef.current = event.clientX;\n\n processScrubMovement(movementX, event.movementY, event.shiftKey, event.altKey);\n },\n [isScrubbing, processScrubMovement],\n );\n\n const handlePointerUp = React.useCallback(\n (event: React.PointerEvent) => {\n if (!usePointerCapture || pointerIdRef.current !== event.pointerId) return;\n\n const slot = slotRef.current;\n if (slot && pointerIdRef.current !== null) {\n slot.releasePointerCapture(pointerIdRef.current);\n }\n endScrubbing();\n },\n [endScrubbing],\n );\n\n const handleLostPointerCapture = React.useCallback(() => {\n if (usePointerCapture && isScrubbing) {\n endScrubbing();\n }\n }, [isScrubbing, endScrubbing]);\n\n // Attach document-level listeners for pointer lock mode (Chrome)\n React.useEffect(() => {\n if (!isScrubbing || usePointerCapture) return;\n\n const handleMouseMove = (event: MouseEvent) => {\n processScrubMovement(event.movementX, event.movementY, event.shiftKey, event.altKey);\n };\n\n const handleMouseUp = () => {\n // Exit pointer lock to end scrubbing\n document.exitPointerLock();\n };\n\n // Use mousemove for pointer lock (pointermove doesn't work well with pointer lock)\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n\n // Disable text selection during scrubbing\n document.body.style.userSelect = 'none';\n\n return () => {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n document.body.style.userSelect = '';\n };\n }, [isScrubbing, processScrubMovement]);\n\n // Hide native cursor and disable text selection during pointer capture scrubbing\n React.useEffect(() => {\n if (!isScrubbing || !usePointerCapture) return;\n\n // Create a style element to hide cursor globally during scrub\n const style = document.createElement('style');\n style.textContent = '* { cursor: none !important; user-select: none !important; }';\n document.head.appendChild(style);\n\n return () => {\n document.head.removeChild(style);\n };\n }, [isScrubbing]);\n\n // Render virtual cursor via portal to body so it's not clipped\n // Using a data URI of ew-resize cursor for a native look\n const virtualCursor = isScrubbing\n ? ReactDOM.createPortal(\n <img\n ref={cursorRef}\n className=\"kui-TextFieldSlotScrubCursor\"\n src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E\"\n alt=\"\"\n style={{\n position: 'fixed',\n left: cursorStart.x,\n top: cursorStart.y,\n transform: 'translate(-50%, -50%)',\n pointerEvents: 'none',\n zIndex: 99999,\n width: 24,\n height: 24,\n }}\n aria-hidden=\"true\"\n />,\n document.body,\n )\n : null;\n\n return (\n <div\n data-accent-color={color}\n data-side={side}\n data-scrub={scrub || undefined}\n data-scrubbing={isScrubbing || undefined}\n {...slotProps}\n id={slotId}\n ref={composeRefs(slotRef, forwardedRef)}\n className={classNames('kui-TextFieldSlot', className)}\n // The caller's handlers run first; the scrub handlers only when `scrub` is set.\n onPointerDown={scrub ? composeEventHandlers(onPointerDown, handlePointerDown) : onPointerDown}\n onPointerMove={scrub ? composeEventHandlers(onPointerMove, handlePointerMove) : onPointerMove}\n onPointerUp={scrub ? composeEventHandlers(onPointerUp, handlePointerUp) : onPointerUp}\n onLostPointerCapture={scrub ? composeEventHandlers(onLostPointerCapture, handleLostPointerCapture) : onLostPointerCapture}\n >\n {slotProps.children}\n {virtualCursor}\n </div>\n );\n});\nTextFieldSlot.displayName = 'TextField.Slot';\n\nexport { TextFieldRoot as Root, TextFieldSlot as Slot };\nexport type { TextFieldRootProps as RootProps, TextFieldSlotProps as SlotProps };\n"],
5
- "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,UAAW,wBACX,cAAe,OACf,OAAQ,MACR,MAAO,GACP,OAAQ,EACV,EACA,cAAY,OACd,EACA,SAAS,IACX,EACA,KAEJ,OACE,gBAAC,OACC,oBAAmB3D,EACnB,YAAWgD,EACX,aAAYV,GAAS,OACrB,iBAAgBmB,GAAe,OAC9B,GAAGJ,EACJ,GAAI1C,EACJ,IAAKqB,GAAYwB,EAAS/D,CAAY,EACtC,UAAWsC,GAAW,oBAAqBhC,CAAS,EAEpD,cAAeuC,EAAQ4D,EAAqBjD,EAAeqB,EAAiB,EAAIrB,EAChF,cAAeX,EAAQ4D,EAAqBhD,EAAe0C,EAAiB,EAAI1C,EAChF,YAAaZ,EAAQ4D,EAAqB/C,EAAa0C,EAAe,EAAI1C,EAC1E,qBAAsBb,EAAQ4D,EAAqB9C,EAAsB0C,EAAwB,EAAI1C,GAEpGC,EAAU,SACV4C,EACH,CAEJ,CAAC,EACD5D,GAAc,YAAc",
6
- "names": ["text_field_exports", "__export", "TextFieldRoot", "TextFieldSlot", "React", "ReactDOM", "classNames", "composeEventHandlers", "composeRefs", "TextFieldContext", "FOCUSABLE_IN_SLOT", "TextFieldRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "textFieldRootPropDefs", "inputRef", "children", "className", "color", "radius", "style", "inputProps", "extractProps", "errorId", "slotIds", "setSlotIds", "registerSlot", "id", "prev", "slotId", "contextValue", "ariaDescribedby", "ariaLabelledby", "ariaInvalid", "isInvalid", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeInputProps", "handleMouseDown", "event", "target", "input", "cursorPosition", "classNames", "composeRefs", "usePointerCapture", "ua", "isSafari", "isFirefox", "TextFieldSlot", "scrub", "scrubValue", "scrubStep", "scrubSensitivity", "scrubMin", "scrubMax", "scrubShiftMultiplier", "scrubAltMultiplier", "onScrub", "restProps", "side", "onPointerDown", "onPointerMove", "onPointerUp", "onLostPointerCapture", "slotProps", "textFieldSlotPropDefs", "generatedId", "slotRef", "isScrubbing", "setIsScrubbing", "cursorStart", "setCursorStart", "cursorRef", "virtualY", "lockedByMe", "accumulatedMovement", "currentValue", "virtualX", "pointerIdRef", "lastXRef", "scrubConfigRef", "handlePointerDown", "slot", "handlePointerLockChange", "isLocked", "processScrubMovement", "movementX", "movementY", "shiftKey", "altKey", "config", "viewportWidth", "viewportHeight", "newY", "cursor", "stepsFromMovement", "multiplier", "wholeSteps", "delta", "clampedDelta", "newValue", "clampedValue", "endScrubbing", "handlePointerMove", "handlePointerUp", "handleLostPointerCapture", "handleMouseMove", "handleMouseUp", "virtualCursor", "composeEventHandlers"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/tabs.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\n\nimport { tabsListPropDefs } from './tabs.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type { tabsContentPropDefs, tabsRootPropDefs } from './tabs.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TabsRootElement = React.ElementRef<typeof TabsPrimitive.Root>;\ntype TabsRootOwnProps = GetPropDefTypes<typeof tabsRootPropDefs>;\ninterface TabsRootProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Root, 'asChild' | 'color' | 'defaultChecked'>,\n TabsRootOwnProps {}\nconst TabsRoot = React.forwardRef<TabsRootElement, TabsRootProps>((props, forwardedRef) => {\n const { className, ...rootProps } = props;\n return (\n <TabsPrimitive.Root\n {...rootProps}\n ref={forwardedRef}\n className={classNames('kui-TabsRoot', className)}\n />\n );\n});\nTabsRoot.displayName = 'Tabs.Root';\n\ntype TabsListElement = React.ElementRef<typeof TabsPrimitive.List>;\ntype TabsListOwnProps = GetPropDefTypes<typeof tabsListPropDefs>;\ninterface TabsListProps\n extends ComponentPropsWithout<typeof TabsPrimitive.List, RemovedProps>,\n TabsListOwnProps {}\nconst TabsList = React.forwardRef<TabsListElement, TabsListProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, tabsListPropDefs.size);\n const { className, color, ...listProps } = extractProps(\n props,\n tabsListPropDefs,\n );\n return (\n <TabsPrimitive.List\n data-accent-color={color}\n {...listProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseTabList', 'kui-TabsList', className)}\n />\n );\n});\nTabsList.displayName = 'Tabs.List';\n\ntype TabsTriggerElement = React.ElementRef<typeof TabsPrimitive.Trigger>;\ninterface TabsTriggerProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Trigger, RemovedProps> {}\nconst TabsTrigger = React.forwardRef<TabsTriggerElement, TabsTriggerProps>(\n (props, forwardedRef) => {\n const { className, children, ...triggerProps } = props;\n // A hidden bold copy reserves the active width. Only plain text is copied: copying elements\n // would duplicate their ids and mount them twice.\n const isText = React.Children.toArray(children).every(\n (child) => typeof child === 'string' || typeof child === 'number',\n );\n return (\n <TabsPrimitive.Trigger\n {...triggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseTabListTrigger', 'kui-TabsTrigger', className)}\n >\n <span className=\"kui-BaseTabListTriggerInner kui-TabsTriggerInner\">{children}</span>\n {isText ? (\n <span className=\"kui-BaseTabListTriggerInnerHidden kui-TabsTriggerInnerHidden\" aria-hidden>\n {children}\n </span>\n ) : null}\n </TabsPrimitive.Trigger>\n );\n },\n);\nTabsTrigger.displayName = 'Tabs.Trigger';\n\ntype TabsContentElement = React.ElementRef<typeof TabsPrimitive.Content>;\ntype TabsContentOwnProps = GetPropDefTypes<typeof tabsContentPropDefs>;\ninterface TabsContentProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Content, RemovedProps>,\n TabsContentOwnProps {}\nconst TabsContent = React.forwardRef<TabsContentElement, TabsContentProps>(\n (props, forwardedRef) => {\n const { className, ...contentProps } = props;\n return (\n <TabsPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-TabsContent', className)}\n />\n );\n },\n);\nTabsContent.displayName = 'Tabs.Content';\n\nexport { TabsRoot as Root, TabsList as List, TabsTrigger as Trigger, TabsContent as Content };\nexport type {\n TabsRootProps as RootProps,\n TabsListProps as ListProps,\n TabsTriggerProps as TriggerProps,\n TabsContentProps as ContentProps,\n};\n"],
5
- "mappings": ";gKAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAQC,MAAqB,WAetC,IAAMC,EAAiB,aAA2C,CAACC,EAAOC,IAAiB,CACzF,GAAM,CAAE,UAAAC,EAAW,GAAGC,CAAU,EAAIH,EACpC,OACE,gBAACI,EAAc,KAAd,CACE,GAAGD,EACJ,IAAKF,EACL,UAAWI,EAAW,eAAgBH,CAAS,EACjD,CAEJ,CAAC,EACDH,EAAS,YAAc,YAOvB,IAAMO,EAAiB,aAA2C,CAACC,EAAUN,IAAiB,CAC5F,IAAMD,EAAQQ,EAAkBD,EAAUE,EAAiB,IAAI,EACzD,CAAE,UAAAP,EAAW,MAAAQ,EAAO,GAAGC,CAAU,EAAIC,EACzCZ,EACAS,CACF,EACA,OACE,gBAACL,EAAc,KAAd,CACC,oBAAmBM,EAClB,GAAGC,EACJ,QAAS,GACT,IAAKV,EACL,UAAWI,EAAW,kBAAmB,eAAgBH,CAAS,EACpE,CAEJ,CAAC,EACDI,EAAS,YAAc,YAKvB,IAAMO,EAAoB,aACxB,CAACb,EAAOC,IAAiB,CACvB,GAAM,CAAE,UAAAC,EAAW,SAAAY,EAAU,GAAGC,CAAa,EAAIf,EAG3CgB,EAAe,WAAS,QAAQF,CAAQ,EAAE,MAC7CG,GAAU,OAAOA,GAAU,UAAY,OAAOA,GAAU,QAC3D,EACA,OACE,gBAACb,EAAc,QAAd,CACE,GAAGW,EACJ,QAAS,GACT,IAAKd,EACL,UAAWI,EAAW,YAAa,yBAA0B,kBAAmBH,CAAS,GAEzF,gBAAC,QAAK,UAAU,oDAAoDY,CAAS,EAC5EE,EACC,gBAAC,QAAK,UAAU,+DAA+D,cAAW,IACvFF,CACH,EACE,IACN,CAEJ,CACF,EACAD,EAAY,YAAc,eAO1B,IAAMK,EAAoB,aACxB,CAAClB,EAAOC,IAAiB,CACvB,GAAM,CAAE,UAAAC,EAAW,GAAGiB,CAAa,EAAInB,EACvC,OACE,gBAACI,EAAc,QAAd,CACE,GAAGe,EACJ,IAAKlB,EACL,UAAWI,EAAW,kBAAmBH,CAAS,EACpD,CAEJ,CACF,EACAgB,EAAY,YAAc",
6
- "names": ["tabs_exports", "__export", "TabsContent", "TabsList", "TabsRoot", "TabsTrigger", "React", "classNames", "TabsPrimitive", "TabsRoot", "props", "forwardedRef", "className", "rootProps", "TabsPrimitive", "classNames", "TabsList", "ownProps", "useThemeSizeProps", "baseTabListPropDefs", "color", "listProps", "extractProps", "TabsTrigger", "children", "triggerProps", "isText", "child", "TabsContent", "contentProps"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/accordion.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\n\nimport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n} from './accordion.props.js';\nimport { ChevronDownIcon } from './icons.js';\nimport { Slottable } from './slot.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type {\n AccordionRootOwnProps,\n AccordionItemOwnProps,\n AccordionHeaderOwnProps,\n AccordionTriggerOwnProps,\n AccordionContentOwnProps,\n} from './accordion.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// Root component\ntype AccordionRootElement = React.ElementRef<typeof AccordionPrimitive.Root>;\n// Radix's Root props are a union of single and multiple. Omit each member on its own, so\n// `defaultValue`, `value` and `collapsible` survive with the right type for each `type`.\ntype AccordionRootRadixProps =\n | Omit<AccordionPrimitive.AccordionSingleProps, 'asChild' | 'color'>\n | Omit<AccordionPrimitive.AccordionMultipleProps, 'asChild' | 'color'>;\n\ntype AccordionRootProps = AccordionRootRadixProps & AccordionRootOwnProps;\n\nconst AccordionRoot = React.forwardRef<AccordionRootElement, AccordionRootProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, accordionRootPropDefs.size);\n const { className, radius, color, ...extractedRadixProps } =\n extractProps(props, accordionRootPropDefs);\n\n const radixProps = extractedRadixProps as React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Root\n >;\n\n // Ensure single accordions can collapse by default unless explicitly set\n if (radixProps.type === 'single' && radixProps.collapsible === undefined) {\n radixProps.collapsible = true;\n }\n\n return (\n <AccordionPrimitive.Root\n {...radixProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionRoot', className)}\n data-accent-color={color}\n data-radius={radius}\n />\n );\n },\n);\nAccordionRoot.displayName = 'Accordion.Root';\n\n// Item component\ntype AccordionItemElement = React.ElementRef<typeof AccordionPrimitive.Item>;\ninterface AccordionItemProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Item, RemovedProps>,\n AccordionItemOwnProps {}\n\nconst AccordionItem = React.forwardRef<AccordionItemElement, AccordionItemProps>(\n (props, forwardedRef) => {\n const { className, ...itemProps } = extractProps(props, accordionItemPropDefs);\n\n return (\n <AccordionPrimitive.Item\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionItem', className)}\n />\n );\n },\n);\nAccordionItem.displayName = 'Accordion.Item';\n\n// Header component\ntype AccordionHeaderElement = React.ElementRef<typeof AccordionPrimitive.Header>;\ninterface AccordionHeaderProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Header, RemovedProps>,\n AccordionHeaderOwnProps {}\n\nconst AccordionHeader = React.forwardRef<AccordionHeaderElement, AccordionHeaderProps>(\n (props, forwardedRef) => {\n const { className, ...headerProps } = extractProps(props, accordionHeaderPropDefs);\n\n return (\n <AccordionPrimitive.Header\n {...headerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionHeader', className)}\n />\n );\n },\n);\nAccordionHeader.displayName = 'Accordion.Header';\n\n// Trigger component\ntype AccordionTriggerElement = React.ElementRef<typeof AccordionPrimitive.Trigger>;\ninterface AccordionTriggerProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Trigger, RemovedProps>,\n AccordionTriggerOwnProps {}\n\nconst AccordionTrigger = React.forwardRef<AccordionTriggerElement, AccordionTriggerProps>(\n ({ children, ...props }, forwardedRef) => {\n const { className, ...triggerProps } = extractProps(props, accordionTriggerPropDefs);\n\n return (\n <AccordionPrimitive.Trigger\n {...triggerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionTrigger', className)}\n >\n <Slottable>{children}</Slottable>\n <ChevronDownIcon className=\"kui-AccordionChevron\" aria-hidden />\n </AccordionPrimitive.Trigger>\n );\n },\n);\nAccordionTrigger.displayName = 'Accordion.Trigger';\n\n// Content component\ntype AccordionContentElement = React.ElementRef<typeof AccordionPrimitive.Content>;\ninterface AccordionContentProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Content, RemovedProps>,\n AccordionContentOwnProps {}\n\nconst AccordionContent = React.forwardRef<AccordionContentElement, AccordionContentProps>(\n (props, forwardedRef) => {\n const { className, children, ...contentProps } = extractProps(props, accordionContentPropDefs);\n\n return (\n <AccordionPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionContent', className)}\n >\n <div className=\"kui-AccordionContentInner\">{children}</div>\n </AccordionPrimitive.Content>\n );\n },\n);\nAccordionContent.displayName = 'Accordion.Content';\n\nexport {\n AccordionRoot as Root,\n AccordionItem as Item,\n AccordionHeader as Header,\n AccordionTrigger as Trigger,\n AccordionContent as Content,\n};\n\nexport type {\n AccordionRootProps as RootProps,\n AccordionItemProps as ItemProps,\n AccordionHeaderProps as HeaderProps,\n AccordionTriggerProps as TriggerProps,\n AccordionContentProps as ContentProps,\n};\n"],
5
- "mappings": ";4QAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,WAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,aAAaC,MAA0B,WAiChD,IAAMC,EAAsB,aAC1B,CAACC,EAAUC,IAAiB,CAC1B,IAAMC,EAAQC,EAAkBH,EAAUI,EAAsB,IAAI,EAC9D,CAAE,UAAAC,EAAW,OAAAC,EAAQ,MAAAC,EAAO,GAAGC,CAAoB,EACvDC,EAAaP,EAAOE,CAAqB,EAErCM,EAAaF,EAKnB,OAAIE,EAAW,OAAS,UAAYA,EAAW,cAAgB,SAC7DA,EAAW,YAAc,IAIzB,gBAACC,EAAmB,KAAnB,CACE,GAAGD,EACJ,IAAKT,EACL,UAAWW,EAAW,oBAAqBP,CAAS,EACpD,oBAAmBE,EACnB,cAAaD,EACf,CAEJ,CACF,EACAP,EAAc,YAAc,iBAQ5B,IAAMc,EAAsB,aAC1B,CAACX,EAAOD,IAAiB,CACvB,GAAM,CAAE,UAAAI,EAAW,GAAGS,CAAU,EAAIL,EAAaP,EAAOa,CAAqB,EAE7E,OACE,gBAACJ,EAAmB,KAAnB,CACE,GAAGG,EACJ,IAAKb,EACL,UAAWW,EAAW,oBAAqBP,CAAS,EACtD,CAEJ,CACF,EACAQ,EAAc,YAAc,iBAQ5B,IAAMG,EAAwB,aAC5B,CAACd,EAAOD,IAAiB,CACvB,GAAM,CAAE,UAAAI,EAAW,GAAGY,CAAY,EAAIR,EAAaP,EAAOgB,CAAuB,EAEjF,OACE,gBAACP,EAAmB,OAAnB,CACE,GAAGM,EACJ,IAAKhB,EACL,UAAWW,EAAW,sBAAuBP,CAAS,EACxD,CAEJ,CACF,EACAW,EAAgB,YAAc,mBAQ9B,IAAMG,EAAyB,aAC7B,CAAC,CAAE,SAAAC,EAAU,GAAGlB,CAAM,EAAGD,IAAiB,CACxC,GAAM,CAAE,UAAAI,EAAW,GAAGgB,CAAa,EAAIZ,EAAaP,EAAOoB,CAAwB,EAEnF,OACE,gBAACX,EAAmB,QAAnB,CACE,GAAGU,EACJ,IAAKpB,EACL,UAAWW,EAAW,uBAAwBP,CAAS,GAEvD,gBAACkB,EAAA,KAAWH,CAAS,EACrB,gBAACI,EAAA,CAAgB,UAAU,uBAAuB,cAAW,GAAC,CAChE,CAEJ,CACF,EACAL,EAAiB,YAAc,oBAQ/B,IAAMM,EAAyB,aAC7B,CAACvB,EAAOD,IAAiB,CACvB,GAAM,CAAE,UAAAI,EAAW,SAAAe,EAAU,GAAGM,CAAa,EAAIjB,EAAaP,EAAOyB,CAAwB,EAE7F,OACE,gBAAChB,EAAmB,QAAnB,CACE,GAAGe,EACJ,IAAKzB,EACL,UAAWW,EAAW,uBAAwBP,CAAS,GAEvD,gBAAC,OAAI,UAAU,6BAA6Be,CAAS,CACvD,CAEJ,CACF,EACAK,EAAiB,YAAc",
6
- "names": ["accordion_exports", "__export", "AccordionContent", "AccordionHeader", "AccordionItem", "AccordionRoot", "AccordionTrigger", "React", "classNames", "AccordionPrimitive", "AccordionRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "accordionRootPropDefs", "className", "radius", "color", "extractedRadixProps", "extractProps", "radixProps", "AccordionPrimitive", "classNames", "AccordionItem", "itemProps", "accordionItemPropDefs", "AccordionHeader", "headerProps", "accordionHeaderPropDefs", "AccordionTrigger", "children", "triggerProps", "accordionTriggerPropDefs", "Slottable", "ChevronDownIcon", "AccordionContent", "contentProps", "accordionContentPropDefs"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/text-area.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { textAreaPropDefs } from './text-area.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextAreaElement = React.ElementRef<'textarea'>;\ntype TextAreaOwnProps = GetPropDefTypes<typeof textAreaPropDefs> & {\n defaultValue?: string;\n value?: string;\n};\ninterface TextAreaProps\n extends ComponentPropsWithout<'textarea', RemovedProps | 'size' | 'value'>,\n TextAreaOwnProps {}\n\nconst TextArea = React.forwardRef<TextAreaElement, TextAreaProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, textAreaPropDefs.size);\n const { className, color, radius, style, ...textAreaProps } =\n extractProps(props, textAreaPropDefs);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby, 'aria-invalid': ariaInvalid } = textAreaProps;\n\n // Invalid when `error` is set or the caller passes aria-invalid; the CSS keys on aria-invalid only.\n const isInvalid = Boolean(textAreaProps.error) || ariaInvalid === true || ariaInvalid === 'true';\n\n // Build aria-describedby string\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (textAreaProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [textAreaProps.errorMessage, ariaDescribedby, errorId]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, ariaInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const {\n error,\n errorMessage,\n required,\n 'aria-describedby': _ariaDescribedby,\n 'aria-labelledby': _ariaLabelledby,\n ...nativeTextAreaProps\n } = textAreaProps;\n\n // The message is a sibling of the painted root, so it sits below the box rather than inside it.\n return (\n <>\n <div\n data-accent-color={color}\n data-radius={radius}\n className={classNames('kui-TextAreaRoot', className, {\n // Not used by the library's CSS (invalid styling keys on aria-invalid); kept as a hook for app styles.\n 'kui-error': isInvalid,\n })}\n style={style}\n >\n <textarea\n className=\"kui-reset kui-TextAreaInput\"\n ref={forwardedRef}\n {...nativeTextAreaProps}\n required={required || undefined}\n {...ariaProps}\n />\n </div>\n {textAreaProps.errorMessage && (\n <div id={errorId} className=\"kui-TextAreaErrorMessage\" role=\"alert\">\n {textAreaProps.errorMessage}\n </div>\n )}\n </>\n );\n});\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],
5
- "mappings": ";mHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAkBvB,IAAMC,EAAiB,aAA2C,CAACC,EAAUC,IAAiB,CAC5F,IAAMC,EAAQC,EAAkBH,EAAUI,EAAiB,IAAI,EACzD,CAAE,UAAAC,EAAW,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,GAAGC,CAAc,EACxDC,EAAaR,EAAOE,CAAgB,EAGhCO,EAAgB,QAAM,EAEtB,CAAE,mBAAoBC,EAAiB,kBAAmBC,EAAgB,eAAgBC,CAAY,EAAIL,EAG1GM,EAAY,EAAQN,EAAc,OAAUK,IAAgB,IAAQA,IAAgB,OAGpFE,EAAoB,UAAQ,IAAM,CACtC,IAAMC,EAAQ,CAAC,EACf,OAAIR,EAAc,cAAcQ,EAAM,KAAKN,CAAO,EAC9CC,GAAiBK,EAAM,KAAKL,CAAe,EACxCK,EAAM,OAAS,EAAIA,EAAM,KAAK,GAAG,EAAI,MAC9C,EAAG,CAACR,EAAc,aAAcG,EAAiBD,CAAO,CAAC,EAGnDO,EAAkB,UACtB,KAAO,CACL,eAAgBH,EAAY,GAAOD,EACnC,mBAAoBE,EACpB,kBAAmBH,CACrB,GACA,CAACE,EAAWD,EAAaE,EAAaH,CAAc,CACtD,EAGM,CACJ,MAAAM,EACA,aAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,kBAAmBC,EACnB,GAAGC,CACL,EAAIf,EAGJ,OACE,gCACE,gBAAC,OACC,oBAAmBH,EACnB,cAAaC,EACb,UAAWkB,EAAW,mBAAoBpB,EAAW,CAEnD,YAAaU,CACf,CAAC,EACD,MAAOP,GAEP,gBAAC,YACC,UAAU,8BACV,IAAKP,EACJ,GAAGuB,EACJ,SAAUH,GAAY,OACrB,GAAGH,EACN,CACF,EACCT,EAAc,cACb,gBAAC,OAAI,GAAIE,EAAS,UAAU,2BAA2B,KAAK,SACzDF,EAAc,YACjB,CAEJ,CAEJ,CAAC,EAEDV,EAAS,YAAc",
6
- "names": ["React", "classNames", "TextArea", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "textAreaPropDefs", "className", "color", "radius", "style", "textAreaProps", "extractProps", "errorId", "ariaDescribedby", "ariaLabelledby", "ariaInvalid", "isInvalid", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeTextAreaProps", "classNames"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/shell.tsx"],
4
- "sourcesContent": ["/**\n * Shell: the app frame.\n *\n * Since 0.8.0 the Shell is built on kookie-ui-v2's model, behind v1's API:\n *\n * - The Root is a CSS grid and renders its children as given, in JSX order.\n * Each pane claims its own grid area, so the Root never scans or reorders\n * children, any child renders, and a pane mounted after the Root works.\n * - State lives on each pane: `auto` (untouched), `open` or `closed`. An\n * untouched pane follows the window, resolved by the\n * stylesheet, so first paint needs no script and no open-state callback\n * fires on mount or on a resize.\n * - A pane is one element at every width. `overlay` is a posture of that\n * element, not a Sheet swapped in: crossing a breakpoint keeps its scroll\n * position, its focus and its children's state.\n * - The Root owns what an overlay needs: one scrim, `inert` on everything\n * else, focus moved in and returned, Escape, and a scroll lock.\n * - Nothing links panes to each other. A Rail closing no longer closes the\n * Panel; an app that wants that writes it in `onOpenChange`.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport type { SidebarPublicProps } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport type { BottomPublicProps } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { InspectorPublicProps } from './_internal/shell-inspector.js';\nimport { usePane, paneAttributes, usePresentationTable } from './_internal/shell-pane.js';\nimport { splitHandles, useResizablePane } from './_internal/shell-resizable.js';\nimport {\n FIXED_TABLE,\n ShellInsetContext,\n ShellStoreContext,\n createShellStore,\n setShellPeek,\n subscribeShellStore,\n useInsetRegistration,\n usePaneEntry,\n useShellStore,\n warnOnce,\n type InsetPaneId,\n} from './_internal/shell-store.js';\nimport { navigationRest, detailRest, toPaneValue, startAnchoredGrowth, withoutRemovedPaneProps } from './_internal/shell-rest.js';\nimport { useShell, useSidebarMode } from './shell.context.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { readBreakpoint } from '../hooks/use-breakpoint.js';\nimport { useThemeSize } from '../helpers/theme-size.js';\nimport { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext } from './_internal/pane-chrome.js';\nimport type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';\n\n/* \u2500\u2500 Root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n height?: 'full' | 'auto' | string | number;\n /** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Defaults to the nearest Theme's size (3 when the Theme is 4), else `2`. */\n size?: PaneSize;\n}\n\n/**\n * Every Shell with a live overlay holds the page still, counted across Shells,\n * through an attribute the stylesheet reads. Saving and restoring the\n * document's inline `overflow` would fight any other scroll lock on the page.\n */\nlet pageLockHolders = 0;\nfunction updatePageLock(delta: 1 | -1) {\n pageLockHolders = Math.max(0, pageLockHolders + delta);\n const doc = document.documentElement;\n if (pageLockHolders > 0) doc.setAttribute('data-kui-shell-lock', '');\n else doc.removeAttribute('data-kui-shell-lock');\n}\n\n/** Marks a child the Root made inert, so closing removes only what the Root added. */\nconst INERT_MARK = 'data-kui-shell-inert';\n\n/** How many frames a focus rescue watches after an overlay opens or closes. */\nconst RESCUE_FRAMES = 30;\n\n/** Focus that is nowhere useful: the document, or nothing at all. */\nfunction isNowhere(doc: Document, el: Element | EventTarget | null): boolean {\n return el === null || el === doc || el === doc.body || el === doc.documentElement;\n}\n\n/** A Trigger that drives the pane with this id and can take focus, optionally only inside `within`. */\nfunction triggerFor(doc: Document, id: string, within?: HTMLElement[]): HTMLElement | null {\n for (const el of doc.querySelectorAll<HTMLElement>('[data-shell-trigger][aria-controls]')) {\n if (el.getAttribute('aria-controls') !== id || el.closest('[inert]')) continue;\n if (within && !within.some((pane) => pane.contains(el))) continue;\n return el;\n }\n return null;\n}\n\ntype LivePane = { name: PaneName; id: string; el: HTMLElement };\n\n/** Shell.Root's own range; a Theme size above it maps to 3. */\nconst shellSizePropDef = { values: ['1', '2', '3'] as const };\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', size: sizeProp, style, onKeyDown, onFocus, ...props }, ref) => {\n // No size of its own: the nearest Theme's, mapped into 1-3.\n const size = useThemeSize(sizeProp, shellSizePropDef);\n const [store] = React.useState(createShellStore);\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n // Subscribed for the re-render, not for a value: a pane opening or closing\n // must bring the Root back so containment and the scrim follow it.\n React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, rootRef);\n\n // Inset: the Root paints the backdrop while any pane is inset.\n const [insetPanes, setInsetPanes] = React.useState<ReadonlySet<InsetPaneId>>(() => new Set());\n const registerInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => (prev.has(id) ? prev : new Set(prev).add(id)));\n }, []);\n const unregisterInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, []);\n const insetContext = React.useMemo(() => ({ registerInset, unregisterInset }), [registerInset, unregisterInset]);\n\n const closeOverlays = React.useCallback(() => {\n for (const entry of store.entries.values()) {\n if (entry.overlayLive) entry.setValue('closed', 'dismiss');\n }\n }, [store]);\n\n const livePanes = React.useCallback(\n (): LivePane[] => [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).map((entry) => ({ name: entry.name, id: entry.id, el: entry.el as HTMLElement })),\n [store],\n );\n const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;\n\n // A Shell given a height of its own sits inside a page, and its overlays\n // cover only its box: it holds no page lock. `full` is the page, and\n // `auto` grows with its content, so its overlays are placed on the window.\n const contained = height !== 'full' && height !== 'auto';\n\n /*\n * Containment is the Root's, not the pane's. Only the Root can see every live\n * overlay and every child at once. A per-pane effect, given two overlays,\n * inerts the other live overlay and restores values the other effect wrote,\n * which can leave the whole frame inert for good.\n *\n * Exempt are the scrim and each root child that CONTAINS a live overlay, so\n * a pane wrapped in a plain element is not inerted with its wrapper. A child\n * the Root inerts is marked, and closing clears only marked children, so\n * `inert` the app sets on a child is the app's before, during and after.\n */\n const contain = React.useCallback(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const liveEls = livePanes().map((pane) => pane.el);\n for (const child of rootEl.children) {\n if (!(child instanceof HTMLElement) || child.classList.contains('kui-ShellScrim')) continue;\n const holdsLive = liveEls.some((el) => child === el || child.contains(el));\n if (liveEls.length === 0 || holdsLive) {\n if (child.hasAttribute(INERT_MARK)) {\n child.removeAttribute(INERT_MARK);\n child.inert = false;\n }\n } else if (!child.inert) {\n child.setAttribute(INERT_MARK, '');\n child.inert = true;\n }\n }\n }, [livePanes]);\n\n const returnFocusTo = React.useRef<HTMLElement | null>(null);\n const lastLive = React.useRef<LivePane[]>([]);\n const lastFocusInRoot = React.useRef<HTMLElement | null>(null);\n const holdsLock = React.useRef(false);\n\n /*\n * Focus can be taken away after the commit that moved it: a menu that\n * opened or closed a pane restores focus to its own trigger when it\n * finishes closing, which may be inert or hidden by then. For a few frames\n * after an overlay opens or closes, focus that ends up nowhere useful is\n * put back where it belongs.\n */\n const rescueFrame = React.useRef(0);\n const cancelRescue = React.useCallback(() => {\n if (rescueFrame.current) cancelAnimationFrame(rescueFrame.current);\n rescueFrame.current = 0;\n }, []);\n const rescueFocus = React.useCallback(\n (target: HTMLElement, lost: (active: Element | null) => boolean) => {\n cancelRescue();\n let frames = 0;\n const tick = () => {\n rescueFrame.current = 0;\n if (!target.isConnected) return;\n if (lost(target.ownerDocument.activeElement)) {\n target.focus({ preventScroll: true });\n return;\n }\n frames += 1;\n if (frames < RESCUE_FRAMES) rescueFrame.current = requestAnimationFrame(tick);\n };\n rescueFrame.current = requestAnimationFrame(tick);\n },\n [cancelRescue],\n );\n\n React.useEffect(\n () => () => {\n cancelRescue();\n if (holdsLock.current) {\n holdsLock.current = false;\n updatePageLock(-1);\n }\n },\n [cancelRescue],\n );\n\n // No dependency array, on purpose: a pane opening or closing is a render\n // of this component, and so is a child appearing through the Root.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const doc = rootEl.ownerDocument;\n const live = livePanes();\n const liveEls = live.map((pane) => pane.el);\n\n const wantsLock = !contained && live.length > 0;\n if (wantsLock !== holdsLock.current) {\n holdsLock.current = wantsLock;\n updatePageLock(wantsLock ? 1 : -1);\n }\n\n const previous = lastLive.current;\n lastLive.current = live;\n // A pane that left the live set because it closed, as opposed to one\n // that is still open but stopped being an overlay at a breakpoint.\n const closed = previous.filter((pane) => {\n if (liveEls.includes(pane.el)) return false;\n const entry = store.entries.get(pane.name);\n return !pane.el.isConnected || !entry || entry.el !== pane.el || entry.value === 'closed';\n });\n const inClosed = (active: Element | null) => active !== null && closed.some((pane) => pane.el.contains(active));\n\n // The return target is taken on the opening edge, before inerting: inerting\n // the subtree that holds the trigger blurs it. Focus already inside the\n // overlay (a pane that became one at a breakpoint) is no place to return\n // to, and an opener in a portal (a menu item) goes away with its menu, so\n // the last place focus held inside the frame stands in for it.\n if (previous.length === 0 && live.length > 0) {\n const active = doc.activeElement;\n let target = active instanceof HTMLElement && !isNowhere(doc, active) && !liveEls.some((el) => el.contains(active)) ? active : null;\n if (target && !rootEl.contains(target)) {\n const inRoot = lastFocusInRoot.current;\n if (inRoot && inRoot.isConnected && !liveEls.some((el) => el.contains(inRoot))) target = inRoot;\n }\n returnFocusTo.current = target;\n }\n\n contain();\n\n if (live.length === 0) {\n const before = returnFocusTo.current;\n returnFocusTo.current = null;\n // Every overlay that left only stopped being one: focus stays where it is.\n if (closed.length === 0) return;\n const usable = (el: HTMLElement | null) => el !== null && el.isConnected && !el.closest('[inert]') && !inClosed(el);\n let target = usable(before) ? before : null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id);\n if (!target) return;\n const lost = (active: Element | null) => isNowhere(doc, active) || inClosed(active);\n if (lost(doc.activeElement)) target.focus({ preventScroll: true });\n else rescueFocus(target, lost);\n return;\n }\n\n // Some overlays closed while others stay: focus left in a closed one goes\n // to the Trigger that opened it, if a live pane holds it, or to the pane\n // on top.\n if (closed.length > 0) {\n const active = doc.activeElement;\n if (isNowhere(doc, active) || inClosed(active)) {\n let target: HTMLElement | null = null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id, liveEls);\n (target ?? liveEls[liveEls.length - 1]).focus({ preventScroll: true });\n }\n }\n\n // Focus moves in on the opening edge and nowhere else, and only when it\n // is not already somewhere the user put it inside the live set.\n const opened = liveEls.filter((el) => !previous.some((pane) => pane.el === el));\n const active = doc.activeElement;\n if (opened.length > 0 && !liveEls.some((el) => el.contains(active))) {\n opened[0].focus({ preventScroll: true });\n rescueFocus(opened[0], (now) => isNowhere(doc, now) || (now instanceof Element && now.closest('[inert]') !== null));\n }\n });\n\n // A child that appears through its own state while an overlay is live does\n // not render the Root, so the Root watches its children while one is.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0 || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(contain);\n observer.observe(rootEl, { childList: true, subtree: true, attributes: true, attributeFilter: ['inert'] });\n return () => observer.disconnect();\n }, [liveCount, contain]);\n\n /*\n * Escape closes the overlays. It is handled as a React event on the Root, so\n * a component inside a pane that answers Escape in its own onKeyDown runs\n * first, and its preventDefault() or stopPropagation() keeps the pane open.\n * When the Root closes something it stops the event there, so a React\n * Escape handler above the Shell does not act on it too. A layer that\n * listens on the document in the capture phase (Radix dialogs, menus and\n * popovers) answers first and calls preventDefault() when it closes, so an\n * enclosing Kookie Dialog closes before a Shell inside it is asked.\n */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'Escape' || event.defaultPrevented || liveCount === 0) return;\n closeOverlays();\n event.stopPropagation();\n };\n\n // With focus on the document itself (a pane closed under it, or a menu that\n // closed and took focus with it), the Root never sees the key. While an\n // overlay is live the document answers that one case.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0) return;\n const doc = rootEl.ownerDocument;\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented || !isNowhere(doc, event.target)) return;\n closeOverlays();\n };\n doc.addEventListener('keydown', onDocumentKeyDown);\n return () => doc.removeEventListener('keydown', onDocumentKeyDown);\n }, [liveCount, closeOverlays]);\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n onFocus?.(event);\n if (event.target instanceof HTMLElement && rootRef.current?.contains(event.target)) lastFocusInRoot.current = event.target;\n };\n\n // A floating Panel sits beside the Rail when the Rail is showing, and\n // beside its card when the Rail is inset.\n const rail = store.entries.get('rail');\n const railShown = rail !== undefined && rail.value !== undefined && rail.value !== 'closed';\n const railOffset = railShown ? (insetPanes.has('rail') ? `calc(${rail.size}px + 2 * var(--shell-inset-gap))` : `${rail.size}px`) : undefined;\n\n // `full` writes no inline height: the stylesheet states it as 100vh with a\n // 100dvh override where supported, and an inline value would beat both.\n const heightStyle: React.CSSProperties = height === 'full' ? {} : height === 'auto' ? { height: 'auto' } : typeof height === 'number' ? { height: `${height}px` } : { height };\n\n return (\n <ShellStoreContext.Provider value={store}>\n <ShellSizeContext.Provider value={size}>\n <ShellContentContext.Provider value={false}>\n <ShellInsetContext.Provider value={insetContext}>\n {/* The Root is not a widget: it hears Escape bubbling up from the panes,\n after their own handlers, to close the overlays. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n {...props}\n ref={composedRef}\n className={classNames('kui-ShellRoot', className)}\n data-height={height === 'auto' ? 'auto' : undefined}\n data-has-inset={insetPanes.size > 0 || undefined}\n data-overlay-live={liveCount > 0 || undefined}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n style={{ ...heightStyle, ...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}), ...style }}\n >\n {children}\n {/* Root-owned and always mounted. The stylesheet shows it while an\n overlay is live; containment takes the rest of the frame out of\n the accessibility tree, so the scrim itself is hidden from it. */}\n <div className=\"kui-ShellScrim\" aria-hidden onClick={closeOverlays} />\n </div>\n </ShellInsetContext.Provider>\n </ShellContentContext.Provider>\n </ShellSizeContext.Provider>\n </ShellStoreContext.Provider>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = 64, style, ...props }, ref) => (\n <header\n {...props}\n ref={ref}\n className={classNames('kui-ShellHeader', className)}\n style={\n {\n ...style,\n '--shell-header-height': `${height}px`,\n } as CSSPropertiesWithVars\n }\n />\n));\nHeader.displayName = 'Shell.Header';\n\n/* \u2500\u2500 Left (deprecated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, meta: { reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss' }) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n inset?: boolean;\n}\n\n/**\n * @deprecated The Root no longer wraps the Rail and Panel in a Left\n * container: each is its own pane. `Shell.Left` renders its children and\n * ignores its own props. Removed in 1.0.\n */\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(({ children }, _ref) => {\n React.useEffect(() => {\n warnOnce('Shell.Left is deprecated and is removed in 1.0. Render Shell.Rail and Shell.Panel directly in Shell.Root.');\n }, []);\n return <>{children}</>;\n});\nLeft.displayName = 'Shell.Left';\n\n/* \u2500\u2500 Rail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype RailOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss' };\n\ntype RailControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; defaultOpen?: never };\ntype RailUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; open?: never };\n\ntype RailProps = React.ComponentPropsWithoutRef<'div'> & {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. */\n onCollapse?: () => void;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (RailControlledProps | RailUncontrolledProps);\n\nconst RAIL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>((props, ref) => {\n const { className, presentation, expandedSize = 64, collapsible: _collapsible, onExpand, onCollapse, children, style, open, defaultOpen, onOpenChange, inset, id, ...domProps } = props;\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'rail',\n label: 'Rail',\n propNames: RAIL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('rail', inset);\n const composedRef = useComposedRefs(ref, pane.setElement);\n\n return (\n <div\n {...domProps}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellRail', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={{ ...style, '--rail-size': `${expandedSize}px` } as CSSPropertiesWithVars}\n >\n <RailContent>{children}</RailContent>\n </div>\n );\n});\nRail.displayName = 'Shell.Rail';\n\n/** The Rail's content carries the index, so the thin row styles can size themselves by it. */\nfunction RailContent({ children }: { children: React.ReactNode }) {\n const size = React.useContext(ShellSizeContext);\n return (\n <div className={classNames('kui-ShellRailContent', `kui-r-size-${size}`)}>\n <PaneChromeScope presentation=\"thin\">{children}</PaneChromeScope>\n </div>\n );\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelOpenChangeMeta = { reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss' };\ntype PanelControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; defaultOpen?: never };\ntype PanelUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; open?: never };\n\ntype PanelSizeControlledProps = { size: number | string; defaultSize?: never };\ntype PanelSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\n\ntype PanelSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype PanelPublicProps = PaneBaseProps &\n (PanelControlledProps | PanelUncontrolledProps) &\n (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\ntype PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {\n Handle: HandleComponent;\n};\n\nconst PANEL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/**\n * A Panel with a `presentation` of its own uses it. One without follows the\n * Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet\n * reads the Rail's attributes for the first paint and the registry carries\n * the Rail's table for the JS mirror.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) => {\n const {\n className,\n presentation,\n defaultOpen,\n open,\n onOpenChange,\n size,\n defaultSize,\n expandedSize = 288,\n minSize = 100,\n maxSize = 800,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n const store = useShellStore('Shell.Panel');\n const rail = usePaneEntry(store, 'rail');\n const own = usePresentationTable(presentation, 'fixed');\n const followsRail = presentation === undefined;\n const presentationTable = followsRail ? (rail?.presentationTable ?? FIXED_TABLE) : own.table;\n const presentationAttributes = followsRail ? { 'data-presentation-follows': '' } : own.attributes;\n\n const pane = usePane({\n name: 'panel',\n label: 'Panel',\n propNames: PANEL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('panel', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Panel: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'panel',\n elementId: pane.id,\n elementRef,\n cssVarName: '--panel-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n // Asked when the effect runs: the Rail registers its table after this\n // Panel first renders, so the render's answer can be out of date.\n overlayingNow: () => {\n const table = followsRail ? (store.entries.get('rail')?.presentationTable ?? FIXED_TABLE) : own.table;\n return table[readBreakpoint()] === 'overlay';\n },\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, PanelHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellPanel', className)}\n {...paneAttributes(pane, presentationAttributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--panel-expanded-size': `${expandedSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellPanelContent\">\n <PaneChromeScope>{content}</PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n/* \u2500\u2500 Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n}\n\n/**\n * The work area. It scrolls as it is; with a `Shell.Scroll` child it becomes a column and the\n * Scroll scrolls instead, so a `Shell.PaneHeader float` beside it stays pinned over the page.\n */\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, inset, children, ...props }, ref) => {\n useInsetRegistration('content', inset);\n return (\n <main {...props} ref={ref} className={classNames('kui-ShellContent', className)} data-inset={inset || undefined}>\n <ShellContentContext.Provider value={true}>{children}</ShellContentContext.Provider>\n </main>\n );\n});\nContent.displayName = 'Shell.Content';\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Renders the single child in place of the trigger's own button, with the trigger's click,\n * `aria-controls`, `aria-expanded` and data attributes merged onto it. Use it to make a\n * `Button` the trigger: `<Shell.Trigger asChild><Button iconOnly aria-label=\"Toggle sidebar\">\u2026</Button></Shell.Trigger>`.\n */\n asChild?: boolean;\n /**\n * Whether to show a preview of the target pane on hover while it is closed\n * and not an overlay. Defaults to false.\n *\n * @deprecated Removed in 1.0. A preview reachable only by mouse hover has no\n * keyboard or touch equivalent; open the pane instead.\n */\n peekOnHover?: boolean;\n}\n\n/**\n * A button that drives a pane by name, through the registry. It sets\n * `aria-controls` and `aria-expanded` (left off while an untouched pane\n * cannot know its state yet), renders `type=\"button\"`, and runs the\n * consumer's `onClick` first: calling `preventDefault()` there cancels it. With `asChild` the\n * child is the button, and its own `type` stands.\n */\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, asChild = false, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const store = useShellStore('Shell.Trigger');\n React.useEffect(() => {\n if (target === 'left') warnOnce('Shell.Trigger target=\"left\" is deprecated and is removed in 1.0. Use target=\"rail\".');\n if (peekOnHover) warnOnce('Shell.Trigger: `peekOnHover` is deprecated and is removed in 1.0.');\n }, [target, peekOnHover]);\n const name: PaneName = target === 'left' ? 'rail' : target;\n // Subscribes to its own pane only.\n const entry = usePaneEntry(store, name);\n const shown = entry?.value === undefined ? undefined : entry.value !== 'closed';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented) return;\n const current = store.entries.get(name);\n if (!current) return;\n if (store.peek === name) setShellPeek(store, null);\n if (action === 'toggle') current.toggle('toggle');\n else if (action === 'expand') current.setValue('open', 'toggle');\n else current.setValue('closed', 'toggle');\n };\n\n const handleMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover) return;\n const current = store.entries.get(name);\n if (current && current.value === 'closed' && current.presentation !== 'overlay') setShellPeek(store, name);\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (peekOnHover && store.peek === name) setShellPeek(store, null);\n };\n\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n // A button's default type is `submit`. Stated before the spread, so a consumer's own wins.\n // An asChild child states its own (Button already says `button`; a link has none), so the\n // key is left off rather than passed as undefined.\n {...(!asChild && { type: 'button' as const })}\n aria-controls={entry?.id}\n aria-expanded={shown}\n {...props}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-shell-trigger={target}\n data-shell-action={action}\n >\n {children}\n </Comp>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n PaneHeader,\n PaneFooter,\n Scroll,\n useShell,\n useSidebarMode,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n type ShellRootProps as RootProps,\n type ShellHeaderProps as HeaderProps,\n type RailProps,\n type PanelPublicProps as PanelProps,\n type SidebarPublicProps as SidebarProps,\n type ShellContentProps as ContentProps,\n type InspectorPublicProps as InspectorProps,\n type BottomPublicProps as BottomProps,\n type TriggerProps,\n type PaneHeaderProps,\n type PaneFooterProps,\n type ScrollProps,\n};\n"],
5
- "mappings": ";sxBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,GAAA,YAAAC,GAAA,WAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,YAAAC,GAAA,8BAAAC,GAAA,aAAAC,GAAA,mBAAAC,KAsBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,OAAY,WACrB,OAAS,mBAAAC,OAAuB,oBA+ChC,IAAIC,GAAkB,EACtB,SAASC,GAAeC,EAAe,CACrCF,GAAkB,KAAK,IAAI,EAAGA,GAAkBE,CAAK,EACrD,IAAMC,EAAM,SAAS,gBACjBH,GAAkB,EAAGG,EAAI,aAAa,sBAAuB,EAAE,EAC9DA,EAAI,gBAAgB,qBAAqB,CAChD,CAGA,IAAMC,GAAa,uBAGbC,GAAgB,GAGtB,SAASC,EAAUH,EAAeI,EAA2C,CAC3E,OAAOA,IAAO,MAAQA,IAAOJ,GAAOI,IAAOJ,EAAI,MAAQI,IAAOJ,EAAI,eACpE,CAGA,SAASK,GAAWL,EAAeM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EAE9ChB,EAAQyF,GAAazG,EAAOqI,CAAI,EAChCC,EAAQtH,GAAO,QAAU,OAAY,OAAYA,EAAM,QAAU,SAEjEuH,EAAevF,GAA+C,CAElE,GADAkF,IAAUlF,CAAK,EACXA,EAAM,iBAAkB,OAC5B,IAAMwF,EAAUxI,EAAM,QAAQ,IAAIqI,CAAI,EACjCG,IACDxI,EAAM,OAASqI,GAAMI,GAAazI,EAAO,IAAI,EAC7C+H,IAAW,SAAUS,EAAQ,OAAO,QAAQ,EACvCT,IAAW,SAAUS,EAAQ,SAAS,OAAQ,QAAQ,EAC1DA,EAAQ,SAAS,SAAU,QAAQ,EAC1C,EAEME,EAAoB1F,GAA+C,CAEvE,GADAmF,IAAenF,CAAK,EAChB,CAACgF,EAAa,OAClB,IAAMQ,EAAUxI,EAAM,QAAQ,IAAIqI,CAAI,EAClCG,GAAWA,EAAQ,QAAU,UAAYA,EAAQ,eAAiB,WAAWC,GAAazI,EAAOqI,CAAI,CAC3G,EAEMM,EAAoB3F,GAA+C,CACvEoF,IAAepF,CAAK,EAChBgF,GAAehI,EAAM,OAASqI,GAAMI,GAAazI,EAAO,IAAI,CAClE,EAEM4I,EAAOX,EAAUY,GAAK,KAAO,SACnC,OACE,gBAACD,EAAA,CAIE,GAAI,CAACX,GAAW,CAAE,KAAM,QAAkB,EAC3C,gBAAejH,GAAO,GACtB,gBAAesH,EACd,GAAG1I,EACJ,IAAKC,EACL,QAAS0I,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoB3G,EACpB,oBAAmB+F,GAElBzI,CACH,CAEJ,CAAC,EACDwI,GAAQ,YAAc",
6
- "names": ["shell_exports", "__export", "Bottom", "Content", "Header", "Inspector", "Left", "PaneFooter", "PaneHeader", "Panel", "Rail", "Root", "Scroll", "Sidebar", "Trigger", "useResponsivePresentation", "useShell", "useSidebarMode", "React", "classNames", "Slot", "useComposedRefs", "pageLockHolders", "updatePageLock", "delta", "doc", "INERT_MARK", "RESCUE_FRAMES", "isNowhere", "el", "triggerFor", "id", "within", "pane", "shellSizePropDef", "Root", "className", "children", "height", "sizeProp", "style", "onKeyDown", "onFocus", "props", "ref", "size", "useThemeSize", "store", "createShellStore", "subscribe", "listener", "subscribeShellStore", "rootRef", "composedRef", "useComposedRefs", "insetPanes", "setInsetPanes", "registerInset", "prev", "unregisterInset", "next", "insetContext", "closeOverlays", "entry", "livePanes", "liveCount", "contained", "contain", "rootEl", "liveEls", "child", "holdsLive", "returnFocusTo", "lastLive", "lastFocusInRoot", "holdsLock", "rescueFrame", "cancelRescue", "rescueFocus", "target", "lost", "frames", "tick", "live", "wantsLock", "previous", "closed", "inClosed", "active", "inRoot", "before", "opened", "now", "observer", "handleKeyDown", "event", "onDocumentKeyDown", "handleFocus", "rail", "railOffset", "heightStyle", "ShellStoreContext", "ShellSizeContext", "ShellContentContext", "ShellInsetContext", "classNames", "Header", "Left", "_ref", "RAIL_PROP_NAMES", "Rail", "presentation", "expandedSize", "_collapsible", "onExpand", "onCollapse", "open", "defaultOpen", "onOpenChange", "inset", "domProps", "table", "attributes", "usePresentationTable", "usePane", "toPaneValue", "navigationRest", "value", "reason", "useInsetRegistration", "paneAttributes", "RailContent", "PaneChromeScope", "PANEL_PROP_NAMES", "Panel", "defaultSize", "minSize", "maxSize", "resizable", "collapsible", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "useShellStore", "usePaneEntry", "own", "followsRail", "presentationTable", "FIXED_TABLE", "presentationAttributes", "detailRest", "elementRef", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "PanelHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "Content", "Trigger", "action", "peekOnHover", "asChild", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave", "Comp", "Slot"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/dialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nDialogTrigger.displayName = 'Dialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = dialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>, DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n // Cleanup stuck pointer-events on body\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-DialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${alignClassName}`}>\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-BaseDialogContent', 'kui-DialogContent', className)}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n document.body.style.pointerEvents = '';\n }}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </Theme>\n </DialogPrimitive.Portal>\n );\n});\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>((props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>((props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = 'Dialog.Close';\n\nexport { DialogRoot as Root, DialogTrigger as Trigger, DialogContent as Content, DialogTitle as Title, DialogDescription as Description, DialogClose as Close };\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
5
- "mappings": ";wWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAe1C,IAAMC,EAAyCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EAChGD,EAAW,YAAc,cAIzB,IAAMG,EAAsB,aAAqD,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IACxG,gBAACH,EAAgB,QAAhB,CAAyB,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAC3DC,EAAoBF,CAAQ,CAC/B,CACD,EACDD,EAAc,YAAc,iBAK5B,GAAM,CAAE,MAAOI,EAAc,GAAGC,CAAgB,EAAIC,EAC9CC,EAAgB,CAAE,MAAOH,CAAa,EAMtCI,EAAsB,aAAqD,CAAC,CAAE,MAAAC,EAAO,GAAGC,CAAS,EAAGR,IAAiB,CACzH,IAAMJ,EAAQa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,EAAc,QAAO,IACzDC,EAAoBF,CAAQ,CAC/B,CACD,EACD0B,EAAY,YAAc",
6
- "names": ["dialog_exports", "__export", "DialogClose", "DialogContent", "DialogDescription", "DialogRoot", "DialogTitle", "DialogTrigger", "React", "classNames", "DialogPrimitive", "DialogRoot", "props", "DialogPrimitive", "DialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "dialogContentPropDefs", "alignPropDefs", "DialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "useBodyPointerEventsCleanup", "Theme", "classNames", "event", "DialogTitle", "Heading", "DialogDescription", "Text", "DialogClose"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/alert-dialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\n\nimport { alertDialogContentPropDefs } from './alert-dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { AlertDialogContentOwnProps } from './alert-dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface AlertDialogRootProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root> {}\nconst AlertDialogRoot: React.FC<AlertDialogRootProps> = (props) => <AlertDialogPrimitive.Root {...props} />;\nAlertDialogRoot.displayName = 'AlertDialog.Root';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof AlertDialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Trigger, RemovedProps> {}\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Trigger>\n));\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = alertDialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype AlertDialogContentElement = React.ElementRef<typeof AlertDialogPrimitive.Content>;\ninterface AlertDialogContentProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Content, RemovedProps>, AlertDialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Portal>['container'];\n}\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n // Same stuck pointer-events fallback as Dialog and Sheet.\n useBodyPointerEventsCleanup();\n\n return (\n <AlertDialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <AlertDialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-AlertDialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-AlertDialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-AlertDialogScrollPadding ${alignClassName}`}>\n <AlertDialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-BaseDialogContent', 'kui-AlertDialogContent', className)}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n document.body.style.pointerEvents = '';\n }}\n />\n </div>\n </div>\n </AlertDialogPrimitive.Overlay>\n </Theme>\n </AlertDialogPrimitive.Portal>\n );\n});\nAlertDialogContent.displayName = 'AlertDialog.Content';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof Heading>;\ntype AlertDialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>((props, forwardedRef) => (\n <AlertDialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialog.Title';\n\ntype AlertDialogDescriptionElement = HTMLParagraphElement;\ntype AlertDialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst AlertDialogDescription = React.forwardRef<AlertDialogDescriptionElement, AlertDialogDescriptionProps>((props, forwardedRef) => (\n <AlertDialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialog.Description';\n\ntype AlertDialogActionElement = React.ElementRef<typeof AlertDialogPrimitive.Action>;\ninterface AlertDialogActionProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Action, RemovedProps> {}\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Action>\n));\nAlertDialogAction.displayName = 'AlertDialog.Action';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof AlertDialogPrimitive.Cancel>;\ninterface AlertDialogCancelProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Cancel, RemovedProps> {}\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Cancel>\n));\nAlertDialogCancel.displayName = 'AlertDialog.Cancel';\n\nexport {\n AlertDialogRoot as Root,\n AlertDialogTrigger as Trigger,\n AlertDialogContent as Content,\n AlertDialogTitle as Title,\n AlertDialogDescription as Description,\n AlertDialogAction as Action,\n AlertDialogCancel as Cancel,\n};\n\nexport type {\n AlertDialogRootProps as RootProps,\n AlertDialogTriggerProps as TriggerProps,\n AlertDialogContentProps as ContentProps,\n AlertDialogTitleProps as TitleProps,\n AlertDialogDescriptionProps as DescriptionProps,\n AlertDialogActionProps as ActionProps,\n AlertDialogCancelProps as CancelProps,\n};\n"],
5
- "mappings": ";wWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,WAAAC,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WAepD,IAAMC,EAAmDC,GAAU,gBAACC,EAAqB,KAArB,CAA2B,GAAGD,EAAO,EACzGD,EAAgB,YAAc,mBAI9B,IAAMG,EAA2B,aAA+D,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IACvH,gBAACH,EAAqB,QAArB,CAA8B,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAChEC,EAAoBF,CAAQ,CAC/B,CACD,EACDD,EAAmB,YAAc,sBAKjC,GAAM,CAAE,MAAOI,EAAc,GAAGC,CAAgB,EAAIC,EAC9CC,EAAgB,CAAE,MAAOH,CAAa,EAMtCI,EAA2B,aAA+D,CAAC,CAAE,MAAAC,EAAO,GAAGC,CAAS,EAAGR,IAAiB,CACxI,IAAMJ,EAAQa,EAAkBD,EAAUL,EAAgB,IAAI,EACxD,CAAE,UAAWO,CAAe,EAAIC,EAAa,CAAE,MAAAJ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AA0B,aAA6D,CAAC,CAAE,SAAA3B,EAAU,GAAGH,CAAM,EAAGI,IACpH,gBAACH,EAAqB,OAArB,CAA6B,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAC/DC,EAAoBF,CAAQ,CAC/B,CACD,EACD2B,EAAkB,YAAc",
6
- "names": ["alert_dialog_exports", "__export", "AlertDialogAction", "AlertDialogCancel", "AlertDialogContent", "AlertDialogDescription", "AlertDialogRoot", "AlertDialogTitle", "AlertDialogTrigger", "React", "classNames", "AlertDialogPrimitive", "AlertDialogRoot", "props", "AlertDialogPrimitive", "AlertDialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "alertDialogContentPropDefs", "alignPropDefs", "AlertDialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "useBodyPointerEventsCleanup", "Theme", "classNames", "event", "AlertDialogTitle", "Heading", "AlertDialogDescription", "Text", "AlertDialogAction", "AlertDialogCancel"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/card.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { cardPropDefs } from './card.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype CardElement = React.ElementRef<'div'>;\ntype CardOwnProps = GetPropDefTypes<typeof cardPropDefs>;\ninterface CardProps extends ComponentPropsWithout<'div', RemovedProps>, CardOwnProps {}\nconst Card = React.forwardRef<CardElement, CardProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, cardPropDefs.size);\n const { asChild, className, ...cardProps } = extractProps(props, cardPropDefs);\n const Comp = asChild ? Slot.Root : 'div';\n return (\n <Comp\n ref={forwardedRef}\n {...cardProps}\n className={classNames('kui-reset', 'kui-BaseCard', 'kui-Card', 'kui-SurfaceNest', className)}\n />\n );\n});\nCard.displayName = 'Card';\n\nexport { Card };\nexport type { CardProps };\n"],
5
- "mappings": ";wHAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAYrB,IAAMC,EAAa,aAAmC,CAACC,EAAUC,IAAiB,CAChF,IAAMC,EAAQC,EAAkBH,EAAUI,EAAa,IAAI,EACrD,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAU,EAAIC,EAAaN,EAAOE,CAAY,EACvEK,EAAOJ,EAAUK,EAAK,KAAO,MACnC,OACE,gBAACD,EAAA,CACC,IAAKR,EACJ,GAAGM,EACJ,UAAWI,EAAW,YAAa,eAAgB,WAAY,kBAAmBL,CAAS,EAC7F,CAEJ,CAAC,EACDP,EAAK,YAAc",
6
- "names": ["React", "classNames", "Slot", "Card", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "cardPropDefs", "asChild", "className", "cardProps", "extractProps", "Comp", "Slot", "classNames"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/navbar.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 '../helpers/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"],
5
- "mappings": ";wMAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,eAAAC,EAAA,SAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aAqCvB,IAAMC,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", "NavbarRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "navbarRootPropDefs", "children", "className", "rootProps", "extractProps", "position", "size", "classNames", "NavbarLogo", "gap", "align", "justify", "ref", "Flex", "NavbarNavigation", "NavbarActions"]
7
- }