@womp/kookie-ui 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (663) hide show
  1. package/codemods/type-0.20.py +73 -0
  2. package/components.css +1637 -3765
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +2 -2
  5. package/dist/cjs/components/_internal/base-menu.props.d.ts +2 -2
  6. package/dist/cjs/components/_internal/base-menu.props.js +1 -1
  7. package/dist/cjs/components/_internal/base-menu.props.js.map +2 -2
  8. package/dist/cjs/components/_internal/base-menu.utils.d.ts.map +1 -1
  9. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  10. package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
  11. package/dist/cjs/components/_internal/menu-context.d.ts +5 -2
  12. package/dist/cjs/components/_internal/menu-context.d.ts.map +1 -1
  13. package/dist/cjs/components/_internal/menu-context.js +1 -1
  14. package/dist/cjs/components/_internal/menu-context.js.map +2 -2
  15. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  16. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  17. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  18. package/dist/cjs/components/_internal/shell-sidebar.js.map +2 -2
  19. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  20. package/dist/cjs/components/alert-dialog.js +1 -1
  21. package/dist/cjs/components/alert-dialog.js.map +3 -3
  22. package/dist/cjs/components/alert-dialog.props.d.ts +1 -2
  23. package/dist/cjs/components/alert-dialog.props.d.ts.map +1 -1
  24. package/dist/cjs/components/alert-dialog.props.js +1 -1
  25. package/dist/cjs/components/alert-dialog.props.js.map +2 -2
  26. package/dist/cjs/components/avatar.js +1 -1
  27. package/dist/cjs/components/avatar.js.map +2 -2
  28. package/dist/cjs/components/badge.js +1 -1
  29. package/dist/cjs/components/badge.js.map +2 -2
  30. package/dist/cjs/components/blockquote.js +1 -1
  31. package/dist/cjs/components/blockquote.js.map +2 -2
  32. package/dist/cjs/components/blockquote.props.d.ts +2 -2
  33. package/dist/cjs/components/blockquote.props.js +1 -1
  34. package/dist/cjs/components/blockquote.props.js.map +2 -2
  35. package/dist/cjs/components/box.js +1 -1
  36. package/dist/cjs/components/box.js.map +2 -2
  37. package/dist/cjs/components/button.js +1 -1
  38. package/dist/cjs/components/button.js.map +2 -2
  39. package/dist/cjs/components/card.d.ts.map +1 -1
  40. package/dist/cjs/components/card.js +1 -1
  41. package/dist/cjs/components/card.js.map +4 -4
  42. package/dist/cjs/components/card.props.d.ts +3 -10
  43. package/dist/cjs/components/card.props.d.ts.map +1 -1
  44. package/dist/cjs/components/card.props.js +1 -1
  45. package/dist/cjs/components/card.props.js.map +2 -2
  46. package/dist/cjs/components/chatbar.js +2 -2
  47. package/dist/cjs/components/chatbar.js.map +2 -2
  48. package/dist/cjs/components/checkbox-cards.d.ts.map +1 -1
  49. package/dist/cjs/components/checkbox-cards.js +1 -1
  50. package/dist/cjs/components/checkbox-cards.js.map +4 -4
  51. package/dist/cjs/components/checkbox-cards.props.d.ts +2 -1
  52. package/dist/cjs/components/checkbox-cards.props.d.ts.map +1 -1
  53. package/dist/cjs/components/checkbox-cards.props.js +1 -1
  54. package/dist/cjs/components/checkbox-cards.props.js.map +2 -2
  55. package/dist/cjs/components/checkbox-group.js +1 -1
  56. package/dist/cjs/components/checkbox-group.js.map +2 -2
  57. package/dist/cjs/components/checkbox.js +1 -1
  58. package/dist/cjs/components/checkbox.js.map +2 -2
  59. package/dist/cjs/components/code.js +1 -1
  60. package/dist/cjs/components/code.js.map +2 -2
  61. package/dist/cjs/components/code.props.d.ts +2 -2
  62. package/dist/cjs/components/code.props.js +1 -1
  63. package/dist/cjs/components/code.props.js.map +2 -2
  64. package/dist/cjs/components/combobox.js +1 -1
  65. package/dist/cjs/components/combobox.js.map +2 -2
  66. package/dist/cjs/components/combobox.props.d.ts +1 -1
  67. package/dist/cjs/components/combobox.props.js +1 -1
  68. package/dist/cjs/components/combobox.props.js.map +2 -2
  69. package/dist/cjs/components/container.js +1 -1
  70. package/dist/cjs/components/container.js.map +2 -2
  71. package/dist/cjs/components/context-menu.js +1 -1
  72. package/dist/cjs/components/context-menu.js.map +2 -2
  73. package/dist/cjs/components/context-menu.props.js +1 -1
  74. package/dist/cjs/components/context-menu.props.js.map +2 -2
  75. package/dist/cjs/components/data-list.js +1 -1
  76. package/dist/cjs/components/data-list.js.map +2 -2
  77. package/dist/cjs/components/dialog.d.ts.map +1 -1
  78. package/dist/cjs/components/dialog.js +1 -1
  79. package/dist/cjs/components/dialog.js.map +3 -3
  80. package/dist/cjs/components/dialog.props.d.ts +1 -2
  81. package/dist/cjs/components/dialog.props.d.ts.map +1 -1
  82. package/dist/cjs/components/dialog.props.js +1 -1
  83. package/dist/cjs/components/dialog.props.js.map +2 -2
  84. package/dist/cjs/components/dropdown-menu.js +1 -1
  85. package/dist/cjs/components/dropdown-menu.js.map +2 -2
  86. package/dist/cjs/components/dropdown-menu.props.js +1 -1
  87. package/dist/cjs/components/dropdown-menu.props.js.map +2 -2
  88. package/dist/cjs/components/flex.js +1 -1
  89. package/dist/cjs/components/flex.js.map +2 -2
  90. package/dist/cjs/components/grid.js +1 -1
  91. package/dist/cjs/components/grid.js.map +2 -2
  92. package/dist/cjs/components/heading.js +1 -1
  93. package/dist/cjs/components/heading.js.map +2 -2
  94. package/dist/cjs/components/heading.props.d.ts +2 -2
  95. package/dist/cjs/components/heading.props.js +1 -1
  96. package/dist/cjs/components/heading.props.js.map +2 -2
  97. package/dist/cjs/components/hover-card.js +1 -1
  98. package/dist/cjs/components/hover-card.js.map +2 -2
  99. package/dist/cjs/components/hover-card.props.d.ts +1 -1
  100. package/dist/cjs/components/hover-card.props.js +1 -1
  101. package/dist/cjs/components/hover-card.props.js.map +2 -2
  102. package/dist/cjs/components/icon-button.js +1 -1
  103. package/dist/cjs/components/icon-button.js.map +2 -2
  104. package/dist/cjs/components/image.js +1 -1
  105. package/dist/cjs/components/image.js.map +2 -2
  106. package/dist/cjs/components/index.d.ts +0 -1
  107. package/dist/cjs/components/index.d.ts.map +1 -1
  108. package/dist/cjs/components/index.js +5 -5
  109. package/dist/cjs/components/index.js.map +4 -4
  110. package/dist/cjs/components/kbd.js +1 -1
  111. package/dist/cjs/components/kbd.js.map +2 -2
  112. package/dist/cjs/components/kbd.props.d.ts +1 -1
  113. package/dist/cjs/components/kbd.props.js +1 -1
  114. package/dist/cjs/components/kbd.props.js.map +2 -2
  115. package/dist/cjs/components/link.js +1 -1
  116. package/dist/cjs/components/link.js.map +2 -2
  117. package/dist/cjs/components/link.props.d.ts +2 -2
  118. package/dist/cjs/components/link.props.js +1 -1
  119. package/dist/cjs/components/link.props.js.map +2 -2
  120. package/dist/cjs/components/message-scroller.js +1 -1
  121. package/dist/cjs/components/message-scroller.js.map +2 -2
  122. package/dist/cjs/components/navbar.js +1 -1
  123. package/dist/cjs/components/navbar.js.map +2 -2
  124. package/dist/cjs/components/notice.d.ts +2 -2
  125. package/dist/cjs/components/notice.d.ts.map +1 -1
  126. package/dist/cjs/components/notice.js +2 -2
  127. package/dist/cjs/components/notice.js.map +2 -2
  128. package/dist/cjs/components/progress.js +1 -1
  129. package/dist/cjs/components/progress.js.map +2 -2
  130. package/dist/cjs/components/radio-cards.d.ts.map +1 -1
  131. package/dist/cjs/components/radio-cards.js +1 -1
  132. package/dist/cjs/components/radio-cards.js.map +4 -4
  133. package/dist/cjs/components/radio-cards.props.d.ts +2 -1
  134. package/dist/cjs/components/radio-cards.props.d.ts.map +1 -1
  135. package/dist/cjs/components/radio-cards.props.js +1 -1
  136. package/dist/cjs/components/radio-cards.props.js.map +2 -2
  137. package/dist/cjs/components/radio-group.js +1 -1
  138. package/dist/cjs/components/radio-group.js.map +2 -2
  139. package/dist/cjs/components/radio.js +1 -1
  140. package/dist/cjs/components/radio.js.map +2 -2
  141. package/dist/cjs/components/scroll-area.js +1 -1
  142. package/dist/cjs/components/scroll-area.js.map +2 -2
  143. package/dist/cjs/components/section.js +1 -1
  144. package/dist/cjs/components/section.js.map +2 -2
  145. package/dist/cjs/components/segmented-control.js +1 -1
  146. package/dist/cjs/components/segmented-control.js.map +2 -2
  147. package/dist/cjs/components/select.js +1 -1
  148. package/dist/cjs/components/select.js.map +2 -2
  149. package/dist/cjs/components/separator.js +1 -1
  150. package/dist/cjs/components/separator.js.map +2 -2
  151. package/dist/cjs/components/sheet.d.ts +2 -2
  152. package/dist/cjs/components/sheet.d.ts.map +1 -1
  153. package/dist/cjs/components/sheet.js +1 -1
  154. package/dist/cjs/components/sheet.js.map +3 -3
  155. package/dist/cjs/components/shell.js +1 -1
  156. package/dist/cjs/components/shell.js.map +2 -2
  157. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  158. package/dist/cjs/components/sidebar.js +1 -1
  159. package/dist/cjs/components/sidebar.js.map +3 -3
  160. package/dist/cjs/components/skeleton.js +1 -1
  161. package/dist/cjs/components/skeleton.js.map +2 -2
  162. package/dist/cjs/components/slider.js +1 -1
  163. package/dist/cjs/components/slider.js.map +2 -2
  164. package/dist/cjs/components/spinner.js +1 -1
  165. package/dist/cjs/components/spinner.js.map +2 -2
  166. package/dist/cjs/components/switch.js +1 -1
  167. package/dist/cjs/components/switch.js.map +2 -2
  168. package/dist/cjs/components/tab-nav.js +1 -1
  169. package/dist/cjs/components/tab-nav.js.map +2 -2
  170. package/dist/cjs/components/table.js +1 -1
  171. package/dist/cjs/components/table.js.map +2 -2
  172. package/dist/cjs/components/tabs.js +1 -1
  173. package/dist/cjs/components/tabs.js.map +2 -2
  174. package/dist/cjs/components/text-area.js +1 -1
  175. package/dist/cjs/components/text-area.js.map +2 -2
  176. package/dist/cjs/components/text-field.js +1 -1
  177. package/dist/cjs/components/text-field.js.map +2 -2
  178. package/dist/cjs/components/text.js +1 -1
  179. package/dist/cjs/components/text.js.map +2 -2
  180. package/dist/cjs/components/text.props.d.ts +2 -2
  181. package/dist/cjs/components/text.props.js +1 -1
  182. package/dist/cjs/components/text.props.js.map +2 -2
  183. package/dist/cjs/components/theme-panel.js +2 -2
  184. package/dist/cjs/components/theme-panel.js.map +2 -2
  185. package/dist/cjs/components/toggle-button.js +1 -1
  186. package/dist/cjs/components/toggle-button.js.map +2 -2
  187. package/dist/cjs/components/toggle-icon-button.js +1 -1
  188. package/dist/cjs/components/toggle-icon-button.js.map +2 -2
  189. package/dist/cjs/components/toolbar.js +1 -1
  190. package/dist/cjs/components/toolbar.js.map +2 -2
  191. package/dist/cjs/components/tooltip.js +1 -1
  192. package/dist/cjs/components/tooltip.js.map +2 -2
  193. package/dist/cjs/components/virtual-menu.d.ts +2 -1
  194. package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
  195. package/dist/cjs/components/virtual-menu.js +1 -1
  196. package/dist/cjs/components/virtual-menu.js.map +2 -2
  197. package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
  198. package/dist/cjs/helpers/get-margin-styles.js +1 -1
  199. package/dist/cjs/helpers/get-margin-styles.js.map +2 -2
  200. package/dist/cjs/helpers/index.js +1 -1
  201. package/dist/cjs/helpers/index.js.map +2 -2
  202. package/dist/cjs/index.js +6 -6
  203. package/dist/cjs/index.js.map +4 -4
  204. package/dist/cjs/props/index.d.ts +0 -1
  205. package/dist/cjs/props/index.d.ts.map +1 -1
  206. package/dist/cjs/props/index.js +1 -1
  207. package/dist/cjs/props/index.js.map +4 -4
  208. package/dist/cjs/props/margin.props.d.ts +7 -7
  209. package/dist/cjs/props/margin.props.js +1 -1
  210. package/dist/cjs/props/margin.props.js.map +2 -2
  211. package/dist/cjs/props/weight.prop.d.ts +1 -1
  212. package/dist/cjs/props/weight.prop.d.ts.map +1 -1
  213. package/dist/cjs/props/weight.prop.js +1 -1
  214. package/dist/cjs/props/weight.prop.js.map +2 -2
  215. package/dist/esm/chunk-2FPJ6Q2N.js +2 -0
  216. package/dist/esm/chunk-2FPJ6Q2N.js.map +7 -0
  217. package/dist/esm/chunk-2WSD2H23.js +2 -0
  218. package/dist/esm/chunk-2WSD2H23.js.map +7 -0
  219. package/dist/esm/{chunk-V2TPYSZ2.js → chunk-33IRPFDK.js} +2 -2
  220. package/dist/esm/{chunk-YVMQWSHA.js → chunk-3E6ADI2F.js} +2 -2
  221. package/dist/esm/{chunk-ZJZIV2JH.js → chunk-42LDZ7L5.js} +2 -2
  222. package/dist/esm/{chunk-AMP7O3DM.js → chunk-43A5GUSI.js} +2 -2
  223. package/dist/esm/{chunk-MDHXSEGH.js → chunk-4ITIXBIP.js} +2 -2
  224. package/dist/esm/{chunk-MDHXSEGH.js.map → chunk-4ITIXBIP.js.map} +2 -2
  225. package/dist/esm/{chunk-UBSLEGQZ.js → chunk-6FLLFCBU.js} +2 -2
  226. package/dist/esm/{chunk-DJFTDR6Y.js → chunk-6RZVKCNG.js} +2 -2
  227. package/dist/esm/chunk-74SNS4VY.js +2 -0
  228. package/dist/esm/chunk-74SNS4VY.js.map +7 -0
  229. package/dist/esm/{chunk-JLI7WHV6.js → chunk-7FC7HF76.js} +2 -2
  230. package/dist/esm/{chunk-KFQ4B5YC.js → chunk-7KIKAEI7.js} +2 -2
  231. package/dist/esm/{chunk-7J2QS2UT.js → chunk-7SS6EIE5.js} +2 -2
  232. package/dist/esm/{chunk-ZH2B7WEH.js → chunk-7UV4FYYL.js} +2 -2
  233. package/dist/esm/{chunk-TPHNDGSV.js → chunk-AI6UQ5VD.js} +2 -2
  234. package/dist/esm/{chunk-4M55YJMR.js → chunk-BQS6XXJR.js} +2 -2
  235. package/dist/esm/chunk-CD324U6G.js +2 -0
  236. package/dist/esm/chunk-CD324U6G.js.map +7 -0
  237. package/dist/esm/{chunk-AO32NT75.js → chunk-CLEH57SW.js} +2 -2
  238. package/dist/esm/{chunk-XHKL4PG7.js → chunk-CNMFVJNC.js} +2 -2
  239. package/dist/esm/chunk-D2ZHYCTG.js +2 -0
  240. package/dist/esm/chunk-D2ZHYCTG.js.map +7 -0
  241. package/dist/esm/{chunk-TGRRQHLQ.js → chunk-DMWLY6ZP.js} +2 -2
  242. package/dist/esm/{chunk-AKPAHQYE.js → chunk-E453PYTG.js} +2 -2
  243. package/dist/esm/chunk-E4KCVRBQ.js +2 -0
  244. package/dist/esm/chunk-E4KCVRBQ.js.map +7 -0
  245. package/dist/esm/{chunk-F3XBIUXB.js → chunk-EUHAZKWY.js} +2 -2
  246. package/dist/esm/chunk-F2UUKVBM.js +1 -0
  247. package/dist/esm/chunk-F7HK2QLM.js +2 -0
  248. package/dist/esm/{chunk-5AHQJB6H.js.map → chunk-F7HK2QLM.js.map} +2 -2
  249. package/dist/esm/{chunk-UNRG6Z5I.js → chunk-FNRKTMNN.js} +2 -2
  250. package/dist/esm/{chunk-BZ6YBP2S.js → chunk-GDACOD53.js} +2 -2
  251. package/dist/esm/{chunk-DSB3TEAQ.js → chunk-GLERJXVS.js} +2 -2
  252. package/dist/esm/{chunk-JCRBBT4X.js → chunk-GPVPXAUC.js} +2 -2
  253. package/dist/esm/chunk-GTXRD4FZ.js +2 -0
  254. package/dist/esm/{chunk-DFSW4QR4.js.map → chunk-GTXRD4FZ.js.map} +3 -3
  255. package/dist/esm/{chunk-O6K6RZXY.js → chunk-HJ6ACBXW.js} +2 -2
  256. package/dist/esm/{chunk-KPPIW4OJ.js → chunk-HJZNHNLX.js} +2 -2
  257. package/dist/esm/chunk-HK7RJPQ2.js +2 -0
  258. package/dist/esm/chunk-HK7RJPQ2.js.map +7 -0
  259. package/dist/esm/chunk-HT5EFJA3.js +2 -0
  260. package/dist/esm/chunk-HT5EFJA3.js.map +7 -0
  261. package/dist/esm/{chunk-BFLO4IVZ.js → chunk-HVXXJZC2.js} +2 -2
  262. package/dist/esm/{chunk-XVKFQSLI.js → chunk-IND2NZIN.js} +2 -2
  263. package/dist/esm/{chunk-GQBQHGEF.js → chunk-JDMJC76O.js} +2 -2
  264. package/dist/esm/chunk-JH55M4I2.js +2 -0
  265. package/dist/esm/chunk-JH55M4I2.js.map +7 -0
  266. package/dist/esm/{chunk-IF4PYIUV.js → chunk-JOB6FH3D.js} +2 -2
  267. package/dist/esm/chunk-JOB6FH3D.js.map +7 -0
  268. package/dist/esm/{chunk-PBFSBHBS.js → chunk-JUY7CBSL.js} +2 -2
  269. package/dist/esm/{chunk-XHF6RBOE.js → chunk-KRPEEM4C.js} +2 -2
  270. package/dist/esm/chunk-LFUPGIPA.js +2 -0
  271. package/dist/esm/chunk-LFUPGIPA.js.map +7 -0
  272. package/dist/esm/{chunk-EHUSLPWN.js → chunk-MLXFZDFU.js} +2 -2
  273. package/dist/esm/{chunk-K5SC3CZZ.js → chunk-N5OSP3PU.js} +2 -2
  274. package/dist/esm/{chunk-7FZPCM7W.js → chunk-NEK7F746.js} +2 -2
  275. package/dist/esm/{chunk-35HNDWWM.js → chunk-NETIWKIR.js} +2 -2
  276. package/dist/esm/chunk-NTGRWJEG.js +2 -0
  277. package/dist/esm/{chunk-EVTNB4TB.js.map → chunk-NTGRWJEG.js.map} +2 -2
  278. package/dist/esm/{chunk-CL6LRPCS.js → chunk-O7IPBLC7.js} +2 -2
  279. package/dist/esm/{chunk-GVLTTTFL.js → chunk-OLSTITVY.js} +2 -2
  280. package/dist/esm/{chunk-UQZHW3EJ.js → chunk-OMYAVTX6.js} +2 -2
  281. package/dist/esm/{chunk-7CBZFHSQ.js → chunk-OXYHRNJA.js} +2 -2
  282. package/dist/esm/{chunk-L6M2MI7Y.js → chunk-PIMNQEDG.js} +2 -2
  283. package/dist/esm/{chunk-VIDXAECE.js → chunk-Q5LPCJXN.js} +2 -2
  284. package/dist/esm/{chunk-CRK34MWY.js → chunk-Q6GUADLO.js} +2 -2
  285. package/dist/esm/{chunk-EA2XSEFH.js → chunk-QETAAJJV.js} +2 -2
  286. package/dist/esm/chunk-QEYOXQK5.js +2 -0
  287. package/dist/esm/{chunk-PDBVZAUJ.js.map → chunk-QEYOXQK5.js.map} +2 -2
  288. package/dist/esm/chunk-QWLKMVZY.js +2 -0
  289. package/dist/esm/chunk-R372ULQC.js +2 -0
  290. package/dist/esm/chunk-R372ULQC.js.map +7 -0
  291. package/dist/esm/chunk-RDS3AJWW.js +2 -0
  292. package/dist/esm/chunk-RDS3AJWW.js.map +7 -0
  293. package/dist/esm/{chunk-ENSDQ3XQ.js → chunk-RUWKVDFT.js} +2 -2
  294. package/dist/esm/{chunk-CHPZ3LNC.js → chunk-RVM4LGAU.js} +2 -2
  295. package/dist/esm/{chunk-YF3MFME4.js → chunk-SKOF4A27.js} +2 -2
  296. package/dist/esm/chunk-TBWKDBUF.js +2 -0
  297. package/dist/esm/chunk-TBWKDBUF.js.map +7 -0
  298. package/dist/esm/{chunk-IWT3Q2PD.js → chunk-TLWCU336.js} +2 -2
  299. package/dist/esm/{chunk-MAI7FEU7.js → chunk-TLZMLJTI.js} +2 -2
  300. package/dist/esm/{chunk-MAI7FEU7.js.map → chunk-TLZMLJTI.js.map} +2 -2
  301. package/dist/esm/{chunk-MQDZBF4J.js → chunk-TQIR5LLY.js} +2 -2
  302. package/dist/esm/{chunk-QAUYOVVL.js → chunk-UFJJTUOU.js} +2 -2
  303. package/dist/esm/chunk-UNH3FGU4.js +2 -0
  304. package/dist/esm/chunk-UNH3FGU4.js.map +7 -0
  305. package/dist/esm/{chunk-BN24ZBO7.js → chunk-UUWGAQDT.js} +2 -2
  306. package/dist/esm/{chunk-ZFBLPW3X.js → chunk-VLQ2LX5M.js} +2 -2
  307. package/dist/esm/{chunk-4DE3ONED.js → chunk-VTTJFBV6.js} +2 -2
  308. package/dist/esm/{chunk-VT4AAF7Q.js → chunk-WBGKTN35.js} +2 -2
  309. package/dist/esm/{chunk-PAQS6C2A.js → chunk-WDDO73O5.js} +2 -2
  310. package/dist/esm/chunk-WSKA5MZZ.js +2 -0
  311. package/dist/esm/chunk-WSKA5MZZ.js.map +7 -0
  312. package/dist/esm/{chunk-3OABA7AF.js → chunk-X7HFFVFD.js} +2 -2
  313. package/dist/esm/chunk-XASK6LMX.js +2 -0
  314. package/dist/esm/chunk-XASK6LMX.js.map +7 -0
  315. package/dist/esm/chunk-XDAQXNBQ.js +2 -0
  316. package/dist/esm/chunk-XDAQXNBQ.js.map +7 -0
  317. package/dist/esm/{chunk-MJEYJI5G.js → chunk-XDV2SDJ3.js} +2 -2
  318. package/dist/esm/{chunk-RC7TBVLO.js → chunk-XPT5ELKO.js} +2 -2
  319. package/dist/esm/{chunk-KRXCFIRK.js → chunk-XXHIMGBY.js} +2 -2
  320. package/dist/esm/{chunk-5VBJT2VY.js → chunk-YS5BZRRK.js} +2 -2
  321. package/dist/esm/chunk-YYZBPQQ4.js +2 -0
  322. package/dist/esm/chunk-YYZBPQQ4.js.map +7 -0
  323. package/dist/esm/chunk-Z6NRR7KS.js +2 -0
  324. package/dist/esm/chunk-Z6NRR7KS.js.map +7 -0
  325. package/dist/esm/{chunk-U7PDXTRX.js → chunk-ZIKJ2WZN.js} +2 -2
  326. package/dist/esm/{chunk-35KS5AQE.js → chunk-ZMOBKT4T.js} +2 -2
  327. package/dist/esm/{chunk-5R2WX2FU.js → chunk-ZRHXFYAE.js} +2 -2
  328. package/dist/esm/components/_internal/base-button.js +1 -1
  329. package/dist/esm/components/_internal/base-menu.props.d.ts +2 -2
  330. package/dist/esm/components/_internal/base-menu.props.js +1 -1
  331. package/dist/esm/components/_internal/base-menu.utils.d.ts.map +1 -1
  332. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  333. package/dist/esm/components/_internal/menu-context.d.ts +5 -2
  334. package/dist/esm/components/_internal/menu-context.d.ts.map +1 -1
  335. package/dist/esm/components/_internal/menu-context.js +1 -1
  336. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  337. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  338. package/dist/esm/components/accordion.js +1 -1
  339. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  340. package/dist/esm/components/alert-dialog.js +1 -1
  341. package/dist/esm/components/alert-dialog.props.d.ts +1 -2
  342. package/dist/esm/components/alert-dialog.props.d.ts.map +1 -1
  343. package/dist/esm/components/alert-dialog.props.js +1 -1
  344. package/dist/esm/components/avatar.js +1 -1
  345. package/dist/esm/components/badge.js +1 -1
  346. package/dist/esm/components/blockquote.js +1 -1
  347. package/dist/esm/components/blockquote.props.d.ts +2 -2
  348. package/dist/esm/components/blockquote.props.js +1 -1
  349. package/dist/esm/components/box.js +1 -1
  350. package/dist/esm/components/button.js +1 -1
  351. package/dist/esm/components/card.d.ts.map +1 -1
  352. package/dist/esm/components/card.js +1 -1
  353. package/dist/esm/components/card.props.d.ts +3 -10
  354. package/dist/esm/components/card.props.d.ts.map +1 -1
  355. package/dist/esm/components/card.props.js +1 -1
  356. package/dist/esm/components/chatbar.js +1 -1
  357. package/dist/esm/components/checkbox-cards.d.ts.map +1 -1
  358. package/dist/esm/components/checkbox-cards.js +1 -1
  359. package/dist/esm/components/checkbox-cards.props.d.ts +2 -1
  360. package/dist/esm/components/checkbox-cards.props.d.ts.map +1 -1
  361. package/dist/esm/components/checkbox-cards.props.js +1 -1
  362. package/dist/esm/components/checkbox-group.js +1 -1
  363. package/dist/esm/components/checkbox.js +1 -1
  364. package/dist/esm/components/code.js +1 -1
  365. package/dist/esm/components/code.props.d.ts +2 -2
  366. package/dist/esm/components/code.props.js +1 -1
  367. package/dist/esm/components/combobox.js +1 -1
  368. package/dist/esm/components/combobox.props.d.ts +1 -1
  369. package/dist/esm/components/combobox.props.js +1 -1
  370. package/dist/esm/components/container.js +1 -1
  371. package/dist/esm/components/context-menu.js +1 -1
  372. package/dist/esm/components/context-menu.props.js +1 -1
  373. package/dist/esm/components/data-list.js +1 -1
  374. package/dist/esm/components/dialog.d.ts.map +1 -1
  375. package/dist/esm/components/dialog.js +1 -1
  376. package/dist/esm/components/dialog.props.d.ts +1 -2
  377. package/dist/esm/components/dialog.props.d.ts.map +1 -1
  378. package/dist/esm/components/dialog.props.js +1 -1
  379. package/dist/esm/components/dropdown-menu.js +1 -1
  380. package/dist/esm/components/dropdown-menu.props.js +1 -1
  381. package/dist/esm/components/em.js +1 -1
  382. package/dist/esm/components/flex.js +1 -1
  383. package/dist/esm/components/grid.js +1 -1
  384. package/dist/esm/components/heading.js +1 -1
  385. package/dist/esm/components/heading.props.d.ts +2 -2
  386. package/dist/esm/components/heading.props.js +1 -1
  387. package/dist/esm/components/hover-card.js +1 -1
  388. package/dist/esm/components/hover-card.props.d.ts +1 -1
  389. package/dist/esm/components/hover-card.props.js +1 -1
  390. package/dist/esm/components/icon-button.js +1 -1
  391. package/dist/esm/components/image.js +1 -1
  392. package/dist/esm/components/index.d.ts +0 -1
  393. package/dist/esm/components/index.d.ts.map +1 -1
  394. package/dist/esm/components/index.js +1 -1
  395. package/dist/esm/components/kbd.js +1 -1
  396. package/dist/esm/components/kbd.props.d.ts +1 -1
  397. package/dist/esm/components/kbd.props.js +1 -1
  398. package/dist/esm/components/link.js +1 -1
  399. package/dist/esm/components/link.props.d.ts +2 -2
  400. package/dist/esm/components/link.props.js +1 -1
  401. package/dist/esm/components/message-scroller.js +1 -1
  402. package/dist/esm/components/navbar.js +1 -1
  403. package/dist/esm/components/notice.d.ts +2 -2
  404. package/dist/esm/components/notice.d.ts.map +1 -1
  405. package/dist/esm/components/notice.js +1 -1
  406. package/dist/esm/components/popover.js +1 -1
  407. package/dist/esm/components/progress.js +1 -1
  408. package/dist/esm/components/quote.js +1 -1
  409. package/dist/esm/components/radio-cards.d.ts.map +1 -1
  410. package/dist/esm/components/radio-cards.js +1 -1
  411. package/dist/esm/components/radio-cards.props.d.ts +2 -1
  412. package/dist/esm/components/radio-cards.props.d.ts.map +1 -1
  413. package/dist/esm/components/radio-cards.props.js +1 -1
  414. package/dist/esm/components/radio-group.js +1 -1
  415. package/dist/esm/components/radio.js +1 -1
  416. package/dist/esm/components/schemas/index.js +1 -1
  417. package/dist/esm/components/scroll-area.js +1 -1
  418. package/dist/esm/components/section.js +1 -1
  419. package/dist/esm/components/segmented-control.js +1 -1
  420. package/dist/esm/components/select.js +1 -1
  421. package/dist/esm/components/separator.js +1 -1
  422. package/dist/esm/components/sheet.d.ts +2 -2
  423. package/dist/esm/components/sheet.d.ts.map +1 -1
  424. package/dist/esm/components/sheet.js +1 -1
  425. package/dist/esm/components/shell.js +1 -1
  426. package/dist/esm/components/sidebar.d.ts.map +1 -1
  427. package/dist/esm/components/sidebar.js +1 -1
  428. package/dist/esm/components/skeleton.js +1 -1
  429. package/dist/esm/components/slider.js +1 -1
  430. package/dist/esm/components/spinner.js +1 -1
  431. package/dist/esm/components/strong.js +1 -1
  432. package/dist/esm/components/switch.js +1 -1
  433. package/dist/esm/components/tab-nav.js +1 -1
  434. package/dist/esm/components/table.js +1 -1
  435. package/dist/esm/components/tabs.js +1 -1
  436. package/dist/esm/components/text-area.js +1 -1
  437. package/dist/esm/components/text-field.js +1 -1
  438. package/dist/esm/components/text.js +1 -1
  439. package/dist/esm/components/text.props.d.ts +2 -2
  440. package/dist/esm/components/text.props.js +1 -1
  441. package/dist/esm/components/theme-panel.js +1 -1
  442. package/dist/esm/components/toggle-button.js +1 -1
  443. package/dist/esm/components/toggle-icon-button.js +1 -1
  444. package/dist/esm/components/toolbar.js +1 -1
  445. package/dist/esm/components/tooltip.js +1 -1
  446. package/dist/esm/components/virtual-menu.d.ts +2 -1
  447. package/dist/esm/components/virtual-menu.d.ts.map +1 -1
  448. package/dist/esm/components/virtual-menu.js +1 -1
  449. package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
  450. package/dist/esm/helpers/extract-props.js +1 -1
  451. package/dist/esm/helpers/get-margin-styles.js +1 -1
  452. package/dist/esm/helpers/get-responsive-styles.js +1 -1
  453. package/dist/esm/helpers/index.js +1 -1
  454. package/dist/esm/index.js +1 -1
  455. package/dist/esm/props/index.d.ts +0 -1
  456. package/dist/esm/props/index.d.ts.map +1 -1
  457. package/dist/esm/props/index.js +1 -1
  458. package/dist/esm/props/margin.props.d.ts +7 -7
  459. package/dist/esm/props/margin.props.js +1 -1
  460. package/dist/esm/props/weight.prop.d.ts +1 -1
  461. package/dist/esm/props/weight.prop.d.ts.map +1 -1
  462. package/dist/esm/props/weight.prop.js +1 -1
  463. package/layout/utilities.css +240 -198
  464. package/layout.css +240 -198
  465. package/package.json +1 -1
  466. package/src/components/_internal/base-card.css +21 -73
  467. package/src/components/_internal/base-dialog.css +18 -12
  468. package/src/components/_internal/base-menu.css +123 -117
  469. package/src/components/_internal/base-menu.props.ts +1 -1
  470. package/src/components/_internal/base-menu.utils.tsx +2 -1
  471. package/src/components/_internal/base-sidebar-menu.css +8 -38
  472. package/src/components/_internal/menu-context.tsx +9 -4
  473. package/src/components/accordion.css +3 -3
  474. package/src/components/alert-dialog.css +4 -0
  475. package/src/components/alert-dialog.tsx +3 -1
  476. package/src/components/avatar.css +12 -12
  477. package/src/components/badge.css +6 -6
  478. package/src/components/blockquote.props.tsx +1 -1
  479. package/src/components/card.css +11 -2
  480. package/src/components/card.props.tsx +3 -6
  481. package/src/components/card.tsx +7 -9
  482. package/src/components/chatbar.css +6 -6
  483. package/src/components/checkbox-cards.css +4 -48
  484. package/src/components/checkbox-cards.props.tsx +2 -1
  485. package/src/components/checkbox-cards.tsx +9 -3
  486. package/src/components/code.css +10 -32
  487. package/src/components/code.props.tsx +1 -1
  488. package/src/components/combobox.css +0 -9
  489. package/src/components/combobox.props.tsx +1 -1
  490. package/src/components/dialog.css +4 -0
  491. package/src/components/dialog.props.tsx +3 -2
  492. package/src/components/dialog.tsx +3 -1
  493. package/src/components/heading.css +9 -29
  494. package/src/components/heading.props.tsx +1 -1
  495. package/src/components/hover-card.css +10 -10
  496. package/src/components/hover-card.props.tsx +1 -1
  497. package/src/components/index.css +0 -1
  498. package/src/components/index.tsx +0 -1
  499. package/src/components/kbd.css +11 -39
  500. package/src/components/kbd.props.tsx +1 -1
  501. package/src/components/link.props.tsx +1 -1
  502. package/src/components/notice.css +18 -11
  503. package/src/components/notice.tsx +4 -4
  504. package/src/components/popover.css +8 -12
  505. package/src/components/radio-cards.css +0 -38
  506. package/src/components/radio-cards.props.tsx +2 -1
  507. package/src/components/radio-cards.tsx +13 -3
  508. package/src/components/scroll-area.css +1 -1
  509. package/src/components/segmented-control.css +4 -4
  510. package/src/components/select.css +23 -138
  511. package/src/components/sheet.css +2 -1
  512. package/src/components/sheet.tsx +6 -10
  513. package/src/components/shell.css +1 -1
  514. package/src/components/sidebar.css +88 -129
  515. package/src/components/sidebar.tsx +1 -3
  516. package/src/components/slider.css +2 -2
  517. package/src/components/table.css +27 -22
  518. package/src/components/text-field.css +4 -4
  519. package/src/components/text.css +0 -20
  520. package/src/components/text.props.tsx +1 -1
  521. package/src/components/toolbar.css +4 -4
  522. package/src/components/virtual-menu.tsx +3 -1
  523. package/src/props/index.ts +0 -1
  524. package/src/props/margin.props.ts +1 -1
  525. package/src/props/weight.prop.ts +2 -1
  526. package/src/styles/tokens/radius.css +109 -53
  527. package/src/styles/tokens/typography.css +21 -49
  528. package/src/styles/utilities/font-weight.css +0 -20
  529. package/src/styles/utilities/margin.css +40 -7
  530. package/src/styles/utilities/padding.css +0 -26
  531. package/styles.css +2171 -4194
  532. package/tokens/base.css +224 -71
  533. package/tokens.css +224 -71
  534. package/utilities.css +240 -288
  535. package/dist/cjs/components/inset.d.ts +0 -12
  536. package/dist/cjs/components/inset.d.ts.map +0 -1
  537. package/dist/cjs/components/inset.js +0 -2
  538. package/dist/cjs/components/inset.js.map +0 -7
  539. package/dist/cjs/components/inset.props.d.ts +0 -71
  540. package/dist/cjs/components/inset.props.d.ts.map +0 -1
  541. package/dist/cjs/components/inset.props.js +0 -2
  542. package/dist/cjs/components/inset.props.js.map +0 -7
  543. package/dist/esm/chunk-2CNQGDY3.js +0 -2
  544. package/dist/esm/chunk-2CNQGDY3.js.map +0 -7
  545. package/dist/esm/chunk-2O3WL25H.js +0 -2
  546. package/dist/esm/chunk-5AHQJB6H.js +0 -2
  547. package/dist/esm/chunk-6YWDEANN.js +0 -2
  548. package/dist/esm/chunk-6YWDEANN.js.map +0 -7
  549. package/dist/esm/chunk-6YWJUNMB.js +0 -2
  550. package/dist/esm/chunk-6YWJUNMB.js.map +0 -7
  551. package/dist/esm/chunk-ABQHBDM4.js +0 -2
  552. package/dist/esm/chunk-ABQHBDM4.js.map +0 -7
  553. package/dist/esm/chunk-B72RMGWZ.js +0 -2
  554. package/dist/esm/chunk-B72RMGWZ.js.map +0 -7
  555. package/dist/esm/chunk-DFSW4QR4.js +0 -2
  556. package/dist/esm/chunk-EO7WQYFO.js +0 -2
  557. package/dist/esm/chunk-EO7WQYFO.js.map +0 -7
  558. package/dist/esm/chunk-EUSKAXHP.js +0 -2
  559. package/dist/esm/chunk-EUSKAXHP.js.map +0 -7
  560. package/dist/esm/chunk-EVTNB4TB.js +0 -2
  561. package/dist/esm/chunk-FD2TR343.js +0 -2
  562. package/dist/esm/chunk-FD2TR343.js.map +0 -7
  563. package/dist/esm/chunk-GHD3TKCA.js +0 -2
  564. package/dist/esm/chunk-GHD3TKCA.js.map +0 -7
  565. package/dist/esm/chunk-GSTOGDAJ.js +0 -2
  566. package/dist/esm/chunk-GSTOGDAJ.js.map +0 -7
  567. package/dist/esm/chunk-GTVFQXLJ.js +0 -2
  568. package/dist/esm/chunk-GTVFQXLJ.js.map +0 -7
  569. package/dist/esm/chunk-IF4PYIUV.js.map +0 -7
  570. package/dist/esm/chunk-IYFDCW7Y.js +0 -2
  571. package/dist/esm/chunk-IYFDCW7Y.js.map +0 -7
  572. package/dist/esm/chunk-JAMLW534.js +0 -2
  573. package/dist/esm/chunk-JAMLW534.js.map +0 -7
  574. package/dist/esm/chunk-MPN33CKR.js +0 -2
  575. package/dist/esm/chunk-MPN33CKR.js.map +0 -7
  576. package/dist/esm/chunk-NFVOEHZS.js +0 -2
  577. package/dist/esm/chunk-NFVOEHZS.js.map +0 -7
  578. package/dist/esm/chunk-PDBVZAUJ.js +0 -2
  579. package/dist/esm/chunk-QDW5ZG5E.js +0 -1
  580. package/dist/esm/chunk-RJ6SA7AY.js +0 -2
  581. package/dist/esm/chunk-RJ6SA7AY.js.map +0 -7
  582. package/dist/esm/chunk-RSJSVJ6A.js +0 -2
  583. package/dist/esm/chunk-RSJSVJ6A.js.map +0 -7
  584. package/dist/esm/chunk-VJSZG35J.js +0 -2
  585. package/dist/esm/chunk-VJSZG35J.js.map +0 -7
  586. package/dist/esm/chunk-WKMJIWFP.js +0 -2
  587. package/dist/esm/chunk-WKMJIWFP.js.map +0 -7
  588. package/dist/esm/chunk-YGPUKJEB.js +0 -2
  589. package/dist/esm/chunk-YGPUKJEB.js.map +0 -7
  590. package/dist/esm/chunk-ZMFZYXLB.js +0 -2
  591. package/dist/esm/chunk-ZMFZYXLB.js.map +0 -7
  592. package/dist/esm/components/inset.d.ts +0 -12
  593. package/dist/esm/components/inset.d.ts.map +0 -1
  594. package/dist/esm/components/inset.js +0 -2
  595. package/dist/esm/components/inset.js.map +0 -7
  596. package/dist/esm/components/inset.props.d.ts +0 -71
  597. package/dist/esm/components/inset.props.d.ts.map +0 -1
  598. package/dist/esm/components/inset.props.js +0 -2
  599. package/dist/esm/components/inset.props.js.map +0 -7
  600. package/src/components/inset.css +0 -111
  601. package/src/components/inset.props.tsx +0 -90
  602. package/src/components/inset.tsx +0 -28
  603. /package/dist/esm/{chunk-V2TPYSZ2.js.map → chunk-33IRPFDK.js.map} +0 -0
  604. /package/dist/esm/{chunk-YVMQWSHA.js.map → chunk-3E6ADI2F.js.map} +0 -0
  605. /package/dist/esm/{chunk-ZJZIV2JH.js.map → chunk-42LDZ7L5.js.map} +0 -0
  606. /package/dist/esm/{chunk-AMP7O3DM.js.map → chunk-43A5GUSI.js.map} +0 -0
  607. /package/dist/esm/{chunk-UBSLEGQZ.js.map → chunk-6FLLFCBU.js.map} +0 -0
  608. /package/dist/esm/{chunk-DJFTDR6Y.js.map → chunk-6RZVKCNG.js.map} +0 -0
  609. /package/dist/esm/{chunk-JLI7WHV6.js.map → chunk-7FC7HF76.js.map} +0 -0
  610. /package/dist/esm/{chunk-KFQ4B5YC.js.map → chunk-7KIKAEI7.js.map} +0 -0
  611. /package/dist/esm/{chunk-7J2QS2UT.js.map → chunk-7SS6EIE5.js.map} +0 -0
  612. /package/dist/esm/{chunk-ZH2B7WEH.js.map → chunk-7UV4FYYL.js.map} +0 -0
  613. /package/dist/esm/{chunk-TPHNDGSV.js.map → chunk-AI6UQ5VD.js.map} +0 -0
  614. /package/dist/esm/{chunk-4M55YJMR.js.map → chunk-BQS6XXJR.js.map} +0 -0
  615. /package/dist/esm/{chunk-AO32NT75.js.map → chunk-CLEH57SW.js.map} +0 -0
  616. /package/dist/esm/{chunk-XHKL4PG7.js.map → chunk-CNMFVJNC.js.map} +0 -0
  617. /package/dist/esm/{chunk-TGRRQHLQ.js.map → chunk-DMWLY6ZP.js.map} +0 -0
  618. /package/dist/esm/{chunk-AKPAHQYE.js.map → chunk-E453PYTG.js.map} +0 -0
  619. /package/dist/esm/{chunk-F3XBIUXB.js.map → chunk-EUHAZKWY.js.map} +0 -0
  620. /package/dist/esm/{chunk-QDW5ZG5E.js.map → chunk-F2UUKVBM.js.map} +0 -0
  621. /package/dist/esm/{chunk-UNRG6Z5I.js.map → chunk-FNRKTMNN.js.map} +0 -0
  622. /package/dist/esm/{chunk-BZ6YBP2S.js.map → chunk-GDACOD53.js.map} +0 -0
  623. /package/dist/esm/{chunk-DSB3TEAQ.js.map → chunk-GLERJXVS.js.map} +0 -0
  624. /package/dist/esm/{chunk-JCRBBT4X.js.map → chunk-GPVPXAUC.js.map} +0 -0
  625. /package/dist/esm/{chunk-O6K6RZXY.js.map → chunk-HJ6ACBXW.js.map} +0 -0
  626. /package/dist/esm/{chunk-KPPIW4OJ.js.map → chunk-HJZNHNLX.js.map} +0 -0
  627. /package/dist/esm/{chunk-BFLO4IVZ.js.map → chunk-HVXXJZC2.js.map} +0 -0
  628. /package/dist/esm/{chunk-XVKFQSLI.js.map → chunk-IND2NZIN.js.map} +0 -0
  629. /package/dist/esm/{chunk-GQBQHGEF.js.map → chunk-JDMJC76O.js.map} +0 -0
  630. /package/dist/esm/{chunk-PBFSBHBS.js.map → chunk-JUY7CBSL.js.map} +0 -0
  631. /package/dist/esm/{chunk-XHF6RBOE.js.map → chunk-KRPEEM4C.js.map} +0 -0
  632. /package/dist/esm/{chunk-EHUSLPWN.js.map → chunk-MLXFZDFU.js.map} +0 -0
  633. /package/dist/esm/{chunk-K5SC3CZZ.js.map → chunk-N5OSP3PU.js.map} +0 -0
  634. /package/dist/esm/{chunk-7FZPCM7W.js.map → chunk-NEK7F746.js.map} +0 -0
  635. /package/dist/esm/{chunk-35HNDWWM.js.map → chunk-NETIWKIR.js.map} +0 -0
  636. /package/dist/esm/{chunk-CL6LRPCS.js.map → chunk-O7IPBLC7.js.map} +0 -0
  637. /package/dist/esm/{chunk-GVLTTTFL.js.map → chunk-OLSTITVY.js.map} +0 -0
  638. /package/dist/esm/{chunk-UQZHW3EJ.js.map → chunk-OMYAVTX6.js.map} +0 -0
  639. /package/dist/esm/{chunk-7CBZFHSQ.js.map → chunk-OXYHRNJA.js.map} +0 -0
  640. /package/dist/esm/{chunk-L6M2MI7Y.js.map → chunk-PIMNQEDG.js.map} +0 -0
  641. /package/dist/esm/{chunk-VIDXAECE.js.map → chunk-Q5LPCJXN.js.map} +0 -0
  642. /package/dist/esm/{chunk-CRK34MWY.js.map → chunk-Q6GUADLO.js.map} +0 -0
  643. /package/dist/esm/{chunk-EA2XSEFH.js.map → chunk-QETAAJJV.js.map} +0 -0
  644. /package/dist/esm/{chunk-2O3WL25H.js.map → chunk-QWLKMVZY.js.map} +0 -0
  645. /package/dist/esm/{chunk-ENSDQ3XQ.js.map → chunk-RUWKVDFT.js.map} +0 -0
  646. /package/dist/esm/{chunk-CHPZ3LNC.js.map → chunk-RVM4LGAU.js.map} +0 -0
  647. /package/dist/esm/{chunk-YF3MFME4.js.map → chunk-SKOF4A27.js.map} +0 -0
  648. /package/dist/esm/{chunk-IWT3Q2PD.js.map → chunk-TLWCU336.js.map} +0 -0
  649. /package/dist/esm/{chunk-MQDZBF4J.js.map → chunk-TQIR5LLY.js.map} +0 -0
  650. /package/dist/esm/{chunk-QAUYOVVL.js.map → chunk-UFJJTUOU.js.map} +0 -0
  651. /package/dist/esm/{chunk-BN24ZBO7.js.map → chunk-UUWGAQDT.js.map} +0 -0
  652. /package/dist/esm/{chunk-ZFBLPW3X.js.map → chunk-VLQ2LX5M.js.map} +0 -0
  653. /package/dist/esm/{chunk-4DE3ONED.js.map → chunk-VTTJFBV6.js.map} +0 -0
  654. /package/dist/esm/{chunk-VT4AAF7Q.js.map → chunk-WBGKTN35.js.map} +0 -0
  655. /package/dist/esm/{chunk-PAQS6C2A.js.map → chunk-WDDO73O5.js.map} +0 -0
  656. /package/dist/esm/{chunk-3OABA7AF.js.map → chunk-X7HFFVFD.js.map} +0 -0
  657. /package/dist/esm/{chunk-MJEYJI5G.js.map → chunk-XDV2SDJ3.js.map} +0 -0
  658. /package/dist/esm/{chunk-RC7TBVLO.js.map → chunk-XPT5ELKO.js.map} +0 -0
  659. /package/dist/esm/{chunk-KRXCFIRK.js.map → chunk-XXHIMGBY.js.map} +0 -0
  660. /package/dist/esm/{chunk-5VBJT2VY.js.map → chunk-YS5BZRRK.js.map} +0 -0
  661. /package/dist/esm/{chunk-U7PDXTRX.js.map → chunk-ZIKJ2WZN.js.map} +0 -0
  662. /package/dist/esm/{chunk-35KS5AQE.js.map → chunk-ZMOBKT4T.js.map} +0 -0
  663. /package/dist/esm/{chunk-5R2WX2FU.js.map → chunk-ZRHXFYAE.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/sheet.tsx"],
4
+ "sourcesContent": ["'use client';\n\n/**\n * Sheet\n *\n * A side-placed overlay built on top of Radix Dialog. It inherits accessibility,\n * focus management, overlay behavior, and sizing scales from the base dialog, and\n * adds side placement and slide motion suited for navigation panels and drawers.\n *\n * Structure mirrors Dialog:\n * - Root, Trigger, Content, Title, Description, Close\n *\n * Notes\n * - Side: set with `side` on `Sheet.Content`. Aliases: `left` \u2192 `start`, `right` \u2192 `end`.\n * - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Size follows the\n * Theme size; start/end sheets cap at the size's overlay width unless maxWidth is set.\n * - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.\n *\n * Example\n * <Sheet.Root>\n * <Sheet.Trigger>\n * <Button>Open</Button>\n * </Sheet.Trigger>\n * <Sheet.Content side=\"end\" width={{ initial: '280px', md: '360px' }}>\n * <Sheet.Title>Details</Sheet.Title>\n * ...\n * <Sheet.Close>\n * <Button>Close</Button>\n * </Sheet.Close>\n * </Sheet.Content>\n * </Sheet.Root>\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport { Theme } from './theme.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../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 { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { HeadingProps } from './heading.js';\n\n/**\n * Supported sides for the Sheet.\n * Aliases are normalized RTL-aware: `left` \u2192 `start`, `right` \u2192 `end`.\n */\ntype SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Sheet is a side-placed overlay built on the Dialog primitive.\n * It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.\n */\n\n// Root\n/**\n * Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).\n */\ninterface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst Root: React.FC<SheetRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nRoot.displayName = 'Sheet.Root';\n\n// Trigger\n/** Element type for `Sheet.Trigger`. */\ntype SheetTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\n/** Props for `Sheet.Trigger` (expects a single element child). */\ninterface SheetTriggerProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst Trigger = React.forwardRef<SheetTriggerElement, SheetTriggerProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Trigger {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n ),\n);\nTrigger.displayName = 'Sheet.Trigger';\n\n// Content\n/** Element type for `Sheet.Content`. */\n// Reuse dialog content prop defs for size/width/height tokens.\n// Built once at module scope: `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them every time a sheet renders.\nconst {\n align: _alignPropDef,\n ...dialogPropDefsForSheet\n} = dialogContentPropDefs;\nconst sheetPropDefs = dialogPropDefsForSheet;\n\ntype SheetContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface SheetContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n DialogContentOwnProps {\n /** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */\n side?: SheetSide;\n /** Optional DOM container to portal into. Defaults to `document.body`. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n\n/**\n * Renders the Sheet panel. Normalizes left/right to logical start/end and\n * forwards dialog sizing props. Provide an accessible name via `Sheet.Title`\n * or `aria-label`.\n */\nconst Content = React.forwardRef<SheetContentElement, SheetContentProps>(\n (allProps, forwardedRef) => {\n const {\n side = 'start',\n forceMount,\n container,\n className,\n ...ownProps\n } = allProps;\n const restProps = useThemeSizeProps(ownProps, sheetPropDefs.size);\n const normalizedSideMap: Record<SheetSide, 'start' | 'end' | 'top' | 'bottom'> = {\n left: 'start',\n right: 'end',\n start: 'start',\n end: 'end',\n top: 'top',\n bottom: 'bottom',\n };\n const normalizedSide = normalizedSideMap[side];\n // Size/width/height class names come from the dialog defs \u2014 see `sheetPropDefs`.\n const { className: extractedClassName, ...contentProps } = extractProps(\n restProps,\n sheetPropDefs,\n );\n\n // Dev-only a11y guard: ensure label is provided via Title or aria-label\n if (process.env.NODE_ENV !== 'production') {\n const children = (contentProps as any).children as React.ReactNode;\n const hasAriaLabel = typeof (contentProps as any)['aria-label'] === 'string';\n let hasTitle = false;\n if (children) {\n for (const child of React.Children.toArray(children)) {\n if (React.isValidElement(child) && child.type === Title) {\n hasTitle = true;\n break;\n }\n }\n }\n if (!hasTitle && !hasAriaLabel) {\n console.warn(\n 'Sheet.Content: Missing accessible name. Include Sheet.Title as a child or provide aria-label.',\n );\n }\n }\n\n // Focus management and stuck pointer-events cleanup like Dialog\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useMemo(\n () => (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n useBodyPointerEventsCleanup();\n\n React.useEffect(() => {\n if (typeof window === 'undefined') return;\n const content = contentRef.current;\n if (!content) return;\n\n const focusableElements = content.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n if (focusableElements.length === 0) return;\n\n const firstElement = focusableElements[0] as HTMLElement;\n const lastElement = focusableElements[focusableElements.length - 1] as HTMLElement;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n };\n\n content.addEventListener('keydown', handleKeyDown);\n firstElement.focus();\n\n return () => {\n content.removeEventListener('keydown', handleKeyDown);\n };\n }, []);\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay\">\n <DialogPrimitive.Content\n {...contentProps}\n ref={combinedRef}\n className={classNames(\n 'rt-BaseDialogContent',\n 'rt-SheetContent',\n className,\n extractedClassName,\n )}\n data-side={normalizedSide}\n tabIndex={-1}\n role=\"dialog\"\n aria-modal=\"true\"\n />\n </DialogPrimitive.Overlay>\n </Theme>\n </DialogPrimitive.Portal>\n );\n },\n);\nContent.displayName = 'Sheet.Content';\n\n// Title - renders as Heading with sensible defaults\ntype SheetTitleElement = React.ElementRef<typeof Heading>;\ntype SheetTitleProps = HeadingProps;\n/** Accessible title for the Sheet. Renders as Heading with sensible defaults. */\nconst Title = React.forwardRef<SheetTitleElement, SheetTitleProps>(\n ({ size = '4', weight = 'medium', ...props }, ref) => (\n <DialogPrimitive.Title asChild>\n <Heading ref={ref} size={size} weight={weight} {...props} />\n </DialogPrimitive.Title>\n ),\n);\nTitle.displayName = 'Sheet.Title';\n\n// Description - renders as Text with sensible defaults\ntype SheetDescriptionElement = React.ElementRef<typeof Text>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof Text>;\n/** Supplementary description text for Sheet content. Renders as Text with sensible defaults. */\nconst Description = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ size = '2', emphasis = 'medium', ...rest }, ref) => (\n <DialogPrimitive.Description asChild>\n <Text ref={ref} size={size} emphasis={emphasis} {...rest} />\n </DialogPrimitive.Description>\n ),\n);\nDescription.displayName = 'Sheet.Description';\n\ntype SheetCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface SheetCloseProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\n/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */\nconst Close = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Close {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n ),\n);\nClose.displayName = 'Sheet.Close';\n\nexport { Root, Trigger, Content, Title, Description, Close };\nexport type {\n SheetRootProps as RootProps,\n SheetTriggerProps as TriggerProps,\n SheetContentProps as ContentProps,\n SheetTitleProps as TitleProps,\n SheetDescriptionProps as DescriptionProps,\n SheetCloseProps as CloseProps,\n};\n"],
5
+ "mappings": "wWAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAiCA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WA+B1C,IAAMC,EAAkCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EACzFD,EAAK,YAAc,aAQnB,IAAMG,EAAgB,aACpB,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IACvB,gBAACH,EAAgB,QAAhB,CAAyB,GAAGD,EAAO,IAAKI,EAAK,QAAO,IAClDC,EAAoBF,CAAQ,CAC/B,CAEJ,EACAD,EAAQ,YAAc,gBAQtB,GAAM,CACJ,MAAOI,EACP,GAAGC,CACL,EAAIC,EACEC,EAAgBF,EAiBhBG,EAAgB,aACpB,CAACC,EAAUC,IAAiB,CAC1B,GAAM,CACJ,KAAAC,EAAO,QACP,WAAAC,EACA,UAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAAIN,EACEO,EAAYC,EAAkBF,EAAUR,EAAc,IAAI,EAS1DW,EAR2E,CAC/E,KAAM,QACN,MAAO,MACP,MAAO,QACP,IAAK,MACL,IAAK,MACL,OAAQ,QACV,EACyCP,CAAI,EAEvC,CAAE,UAAWQ,EAAoB,GAAGC,CAAa,EAAIC,EACzDL,EACAT,CACF,EAuBMe,EAAmB,SAAuB,IAAI,EAC9CC,EAAoB,UACxB,IAAOC,GAAgC,CACrCF,EAAW,QAAUE,EACjB,OAAOd,GAAiB,WAC1BA,EAAac,CAAI,EACRd,IACRA,EAA+D,QAAUc,EAE9E,EACA,CAACd,CAAY,CACf,EAEA,OAAAe,EAA4B,EAEtB,YAAU,IAAM,CACpB,GAAI,OAAO,OAAW,IAAa,OACnC,IAAMC,EAAUJ,EAAW,QAC3B,GAAI,CAACI,EAAS,OAEd,IAAMC,EAAoBD,EAAQ,iBAChC,0EACF,EAEA,GAAIC,EAAkB,SAAW,EAAG,OAEpC,IAAMC,EAAeD,EAAkB,CAAC,EAClCE,EAAcF,EAAkBA,EAAkB,OAAS,CAAC,EAE5DG,EAAiBC,GAAyB,CAC1CA,EAAM,MAAQ,QACZA,EAAM,SACJ,SAAS,gBAAkBH,IAC7BG,EAAM,eAAe,EACrBF,EAAY,MAAM,GAEX,SAAS,gBAAkBA,IACpCE,EAAM,eAAe,EACrBH,EAAa,MAAM,GAGzB,EAEA,OAAAF,EAAQ,iBAAiB,UAAWI,CAAa,EACjDF,EAAa,MAAM,EAEZ,IAAM,CACXF,EAAQ,oBAAoB,UAAWI,CAAa,CACtD,CACF,EAAG,CAAC,CAAC,EAGH,gBAAC/B,EAAgB,OAAhB,CAAuB,UAAWc,EAAW,WAAYD,GACxD,gBAACoB,EAAA,CAAM,QAAO,IACZ,gBAACjC,EAAgB,QAAhB,CAAwB,UAAU,yDACjC,gBAACA,EAAgB,QAAhB,CACE,GAAGqB,EACJ,IAAKG,EACL,UAAWU,EACT,uBACA,kBACAnB,EACAK,CACF,EACA,YAAWD,EACX,SAAU,GACV,KAAK,SACL,aAAW,OACb,CACF,CACF,CACF,CAEJ,CACF,EACAV,EAAQ,YAAc,gBAMtB,IAAM0B,EAAc,aAClB,CAAC,CAAE,KAAAC,EAAO,IAAK,OAAAC,EAAS,SAAU,GAAGtC,CAAM,EAAGI,IAC5C,gBAACH,EAAgB,MAAhB,CAAsB,QAAO,IAC5B,gBAACsC,EAAA,CAAQ,IAAKnC,EAAK,KAAMiC,EAAM,OAAQC,EAAS,GAAGtC,EAAO,CAC5D,CAEJ,EACAoC,EAAM,YAAc,cAMpB,IAAMI,EAAoB,aACxB,CAAC,CAAE,KAAAH,EAAO,IAAK,SAAAI,EAAW,SAAU,GAAGC,CAAK,EAAGtC,IAC7C,gBAACH,EAAgB,YAAhB,CAA4B,QAAO,IAClC,gBAAC0C,EAAA,CAAK,IAAKvC,EAAK,KAAMiC,EAAM,SAAUI,EAAW,GAAGC,EAAM,CAC5D,CAEJ,EACAF,EAAY,YAAc,oBAM1B,IAAMI,EAAc,aAClB,CAAC,CAAE,SAAAzC,EAAU,GAAGH,CAAM,EAAGI,IACvB,gBAACH,EAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKI,EAAK,QAAO,IAChDC,EAAoBF,CAAQ,CAC/B,CAEJ,EACAyC,EAAM,YAAc",
6
+ "names": ["sheet_exports", "__export", "Close", "Content", "Description", "Root", "Title", "Trigger", "React", "classNames", "DialogPrimitive", "Root", "props", "DialogPrimitive", "Trigger", "children", "ref", "requireReactElement", "_alignPropDef", "dialogPropDefsForSheet", "dialogContentPropDefs", "sheetPropDefs", "Content", "allProps", "forwardedRef", "side", "forceMount", "container", "className", "ownProps", "restProps", "useThemeSizeProps", "normalizedSide", "extractedClassName", "contentProps", "extractProps", "contentRef", "combinedRef", "node", "useBodyPointerEventsCleanup", "content", "focusableElements", "firstElement", "lastElement", "handleKeyDown", "event", "Theme", "classNames", "Title", "size", "weight", "Heading", "Description", "emphasis", "rest", "Text", "Close"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{b as T,d as D}from"./chunk-RSJSVJ6A.js";import*as e from"react";import S from"classnames";import{useVirtualizer as F}from"@tanstack/react-virtual";var G=e.memo(function({label:r,isHighlighted:o,id:u,style:y,tabIndex:x,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g}){return e.createElement("div",{id:u,role:"menuitem",className:S("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem"),style:y,tabIndex:x,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g},r)},(n,r)=>!(n.label!==r.label||n["data-highlighted"]!==r["data-highlighted"]||n.style.height!==r.style.height||n.style.transform!==r.style.transform||n.tabIndex!==r.tabIndex||n.id!==r.id));function N({items:n,itemLabel:r,renderItem:o,size:u,estimatedItemSize:y,overscan:x=5,onSelect:m,className:p,style:f,"aria-label":v}){let h=e.useId(),g=e.useRef(null),[E,l]=e.useState(-1),{isInsideMenu:w,size:z,itemHeight:K}=D(),I=y??(u?T(u):K??T(z??"2"));if(!r&&!o)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let P=e.useMemo(()=>r?typeof r=="function"?r:t=>t[r]:null,[r]),c=e.useMemo(()=>n.length===0||E<0?-1:Math.min(E,n.length-1),[E,n.length]),$=e.useMemo(()=>typeof I=="function"?I:()=>I,[I]),M=F({count:n.length,getScrollElement:()=>g.current,estimateSize:$,overscan:x}),A=M.getVirtualItems(),R=e.useRef(n),b=e.useRef(m);R.current=n,b.current=m;let d=e.useRef(M.scrollToIndex);d.current=M.scrollToIndex;let k=e.useRef(c);k.current=c;let B=e.useCallback(t=>{let s=t.currentTarget.dataset.index;s!=null&&l(Number(s))},[]),j=e.useCallback(t=>{let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}},[]),q=e.useCallback(()=>{},[]),O=e.useCallback(t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}}},[]),U=e.useCallback(t=>{let s=R.current,a=k.current;switch(t.key){case"ArrowDown":{t.preventDefault();let i=a<s.length-1?a+1:0;l(i),d.current(i,{align:"auto"});break}case"ArrowUp":{t.preventDefault();let i=a>0?a-1:s.length-1;l(i),d.current(i,{align:"auto"});break}case"Home":{t.preventDefault(),l(0),d.current(0,{align:"start"});break}case"End":{t.preventDefault();let i=s.length-1;l(i),d.current(i,{align:"end"});break}case"Enter":case" ":{t.preventDefault(),a>=0&&a<s.length&&b.current?.(s[a],a);break}case"Tab":{t.preventDefault();break}case"Escape":{t.currentTarget.blur();break}}},[]),H=e.useCallback(t=>`${h}-item-${t}`,[h]),W=e.useMemo(()=>({overflow:"auto",position:"relative",...f}),[f]),V=M.getTotalSize(),Y=e.useMemo(()=>({height:`${V}px`,width:"100%",position:"relative"}),[V]);return e.createElement("div",{ref:g,role:w?"group":"menu","aria-label":v,"aria-activedescendant":c>=0?H(c):void 0,tabIndex:0,onKeyDown:U,className:S("rt-VirtualMenuRoot",p),style:W},e.createElement("div",{className:"rt-VirtualMenuViewport",style:Y},A.map(t=>{let s=n[t.index],a=t.index,i=c===a,_={height:t.size,transform:`translateY(${t.start}px)`},C={id:H(a),isHighlighted:i,style:_,tabIndex:i?0:-1,"data-highlighted":i?!0:void 0,"data-index":a,onMouseEnter:B,onMouseLeave:q,onClick:j,onKeyDown:O};return o?e.createElement(o,{key:t.key,item:s,index:a,...C}):e.createElement(G,{key:t.key,label:P(s),...C})})))}N.displayName="VirtualMenu";var L=e.forwardRef(({className:n,children:r,...o},u)=>e.createElement("div",{ref:u,role:"menuitem",className:S("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem",n),...o},r));L.displayName="VirtualMenu.Item";var J=e.memo(L,(n,r)=>{let o=n.style,u=r.style;return!(o?.height!==u?.height||o?.transform!==u?.transform||n["data-highlighted"]!==r["data-highlighted"]||n.tabIndex!==r.tabIndex||n.id!==r.id||n.className!==r.className||n.children!==r.children)}),ee=Object.assign(N,{Item:J});export{ee as a};
2
- //# sourceMappingURL=chunk-IF4PYIUV.js.map
1
+ import{b as E,d as D}from"./chunk-CD324U6G.js";import*as e from"react";import T from"classnames";import{useVirtualizer as F}from"@tanstack/react-virtual";var G=e.memo(function({label:r,isHighlighted:o,id:u,style:y,tabIndex:x,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g}){return e.createElement("div",{id:u,role:"menuitem",className:T("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem"),style:y,tabIndex:x,"data-highlighted":m,"data-index":p,onMouseEnter:f,onMouseLeave:v,onClick:h,onKeyDown:g},r)},(n,r)=>!(n.label!==r.label||n["data-highlighted"]!==r["data-highlighted"]||n.style.height!==r.style.height||n.style.transform!==r.style.transform||n.tabIndex!==r.tabIndex||n.id!==r.id));function N({items:n,itemLabel:r,renderItem:o,size:u,estimatedItemSize:y,overscan:x=5,onSelect:m,className:p,style:f,"aria-label":v}){let h=e.useId(),g=e.useRef(null),[S,l]=e.useState(-1),{isInsideMenu:L,size:w,itemHeight:K}=D(),M=y??(u?E(u):K??E(w??"2"));if(!r&&!o)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let P=e.useMemo(()=>r?typeof r=="function"?r:t=>t[r]:null,[r]),c=e.useMemo(()=>n.length===0||S<0?-1:Math.min(S,n.length-1),[S,n.length]),$=e.useMemo(()=>typeof M=="function"?M:()=>M,[M]),I=F({count:n.length,getScrollElement:()=>g.current,estimateSize:$,overscan:x}),j=I.getVirtualItems(),R=e.useRef(n),b=e.useRef(m);R.current=n,b.current=m;let d=e.useRef(I.scrollToIndex);d.current=I.scrollToIndex;let k=e.useRef(c);k.current=c;let A=e.useCallback(t=>{let s=t.currentTarget.dataset.index;s!=null&&l(Number(s))},[]),B=e.useCallback(t=>{let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}},[]),_=e.useCallback(()=>{},[]),q=e.useCallback(t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let s=t.currentTarget.dataset.index;if(s!=null){let a=Number(s),i=R.current;a>=0&&a<i.length&&b.current?.(i[a],a)}}},[]),O=e.useCallback(t=>{let s=R.current,a=k.current;switch(t.key){case"ArrowDown":{t.preventDefault();let i=a<s.length-1?a+1:0;l(i),d.current(i,{align:"auto"});break}case"ArrowUp":{t.preventDefault();let i=a>0?a-1:s.length-1;l(i),d.current(i,{align:"auto"});break}case"Home":{t.preventDefault(),l(0),d.current(0,{align:"start"});break}case"End":{t.preventDefault();let i=s.length-1;l(i),d.current(i,{align:"end"});break}case"Enter":case" ":{t.preventDefault(),a>=0&&a<s.length&&b.current?.(s[a],a);break}case"Tab":{t.preventDefault();break}case"Escape":{t.currentTarget.blur();break}}},[]),H=e.useCallback(t=>`${h}-item-${t}`,[h]),U=e.useMemo(()=>({overflow:"auto",position:"relative",...f}),[f]),V=I.getTotalSize(),W=e.useMemo(()=>({height:`${V}px`,width:"100%",position:"relative"}),[V]);return e.createElement("div",{ref:g,role:L?"group":"menu","aria-label":v,"aria-activedescendant":c>=0?H(c):void 0,tabIndex:0,onKeyDown:O,className:T("rt-VirtualMenuRoot",p),style:U},e.createElement("div",{className:"rt-VirtualMenuViewport",style:W},j.map(t=>{let s=n[t.index],a=t.index,i=c===a,Y={height:t.size,transform:`translateY(${t.start}px)`},C={id:H(a),isHighlighted:i,style:Y,tabIndex:i?0:-1,"data-highlighted":i?!0:void 0,"data-index":a,onMouseEnter:A,onMouseLeave:_,onClick:B,onKeyDown:q};return o?e.createElement(o,{key:t.key,item:s,index:a,...C}):e.createElement(G,{key:t.key,label:P(s),...C})})))}N.displayName="VirtualMenu";var z=e.forwardRef(({className:n,children:r,...o},u)=>e.createElement("div",{ref:u,role:"menuitem",className:T("rt-reset","rt-BaseMenuItem","rt-VirtualMenuItem",n),...o},r));z.displayName="VirtualMenu.Item";var J=e.memo(z,(n,r)=>{let o=n.style,u=r.style;return!(o?.height!==u?.height||o?.transform!==u?.transform||n["data-highlighted"]!==r["data-highlighted"]||n.tabIndex!==r.tabIndex||n.id!==r.id||n.className!==r.className||n.children!==r.children)}),ee=Object.assign(N,{Item:J});export{ee as a};
2
+ //# sourceMappingURL=chunk-JOB6FH3D.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/virtual-menu.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport { useMenuContext, getMenuItemHeight } from './_internal/menu-context.js';\n\nimport type { MenuSize } from './_internal/menu-context.js';\n\n/**\n * VirtualMenu - A virtualized menu component for rendering large lists efficiently.\n *\n * Uses TanStack Virtual to render only visible items.\n * Works inside any container (DropdownMenu.Content, Popover.Content, etc.)\n *\n * @example\n * // Simple usage with itemLabel\n * <VirtualMenu\n * items={items}\n * itemLabel={(item) => item.name}\n * onSelect={handleSelect}\n * />\n *\n * @example\n * // Custom rendering with renderItem\n * const UserItem = React.memo(({ item, ...props }) => (\n * <VirtualMenu.Item {...props}>\n * <Avatar src={item.avatar} />\n * {item.name}\n * </VirtualMenu.Item>\n * ));\n *\n * <VirtualMenu items={users} renderItem={UserItem} onSelect={handleSelect} />\n */\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/** Props passed to custom renderItem components */\ninterface VirtualMenuRenderItemProps<T> {\n /** The item data */\n item: T;\n /** Index in the items array */\n index: number;\n /** Whether this item is currently highlighted */\n isHighlighted: boolean;\n /** Unique ID for accessibility */\n id: string;\n /** Positioning styles - must be applied */\n style: React.CSSProperties;\n /** Tab index for focus management */\n tabIndex: number;\n /** Data attribute for CSS styling */\n 'data-highlighted': true | undefined;\n /** Data attribute for event delegation */\n 'data-index': number;\n /** Mouse enter handler */\n onMouseEnter: (e: React.MouseEvent<HTMLElement>) => void;\n /** Mouse leave handler */\n onMouseLeave: () => void;\n /** Click handler */\n onClick: (e: React.MouseEvent<HTMLElement>) => void;\n /** Keyboard handler for Enter/Space activation */\n onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;\n}\n\ninterface VirtualMenuProps<T> {\n /** Array of items to render */\n items: T[];\n /**\n * Simple label accessor for basic text items.\n * Can be a property key or a function.\n * @example\n * itemLabel=\"name\"\n * itemLabel={(item) => item.name}\n */\n itemLabel?: keyof T | ((item: T) => React.ReactNode);\n /**\n * Custom component for rendering items.\n * Must be memoized (React.memo) for optimal performance.\n * @example\n * const MyItem = React.memo(({ item, ...props }) => (\n * <VirtualMenu.Item {...props}>{item.name}</VirtualMenu.Item>\n * ));\n * <VirtualMenu items={items} renderItem={MyItem} />\n */\n renderItem?: React.ComponentType<VirtualMenuRenderItemProps<T>>;\n /**\n * Menu size - controls item height.\n * Automatically inherited from parent DropdownMenu.Content/ContextMenu.Content.\n * Only set manually when using VirtualMenu outside of a menu context.\n * @default '2' (or inherited from context)\n */\n size?: MenuSize;\n /**\n * Estimated height of each item in pixels.\n * Can be a number (same for all) or a function (per-item).\n * Usually not needed - height is automatically derived from size prop/context.\n * Use this only for custom item heights (e.g., variable height items).\n */\n estimatedItemSize?: number | ((index: number) => number);\n /** Number of items to render outside visible area */\n overscan?: number;\n /** Callback when an item is selected */\n onSelect?: (item: T, index: number) => void;\n /** Additional class name */\n className?: string;\n /** Additional styles */\n style?: React.CSSProperties;\n /** Accessible label for the menu */\n 'aria-label'?: string;\n}\n\n// ============================================================================\n// Internal Memoized Item Component\n// ============================================================================\n\ninterface SimpleItemProps {\n label: React.ReactNode;\n isHighlighted: boolean;\n id: string;\n style: React.CSSProperties;\n tabIndex: number;\n 'data-highlighted': true | undefined;\n 'data-index': number;\n onMouseEnter: (e: React.MouseEvent<HTMLElement>) => void;\n onMouseLeave: () => void;\n onClick: (e: React.MouseEvent<HTMLElement>) => void;\n onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;\n}\n\nconst SimpleItem = React.memo(\n function SimpleItem({\n label,\n isHighlighted: _isHighlighted,\n id,\n style,\n tabIndex,\n 'data-highlighted': dataHighlighted,\n 'data-index': dataIndex,\n onMouseEnter,\n onMouseLeave,\n onClick,\n onKeyDown,\n }: SimpleItemProps) {\n return (\n <div\n id={id}\n role=\"menuitem\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-VirtualMenuItem')}\n style={style}\n tabIndex={tabIndex}\n data-highlighted={dataHighlighted}\n data-index={dataIndex}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onClick={onClick}\n onKeyDown={onKeyDown}\n >\n {label}\n </div>\n );\n },\n (prev, next) => {\n // Custom comparison - only re-render if these change\n if (prev.label !== next.label) return false;\n if (prev['data-highlighted'] !== next['data-highlighted']) return false;\n if (prev.style.height !== next.style.height) return false;\n if (prev.style.transform !== next.style.transform) return false;\n if (prev.tabIndex !== next.tabIndex) return false;\n if (prev.id !== next.id) return false;\n // Event handlers are stable, skip comparison\n return true;\n },\n);\n\n// ============================================================================\n// VirtualMenu Component\n// ============================================================================\n\nfunction VirtualMenuRoot<T>({\n items,\n itemLabel,\n renderItem: RenderItem,\n size: sizeProp,\n estimatedItemSize: estimatedItemSizeProp,\n overscan = 5,\n onSelect,\n className,\n style,\n 'aria-label': ariaLabel,\n}: VirtualMenuProps<T>) {\n const menuId = React.useId();\n const parentRef = React.useRef<HTMLDivElement>(null);\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1);\n const { isInsideMenu, size: contextSize, itemHeight: contextItemHeight } = useMenuContext();\n\n // Resolve item height: explicit prop > own size > parent menu > default size '2'.\n // Heights follow the theme scaling, like the --base-menu-item-height token.\n const estimatedItemSize =\n estimatedItemSizeProp ??\n (sizeProp\n ? getMenuItemHeight(sizeProp)\n : (contextItemHeight ?? getMenuItemHeight(contextSize ?? '2')));\n\n // Validate props\n if (!itemLabel && !RenderItem) {\n throw new Error('VirtualMenu requires either itemLabel or renderItem prop');\n }\n\n // Normalize itemLabel to a function\n const getLabel = React.useMemo(() => {\n if (!itemLabel) return null;\n if (typeof itemLabel === 'function') return itemLabel;\n return (item: T) => item[itemLabel] as React.ReactNode;\n }, [itemLabel]);\n\n // Derive safe highlighted index\n const safeHighlightedIndex = React.useMemo(() => {\n if (items.length === 0) return -1;\n if (highlightedIndex < 0) return -1;\n return Math.min(highlightedIndex, items.length - 1);\n }, [highlightedIndex, items.length]);\n\n // Normalize estimatedItemSize to a function\n const getItemSize = React.useMemo(\n () =>\n typeof estimatedItemSize === 'function'\n ? estimatedItemSize\n : () => estimatedItemSize,\n [estimatedItemSize],\n );\n\n const virtualizer = useVirtualizer({\n count: items.length,\n getScrollElement: () => parentRef.current,\n estimateSize: getItemSize,\n overscan,\n });\n\n const virtualItems = virtualizer.getVirtualItems();\n\n // Refs for stable handler references\n const itemsRef = React.useRef(items);\n const onSelectRef = React.useRef(onSelect);\n itemsRef.current = items;\n onSelectRef.current = onSelect;\n\n const scrollToIndexRef = React.useRef(virtualizer.scrollToIndex);\n scrollToIndexRef.current = virtualizer.scrollToIndex;\n\n const highlightedIndexRef = React.useRef(safeHighlightedIndex);\n highlightedIndexRef.current = safeHighlightedIndex;\n\n // Stable event handlers\n const handleItemMouseEnter = React.useCallback((e: React.MouseEvent<HTMLElement>) => {\n const index = e.currentTarget.dataset.index;\n if (index != null) {\n setHighlightedIndex(Number(index));\n }\n }, []);\n\n const handleItemClick = React.useCallback((e: React.MouseEvent<HTMLElement>) => {\n const index = e.currentTarget.dataset.index;\n if (index != null) {\n const idx = Number(index);\n const currentItems = itemsRef.current;\n if (idx >= 0 && idx < currentItems.length) {\n onSelectRef.current?.(currentItems[idx], idx);\n }\n }\n }, []);\n\n const noop = React.useCallback(() => {}, []);\n\n // Item-level keyboard handler for Enter/Space activation (satisfies a11y lint rule)\n const handleItemKeyDown = React.useCallback((e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n const index = e.currentTarget.dataset.index;\n if (index != null) {\n const idx = Number(index);\n const currentItems = itemsRef.current;\n if (idx >= 0 && idx < currentItems.length) {\n onSelectRef.current?.(currentItems[idx], idx);\n }\n }\n }\n }, []);\n\n // Keyboard navigation\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\n const currentItems = itemsRef.current;\n const currentHighlightedIndex = highlightedIndexRef.current;\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n const nextIndex =\n currentHighlightedIndex < currentItems.length - 1 ? currentHighlightedIndex + 1 : 0;\n setHighlightedIndex(nextIndex);\n scrollToIndexRef.current(nextIndex, { align: 'auto' });\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n const prevIndex =\n currentHighlightedIndex > 0 ? currentHighlightedIndex - 1 : currentItems.length - 1;\n setHighlightedIndex(prevIndex);\n scrollToIndexRef.current(prevIndex, { align: 'auto' });\n break;\n }\n case 'Home': {\n e.preventDefault();\n setHighlightedIndex(0);\n scrollToIndexRef.current(0, { align: 'start' });\n break;\n }\n case 'End': {\n e.preventDefault();\n const lastIndex = currentItems.length - 1;\n setHighlightedIndex(lastIndex);\n scrollToIndexRef.current(lastIndex, { align: 'end' });\n break;\n }\n case 'Enter':\n case ' ': {\n e.preventDefault();\n if (currentHighlightedIndex >= 0 && currentHighlightedIndex < currentItems.length) {\n onSelectRef.current?.(currentItems[currentHighlightedIndex], currentHighlightedIndex);\n }\n break;\n }\n case 'Tab': {\n e.preventDefault();\n break;\n }\n case 'Escape': {\n (e.currentTarget as HTMLElement).blur();\n break;\n }\n }\n }, []);\n\n // Item ID generator\n const getItemId = React.useCallback(\n (index: number) => `${menuId}-item-${index}`,\n [menuId],\n );\n\n // Memoize styles\n const rootStyle = React.useMemo(\n () => ({\n overflow: 'auto' as const,\n position: 'relative' as const,\n ...style,\n }),\n [style],\n );\n\n const totalSize = virtualizer.getTotalSize();\n const viewportStyle = React.useMemo(\n () => ({\n height: `${totalSize}px`,\n width: '100%' as const,\n position: 'relative' as const,\n }),\n [totalSize],\n );\n\n return (\n <div\n ref={parentRef}\n role={isInsideMenu ? 'group' : 'menu'}\n aria-label={ariaLabel}\n aria-activedescendant={safeHighlightedIndex >= 0 ? getItemId(safeHighlightedIndex) : undefined}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n className={classNames('rt-VirtualMenuRoot', className)}\n style={rootStyle}\n >\n <div className=\"rt-VirtualMenuViewport\" style={viewportStyle}>\n {virtualItems.map((virtualRow) => {\n const item = items[virtualRow.index];\n const index = virtualRow.index;\n const isHighlighted = safeHighlightedIndex === index;\n\n const itemStyle: React.CSSProperties = {\n height: virtualRow.size,\n transform: `translateY(${virtualRow.start}px)`,\n };\n\n const commonProps = {\n id: getItemId(index),\n isHighlighted,\n style: itemStyle,\n tabIndex: isHighlighted ? 0 : -1,\n 'data-highlighted': isHighlighted ? true as const : undefined,\n 'data-index': index,\n onMouseEnter: handleItemMouseEnter,\n onMouseLeave: noop,\n onClick: handleItemClick,\n onKeyDown: handleItemKeyDown,\n };\n\n // Use renderItem if provided, otherwise use SimpleItem with itemLabel\n if (RenderItem) {\n return (\n <RenderItem\n key={virtualRow.key}\n item={item}\n index={index}\n {...commonProps}\n />\n );\n }\n\n return (\n <SimpleItem\n key={virtualRow.key}\n label={getLabel!(item)}\n {...commonProps}\n />\n );\n })}\n </div>\n </div>\n );\n}\n\nVirtualMenuRoot.displayName = 'VirtualMenu';\n\n// ============================================================================\n// VirtualMenu.Item Component (for custom renderItem usage)\n// ============================================================================\n\ninterface VirtualMenuItemProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n /** Data attribute for highlight styling */\n 'data-highlighted'?: true | undefined;\n /** Data attribute for event delegation */\n 'data-index'?: number;\n}\n\nconst VirtualMenuItemInner = React.forwardRef<HTMLDivElement, VirtualMenuItemProps>(\n ({ className, children, ...props }, forwardedRef) => {\n return (\n <div\n ref={forwardedRef}\n role=\"menuitem\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-VirtualMenuItem', className)}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nVirtualMenuItemInner.displayName = 'VirtualMenu.Item';\n\n// Memoized with custom comparison\nconst VirtualMenuItem = React.memo(VirtualMenuItemInner, (prevProps, nextProps) => {\n const prevStyle = prevProps.style as React.CSSProperties | undefined;\n const nextStyle = nextProps.style as React.CSSProperties | undefined;\n if (prevStyle?.height !== nextStyle?.height) return false;\n if (prevStyle?.transform !== nextStyle?.transform) return false;\n if (prevProps['data-highlighted'] !== nextProps['data-highlighted']) return false;\n if (prevProps.tabIndex !== nextProps.tabIndex) return false;\n if (prevProps.id !== nextProps.id) return false;\n if (prevProps.className !== nextProps.className) return false;\n if (prevProps.children !== nextProps.children) return false;\n return true;\n});\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nconst VirtualMenu = Object.assign(VirtualMenuRoot, {\n Item: VirtualMenuItem,\n});\n\nexport { VirtualMenu };\nexport type { VirtualMenuProps, VirtualMenuItemProps, VirtualMenuRenderItemProps };\n"],
5
+ "mappings": "+CAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,kBAAAC,MAAsB,0BAgI/B,IAAMC,EAAmB,OACvB,SAAoB,CAClB,MAAAC,EACA,cAAeC,EACf,GAAAC,EACA,MAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,aAAcC,EACd,aAAAC,EACA,aAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,OACE,gBAAC,OACC,GAAIR,EACJ,KAAK,WACL,UAAWS,EAAW,WAAY,kBAAmB,oBAAoB,EACzE,MAAOR,EACP,SAAUC,EACV,mBAAkBC,EAClB,aAAYC,EACZ,aAAcC,EACd,aAAcC,EACd,QAASC,EACT,UAAWC,GAEVV,CACH,CAEJ,EACA,CAACY,EAAMC,IAED,EAAAD,EAAK,QAAUC,EAAK,OACpBD,EAAK,kBAAkB,IAAMC,EAAK,kBAAkB,GACpDD,EAAK,MAAM,SAAWC,EAAK,MAAM,QACjCD,EAAK,MAAM,YAAcC,EAAK,MAAM,WACpCD,EAAK,WAAaC,EAAK,UACvBD,EAAK,KAAOC,EAAK,GAIzB,EAMA,SAASC,EAAmB,CAC1B,MAAAC,EACA,UAAAC,EACA,WAAYC,EACZ,KAAMC,EACN,kBAAmBC,EACnB,SAAAC,EAAW,EACX,SAAAC,EACA,UAAAC,EACA,MAAAnB,EACA,aAAcoB,CAChB,EAAwB,CACtB,IAAMC,EAAe,QAAM,EACrBC,EAAkB,SAAuB,IAAI,EAC7C,CAACC,EAAkBC,CAAmB,EAAU,WAAiB,EAAE,EACnE,CAAE,aAAAC,EAAc,KAAMC,EAAa,WAAYC,CAAkB,EAAIC,EAAe,EAIpFC,EACJb,IACCD,EACGe,EAAkBf,CAAQ,EACzBY,GAAqBG,EAAkBJ,GAAe,GAAG,GAGhE,GAAI,CAACb,GAAa,CAACC,EACjB,MAAM,IAAI,MAAM,0DAA0D,EAI5E,IAAMiB,EAAiB,UAAQ,IACxBlB,EACD,OAAOA,GAAc,WAAmBA,EACpCmB,GAAYA,EAAKnB,CAAS,EAFX,KAGtB,CAACA,CAAS,CAAC,EAGRoB,EAA6B,UAAQ,IACrCrB,EAAM,SAAW,GACjBW,EAAmB,EAAU,GAC1B,KAAK,IAAIA,EAAkBX,EAAM,OAAS,CAAC,EACjD,CAACW,EAAkBX,EAAM,MAAM,CAAC,EAG7BsB,EAAoB,UACxB,IACE,OAAOL,GAAsB,WACzBA,EACA,IAAMA,EACZ,CAACA,CAAiB,CACpB,EAEMM,EAAcC,EAAe,CACjC,MAAOxB,EAAM,OACb,iBAAkB,IAAMU,EAAU,QAClC,aAAcY,EACd,SAAAjB,CACF,CAAC,EAEKoB,EAAeF,EAAY,gBAAgB,EAG3CG,EAAiB,SAAO1B,CAAK,EAC7B2B,EAAoB,SAAOrB,CAAQ,EACzCoB,EAAS,QAAU1B,EACnB2B,EAAY,QAAUrB,EAEtB,IAAMsB,EAAyB,SAAOL,EAAY,aAAa,EAC/DK,EAAiB,QAAUL,EAAY,cAEvC,IAAMM,EAA4B,SAAOR,CAAoB,EAC7DQ,EAAoB,QAAUR,EAG9B,IAAMS,EAA6B,cAAaC,GAAqC,CACnF,IAAMC,EAAQD,EAAE,cAAc,QAAQ,MAClCC,GAAS,MACXpB,EAAoB,OAAOoB,CAAK,CAAC,CAErC,EAAG,CAAC,CAAC,EAECC,EAAwB,cAAaF,GAAqC,CAC9E,IAAMC,EAAQD,EAAE,cAAc,QAAQ,MACtC,GAAIC,GAAS,KAAM,CACjB,IAAME,EAAM,OAAOF,CAAK,EAClBG,EAAeT,EAAS,QAC1BQ,GAAO,GAAKA,EAAMC,EAAa,QACjCR,EAAY,UAAUQ,EAAaD,CAAG,EAAGA,CAAG,CAEhD,CACF,EAAG,CAAC,CAAC,EAECE,EAAa,cAAY,IAAM,CAAC,EAAG,CAAC,CAAC,EAGrCC,EAA0B,cAAaN,GAAwC,CACnF,GAAIA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,IAAK,CACtCA,EAAE,eAAe,EACjB,IAAMC,EAAQD,EAAE,cAAc,QAAQ,MACtC,GAAIC,GAAS,KAAM,CACjB,IAAME,EAAM,OAAOF,CAAK,EAClBG,EAAeT,EAAS,QAC1BQ,GAAO,GAAKA,EAAMC,EAAa,QACjCR,EAAY,UAAUQ,EAAaD,CAAG,EAAGA,CAAG,CAEhD,CACF,CACF,EAAG,CAAC,CAAC,EAGCI,EAAsB,cAAaP,GAA2B,CAClE,IAAMI,EAAeT,EAAS,QACxBa,EAA0BV,EAAoB,QAEpD,OAAQE,EAAE,IAAK,CACb,IAAK,YAAa,CAChBA,EAAE,eAAe,EACjB,IAAMS,EACJD,EAA0BJ,EAAa,OAAS,EAAII,EAA0B,EAAI,EACpF3B,EAAoB4B,CAAS,EAC7BZ,EAAiB,QAAQY,EAAW,CAAE,MAAO,MAAO,CAAC,EACrD,KACF,CACA,IAAK,UAAW,CACdT,EAAE,eAAe,EACjB,IAAMU,EACJF,EAA0B,EAAIA,EAA0B,EAAIJ,EAAa,OAAS,EACpFvB,EAAoB6B,CAAS,EAC7Bb,EAAiB,QAAQa,EAAW,CAAE,MAAO,MAAO,CAAC,EACrD,KACF,CACA,IAAK,OAAQ,CACXV,EAAE,eAAe,EACjBnB,EAAoB,CAAC,EACrBgB,EAAiB,QAAQ,EAAG,CAAE,MAAO,OAAQ,CAAC,EAC9C,KACF,CACA,IAAK,MAAO,CACVG,EAAE,eAAe,EACjB,IAAMW,EAAYP,EAAa,OAAS,EACxCvB,EAAoB8B,CAAS,EAC7Bd,EAAiB,QAAQc,EAAW,CAAE,MAAO,KAAM,CAAC,EACpD,KACF,CACA,IAAK,QACL,IAAK,IAAK,CACRX,EAAE,eAAe,EACbQ,GAA2B,GAAKA,EAA0BJ,EAAa,QACzER,EAAY,UAAUQ,EAAaI,CAAuB,EAAGA,CAAuB,EAEtF,KACF,CACA,IAAK,MAAO,CACVR,EAAE,eAAe,EACjB,KACF,CACA,IAAK,SAAU,CACZA,EAAE,cAA8B,KAAK,EACtC,KACF,CACF,CACF,EAAG,CAAC,CAAC,EAGCY,EAAkB,cACrBX,GAAkB,GAAGvB,CAAM,SAASuB,CAAK,GAC1C,CAACvB,CAAM,CACT,EAGMmC,EAAkB,UACtB,KAAO,CACL,SAAU,OACV,SAAU,WACV,GAAGxD,CACL,GACA,CAACA,CAAK,CACR,EAEMyD,EAAYtB,EAAY,aAAa,EACrCuB,EAAsB,UAC1B,KAAO,CACL,OAAQ,GAAGD,CAAS,KACpB,MAAO,OACP,SAAU,UACZ,GACA,CAACA,CAAS,CACZ,EAEA,OACE,gBAAC,OACC,IAAKnC,EACL,KAAMG,EAAe,QAAU,OAC/B,aAAYL,EACZ,wBAAuBa,GAAwB,EAAIsB,EAAUtB,CAAoB,EAAI,OACrF,SAAU,EACV,UAAWiB,EACX,UAAW1C,EAAW,qBAAsBW,CAAS,EACrD,MAAOqC,GAEP,gBAAC,OAAI,UAAU,yBAAyB,MAAOE,GAC5CrB,EAAa,IAAKsB,GAAe,CAChC,IAAM3B,EAAOpB,EAAM+C,EAAW,KAAK,EAC7Bf,EAAQe,EAAW,MACnBC,EAAgB3B,IAAyBW,EAEzCiB,EAAiC,CACrC,OAAQF,EAAW,KACnB,UAAW,cAAcA,EAAW,KAAK,KAC3C,EAEMG,EAAc,CAClB,GAAIP,EAAUX,CAAK,EACnB,cAAAgB,EACA,MAAOC,EACP,SAAUD,EAAgB,EAAI,GAC9B,mBAAoBA,EAAgB,GAAgB,OACpD,aAAchB,EACd,aAAcF,EACd,aAAcM,EACd,QAASH,EACT,UAAWI,CACb,EAGA,OAAInC,EAEA,gBAACA,EAAA,CACC,IAAK6C,EAAW,IAChB,KAAM3B,EACN,MAAOY,EACN,GAAGkB,EACN,EAKF,gBAAClE,EAAA,CACC,IAAK+D,EAAW,IAChB,MAAO5B,EAAUC,CAAI,EACpB,GAAG8B,EACN,CAEJ,CAAC,CACH,CACF,CAEJ,CAEAnD,EAAgB,YAAc,cAc9B,IAAMoD,EAA6B,aACjC,CAAC,CAAE,UAAA5C,EAAW,SAAA6C,EAAU,GAAGC,CAAM,EAAGC,IAEhC,gBAAC,OACC,IAAKA,EACL,KAAK,WACL,UAAW1D,EAAW,WAAY,kBAAmB,qBAAsBW,CAAS,EACnF,GAAG8C,GAEHD,CACH,CAGN,EAEAD,EAAqB,YAAc,mBAGnC,IAAMI,EAAwB,OAAKJ,EAAsB,CAACK,EAAWC,IAAc,CACjF,IAAMC,EAAYF,EAAU,MACtBG,EAAYF,EAAU,MAO5B,MANI,EAAAC,GAAW,SAAWC,GAAW,QACjCD,GAAW,YAAcC,GAAW,WACpCH,EAAU,kBAAkB,IAAMC,EAAU,kBAAkB,GAC9DD,EAAU,WAAaC,EAAU,UACjCD,EAAU,KAAOC,EAAU,IAC3BD,EAAU,YAAcC,EAAU,WAClCD,EAAU,WAAaC,EAAU,SAEvC,CAAC,EAMKG,GAAc,OAAO,OAAO7D,EAAiB,CACjD,KAAMwD,CACR,CAAC",
6
+ "names": ["React", "classNames", "useVirtualizer", "SimpleItem", "label", "_isHighlighted", "id", "style", "tabIndex", "dataHighlighted", "dataIndex", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "classNames", "prev", "next", "VirtualMenuRoot", "items", "itemLabel", "RenderItem", "sizeProp", "estimatedItemSizeProp", "overscan", "onSelect", "className", "ariaLabel", "menuId", "parentRef", "highlightedIndex", "setHighlightedIndex", "isInsideMenu", "contextSize", "contextItemHeight", "useMenuContext", "estimatedItemSize", "getMenuItemHeight", "getLabel", "item", "safeHighlightedIndex", "getItemSize", "virtualizer", "useVirtualizer", "virtualItems", "itemsRef", "onSelectRef", "scrollToIndexRef", "highlightedIndexRef", "handleItemMouseEnter", "e", "index", "handleItemClick", "idx", "currentItems", "noop", "handleItemKeyDown", "handleKeyDown", "currentHighlightedIndex", "nextIndex", "prevIndex", "lastIndex", "getItemId", "rootStyle", "totalSize", "viewportStyle", "virtualRow", "isHighlighted", "itemStyle", "commonProps", "VirtualMenuItemInner", "children", "props", "forwardedRef", "VirtualMenuItem", "prevProps", "nextProps", "prevStyle", "nextStyle", "VirtualMenu"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-WRWNN2NW.js";import{a as m}from"./chunk-RZCX6IBE.js";import{a as l}from"./chunk-QM3RCK5P.js";function g(i,n,e){return n!==void 0?n.has(e):i.includes(e)}function h({className:i,customProperties:n,...e}){let f=y({allowArbitraryValues:!0,className:i,...e}),r=v({customProperties:n,...e});return[f,r]}function y({allowArbitraryValues:i,value:n,className:e,propValues:f,propValueSet:r,parseValue:s=o=>o}){if(n){if(typeof n=="string")return g(f,r,n)?R(e,n,s):i?e:void 0;if(m(n)){let o=n,t=[];for(let p in o){if(!l(o,p)||!c.has(p))continue;let d=o[p];if(d!==void 0){if(g(f,r,d)){let u=R(e,d,s),a=p==="initial"?u:`${p}:${u}`;t.push(a)}else if(i){let u=p==="initial"?e:`${p}:${e}`;t.push(u)}}}return t.length>0?t.join(" "):""}if(i)return e}}function R(i,n,e){let f=i?"-":"",r=e(n),s=r?.startsWith("-"),o=s?"-":"",t=s?r?.substring(1):r;return`${o}${i}${f}${t}`}function v({customProperties:i,value:n,propValues:e,propValueSet:f,parseValue:r=s=>s}){if(!n||typeof n=="string"&&g(e,f,n))return;let s;if(typeof n=="string"){let o=r(n);s={};for(let t of i)s[t]=o;return s}if(m(n)){let o=n;for(let t in o){if(!l(o,t)||!c.has(t))continue;let p=o[t];if(p===void 0||g(e,f,p))continue;let d=r(p);s??(s={});for(let u of i){let a=t==="initial"?u:`${u}-${t}`;s[a]=d}}}return s??{}}export{h as a,y as b,v as c};
2
- //# sourceMappingURL=chunk-PBFSBHBS.js.map
1
+ import{b as c}from"./chunk-WRWNN2NW.js";import{a as l}from"./chunk-QM3RCK5P.js";import{a as m}from"./chunk-RZCX6IBE.js";function g(i,n,e){return n!==void 0?n.has(e):i.includes(e)}function h({className:i,customProperties:n,...e}){let f=y({allowArbitraryValues:!0,className:i,...e}),r=v({customProperties:n,...e});return[f,r]}function y({allowArbitraryValues:i,value:n,className:e,propValues:f,propValueSet:r,parseValue:s=o=>o}){if(n){if(typeof n=="string")return g(f,r,n)?R(e,n,s):i?e:void 0;if(m(n)){let o=n,t=[];for(let p in o){if(!l(o,p)||!c.has(p))continue;let d=o[p];if(d!==void 0){if(g(f,r,d)){let u=R(e,d,s),a=p==="initial"?u:`${p}:${u}`;t.push(a)}else if(i){let u=p==="initial"?e:`${p}:${e}`;t.push(u)}}}return t.length>0?t.join(" "):""}if(i)return e}}function R(i,n,e){let f=i?"-":"",r=e(n),s=r?.startsWith("-"),o=s?"-":"",t=s?r?.substring(1):r;return`${o}${i}${f}${t}`}function v({customProperties:i,value:n,propValues:e,propValueSet:f,parseValue:r=s=>s}){if(!n||typeof n=="string"&&g(e,f,n))return;let s;if(typeof n=="string"){let o=r(n);s={};for(let t of i)s[t]=o;return s}if(m(n)){let o=n;for(let t in o){if(!l(o,t)||!c.has(t))continue;let p=o[t];if(p===void 0||g(e,f,p))continue;let d=r(p);s??(s={});for(let u of i){let a=t==="initial"?u:`${u}-${t}`;s[a]=d}}}return s??{}}export{h as a,y as b,v as c};
2
+ //# sourceMappingURL=chunk-JUY7CBSL.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-PPNWGWN3.js";import{a as i}from"./chunk-PS6NEG5A.js";import{a as n}from"./chunk-K53W3ELO.js";import{a as e}from"./chunk-VX44UTQ5.js";import{a as p}from"./chunk-ERGJN7FJ.js";import{a as r}from"./chunk-UBSLEGQZ.js";import{a as s}from"./chunk-GSTOGDAJ.js";import*as o from"react";import a from"classnames";import{Slot as w}from"radix-ui";var x=o.forwardRef(({width:f,minWidth:P,maxWidth:c,height:l,minHeight:C,maxHeight:y,...d},h)=>{let{asChild:t,children:u,className:R,...v}=r(d,m,n,s),{className:N,style:g}=r({width:f,minWidth:P,maxWidth:c,height:l,minHeight:C,maxHeight:y},p,e),D=t?w.Root:"div";return o.createElement(D,{...v,ref:h,className:a("rt-Container",R)},i({asChild:t,children:u},j=>o.createElement("div",{className:a("rt-ContainerInner",N),style:g},j)))});x.displayName="Container";export{x as a};
2
- //# sourceMappingURL=chunk-XHF6RBOE.js.map
1
+ import{a as m}from"./chunk-PPNWGWN3.js";import{a as i}from"./chunk-PS6NEG5A.js";import{a as n}from"./chunk-K53W3ELO.js";import{a as e}from"./chunk-VX44UTQ5.js";import{a as p}from"./chunk-ERGJN7FJ.js";import{a as r}from"./chunk-6FLLFCBU.js";import{a as s}from"./chunk-2FPJ6Q2N.js";import*as o from"react";import a from"classnames";import{Slot as w}from"radix-ui";var x=o.forwardRef(({width:f,minWidth:P,maxWidth:c,height:l,minHeight:C,maxHeight:y,...d},h)=>{let{asChild:t,children:u,className:R,...v}=r(d,m,n,s),{className:N,style:g}=r({width:f,minWidth:P,maxWidth:c,height:l,minHeight:C,maxHeight:y},p,e),D=t?w.Root:"div";return o.createElement(D,{...v,ref:h,className:a("rt-Container",R)},i({asChild:t,children:u},j=>o.createElement("div",{className:a("rt-ContainerInner",N),style:g},j)))});x.displayName="Container";export{x as a};
2
+ //# sourceMappingURL=chunk-KRPEEM4C.js.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-VX44UTQ5.js";import{a as e}from"./chunk-ERGJN7FJ.js";import{a as t}from"./chunk-NZJGC6ZW.js";var r=["1","2","3","4"],f={...t,size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...o};export{f as a};
2
+ //# sourceMappingURL=chunk-LFUPGIPA.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/hover-card.props.tsx"],
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst hoverCardContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype HoverCardContentOwnProps = GetPropDefTypes<\n typeof hoverCardContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { hoverCardContentPropDefs };\nexport type { HoverCardContentOwnProps };\n"],
5
+ "mappings": "wHAMA,IAAMA,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAA2B,CAC/B,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOG,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL",
6
+ "names": ["contentSizes", "hoverCardContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-MJEYJI5G.js";import*as o from"react";import"radix-ui";var r=o.forwardRef((t,n)=>o.createElement(e,{...t,iconOnly:!0,ref:n}));r.displayName="ToggleIconButton";export{r as a};
2
- //# sourceMappingURL=chunk-EHUSLPWN.js.map
1
+ import{a as e}from"./chunk-XDV2SDJ3.js";import*as o from"react";import"radix-ui";var r=o.forwardRef((t,n)=>o.createElement(e,{...t,iconOnly:!0,ref:n}));r.displayName="ToggleIconButton";export{r as a};
2
+ //# sourceMappingURL=chunk-MLXFZDFU.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-FGORMEAO.js";import{b as t}from"./chunk-FWB47YCH.js";import{a as r}from"./chunk-K53W3ELO.js";import{a as p}from"./chunk-UBSLEGQZ.js";import{a as s}from"./chunk-GSTOGDAJ.js";import*as o from"react";import f from"classnames";var B=o.forwardRef((m,a)=>{let{className:n,asChild:i,as:P="div",...x}=p(m,e,r,s);return o.createElement(i?t:P,{...x,ref:a,className:f("rt-Box",n)})});B.displayName="Box";export{B as a};
2
- //# sourceMappingURL=chunk-K5SC3CZZ.js.map
1
+ import{a as e}from"./chunk-FGORMEAO.js";import{b as t}from"./chunk-FWB47YCH.js";import{a as r}from"./chunk-K53W3ELO.js";import{a as p}from"./chunk-6FLLFCBU.js";import{a as s}from"./chunk-2FPJ6Q2N.js";import*as o from"react";import f from"classnames";var B=o.forwardRef((m,a)=>{let{className:n,asChild:i,as:P="div",...x}=p(m,e,r,s);return o.createElement(i?t:P,{...x,ref:a,className:f("rt-Box",n)})});B.displayName="Box";export{B as a};
2
+ //# sourceMappingURL=chunk-N5OSP3PU.js.map
@@ -1,5 +1,5 @@
1
- import{a as m}from"./chunk-2N2AQNJH.js";import{a as u}from"./chunk-VT4AAF7Q.js";import{a as p}from"./chunk-ZH2B7WEH.js";import*as e from"react";import v from"classnames";var E={loud:"solid",medium:"raised",quiet:"ghost"};function w(t){if(t["aria-label"]||t["aria-labelledby"]||t.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
1
+ import{a as m}from"./chunk-2N2AQNJH.js";import{a as u}from"./chunk-WBGKTN35.js";import{a as p}from"./chunk-7UV4FYYL.js";import*as e from"react";import v from"classnames";var E={loud:"solid",medium:"raised",quiet:"ghost"};function w(t){if(t["aria-label"]||t["aria-labelledby"]||t.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
2
2
  - aria-label prop with descriptive text
3
3
  - aria-labelledby prop referencing a label element
4
4
  - or visible text children`)}var g=e.forwardRef(({className:t,style:r,tooltip:a,tooltipSide:c="top",tooltipAlign:d="center",tooltipDelayDuration:B,tooltipDisableHoverableContent:f,iconOnly:s=!1,emphasis:o,variant:i,...n},b)=>{let{tooltipId:y,hasTooltip:R,accessibilityProps:h}=m(a);if(s&&(w(n),n.fullWidth=!1),o!==void 0&&i!==void 0)throw new Error("Button: pass `emphasis` or `variant`, not both. They set the same thing.");let P=o!==void 0?E[o]:i,l=e.createElement(p,{...n,variant:P,...h,ref:b,className:v(s?"rt-IconButton":"rt-Button",t),style:r});return R?e.createElement(u,{content:a,side:c,align:d,delayDuration:B,disableHoverableContent:f,id:y},l):l});g.displayName="Button";export{g as a};
5
- //# sourceMappingURL=chunk-7FZPCM7W.js.map
5
+ //# sourceMappingURL=chunk-NEK7F746.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-HIEGLLY7.js";import{a as r}from"./chunk-7CBZFHSQ.js";import{a as s}from"./chunk-UBSLEGQZ.js";import{a}from"./chunk-GSTOGDAJ.js";import*as e from"react";import c from"classnames";var d=e.forwardRef((i,o)=>{let{className:m,children:n,loading:f,...l}=s(i,t,a);if(!f)return n;let p=e.createElement("span",{...l,ref:o,className:c("rt-Spinner",m)},e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?p:e.createElement(r,{asChild:!0,position:"relative",align:"center",justify:"center"},e.createElement("span",null,e.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),e.createElement(r,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,p))))});d.displayName="Spinner";export{d as a};
2
- //# sourceMappingURL=chunk-35HNDWWM.js.map
1
+ import{a as t}from"./chunk-HIEGLLY7.js";import{a as r}from"./chunk-OXYHRNJA.js";import{a as s}from"./chunk-6FLLFCBU.js";import{a}from"./chunk-2FPJ6Q2N.js";import*as e from"react";import c from"classnames";var d=e.forwardRef((i,o)=>{let{className:m,children:n,loading:f,...l}=s(i,t,a);if(!f)return n;let p=e.createElement("span",{...l,ref:o,className:c("rt-Spinner",m)},e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}),e.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?p:e.createElement(r,{asChild:!0,position:"relative",align:"center",justify:"center"},e.createElement("span",null,e.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),e.createElement(r,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,p))))});d.displayName="Spinner";export{d as a};
2
+ //# sourceMappingURL=chunk-NETIWKIR.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-G2CKYO2I.js";import{a as m}from"./chunk-AXUDFYLY.js";import{a as p}from"./chunk-KNQBAOMV.js";import{a as i}from"./chunk-2WSD2H23.js";import{a as s}from"./chunk-WYADYDPN.js";import{a as f}from"./chunk-ZE2KAVXW.js";import{b as e}from"./chunk-ZWZGUBL4.js";import{a as o}from"./chunk-NZJGC6ZW.js";import{c as r}from"./chunk-34KVYDF6.js";var a=["h1","h2","h3","h4","h5","h6"],n=["1","2","3","4","5","6","7","8","9"],g={as:{type:"enum",values:a,default:"h1"},...o,size:{type:"enum",className:"rt-r-size",values:n,default:"6",responsive:!0},...m,...i,...t,...p,...f,...s,...r,...e};export{g as a};
2
+ //# sourceMappingURL=chunk-NTGRWJEG.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/heading.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst headingPropDefs = {\n as: { type: 'enum', values: as, default: 'h1' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '6',\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { headingPropDefs };\n"],
5
- "mappings": "wWAYA,IAAMA,EAAK,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EACxCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EAE3EC,EAAkB,CACtB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,IAAK,EAC9C,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst headingPropDefs = {\n as: { type: 'enum', values: as, default: 'h1' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '6',\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { headingPropDefs };\n"],
5
+ "mappings": "wWAYA,IAAMA,EAAK,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EACxCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAkB,CACtB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,IAAK,EAC9C,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
6
6
  "names": ["as", "sizes", "headingPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-B72RMGWZ.js";import{a as p}from"./chunk-O6K6RZXY.js";import{a as e}from"./chunk-UBSLEGQZ.js";import*as o from"react";import P from"classnames";var c=o.forwardRef((s,n)=>{let{children:r,className:i,color:m,asChild:a,...f}=e(s,t);return o.createElement(p,{...f,"data-accent-color":m,ref:n,asChild:!0,className:P("rt-reset","rt-Link",i)},a?r:o.createElement("a",null,r))});c.displayName="Link";export{c as a};
2
- //# sourceMappingURL=chunk-CL6LRPCS.js.map
1
+ import{a as t}from"./chunk-WSKA5MZZ.js";import{a as p}from"./chunk-HJ6ACBXW.js";import{a as e}from"./chunk-6FLLFCBU.js";import*as o from"react";import P from"classnames";var c=o.forwardRef((s,n)=>{let{children:r,className:i,color:m,asChild:a,...f}=e(s,t);return o.createElement(p,{...f,"data-accent-color":m,ref:n,asChild:!0,className:P("rt-reset","rt-Link",i)},a?r:o.createElement("a",null,r))});c.displayName="Link";export{c as a};
2
+ //# sourceMappingURL=chunk-O7IPBLC7.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-ZMFZYXLB.js";import{a as p}from"./chunk-UBSLEGQZ.js";import{a as t}from"./chunk-GSTOGDAJ.js";import*as o from"react";import i from"classnames";import{Slot as P}from"radix-ui";var C=o.forwardRef((e,m)=>{let{asChild:d,className:n,color:r,...a}=p(e,s,t),c=e.variant==="ghost"?r||void 0:r,f=d?P.Root:"code";return o.createElement(f,{"data-accent-color":c,...a,ref:m,className:i("rt-reset","rt-Code",n)})});C.displayName="Code";export{C as a};
2
- //# sourceMappingURL=chunk-GVLTTTFL.js.map
1
+ import{a as s}from"./chunk-XDAQXNBQ.js";import{a as p}from"./chunk-6FLLFCBU.js";import{a as t}from"./chunk-2FPJ6Q2N.js";import*as o from"react";import i from"classnames";import{Slot as P}from"radix-ui";var C=o.forwardRef((e,m)=>{let{asChild:d,className:n,color:r,...a}=p(e,s,t),c=e.variant==="ghost"?r||void 0:r,f=d?P.Root:"code";return o.createElement(f,{"data-accent-color":c,...a,ref:m,className:i("rt-reset","rt-Code",n)})});C.displayName="Code";export{C as a};
2
+ //# sourceMappingURL=chunk-OLSTITVY.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-MLXHD7YF.js";import{a as o}from"./chunk-UBSLEGQZ.js";import{a as e}from"./chunk-GSTOGDAJ.js";import*as r from"react";import i from"classnames";var P=r.forwardRef((t,a)=>{let{className:s,color:m,decorative:n,...f}=o(t,p,e);return r.createElement("span",{"data-accent-color":m,role:n?void 0:"separator",...f,ref:a,className:i("rt-Separator",s)})});P.displayName="Separator";export{P as a};
2
- //# sourceMappingURL=chunk-UQZHW3EJ.js.map
1
+ import{a as p}from"./chunk-MLXHD7YF.js";import{a as o}from"./chunk-6FLLFCBU.js";import{a as e}from"./chunk-2FPJ6Q2N.js";import*as r from"react";import i from"classnames";var P=r.forwardRef((t,a)=>{let{className:s,color:m,decorative:n,...f}=o(t,p,e);return r.createElement("span",{"data-accent-color":m,role:n?void 0:"separator",...f,ref:a,className:i("rt-Separator",s)})});P.displayName="Separator";export{P as a};
2
+ //# sourceMappingURL=chunk-OMYAVTX6.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-SMGDH54W.js";import{b as s}from"./chunk-FWB47YCH.js";import{a as r}from"./chunk-K53W3ELO.js";import{a as p}from"./chunk-UBSLEGQZ.js";import{a as e}from"./chunk-GSTOGDAJ.js";import*as o from"react";import x from"classnames";var f=o.forwardRef((m,a)=>{let{className:l,asChild:n,as:i="div",...P}=p(m,t,r,e);return o.createElement(n?s:i,{...P,ref:a,className:x("rt-Flex",l)})});f.displayName="Flex";export{f as a};
2
- //# sourceMappingURL=chunk-7CBZFHSQ.js.map
1
+ import{a as t}from"./chunk-SMGDH54W.js";import{b as s}from"./chunk-FWB47YCH.js";import{a as r}from"./chunk-K53W3ELO.js";import{a as p}from"./chunk-6FLLFCBU.js";import{a as e}from"./chunk-2FPJ6Q2N.js";import*as o from"react";import x from"classnames";var f=o.forwardRef((m,a)=>{let{className:l,asChild:n,as:i="div",...P}=p(m,t,r,e);return o.createElement(n?s:i,{...P,ref:a,className:x("rt-Flex",l)})});f.displayName="Flex";export{f as a};
2
+ //# sourceMappingURL=chunk-OXYHRNJA.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-VSSJTPBV.js";import{a as f}from"./chunk-PS6NEG5A.js";import{a as c}from"./chunk-UBSLEGQZ.js";import{a as v}from"./chunk-GSTOGDAJ.js";import*as a from"react";import A from"classnames";import{Avatar as m}from"radix-ui";var R=a.forwardRef((e,s)=>{let{asChild:r,children:t,className:o,style:n,color:i,radius:p,status:l,badge:d,...g}=c(e,u,v),y=r&&t!=null&&a.isValidElement(t)&&(t.props.disabled===!0||t.props["data-disabled"]===!0),b=d!==void 0||l!==void 0;return a.createElement(m.Root,{"data-accent-color":i,"data-radius":p,"data-disabled":y||void 0,"data-has-indicator":b||void 0,className:A("rt-reset","rt-AvatarRoot",o),style:n,asChild:r},f({asChild:r,children:t},a.createElement(P,{ref:s,...g})),d!==void 0?a.createElement("span",{className:"rt-AvatarBadge"},d):l!==void 0?a.createElement("span",{className:"rt-AvatarStatus","data-accent-color":l}):null)});R.displayName="Avatar";var P=a.memo(a.forwardRef(({fallback:e,onLoadingStatusChange:s,...r},t)=>{let[o,n]=a.useState("idle"),i=a.useCallback(p=>{s?.(p),n(p)},[s]);return a.createElement(a.Fragment,null,o==="idle"||o==="loading"?a.createElement("span",{className:"rt-AvatarFallback"}):null,o==="error"?a.createElement(m.Fallback,{className:A("rt-AvatarFallback",{"rt-one-letter":typeof e=="string"&&e.length===1,"rt-two-letters":typeof e=="string"&&e.length===2}),delayMs:0},e):null,a.createElement(m.Image,{ref:t,className:"rt-AvatarImage",...r,onLoadingStatusChange:i}))}));P.displayName="AvatarImpl";export{R as a};
2
- //# sourceMappingURL=chunk-L6M2MI7Y.js.map
1
+ import{a as u}from"./chunk-VSSJTPBV.js";import{a as f}from"./chunk-PS6NEG5A.js";import{a as c}from"./chunk-6FLLFCBU.js";import{a as v}from"./chunk-2FPJ6Q2N.js";import*as a from"react";import A from"classnames";import{Avatar as m}from"radix-ui";var R=a.forwardRef((e,s)=>{let{asChild:r,children:t,className:o,style:n,color:i,radius:p,status:l,badge:d,...g}=c(e,u,v),y=r&&t!=null&&a.isValidElement(t)&&(t.props.disabled===!0||t.props["data-disabled"]===!0),b=d!==void 0||l!==void 0;return a.createElement(m.Root,{"data-accent-color":i,"data-radius":p,"data-disabled":y||void 0,"data-has-indicator":b||void 0,className:A("rt-reset","rt-AvatarRoot",o),style:n,asChild:r},f({asChild:r,children:t},a.createElement(P,{ref:s,...g})),d!==void 0?a.createElement("span",{className:"rt-AvatarBadge"},d):l!==void 0?a.createElement("span",{className:"rt-AvatarStatus","data-accent-color":l}):null)});R.displayName="Avatar";var P=a.memo(a.forwardRef(({fallback:e,onLoadingStatusChange:s,...r},t)=>{let[o,n]=a.useState("idle"),i=a.useCallback(p=>{s?.(p),n(p)},[s]);return a.createElement(a.Fragment,null,o==="idle"||o==="loading"?a.createElement("span",{className:"rt-AvatarFallback"}):null,o==="error"?a.createElement(m.Fallback,{className:A("rt-AvatarFallback",{"rt-one-letter":typeof e=="string"&&e.length===1,"rt-two-letters":typeof e=="string"&&e.length===2}),delayMs:0},e):null,a.createElement(m.Image,{ref:t,className:"rt-AvatarImage",...r,onLoadingStatusChange:i}))}));P.displayName="AvatarImpl";export{R as a};
2
+ //# sourceMappingURL=chunk-PIMNQEDG.js.map
@@ -1,2 +1,2 @@
1
- import{e as b}from"./chunk-3YLYGKFB.js";import{a}from"./chunk-UBSLEGQZ.js";import{a as p}from"./chunk-GSTOGDAJ.js";import{a as m}from"./chunk-5LGWS5QS.js";import{a as R}from"./chunk-OS3FCYZY.js";var y={};R(y,{Content:()=>c,List:()=>f,Root:()=>P,Trigger:()=>g});import*as e from"react";import i from"classnames";import{Tabs as n}from"radix-ui";var P=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Root,{...t,ref:o,className:i("rt-TabsRoot",r)})});P.displayName="Tabs.Root";var f=e.forwardRef((s,o)=>{let r=b(s,m.size),{className:t,color:T,...l}=a(r,m,p);return e.createElement(n.List,{"data-accent-color":T,...l,asChild:!1,ref:o,className:i("rt-BaseTabList","rt-TabsList",t)})});f.displayName="Tabs.List";var g=e.forwardRef((s,o)=>{let{className:r,children:t,...T}=s;return e.createElement(n.Trigger,{...T,asChild:!1,ref:o,className:i("rt-reset","rt-BaseTabListTrigger","rt-TabsTrigger",r)},e.createElement("span",{className:"rt-BaseTabListTriggerInner rt-TabsTriggerInner"},t),e.createElement("span",{className:"rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden"},t))});g.displayName="Tabs.Trigger";var c=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Content,{...t,ref:o,className:i("rt-TabsContent",r),"aria-live":"polite","aria-atomic":"true"})});c.displayName="Tabs.Content";export{P as a,f as b,g as c,c as d,y as e};
2
- //# sourceMappingURL=chunk-VIDXAECE.js.map
1
+ import{e as b}from"./chunk-3YLYGKFB.js";import{a}from"./chunk-6FLLFCBU.js";import{a as p}from"./chunk-2FPJ6Q2N.js";import{a as m}from"./chunk-5LGWS5QS.js";import{a as R}from"./chunk-OS3FCYZY.js";var y={};R(y,{Content:()=>c,List:()=>f,Root:()=>P,Trigger:()=>g});import*as e from"react";import i from"classnames";import{Tabs as n}from"radix-ui";var P=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Root,{...t,ref:o,className:i("rt-TabsRoot",r)})});P.displayName="Tabs.Root";var f=e.forwardRef((s,o)=>{let r=b(s,m.size),{className:t,color:T,...l}=a(r,m,p);return e.createElement(n.List,{"data-accent-color":T,...l,asChild:!1,ref:o,className:i("rt-BaseTabList","rt-TabsList",t)})});f.displayName="Tabs.List";var g=e.forwardRef((s,o)=>{let{className:r,children:t,...T}=s;return e.createElement(n.Trigger,{...T,asChild:!1,ref:o,className:i("rt-reset","rt-BaseTabListTrigger","rt-TabsTrigger",r)},e.createElement("span",{className:"rt-BaseTabListTriggerInner rt-TabsTriggerInner"},t),e.createElement("span",{className:"rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden"},t))});g.displayName="Tabs.Trigger";var c=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Content,{...t,ref:o,className:i("rt-TabsContent",r),"aria-live":"polite","aria-atomic":"true"})});c.displayName="Tabs.Content";export{P as a,f as b,g as c,c as d,y as e};
2
+ //# sourceMappingURL=chunk-Q5LPCJXN.js.map
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-ZCAI2PRH.js";import{a as P}from"./chunk-O6K6RZXY.js";import{d as f}from"./chunk-3YLYGKFB.js";import{a as u}from"./chunk-UBSLEGQZ.js";import{a as n}from"./chunk-GSTOGDAJ.js";import{a as v}from"./chunk-OS3FCYZY.js";var z={};v(z,{Item:()=>C,Root:()=>x});import*as o from"react";import G from"classnames";import{Context as h}from"radix-ui/internal";import{RadioGroup as d}from"radix-ui";var l="RadioGroup",[E]=h.createContextScope(l,[d.createRadioGroupScope]),I=d.createRadioGroupScope(),[_,y]=E(l),x=o.forwardRef(({color:a=R.color.default,size:e,variant:r=R.variant.default,...t},i)=>{let s=f(e,R.size),{__scopeRadioGroup:p,className:m,...N}=u(t,n),S=I(p);return o.createElement(_,{scope:p,color:a,size:s,variant:r},o.createElement(d.Root,{...S,...N,ref:i,className:G("rt-RadioGroupRoot",m)}))});x.displayName="RadioGroup.Root";var C=o.forwardRef((a,e)=>{let{__scopeRadioGroup:r,children:t,className:i,style:s,...p}=a,{size:m}=y("RadioGroupItem",r);return t?o.createElement(P,{as:"label",size:m,className:G("rt-RadioGroupItem",i),style:s},o.createElement(c,{__scopeRadioGroup:r,...p,ref:e}),t&&o.createElement("span",{className:"rt-RadioGroupItemInner"},t)):o.createElement(c,{__scopeRadioGroup:r,...p,ref:e,className:i,style:s})});C.displayName="RadioGroup.Item";var c=o.forwardRef(({__scopeRadioGroup:a,...e},r)=>{let t=y("RadioGroupItemRadio",a),i=I(a),{color:s,className:p}=u({...e,...t},R,n);return o.createElement(d.Item,{...i,"data-accent-color":s,...e,asChild:!1,ref:r,className:G("rt-reset","rt-BaseRadioRoot",p)})});c.displayName="RadioGroup.ItemRadio";export{x as a,C as b,z as c};
2
- //# sourceMappingURL=chunk-CRK34MWY.js.map
1
+ import{a as R}from"./chunk-ZCAI2PRH.js";import{a as P}from"./chunk-HJ6ACBXW.js";import{d as f}from"./chunk-3YLYGKFB.js";import{a as u}from"./chunk-6FLLFCBU.js";import{a as n}from"./chunk-2FPJ6Q2N.js";import{a as v}from"./chunk-OS3FCYZY.js";var z={};v(z,{Item:()=>C,Root:()=>x});import*as o from"react";import G from"classnames";import{Context as h}from"radix-ui/internal";import{RadioGroup as d}from"radix-ui";var l="RadioGroup",[E]=h.createContextScope(l,[d.createRadioGroupScope]),I=d.createRadioGroupScope(),[_,y]=E(l),x=o.forwardRef(({color:a=R.color.default,size:e,variant:r=R.variant.default,...t},i)=>{let s=f(e,R.size),{__scopeRadioGroup:p,className:m,...N}=u(t,n),S=I(p);return o.createElement(_,{scope:p,color:a,size:s,variant:r},o.createElement(d.Root,{...S,...N,ref:i,className:G("rt-RadioGroupRoot",m)}))});x.displayName="RadioGroup.Root";var C=o.forwardRef((a,e)=>{let{__scopeRadioGroup:r,children:t,className:i,style:s,...p}=a,{size:m}=y("RadioGroupItem",r);return t?o.createElement(P,{as:"label",size:m,className:G("rt-RadioGroupItem",i),style:s},o.createElement(c,{__scopeRadioGroup:r,...p,ref:e}),t&&o.createElement("span",{className:"rt-RadioGroupItemInner"},t)):o.createElement(c,{__scopeRadioGroup:r,...p,ref:e,className:i,style:s})});C.displayName="RadioGroup.Item";var c=o.forwardRef(({__scopeRadioGroup:a,...e},r)=>{let t=y("RadioGroupItemRadio",a),i=I(a),{color:s,className:p}=u({...e,...t},R,n);return o.createElement(d.Item,{...i,"data-accent-color":s,...e,asChild:!1,ref:r,className:G("rt-reset","rt-BaseRadioRoot",p)})});c.displayName="RadioGroup.ItemRadio";export{x as a,C as b,z as c};
2
+ //# sourceMappingURL=chunk-Q6GUADLO.js.map
@@ -1,2 +1,2 @@
1
- import{a as at}from"./chunk-GHD3TKCA.js";import{a as Be}from"./chunk-KPPIW4OJ.js";import{g as et,j as tt}from"./chunk-IX5HIHVI.js";import{a as we}from"./chunk-O6K6RZXY.js";import{a as Ze}from"./chunk-ZJZIV2JH.js";import{a as ze}from"./chunk-35HNDWWM.js";import{a as Fe}from"./chunk-7CBZFHSQ.js";import{a as De}from"./chunk-AGAQC4HH.js";import{b as U}from"./chunk-FWB47YCH.js";import{d as Qe}from"./chunk-3YLYGKFB.js";import{a as Ot}from"./chunk-OS3FCYZY.js";var Vt={};Ot(Vt,{AttachTrigger:()=>bt,Attachment:()=>$e,AttachmentsRow:()=>mt,InlineEnd:()=>ut,InlineStart:()=>dt,Item:()=>ft,Root:()=>it,Row:()=>Rt,RowEnd:()=>gt,RowStart:()=>Ct,Send:()=>vt,Textarea:()=>lt});import*as e from"react";import E from"classnames";import{useComposedRefs as ot}from"radix-ui/internal";import{useDropzone as Ht}from"react-dropzone";var je=typeof window<"u"?e.useLayoutEffect:e.useEffect;function nt(t,o){let{placeholder:a}=t;if(!a){o();return}t.placeholder="";try{o()}finally{t.placeholder=a}}var It={values:["1","2","3"]},st=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(st);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(o=>o.trim()).filter(Boolean):[],Ft=(t,o)=>{if(o.length===0)return!0;let a=t.type.toLowerCase(),c=t.name.toLowerCase();for(let i of o){let l=i.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[h,f]=a.split("/");if(d==="*"||d===h&&(u==="*"||u===f))return!0}else if(l.startsWith(".")&&c.endsWith(l))return!0}return!1},zt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,o)=>(o||"").toLowerCase().startsWith("image/")||zt.test(t),Ve=t=>t.trim().length>0,rt=(t,o)=>`${t} ${o}${t===1?"":"s"}`,Dt=0,Bt=()=>`chatbar-attachment-${Date.now()}-${++Dt}`,it=e.forwardRef((t,o)=>{let{className:a,style:c,children:i,value:l,defaultValue:d="",onValueChange:u,open:h,defaultOpen:f=!1,onOpenChange:g,expandOn:v="both",minLines:C=3,maxLines:w=6,sendMode:F="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:M,variant:z,color:O,radius:H,width:Q,maxWidth:R,attachments:G,defaultAttachments:B,onAttachmentsChange:se,accept:P,multiple:L=!0,maxAttachments:Z,maxFileSize:_,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:k,dropzone:N=!0,apiRef:Se,onBlurCapture:pe,notices:he,context:fe,...Ee}=t,W=Qe(M,It),be=l!=null,[r,y]=e.useState(d),A=be?l:r,ee=h!=null,[X,te]=e.useState(f),ce=ee?h:X,Y="attachments"in t,[ie,Re]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?G??[]:ie,[Y,G,ie]),[Ke,yt]=e.useState({text:"",id:0}),de=e.useCallback(n=>yt(s=>({text:n,id:s.id+1})),[]),Ue=e.useRef(null),xt=ot(o,Ue),Te=e.useRef(null),Le=e.useRef(null),ue=e.useRef(!1),Ce=e.useRef(!1),ge=e.useRef(void 0),ke=e.useRef(null),Ge=me(P).join(","),Ne=me(q).join(","),Me=e.useMemo(()=>me(Ge),[Ge]),Pt=e.useMemo(()=>Ne?me(Ne):Me,[Ne,Me]),_e={value:A,attachments:le,accepts:Me,pasteAccepts:Pt,multiple:L,maxAttachments:Z,maxFileSize:_,disabled:b,readOnly:S,expandOn:v,isValueControlled:be,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:u,onOpenChange:g,onAttachmentsChange:se,onAttachmentReject:k,onSubmit:D},x=e.useRef(_e);x.current=_e;let Oe=e.useRef(null),$=e.useCallback(()=>Oe.current??x.current.attachments,[]),ae=e.useCallback(n=>{x.current.isOpenControlled||te(n),x.current.onOpenChange?.(n)},[]),ve=e.useCallback(n=>{x.current.isValueControlled||y(n),x.current.onValueChange?.(n)},[]),ne=e.useCallback(n=>{Oe.current=n,queueMicrotask(()=>{Oe.current=null}),x.current.isAttachmentsControlled||Re(n),x.current.onAttachmentsChange?.(n)},[]),ye=e.useRef(new Set),re=e.useCallback((n,s,m=x.current.multiple)=>{let p=x.current;if(p.disabled||p.readOnly||n.length===0)return 0;let K=$(),J=[],oe=[],Nt=typeof p.maxAttachments=="number"?Math.max(p.maxAttachments-K.length,0):1/0,Mt=m?1/0:1;for(let T of n){if(J.length>=Nt||J.length>=Mt){oe.push({file:T,reason:"count"});continue}if(typeof p.maxFileSize=="number"&&T.size>p.maxFileSize){oe.push({file:T,reason:"size"});continue}if(!Ft(T,s)){oe.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ye.current.add(Ie),J.push({id:Bt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Ae=[];return J.length>0&&(ne(K.concat(J)),p.expandOn!=="none"&&ae(!0),Ae.push(`${rt(J.length,"file")} attached.`)),oe.length>0&&(p.onAttachmentReject?.(oe),Ae.push(`${rt(oe.length,"file")} could not be attached.`)),Ae.length>0&&de(Ae.join(" ")),J.length},[$,ne,ae,de]),xe=e.useCallback(n=>re(n,x.current.accepts),[re]),qe=e.useCallback(n=>re(n,x.current.pasteAccepts),[re]),Xe=e.useCallback(n=>{let s=$(),m=s.find(p=>p.id===n);m&&(ne(s.filter(p=>p.id!==n)),de(`Removed ${m.name}.`))},[$,ne,de]),Ye=e.useCallback(n=>{let s=x.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let p={value:s.value,attachments:m};if(n&&s.onSubmit)for(let K of m)K.url&&ye.current.delete(K.url);return s.onSubmit?.(p),n&&(ve(""),ne([])),!0},[$,ve,ne]);e.useEffect(()=>{let n=ye.current;if(n.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(n))s.has(m)||(URL.revokeObjectURL(m),n.delete(m))},[le]),e.useEffect(()=>{let n=ye.current;return()=>{if(!x.current.isAttachmentsControlled){for(let s of Array.from(n))URL.revokeObjectURL(s);n.clear()}}},[]);let Pe=e.useCallback(n=>{let s=x.current,m=Le.current;if(clearTimeout(ge.current),Ce.current=!1,!m||s.disabled||s.readOnly)return;let p=n?.accept!=null?me(n.accept):s.accepts,K=n?.multiple??s.multiple;ke.current={patterns:p,multiple:K},m.accept=p.join(","),m.multiple=K,ue.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Ce.current=!0,clearTimeout(ge.current),ge.current=setTimeout(()=>{Ce.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ge.current),[]),e.useEffect(()=>{let n=Le.current,s=()=>{ue.current=!1};return window.addEventListener("focus",s),n?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),n?.removeEventListener("cancel",s)}},[]);let At=e.useCallback(n=>{let s=n.currentTarget,m=Array.from(s.files??[]),p=ke.current;re(m,p?.patterns??x.current.accepts,p?.multiple),ue.current=!1,ke.current=null,s.value=""},[re]),wt=e.useCallback(n=>{pe?.(n);let s=x.current,m=Ue.current;if(!m||s.expandOn==="none")return;let p=n.relatedTarget;p&&m.contains(p)||ue.current||Ce.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(n=>{xe(n)},[xe]),{getRootProps:Et,isDragActive:Tt}=Ht({onDrop:St,onDragEnter:()=>de(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!N||b||S}),He=N&&Tt;e.useImperativeHandle(Se,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>Pe()}),[Pe]);let Lt=e.useCallback(n=>{if(b||n.pointerType==="mouse"&&n.button!==0)return;let s=n.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(n.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),kt=e.useMemo(()=>({open:ce,setOpen:ae,setValue:ve,size:W,expandOn:v,minLines:C,maxLines:w,sendMode:F,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:xe,appendFilesFromPaste:qe,openFilePicker:Pe,beginFilePickerPress:Je}),[ce,ae,ve,W,v,C,w,F,b,S,j,V,L,le,Xe,Ye,xe,qe,Pe,Je]);return e.createElement(st.Provider,{value:kt},e.createElement(We.Provider,{value:A},e.createElement(e.Fragment,null,e.createElement("div",{...Ee,ref:xt,className:E("rt-ChatbarRoot",`rt-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:R,...c},"data-state":ce?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":He?"":void 0,"data-accent-color":O,"data-radius":H,onBlurCapture:wt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:At}),he?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(at.Provider,{value:W},he)):null,e.createElement("div",{...N?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("rt-ChatbarBox",`rt-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":O,"data-radius":H},e.createElement("div",{className:"rt-ChatbarGrid"},i),He&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(we,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(we,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},fe):null,e.createElement(De,{role:"status","aria-live":"polite"},He?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});it.displayName="Chatbar.Root";var lt=e.forwardRef((t,o)=>{let{className:a,style:c,asChild:i,onFocus:l,onChange:d,onPaste:u,onKeyDown:h,onCompositionStart:f,onCompositionEnd:g,submitOnEnter:v=!1,...C}=t,w=I(),F=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:M,disabled:z,readOnly:O,setOpen:H,setValue:Q,textareaRef:R,paste:G,appendFilesFromPaste:B,size:se,submit:P,clearOnSubmit:L}=w,Z=ot(o,R),_=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let k=e.useCallback(()=>{let r=R.current;if(!r)return;let y=window.getComputedStyle(r);_.current=parseFloat(y.lineHeight)||20,j.current=(parseFloat(y.paddingTop)||0)+(parseFloat(y.paddingBottom)||0)},[R]),N=e.useCallback((r,y)=>{let{minLines:A,maxLines:ee}=V.current,X=_.current,te=j.current,ce=Math.ceil((y?A:1)*X)+te,Y=Math.ceil((y?ee:1)*X)+te,ie=Math.max(r.scrollHeight,ce);r.style.height=`${Math.min(ie,Y)}px`;let Re=ie>Y;r.style.overflowY=Re?"auto":"hidden",r.style.maxHeight=Re?`${Y}px`:"none"},[]);je(()=>{k()},[k,se]),je(()=>{let r=R.current;r&&(_.current===0&&k(),nt(r,()=>{r.style.height="auto";let y=b;if(!b&&(M==="overflow"||M==="both")){let A=Math.ceil(_.current)+j.current;r.scrollHeight>A+1&&(y=!0,H(!0))}N(r,y)}))},[F,b,M,S,D,se,H,R,k,N]),e.useEffect(()=>{let r=R.current;if(!r||typeof ResizeObserver>"u")return;let y=-1,A=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===y)return;let te=y===-1;y=X,!te&&(k(),nt(r,()=>{r.style.height="auto",N(r,V.current.open)}))});return A.observe(r),()=>A.disconnect()},[R,k,N]),e.useEffect(()=>{},[]);let Se=e.useCallback(r=>{l?.(r),!(z||O)&&(M==="focus"||M==="both")&&!b&&H(!0)},[z,O,M,b,H,l]),pe=e.useCallback(r=>{Q(r.currentTarget.value),d?.(r)},[Q,d]),he=e.useCallback(r=>{if(u?.(r),r.defaultPrevented||!G||z||O)return;let y=Array.from(r.clipboardData?.items??[]).filter(A=>A.kind==="file").map(A=>A.getAsFile()).filter(A=>!!A);y.length!==0&&B(y)>0&&r.preventDefault()},[G,z,O,u,B]),fe=e.useCallback(r=>{q.current=!0,f?.(r)},[f]),Ee=e.useCallback(r=>{q.current=!1,g?.(r)},[g]),W=e.useCallback(r=>{h?.(r),!(r.defaultPrevented||!v)&&(r.key!=="Enter"||r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||q.current||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||(r.preventDefault(),P(L)))},[v,h,P,L]),be=i?U:"textarea";return e.createElement("div",{className:E("rt-ChatbarField","rt-ChatbarTextarea",a)},e.createElement(be,{...C,ref:Z,className:"rt-ChatbarInput",value:F,onChange:pe,onFocus:Se,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Ee,disabled:z,readOnly:O,rows:b?S:1,spellCheck:C.spellCheck??!0,autoCorrect:C.autoCorrect??"on",style:c}))});lt.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?U:"div",{...l,ref:o,className:E("rt-ChatbarInlineStart",i)},a)});dt.displayName="Chatbar.InlineStart";var ut=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?U:"div",{...l,ref:o,className:E("rt-ChatbarInlineEnd",i)},a)});ut.displayName="Chatbar.InlineEnd";var mt=e.forwardRef((t,o)=>{let{asChild:a,forceMount:c,renderAttachment:i,className:l,children:d,...u}=t,h=I(),f=e.Children.toArray(d).length>0;return h.attachments.length===0&&!f&&!c?null:e.createElement("div",null,e.createElement(a?U:"div",{...u,ref:o,className:E("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(Ze,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(Fe,{align:"center",gap:"3",minWidth:"fit-content"},h.attachments.map(v=>e.createElement($e,{key:v.id,attachment:v,asChild:!!i},i?.(v))),d))))});mt.displayName="Chatbar.AttachmentsRow";function pt(t,o){let a=t.closest('[role="listitem"]'),c=a?.parentElement?Array.from(a.parentElement.children):[],i=a?c.indexOf(a):-1,d=(c[i+1]??c[i-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():o.current?.focus({preventScroll:!0})}var ht=({lead:t,leadKind:o,label:a,detail:c,removeLabel:i,onRemove:l})=>{let d=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":o,"aria-hidden":!0},t),e.createElement(we,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},a,c?e.createElement(De,null,", ",c):null),l&&e.createElement(Be,{className:"rt-ChatbarItemRemove","aria-label":i,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(et,null)))},jt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,o)=>{let{attachment:a,asChild:c,className:i,children:l,...d}=t,u=I(),h=c?U:"div",f=!!a.url&&ct(a.name,a.type),g=`${Math.ceil(a.size/1024)} KB`,v=a.status?jt[a.status]:void 0,C=u.disabled||u.readOnly,w=b=>{pt(b.currentTarget,u.textareaRef),u.removeAttachment(a.id)},F=a.status==="uploading"?e.createElement(ze,null):f?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(tt,null);return e.createElement(h,{...d,ref:o,className:E(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",i),role:"listitem","data-kind":f?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ht,{lead:F,leadKind:f&&a.status!=="uploading"?"image":"icon",label:a.name,detail:v?`${g}, ${v}`:g,removeLabel:`Remove ${a.name}`,onRemove:C?void 0:w}))});$e.displayName="Chatbar.Attachment";var ft=e.forwardRef((t,o)=>{let{children:a,icon:c,image:i,color:l,onRemove:d,removeLabel:u,className:h,...f}=t,g=I(),v=g.disabled||g.readOnly,C=d?w=>{pt(w.currentTarget,g.textareaRef),d()}:void 0;return e.createElement("div",{...f,ref:o,className:E("rt-ChatbarItem",h),role:"listitem","data-accent-color":i?void 0:l??"gray",title:a},e.createElement(ht,{lead:i?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:i,alt:""}):c,leadKind:i?"image":"icon",label:a,removeLabel:u??`Remove ${a}`,onRemove:v?void 0:C}))});ft.displayName="Chatbar.Item";var bt=e.forwardRef((t,o)=>{let{asChild:a,accept:c,multiple:i,disabled:l,onPointerDown:d,onClick:u,...h}=t,f=I(),g=l||f.disabled||f.readOnly;return e.createElement(a?U:"button",{...h,ref:o,className:E("rt-ChatbarAttachTrigger",h.className),type:h.type??"button","aria-label":h["aria-label"]??"Add attachments",disabled:g,onPointerDown:C=>{d?.(C),!g&&!C.defaultPrevented&&f.beginFilePickerPress()},onClick:C=>{u?.(C),!(g||C.defaultPrevented)&&f.openFilePicker({accept:c,multiple:i})}})});bt.displayName="Chatbar.AttachTrigger";var Rt=e.forwardRef((t,o)=>{let{asChild:a,children:c,className:i,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:o,className:E("rt-ChatbarRow",i)},e.createElement(Fe,{align:"center",justify:"between",width:"100%"},c))):null});Rt.displayName="Chatbar.Row";var Ct=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:E("rt-ChatbarRowStart",a)})});Ct.displayName="Chatbar.RowStart";var gt=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:E("rt-ChatbarRowEnd",a)})});gt.displayName="Chatbar.RowEnd";var vt=e.forwardRef((t,o)=>{let{asChild:a,clearOnSend:c,disabled:i,children:l,style:d,className:u,size:h,variant:f,emphasis:g,tabIndex:v,onClick:C,status:w="ready",onStop:F,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:M,retryIcon:z,"aria-label":O,"aria-labelledby":H,...Q}=t,R=I(),G=e.useContext(We),B=Ve(G)||R.attachments.length>0,P=B?"send":w==="submitted"||w==="streaming"?"stop":w==="error"?"retry":"send";if(R.sendMode==="never"&&P==="send")return null;let L=P!=="send"||R.sendMode==="always"||B,Z=P==="send"?i||R.disabled||R.readOnly||!B:i||R.disabled,j=P==="stop"?{"aria-label":S}:P==="retry"?{"aria-label":D}:H?{"aria-labelledby":H}:{"aria-label":O??"Send"},q=k=>{if(C?.(k),k.defaultPrevented||Z)return;if(P==="stop"){F?.();return}if(P==="retry"){b?.();return}let N=c??R.clearOnSubmit;R.submit(N)&&N&&R.textareaRef.current?.focus({preventScroll:!0})},V=P==="stop"?M??(w==="submitted"?e.createElement(ze,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):P==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(Be,{...Q,ref:o,size:h??R.size,...g?{emphasis:g}:{variant:f??(R.open||P!=="send"?"solid":"ghost")},disabled:Z,className:E("rt-ChatbarSend",u),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...d},"aria-hidden":L?void 0:!0,tabIndex:L?v:-1,asChild:a,onClick:q,"data-status":w,"data-mode":P,...j},V)});vt.displayName="Chatbar.Send";export{it as a,lt as b,dt as c,ut as d,mt as e,$e as f,ft as g,bt as h,Rt as i,Ct as j,gt as k,vt as l,Vt as m};
2
- //# sourceMappingURL=chunk-EA2XSEFH.js.map
1
+ import{a as at}from"./chunk-74SNS4VY.js";import{a as Be}from"./chunk-HJZNHNLX.js";import{g as et,j as tt}from"./chunk-IX5HIHVI.js";import{a as we}from"./chunk-HJ6ACBXW.js";import{a as Ze}from"./chunk-42LDZ7L5.js";import{a as ze}from"./chunk-NETIWKIR.js";import{a as Fe}from"./chunk-OXYHRNJA.js";import{a as De}from"./chunk-AGAQC4HH.js";import{b as U}from"./chunk-FWB47YCH.js";import{d as Qe}from"./chunk-3YLYGKFB.js";import{a as Ot}from"./chunk-OS3FCYZY.js";var Vt={};Ot(Vt,{AttachTrigger:()=>bt,Attachment:()=>$e,AttachmentsRow:()=>mt,InlineEnd:()=>ut,InlineStart:()=>dt,Item:()=>ft,Root:()=>it,Row:()=>Rt,RowEnd:()=>gt,RowStart:()=>Ct,Send:()=>vt,Textarea:()=>lt});import*as e from"react";import E from"classnames";import{useComposedRefs as ot}from"radix-ui/internal";import{useDropzone as Ht}from"react-dropzone";var je=typeof window<"u"?e.useLayoutEffect:e.useEffect;function nt(t,o){let{placeholder:a}=t;if(!a){o();return}t.placeholder="";try{o()}finally{t.placeholder=a}}var It={values:["1","2","3"]},st=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(st);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(o=>o.trim()).filter(Boolean):[],Ft=(t,o)=>{if(o.length===0)return!0;let a=t.type.toLowerCase(),c=t.name.toLowerCase();for(let i of o){let l=i.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[h,f]=a.split("/");if(d==="*"||d===h&&(u==="*"||u===f))return!0}else if(l.startsWith(".")&&c.endsWith(l))return!0}return!1},zt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,o)=>(o||"").toLowerCase().startsWith("image/")||zt.test(t),Ve=t=>t.trim().length>0,rt=(t,o)=>`${t} ${o}${t===1?"":"s"}`,Dt=0,Bt=()=>`chatbar-attachment-${Date.now()}-${++Dt}`,it=e.forwardRef((t,o)=>{let{className:a,style:c,children:i,value:l,defaultValue:d="",onValueChange:u,open:h,defaultOpen:f=!1,onOpenChange:g,expandOn:v="both",minLines:C=3,maxLines:w=6,sendMode:F="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:M,variant:z,color:O,radius:H,width:Q,maxWidth:R,attachments:G,defaultAttachments:B,onAttachmentsChange:se,accept:P,multiple:L=!0,maxAttachments:Z,maxFileSize:_,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:k,dropzone:N=!0,apiRef:Se,onBlurCapture:pe,notices:he,context:fe,...Ee}=t,W=Qe(M,It),be=l!=null,[r,y]=e.useState(d),A=be?l:r,ee=h!=null,[X,te]=e.useState(f),ce=ee?h:X,Y="attachments"in t,[ie,Re]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?G??[]:ie,[Y,G,ie]),[Ke,yt]=e.useState({text:"",id:0}),de=e.useCallback(n=>yt(s=>({text:n,id:s.id+1})),[]),Ue=e.useRef(null),xt=ot(o,Ue),Te=e.useRef(null),Le=e.useRef(null),ue=e.useRef(!1),Ce=e.useRef(!1),ge=e.useRef(void 0),ke=e.useRef(null),Ge=me(P).join(","),Ne=me(q).join(","),Me=e.useMemo(()=>me(Ge),[Ge]),Pt=e.useMemo(()=>Ne?me(Ne):Me,[Ne,Me]),_e={value:A,attachments:le,accepts:Me,pasteAccepts:Pt,multiple:L,maxAttachments:Z,maxFileSize:_,disabled:b,readOnly:S,expandOn:v,isValueControlled:be,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:u,onOpenChange:g,onAttachmentsChange:se,onAttachmentReject:k,onSubmit:D},x=e.useRef(_e);x.current=_e;let Oe=e.useRef(null),$=e.useCallback(()=>Oe.current??x.current.attachments,[]),ae=e.useCallback(n=>{x.current.isOpenControlled||te(n),x.current.onOpenChange?.(n)},[]),ve=e.useCallback(n=>{x.current.isValueControlled||y(n),x.current.onValueChange?.(n)},[]),ne=e.useCallback(n=>{Oe.current=n,queueMicrotask(()=>{Oe.current=null}),x.current.isAttachmentsControlled||Re(n),x.current.onAttachmentsChange?.(n)},[]),ye=e.useRef(new Set),re=e.useCallback((n,s,m=x.current.multiple)=>{let p=x.current;if(p.disabled||p.readOnly||n.length===0)return 0;let K=$(),J=[],oe=[],Nt=typeof p.maxAttachments=="number"?Math.max(p.maxAttachments-K.length,0):1/0,Mt=m?1/0:1;for(let T of n){if(J.length>=Nt||J.length>=Mt){oe.push({file:T,reason:"count"});continue}if(typeof p.maxFileSize=="number"&&T.size>p.maxFileSize){oe.push({file:T,reason:"size"});continue}if(!Ft(T,s)){oe.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ye.current.add(Ie),J.push({id:Bt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Ae=[];return J.length>0&&(ne(K.concat(J)),p.expandOn!=="none"&&ae(!0),Ae.push(`${rt(J.length,"file")} attached.`)),oe.length>0&&(p.onAttachmentReject?.(oe),Ae.push(`${rt(oe.length,"file")} could not be attached.`)),Ae.length>0&&de(Ae.join(" ")),J.length},[$,ne,ae,de]),xe=e.useCallback(n=>re(n,x.current.accepts),[re]),qe=e.useCallback(n=>re(n,x.current.pasteAccepts),[re]),Xe=e.useCallback(n=>{let s=$(),m=s.find(p=>p.id===n);m&&(ne(s.filter(p=>p.id!==n)),de(`Removed ${m.name}.`))},[$,ne,de]),Ye=e.useCallback(n=>{let s=x.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let p={value:s.value,attachments:m};if(n&&s.onSubmit)for(let K of m)K.url&&ye.current.delete(K.url);return s.onSubmit?.(p),n&&(ve(""),ne([])),!0},[$,ve,ne]);e.useEffect(()=>{let n=ye.current;if(n.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(n))s.has(m)||(URL.revokeObjectURL(m),n.delete(m))},[le]),e.useEffect(()=>{let n=ye.current;return()=>{if(!x.current.isAttachmentsControlled){for(let s of Array.from(n))URL.revokeObjectURL(s);n.clear()}}},[]);let Pe=e.useCallback(n=>{let s=x.current,m=Le.current;if(clearTimeout(ge.current),Ce.current=!1,!m||s.disabled||s.readOnly)return;let p=n?.accept!=null?me(n.accept):s.accepts,K=n?.multiple??s.multiple;ke.current={patterns:p,multiple:K},m.accept=p.join(","),m.multiple=K,ue.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Ce.current=!0,clearTimeout(ge.current),ge.current=setTimeout(()=>{Ce.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ge.current),[]),e.useEffect(()=>{let n=Le.current,s=()=>{ue.current=!1};return window.addEventListener("focus",s),n?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),n?.removeEventListener("cancel",s)}},[]);let At=e.useCallback(n=>{let s=n.currentTarget,m=Array.from(s.files??[]),p=ke.current;re(m,p?.patterns??x.current.accepts,p?.multiple),ue.current=!1,ke.current=null,s.value=""},[re]),wt=e.useCallback(n=>{pe?.(n);let s=x.current,m=Ue.current;if(!m||s.expandOn==="none")return;let p=n.relatedTarget;p&&m.contains(p)||ue.current||Ce.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(n=>{xe(n)},[xe]),{getRootProps:Et,isDragActive:Tt}=Ht({onDrop:St,onDragEnter:()=>de(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!N||b||S}),He=N&&Tt;e.useImperativeHandle(Se,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>Pe()}),[Pe]);let Lt=e.useCallback(n=>{if(b||n.pointerType==="mouse"&&n.button!==0)return;let s=n.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(n.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),kt=e.useMemo(()=>({open:ce,setOpen:ae,setValue:ve,size:W,expandOn:v,minLines:C,maxLines:w,sendMode:F,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:xe,appendFilesFromPaste:qe,openFilePicker:Pe,beginFilePickerPress:Je}),[ce,ae,ve,W,v,C,w,F,b,S,j,V,L,le,Xe,Ye,xe,qe,Pe,Je]);return e.createElement(st.Provider,{value:kt},e.createElement(We.Provider,{value:A},e.createElement(e.Fragment,null,e.createElement("div",{...Ee,ref:xt,className:E("rt-ChatbarRoot",`rt-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:R,...c},"data-state":ce?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":He?"":void 0,"data-accent-color":O,"data-radius":H,onBlurCapture:wt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:At}),he?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(at.Provider,{value:W},he)):null,e.createElement("div",{...N?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("rt-ChatbarBox",`rt-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":O,"data-radius":H},e.createElement("div",{className:"rt-ChatbarGrid"},i),He&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(we,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(we,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},fe):null,e.createElement(De,{role:"status","aria-live":"polite"},He?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});it.displayName="Chatbar.Root";var lt=e.forwardRef((t,o)=>{let{className:a,style:c,asChild:i,onFocus:l,onChange:d,onPaste:u,onKeyDown:h,onCompositionStart:f,onCompositionEnd:g,submitOnEnter:v=!1,...C}=t,w=I(),F=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:M,disabled:z,readOnly:O,setOpen:H,setValue:Q,textareaRef:R,paste:G,appendFilesFromPaste:B,size:se,submit:P,clearOnSubmit:L}=w,Z=ot(o,R),_=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let k=e.useCallback(()=>{let r=R.current;if(!r)return;let y=window.getComputedStyle(r);_.current=parseFloat(y.lineHeight)||20,j.current=(parseFloat(y.paddingTop)||0)+(parseFloat(y.paddingBottom)||0)},[R]),N=e.useCallback((r,y)=>{let{minLines:A,maxLines:ee}=V.current,X=_.current,te=j.current,ce=Math.ceil((y?A:1)*X)+te,Y=Math.ceil((y?ee:1)*X)+te,ie=Math.max(r.scrollHeight,ce);r.style.height=`${Math.min(ie,Y)}px`;let Re=ie>Y;r.style.overflowY=Re?"auto":"hidden",r.style.maxHeight=Re?`${Y}px`:"none"},[]);je(()=>{k()},[k,se]),je(()=>{let r=R.current;r&&(_.current===0&&k(),nt(r,()=>{r.style.height="auto";let y=b;if(!b&&(M==="overflow"||M==="both")){let A=Math.ceil(_.current)+j.current;r.scrollHeight>A+1&&(y=!0,H(!0))}N(r,y)}))},[F,b,M,S,D,se,H,R,k,N]),e.useEffect(()=>{let r=R.current;if(!r||typeof ResizeObserver>"u")return;let y=-1,A=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===y)return;let te=y===-1;y=X,!te&&(k(),nt(r,()=>{r.style.height="auto",N(r,V.current.open)}))});return A.observe(r),()=>A.disconnect()},[R,k,N]),e.useEffect(()=>{},[]);let Se=e.useCallback(r=>{l?.(r),!(z||O)&&(M==="focus"||M==="both")&&!b&&H(!0)},[z,O,M,b,H,l]),pe=e.useCallback(r=>{Q(r.currentTarget.value),d?.(r)},[Q,d]),he=e.useCallback(r=>{if(u?.(r),r.defaultPrevented||!G||z||O)return;let y=Array.from(r.clipboardData?.items??[]).filter(A=>A.kind==="file").map(A=>A.getAsFile()).filter(A=>!!A);y.length!==0&&B(y)>0&&r.preventDefault()},[G,z,O,u,B]),fe=e.useCallback(r=>{q.current=!0,f?.(r)},[f]),Ee=e.useCallback(r=>{q.current=!1,g?.(r)},[g]),W=e.useCallback(r=>{h?.(r),!(r.defaultPrevented||!v)&&(r.key!=="Enter"||r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||q.current||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||(r.preventDefault(),P(L)))},[v,h,P,L]),be=i?U:"textarea";return e.createElement("div",{className:E("rt-ChatbarField","rt-ChatbarTextarea",a)},e.createElement(be,{...C,ref:Z,className:"rt-ChatbarInput",value:F,onChange:pe,onFocus:Se,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Ee,disabled:z,readOnly:O,rows:b?S:1,spellCheck:C.spellCheck??!0,autoCorrect:C.autoCorrect??"on",style:c}))});lt.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?U:"div",{...l,ref:o,className:E("rt-ChatbarInlineStart",i)},a)});dt.displayName="Chatbar.InlineStart";var ut=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?U:"div",{...l,ref:o,className:E("rt-ChatbarInlineEnd",i)},a)});ut.displayName="Chatbar.InlineEnd";var mt=e.forwardRef((t,o)=>{let{asChild:a,forceMount:c,renderAttachment:i,className:l,children:d,...u}=t,h=I(),f=e.Children.toArray(d).length>0;return h.attachments.length===0&&!f&&!c?null:e.createElement("div",null,e.createElement(a?U:"div",{...u,ref:o,className:E("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(Ze,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(Fe,{align:"center",gap:"3",minWidth:"fit-content"},h.attachments.map(v=>e.createElement($e,{key:v.id,attachment:v,asChild:!!i},i?.(v))),d))))});mt.displayName="Chatbar.AttachmentsRow";function pt(t,o){let a=t.closest('[role="listitem"]'),c=a?.parentElement?Array.from(a.parentElement.children):[],i=a?c.indexOf(a):-1,d=(c[i+1]??c[i-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():o.current?.focus({preventScroll:!0})}var ht=({lead:t,leadKind:o,label:a,detail:c,removeLabel:i,onRemove:l})=>{let d=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":o,"aria-hidden":!0},t),e.createElement(we,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},a,c?e.createElement(De,null,", ",c):null),l&&e.createElement(Be,{className:"rt-ChatbarItemRemove","aria-label":i,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(et,null)))},jt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,o)=>{let{attachment:a,asChild:c,className:i,children:l,...d}=t,u=I(),h=c?U:"div",f=!!a.url&&ct(a.name,a.type),g=`${Math.ceil(a.size/1024)} KB`,v=a.status?jt[a.status]:void 0,C=u.disabled||u.readOnly,w=b=>{pt(b.currentTarget,u.textareaRef),u.removeAttachment(a.id)},F=a.status==="uploading"?e.createElement(ze,null):f?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(tt,null);return e.createElement(h,{...d,ref:o,className:E(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",i),role:"listitem","data-kind":f?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ht,{lead:F,leadKind:f&&a.status!=="uploading"?"image":"icon",label:a.name,detail:v?`${g}, ${v}`:g,removeLabel:`Remove ${a.name}`,onRemove:C?void 0:w}))});$e.displayName="Chatbar.Attachment";var ft=e.forwardRef((t,o)=>{let{children:a,icon:c,image:i,color:l,onRemove:d,removeLabel:u,className:h,...f}=t,g=I(),v=g.disabled||g.readOnly,C=d?w=>{pt(w.currentTarget,g.textareaRef),d()}:void 0;return e.createElement("div",{...f,ref:o,className:E("rt-ChatbarItem",h),role:"listitem","data-accent-color":i?void 0:l??"gray",title:a},e.createElement(ht,{lead:i?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:i,alt:""}):c,leadKind:i?"image":"icon",label:a,removeLabel:u??`Remove ${a}`,onRemove:v?void 0:C}))});ft.displayName="Chatbar.Item";var bt=e.forwardRef((t,o)=>{let{asChild:a,accept:c,multiple:i,disabled:l,onPointerDown:d,onClick:u,...h}=t,f=I(),g=l||f.disabled||f.readOnly;return e.createElement(a?U:"button",{...h,ref:o,className:E("rt-ChatbarAttachTrigger",h.className),type:h.type??"button","aria-label":h["aria-label"]??"Add attachments",disabled:g,onPointerDown:C=>{d?.(C),!g&&!C.defaultPrevented&&f.beginFilePickerPress()},onClick:C=>{u?.(C),!(g||C.defaultPrevented)&&f.openFilePicker({accept:c,multiple:i})}})});bt.displayName="Chatbar.AttachTrigger";var Rt=e.forwardRef((t,o)=>{let{asChild:a,children:c,className:i,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:o,className:E("rt-ChatbarRow",i)},e.createElement(Fe,{align:"center",justify:"between",width:"100%"},c))):null});Rt.displayName="Chatbar.Row";var Ct=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:E("rt-ChatbarRowStart",a)})});Ct.displayName="Chatbar.RowStart";var gt=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:E("rt-ChatbarRowEnd",a)})});gt.displayName="Chatbar.RowEnd";var vt=e.forwardRef((t,o)=>{let{asChild:a,clearOnSend:c,disabled:i,children:l,style:d,className:u,size:h,variant:f,emphasis:g,tabIndex:v,onClick:C,status:w="ready",onStop:F,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:M,retryIcon:z,"aria-label":O,"aria-labelledby":H,...Q}=t,R=I(),G=e.useContext(We),B=Ve(G)||R.attachments.length>0,P=B?"send":w==="submitted"||w==="streaming"?"stop":w==="error"?"retry":"send";if(R.sendMode==="never"&&P==="send")return null;let L=P!=="send"||R.sendMode==="always"||B,Z=P==="send"?i||R.disabled||R.readOnly||!B:i||R.disabled,j=P==="stop"?{"aria-label":S}:P==="retry"?{"aria-label":D}:H?{"aria-labelledby":H}:{"aria-label":O??"Send"},q=k=>{if(C?.(k),k.defaultPrevented||Z)return;if(P==="stop"){F?.();return}if(P==="retry"){b?.();return}let N=c??R.clearOnSubmit;R.submit(N)&&N&&R.textareaRef.current?.focus({preventScroll:!0})},V=P==="stop"?M??(w==="submitted"?e.createElement(ze,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):P==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(Be,{...Q,ref:o,size:h??R.size,...g?{emphasis:g}:{variant:f??(R.open||P!=="send"?"solid":"ghost")},disabled:Z,className:E("rt-ChatbarSend",u),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...d},"aria-hidden":L?void 0:!0,tabIndex:L?v:-1,asChild:a,onClick:q,"data-status":w,"data-mode":P,...j},V)});vt.displayName="Chatbar.Send";export{it as a,lt as b,dt as c,ut as d,mt as e,$e as f,ft as g,bt as h,Rt as i,Ct as j,gt as k,vt as l,Vt as m};
2
+ //# sourceMappingURL=chunk-QETAAJJV.js.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-G2CKYO2I.js";import{a as m}from"./chunk-AXUDFYLY.js";import{a as p}from"./chunk-KNQBAOMV.js";import{a as i}from"./chunk-2WSD2H23.js";import{a as t}from"./chunk-WYADYDPN.js";import{a as f}from"./chunk-ZE2KAVXW.js";import{b as e}from"./chunk-ZWZGUBL4.js";import{a as o}from"./chunk-NZJGC6ZW.js";import{c as r}from"./chunk-34KVYDF6.js";var a=["span","div","label","p"],n=["1","2","3","4","5","6","7","8","9"],x={as:{type:"enum",values:a,default:"span"},...o,size:{type:"enum",className:"rt-r-size",values:n,responsive:!0},...m,...i,...s,...p,...f,...t,...r,...e};export{x as a};
2
+ //# sourceMappingURL=chunk-QEYOXQK5.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/text.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n"],
5
- "mappings": "wWAYA,IAAMA,EAAK,CAAC,OAAQ,MAAO,QAAS,GAAG,EACjCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EAE3EC,EAAe,CACnB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,MAAO,EAChD,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n"],
5
+ "mappings": "wWAYA,IAAMA,EAAK,CAAC,OAAQ,MAAO,QAAS,GAAG,EACjCC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAe,CACnB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,MAAO,EAChD,GAAGG,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
6
6
  "names": ["as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-4ITIXBIP.js";var o={...e};export{o as a};
2
+ //# sourceMappingURL=chunk-QWLKMVZY.js.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-NZJGC6ZW.js";import{c as e}from"./chunk-34KVYDF6.js";var t=["1","2","3","4"],r=["cascade","drill-down"],o={size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},...e},i={...o,submenuBehavior:{type:"enum",values:r,default:"cascade",responsive:!0}},u=o,a={...s,...e,shortcut:{type:"string"}},f={...e,shortcut:{type:"string"}},c={...e};export{r as a,i as b,u as c,a as d,f as e,c as f};
2
+ //# sourceMappingURL=chunk-R372ULQC.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/_internal/base-menu.props.ts"],
4
+ "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst submenuBehaviors = ['cascade', 'drill-down'] as const;\n\n// Base props shared between Content and SubContent\nconst baseMenuSharedPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\n// Content-specific props (includes submenuBehavior)\nconst baseMenuContentPropDefs = {\n ...baseMenuSharedPropDefs,\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior: {\n type: 'enum',\n values: submenuBehaviors,\n default: 'cascade',\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n submenuBehavior: PropDef<(typeof submenuBehaviors)[number]>;\n};\n\n// SubContent props (no submenuBehavior)\nconst baseMenuSubContentPropDefs = baseMenuSharedPropDefs;\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuSubContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n submenuBehaviors,\n};\n"],
5
+ "mappings": "gFAKA,IAAMA,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAClCC,EAAmB,CAAC,UAAW,YAAY,EAG3CC,EAAyB,CAC7B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,GAAGG,CACL,EAKMC,EAA0B,CAC9B,GAAGF,EAOH,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,UACT,WAAY,EACd,CACF,EAMMI,EAA6BH,EAE7BI,EAAuB,CAC3B,GAAGC,EACH,GAAGJ,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMK,EAA+B,CACnC,GAAGL,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMM,EAA4B,CAChC,GAAGN,CACL",
6
+ "names": ["contentSizes", "submenuBehaviors", "baseMenuSharedPropDefs", "colorPropDef", "baseMenuContentPropDefs", "baseMenuSubContentPropDefs", "baseMenuItemPropDefs", "asChildPropDef", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-NZJGC6ZW.js";var e=["1","2","3","4","5","6","7","8","9"],r=["raised","soft"],a={...s,size:{type:"enum",className:"rt-r-size",values:e,responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"raised"}};export{a};
2
+ //# sourceMappingURL=chunk-RDS3AJWW.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/kbd.props.tsx"],
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['raised', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'raised',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n"],
5
+ "mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,EAAW,CAAC,SAAU,MAAM,EAE5BC,EAAc,CAClB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQH,EACR,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,QACX,CACF",
6
+ "names": ["sizes", "variants", "kbdPropDefs", "asChildPropDef"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{e as p}from"./chunk-3YLYGKFB.js";import{a as r}from"./chunk-UBSLEGQZ.js";import{a as t}from"./chunk-GSTOGDAJ.js";import{a as e}from"./chunk-PUVZFRTQ.js";import*as o from"react";import R from"classnames";import{composeEventHandlers as c}from"radix-ui/internal";var P=o.forwardRef((a,s)=>{let i=p(a,e.size),{className:n,color:m,onChange:d,onValueChange:u,...f}=r(i,e,t);return o.createElement("input",{type:"radio","data-accent-color":m,...f,onChange:c(d,l=>u?.(l.currentTarget.value)),ref:s,className:R("rt-reset","rt-BaseRadioRoot","rt-RadioRoot",n)})});P.displayName="Radio";export{P as a};
2
- //# sourceMappingURL=chunk-ENSDQ3XQ.js.map
1
+ import{e as p}from"./chunk-3YLYGKFB.js";import{a as r}from"./chunk-6FLLFCBU.js";import{a as t}from"./chunk-2FPJ6Q2N.js";import{a as e}from"./chunk-PUVZFRTQ.js";import*as o from"react";import R from"classnames";import{composeEventHandlers as c}from"radix-ui/internal";var P=o.forwardRef((a,s)=>{let i=p(a,e.size),{className:n,color:m,onChange:d,onValueChange:u,...f}=r(i,e,t);return o.createElement("input",{type:"radio","data-accent-color":m,...f,onChange:c(d,l=>u?.(l.currentTarget.value)),ref:s,className:R("rt-reset","rt-BaseRadioRoot","rt-RadioRoot",n)})});P.displayName="Radio";export{P as a};
2
+ //# sourceMappingURL=chunk-RUWKVDFT.js.map
@@ -1,2 +1,2 @@
1
- import{a as S,b,c as x}from"./chunk-KU3LLWFU.js";import{b as T,c as N}from"./chunk-IX5HIHVI.js";import{b as h,c as I}from"./chunk-6AZV4VFW.js";import{a as y}from"./chunk-DDFONGSM.js";import{d as v}from"./chunk-3YLYGKFB.js";import{a as u}from"./chunk-UBSLEGQZ.js";import{a as g}from"./chunk-GSTOGDAJ.js";import{a as W}from"./chunk-OS3FCYZY.js";var O={};W(O,{Content:()=>L,Group:()=>D,Item:()=>G,Label:()=>z,Root:()=>w,Separator:()=>V,Trigger:()=>E});import*as e from"react";import c from"classnames";import{Select as a,ScrollArea as P}from"radix-ui";var R=e.createContext({}),w=t=>{let{children:r,size:o,...l}=t,s=v(o,S.size);return e.createElement(a.Root,{...l},e.createElement(R.Provider,{value:e.useMemo(()=>({size:s}),[s])},r))};w.displayName="Select.Root";var E=e.forwardRef((t,r)=>{let o=e.useContext(R),{children:l,className:s,color:n,radius:f,placeholder:d,error:p,loading:i,disabled:m,readOnly:C,...M}=u({size:o?.size,...t},{size:S.size},b,g),A=e.useMemo(()=>({"aria-invalid":p||void 0,"aria-busy":i||void 0,"aria-disabled":m||void 0,"aria-readonly":C||void 0}),[p,i,m,C]);return e.createElement(a.Trigger,{asChild:!0},e.createElement("button",{"data-accent-color":n,"data-radius":f,"data-error":p,"data-loading":i,...M,...A,ref:r,className:c("rt-reset","rt-SelectTrigger",s)},e.createElement("span",{className:"rt-SelectTriggerInner"},e.createElement(a.Value,{placeholder:d},l)),e.createElement(a.Icon,{asChild:!0},i?e.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",className:"rt-SelectLoadingIconCircle"}))):e.createElement(N,{className:"rt-SelectIcon"}))))});E.displayName="Select.Trigger";var L=e.forwardRef((t,r)=>{let o=e.useContext(R),{className:l,children:s,color:n,container:f,...d}=u({size:o?.size,...t},{size:S.size},x),p=h(),i=n||p.accentColor,m=y();return e.createElement(a.Portal,{container:f},e.createElement(I,{asChild:!0},e.createElement(a.Content,{"data-accent-color":i,sideOffset:4,...d,asChild:!1,ref:r,className:c("rt-PopperContent","rt-BaseMenuContent","rt-variant-soft","rt-SelectContent",l)},e.createElement(P.Root,{type:"auto",className:"rt-ScrollAreaRoot"},e.createElement(a.Viewport,{asChild:!0,className:c("rt-BaseMenuViewport","rt-SelectViewport")},e.createElement(P.Viewport,{ref:m,className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},s)),e.createElement(P.Scrollbar,{className:"rt-ScrollAreaScrollbar",orientation:"vertical"},e.createElement(P.Thumb,{className:"rt-ScrollAreaThumb"}))))))});L.displayName="Select.Content";var G=e.forwardRef((t,r)=>{let{className:o,children:l,...s}=t,n=typeof l!="string";return e.createElement(a.Item,{...s,asChild:!1,ref:r,className:c("rt-reset","rt-BaseMenuItem","rt-SelectItem",{"rt-SelectItemRich":n},o)},e.createElement(a.ItemIndicator,{className:"rt-SelectItemIndicator"},e.createElement(T,{className:"rt-SelectItemIndicatorIcon"})),e.createElement(a.ItemText,null,l))});G.displayName="Select.Item";var D=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Group,{...r,asChild:!1,ref:o,className:c("rt-SelectGroup",t)}));D.displayName="Select.Group";var z=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Label,{...r,asChild:!1,ref:o,className:c("rt-BaseMenuLabel","rt-SelectLabel",t)}));z.displayName="Select.Label";var V=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Separator,{...r,asChild:!1,ref:o,className:c("rt-BaseMenuSeparator","rt-SelectSeparator",t)}));V.displayName="Select.Separator";export{w as a,E as b,L as c,G as d,D as e,z as f,V as g,O as h};
2
- //# sourceMappingURL=chunk-CHPZ3LNC.js.map
1
+ import{a as S,b,c as x}from"./chunk-KU3LLWFU.js";import{b as T,c as N}from"./chunk-IX5HIHVI.js";import{b as h,c as I}from"./chunk-6AZV4VFW.js";import{a as y}from"./chunk-DDFONGSM.js";import{d as v}from"./chunk-3YLYGKFB.js";import{a as u}from"./chunk-6FLLFCBU.js";import{a as g}from"./chunk-2FPJ6Q2N.js";import{a as W}from"./chunk-OS3FCYZY.js";var O={};W(O,{Content:()=>L,Group:()=>D,Item:()=>G,Label:()=>z,Root:()=>w,Separator:()=>V,Trigger:()=>E});import*as e from"react";import c from"classnames";import{Select as a,ScrollArea as P}from"radix-ui";var R=e.createContext({}),w=t=>{let{children:r,size:o,...l}=t,s=v(o,S.size);return e.createElement(a.Root,{...l},e.createElement(R.Provider,{value:e.useMemo(()=>({size:s}),[s])},r))};w.displayName="Select.Root";var E=e.forwardRef((t,r)=>{let o=e.useContext(R),{children:l,className:s,color:n,radius:f,placeholder:d,error:p,loading:i,disabled:m,readOnly:C,...M}=u({size:o?.size,...t},{size:S.size},b,g),A=e.useMemo(()=>({"aria-invalid":p||void 0,"aria-busy":i||void 0,"aria-disabled":m||void 0,"aria-readonly":C||void 0}),[p,i,m,C]);return e.createElement(a.Trigger,{asChild:!0},e.createElement("button",{"data-accent-color":n,"data-radius":f,"data-error":p,"data-loading":i,...M,...A,ref:r,className:c("rt-reset","rt-SelectTrigger",s)},e.createElement("span",{className:"rt-SelectTriggerInner"},e.createElement(a.Value,{placeholder:d},l)),e.createElement(a.Icon,{asChild:!0},i?e.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",className:"rt-SelectLoadingIconCircle"}))):e.createElement(N,{className:"rt-SelectIcon"}))))});E.displayName="Select.Trigger";var L=e.forwardRef((t,r)=>{let o=e.useContext(R),{className:l,children:s,color:n,container:f,...d}=u({size:o?.size,...t},{size:S.size},x),p=h(),i=n||p.accentColor,m=y();return e.createElement(a.Portal,{container:f},e.createElement(I,{asChild:!0},e.createElement(a.Content,{"data-accent-color":i,sideOffset:4,...d,asChild:!1,ref:r,className:c("rt-PopperContent","rt-BaseMenuContent","rt-variant-soft","rt-SelectContent",l)},e.createElement(P.Root,{type:"auto",className:"rt-ScrollAreaRoot"},e.createElement(a.Viewport,{asChild:!0,className:c("rt-BaseMenuViewport","rt-SelectViewport")},e.createElement(P.Viewport,{ref:m,className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},s)),e.createElement(P.Scrollbar,{className:"rt-ScrollAreaScrollbar",orientation:"vertical"},e.createElement(P.Thumb,{className:"rt-ScrollAreaThumb"}))))))});L.displayName="Select.Content";var G=e.forwardRef((t,r)=>{let{className:o,children:l,...s}=t,n=typeof l!="string";return e.createElement(a.Item,{...s,asChild:!1,ref:r,className:c("rt-reset","rt-BaseMenuItem","rt-SelectItem",{"rt-SelectItemRich":n},o)},e.createElement(a.ItemIndicator,{className:"rt-SelectItemIndicator"},e.createElement(T,{className:"rt-SelectItemIndicatorIcon"})),e.createElement(a.ItemText,null,l))});G.displayName="Select.Item";var D=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Group,{...r,asChild:!1,ref:o,className:c("rt-SelectGroup",t)}));D.displayName="Select.Group";var z=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Label,{...r,asChild:!1,ref:o,className:c("rt-BaseMenuLabel","rt-SelectLabel",t)}));z.displayName="Select.Label";var V=e.forwardRef(({className:t,...r},o)=>e.createElement(a.Separator,{...r,asChild:!1,ref:o,className:c("rt-BaseMenuSeparator","rt-SelectSeparator",t)}));V.displayName="Select.Separator";export{w as a,E as b,L as c,G as d,D as e,z as f,V as g,O as h};
2
+ //# sourceMappingURL=chunk-RVM4LGAU.js.map
@@ -1,4 +1,4 @@
1
- import{a as j}from"./chunk-IBF5U4QW.js";import{a as T}from"./chunk-K5SC3CZZ.js";import{a as D}from"./chunk-7FZPCM7W.js";import{a as G}from"./chunk-TGRRQHLQ.js";import{a as b}from"./chunk-VT4AAF7Q.js";import{a as M}from"./chunk-BFLO4IVZ.js";import{b as I,c as K}from"./chunk-6AZV4VFW.js";import{a as B}from"./chunk-F22ZRNWL.js";import{a as C}from"./chunk-VLLJ7A6P.js";import{a as S}from"./chunk-O6K6RZXY.js";import{a as O}from"./chunk-ZJZIV2JH.js";import{a as s}from"./chunk-7CBZFHSQ.js";import{a as $}from"./chunk-XHKL4PG7.js";import*as e from"react";import{useCallbackRef as Q}from"radix-ui/internal";import{flushSync as Y}from"react-dom";var z=`
1
+ import{a as j}from"./chunk-IBF5U4QW.js";import{a as T}from"./chunk-N5OSP3PU.js";import{a as D}from"./chunk-NEK7F746.js";import{a as G}from"./chunk-DMWLY6ZP.js";import{a as b}from"./chunk-WBGKTN35.js";import{a as M}from"./chunk-HVXXJZC2.js";import{b as I,c as K}from"./chunk-6AZV4VFW.js";import{a as B}from"./chunk-F22ZRNWL.js";import{a as C}from"./chunk-VLLJ7A6P.js";import{a as S}from"./chunk-HJ6ACBXW.js";import{a as O}from"./chunk-42LDZ7L5.js";import{a as s}from"./chunk-OXYHRNJA.js";import{a as $}from"./chunk-CNMFVJNC.js";import*as e from"react";import{useCallbackRef as Q}from"radix-ui/internal";import{flushSync as Y}from"react-dom";var z=`
2
2
  [contenteditable],
3
3
  [role="combobox"],
4
4
  [role="listbox"],
@@ -7,4 +7,4 @@ import{a as j}from"./chunk-IBF5U4QW.js";import{a as T}from"./chunk-K5SC3CZZ.js";
7
7
  select,
8
8
  textarea
9
9
  `,_=e.forwardRef(({defaultOpen:a=!0,...n},i)=>{let[h,c]=e.useState(a),m=e.useRef(null),r=e.useRef(null);return e.useEffect(()=>{function d(l){let x=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey,f=document.activeElement?.closest(z);if(l.key?.toUpperCase()==="T"&&!x&&!f){let g=!1;Y(()=>{c(R=>(g=!R,g))}),g?(r.current=document.activeElement,m.current?.focus()):r.current?.focus()}}return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),e.createElement(W,{...n,ref:i,triggerRef:m,open:h,shortcut:e.createElement(b,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},e.createElement($,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},e.createElement("button",{type:"button",onClick:()=>c(d=>!d),ref:m,"aria-label":"Toggle the Theme Panel"},"T")))})});_.displayName="ThemePanel";var W=e.forwardRef((a,n)=>{let{open:i,onAppearanceChange:h,shortcut:c,triggerRef:m,...r}=a,d=I();return e.createElement(K,{asChild:!0,radius:"medium"},e.createElement(s,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"3",sm:"5"},mt:{initial:"3",sm:"5"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-3) - var(--space-3))",sm:"calc(100svh - var(--space-5) - var(--space-5))"},maxWidth:{initial:"calc(100svw - var(--space-3) - var(--space-3))",sm:"calc(100svw - var(--space-5) - var(--space-5))"},inert:i?void 0:j,...r,ref:n,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transform:i?"none":"translateX(105%)",boxShadow:i?"var(--shadow-5)":"var(--shadow-2)",...a.style}},e.createElement(O,null,e.createElement(T,{flexGrow:"1",p:{initial:"5",xs:"6"},position:"relative"},!!c&&e.createElement(T,{position:"absolute",top:"0",right:"0",m:"3"},c),e.createElement(U,{onAppearanceChange:h,context:d})))))});W.displayName="ThemePanelImpl";var U=e.forwardRef((a,n)=>{let{onAppearanceChange:i,context:h,...c}=a,m=I(),{appearance:r,onAppearanceChange:d,accentColor:l,onAccentColorChange:x,grayColor:f,onGrayColorChange:V,radius:g,onRadiusChange:R}=h??m,[k,w]=e.useState(r==="inherit"?null:r),F=i!==void 0,N=Q(i),E=e.useCallback(t=>{let o=ee();if(r!=="inherit"){d(t);return}F?N(t):(w(t),te(t)),o()},[r,d,F,N]),H=B(l),Z=f==="auto"?H:f,[X,A]=e.useState("idle");async function q(){let t={appearance:r===C.appearance.default?void 0:r,accentColor:l===C.accentColor.default?void 0:l,grayColor:f===C.grayColor.default?void 0:f,radius:g===C.radius.default?void 0:g},o=Object.keys(t).filter(p=>t[p]!==void 0).map(p=>`${p}="${t[p]}"`).join(" "),y=o?`<Theme ${o}>`:"<Theme>";A("copying"),await navigator.clipboard.writeText(y),A("copied"),setTimeout(()=>A("idle"),2e3)}return e.useEffect(()=>{function t(o){let y=o.altKey||o.ctrlKey||o.shiftKey||o.metaKey,p=document.activeElement?.closest(z);o.key?.toUpperCase()==="D"&&!y&&!p&&E(k==="light"?"dark":"light")}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[E,k]),e.useEffect(()=>{let t=document.documentElement,o=document.body;function y(){let P=t.classList.contains("dark")||t.classList.contains("dark-theme")||o.classList.contains("dark")||o.classList.contains("dark-theme");w(r==="inherit"?P?"dark":"light":r)}let p=new MutationObserver(function(P){P.forEach(function(J){J.attributeName==="class"&&y()})});return y(),r==="inherit"&&(p.observe(t,{attributes:!0}),p.observe(o,{attributes:!0})),()=>p.disconnect()},[r]),e.createElement(s,{direction:"column",gap:"6",...c,ref:n},e.createElement(M,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),e.createElement(s,{direction:"column",gap:"6"},e.createElement(v,null,e.createElement(L,{id:"accent-color-title"},"Accent color"),e.createElement(s,{wrap:"wrap",gap:"3",role:"group","aria-labelledby":"accent-color-title"},C.accentColor.values.map(t=>e.createElement(T,{asChild:!0,key:t},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":u(t),style:{backgroundColor:`var(--${t}-9)`}},e.createElement(b,{content:`${u(t)}${l==="gray"&&Z!=="gray"?` (${u(Z)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:t,checked:l===t,onChange:o=>x(o.target.value)}))))))),e.createElement(v,null,e.createElement(L,{id:"gray-color-title"},"Gray color"),e.createElement(s,{wrap:"wrap",gap:"3",role:"group","aria-labelledby":"gray-color-title"},C.grayColor.values.map(t=>e.createElement(s,{key:t,asChild:!0,align:"center",justify:"center"},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":u(t),style:{backgroundColor:t==="auto"?`var(--${H}-9)`:t==="gray"?"var(--gray-9)":`var(--${t}-9)`,filter:t==="gray"?"saturate(0)":void 0}},e.createElement(b,{content:`${u(t)}${t==="auto"?` (${u(H)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:t,checked:f===t,onChange:o=>V(o.target.value)}))))))),e.createElement(v,null,e.createElement(L,{id:"appearance-title"},"Appearance"),e.createElement(G,{columns:"2",gap:"3",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:t,checked:k===t,onChange:o=>E(o.target.value)}),e.createElement(s,{align:"center",justify:"center",height:"32px",gap:"3"},t==="light"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(S,{size:"1",weight:"medium"},u(t))))))),e.createElement(v,null,e.createElement(L,{id:"radius-title"},"Radius"),e.createElement(s,{gap:"3",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},C.radius.values.map(t=>e.createElement(s,{key:t,direction:"column",align:"center"},e.createElement("label",{className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${t}`,value:t,checked:g===t,onChange:o=>R(o.target.value)}),e.createElement(K,{asChild:!0,radius:t},e.createElement(T,{m:"4",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:t==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),e.createElement(T,{asChild:!0,pt:"3"},e.createElement(S,{asChild:!0,size:"1",emphasis:"medium"},e.createElement("label",{htmlFor:`theme-panel-radius-${t}`},u(t))))))))),e.createElement(D,{style:{width:"100%"},onClick:q},X==="copied"?"Copied":"Copy Theme"))});U.displayName="ThemePanelContent";function v(a){return e.createElement(s,{direction:"column",gap:"4",asChild:!0,...a},e.createElement("section",null,a.children))}function L(a){return e.createElement(M,{as:"h3",size:{initial:"1",sm:"2"},...a})}function ee(){let a=document.createElement("style");return a.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(a),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(a)},1)}}function u(a){return a.charAt(0).toUpperCase()+a.slice(1)}function te(a){let n=document.documentElement,i=n.classList.contains("light-theme"),h=n.classList.contains("dark-theme"),c=n.classList.contains("light"),m=n.classList.contains("dark");(i||h)&&(n.classList.remove("light-theme","dark-theme"),n.style.colorScheme=a,n.classList.add(`${a}-theme`)),(c||m)&&(n.classList.remove("light","dark"),n.style.colorScheme=a,n.classList.add(a)),!i&&!h&&!c&&!m&&(n.style.colorScheme=a,n.classList.add(a))}export{_ as a,U as b};
10
- //# sourceMappingURL=chunk-YF3MFME4.js.map
10
+ //# sourceMappingURL=chunk-SKOF4A27.js.map