@womp/kookie-ui 0.30.0 → 0.32.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 (296) hide show
  1. package/components.css +56 -51
  2. package/dist/cjs/components/_internal/page-scope.d.ts +48 -0
  3. package/dist/cjs/components/_internal/page-scope.d.ts.map +1 -0
  4. package/dist/cjs/components/_internal/page-scope.js +3 -0
  5. package/dist/cjs/components/_internal/page-scope.js.map +7 -0
  6. package/dist/cjs/components/_internal/portal-theme.d.ts +2 -1
  7. package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -1
  8. package/dist/cjs/components/_internal/portal-theme.js +1 -1
  9. package/dist/cjs/components/_internal/portal-theme.js.map +4 -4
  10. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  11. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  12. package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
  13. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  14. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  15. package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
  16. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  18. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  19. package/dist/cjs/components/alert-dialog.js +1 -1
  20. package/dist/cjs/components/alert-dialog.js.map +4 -4
  21. package/dist/cjs/components/button.js +1 -1
  22. package/dist/cjs/components/button.js.map +4 -4
  23. package/dist/cjs/components/chatbar.js +1 -1
  24. package/dist/cjs/components/chatbar.js.map +4 -4
  25. package/dist/cjs/components/chip.js +1 -1
  26. package/dist/cjs/components/chip.js.map +4 -4
  27. package/dist/cjs/components/combobox.js +1 -1
  28. package/dist/cjs/components/combobox.js.map +4 -4
  29. package/dist/cjs/components/context-menu.js +1 -1
  30. package/dist/cjs/components/context-menu.js.map +4 -4
  31. package/dist/cjs/components/dialog.js +1 -1
  32. package/dist/cjs/components/dialog.js.map +4 -4
  33. package/dist/cjs/components/dropdown-menu.js +1 -1
  34. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  35. package/dist/cjs/components/index.d.ts +1 -0
  36. package/dist/cjs/components/index.d.ts.map +1 -1
  37. package/dist/cjs/components/index.js +2 -2
  38. package/dist/cjs/components/index.js.map +4 -4
  39. package/dist/cjs/components/link.js +1 -1
  40. package/dist/cjs/components/link.js.map +3 -3
  41. package/dist/cjs/components/link.props.d.ts +0 -6
  42. package/dist/cjs/components/link.props.d.ts.map +1 -1
  43. package/dist/cjs/components/link.props.js +1 -1
  44. package/dist/cjs/components/link.props.js.map +3 -3
  45. package/dist/cjs/components/message-scroller.js +1 -1
  46. package/dist/cjs/components/message-scroller.js.map +4 -4
  47. package/dist/cjs/components/navigator.d.ts +11 -7
  48. package/dist/cjs/components/navigator.d.ts.map +1 -1
  49. package/dist/cjs/components/navigator.js +1 -1
  50. package/dist/cjs/components/navigator.js.map +4 -4
  51. package/dist/cjs/components/notice.js +1 -1
  52. package/dist/cjs/components/notice.js.map +4 -4
  53. package/dist/cjs/components/page.d.ts +31 -0
  54. package/dist/cjs/components/page.d.ts.map +1 -0
  55. package/dist/cjs/components/page.js +3 -0
  56. package/dist/cjs/components/page.js.map +7 -0
  57. package/dist/cjs/components/popover.js +1 -1
  58. package/dist/cjs/components/popover.js.map +4 -4
  59. package/dist/cjs/components/select.js +1 -1
  60. package/dist/cjs/components/select.js.map +4 -4
  61. package/dist/cjs/components/sheet.js +1 -1
  62. package/dist/cjs/components/sheet.js.map +4 -4
  63. package/dist/cjs/components/shell.d.ts.map +1 -1
  64. package/dist/cjs/components/shell.js +1 -1
  65. package/dist/cjs/components/shell.js.map +4 -4
  66. package/dist/cjs/components/sidebar.js +1 -1
  67. package/dist/cjs/components/sidebar.js.map +4 -4
  68. package/dist/cjs/components/toggle.js +1 -1
  69. package/dist/cjs/components/toggle.js.map +4 -4
  70. package/dist/cjs/components/toolbar.d.ts +5 -1
  71. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  72. package/dist/cjs/components/toolbar.js +1 -1
  73. package/dist/cjs/components/toolbar.js.map +4 -4
  74. package/dist/cjs/components/tooltip.js +1 -1
  75. package/dist/cjs/components/tooltip.js.map +4 -4
  76. package/dist/cjs/index.js +5 -5
  77. package/dist/cjs/index.js.map +4 -4
  78. package/dist/cjs/props/index.js +1 -1
  79. package/dist/cjs/props/index.js.map +3 -3
  80. package/dist/esm/{chunk-HBO7W7SS.js → chunk-26O4RBOJ.js} +2 -2
  81. package/dist/esm/chunk-3H33S3UA.js +3 -0
  82. package/dist/esm/{chunk-C67MM24U.js.map → chunk-3H33S3UA.js.map} +3 -3
  83. package/dist/esm/{chunk-FYTLUDL3.js → chunk-3M5ZM67R.js} +2 -2
  84. package/dist/esm/chunk-4B3S2DM7.js +3 -0
  85. package/dist/esm/chunk-4B3S2DM7.js.map +7 -0
  86. package/dist/esm/{chunk-NEKIU24N.js → chunk-4ZHBNYXM.js} +2 -2
  87. package/dist/esm/{chunk-TSS4K2U5.js → chunk-5VYQDA5S.js} +2 -2
  88. package/dist/esm/chunk-65URNXF2.js +3 -0
  89. package/dist/esm/chunk-65URNXF2.js.map +7 -0
  90. package/dist/esm/chunk-6SGJWML7.js +3 -0
  91. package/dist/esm/chunk-6SGJWML7.js.map +7 -0
  92. package/dist/esm/{chunk-R4UKO4UK.js → chunk-6WHKGVWY.js} +2 -2
  93. package/dist/esm/{chunk-7V6M3MIR.js → chunk-7YXHLU4C.js} +2 -2
  94. package/dist/esm/chunk-AKMRPGNP.js +3 -0
  95. package/dist/esm/chunk-AKMRPGNP.js.map +7 -0
  96. package/dist/esm/{chunk-ENQV6SEA.js → chunk-AKSAKP35.js} +2 -2
  97. package/dist/esm/{chunk-FRFVGYGX.js → chunk-BQOFHLDP.js} +2 -2
  98. package/dist/esm/{chunk-ZYQEFENG.js → chunk-COLJWVN7.js} +2 -2
  99. package/dist/esm/{chunk-K3GDM26A.js → chunk-D42VCLKH.js} +2 -2
  100. package/dist/esm/{chunk-MGWGD6KI.js → chunk-DFQIIYLD.js} +2 -2
  101. package/dist/esm/{chunk-NWXODCTD.js → chunk-EERKYRYI.js} +2 -2
  102. package/dist/esm/{chunk-4MNRLB57.js → chunk-FICBVI4M.js} +2 -2
  103. package/dist/esm/chunk-HGF4CKRY.js +3 -0
  104. package/dist/esm/chunk-HGF4CKRY.js.map +7 -0
  105. package/dist/esm/{chunk-JD4KR6VZ.js → chunk-HVMRB3AH.js} +2 -2
  106. package/dist/esm/{chunk-HLIOHDEX.js → chunk-IFHBMTFX.js} +2 -2
  107. package/dist/esm/{chunk-J54GYD7A.js → chunk-JFJV4HL3.js} +2 -2
  108. package/dist/esm/{chunk-KJZSXLIX.js → chunk-JQMWNI62.js} +2 -2
  109. package/dist/esm/{chunk-CMHKCUHP.js → chunk-K35JUIUT.js} +2 -2
  110. package/dist/esm/{chunk-67UEMB4K.js → chunk-KBSH6CBD.js} +2 -2
  111. package/dist/esm/{chunk-SUQJ7DD4.js → chunk-L7PRLW6A.js} +2 -2
  112. package/dist/esm/{chunk-D2C2A2ZK.js → chunk-LFAUMDU5.js} +2 -2
  113. package/dist/esm/{chunk-LABMK6Q7.js → chunk-LG5DPQ46.js} +2 -2
  114. package/dist/esm/{chunk-YMRN5ESN.js → chunk-NFSW36RG.js} +2 -2
  115. package/dist/esm/{chunk-6YWHNLSC.js → chunk-NJ7RQYLX.js} +2 -2
  116. package/dist/esm/{chunk-WD66RYF6.js → chunk-NYIYRILR.js} +2 -2
  117. package/dist/esm/{chunk-JP36JSNP.js → chunk-OBSZOD5M.js} +2 -2
  118. package/dist/esm/{chunk-DP7MPGR7.js → chunk-OMPLFDS6.js} +2 -2
  119. package/dist/esm/{chunk-H2J25HXP.js → chunk-OPYTQ34H.js} +2 -2
  120. package/dist/esm/{chunk-REORAMUH.js → chunk-QBONJMSE.js} +2 -2
  121. package/dist/esm/chunk-QDAM2I6O.js +3 -0
  122. package/dist/esm/chunk-QDAM2I6O.js.map +7 -0
  123. package/dist/esm/chunk-RSG4XWHU.js +2 -0
  124. package/dist/esm/{chunk-2ZKEQS76.js → chunk-SGKLJDA3.js} +2 -2
  125. package/dist/esm/{chunk-676Y7ZUT.js → chunk-TMINGBSQ.js} +2 -2
  126. package/dist/esm/{chunk-2S7HPQVX.js → chunk-TRJAVWCK.js} +2 -2
  127. package/dist/esm/{chunk-EQE6QQXM.js → chunk-TUZ665BA.js} +2 -2
  128. package/dist/esm/{chunk-JKQN6QCP.js → chunk-VBF3XALY.js} +2 -2
  129. package/dist/esm/chunk-VKUAP54W.js +2 -0
  130. package/dist/esm/chunk-VKUAP54W.js.map +7 -0
  131. package/dist/esm/chunk-VWRPVM5K.js +3 -0
  132. package/dist/esm/chunk-VWRPVM5K.js.map +7 -0
  133. package/dist/esm/{chunk-B6OFKABP.js → chunk-VYF6KKYM.js} +2 -2
  134. package/dist/esm/{chunk-6UFIS6B2.js → chunk-W35ZKQMQ.js} +2 -2
  135. package/dist/esm/{chunk-EPGIYTFK.js → chunk-X7DGYRAY.js} +2 -2
  136. package/dist/esm/{chunk-X7JHZ3HA.js → chunk-XF6Z5NKE.js} +2 -2
  137. package/dist/esm/{chunk-K5V53KTJ.js → chunk-Y44DYJA5.js} +2 -2
  138. package/dist/esm/{chunk-MMDZBPSX.js → chunk-YOTTLPJ3.js} +2 -2
  139. package/dist/esm/chunk-ZBSGH74F.js +3 -0
  140. package/dist/esm/chunk-ZBSGH74F.js.map +7 -0
  141. package/dist/esm/chunk-ZHXEEOGI.js +3 -0
  142. package/dist/esm/chunk-ZHXEEOGI.js.map +7 -0
  143. package/dist/esm/{chunk-FMVOB367.js → chunk-ZLGOZKB3.js} +2 -2
  144. package/dist/esm/components/_internal/base-button.js +1 -1
  145. package/dist/esm/components/_internal/page-scope.d.ts +48 -0
  146. package/dist/esm/components/_internal/page-scope.d.ts.map +1 -0
  147. package/dist/esm/components/_internal/page-scope.js +3 -0
  148. package/dist/esm/components/_internal/page-scope.js.map +7 -0
  149. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  150. package/dist/esm/components/_internal/portal-theme.d.ts +2 -1
  151. package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -1
  152. package/dist/esm/components/_internal/portal-theme.js +1 -1
  153. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  154. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  155. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  156. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  157. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  158. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  159. package/dist/esm/components/accordion.js +1 -1
  160. package/dist/esm/components/alert-dialog.js +1 -1
  161. package/dist/esm/components/avatar.js +1 -1
  162. package/dist/esm/components/blockquote.js +1 -1
  163. package/dist/esm/components/button.js +1 -1
  164. package/dist/esm/components/card.js +1 -1
  165. package/dist/esm/components/chatbar.js +1 -1
  166. package/dist/esm/components/checkbox-group.js +1 -1
  167. package/dist/esm/components/checkbox.js +1 -1
  168. package/dist/esm/components/chip.js +1 -1
  169. package/dist/esm/components/code.js +1 -1
  170. package/dist/esm/components/combobox.js +1 -1
  171. package/dist/esm/components/context-menu.js +1 -1
  172. package/dist/esm/components/dialog.js +1 -1
  173. package/dist/esm/components/dropdown-menu.js +1 -1
  174. package/dist/esm/components/heading.js +1 -1
  175. package/dist/esm/components/image.js +1 -1
  176. package/dist/esm/components/index.d.ts +1 -0
  177. package/dist/esm/components/index.d.ts.map +1 -1
  178. package/dist/esm/components/index.js +1 -1
  179. package/dist/esm/components/link.js +1 -1
  180. package/dist/esm/components/link.props.d.ts +0 -6
  181. package/dist/esm/components/link.props.d.ts.map +1 -1
  182. package/dist/esm/components/link.props.js +1 -1
  183. package/dist/esm/components/message-scroller.js +1 -1
  184. package/dist/esm/components/navbar.js +1 -1
  185. package/dist/esm/components/navigator.d.ts +11 -7
  186. package/dist/esm/components/navigator.d.ts.map +1 -1
  187. package/dist/esm/components/navigator.js +1 -1
  188. package/dist/esm/components/notice.js +1 -1
  189. package/dist/esm/components/page.d.ts +31 -0
  190. package/dist/esm/components/page.d.ts.map +1 -0
  191. package/dist/esm/components/page.js +3 -0
  192. package/dist/esm/components/page.js.map +7 -0
  193. package/dist/esm/components/popover.js +1 -1
  194. package/dist/esm/components/progress.js +1 -1
  195. package/dist/esm/components/radio-group.js +1 -1
  196. package/dist/esm/components/radio.js +1 -1
  197. package/dist/esm/components/scroll-area.js +1 -1
  198. package/dist/esm/components/segmented-control.js +1 -1
  199. package/dist/esm/components/select.js +1 -1
  200. package/dist/esm/components/separator.js +1 -1
  201. package/dist/esm/components/sheet.js +1 -1
  202. package/dist/esm/components/shell.d.ts.map +1 -1
  203. package/dist/esm/components/shell.js +1 -1
  204. package/dist/esm/components/sidebar.js +1 -1
  205. package/dist/esm/components/slider.js +1 -1
  206. package/dist/esm/components/switch.js +1 -1
  207. package/dist/esm/components/table.js +1 -1
  208. package/dist/esm/components/tabs.js +1 -1
  209. package/dist/esm/components/text-area.js +1 -1
  210. package/dist/esm/components/text-field.js +1 -1
  211. package/dist/esm/components/text.js +1 -1
  212. package/dist/esm/components/toggle.js +1 -1
  213. package/dist/esm/components/toolbar.d.ts +5 -1
  214. package/dist/esm/components/toolbar.d.ts.map +1 -1
  215. package/dist/esm/components/toolbar.js +1 -1
  216. package/dist/esm/components/tooltip.js +1 -1
  217. package/dist/esm/hooks/index.js +1 -1
  218. package/dist/esm/index.js +1 -1
  219. package/dist/esm/props/index.js +1 -1
  220. package/package.json +1 -1
  221. package/src/components/_internal/page-scope.tsx +119 -0
  222. package/src/components/_internal/portal-theme.tsx +6 -2
  223. package/src/components/_internal/shell-bottom.tsx +4 -1
  224. package/src/components/_internal/shell-inspector.tsx +4 -1
  225. package/src/components/_internal/shell-sidebar.tsx +4 -1
  226. package/src/components/index.css +1 -0
  227. package/src/components/index.tsx +1 -0
  228. package/src/components/link.css +16 -46
  229. package/src/components/link.props.tsx +0 -3
  230. package/src/components/navigator.tsx +46 -16
  231. package/src/components/page.css +38 -0
  232. package/src/components/page.tsx +93 -0
  233. package/src/components/shell.tsx +8 -2
  234. package/src/components/toolbar.css +11 -0
  235. package/src/components/toolbar.tsx +17 -5
  236. package/styles.css +56 -51
  237. package/dist/esm/chunk-5KX3RA3P.js +0 -3
  238. package/dist/esm/chunk-5KX3RA3P.js.map +0 -7
  239. package/dist/esm/chunk-AQKSO3SW.js +0 -3
  240. package/dist/esm/chunk-AQKSO3SW.js.map +0 -7
  241. package/dist/esm/chunk-C67MM24U.js +0 -3
  242. package/dist/esm/chunk-D74WY6UO.js +0 -3
  243. package/dist/esm/chunk-D74WY6UO.js.map +0 -7
  244. package/dist/esm/chunk-E4KT72IB.js +0 -2
  245. package/dist/esm/chunk-EFXHBH3A.js +0 -2
  246. package/dist/esm/chunk-EFXHBH3A.js.map +0 -7
  247. package/dist/esm/chunk-QRV32INS.js +0 -3
  248. package/dist/esm/chunk-QRV32INS.js.map +0 -7
  249. package/dist/esm/chunk-VGJALIJ5.js +0 -3
  250. package/dist/esm/chunk-VGJALIJ5.js.map +0 -7
  251. package/dist/esm/chunk-WAE4MLBN.js +0 -3
  252. package/dist/esm/chunk-WAE4MLBN.js.map +0 -7
  253. package/dist/esm/chunk-YMUERC2J.js +0 -3
  254. package/dist/esm/chunk-YMUERC2J.js.map +0 -7
  255. /package/dist/esm/{chunk-HBO7W7SS.js.map → chunk-26O4RBOJ.js.map} +0 -0
  256. /package/dist/esm/{chunk-FYTLUDL3.js.map → chunk-3M5ZM67R.js.map} +0 -0
  257. /package/dist/esm/{chunk-NEKIU24N.js.map → chunk-4ZHBNYXM.js.map} +0 -0
  258. /package/dist/esm/{chunk-TSS4K2U5.js.map → chunk-5VYQDA5S.js.map} +0 -0
  259. /package/dist/esm/{chunk-R4UKO4UK.js.map → chunk-6WHKGVWY.js.map} +0 -0
  260. /package/dist/esm/{chunk-7V6M3MIR.js.map → chunk-7YXHLU4C.js.map} +0 -0
  261. /package/dist/esm/{chunk-ENQV6SEA.js.map → chunk-AKSAKP35.js.map} +0 -0
  262. /package/dist/esm/{chunk-FRFVGYGX.js.map → chunk-BQOFHLDP.js.map} +0 -0
  263. /package/dist/esm/{chunk-ZYQEFENG.js.map → chunk-COLJWVN7.js.map} +0 -0
  264. /package/dist/esm/{chunk-K3GDM26A.js.map → chunk-D42VCLKH.js.map} +0 -0
  265. /package/dist/esm/{chunk-MGWGD6KI.js.map → chunk-DFQIIYLD.js.map} +0 -0
  266. /package/dist/esm/{chunk-NWXODCTD.js.map → chunk-EERKYRYI.js.map} +0 -0
  267. /package/dist/esm/{chunk-4MNRLB57.js.map → chunk-FICBVI4M.js.map} +0 -0
  268. /package/dist/esm/{chunk-JD4KR6VZ.js.map → chunk-HVMRB3AH.js.map} +0 -0
  269. /package/dist/esm/{chunk-HLIOHDEX.js.map → chunk-IFHBMTFX.js.map} +0 -0
  270. /package/dist/esm/{chunk-J54GYD7A.js.map → chunk-JFJV4HL3.js.map} +0 -0
  271. /package/dist/esm/{chunk-KJZSXLIX.js.map → chunk-JQMWNI62.js.map} +0 -0
  272. /package/dist/esm/{chunk-CMHKCUHP.js.map → chunk-K35JUIUT.js.map} +0 -0
  273. /package/dist/esm/{chunk-67UEMB4K.js.map → chunk-KBSH6CBD.js.map} +0 -0
  274. /package/dist/esm/{chunk-SUQJ7DD4.js.map → chunk-L7PRLW6A.js.map} +0 -0
  275. /package/dist/esm/{chunk-D2C2A2ZK.js.map → chunk-LFAUMDU5.js.map} +0 -0
  276. /package/dist/esm/{chunk-LABMK6Q7.js.map → chunk-LG5DPQ46.js.map} +0 -0
  277. /package/dist/esm/{chunk-YMRN5ESN.js.map → chunk-NFSW36RG.js.map} +0 -0
  278. /package/dist/esm/{chunk-6YWHNLSC.js.map → chunk-NJ7RQYLX.js.map} +0 -0
  279. /package/dist/esm/{chunk-WD66RYF6.js.map → chunk-NYIYRILR.js.map} +0 -0
  280. /package/dist/esm/{chunk-JP36JSNP.js.map → chunk-OBSZOD5M.js.map} +0 -0
  281. /package/dist/esm/{chunk-DP7MPGR7.js.map → chunk-OMPLFDS6.js.map} +0 -0
  282. /package/dist/esm/{chunk-H2J25HXP.js.map → chunk-OPYTQ34H.js.map} +0 -0
  283. /package/dist/esm/{chunk-REORAMUH.js.map → chunk-QBONJMSE.js.map} +0 -0
  284. /package/dist/esm/{chunk-E4KT72IB.js.map → chunk-RSG4XWHU.js.map} +0 -0
  285. /package/dist/esm/{chunk-2ZKEQS76.js.map → chunk-SGKLJDA3.js.map} +0 -0
  286. /package/dist/esm/{chunk-676Y7ZUT.js.map → chunk-TMINGBSQ.js.map} +0 -0
  287. /package/dist/esm/{chunk-2S7HPQVX.js.map → chunk-TRJAVWCK.js.map} +0 -0
  288. /package/dist/esm/{chunk-EQE6QQXM.js.map → chunk-TUZ665BA.js.map} +0 -0
  289. /package/dist/esm/{chunk-JKQN6QCP.js.map → chunk-VBF3XALY.js.map} +0 -0
  290. /package/dist/esm/{chunk-B6OFKABP.js.map → chunk-VYF6KKYM.js.map} +0 -0
  291. /package/dist/esm/{chunk-6UFIS6B2.js.map → chunk-W35ZKQMQ.js.map} +0 -0
  292. /package/dist/esm/{chunk-EPGIYTFK.js.map → chunk-X7DGYRAY.js.map} +0 -0
  293. /package/dist/esm/{chunk-X7JHZ3HA.js.map → chunk-XF6Z5NKE.js.map} +0 -0
  294. /package/dist/esm/{chunk-K5V53KTJ.js.map → chunk-Y44DYJA5.js.map} +0 -0
  295. /package/dist/esm/{chunk-MMDZBPSX.js.map → chunk-YOTTLPJ3.js.map} +0 -0
  296. /package/dist/esm/{chunk-FMVOB367.js.map → chunk-ZLGOZKB3.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var I=Object.create;var y=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var o in e)y(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Y(e))!J.call(t,n)&&n!==o&&y(t,n,{get:()=>e[n],enumerable:!(p=H(e,n))||p.enumerable});return t};var P=(t,e,o)=>(o=t!=null?I(_(t)):{},w(e||!t||!t.__esModule?y(o,"default",{value:t,enumerable:!0}):o,t)),X=t=>w(y({},"__esModule",{value:!0}),t);var ge={};Q(ge,{Link:()=>F});module.exports=X(ge);var d=P(require("react")),q=P(require("classnames"));var c=P(require("react")),U=require("radix-ui");var W=P(require("classnames"));var Z=[],ee=new Set;function te(t){let e=Object.assign({},...t),o=[],p=[],n=new Set;for(let i in e){let r=e[i],f=r.values??Z,a={key:i,type:r.type,default:r.default,hasDefault:r.default!==void 0,responsive:"responsive"in r,className:r.className,customProperties:r.customProperties,parseValue:r.parseValue,values:f,valueSet:f.length>0?new Set(f):ee,enumValueSet:r.type==="enum"?new Set([r.default,...f]):void 0};r.className?(o.push(a),n.add(i)):(a.hasDefault||r.type==="enum")&&p.push(a)}return{styling:o,passthrough:p,stylingKeys:n}}var oe={children:new WeakMap};function j(t){let e=oe;for(let o=0;o<t.length;o++){let p=t[o],n=e.children.get(p);n===void 0&&(n={children:new WeakMap},e.children.set(p,n)),e=n}return e.compiled??(e.compiled=te(t))}var se=["initial","xs","sm","md","lg","xl"],T=new Set(se);function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var re=new Set(["initial","xs","sm","md","lg","xl"]);function m(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(re.has(e))return!0;return!1}function g(t,e,o){return e!==void 0?e.has(o):t.includes(o)}function E({className:t,customProperties:e,...o}){let p=C({allowArbitraryValues:!0,className:t,...o}),n=ne({customProperties:e,...o});return[p,n]}function C({allowArbitraryValues:t,value:e,className:o,propValues:p,propValueSet:n,parseValue:i=r=>r}){if(e){if(typeof e=="string")return g(p,n,e)?O(o,e,i):t?o:void 0;if(m(e)){let r=e,f=[];for(let a in r){if(!S(r,a)||!T.has(a))continue;let s=r[a];if(s!==void 0){if(g(p,n,s)){let l=O(o,s,i),u=a==="initial"?l:`${a}:${l}`;f.push(u)}else if(t){let l=a==="initial"?o:`${a}:${o}`;f.push(l)}}}return f.length>0?f.join(" "):""}if(t)return o}}function O(t,e,o){let p=t?"-":"",n=o(e),i=n?.startsWith("-"),r=i?"-":"",f=i?n?.substring(1):n;return`${r}${t}${p}${f}`}function ne({customProperties:t,value:e,propValues:o,propValueSet:p,parseValue:n=i=>i}){if(!e||typeof e=="string"&&g(o,p,e))return;let i;if(typeof e=="string"){let r=n(e);i={};for(let f of t)i[f]=r;return i}if(m(e)){let r=e;for(let f in r){if(!S(r,f)||!T.has(f))continue;let a=r[f];if(a===void 0||g(o,p,a))continue;let s=n(a);i??(i={});for(let l of t){let u=f==="initial"?l:`${l}-${f}`;i[u]=s}}}return i??{}}function N(...t){let e;for(let o of t)o&&(e===void 0&&(e={}),Object.assign(e,o));return e}function ie(t,e){let o=t.initial,p=!1;return e.hasDefault&&o===void 0&&(o=e.default,p=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(o)&&(o=e.default,p=!0),p?{...t,initial:o}:t}function D(t,...e){let{styling:o,passthrough:p,stylingKeys:n}=j(e),i={};for(let a in t)n.has(a)||(i[a]=t[a]);for(let a=0;a<p.length;a++){let s=p[a],l=i[s.key];if(l===void 0){s.hasDefault&&(i[s.key]=s.default);continue}s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!m(l)&&(i[s.key]=s.default)}let r,f=[];for(let a=0;a<o.length;a++){let s=o[a],l=t[s.key];if(l===void 0&&s.hasDefault&&(l=s.default),s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!m(l)&&(l=s.default),!!l){if(m(l)){if(!s.responsive)continue;l=ie(l,s)}if(s.type==="enum"){let u=C({allowArbitraryValues:!1,value:l,className:s.className,propValues:s.values,propValueSet:s.valueSet,parseValue:s.parseValue});u&&f.push(u);continue}if(s.type==="string"||s.type==="enum | string"){let[u,V]=E({className:s.className,customProperties:s.customProperties,propValues:s.type==="string"?[]:s.values,propValueSet:s.type==="string"?void 0:s.valueSet,parseValue:s.parseValue,value:l});V&&(r=N(r,V)),u&&f.push(u);continue}if(s.type==="boolean"){f.push(s.className);continue}}}return i.className=(0,W.default)(f.length>0?f.join(" "):void 0,t.className),i.style=N(r,t.style),i}var v={asChild:{type:"boolean"}};var $=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var L={color:{type:"enum",values:$,default:void 0}},G={color:{type:"enum",values:$,default:""}};var pe=["loud","medium","quiet"],z={emphasis:{type:"enum",className:"kui-emphasis",values:pe,default:void 0}};var ae=["normal","start","end","both"],R={trim:{type:"enum",className:"kui-r-lt",values:ae,responsive:!0}};var fe=["left","center","right"],A={align:{type:"enum",className:"kui-r-ta",values:fe,responsive:!0}};var le=["wrap","nowrap","pretty","balance"],x={wrap:{type:"enum",className:"kui-r-tw",values:le,responsive:!0}};var h={truncate:{type:"boolean",className:"kui-truncate"}};var ue=["sans","mono","serif"],K={font:{type:"enum",className:"kui-r-ff",values:ue}};var me=["regular","medium","semibold"],b={weight:{type:"enum",className:"kui-r-weight",values:me,responsive:!0}};var ce=["span","div","label","p"],de=["1","2","3","4","5","6","7","8","9"],B={as:{type:"enum",values:ce,default:"span"},...v,size:{type:"enum",className:"kui-r-size",values:de,responsive:!0},...K,...b,...A,...R,...h,...x,...L,...z};var k=c.memo(c.forwardRef((t,e)=>{let{children:o,className:p,asChild:n,as:i="span",color:r,...f}=D(t,B),a=p?`kui-Text ${p}`:"kui-Text";return n?c.createElement(U.Slot.Root,{"data-accent-color":r,...f,ref:e,className:a},o):c.createElement(i,{"data-accent-color":r,...f,ref:e,className:a},o)}));k.displayName="Text";var ye=["1","2","3","4","5","6","7","8","9"],Pe=["auto","always","hover","none"],M={...v,size:{type:"enum",className:"kui-r-size",values:ye,responsive:!0},...b,...R,...h,...x,underline:{type:"enum",className:"kui-underline",values:Pe,default:"auto"},...G};var F=d.forwardRef((t,e)=>{let{children:o,className:p,color:n,asChild:i,...r}=D(t,M);return d.createElement(k,{...r,"data-accent-color":n,ref:e,asChild:!0,className:(0,q.default)("kui-reset","kui-Link",p)},i?o:d.createElement("a",null,o))});F.displayName="Link";
2
+ "use strict";var I=Object.create;var y=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var o in e)y(t,o,{get:e[o],enumerable:!0})},w=(t,e,o,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Y(e))!J.call(t,n)&&n!==o&&y(t,n,{get:()=>e[n],enumerable:!(p=H(e,n))||p.enumerable});return t};var P=(t,e,o)=>(o=t!=null?I(_(t)):{},w(e||!t||!t.__esModule?y(o,"default",{value:t,enumerable:!0}):o,t)),X=t=>w(y({},"__esModule",{value:!0}),t);var Pe={};Q(Pe,{Link:()=>F});module.exports=X(Pe);var d=P(require("react")),q=P(require("classnames"));var c=P(require("react")),U=require("radix-ui");var W=P(require("classnames"));var Z=[],ee=new Set;function te(t){let e=Object.assign({},...t),o=[],p=[],n=new Set;for(let i in e){let r=e[i],f=r.values??Z,a={key:i,type:r.type,default:r.default,hasDefault:r.default!==void 0,responsive:"responsive"in r,className:r.className,customProperties:r.customProperties,parseValue:r.parseValue,values:f,valueSet:f.length>0?new Set(f):ee,enumValueSet:r.type==="enum"?new Set([r.default,...f]):void 0};r.className?(o.push(a),n.add(i)):(a.hasDefault||r.type==="enum")&&p.push(a)}return{styling:o,passthrough:p,stylingKeys:n}}var oe={children:new WeakMap};function j(t){let e=oe;for(let o=0;o<t.length;o++){let p=t[o],n=e.children.get(p);n===void 0&&(n={children:new WeakMap},e.children.set(p,n)),e=n}return e.compiled??(e.compiled=te(t))}var se=["initial","xs","sm","md","lg","xl"],b=new Set(se);function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var re=new Set(["initial","xs","sm","md","lg","xl"]);function m(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(re.has(e))return!0;return!1}function g(t,e,o){return e!==void 0?e.has(o):t.includes(o)}function E({className:t,customProperties:e,...o}){let p=C({allowArbitraryValues:!0,className:t,...o}),n=ne({customProperties:e,...o});return[p,n]}function C({allowArbitraryValues:t,value:e,className:o,propValues:p,propValueSet:n,parseValue:i=r=>r}){if(e){if(typeof e=="string")return g(p,n,e)?O(o,e,i):t?o:void 0;if(m(e)){let r=e,f=[];for(let a in r){if(!S(r,a)||!b.has(a))continue;let s=r[a];if(s!==void 0){if(g(p,n,s)){let l=O(o,s,i),u=a==="initial"?l:`${a}:${l}`;f.push(u)}else if(t){let l=a==="initial"?o:`${a}:${o}`;f.push(l)}}}return f.length>0?f.join(" "):""}if(t)return o}}function O(t,e,o){let p=t?"-":"",n=o(e),i=n?.startsWith("-"),r=i?"-":"",f=i?n?.substring(1):n;return`${r}${t}${p}${f}`}function ne({customProperties:t,value:e,propValues:o,propValueSet:p,parseValue:n=i=>i}){if(!e||typeof e=="string"&&g(o,p,e))return;let i;if(typeof e=="string"){let r=n(e);i={};for(let f of t)i[f]=r;return i}if(m(e)){let r=e;for(let f in r){if(!S(r,f)||!b.has(f))continue;let a=r[f];if(a===void 0||g(o,p,a))continue;let s=n(a);i??(i={});for(let l of t){let u=f==="initial"?l:`${l}-${f}`;i[u]=s}}}return i??{}}function N(...t){let e;for(let o of t)o&&(e===void 0&&(e={}),Object.assign(e,o));return e}function ie(t,e){let o=t.initial,p=!1;return e.hasDefault&&o===void 0&&(o=e.default,p=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(o)&&(o=e.default,p=!0),p?{...t,initial:o}:t}function D(t,...e){let{styling:o,passthrough:p,stylingKeys:n}=j(e),i={};for(let a in t)n.has(a)||(i[a]=t[a]);for(let a=0;a<p.length;a++){let s=p[a],l=i[s.key];if(l===void 0){s.hasDefault&&(i[s.key]=s.default);continue}s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!m(l)&&(i[s.key]=s.default)}let r,f=[];for(let a=0;a<o.length;a++){let s=o[a],l=t[s.key];if(l===void 0&&s.hasDefault&&(l=s.default),s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!m(l)&&(l=s.default),!!l){if(m(l)){if(!s.responsive)continue;l=ie(l,s)}if(s.type==="enum"){let u=C({allowArbitraryValues:!1,value:l,className:s.className,propValues:s.values,propValueSet:s.valueSet,parseValue:s.parseValue});u&&f.push(u);continue}if(s.type==="string"||s.type==="enum | string"){let[u,V]=E({className:s.className,customProperties:s.customProperties,propValues:s.type==="string"?[]:s.values,propValueSet:s.type==="string"?void 0:s.valueSet,parseValue:s.parseValue,value:l});V&&(r=N(r,V)),u&&f.push(u);continue}if(s.type==="boolean"){f.push(s.className);continue}}}return i.className=(0,W.default)(f.length>0?f.join(" "):void 0,t.className),i.style=N(r,t.style),i}var R={asChild:{type:"boolean"}};var $=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var L={color:{type:"enum",values:$,default:void 0}},G={color:{type:"enum",values:$,default:""}};var pe=["loud","medium","quiet"],z={emphasis:{type:"enum",className:"kui-emphasis",values:pe,default:void 0}};var ae=["normal","start","end","both"],v={trim:{type:"enum",className:"kui-r-lt",values:ae,responsive:!0}};var fe=["left","center","right"],A={align:{type:"enum",className:"kui-r-ta",values:fe,responsive:!0}};var le=["wrap","nowrap","pretty","balance"],x={wrap:{type:"enum",className:"kui-r-tw",values:le,responsive:!0}};var h={truncate:{type:"boolean",className:"kui-truncate"}};var ue=["sans","mono","serif"],K={font:{type:"enum",className:"kui-r-ff",values:ue}};var me=["regular","medium","semibold"],T={weight:{type:"enum",className:"kui-r-weight",values:me,responsive:!0}};var ce=["span","div","label","p"],de=["1","2","3","4","5","6","7","8","9"],B={as:{type:"enum",values:ce,default:"span"},...R,size:{type:"enum",className:"kui-r-size",values:de,responsive:!0},...K,...T,...A,...v,...h,...x,...L,...z};var k=c.memo(c.forwardRef((t,e)=>{let{children:o,className:p,asChild:n,as:i="span",color:r,...f}=D(t,B),a=p?`kui-Text ${p}`:"kui-Text";return n?c.createElement(U.Slot.Root,{"data-accent-color":r,...f,ref:e,className:a},o):c.createElement(i,{"data-accent-color":r,...f,ref:e,className:a},o)}));k.displayName="Text";var ye=["1","2","3","4","5","6","7","8","9"],M={...R,size:{type:"enum",className:"kui-r-size",values:ye,responsive:!0},...T,...v,...h,...x,...G};var F=d.forwardRef((t,e)=>{let{children:o,className:p,color:n,asChild:i,...r}=D(t,M);return d.createElement(k,{...r,"data-accent-color":n,ref:e,asChild:!0,className:(0,q.default)("kui-reset","kui-Link",p)},i?o:d.createElement("a",null,o))});F.displayName="Link";
3
3
  //# sourceMappingURL=link.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/link.tsx", "../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/emphasis.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/components/link.props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { linkPropDefs } from './link.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype LinkElement = React.ElementRef<'a'>;\ntype LinkOwnProps = GetPropDefTypes<typeof linkPropDefs>;\ninterface LinkProps extends ComponentPropsWithout<'a', RemovedProps>, LinkOwnProps {}\nconst Link = React.forwardRef<LinkElement, LinkProps>((props, forwardedRef) => {\n const { children, className, color, asChild, ...linkProps } = extractProps(props, linkPropDefs);\n return (\n <Text\n {...linkProps}\n data-accent-color={color}\n ref={forwardedRef}\n asChild\n className={classNames('kui-reset', 'kui-Link', className)}\n >\n {asChild ? (\n children\n ) : (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <a>{children}</a>\n )}\n </Text>\n );\n});\nLink.displayName = 'Link';\n\nexport { Link };\nexport type { LinkProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "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: 'kui-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", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { weightPropDef } from '../props/weight.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 underline = ['auto', 'always', 'hover', 'none'] as const;\n\nconst linkPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...weightPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n underline: { type: 'enum', className: 'kui-underline', values: underline, default: 'auto' },\n ...accentColorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n underline: PropDef<(typeof underline)[number]>;\n};\n\nexport { linkPropDefs };\n"],
5
- "mappings": ";0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,UAAAE,IAAA,eAAAC,EAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBCDvB,IAAAC,EAAuB,oBACvBC,EAAqB,oBCDrB,IAAAC,EAAuB,yBC0CvB,IAAMC,EAAkC,CAAC,EACnCC,GAAiC,IAAI,IAE3C,SAASC,GAAQC,EAAgE,CAC/E,IAAMC,EAAkC,OAAO,OAAO,CAAC,EAAG,GAAGD,CAAQ,EAC/DE,EAA6B,CAAC,EAC9BC,EAAiC,CAAC,EAClCC,EAAc,IAAI,IAExB,QAAWC,KAAOJ,EAAQ,CAGxB,IAAMK,EAAML,EAAOI,CAAG,EAShBE,EAASD,EAAI,QAAUT,EACvBW,EAA4B,CAChC,IAAAH,EACA,KAAMC,EAAI,KACV,QAASA,EAAI,QACb,WAAYA,EAAI,UAAY,OAC5B,WAAY,eAAgBA,EAC5B,UAAWA,EAAI,UACf,iBAAkBA,EAAI,iBACtB,WAAYA,EAAI,WAChB,OAAAC,EACA,SAAUA,EAAO,OAAS,EAAI,IAAI,IAAIA,CAAM,EAAIT,GAChD,aAAcQ,EAAI,OAAS,OAAS,IAAI,IAAa,CAACA,EAAI,QAAS,GAAGC,CAAM,CAAC,EAAI,MACnF,EAEID,EAAI,WACNJ,EAAQ,KAAKM,CAAQ,EACrBJ,EAAY,IAAIC,CAAG,IACVG,EAAS,YAAcF,EAAI,OAAS,SAE7CH,EAAY,KAAKK,CAAQ,CAE7B,CAEA,MAAO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C,CACL,EAAIC,EAAaR,EAAOS,CAAY,EAE9BC,EAAoBP,EAAY,YAAYA,CAAS,GAAK,WAEhE,OAAIC,EAEA,gBAAC,OAAK,KAAL,CACC,oBAAmBE,EAClB,GAAGC,EACJ,IAAKN,EACL,UAAWS,GAEVR,CACH,EAKF,gBAACG,EAAA,CACC,oBAAmBC,EAClB,GAAIC,EACL,IAAKN,EACL,UAAWS,GAEVR,CACH,CAEJ,CAAC,CACH,EACAH,EAAK,YAAc,OkBjDnB,IAAMY,GAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,GAAY,CAAC,OAAQ,SAAU,QAAS,MAAM,EAE9CC,EAAe,CACnB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQH,GACR,WAAY,EACd,EACA,GAAGI,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,UAAW,CAAE,KAAM,OAAQ,UAAW,gBAAiB,OAAQN,GAAW,QAAS,MAAO,EAC1F,GAAGO,CACL,EnBbA,IAAMC,EAAa,aAAmC,CAACC,EAAOC,IAAiB,CAC7E,GAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAU,EAAIC,EAAaP,EAAOQ,CAAY,EAC9F,OACE,gBAACC,EAAA,CACE,GAAGH,EACJ,oBAAmBF,EACnB,IAAKH,EACL,QAAO,GACP,aAAW,EAAAS,SAAW,YAAa,WAAYP,CAAS,GAEvDE,EACCH,EAGA,gBAAC,SAAGA,CAAS,CAEjB,CAEJ,CAAC,EACDH,EAAK,YAAc",
6
- "names": ["link_exports", "__export", "Link", "__toCommonJS", "React", "import_classnames", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "accentColorPropDef", "emphases", "emphasisPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "sizes", "underline", "linkPropDefs", "asChildPropDef", "weightPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "accentColorPropDef", "Link", "props", "forwardedRef", "children", "className", "color", "asChild", "linkProps", "extractProps", "linkPropDefs", "Text", "classNames"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { linkPropDefs } from './link.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype LinkElement = React.ElementRef<'a'>;\ntype LinkOwnProps = GetPropDefTypes<typeof linkPropDefs>;\ninterface LinkProps extends ComponentPropsWithout<'a', RemovedProps>, LinkOwnProps {}\nconst Link = React.forwardRef<LinkElement, LinkProps>((props, forwardedRef) => {\n const { children, className, color, asChild, ...linkProps } = extractProps(props, linkPropDefs);\n return (\n <Text\n {...linkProps}\n data-accent-color={color}\n ref={forwardedRef}\n asChild\n className={classNames('kui-reset', 'kui-Link', className)}\n >\n {asChild ? (\n children\n ) : (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <a>{children}</a>\n )}\n </Text>\n );\n});\nLink.displayName = 'Link';\n\nexport { Link };\nexport type { LinkProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "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: 'kui-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", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { weightPropDef } from '../props/weight.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;\n\nconst linkPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...weightPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...accentColorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { linkPropDefs };\n"],
5
+ "mappings": ";0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,UAAAE,IAAA,eAAAC,EAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBCDvB,IAAAC,EAAuB,oBACvBC,EAAqB,oBCDrB,IAAAC,EAAuB,yBC0CvB,IAAMC,EAAkC,CAAC,EACnCC,GAAiC,IAAI,IAE3C,SAASC,GAAQC,EAAgE,CAC/E,IAAMC,EAAkC,OAAO,OAAO,CAAC,EAAG,GAAGD,CAAQ,EAC/DE,EAA6B,CAAC,EAC9BC,EAAiC,CAAC,EAClCC,EAAc,IAAI,IAExB,QAAWC,KAAOJ,EAAQ,CAGxB,IAAMK,EAAML,EAAOI,CAAG,EAShBE,EAASD,EAAI,QAAUT,EACvBW,EAA4B,CAChC,IAAAH,EACA,KAAMC,EAAI,KACV,QAASA,EAAI,QACb,WAAYA,EAAI,UAAY,OAC5B,WAAY,eAAgBA,EAC5B,UAAWA,EAAI,UACf,iBAAkBA,EAAI,iBACtB,WAAYA,EAAI,WAChB,OAAAC,EACA,SAAUA,EAAO,OAAS,EAAI,IAAI,IAAIA,CAAM,EAAIT,GAChD,aAAcQ,EAAI,OAAS,OAAS,IAAI,IAAa,CAACA,EAAI,QAAS,GAAGC,CAAM,CAAC,EAAI,MACnF,EAEID,EAAI,WACNJ,EAAQ,KAAKM,CAAQ,EACrBJ,EAAY,IAAIC,CAAG,IACVG,EAAS,YAAcF,EAAI,OAAS,SAE7CH,EAAY,KAAKK,CAAQ,CAE7B,CAEA,MAAO,CAAE,QAAAN,EAAS,YAAAC,EAAa,YAAAC,CAAY,CAC7C,CAOA,IAAMK,GAAuB,CAAE,SAAU,IAAI,OAAU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gBAAC,OAAK,KAAL,CACC,oBAAmBE,EAClB,GAAGC,EACJ,IAAKN,EACL,UAAWS,GAEVR,CACH,EAKF,gBAACG,EAAA,CACC,oBAAmBC,EAClB,GAAIC,EACL,IAAKN,EACL,UAAWS,GAEVR,CACH,CAEJ,CAAC,CACH,EACAH,EAAK,YAAc,OkBjDnB,IAAMY,GAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAe,CACnB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,GACR,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL,EnBXA,IAAMC,EAAa,aAAmC,CAACC,EAAOC,IAAiB,CAC7E,GAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAU,EAAIC,EAAaP,EAAOQ,CAAY,EAC9F,OACE,gBAACC,EAAA,CACE,GAAGH,EACJ,oBAAmBF,EACnB,IAAKH,EACL,QAAO,GACP,aAAW,EAAAS,SAAW,YAAa,WAAYP,CAAS,GAEvDE,EACCH,EAGA,gBAAC,SAAGA,CAAS,CAEjB,CAEJ,CAAC,EACDH,EAAK,YAAc",
6
+ "names": ["link_exports", "__export", "Link", "__toCommonJS", "React", "import_classnames", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "accentColorPropDef", "emphases", "emphasisPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "sizes", "linkPropDefs", "asChildPropDef", "weightPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "accentColorPropDef", "Link", "props", "forwardedRef", "children", "className", "color", "asChild", "linkProps", "extractProps", "linkPropDefs", "Text", "classNames"]
7
7
  }
@@ -4,12 +4,6 @@ declare const linkPropDefs: {
4
4
  values: readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"];
5
5
  default: "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky";
6
6
  };
7
- underline: {
8
- type: "enum";
9
- className: string;
10
- values: readonly ["auto", "always", "hover", "none"];
11
- default: "auto";
12
- };
13
7
  wrap: {
14
8
  type: "enum";
15
9
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"link.props.d.ts","sourceRoot":"","sources":["../../../src/components/link.props.tsx"],"names":[],"mappings":"AAYA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"link.props.d.ts","sourceRoot":"","sources":["../../../src/components/link.props.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAejB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},D=(o,e,t,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!y.call(o,r)&&r!==t&&s(o,r,{get:()=>e[r],enumerable:!(p=u(e,r))||p.enumerable});return o};var P=o=>D(s({},"__esModule",{value:!0}),o);var k={};d(k,{linkPropDefs:()=>x});module.exports=P(k);var a={asChild:{type:"boolean"}};var b=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var n={color:{type:"enum",values:b,default:""}};var g=["normal","start","end","both"],i={trim:{type:"enum",className:"kui-r-lt",values:g,responsive:!0}};var v=["wrap","nowrap","pretty","balance"],f={wrap:{type:"enum",className:"kui-r-tw",values:v,responsive:!0}};var l={truncate:{type:"boolean",className:"kui-truncate"}};var w=["regular","medium","semibold"],m={weight:{type:"enum",className:"kui-r-weight",values:w,responsive:!0}};var C=["1","2","3","4","5","6","7","8","9"],h=["auto","always","hover","none"],x={...a,size:{type:"enum",className:"kui-r-size",values:C,responsive:!0},...m,...i,...l,...f,underline:{type:"enum",className:"kui-underline",values:h,default:"auto"},...n};
1
+ "use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var D=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},P=(o,e,t,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!y.call(o,r)&&r!==t&&s(o,r,{get:()=>e[r],enumerable:!(p=c(e,r))||p.enumerable});return o};var d=o=>P(s({},"__esModule",{value:!0}),o);var x={};D(x,{linkPropDefs:()=>h});module.exports=d(x);var a={asChild:{type:"boolean"}};var g=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var n={color:{type:"enum",values:g,default:""}};var b=["normal","start","end","both"],i={trim:{type:"enum",className:"kui-r-lt",values:b,responsive:!0}};var C=["wrap","nowrap","pretty","balance"],f={wrap:{type:"enum",className:"kui-r-tw",values:C,responsive:!0}};var l={truncate:{type:"boolean",className:"kui-truncate"}};var v=["regular","medium","semibold"],m={weight:{type:"enum",className:"kui-r-weight",values:v,responsive:!0}};var w=["1","2","3","4","5","6","7","8","9"],h={...a,size:{type:"enum",className:"kui-r-size",values:w,responsive:!0},...m,...i,...l,...f,...n};
2
2
  //# sourceMappingURL=link.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/link.props.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/weight.prop.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { weightPropDef } from '../props/weight.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 underline = ['auto', 'always', 'hover', 'none'] as const;\n\nconst linkPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...weightPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n underline: { type: 'enum', className: 'kui-underline', values: underline, default: 'auto' },\n ...accentColorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n underline: PropDef<(typeof underline)[number]>;\n};\n\nexport { linkPropDefs };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
5
- "mappings": "yaAAA,IA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toCommonJS", "asChildPropDef", "accentColors", "accentColorPropDef", "accentColors", "leadingTrimValues", "leadingTrimPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "weights", "weightPropDef", "sizes", "underline", "linkPropDefs", "asChildPropDef", "weightPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "accentColorPropDef"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { weightPropDef } from '../props/weight.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;\n\nconst linkPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...weightPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...accentColorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { linkPropDefs };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GCEA,IAAMI,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAgBvP,IAAMC,EAAqB,CACzB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,EACX,CACF,ECvBA,IAAMC,EAAoB,CAAC,SAAU,QAAS,MAAO,MAAM,EAErDC,EAAqB,CACzB,KAAM,CACJ,KAAM,OACN,UAAW,WACX,OAAQD,EACR,WAAY,EACd,CACF,ECTA,IAAME,EAAiB,CAAC,OAAQ,SAAU,SAAU,SAAS,EAEvDC,EAAkB,CACtB,KAAM,CACJ,KAAM,OACN,UAAW,WACX,OAAQD,EACR,WAAY,EACd,CACF,ECTA,IAAME,EAAkB,CACtB,SAAU,CACR,KAAM,UACN,UAAW,cACb,CACF,ECJA,IAAMC,EAAU,CAAC,UAAW,SAAU,UAAU,EAE1CC,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,UAAW,eACX,OAAQD,EACR,WAAY,EACd,CACF,ENHA,IAAME,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEpDC,EAAe,CACnB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQF,EACR,WAAY,EACd,EACA,GAAGG,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,EACH,GAAGC,CACL",
6
+ "names": ["link_props_exports", "__export", "linkPropDefs", "__toCommonJS", "asChildPropDef", "accentColors", "accentColorPropDef", "accentColors", "leadingTrimValues", "leadingTrimPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "weights", "weightPropDef", "sizes", "linkPropDefs", "asChildPropDef", "weightPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "accentColorPropDef"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var Ut=Object.create;var re=Object.defineProperty;var Zt=Object.getOwnPropertyDescriptor;var Yt=Object.getOwnPropertyNames;var Xt=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty;var Qt=(t,e)=>{for(var o in e)re(t,o,{get:e[o],enumerable:!0})},Ge=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Yt(e))!Jt.call(t,r)&&r!==o&&re(t,r,{get:()=>e[r],enumerable:!(n=Zt(e,r))||n.enumerable});return t};var y=(t,e,o)=>(o=t!=null?Ut(Xt(t)):{},Ge(e||!t||!t.__esModule?re(o,"default",{value:t,enumerable:!0}):o,t)),eo=t=>Ge(re({},"__esModule",{value:!0}),t);var Yo={};Qt(Yo,{Button:()=>Ot,Content:()=>jt,Item:()=>Lt,Root:()=>Mt,Viewport:()=>It,useMessageScroller:()=>w.useMessageScroller,useMessageScrollerScrollable:()=>w.useMessageScrollerScrollable,useMessageScrollerVisibility:()=>w.useMessageScrollerVisibility});module.exports=eo(Yo);var R=y(require("react")),U=y(require("classnames")),w=require("@shadcn/react/message-scroller"),Ft=require("radix-ui/internal");var te=y(require("react")),Et=y(require("classnames"));var c=y(require("react")),lt=y(require("classnames")),ut=require("radix-ui"),ue=require("radix-ui/internal");var j={asChild:{type:"boolean"}};var se=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Ae=["auto","gray","mauve","slate","sage","olive","sand"],$e={color:{type:"enum",values:se,default:void 0}},_e={color:{type:"enum",values:se,default:""}};var ye=["none","small","medium","large","full"],Ke={radius:{type:"enum",values:ye,default:void 0}};var to=["1","2","3","4"],oo=["raised","solid","soft","surface","outline","ghost"],Pe={...j,size:{type:"enum",className:"kui-r-size",values:to,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:oo,default:"solid"},..._e,...Ke,loading:{type:"boolean",className:"kui-loading",default:!1},fullWidth:{type:"boolean",className:"kui-full-width",default:!1}};var ie=y(require("react")),st=y(require("classnames"));var Ye=y(require("classnames"));var ro=[],so=new Set;function no(t){let e=Object.assign({},...t),o=[],n=[],r=new Set;for(let s in e){let a=e[s],p=a.values??ro,l={key:s,type:a.type,default:a.default,hasDefault:a.default!==void 0,responsive:"responsive"in a,className:a.className,customProperties:a.customProperties,parseValue:a.parseValue,values:p,valueSet:p.length>0?new Set(p):so,enumValueSet:a.type==="enum"?new Set([a.default,...p]):void 0};a.className?(o.push(l),r.add(s)):(l.hasDefault||a.type==="enum")&&n.push(l)}return{styling:o,passthrough:n,stylingKeys:r}}var ao={children:new WeakMap};function qe(t){let e=ao;for(let o=0;o<t.length;o++){let n=t[o],r=e.children.get(n);r===void 0&&(r={children:new WeakMap},e.children.set(n,r)),e=r}return e.compiled??(e.compiled=no(t))}var io=["initial","xs","sm","md","lg","xl"],ge=new Set(io);function he(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var po=new Set(["initial","xs","sm","md","lg","xl"]);function H(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(po.has(e))return!0;return!1}function ne(t,e,o){return e!==void 0?e.has(o):t.includes(o)}function Ze({className:t,customProperties:e,...o}){let n=ve({allowArbitraryValues:!0,className:t,...o}),r=lo({customProperties:e,...o});return[n,r]}function ve({allowArbitraryValues:t,value:e,className:o,propValues:n,propValueSet:r,parseValue:s=a=>a}){if(e){if(typeof e=="string")return ne(n,r,e)?Ue(o,e,s):t?o:void 0;if(H(e)){let a=e,p=[];for(let l in a){if(!he(a,l)||!ge.has(l))continue;let i=a[l];if(i!==void 0){if(ne(n,r,i)){let u=Ue(o,i,s),f=l==="initial"?u:`${l}:${u}`;p.push(f)}else if(t){let u=l==="initial"?o:`${l}:${o}`;p.push(u)}}}return p.length>0?p.join(" "):""}if(t)return o}}function Ue(t,e,o){let n=t?"-":"",r=o(e),s=r?.startsWith("-"),a=s?"-":"",p=s?r?.substring(1):r;return`${a}${t}${n}${p}`}function lo({customProperties:t,value:e,propValues:o,propValueSet:n,parseValue:r=s=>s}){if(!e||typeof e=="string"&&ne(o,n,e))return;let s;if(typeof e=="string"){let a=r(e);s={};for(let p of t)s[p]=a;return s}if(H(e)){let a=e;for(let p in a){if(!he(a,p)||!ge.has(p))continue;let l=a[p];if(l===void 0||ne(o,n,l))continue;let i=r(l);s??(s={});for(let u of t){let f=p==="initial"?u:`${u}-${p}`;s[f]=i}}}return s??{}}function Ce(...t){let e;for(let o of t)o&&(e===void 0&&(e={}),Object.assign(e,o));return e}function uo(t,e){let o=t.initial,n=!1;return e.hasDefault&&o===void 0&&(o=e.default,n=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(o)&&(o=e.default,n=!0),n?{...t,initial:o}:t}function V(t,...e){let{styling:o,passthrough:n,stylingKeys:r}=qe(e),s={};for(let l in t)r.has(l)||(s[l]=t[l]);for(let l=0;l<n.length;l++){let i=n[l],u=s[i.key];if(u===void 0){i.hasDefault&&(s[i.key]=i.default);continue}i.enumValueSet!==void 0&&!i.enumValueSet.has(u)&&!H(u)&&(s[i.key]=i.default)}let a,p=[];for(let l=0;l<o.length;l++){let i=o[l],u=t[i.key];if(u===void 0&&i.hasDefault&&(u=i.default),i.enumValueSet!==void 0&&!i.enumValueSet.has(u)&&!H(u)&&(u=i.default),!!u){if(H(u)){if(!i.responsive)continue;u=uo(u,i)}if(i.type==="enum"){let f=ve({allowArbitraryValues:!1,value:u,className:i.className,propValues:i.values,propValueSet:i.valueSet,parseValue:i.parseValue});f&&p.push(f);continue}if(i.type==="string"||i.type==="enum | string"){let[f,d]=Ze({className:i.className,customProperties:i.customProperties,propValues:i.type==="string"?[]:i.values,propValueSet:i.type==="string"?void 0:i.valueSet,parseValue:i.parseValue,value:u});d&&(a=Ce(a,d)),f&&p.push(f);continue}if(i.type==="boolean"){p.push(i.className);continue}}}return s.className=(0,Ye.default)(p.length>0?p.join(" "):void 0,t.className),s.style=Ce(a,t.style),s}var G=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Xe={p:{type:"enum | string",className:"kui-r-p",customProperties:["--p"],values:G,responsive:!0},px:{type:"enum | string",className:"kui-r-px",customProperties:["--pl","--pr"],values:G,responsive:!0},py:{type:"enum | string",className:"kui-r-py",customProperties:["--pt","--pb"],values:G,responsive:!0},pt:{type:"enum | string",className:"kui-r-pt",customProperties:["--pt"],values:G,responsive:!0},pr:{type:"enum | string",className:"kui-r-pr",customProperties:["--pr"],values:G,responsive:!0},pb:{type:"enum | string",className:"kui-r-pb",customProperties:["--pb"],values:G,responsive:!0},pl:{type:"enum | string",className:"kui-r-pl",customProperties:["--pl"],values:G,responsive:!0}};var Je={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var q={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var De=["visible","hidden","clip","scroll","auto"],co=["static","relative","absolute","fixed","sticky"],X=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9"],mo=["0","1"],fo=["0","1"],yo=["start","center","end","baseline","stretch"],Po=["start","center","end","baseline","stretch"],Qe={...Xe,...q,...Je,position:{type:"enum",className:"kui-r-position",values:co,responsive:!0},inset:{type:"enum | string",className:"kui-r-inset",customProperties:["--inset"],values:X,responsive:!0},top:{type:"enum | string",className:"kui-r-top",customProperties:["--top"],values:X,responsive:!0},right:{type:"enum | string",className:"kui-r-right",customProperties:["--right"],values:X,responsive:!0},bottom:{type:"enum | string",className:"kui-r-bottom",customProperties:["--bottom"],values:X,responsive:!0},left:{type:"enum | string",className:"kui-r-left",customProperties:["--left"],values:X,responsive:!0},overflow:{type:"enum",className:"kui-r-overflow",values:De,responsive:!0},overflowX:{type:"enum",className:"kui-r-ox",values:De,responsive:!0},overflowY:{type:"enum",className:"kui-r-oy",values:De,responsive:!0},flexBasis:{type:"string",className:"kui-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"kui-r-fs",customProperties:["--flex-shrink"],values:mo,responsive:!0},flexGrow:{type:"enum | string",className:"kui-r-fg",customProperties:["--flex-grow"],values:fo,responsive:!0},gridArea:{type:"string",className:"kui-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"kui-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"kui-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"kui-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"kui-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"kui-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"kui-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"kui-r-as",values:yo,responsive:!0},justifySelf:{type:"enum",className:"kui-r-js",values:Po,responsive:!0}};var A=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12","bleed"],et={m:{type:"enum | string",values:A,responsive:!0,className:"kui-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:A,responsive:!0,className:"kui-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:A,responsive:!0,className:"kui-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:A,responsive:!0,className:"kui-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:A,responsive:!0,className:"kui-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:A,responsive:!0,className:"kui-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:A,responsive:!0,className:"kui-r-ml",customProperties:["--ml"]}};var ae=require("radix-ui"),kr=ae.Slot.Root,tt=ae.Slot.Root,Nr=ae.Slot.Slottable;var Re=["0","1","2","3","4","5","6","7","8","9","10","11","12"],ot={gap:{type:"enum | string",className:"kui-r-gap",customProperties:["--gap"],values:Re,responsive:!0},gapX:{type:"enum | string",className:"kui-r-cg",customProperties:["--column-gap"],values:Re,responsive:!0},gapY:{type:"enum | string",className:"kui-r-rg",customProperties:["--row-gap"],values:Re,responsive:!0}};var go=["div","span"],ho=["none","inline-flex","flex"],vo=["row","column","row-reverse","column-reverse"],Co=["start","center","end","baseline","stretch"],Do=["start","center","end","between"],Ro=["nowrap","wrap","wrap-reverse"],rt={as:{type:"enum",values:go,default:"div"},...j,display:{type:"enum",className:"kui-r-display",values:ho,responsive:!0},direction:{type:"enum",className:"kui-r-fd",values:vo,responsive:!0},align:{type:"enum",className:"kui-r-ai",values:Co,responsive:!0},justify:{type:"enum",className:"kui-r-jc",values:Do,parseValue:bo,responsive:!0},wrap:{type:"enum",className:"kui-r-fw",values:Ro,responsive:!0},...ot};function bo(t){return t==="between"?"space-between":t}var J=ie.forwardRef((t,e)=>{let{className:o,asChild:n,as:r="div",...s}=V(t,rt,Qe,et);return ie.createElement(n?tt:r,{...s,ref:e,className:(0,st.default)("kui-Flex",o)})});J.displayName="Flex";var v=y(require("react")),be=y(require("classnames"));var nt={loading:{type:"boolean",default:!0}};var xe=v.forwardRef((t,e)=>{let{className:o,children:n,loading:r,...s}=V(t,nt);if(n===void 0&&!r)return null;let a=s["aria-label"]!==void 0||s["aria-labelledby"]!==void 0,p=v.createElement("span",{role:a?"status":void 0,"aria-hidden":a?void 0:!0,...s,ref:e,className:(0,be.default)("kui-Spinner",o)},v.createElement("span",{className:"kui-SpinnerWheel"},v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"})),typeof s["aria-label"]=="string"?v.createElement("span",{className:"kui-sr-only"},s["aria-label"]):null);return n===void 0?p:v.createElement("span",{className:"kui-SpinnerHost","data-loading":r||void 0,"aria-busy":r||void 0},v.createElement("span",{"aria-hidden":r||void 0,className:(0,be.default)("kui-SpinnerChildren",r&&"kui-SpinnerHiddenChildren")},n),r?v.createElement(J,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,p)):null)});xe.displayName="Spinner";var m=y(require("react")),xo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));xo.displayName="ThickDividerHorizontalIcon";var To=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));To.displayName="ThickCheckIcon";var wo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));wo.displayName="ChevronDownIcon";var So=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));So.displayName="ThickChevronRightIcon";var ko=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));ko.displayName="ThickChevronLeftIcon";var No=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));No.displayName="ThickDotIcon";var Bo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{...t,ref:e,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"},m.default.createElement("path",{d:"M18 6 6 18"}),m.default.createElement("path",{d:"m6 6 12 12"})));Bo.displayName="CloseIcon";var Eo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{...t,ref:e,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"},m.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));Eo.displayName="PaperclipIcon";var Vo=m.default.forwardRef((t,e)=>m.default.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"},m.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),m.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));Vo.displayName="FileIcon";var Fo=m.default.forwardRef((t,e)=>m.default.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"},m.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),m.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),m.default.createElement("path",{d:"M10 9H8"}),m.default.createElement("path",{d:"M16 13H8"}),m.default.createElement("path",{d:"M16 17H8"})));Fo.displayName="FileTextIcon";var Te=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));Te.displayName="TickIcon";var pe=y(require("react"));function at(t,e){if(e.includes(t))return t;let o=Number(t),n=e[0],r=1/0;for(let s=0;s<e.length;s++){let a=Math.abs(Number(e[s])-o);a<r&&(r=a,n=e[s])}return n}var le=pe.createContext("2");le.displayName="ThemeSizeContext";function it(t,e){let o=pe.useContext(le);if(t.size!==void 0)return t;let n=at(o,e.values);return n===e.default?t:{...t,size:n}}var ke=c.forwardRef((t,e)=>{let o=it(t,Pe.size),{className:n,children:r,asChild:s,as:a,color:p,radius:l,disabled:i,done:u=!1,...f}=V(o,Pe),d=!!o.loading,S=o.loading!==void 0,D=!!i||d,{onClick:b,"aria-describedby":x}=f,F=c.useCallback(g=>{if(D){g.preventDefault();return}b?.(g)},[D,b]),M=c.useMemo(()=>{let g=s&&c.isValidElement(r)?r.props.children:r,B=Se(g),E=k=>c.isValidElement(k)&&(k.type==="svg"||typeof k.type!="string"&&k.type!==c.Fragment&&!Io.has(we(k.type)));return{iconStart:E(B[0]),iconEnd:E(B[B.length-1])}},[s,r]),[N,_]=c.useState(null),K=c.useRef(null),z=(0,ue.useComposedRefs)(e,K);(0,ue.useLayoutEffect)(()=>{let g=K.current;if(!g||d||u)return;let B=g.querySelector(":scope > .kui-BaseButtonContent")??g,E=pt(B,"start"),k=pt(B,"end");_(I=>I&&I.iconStart===E&&I.iconEnd===k?I:{iconStart:E,iconEnd:k})});let{iconStart:W,iconEnd:Z}=N??M,Le=!!f["data-icon-only"],Y=c.useMemo(()=>{if(!u)return r;let g=c.createElement(Te,{key:"kui-done-tick",className:"kui-BaseButtonTick","aria-hidden":!0}),B=E=>{if(Le)return g;let k=Se(E),I=k.findIndex(oe=>!(typeof oe=="string"&&!oe.trim())),He=k[I];return I!==-1&&W&&(N!==null||c.isValidElement(He)&&He.type==="svg")?k.map((oe,qt)=>qt===I?g:oe):[g,...k]};if(s&&c.isValidElement(r)){let E=r;return c.cloneElement(E,void 0,B(E.props.children))}return B(r)},[u,r,Le,W,N,s]),zt=s?ut.Slot.Root:a||"button",Wt=["button","input","textarea","select"],Oe=s?c.isValidElement(r)?r.type:void 0:a||"button",fe=typeof Oe=="string"&&Wt.includes(Oe),{onClickCapture:ze}=f,Ht=c.useCallback(g=>{if(s&&D){g.preventDefault(),g.stopPropagation();return}ze?.(g)},[s,D,ze]),Gt=!s&&(!a||a==="button"),At="type"in f,$t=c.useId(),de=d?`${$t}-loading`:void 0,_t=c.useMemo(()=>d?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":[x,de].filter(Boolean).join(" ")}:i&&(!fe||s)?{"aria-disabled":!0}:{},[d,de,x,i,fe,s]),We=(g,B)=>S?c.createElement(c.Fragment,null,c.createElement("span",{className:"kui-BaseButtonContent","aria-hidden":d||void 0},g),d?c.createElement(c.Fragment,null,c.createElement("span",{className:"kui-sr-only"},c.createElement("span",{id:de,"aria-hidden":!0},"Loading"),B),c.createElement(J,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},c.createElement("span",null,c.createElement(xe,{"aria-hidden":"true"})))):null):g,Kt=s&&S&&c.isValidElement(Y)?c.cloneElement(Y,void 0,We(Y.props.children,c.isValidElement(r)?r.props.children:null)):Y;return c.createElement(zt,{"data-accent-color":p,"data-radius":l,"data-icon-start":W||void 0,"data-icon-end":Z||void 0,"data-done":u||void 0,...f,..._t,"data-disabled":D||void 0,onClick:F,onClickCapture:Ht,ref:z,className:(0,lt.default)("kui-reset","kui-BaseButton",n),...fe&&{disabled:i},...Gt&&!At?{type:"button"}:{}},s?Kt:We(Y,r))});ke.displayName="BaseButton";var Io=new Set(["Text","Kbd","Code","Link","Em","Strong","Quote","Badge","Trans"]);function we(t){if(!t||typeof t!="function"&&typeof t!="object")return"";let e=t;return e.displayName||e.name||we(e.render)||we(e.type)}function Se(t){return c.Children.toArray(t).flatMap(e=>c.isValidElement(e)&&e.type===c.Fragment?Se(e.props.children):[e])}function pt(t,e){let o=e==="start"?t.firstChild:t.lastChild;for(;o&&(o.nodeType===Node.COMMENT_NODE||o.nodeType===Node.TEXT_NODE&&!o.textContent?.trim());)o=e==="start"?o.nextSibling:o.previousSibling;return o?.nodeType===Node.ELEMENT_NODE&&o.localName==="svg"}var C=y(require("react")),St=y(require("classnames")),O=require("radix-ui");var $=y(require("react")),vt=require("radix-ui");var jo=["loud","medium","quiet"],ct={emphasis:{type:"enum",className:"kui-emphasis",values:jo,default:void 0}};var Lo=["normal","start","end","both"],mt={trim:{type:"enum",className:"kui-r-lt",values:Lo,responsive:!0}};var Oo=["left","center","right"],ft={align:{type:"enum",className:"kui-r-ta",values:Oo,responsive:!0}};var zo=["wrap","nowrap","pretty","balance"],dt={wrap:{type:"enum",className:"kui-r-tw",values:zo,responsive:!0}};var yt={truncate:{type:"boolean",className:"kui-truncate"}};var Wo=["sans","mono","serif"],Pt={font:{type:"enum",className:"kui-r-ff",values:Wo}};var Ho=["regular","medium","semibold"],gt={weight:{type:"enum",className:"kui-r-weight",values:Ho,responsive:!0}};var Go=["span","div","label","p"],Ao=["1","2","3","4","5","6","7","8","9"],ht={as:{type:"enum",values:Go,default:"span"},...j,size:{type:"enum",className:"kui-r-size",values:Ao,responsive:!0},...Pt,...gt,...ft,...mt,...yt,...dt,...$e,...ct};var Ne=$.memo($.forwardRef((t,e)=>{let{children:o,className:n,asChild:r,as:s="span",color:a,...p}=V(t,ht),l=n?`kui-Text ${n}`:"kui-Text";return r?$.createElement(vt.Slot.Root,{"data-accent-color":a,...p,ref:e,className:l},o):$.createElement(s,{"data-accent-color":a,...p,ref:e,className:l},o)}));Ne.displayName="Text";var ee=y(require("react"));var h=y(require("react")),Rt=y(require("classnames")),Q=require("radix-ui");function Ct(t){switch(t){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var Be=y(require("react"));function L(t){let[e,o]=Be.useState(t),[n,r]=Be.useState(t);return Object.is(t,n)||(r(t),o(t)),[e,o]}var $o=["inherit","light","dark"],Dt=["sans","mono","serif"],_o=["1","2","3","4"],P={...j,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:$o,default:"inherit"},accentColor:{type:"enum",values:se,default:"gray"},grayColor:{type:"enum",values:Ae,default:"gray"},radius:{type:"enum",values:ye,default:"full"},fontFamily:{type:"enum",values:Dt,default:"sans"},headingFontFamily:{type:"enum",values:Dt},size:{type:"enum",values:_o,default:"2"}};var T=()=>{},Fs={appearance:P.appearance.default,accentColor:P.accentColor.default,grayColor:P.grayColor.default,resolvedGrayColor:P.grayColor.default,radius:P.radius.default,fontFamily:P.fontFamily.default,headingFontFamily:void 0,size:P.size.default,onAppearanceChange:T,onAccentColorChange:T,onGrayColorChange:T,onRadiusChange:T,onFontFamilyChange:T,onHeadingFontFamilyChange:T,onSizeChange:T},Ee=h.createContext(void 0);var Ve=h.forwardRef((t,e)=>{let o=h.useContext(Ee),n=Q.Direction.useDirection();return o===void 0?h.createElement(Q.Direction.Provider,{dir:n},h.createElement(bt,{...t,ref:e})):h.createElement(Fe,{...t,ref:e})});Ve.displayName="Theme";var bt=h.forwardRef((t,e)=>{let{appearance:o=P.appearance.default,accentColor:n=P.accentColor.default,grayColor:r=P.grayColor.default,radius:s=P.radius.default,fontFamily:a=P.fontFamily.default,headingFontFamily:p,size:l=P.size.default,hasBackground:i=P.hasBackground.default,...u}=t,[f,d]=L(o),[S,D]=L(n),[b,x]=L(r),[F,M]=L(s),[N,_]=L(a),[K,z]=L(p),[W,Z]=L(l);return h.createElement(Fe,{...u,ref:e,isRoot:!0,hasBackground:i,appearance:f,accentColor:S,grayColor:b,radius:F,fontFamily:N,headingFontFamily:K,size:W,onAppearanceChange:d,onAccentColorChange:D,onGrayColorChange:x,onRadiusChange:M,onFontFamilyChange:_,onHeadingFontFamilyChange:z,onSizeChange:Z})});bt.displayName="ThemeRoot";var Fe=h.forwardRef((t,e)=>{let o=h.useContext(Ee),{asChild:n,isRoot:r,hasBackground:s,appearance:a=t.appearance??o?.appearance??P.appearance.default,accentColor:p=t.accentColor??o?.accentColor??P.accentColor.default,grayColor:l=t.grayColor??o?.resolvedGrayColor??P.grayColor.default,radius:i=t.radius??o?.radius??P.radius.default,fontFamily:u=t.fontFamily??o?.fontFamily??P.fontFamily.default,headingFontFamily:f=t.headingFontFamily??o?.headingFontFamily,size:d=t.size??o?.size??P.size.default,onAppearanceChange:S=o?.onAppearanceChange??T,onAccentColorChange:D=o?.onAccentColorChange??T,onGrayColorChange:b=o?.onGrayColorChange??T,onRadiusChange:x=o?.onRadiusChange??T,onFontFamilyChange:F=o?.onFontFamilyChange??T,onHeadingFontFamilyChange:M=o?.onHeadingFontFamilyChange??T,onSizeChange:N=o?.onSizeChange??T,..._}=t,K=n?Q.Slot.Root:"div",z=l==="auto"?Ct(p):l,W=t.appearance==="light"||t.appearance==="dark",Z=s===void 0?r||W:s;return h.createElement(Ee.Provider,{value:h.useMemo(()=>({appearance:a,accentColor:p,grayColor:l,resolvedGrayColor:z,radius:i,fontFamily:u,headingFontFamily:f,size:d,onAppearanceChange:S,onAccentColorChange:D,onGrayColorChange:b,onRadiusChange:x,onFontFamilyChange:F,onHeadingFontFamilyChange:M,onSizeChange:N}),[a,p,l,z,i,u,f,d,S,D,b,x,F,M,N])},h.createElement(le.Provider,{value:d},h.createElement(K,{"data-is-root-theme":r?"true":"false","data-accent-color":p,"data-gray-color":z,"data-has-background":Z?"true":"false","data-radius":i,"data-font-family":u,"data-heading-font-family":f,ref:e,..._,className:(0,Rt.default)("kui-theme",{light:a==="light",dark:a==="dark"},_.className)})))});Fe.displayName="ThemeImpl";var xt=y(require("react")),Tt=xt.createContext(void 0);var Me=ee.forwardRef((t,e)=>ee.createElement(Tt.Provider,{value:null},ee.createElement(Ve,{...t,ref:e})));Me.displayName="PortalTheme";var wt={content:{type:"ReactNode",required:!0},width:q.width,minWidth:q.minWidth,maxWidth:{...q.maxWidth,default:"360px"}};var kt=200,Nt=C.createContext(!1);function Ko({delayDuration:t=kt,children:e,...o}){return C.createElement(Nt.Provider,{value:!0},C.createElement(O.Tooltip.Provider,{delayDuration:t,...o},e))}Ko.displayName="TooltipProvider";var Ie=C.forwardRef((t,e)=>{let{children:o,className:n,open:r,defaultOpen:s,onOpenChange:a,delayDuration:p,disableHoverableContent:l,content:i,container:u,forceMount:f,...d}=V(t,wt),S={open:r,defaultOpen:s,onOpenChange:a,delayDuration:p,disableHoverableContent:l},D=C.useContext(Nt),b=C.createElement(O.Tooltip.Root,{...S},C.createElement(O.Tooltip.Trigger,{asChild:!0},o),C.createElement(O.Tooltip.Portal,{container:u,forceMount:f},C.createElement(Me,{asChild:!0},C.createElement(O.Tooltip.Content,{sideOffset:4,collisionPadding:10,...d,asChild:!1,ref:e,className:(0,St.default)("kui-TooltipContent",n)},C.createElement(Ne,{as:"p",className:"kui-TooltipText",size:"1"},i),C.createElement(O.Tooltip.Arrow,{className:"kui-TooltipArrow"})))));return D?b:C.createElement(O.Tooltip.Provider,{delayDuration:kt},b)});Ie.displayName="Tooltip";var ce=y(require("react"));function Bt(t){let e=ce.useId(),o=!!t,n=ce.useMemo(()=>o?{"aria-describedby":e}:{},[o,e]);return{tooltipId:e,hasTooltip:o,accessibilityProps:n}}var qo={loud:"solid",medium:"raised",quiet:"ghost"};function Uo(t){if(t["aria-label"]||t["aria-labelledby"])return;console.error("Button: an `iconOnly` button must have an accessible name. Pass `aria-label`, or `aria-labelledby` referencing a label element.")}var je=te.forwardRef(({className:t,style:e,tooltip:o,tooltipSide:n="top",tooltipAlign:r="center",tooltipDelayDuration:s,tooltipDisableHoverableContent:a,iconOnly:p=!1,emphasis:l,variant:i,...u},f)=>{let{tooltipId:d,hasTooltip:S,accessibilityProps:D}=Bt(o);p&&(Uo(u),u.fullWidth=!1);let b=l!==void 0?qo[l]:i,x=u["aria-describedby"],F=D["aria-describedby"],M=[x,F].filter(Boolean).join(" ")||void 0,N=te.createElement(ke,{...u,variant:b,"aria-describedby":M,ref:f,"data-icon-only":p||void 0,className:(0,Et.default)("kui-Button",t),style:e});return S?te.createElement(Ie,{content:o,side:n,align:r,delayDuration:s,disableHoverableContent:a,id:d},N):N});je.displayName="Button";var me=y(require("react"));function Zo(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function Vt(t){let[e,o]=me.useState(null);return me.useEffect(()=>{if(!t||!e)return;let n=0,r=()=>{n=0;let l=Zo(e),i=Math.max(0,e.scrollTop),u=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${i}px`),e.style.setProperty("--scroll-overflow-end",`${u}px`);let f=Math.abs(e.scrollLeft),d=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${d}px`)},s=()=>{n||(n=requestAnimationFrame(r))};r(),e.addEventListener("scroll",s,{passive:!0});let a=typeof ResizeObserver>"u"?null:new ResizeObserver(s);a?.observe(e);for(let l of Array.from(e.children))a?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(s);return p?.observe(e,{childList:!0}),()=>{n&&cancelAnimationFrame(n),e.removeEventListener("scroll",s),a?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),o}var Mt=R.forwardRef(({autoScroll:t=!0,defaultScrollPosition:e="end",scrollEdgeThreshold:o,scrollMargin:n,className:r,children:s,...a},p)=>R.createElement(w.MessageScroller.Provider,{autoScroll:t,defaultScrollPosition:e,...o!=null?{scrollEdgeThreshold:o}:{},...n!=null?{scrollMargin:n}:{}},R.createElement(w.MessageScroller.Root,{...a,ref:p,className:(0,U.default)("kui-MessageScrollerRoot",r)},s)));Mt.displayName="MessageScroller.Root";var It=R.forwardRef(({className:t,"aria-label":e,fade:o=!0,...n},r)=>{let s=Vt(o),a=(0,Ft.useComposedRefs)(r,s);return R.createElement(w.MessageScroller.Viewport,{"aria-label":e??"",...n,ref:a,"data-fade":o?"":void 0,className:(0,U.default)("kui-MessageScrollerViewport",t)})});It.displayName="MessageScroller.Viewport";var jt=R.forwardRef(({className:t,...e},o)=>R.createElement(w.MessageScroller.Content,{...e,ref:o,className:(0,U.default)("kui-MessageScrollerContent",t)}));jt.displayName="MessageScroller.Content";var Lt=R.forwardRef(({className:t,...e},o)=>R.createElement(w.MessageScroller.Item,{...e,ref:o,className:(0,U.default)("kui-MessageScrollerItem",t)}));Lt.displayName="MessageScroller.Item";var Ot=R.forwardRef(({direction:t="end",behavior:e="auto",className:o,children:n,size:r,variant:s="surface",emphasis:a,color:p="gray",radius:l="full","aria-label":i,onClick:u,...f},d)=>{let{scrollToEnd:S,scrollToStart:D}=(0,w.useMessageScroller)(),b=x=>{if(u?.(x),x.defaultPrevented)return;x.preventDefault(),x.currentTarget.closest(".kui-MessageScrollerRoot")?.querySelector(".kui-MessageScrollerViewport")?.focus({preventScroll:!0}),t==="start"?D({behavior:e}):S({behavior:e})};return R.createElement(w.MessageScroller.Button,{direction:t,behavior:e,onClick:b,render:R.createElement(je,{iconOnly:!0,...f,ref:d,size:r,...a?{emphasis:a}:{variant:s},color:p,radius:l,"aria-label":i??(t==="end"?"Jump to the latest":"Jump to the first"),className:(0,U.default)("kui-MessageScrollerButton",o),"data-direction":t},n??R.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:t==="start"?{transform:"rotate(180deg)"}:void 0},R.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))})});Ot.displayName="MessageScroller.Button";
2
+ "use strict";"use client";var Yt=Object.create;var se=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Qt=Object.getPrototypeOf,eo=Object.prototype.hasOwnProperty;var to=(t,e)=>{for(var o in e)se(t,o,{get:e[o],enumerable:!0})},Ge=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Jt(e))!eo.call(t,r)&&r!==o&&se(t,r,{get:()=>e[r],enumerable:!(n=Xt(e,r))||n.enumerable});return t};var y=(t,e,o)=>(o=t!=null?Yt(Qt(t)):{},Ge(e||!t||!t.__esModule?se(o,"default",{value:t,enumerable:!0}):o,t)),oo=t=>Ge(se({},"__esModule",{value:!0}),t);var Qo={};to(Qo,{Button:()=>Wt,Content:()=>Ot,Item:()=>zt,Root:()=>Lt,Viewport:()=>jt,useMessageScroller:()=>S.useMessageScroller,useMessageScrollerScrollable:()=>S.useMessageScrollerScrollable,useMessageScrollerVisibility:()=>S.useMessageScrollerVisibility});module.exports=oo(Qo);var D=y(require("react")),Y=y(require("classnames")),S=require("@shadcn/react/message-scroller"),It=require("radix-ui/internal");var oe=y(require("react")),Ft=y(require("classnames"));var c=y(require("react")),ut=y(require("classnames")),ct=require("radix-ui"),ce=require("radix-ui/internal");var j={asChild:{type:"boolean"}};var ne=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],$e=["auto","gray","mauve","slate","sage","olive","sand"],_e={color:{type:"enum",values:ne,default:void 0}},Ke={color:{type:"enum",values:ne,default:""}};var Pe=["none","small","medium","large","full"],qe={radius:{type:"enum",values:Pe,default:void 0}};var ro=["1","2","3","4"],so=["raised","solid","soft","surface","outline","ghost"],ge={...j,size:{type:"enum",className:"kui-r-size",values:ro,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:so,default:"solid"},...Ke,...qe,loading:{type:"boolean",className:"kui-loading",default:!1},fullWidth:{type:"boolean",className:"kui-full-width",default:!1}};var pe=y(require("react")),nt=y(require("classnames"));var Xe=y(require("classnames"));var no=[],ao=new Set;function io(t){let e=Object.assign({},...t),o=[],n=[],r=new Set;for(let s in e){let a=e[s],p=a.values??no,l={key:s,type:a.type,default:a.default,hasDefault:a.default!==void 0,responsive:"responsive"in a,className:a.className,customProperties:a.customProperties,parseValue:a.parseValue,values:p,valueSet:p.length>0?new Set(p):ao,enumValueSet:a.type==="enum"?new Set([a.default,...p]):void 0};a.className?(o.push(l),r.add(s)):(l.hasDefault||a.type==="enum")&&n.push(l)}return{styling:o,passthrough:n,stylingKeys:r}}var po={children:new WeakMap};function Ue(t){let e=po;for(let o=0;o<t.length;o++){let n=t[o],r=e.children.get(n);r===void 0&&(r={children:new WeakMap},e.children.set(n,r)),e=r}return e.compiled??(e.compiled=io(t))}var lo=["initial","xs","sm","md","lg","xl"],he=new Set(lo);function ve(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var uo=new Set(["initial","xs","sm","md","lg","xl"]);function A(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(uo.has(e))return!0;return!1}function ae(t,e,o){return e!==void 0?e.has(o):t.includes(o)}function Ye({className:t,customProperties:e,...o}){let n=Ce({allowArbitraryValues:!0,className:t,...o}),r=co({customProperties:e,...o});return[n,r]}function Ce({allowArbitraryValues:t,value:e,className:o,propValues:n,propValueSet:r,parseValue:s=a=>a}){if(e){if(typeof e=="string")return ae(n,r,e)?Ze(o,e,s):t?o:void 0;if(A(e)){let a=e,p=[];for(let l in a){if(!ve(a,l)||!he.has(l))continue;let i=a[l];if(i!==void 0){if(ae(n,r,i)){let u=Ze(o,i,s),f=l==="initial"?u:`${l}:${u}`;p.push(f)}else if(t){let u=l==="initial"?o:`${l}:${o}`;p.push(u)}}}return p.length>0?p.join(" "):""}if(t)return o}}function Ze(t,e,o){let n=t?"-":"",r=o(e),s=r?.startsWith("-"),a=s?"-":"",p=s?r?.substring(1):r;return`${a}${t}${n}${p}`}function co({customProperties:t,value:e,propValues:o,propValueSet:n,parseValue:r=s=>s}){if(!e||typeof e=="string"&&ae(o,n,e))return;let s;if(typeof e=="string"){let a=r(e);s={};for(let p of t)s[p]=a;return s}if(A(e)){let a=e;for(let p in a){if(!ve(a,p)||!he.has(p))continue;let l=a[p];if(l===void 0||ae(o,n,l))continue;let i=r(l);s??(s={});for(let u of t){let f=p==="initial"?u:`${u}-${p}`;s[f]=i}}}return s??{}}function Re(...t){let e;for(let o of t)o&&(e===void 0&&(e={}),Object.assign(e,o));return e}function mo(t,e){let o=t.initial,n=!1;return e.hasDefault&&o===void 0&&(o=e.default,n=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(o)&&(o=e.default,n=!0),n?{...t,initial:o}:t}function V(t,...e){let{styling:o,passthrough:n,stylingKeys:r}=Ue(e),s={};for(let l in t)r.has(l)||(s[l]=t[l]);for(let l=0;l<n.length;l++){let i=n[l],u=s[i.key];if(u===void 0){i.hasDefault&&(s[i.key]=i.default);continue}i.enumValueSet!==void 0&&!i.enumValueSet.has(u)&&!A(u)&&(s[i.key]=i.default)}let a,p=[];for(let l=0;l<o.length;l++){let i=o[l],u=t[i.key];if(u===void 0&&i.hasDefault&&(u=i.default),i.enumValueSet!==void 0&&!i.enumValueSet.has(u)&&!A(u)&&(u=i.default),!!u){if(A(u)){if(!i.responsive)continue;u=mo(u,i)}if(i.type==="enum"){let f=Ce({allowArbitraryValues:!1,value:u,className:i.className,propValues:i.values,propValueSet:i.valueSet,parseValue:i.parseValue});f&&p.push(f);continue}if(i.type==="string"||i.type==="enum | string"){let[f,d]=Ye({className:i.className,customProperties:i.customProperties,propValues:i.type==="string"?[]:i.values,propValueSet:i.type==="string"?void 0:i.valueSet,parseValue:i.parseValue,value:u});d&&(a=Re(a,d)),f&&p.push(f);continue}if(i.type==="boolean"){p.push(i.className);continue}}}return s.className=(0,Xe.default)(p.length>0?p.join(" "):void 0,t.className),s.style=Re(a,t.style),s}var G=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Je={p:{type:"enum | string",className:"kui-r-p",customProperties:["--p"],values:G,responsive:!0},px:{type:"enum | string",className:"kui-r-px",customProperties:["--pl","--pr"],values:G,responsive:!0},py:{type:"enum | string",className:"kui-r-py",customProperties:["--pt","--pb"],values:G,responsive:!0},pt:{type:"enum | string",className:"kui-r-pt",customProperties:["--pt"],values:G,responsive:!0},pr:{type:"enum | string",className:"kui-r-pr",customProperties:["--pr"],values:G,responsive:!0},pb:{type:"enum | string",className:"kui-r-pb",customProperties:["--pb"],values:G,responsive:!0},pl:{type:"enum | string",className:"kui-r-pl",customProperties:["--pl"],values:G,responsive:!0}};var Qe={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var U={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var De=["visible","hidden","clip","scroll","auto"],fo=["static","relative","absolute","fixed","sticky"],Q=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9"],yo=["0","1"],Po=["0","1"],go=["start","center","end","baseline","stretch"],ho=["start","center","end","baseline","stretch"],et={...Je,...U,...Qe,position:{type:"enum",className:"kui-r-position",values:fo,responsive:!0},inset:{type:"enum | string",className:"kui-r-inset",customProperties:["--inset"],values:Q,responsive:!0},top:{type:"enum | string",className:"kui-r-top",customProperties:["--top"],values:Q,responsive:!0},right:{type:"enum | string",className:"kui-r-right",customProperties:["--right"],values:Q,responsive:!0},bottom:{type:"enum | string",className:"kui-r-bottom",customProperties:["--bottom"],values:Q,responsive:!0},left:{type:"enum | string",className:"kui-r-left",customProperties:["--left"],values:Q,responsive:!0},overflow:{type:"enum",className:"kui-r-overflow",values:De,responsive:!0},overflowX:{type:"enum",className:"kui-r-ox",values:De,responsive:!0},overflowY:{type:"enum",className:"kui-r-oy",values:De,responsive:!0},flexBasis:{type:"string",className:"kui-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"kui-r-fs",customProperties:["--flex-shrink"],values:yo,responsive:!0},flexGrow:{type:"enum | string",className:"kui-r-fg",customProperties:["--flex-grow"],values:Po,responsive:!0},gridArea:{type:"string",className:"kui-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"kui-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"kui-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"kui-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"kui-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"kui-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"kui-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"kui-r-as",values:go,responsive:!0},justifySelf:{type:"enum",className:"kui-r-js",values:ho,responsive:!0}};var $=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12","bleed"],tt={m:{type:"enum | string",values:$,responsive:!0,className:"kui-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:$,responsive:!0,className:"kui-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:$,responsive:!0,className:"kui-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:$,responsive:!0,className:"kui-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:$,responsive:!0,className:"kui-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:$,responsive:!0,className:"kui-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:$,responsive:!0,className:"kui-r-ml",customProperties:["--ml"]}};var ie=require("radix-ui"),Br=ie.Slot.Root,ot=ie.Slot.Root,Vr=ie.Slot.Slottable;var be=["0","1","2","3","4","5","6","7","8","9","10","11","12"],rt={gap:{type:"enum | string",className:"kui-r-gap",customProperties:["--gap"],values:be,responsive:!0},gapX:{type:"enum | string",className:"kui-r-cg",customProperties:["--column-gap"],values:be,responsive:!0},gapY:{type:"enum | string",className:"kui-r-rg",customProperties:["--row-gap"],values:be,responsive:!0}};var vo=["div","span"],Co=["none","inline-flex","flex"],Ro=["row","column","row-reverse","column-reverse"],Do=["start","center","end","baseline","stretch"],bo=["start","center","end","between"],xo=["nowrap","wrap","wrap-reverse"],st={as:{type:"enum",values:vo,default:"div"},...j,display:{type:"enum",className:"kui-r-display",values:Co,responsive:!0},direction:{type:"enum",className:"kui-r-fd",values:Ro,responsive:!0},align:{type:"enum",className:"kui-r-ai",values:Do,responsive:!0},justify:{type:"enum",className:"kui-r-jc",values:bo,parseValue:To,responsive:!0},wrap:{type:"enum",className:"kui-r-fw",values:xo,responsive:!0},...rt};function To(t){return t==="between"?"space-between":t}var ee=pe.forwardRef((t,e)=>{let{className:o,asChild:n,as:r="div",...s}=V(t,st,et,tt);return pe.createElement(n?ot:r,{...s,ref:e,className:(0,nt.default)("kui-Flex",o)})});ee.displayName="Flex";var v=y(require("react")),xe=y(require("classnames"));var at={loading:{type:"boolean",default:!0}};var Te=v.forwardRef((t,e)=>{let{className:o,children:n,loading:r,...s}=V(t,at);if(n===void 0&&!r)return null;let a=s["aria-label"]!==void 0||s["aria-labelledby"]!==void 0,p=v.createElement("span",{role:a?"status":void 0,"aria-hidden":a?void 0:!0,...s,ref:e,className:(0,xe.default)("kui-Spinner",o)},v.createElement("span",{className:"kui-SpinnerWheel"},v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"}),v.createElement("span",{className:"kui-SpinnerLeaf"})),typeof s["aria-label"]=="string"?v.createElement("span",{className:"kui-sr-only"},s["aria-label"]):null);return n===void 0?p:v.createElement("span",{className:"kui-SpinnerHost","data-loading":r||void 0,"aria-busy":r||void 0},v.createElement("span",{"aria-hidden":r||void 0,className:(0,xe.default)("kui-SpinnerChildren",r&&"kui-SpinnerHiddenChildren")},n),r?v.createElement(ee,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,p)):null)});Te.displayName="Spinner";var m=y(require("react")),So=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));So.displayName="ThickDividerHorizontalIcon";var wo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));wo.displayName="ThickCheckIcon";var ko=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));ko.displayName="ChevronDownIcon";var No=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));No.displayName="ThickChevronRightIcon";var Eo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));Eo.displayName="ThickChevronLeftIcon";var Bo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));Bo.displayName="ThickDotIcon";var Vo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{...t,ref:e,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"},m.default.createElement("path",{d:"M18 6 6 18"}),m.default.createElement("path",{d:"m6 6 12 12"})));Vo.displayName="CloseIcon";var Fo=m.default.forwardRef((t,e)=>m.default.createElement("svg",{...t,ref:e,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"},m.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));Fo.displayName="PaperclipIcon";var Mo=m.default.forwardRef((t,e)=>m.default.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"},m.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),m.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));Mo.displayName="FileIcon";var Io=m.default.forwardRef((t,e)=>m.default.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"},m.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),m.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),m.default.createElement("path",{d:"M10 9H8"}),m.default.createElement("path",{d:"M16 13H8"}),m.default.createElement("path",{d:"M16 17H8"})));Io.displayName="FileTextIcon";var Se=m.default.forwardRef((t,e)=>m.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},m.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));Se.displayName="TickIcon";var le=y(require("react"));function it(t,e){if(e.includes(t))return t;let o=Number(t),n=e[0],r=1/0;for(let s=0;s<e.length;s++){let a=Math.abs(Number(e[s])-o);a<r&&(r=a,n=e[s])}return n}var ue=le.createContext("2");ue.displayName="ThemeSizeContext";function pt(t,e){let o=le.useContext(ue);if(t.size!==void 0)return t;let n=it(o,e.values);return n===e.default?t:{...t,size:n}}var Ne=c.forwardRef((t,e)=>{let o=pt(t,ge.size),{className:n,children:r,asChild:s,as:a,color:p,radius:l,disabled:i,done:u=!1,...f}=V(o,ge),d=!!o.loading,w=o.loading!==void 0,R=!!i||d,{onClick:b,"aria-describedby":x}=f,M=c.useCallback(g=>{if(R){g.preventDefault();return}b?.(g)},[R,b]),I=c.useMemo(()=>{let g=s&&c.isValidElement(r)?r.props.children:r,E=ke(g),B=k=>c.isValidElement(k)&&(k.type==="svg"||typeof k.type!="string"&&k.type!==c.Fragment&&!jo.has(we(k.type)));return{iconStart:B(E[0]),iconEnd:B(E[E.length-1])}},[s,r]),[N,K]=c.useState(null),q=c.useRef(null),W=(0,ce.useComposedRefs)(e,q);(0,ce.useLayoutEffect)(()=>{let g=q.current;if(!g||d||u)return;let E=g.querySelector(":scope > .kui-BaseButtonContent")??g,B=lt(E,"start"),k=lt(E,"end");K(L=>L&&L.iconStart===B&&L.iconEnd===k?L:{iconStart:B,iconEnd:k})});let{iconStart:H,iconEnd:X}=N??I,Oe=!!f["data-icon-only"],J=c.useMemo(()=>{if(!u)return r;let g=c.createElement(Se,{key:"kui-done-tick",className:"kui-BaseButtonTick","aria-hidden":!0}),E=B=>{if(Oe)return g;let k=ke(B),L=k.findIndex(re=>!(typeof re=="string"&&!re.trim())),Ae=k[L];return L!==-1&&H&&(N!==null||c.isValidElement(Ae)&&Ae.type==="svg")?k.map((re,Zt)=>Zt===L?g:re):[g,...k]};if(s&&c.isValidElement(r)){let B=r;return c.cloneElement(B,void 0,E(B.props.children))}return E(r)},[u,r,Oe,H,N,s]),Ht=s?ct.Slot.Root:a||"button",At=["button","input","textarea","select"],ze=s?c.isValidElement(r)?r.type:void 0:a||"button",de=typeof ze=="string"&&At.includes(ze),{onClickCapture:We}=f,Gt=c.useCallback(g=>{if(s&&R){g.preventDefault(),g.stopPropagation();return}We?.(g)},[s,R,We]),$t=!s&&(!a||a==="button"),_t="type"in f,Kt=c.useId(),ye=d?`${Kt}-loading`:void 0,qt=c.useMemo(()=>d?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":[x,ye].filter(Boolean).join(" ")}:i&&(!de||s)?{"aria-disabled":!0}:{},[d,ye,x,i,de,s]),He=(g,E)=>w?c.createElement(c.Fragment,null,c.createElement("span",{className:"kui-BaseButtonContent","aria-hidden":d||void 0},g),d?c.createElement(c.Fragment,null,c.createElement("span",{className:"kui-sr-only"},c.createElement("span",{id:ye,"aria-hidden":!0},"Loading"),E),c.createElement(ee,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},c.createElement("span",null,c.createElement(Te,{"aria-hidden":"true"})))):null):g,Ut=s&&w&&c.isValidElement(J)?c.cloneElement(J,void 0,He(J.props.children,c.isValidElement(r)?r.props.children:null)):J;return c.createElement(Ht,{"data-accent-color":p,"data-radius":l,"data-icon-start":H||void 0,"data-icon-end":X||void 0,"data-done":u||void 0,...f,...qt,"data-disabled":R||void 0,onClick:M,onClickCapture:Gt,ref:W,className:(0,ut.default)("kui-reset","kui-BaseButton",n),...de&&{disabled:i},...$t&&!_t?{type:"button"}:{}},s?Ut:He(J,r))});Ne.displayName="BaseButton";var jo=new Set(["Text","Kbd","Code","Link","Em","Strong","Quote","Badge","Trans"]);function we(t){if(!t||typeof t!="function"&&typeof t!="object")return"";let e=t;return e.displayName||e.name||we(e.render)||we(e.type)}function ke(t){return c.Children.toArray(t).flatMap(e=>c.isValidElement(e)&&e.type===c.Fragment?ke(e.props.children):[e])}function lt(t,e){let o=e==="start"?t.firstChild:t.lastChild;for(;o&&(o.nodeType===Node.COMMENT_NODE||o.nodeType===Node.TEXT_NODE&&!o.textContent?.trim());)o=e==="start"?o.nextSibling:o.previousSibling;return o?.nodeType===Node.ELEMENT_NODE&&o.localName==="svg"}var C=y(require("react")),Nt=y(require("classnames")),z=require("radix-ui");var _=y(require("react")),Ct=require("radix-ui");var Oo=["loud","medium","quiet"],mt={emphasis:{type:"enum",className:"kui-emphasis",values:Oo,default:void 0}};var zo=["normal","start","end","both"],ft={trim:{type:"enum",className:"kui-r-lt",values:zo,responsive:!0}};var Wo=["left","center","right"],dt={align:{type:"enum",className:"kui-r-ta",values:Wo,responsive:!0}};var Ho=["wrap","nowrap","pretty","balance"],yt={wrap:{type:"enum",className:"kui-r-tw",values:Ho,responsive:!0}};var Pt={truncate:{type:"boolean",className:"kui-truncate"}};var Ao=["sans","mono","serif"],gt={font:{type:"enum",className:"kui-r-ff",values:Ao}};var Go=["regular","medium","semibold"],ht={weight:{type:"enum",className:"kui-r-weight",values:Go,responsive:!0}};var $o=["span","div","label","p"],_o=["1","2","3","4","5","6","7","8","9"],vt={as:{type:"enum",values:$o,default:"span"},...j,size:{type:"enum",className:"kui-r-size",values:_o,responsive:!0},...gt,...ht,...dt,...ft,...Pt,...yt,..._e,...mt};var Ee=_.memo(_.forwardRef((t,e)=>{let{children:o,className:n,asChild:r,as:s="span",color:a,...p}=V(t,vt),l=n?`kui-Text ${n}`:"kui-Text";return r?_.createElement(Ct.Slot.Root,{"data-accent-color":a,...p,ref:e,className:l},o):_.createElement(s,{"data-accent-color":a,...p,ref:e,className:l},o)}));Ee.displayName="Text";var Z=y(require("react"));var h=y(require("react")),bt=y(require("classnames")),te=require("radix-ui");function Rt(t){switch(t){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var Be=y(require("react"));function O(t){let[e,o]=Be.useState(t),[n,r]=Be.useState(t);return Object.is(t,n)||(r(t),o(t)),[e,o]}var Ko=["inherit","light","dark"],Dt=["sans","mono","serif"],qo=["1","2","3","4"],P={...j,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Ko,default:"inherit"},accentColor:{type:"enum",values:ne,default:"gray"},grayColor:{type:"enum",values:$e,default:"gray"},radius:{type:"enum",values:Pe,default:"full"},fontFamily:{type:"enum",values:Dt,default:"sans"},headingFontFamily:{type:"enum",values:Dt},size:{type:"enum",values:qo,default:"2"}};var T=()=>{},Ls={appearance:P.appearance.default,accentColor:P.accentColor.default,grayColor:P.grayColor.default,resolvedGrayColor:P.grayColor.default,radius:P.radius.default,fontFamily:P.fontFamily.default,headingFontFamily:void 0,size:P.size.default,onAppearanceChange:T,onAccentColorChange:T,onGrayColorChange:T,onRadiusChange:T,onFontFamilyChange:T,onHeadingFontFamilyChange:T,onSizeChange:T},Ve=h.createContext(void 0);var Fe=h.forwardRef((t,e)=>{let o=h.useContext(Ve),n=te.Direction.useDirection();return o===void 0?h.createElement(te.Direction.Provider,{dir:n},h.createElement(xt,{...t,ref:e})):h.createElement(Me,{...t,ref:e})});Fe.displayName="Theme";var xt=h.forwardRef((t,e)=>{let{appearance:o=P.appearance.default,accentColor:n=P.accentColor.default,grayColor:r=P.grayColor.default,radius:s=P.radius.default,fontFamily:a=P.fontFamily.default,headingFontFamily:p,size:l=P.size.default,hasBackground:i=P.hasBackground.default,...u}=t,[f,d]=O(o),[w,R]=O(n),[b,x]=O(r),[M,I]=O(s),[N,K]=O(a),[q,W]=O(p),[H,X]=O(l);return h.createElement(Me,{...u,ref:e,isRoot:!0,hasBackground:i,appearance:f,accentColor:w,grayColor:b,radius:M,fontFamily:N,headingFontFamily:q,size:H,onAppearanceChange:d,onAccentColorChange:R,onGrayColorChange:x,onRadiusChange:I,onFontFamilyChange:K,onHeadingFontFamilyChange:W,onSizeChange:X})});xt.displayName="ThemeRoot";var Me=h.forwardRef((t,e)=>{let o=h.useContext(Ve),{asChild:n,isRoot:r,hasBackground:s,appearance:a=t.appearance??o?.appearance??P.appearance.default,accentColor:p=t.accentColor??o?.accentColor??P.accentColor.default,grayColor:l=t.grayColor??o?.resolvedGrayColor??P.grayColor.default,radius:i=t.radius??o?.radius??P.radius.default,fontFamily:u=t.fontFamily??o?.fontFamily??P.fontFamily.default,headingFontFamily:f=t.headingFontFamily??o?.headingFontFamily,size:d=t.size??o?.size??P.size.default,onAppearanceChange:w=o?.onAppearanceChange??T,onAccentColorChange:R=o?.onAccentColorChange??T,onGrayColorChange:b=o?.onGrayColorChange??T,onRadiusChange:x=o?.onRadiusChange??T,onFontFamilyChange:M=o?.onFontFamilyChange??T,onHeadingFontFamilyChange:I=o?.onHeadingFontFamilyChange??T,onSizeChange:N=o?.onSizeChange??T,...K}=t,q=n?te.Slot.Root:"div",W=l==="auto"?Rt(p):l,H=t.appearance==="light"||t.appearance==="dark",X=s===void 0?r||H:s;return h.createElement(Ve.Provider,{value:h.useMemo(()=>({appearance:a,accentColor:p,grayColor:l,resolvedGrayColor:W,radius:i,fontFamily:u,headingFontFamily:f,size:d,onAppearanceChange:w,onAccentColorChange:R,onGrayColorChange:b,onRadiusChange:x,onFontFamilyChange:M,onHeadingFontFamilyChange:I,onSizeChange:N}),[a,p,l,W,i,u,f,d,w,R,b,x,M,I,N])},h.createElement(ue.Provider,{value:d},h.createElement(q,{"data-is-root-theme":r?"true":"false","data-accent-color":p,"data-gray-color":W,"data-has-background":X?"true":"false","data-radius":i,"data-font-family":u,"data-heading-font-family":f,ref:e,...K,className:(0,bt.default)("kui-theme",{light:a==="light",dark:a==="dark"},K.className)})))});Me.displayName="ThemeImpl";var Tt=y(require("react")),St=Tt.createContext(void 0);var F=y(require("react")),Uo=F.createContext(null);function wt({children:t}){return F.createElement(Uo.Provider,{value:null},t)}var Ie=Z.forwardRef((t,e)=>Z.createElement(St.Provider,{value:null},Z.createElement(wt,null,Z.createElement(Fe,{...t,ref:e}))));Ie.displayName="PortalTheme";var kt={content:{type:"ReactNode",required:!0},width:U.width,minWidth:U.minWidth,maxWidth:{...U.maxWidth,default:"360px"}};var Et=200,Bt=C.createContext(!1);function Zo({delayDuration:t=Et,children:e,...o}){return C.createElement(Bt.Provider,{value:!0},C.createElement(z.Tooltip.Provider,{delayDuration:t,...o},e))}Zo.displayName="TooltipProvider";var Le=C.forwardRef((t,e)=>{let{children:o,className:n,open:r,defaultOpen:s,onOpenChange:a,delayDuration:p,disableHoverableContent:l,content:i,container:u,forceMount:f,...d}=V(t,kt),w={open:r,defaultOpen:s,onOpenChange:a,delayDuration:p,disableHoverableContent:l},R=C.useContext(Bt),b=C.createElement(z.Tooltip.Root,{...w},C.createElement(z.Tooltip.Trigger,{asChild:!0},o),C.createElement(z.Tooltip.Portal,{container:u,forceMount:f},C.createElement(Ie,{asChild:!0},C.createElement(z.Tooltip.Content,{sideOffset:4,collisionPadding:10,...d,asChild:!1,ref:e,className:(0,Nt.default)("kui-TooltipContent",n)},C.createElement(Ee,{as:"p",className:"kui-TooltipText",size:"1"},i),C.createElement(z.Tooltip.Arrow,{className:"kui-TooltipArrow"})))));return R?b:C.createElement(z.Tooltip.Provider,{delayDuration:Et},b)});Le.displayName="Tooltip";var me=y(require("react"));function Vt(t){let e=me.useId(),o=!!t,n=me.useMemo(()=>o?{"aria-describedby":e}:{},[o,e]);return{tooltipId:e,hasTooltip:o,accessibilityProps:n}}var Yo={loud:"solid",medium:"raised",quiet:"ghost"};function Xo(t){if(t["aria-label"]||t["aria-labelledby"])return;console.error("Button: an `iconOnly` button must have an accessible name. Pass `aria-label`, or `aria-labelledby` referencing a label element.")}var je=oe.forwardRef(({className:t,style:e,tooltip:o,tooltipSide:n="top",tooltipAlign:r="center",tooltipDelayDuration:s,tooltipDisableHoverableContent:a,iconOnly:p=!1,emphasis:l,variant:i,...u},f)=>{let{tooltipId:d,hasTooltip:w,accessibilityProps:R}=Vt(o);p&&(Xo(u),u.fullWidth=!1);let b=l!==void 0?Yo[l]:i,x=u["aria-describedby"],M=R["aria-describedby"],I=[x,M].filter(Boolean).join(" ")||void 0,N=oe.createElement(Ne,{...u,variant:b,"aria-describedby":I,ref:f,"data-icon-only":p||void 0,className:(0,Ft.default)("kui-Button",t),style:e});return w?oe.createElement(Le,{content:o,side:n,align:r,delayDuration:s,disableHoverableContent:a,id:d},N):N});je.displayName="Button";var fe=y(require("react"));function Jo(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function Mt(t){let[e,o]=fe.useState(null);return fe.useEffect(()=>{if(!t||!e)return;let n=0,r=()=>{n=0;let l=Jo(e),i=Math.max(0,e.scrollTop),u=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${i}px`),e.style.setProperty("--scroll-overflow-end",`${u}px`);let f=Math.abs(e.scrollLeft),d=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${d}px`)},s=()=>{n||(n=requestAnimationFrame(r))};r(),e.addEventListener("scroll",s,{passive:!0});let a=typeof ResizeObserver>"u"?null:new ResizeObserver(s);a?.observe(e);for(let l of Array.from(e.children))a?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(s);return p?.observe(e,{childList:!0}),()=>{n&&cancelAnimationFrame(n),e.removeEventListener("scroll",s),a?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),o}var Lt=D.forwardRef(({autoScroll:t=!0,defaultScrollPosition:e="end",scrollEdgeThreshold:o,scrollMargin:n,className:r,children:s,...a},p)=>D.createElement(S.MessageScroller.Provider,{autoScroll:t,defaultScrollPosition:e,...o!=null?{scrollEdgeThreshold:o}:{},...n!=null?{scrollMargin:n}:{}},D.createElement(S.MessageScroller.Root,{...a,ref:p,className:(0,Y.default)("kui-MessageScrollerRoot",r)},s)));Lt.displayName="MessageScroller.Root";var jt=D.forwardRef(({className:t,"aria-label":e,fade:o=!0,...n},r)=>{let s=Mt(o),a=(0,It.useComposedRefs)(r,s);return D.createElement(S.MessageScroller.Viewport,{"aria-label":e??"",...n,ref:a,"data-fade":o?"":void 0,className:(0,Y.default)("kui-MessageScrollerViewport",t)})});jt.displayName="MessageScroller.Viewport";var Ot=D.forwardRef(({className:t,...e},o)=>D.createElement(S.MessageScroller.Content,{...e,ref:o,className:(0,Y.default)("kui-MessageScrollerContent",t)}));Ot.displayName="MessageScroller.Content";var zt=D.forwardRef(({className:t,...e},o)=>D.createElement(S.MessageScroller.Item,{...e,ref:o,className:(0,Y.default)("kui-MessageScrollerItem",t)}));zt.displayName="MessageScroller.Item";var Wt=D.forwardRef(({direction:t="end",behavior:e="auto",className:o,children:n,size:r,variant:s="surface",emphasis:a,color:p="gray",radius:l="full","aria-label":i,onClick:u,...f},d)=>{let{scrollToEnd:w,scrollToStart:R}=(0,S.useMessageScroller)(),b=x=>{if(u?.(x),x.defaultPrevented)return;x.preventDefault(),x.currentTarget.closest(".kui-MessageScrollerRoot")?.querySelector(".kui-MessageScrollerViewport")?.focus({preventScroll:!0}),t==="start"?R({behavior:e}):w({behavior:e})};return D.createElement(S.MessageScroller.Button,{direction:t,behavior:e,onClick:b,render:D.createElement(je,{iconOnly:!0,...f,ref:d,size:r,...a?{emphasis:a}:{variant:s},color:p,radius:l,"aria-label":i??(t==="end"?"Jump to the latest":"Jump to the first"),className:(0,Y.default)("kui-MessageScrollerButton",o),"data-direction":t},n??D.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:t==="start"?{transform:"rotate(180deg)"}:void 0},D.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))})});Wt.displayName="MessageScroller.Button";
3
3
  //# sourceMappingURL=message-scroller.js.map