@psnext/design-system 2.3.0 → 2.5.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 (671) hide show
  1. package/DESIGN.md +493 -8
  2. package/README.md +3 -3
  3. package/SKILL.md +84 -6
  4. package/bin/install-agent-skill.mjs +39 -7
  5. package/dist/Header.cjs +152 -21
  6. package/dist/Header.cjs.map +1 -1
  7. package/dist/Header.js +152 -21
  8. package/dist/Header.js.map +1 -1
  9. package/dist/Icon.cjs +40 -8
  10. package/dist/Icon.cjs.map +1 -1
  11. package/dist/Icon.js +40 -8
  12. package/dist/Icon.js.map +1 -1
  13. package/dist/Mosaic.cjs +472 -0
  14. package/dist/Mosaic.cjs.map +1 -0
  15. package/dist/Mosaic.js +459 -0
  16. package/dist/Mosaic.js.map +1 -0
  17. package/dist/MultiColumn.cjs +354 -0
  18. package/dist/MultiColumn.cjs.map +1 -0
  19. package/dist/MultiColumn.js +335 -0
  20. package/dist/MultiColumn.js.map +1 -0
  21. package/dist/Sidebar.cjs +4 -3
  22. package/dist/Sidebar.cjs.map +1 -1
  23. package/dist/Sidebar.js +4 -3
  24. package/dist/Sidebar.js.map +1 -1
  25. package/dist/index.cjs +18 -3
  26. package/dist/index.d.cts +5 -5
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +9 -4
  31. package/dist/index10.d.cts +6 -6
  32. package/dist/index10.d.cts.map +1 -1
  33. package/dist/index10.d.ts +6 -6
  34. package/dist/index11.d.cts +3 -3
  35. package/dist/index11.d.cts.map +1 -1
  36. package/dist/index11.d.ts +3 -3
  37. package/dist/index11.d.ts.map +1 -1
  38. package/dist/index12.d.cts +12 -12
  39. package/dist/index12.d.ts +12 -12
  40. package/dist/index13.d.cts +6 -6
  41. package/dist/index13.d.cts.map +1 -1
  42. package/dist/index13.d.ts +6 -6
  43. package/dist/index13.d.ts.map +1 -1
  44. package/dist/index14.d.cts +5 -5
  45. package/dist/index14.d.ts +5 -5
  46. package/dist/index15.d.cts +58 -23
  47. package/dist/index15.d.cts.map +1 -1
  48. package/dist/index15.d.ts +58 -23
  49. package/dist/index15.d.ts.map +1 -1
  50. package/dist/index16.d.cts +23 -32
  51. package/dist/index16.d.cts.map +1 -1
  52. package/dist/index16.d.ts +23 -32
  53. package/dist/index16.d.ts.map +1 -1
  54. package/dist/index17.d.cts +34 -15
  55. package/dist/index17.d.cts.map +1 -1
  56. package/dist/index17.d.ts +34 -15
  57. package/dist/index17.d.ts.map +1 -1
  58. package/dist/index18.d.cts +13 -67
  59. package/dist/index18.d.cts.map +1 -1
  60. package/dist/index18.d.ts +13 -67
  61. package/dist/index18.d.ts.map +1 -1
  62. package/dist/index19.d.cts +55 -48
  63. package/dist/index19.d.cts.map +1 -1
  64. package/dist/index19.d.ts +55 -48
  65. package/dist/index19.d.ts.map +1 -1
  66. package/dist/index2.d.cts +8 -8
  67. package/dist/index2.d.ts +9 -9
  68. package/dist/index20.d.cts +45 -75
  69. package/dist/index20.d.cts.map +1 -1
  70. package/dist/index20.d.ts +45 -75
  71. package/dist/index20.d.ts.map +1 -1
  72. package/dist/index21.d.cts +90 -28
  73. package/dist/index21.d.cts.map +1 -1
  74. package/dist/index21.d.ts +90 -28
  75. package/dist/index21.d.ts.map +1 -1
  76. package/dist/index22.d.cts +28 -56
  77. package/dist/index22.d.cts.map +1 -1
  78. package/dist/index22.d.ts +28 -56
  79. package/dist/index22.d.ts.map +1 -1
  80. package/dist/index23.d.cts +53 -78
  81. package/dist/index23.d.cts.map +1 -1
  82. package/dist/index23.d.ts +53 -78
  83. package/dist/index23.d.ts.map +1 -1
  84. package/dist/index24.d.cts +83 -33
  85. package/dist/index24.d.cts.map +1 -1
  86. package/dist/index24.d.ts +83 -33
  87. package/dist/index24.d.ts.map +1 -1
  88. package/dist/index25.d.cts +43 -11
  89. package/dist/index25.d.cts.map +1 -1
  90. package/dist/index25.d.ts +43 -11
  91. package/dist/index25.d.ts.map +1 -1
  92. package/dist/index26.d.cts +11 -74
  93. package/dist/index26.d.cts.map +1 -1
  94. package/dist/index26.d.ts +11 -74
  95. package/dist/index26.d.ts.map +1 -1
  96. package/dist/index27.d.cts +68 -59
  97. package/dist/index27.d.cts.map +1 -1
  98. package/dist/index27.d.ts +68 -59
  99. package/dist/index27.d.ts.map +1 -1
  100. package/dist/index28.d.cts +47 -30
  101. package/dist/index28.d.cts.map +1 -1
  102. package/dist/index28.d.ts +47 -30
  103. package/dist/index28.d.ts.map +1 -1
  104. package/dist/index29.d.cts +63 -17
  105. package/dist/index29.d.cts.map +1 -1
  106. package/dist/index29.d.ts +63 -17
  107. package/dist/index29.d.ts.map +1 -1
  108. package/dist/index3.d.cts +13 -13
  109. package/dist/index3.d.ts +13 -13
  110. package/dist/index30.d.cts +29 -51
  111. package/dist/index30.d.cts.map +1 -1
  112. package/dist/index30.d.ts +30 -52
  113. package/dist/index30.d.ts.map +1 -1
  114. package/dist/index31.d.cts +19 -34
  115. package/dist/index31.d.cts.map +1 -1
  116. package/dist/index31.d.ts +19 -34
  117. package/dist/index31.d.ts.map +1 -1
  118. package/dist/index32.d.cts +80 -18
  119. package/dist/index32.d.cts.map +1 -1
  120. package/dist/index32.d.ts +79 -17
  121. package/dist/index32.d.ts.map +1 -1
  122. package/dist/index33.d.cts +32 -51
  123. package/dist/index33.d.cts.map +1 -1
  124. package/dist/index33.d.ts +33 -52
  125. package/dist/index33.d.ts.map +1 -1
  126. package/dist/index34.d.cts +19 -36
  127. package/dist/index34.d.cts.map +1 -1
  128. package/dist/index34.d.ts +19 -36
  129. package/dist/index34.d.ts.map +1 -1
  130. package/dist/index35.d.cts +43 -61
  131. package/dist/index35.d.cts.map +1 -1
  132. package/dist/index35.d.ts +44 -62
  133. package/dist/index35.d.ts.map +1 -1
  134. package/dist/index36.d.cts +35 -11
  135. package/dist/index36.d.cts.map +1 -1
  136. package/dist/index36.d.ts +35 -11
  137. package/dist/index36.d.ts.map +1 -1
  138. package/dist/index37.d.cts +68 -20
  139. package/dist/index37.d.cts.map +1 -1
  140. package/dist/index37.d.ts +69 -21
  141. package/dist/index37.d.ts.map +1 -1
  142. package/dist/index38.d.cts +14 -15
  143. package/dist/index38.d.cts.map +1 -1
  144. package/dist/index38.d.ts +14 -15
  145. package/dist/index38.d.ts.map +1 -1
  146. package/dist/index39.d.cts +22 -98
  147. package/dist/index39.d.cts.map +1 -1
  148. package/dist/index39.d.ts +22 -98
  149. package/dist/index39.d.ts.map +1 -1
  150. package/dist/index4.d.cts +2 -2
  151. package/dist/index4.d.cts.map +1 -1
  152. package/dist/index4.d.ts +2 -2
  153. package/dist/index40.d.cts +15 -17
  154. package/dist/index40.d.cts.map +1 -1
  155. package/dist/index40.d.ts +15 -17
  156. package/dist/index40.d.ts.map +1 -1
  157. package/dist/index41.d.cts +84 -35
  158. package/dist/index41.d.cts.map +1 -1
  159. package/dist/index41.d.ts +84 -35
  160. package/dist/index41.d.ts.map +1 -1
  161. package/dist/index42.d.cts +118 -38
  162. package/dist/index42.d.cts.map +1 -1
  163. package/dist/index42.d.ts +118 -38
  164. package/dist/index42.d.ts.map +1 -1
  165. package/dist/index43.d.cts +15 -89
  166. package/dist/index43.d.cts.map +1 -1
  167. package/dist/index43.d.ts +15 -89
  168. package/dist/index43.d.ts.map +1 -1
  169. package/dist/index44.d.cts +56 -1
  170. package/dist/index44.d.cts.map +1 -0
  171. package/dist/index44.d.ts +56 -1
  172. package/dist/index44.d.ts.map +1 -0
  173. package/dist/index45.d.cts +31 -34
  174. package/dist/index45.d.cts.map +1 -1
  175. package/dist/index45.d.ts +31 -34
  176. package/dist/index45.d.ts.map +1 -1
  177. package/dist/index46.d.cts +89 -21
  178. package/dist/index46.d.cts.map +1 -1
  179. package/dist/index46.d.ts +89 -21
  180. package/dist/index46.d.ts.map +1 -1
  181. package/dist/index47.d.cts +1 -41
  182. package/dist/index47.d.ts +1 -41
  183. package/dist/index48.d.cts +122 -20
  184. package/dist/index48.d.cts.map +1 -1
  185. package/dist/index48.d.ts +122 -20
  186. package/dist/index48.d.ts.map +1 -1
  187. package/dist/index49.d.cts +40 -13
  188. package/dist/index49.d.cts.map +1 -1
  189. package/dist/index49.d.ts +40 -13
  190. package/dist/index49.d.ts.map +1 -1
  191. package/dist/index5.d.cts +7 -7
  192. package/dist/index5.d.cts.map +1 -1
  193. package/dist/index5.d.ts +7 -7
  194. package/dist/index50.d.cts +22 -63
  195. package/dist/index50.d.cts.map +1 -1
  196. package/dist/index50.d.ts +22 -63
  197. package/dist/index50.d.ts.map +1 -1
  198. package/dist/index51.d.cts +33 -55
  199. package/dist/index51.d.cts.map +1 -1
  200. package/dist/index51.d.ts +33 -55
  201. package/dist/index51.d.ts.map +1 -1
  202. package/dist/index52.d.cts +18 -24
  203. package/dist/index52.d.cts.map +1 -1
  204. package/dist/index52.d.ts +18 -24
  205. package/dist/index52.d.ts.map +1 -1
  206. package/dist/index53.d.cts +12 -200
  207. package/dist/index53.d.cts.map +1 -1
  208. package/dist/index53.d.ts +12 -200
  209. package/dist/index53.d.ts.map +1 -1
  210. package/dist/index54.d.cts +58 -15
  211. package/dist/index54.d.cts.map +1 -1
  212. package/dist/index54.d.ts +58 -15
  213. package/dist/index54.d.ts.map +1 -1
  214. package/dist/index55.d.cts +93 -23
  215. package/dist/index55.d.cts.map +1 -1
  216. package/dist/index55.d.ts +93 -23
  217. package/dist/index55.d.ts.map +1 -1
  218. package/dist/index56.d.cts +27 -21
  219. package/dist/index56.d.cts.map +1 -1
  220. package/dist/index56.d.ts +27 -21
  221. package/dist/index56.d.ts.map +1 -1
  222. package/dist/index57.d.cts +203 -6
  223. package/dist/index57.d.cts.map +1 -1
  224. package/dist/index57.d.ts +203 -6
  225. package/dist/index57.d.ts.map +1 -1
  226. package/dist/index58.d.cts +17 -41
  227. package/dist/index58.d.cts.map +1 -1
  228. package/dist/index58.d.ts +17 -41
  229. package/dist/index58.d.ts.map +1 -1
  230. package/dist/index59.d.cts +24 -47
  231. package/dist/index59.d.cts.map +1 -1
  232. package/dist/index59.d.ts +24 -47
  233. package/dist/index59.d.ts.map +1 -1
  234. package/dist/index6.d.cts +5 -5
  235. package/dist/index6.d.cts.map +1 -1
  236. package/dist/index6.d.ts +6 -6
  237. package/dist/index60.d.cts +19 -57
  238. package/dist/index60.d.cts.map +1 -1
  239. package/dist/index60.d.ts +19 -57
  240. package/dist/index60.d.ts.map +1 -1
  241. package/dist/index61.d.cts +6 -39
  242. package/dist/index61.d.cts.map +1 -1
  243. package/dist/index61.d.ts +6 -39
  244. package/dist/index61.d.ts.map +1 -1
  245. package/dist/index62.d.cts +44 -18
  246. package/dist/index62.d.cts.map +1 -1
  247. package/dist/index62.d.ts +44 -18
  248. package/dist/index62.d.ts.map +1 -1
  249. package/dist/index63.d.cts +47 -41
  250. package/dist/index63.d.cts.map +1 -1
  251. package/dist/index63.d.ts +47 -41
  252. package/dist/index63.d.ts.map +1 -1
  253. package/dist/index64.d.cts +55 -15
  254. package/dist/index64.d.cts.map +1 -1
  255. package/dist/index64.d.ts +54 -14
  256. package/dist/index64.d.ts.map +1 -1
  257. package/dist/index65.d.cts +36 -39
  258. package/dist/index65.d.cts.map +1 -1
  259. package/dist/index65.d.ts +37 -40
  260. package/dist/index65.d.ts.map +1 -1
  261. package/dist/index66.d.cts +16 -17
  262. package/dist/index66.d.cts.map +1 -1
  263. package/dist/index66.d.ts +17 -18
  264. package/dist/index66.d.ts.map +1 -1
  265. package/dist/index67.d.cts +40 -14
  266. package/dist/index67.d.cts.map +1 -1
  267. package/dist/index67.d.ts +40 -14
  268. package/dist/index67.d.ts.map +1 -1
  269. package/dist/index68.d.cts +16 -30
  270. package/dist/index68.d.cts.map +1 -1
  271. package/dist/index68.d.ts +17 -31
  272. package/dist/index68.d.ts.map +1 -1
  273. package/dist/index69.d.cts +39 -27
  274. package/dist/index69.d.cts.map +1 -1
  275. package/dist/index69.d.ts +40 -28
  276. package/dist/index69.d.ts.map +1 -1
  277. package/dist/index7.d.cts +8 -8
  278. package/dist/index7.d.cts.map +1 -1
  279. package/dist/index7.d.ts +8 -8
  280. package/dist/index7.d.ts.map +1 -1
  281. package/dist/index70.d.cts +22 -78
  282. package/dist/index70.d.cts.map +1 -1
  283. package/dist/index70.d.ts +22 -78
  284. package/dist/index70.d.ts.map +1 -1
  285. package/dist/index71.d.cts +77 -251
  286. package/dist/index71.d.cts.map +1 -1
  287. package/dist/index71.d.ts +77 -251
  288. package/dist/index71.d.ts.map +1 -1
  289. package/dist/index72.d.cts +19 -0
  290. package/dist/index72.d.cts.map +1 -0
  291. package/dist/index72.d.ts +19 -0
  292. package/dist/index72.d.ts.map +1 -0
  293. package/dist/index73.d.cts +37 -0
  294. package/dist/index73.d.cts.map +1 -0
  295. package/dist/index73.d.ts +37 -0
  296. package/dist/index73.d.ts.map +1 -0
  297. package/dist/index74.d.cts +36 -0
  298. package/dist/index74.d.cts.map +1 -0
  299. package/dist/index74.d.ts +36 -0
  300. package/dist/index74.d.ts.map +1 -0
  301. package/dist/index75.d.cts +86 -0
  302. package/dist/index75.d.cts.map +1 -0
  303. package/dist/index75.d.ts +86 -0
  304. package/dist/index75.d.ts.map +1 -0
  305. package/dist/index76.d.cts +278 -0
  306. package/dist/index76.d.cts.map +1 -0
  307. package/dist/index76.d.ts +278 -0
  308. package/dist/index76.d.ts.map +1 -0
  309. package/dist/index8.d.cts +4 -4
  310. package/dist/index8.d.ts +5 -5
  311. package/dist/index9.d.cts +2 -2
  312. package/dist/index9.d.ts +2 -2
  313. package/dist/index9.d.ts.map +1 -1
  314. package/dist/layouts/Container/index.cjs +2 -1
  315. package/dist/layouts/Container/index.cjs.map +1 -1
  316. package/dist/layouts/Container/index.d.cts +1 -1
  317. package/dist/layouts/Container/index.d.ts +1 -1
  318. package/dist/layouts/Container/index.js +1 -1
  319. package/dist/layouts/MultiColumn/index.cjs +5 -0
  320. package/dist/layouts/MultiColumn/index.d.cts +2 -0
  321. package/dist/layouts/MultiColumn/index.d.ts +2 -0
  322. package/dist/layouts/MultiColumn/index.js +2 -0
  323. package/dist/layouts/PageBackground/index.d.cts +1 -1
  324. package/dist/layouts/PageBackground/index.d.ts +1 -1
  325. package/dist/layouts/Stack/index.cjs +2 -1
  326. package/dist/layouts/Stack/index.cjs.map +1 -1
  327. package/dist/layouts/Stack/index.d.cts +1 -1
  328. package/dist/layouts/Stack/index.d.ts +1 -1
  329. package/dist/layouts/Stack/index.js +1 -1
  330. package/dist/layouts/TwoColumn/index.cjs +2 -1
  331. package/dist/layouts/TwoColumn/index.cjs.map +1 -1
  332. package/dist/layouts/TwoColumn/index.d.cts +1 -1
  333. package/dist/layouts/TwoColumn/index.d.ts +1 -1
  334. package/dist/layouts/TwoColumn/index.js +1 -1
  335. package/dist/layouts/index.cjs +4 -0
  336. package/dist/layouts/index.d.cts +6 -5
  337. package/dist/layouts/index.d.ts +6 -5
  338. package/dist/layouts/index.js +2 -1
  339. package/dist/patterns/DataTable/index.cjs +6 -2
  340. package/dist/patterns/DataTable/index.cjs.map +1 -1
  341. package/dist/patterns/DataTable/index.d.cts +3 -3
  342. package/dist/patterns/DataTable/index.d.cts.map +1 -1
  343. package/dist/patterns/DataTable/index.d.ts +3 -3
  344. package/dist/patterns/DataTable/index.d.ts.map +1 -1
  345. package/dist/patterns/DataTable/index.js +6 -2
  346. package/dist/patterns/DataTable/index.js.map +1 -1
  347. package/dist/patterns/Footer/index.d.cts +7 -7
  348. package/dist/patterns/Footer/index.d.cts.map +1 -1
  349. package/dist/patterns/Footer/index.d.ts +7 -7
  350. package/dist/patterns/Footer/index.d.ts.map +1 -1
  351. package/dist/patterns/Header/index.d.cts +1 -1
  352. package/dist/patterns/Header/index.d.ts +1 -1
  353. package/dist/patterns/MediaObject/index.cjs +1 -1
  354. package/dist/patterns/MediaObject/index.d.cts +14 -14
  355. package/dist/patterns/MediaObject/index.d.cts.map +1 -1
  356. package/dist/patterns/MediaObject/index.d.ts +12 -12
  357. package/dist/patterns/MediaObject/index.js +1 -1
  358. package/dist/patterns/NavRail/index.cjs +4 -2
  359. package/dist/patterns/NavRail/index.cjs.map +1 -1
  360. package/dist/patterns/NavRail/index.d.cts +1 -1
  361. package/dist/patterns/NavRail/index.d.ts +1 -1
  362. package/dist/patterns/NavRail/index.js +4 -2
  363. package/dist/patterns/NavRail/index.js.map +1 -1
  364. package/dist/patterns/SectionCard/index.d.cts +2 -2
  365. package/dist/patterns/SectionCard/index.d.cts.map +1 -1
  366. package/dist/patterns/SectionCard/index.d.ts +2 -2
  367. package/dist/patterns/SectionCard/index.d.ts.map +1 -1
  368. package/dist/patterns/SectionHeading/index.d.cts +3 -3
  369. package/dist/patterns/SectionHeading/index.d.cts.map +1 -1
  370. package/dist/patterns/SectionHeading/index.d.ts +3 -3
  371. package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
  372. package/dist/patterns/index.d.cts +2 -2
  373. package/dist/patterns/index.d.ts +2 -2
  374. package/dist/primitives/Accordion/index.cjs +6 -2
  375. package/dist/primitives/Accordion/index.cjs.map +1 -1
  376. package/dist/primitives/Accordion/index.js +6 -2
  377. package/dist/primitives/Accordion/index.js.map +1 -1
  378. package/dist/primitives/Alert/index.cjs +2 -1
  379. package/dist/primitives/Alert/index.cjs.map +1 -1
  380. package/dist/primitives/Alert/index.js +1 -1
  381. package/dist/primitives/AlertDialog/index.cjs +1 -1
  382. package/dist/primitives/AlertDialog/index.js +1 -1
  383. package/dist/primitives/AspectRatio/index.cjs +1 -1
  384. package/dist/primitives/AspectRatio/index.js +1 -1
  385. package/dist/primitives/Avatar/index.cjs +1 -1
  386. package/dist/primitives/Avatar/index.js +1 -1
  387. package/dist/primitives/Badge/index.cjs +3 -2
  388. package/dist/primitives/Badge/index.cjs.map +1 -1
  389. package/dist/primitives/Badge/index.js +2 -2
  390. package/dist/primitives/Breadcrumb/index.cjs +7 -3
  391. package/dist/primitives/Breadcrumb/index.cjs.map +1 -1
  392. package/dist/primitives/Breadcrumb/index.js +7 -3
  393. package/dist/primitives/Breadcrumb/index.js.map +1 -1
  394. package/dist/primitives/Button/index.cjs +3 -2
  395. package/dist/primitives/Button/index.cjs.map +1 -1
  396. package/dist/primitives/Button/index.js +2 -2
  397. package/dist/primitives/ButtonGroup/index.cjs +3 -2
  398. package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
  399. package/dist/primitives/ButtonGroup/index.js +2 -2
  400. package/dist/primitives/Calendar/index.cjs +12 -11
  401. package/dist/primitives/Calendar/index.cjs.map +1 -1
  402. package/dist/primitives/Calendar/index.js +12 -11
  403. package/dist/primitives/Calendar/index.js.map +1 -1
  404. package/dist/primitives/Card/index.cjs +2 -1
  405. package/dist/primitives/Card/index.cjs.map +1 -1
  406. package/dist/primitives/Card/index.js +1 -1
  407. package/dist/primitives/Carousel/index.cjs +4 -3
  408. package/dist/primitives/Carousel/index.cjs.map +1 -1
  409. package/dist/primitives/Carousel/index.js +4 -3
  410. package/dist/primitives/Carousel/index.js.map +1 -1
  411. package/dist/primitives/Checkbox/index.cjs +10 -3
  412. package/dist/primitives/Checkbox/index.cjs.map +1 -1
  413. package/dist/primitives/Checkbox/index.d.cts +1 -1
  414. package/dist/primitives/Checkbox/index.d.ts +1 -1
  415. package/dist/primitives/Checkbox/index.js +10 -3
  416. package/dist/primitives/Checkbox/index.js.map +1 -1
  417. package/dist/primitives/CheckboxTree/index.cjs +6 -2
  418. package/dist/primitives/CheckboxTree/index.cjs.map +1 -1
  419. package/dist/primitives/CheckboxTree/index.d.cts +1 -1
  420. package/dist/primitives/CheckboxTree/index.d.ts +1 -1
  421. package/dist/primitives/CheckboxTree/index.js +6 -2
  422. package/dist/primitives/CheckboxTree/index.js.map +1 -1
  423. package/dist/primitives/CircularProgress/index.cjs +106 -0
  424. package/dist/primitives/CircularProgress/index.cjs.map +1 -0
  425. package/dist/primitives/CircularProgress/index.d.cts +2 -0
  426. package/dist/primitives/CircularProgress/index.d.ts +2 -0
  427. package/dist/primitives/CircularProgress/index.js +105 -0
  428. package/dist/primitives/CircularProgress/index.js.map +1 -0
  429. package/dist/primitives/Collapsible/index.cjs +1 -1
  430. package/dist/primitives/Collapsible/index.d.cts +1 -1
  431. package/dist/primitives/Collapsible/index.d.ts +1 -1
  432. package/dist/primitives/Collapsible/index.js +1 -1
  433. package/dist/primitives/Command/index.cjs +6 -2
  434. package/dist/primitives/Command/index.cjs.map +1 -1
  435. package/dist/primitives/Command/index.d.cts +1 -1
  436. package/dist/primitives/Command/index.d.ts +1 -1
  437. package/dist/primitives/Command/index.js +6 -2
  438. package/dist/primitives/Command/index.js.map +1 -1
  439. package/dist/primitives/ContextMenu/index.cjs +14 -4
  440. package/dist/primitives/ContextMenu/index.cjs.map +1 -1
  441. package/dist/primitives/ContextMenu/index.d.cts +1 -1
  442. package/dist/primitives/ContextMenu/index.d.ts +1 -1
  443. package/dist/primitives/ContextMenu/index.js +14 -4
  444. package/dist/primitives/ContextMenu/index.js.map +1 -1
  445. package/dist/primitives/Credits/index.cjs +8 -3
  446. package/dist/primitives/Credits/index.cjs.map +1 -1
  447. package/dist/primitives/Credits/index.d.cts +1 -1
  448. package/dist/primitives/Credits/index.d.ts +1 -1
  449. package/dist/primitives/Credits/index.js +7 -3
  450. package/dist/primitives/Credits/index.js.map +1 -1
  451. package/dist/primitives/Dialog/index.cjs +3 -2
  452. package/dist/primitives/Dialog/index.cjs.map +1 -1
  453. package/dist/primitives/Dialog/index.d.cts +1 -1
  454. package/dist/primitives/Dialog/index.d.ts +1 -1
  455. package/dist/primitives/Dialog/index.js +3 -2
  456. package/dist/primitives/Dialog/index.js.map +1 -1
  457. package/dist/primitives/Drawer/index.cjs +34 -2
  458. package/dist/primitives/Drawer/index.cjs.map +1 -1
  459. package/dist/primitives/Drawer/index.d.cts +1 -1
  460. package/dist/primitives/Drawer/index.d.ts +1 -1
  461. package/dist/primitives/Drawer/index.js +34 -2
  462. package/dist/primitives/Drawer/index.js.map +1 -1
  463. package/dist/primitives/DropdownMenu/index.cjs +14 -4
  464. package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
  465. package/dist/primitives/DropdownMenu/index.d.cts +1 -1
  466. package/dist/primitives/DropdownMenu/index.d.ts +1 -1
  467. package/dist/primitives/DropdownMenu/index.js +14 -4
  468. package/dist/primitives/DropdownMenu/index.js.map +1 -1
  469. package/dist/primitives/Empty/index.cjs +1 -1
  470. package/dist/primitives/Empty/index.d.cts +1 -1
  471. package/dist/primitives/Empty/index.d.ts +1 -1
  472. package/dist/primitives/Empty/index.js +1 -1
  473. package/dist/primitives/Field/index.cjs +1 -1
  474. package/dist/primitives/Field/index.d.cts +1 -1
  475. package/dist/primitives/Field/index.d.ts +1 -1
  476. package/dist/primitives/Field/index.js +1 -1
  477. package/dist/primitives/FileUpload/index.cjs +354 -0
  478. package/dist/primitives/FileUpload/index.cjs.map +1 -0
  479. package/dist/primitives/FileUpload/index.d.cts +2 -0
  480. package/dist/primitives/FileUpload/index.d.ts +2 -0
  481. package/dist/primitives/FileUpload/index.js +351 -0
  482. package/dist/primitives/FileUpload/index.js.map +1 -0
  483. package/dist/primitives/Form/index.cjs +1 -1
  484. package/dist/primitives/Form/index.d.cts +1 -1
  485. package/dist/primitives/Form/index.d.ts +1 -1
  486. package/dist/primitives/Form/index.js +1 -1
  487. package/dist/primitives/Heading/index.cjs +2 -1
  488. package/dist/primitives/Heading/index.cjs.map +1 -1
  489. package/dist/primitives/Heading/index.d.cts +1 -1
  490. package/dist/primitives/Heading/index.d.ts +1 -1
  491. package/dist/primitives/Heading/index.js +1 -1
  492. package/dist/primitives/HoverCard/index.cjs +1 -1
  493. package/dist/primitives/HoverCard/index.d.cts +1 -1
  494. package/dist/primitives/HoverCard/index.d.ts +1 -1
  495. package/dist/primitives/HoverCard/index.js +1 -1
  496. package/dist/primitives/Icon/index.d.cts +1 -1
  497. package/dist/primitives/Icon/index.d.ts +1 -1
  498. package/dist/primitives/InfoBanner/index.cjs +6 -3
  499. package/dist/primitives/InfoBanner/index.cjs.map +1 -1
  500. package/dist/primitives/InfoBanner/index.d.cts +1 -1
  501. package/dist/primitives/InfoBanner/index.d.ts +1 -1
  502. package/dist/primitives/InfoBanner/index.js +5 -3
  503. package/dist/primitives/InfoBanner/index.js.map +1 -1
  504. package/dist/primitives/Input/index.cjs +2 -1
  505. package/dist/primitives/Input/index.cjs.map +1 -1
  506. package/dist/primitives/Input/index.d.cts +1 -1
  507. package/dist/primitives/Input/index.d.ts +1 -1
  508. package/dist/primitives/Input/index.js +1 -1
  509. package/dist/primitives/InputGroup/index.cjs +1 -1
  510. package/dist/primitives/InputGroup/index.d.cts +1 -1
  511. package/dist/primitives/InputGroup/index.d.ts +1 -1
  512. package/dist/primitives/InputGroup/index.js +1 -1
  513. package/dist/primitives/InputOtp/index.cjs +3 -2
  514. package/dist/primitives/InputOtp/index.cjs.map +1 -1
  515. package/dist/primitives/InputOtp/index.d.cts +1 -1
  516. package/dist/primitives/InputOtp/index.d.ts +1 -1
  517. package/dist/primitives/InputOtp/index.js +3 -2
  518. package/dist/primitives/InputOtp/index.js.map +1 -1
  519. package/dist/primitives/Item/index.cjs +2 -2
  520. package/dist/primitives/Item/index.d.cts +1 -1
  521. package/dist/primitives/Item/index.d.ts +1 -1
  522. package/dist/primitives/Item/index.js +2 -2
  523. package/dist/primitives/Kbd/index.d.cts +1 -1
  524. package/dist/primitives/Kbd/index.d.ts +1 -1
  525. package/dist/primitives/Label/index.cjs +1 -1
  526. package/dist/primitives/Label/index.d.cts +1 -1
  527. package/dist/primitives/Label/index.d.ts +1 -1
  528. package/dist/primitives/Label/index.js +1 -1
  529. package/dist/primitives/Link/index.cjs +3 -2
  530. package/dist/primitives/Link/index.cjs.map +1 -1
  531. package/dist/primitives/Link/index.d.cts +1 -1
  532. package/dist/primitives/Link/index.d.ts +1 -1
  533. package/dist/primitives/Link/index.js +2 -2
  534. package/dist/primitives/Logo/index.d.cts +1 -1
  535. package/dist/primitives/Logo/index.d.ts +1 -1
  536. package/dist/primitives/Menubar/index.cjs +14 -4
  537. package/dist/primitives/Menubar/index.cjs.map +1 -1
  538. package/dist/primitives/Menubar/index.d.cts +1 -1
  539. package/dist/primitives/Menubar/index.d.ts +1 -1
  540. package/dist/primitives/Menubar/index.js +14 -4
  541. package/dist/primitives/Menubar/index.js.map +1 -1
  542. package/dist/primitives/Mosaic/index.cjs +4 -0
  543. package/dist/primitives/Mosaic/index.d.cts +2 -0
  544. package/dist/primitives/Mosaic/index.d.ts +2 -0
  545. package/dist/primitives/Mosaic/index.js +2 -0
  546. package/dist/primitives/NativeSelect/index.cjs +6 -3
  547. package/dist/primitives/NativeSelect/index.cjs.map +1 -1
  548. package/dist/primitives/NativeSelect/index.d.cts +1 -1
  549. package/dist/primitives/NativeSelect/index.d.ts +1 -1
  550. package/dist/primitives/NativeSelect/index.js +5 -3
  551. package/dist/primitives/NativeSelect/index.js.map +1 -1
  552. package/dist/primitives/NavRail/index.d.cts +2 -2
  553. package/dist/primitives/NavRail/index.d.ts +2 -2
  554. package/dist/primitives/NavigationMenu/index.cjs +5 -3
  555. package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
  556. package/dist/primitives/NavigationMenu/index.d.cts +1 -1
  557. package/dist/primitives/NavigationMenu/index.d.ts +1 -1
  558. package/dist/primitives/NavigationMenu/index.js +5 -3
  559. package/dist/primitives/NavigationMenu/index.js.map +1 -1
  560. package/dist/primitives/NotchedCard/index.cjs +390 -0
  561. package/dist/primitives/NotchedCard/index.cjs.map +1 -0
  562. package/dist/primitives/NotchedCard/index.d.cts +2 -0
  563. package/dist/primitives/NotchedCard/index.d.ts +2 -0
  564. package/dist/primitives/NotchedCard/index.js +385 -0
  565. package/dist/primitives/NotchedCard/index.js.map +1 -0
  566. package/dist/primitives/Pagination/index.cjs +6 -2
  567. package/dist/primitives/Pagination/index.cjs.map +1 -1
  568. package/dist/primitives/Pagination/index.d.cts +1 -1
  569. package/dist/primitives/Pagination/index.d.ts +1 -1
  570. package/dist/primitives/Pagination/index.js +6 -2
  571. package/dist/primitives/Pagination/index.js.map +1 -1
  572. package/dist/primitives/Popover/index.cjs +1 -1
  573. package/dist/primitives/Popover/index.d.cts +1 -1
  574. package/dist/primitives/Popover/index.d.ts +1 -1
  575. package/dist/primitives/Popover/index.js +1 -1
  576. package/dist/primitives/Progress/index.cjs +1 -1
  577. package/dist/primitives/Progress/index.d.cts +1 -1
  578. package/dist/primitives/Progress/index.d.ts +1 -1
  579. package/dist/primitives/Progress/index.js +1 -1
  580. package/dist/primitives/RadioGroup/index.cjs +7 -3
  581. package/dist/primitives/RadioGroup/index.cjs.map +1 -1
  582. package/dist/primitives/RadioGroup/index.d.cts +1 -1
  583. package/dist/primitives/RadioGroup/index.d.ts +1 -1
  584. package/dist/primitives/RadioGroup/index.js +7 -3
  585. package/dist/primitives/RadioGroup/index.js.map +1 -1
  586. package/dist/primitives/Resizable/index.cjs +6 -2
  587. package/dist/primitives/Resizable/index.cjs.map +1 -1
  588. package/dist/primitives/Resizable/index.d.cts +1 -1
  589. package/dist/primitives/Resizable/index.d.ts +1 -1
  590. package/dist/primitives/Resizable/index.js +6 -2
  591. package/dist/primitives/Resizable/index.js.map +1 -1
  592. package/dist/primitives/ScrollArea/index.cjs +1 -1
  593. package/dist/primitives/ScrollArea/index.d.cts +1 -1
  594. package/dist/primitives/ScrollArea/index.d.ts +1 -1
  595. package/dist/primitives/ScrollArea/index.js +1 -1
  596. package/dist/primitives/Select/index.cjs +18 -5
  597. package/dist/primitives/Select/index.cjs.map +1 -1
  598. package/dist/primitives/Select/index.d.cts +1 -1
  599. package/dist/primitives/Select/index.d.ts +1 -1
  600. package/dist/primitives/Select/index.js +18 -5
  601. package/dist/primitives/Select/index.js.map +1 -1
  602. package/dist/primitives/Separator/index.cjs +1 -1
  603. package/dist/primitives/Separator/index.js +1 -1
  604. package/dist/primitives/Sheet/index.cjs +40 -4
  605. package/dist/primitives/Sheet/index.cjs.map +1 -1
  606. package/dist/primitives/Sheet/index.d.cts +1 -1
  607. package/dist/primitives/Sheet/index.d.ts +1 -1
  608. package/dist/primitives/Sheet/index.js +40 -4
  609. package/dist/primitives/Sheet/index.js.map +1 -1
  610. package/dist/primitives/Sidebar/index.d.cts +1 -1
  611. package/dist/primitives/Sidebar/index.d.ts +1 -1
  612. package/dist/primitives/Skeleton/index.d.cts +1 -1
  613. package/dist/primitives/Skeleton/index.d.ts +1 -1
  614. package/dist/primitives/Slider/index.cjs +1 -1
  615. package/dist/primitives/Slider/index.d.cts +1 -1
  616. package/dist/primitives/Slider/index.d.ts +1 -1
  617. package/dist/primitives/Slider/index.js +1 -1
  618. package/dist/primitives/Sonner/index.cjs +22 -6
  619. package/dist/primitives/Sonner/index.cjs.map +1 -1
  620. package/dist/primitives/Sonner/index.d.cts +1 -1
  621. package/dist/primitives/Sonner/index.d.ts +1 -1
  622. package/dist/primitives/Sonner/index.js +22 -6
  623. package/dist/primitives/Sonner/index.js.map +1 -1
  624. package/dist/primitives/Spinner/index.cjs +4 -2
  625. package/dist/primitives/Spinner/index.cjs.map +1 -1
  626. package/dist/primitives/Spinner/index.d.cts +1 -1
  627. package/dist/primitives/Spinner/index.d.ts +1 -1
  628. package/dist/primitives/Spinner/index.js +4 -2
  629. package/dist/primitives/Spinner/index.js.map +1 -1
  630. package/dist/primitives/Switch/index.cjs +1 -1
  631. package/dist/primitives/Switch/index.d.cts +1 -1
  632. package/dist/primitives/Switch/index.d.ts +1 -1
  633. package/dist/primitives/Switch/index.js +1 -1
  634. package/dist/primitives/Table/index.d.cts +1 -1
  635. package/dist/primitives/Table/index.d.ts +1 -1
  636. package/dist/primitives/Tabs/index.cjs +2 -2
  637. package/dist/primitives/Tabs/index.d.cts +1 -1
  638. package/dist/primitives/Tabs/index.d.ts +1 -1
  639. package/dist/primitives/Tabs/index.js +2 -2
  640. package/dist/primitives/Text/index.cjs +2 -1
  641. package/dist/primitives/Text/index.cjs.map +1 -1
  642. package/dist/primitives/Text/index.d.cts +1 -1
  643. package/dist/primitives/Text/index.d.ts +1 -1
  644. package/dist/primitives/Text/index.js +1 -1
  645. package/dist/primitives/Textarea/index.cjs +2 -1
  646. package/dist/primitives/Textarea/index.cjs.map +1 -1
  647. package/dist/primitives/Textarea/index.d.cts +1 -1
  648. package/dist/primitives/Textarea/index.d.ts +1 -1
  649. package/dist/primitives/Textarea/index.js +1 -1
  650. package/dist/primitives/ThemeProvider/index.d.cts +1 -1
  651. package/dist/primitives/ThemeProvider/index.d.ts +1 -1
  652. package/dist/primitives/Toggle/index.cjs +3 -2
  653. package/dist/primitives/Toggle/index.cjs.map +1 -1
  654. package/dist/primitives/Toggle/index.d.cts +1 -1
  655. package/dist/primitives/Toggle/index.d.ts +1 -1
  656. package/dist/primitives/Toggle/index.js +2 -2
  657. package/dist/primitives/ToggleGroup/index.cjs +1 -1
  658. package/dist/primitives/ToggleGroup/index.d.cts +1 -1
  659. package/dist/primitives/ToggleGroup/index.d.ts +1 -1
  660. package/dist/primitives/ToggleGroup/index.js +1 -1
  661. package/dist/primitives/Tooltip/index.cjs +1 -1
  662. package/dist/primitives/Tooltip/index.d.cts +1 -1
  663. package/dist/primitives/Tooltip/index.d.ts +1 -1
  664. package/dist/primitives/Tooltip/index.js +1 -1
  665. package/dist/primitives/index.cjs +14 -3
  666. package/dist/primitives/index.d.cts +55 -51
  667. package/dist/primitives/index.d.ts +55 -51
  668. package/dist/primitives/index.js +8 -4
  669. package/package.json +2 -1
  670. package/dist/index47.d.cts.map +0 -1
  671. package/dist/index47.d.ts.map +0 -1
@@ -0,0 +1,105 @@
1
+ import { t as cn } from "../../cn.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/primitives/CircularProgress/CircularProgress.tsx
4
+ const indicatorVariants = {
5
+ default: "text-primary-invert-bg",
6
+ brand: "text-brand-500-primary",
7
+ success: "text-success-txt",
8
+ warning: "text-warning-txt",
9
+ info: "text-info-txt",
10
+ destructive: "text-danger-txt",
11
+ analyzing: "text-[var(--progress-analyzing)]",
12
+ ingesting: "text-[var(--progress-ingesting)]"
13
+ };
14
+ const trackVariants = {
15
+ default: "text-primary-border",
16
+ brand: "text-brand-500-primary/20",
17
+ success: "text-success-txt/20",
18
+ warning: "text-warning-txt/20",
19
+ info: "text-info-txt/20",
20
+ destructive: "text-danger-txt/20",
21
+ analyzing: "text-primary-invert-bg/20",
22
+ ingesting: "text-primary-invert-bg/20"
23
+ };
24
+ function clamp(value, min, max) {
25
+ return Math.min(max, Math.max(min, value));
26
+ }
27
+ /** Circular progress indicator supporting determinate and indeterminate states. */
28
+ function CircularProgress({ className, value, min = 0, max = 100, size = 48, strokeWidth = 4, variant = "default", trackVariant, progressColor, trackColor, label, showValueLabel = false, indeterminateLabel = "Loading", style, "aria-label": ariaLabelProp, "aria-valuetext": ariaValueTextProp, ...props }) {
29
+ const normalizedMax = max > min ? max : min + 100;
30
+ const boundedValue = value == null ? void 0 : clamp(value, min, normalizedMax);
31
+ const indeterminate = boundedValue == null;
32
+ const percent = indeterminate ? void 0 : (boundedValue - min) / (normalizedMax - min) * 100;
33
+ const roundedPercent = percent == null ? void 0 : Math.round(percent);
34
+ const normalizedSize = Math.max(size, 12);
35
+ const normalizedStrokeWidth = clamp(strokeWidth, 1, normalizedSize / 2);
36
+ const radius = (normalizedSize - normalizedStrokeWidth) / 2;
37
+ const circumference = 2 * Math.PI * radius;
38
+ const centerLabel = label ?? (showValueLabel && roundedPercent != null ? `${roundedPercent}%` : null);
39
+ const ariaValueText = ariaValueTextProp ?? (indeterminate ? indeterminateLabel : `${roundedPercent}% complete`);
40
+ return /* @__PURE__ */ jsxs("div", {
41
+ "data-slot": "circular-progress",
42
+ "data-state": indeterminate ? "indeterminate" : "determinate",
43
+ role: "progressbar",
44
+ "aria-label": ariaLabelProp ?? "Progress",
45
+ "aria-valuemin": min,
46
+ "aria-valuemax": normalizedMax,
47
+ "aria-valuenow": indeterminate ? void 0 : boundedValue,
48
+ "aria-valuetext": ariaValueText,
49
+ className: cn("relative inline-flex shrink-0 items-center justify-center rounded-full text-primary-txt outline-none focus-visible:ring-3 focus-visible:ring-focus", className),
50
+ style: {
51
+ width: normalizedSize,
52
+ height: normalizedSize,
53
+ ...style
54
+ },
55
+ ...props,
56
+ children: [
57
+ /* @__PURE__ */ jsxs("svg", {
58
+ "data-slot": "circular-progress-svg",
59
+ width: normalizedSize,
60
+ height: normalizedSize,
61
+ viewBox: `0 0 ${normalizedSize} ${normalizedSize}`,
62
+ className: cn("size-full -rotate-90", indeterminate && "motion-safe:animate-spin"),
63
+ children: [/* @__PURE__ */ jsx("circle", {
64
+ "data-slot": "circular-progress-track",
65
+ cx: normalizedSize / 2,
66
+ cy: normalizedSize / 2,
67
+ r: radius,
68
+ fill: "none",
69
+ strokeWidth: normalizedStrokeWidth,
70
+ className: cn("stroke-current", trackColor ? void 0 : trackVariants[trackVariant ?? variant]),
71
+ style: trackColor ? { stroke: trackColor } : void 0
72
+ }), /* @__PURE__ */ jsx("circle", {
73
+ "data-slot": "circular-progress-indicator",
74
+ cx: normalizedSize / 2,
75
+ cy: normalizedSize / 2,
76
+ r: radius,
77
+ fill: "none",
78
+ strokeWidth: normalizedStrokeWidth,
79
+ strokeLinecap: "round",
80
+ className: cn("stroke-current motion-reduce:transition-none", progressColor ? void 0 : indicatorVariants[variant], indeterminate ? void 0 : "transition-[stroke-dashoffset] duration-500 ease-out"),
81
+ style: {
82
+ strokeDasharray: indeterminate ? `${circumference * .35} ${circumference}` : `${circumference}`,
83
+ strokeDashoffset: indeterminate ? `${circumference * .1}` : `${circumference - (percent ?? 0) / 100 * circumference}`,
84
+ ...progressColor ? { stroke: progressColor } : {}
85
+ }
86
+ })]
87
+ }),
88
+ centerLabel ? /* @__PURE__ */ jsx("span", {
89
+ "data-slot": "circular-progress-label",
90
+ "aria-hidden": "true",
91
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center font-medium text-[11px] leading-none",
92
+ children: centerLabel
93
+ }) : null,
94
+ /* @__PURE__ */ jsx("span", {
95
+ className: "sr-only",
96
+ "aria-live": "polite",
97
+ children: indeterminate ? indeterminateLabel : `${roundedPercent}% complete`
98
+ })
99
+ ]
100
+ });
101
+ }
102
+ //#endregion
103
+ export { CircularProgress };
104
+
105
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/CircularProgress/CircularProgress.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst indicatorVariants = {\n default: \"text-primary-invert-bg\",\n brand: \"text-brand-500-primary\",\n success: \"text-success-txt\",\n warning: \"text-warning-txt\",\n info: \"text-info-txt\",\n destructive: \"text-danger-txt\",\n analyzing: \"text-[var(--progress-analyzing)]\",\n ingesting: \"text-[var(--progress-ingesting)]\",\n} as const;\n\nconst trackVariants = {\n default: \"text-primary-border\",\n brand: \"text-brand-500-primary/20\",\n success: \"text-success-txt/20\",\n warning: \"text-warning-txt/20\",\n info: \"text-info-txt/20\",\n destructive: \"text-danger-txt/20\",\n analyzing: \"text-primary-invert-bg/20\",\n ingesting: \"text-primary-invert-bg/20\",\n} as const;\n\ntype CircularProgressVariant = keyof typeof indicatorVariants;\n\ntype CircularProgressProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** Determinate value. Omit for indeterminate/loading state. */\n value?: number;\n /** Lower bound used for ARIA/value normalization. */\n min?: number;\n /** Upper bound used for ARIA/value normalization. */\n max?: number;\n /** Rendered diameter in px. */\n size?: number;\n /** Stroke thickness in px. */\n strokeWidth?: number;\n /** Semantic colour variant for the progress stroke. */\n variant?: CircularProgressVariant;\n /** Semantic colour variant for the track stroke. Defaults to `variant`. */\n trackVariant?: CircularProgressVariant;\n /** Explicit progress stroke colour (CSS colour value). Overrides `variant`. */\n progressColor?: string;\n /** Explicit track stroke colour (CSS colour value). Overrides `trackVariant`. */\n trackColor?: string;\n /** Optional centered label content. */\n label?: React.ReactNode;\n /** Render computed percentage text in the center when determinate. */\n showValueLabel?: boolean;\n /** Accessible text for indeterminate/loading state. */\n indeterminateLabel?: string;\n};\n\nfunction clamp(value: number, min: number, max: number) {\n return Math.min(max, Math.max(min, value));\n}\n\n/** Circular progress indicator supporting determinate and indeterminate states. */\nfunction CircularProgress({\n className,\n value,\n min = 0,\n max = 100,\n size = 48,\n strokeWidth = 4,\n variant = \"default\",\n trackVariant,\n progressColor,\n trackColor,\n label,\n showValueLabel = false,\n indeterminateLabel = \"Loading\",\n style,\n \"aria-label\": ariaLabelProp,\n \"aria-valuetext\": ariaValueTextProp,\n ...props\n}: CircularProgressProps) {\n const normalizedMax = max > min ? max : min + 100;\n const boundedValue = value == null ? undefined : clamp(value, min, normalizedMax);\n const indeterminate = boundedValue == null;\n\n const percent = indeterminate ? undefined : ((boundedValue - min) / (normalizedMax - min)) * 100;\n const roundedPercent = percent == null ? undefined : Math.round(percent);\n\n const normalizedSize = Math.max(size, 12);\n const normalizedStrokeWidth = clamp(strokeWidth, 1, normalizedSize / 2);\n const radius = (normalizedSize - normalizedStrokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n\n const centerLabel =\n label ?? (showValueLabel && roundedPercent != null ? `${roundedPercent}%` : null);\n const ariaValueText =\n ariaValueTextProp ?? (indeterminate ? indeterminateLabel : `${roundedPercent}% complete`);\n\n return (\n <div\n data-slot=\"circular-progress\"\n data-state={indeterminate ? \"indeterminate\" : \"determinate\"}\n role=\"progressbar\"\n aria-label={ariaLabelProp ?? \"Progress\"}\n aria-valuemin={min}\n aria-valuemax={normalizedMax}\n aria-valuenow={indeterminate ? undefined : boundedValue}\n aria-valuetext={ariaValueText}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center rounded-full text-primary-txt outline-none focus-visible:ring-3 focus-visible:ring-focus\",\n className,\n )}\n style={{ width: normalizedSize, height: normalizedSize, ...style }}\n {...props}\n >\n <svg\n data-slot=\"circular-progress-svg\"\n width={normalizedSize}\n height={normalizedSize}\n viewBox={`0 0 ${normalizedSize} ${normalizedSize}`}\n className={cn(\"size-full -rotate-90\", indeterminate && \"motion-safe:animate-spin\")}\n >\n <circle\n data-slot=\"circular-progress-track\"\n cx={normalizedSize / 2}\n cy={normalizedSize / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={normalizedStrokeWidth}\n className={cn(\n \"stroke-current\",\n trackColor ? undefined : trackVariants[trackVariant ?? variant],\n )}\n style={trackColor ? { stroke: trackColor } : undefined}\n />\n <circle\n data-slot=\"circular-progress-indicator\"\n cx={normalizedSize / 2}\n cy={normalizedSize / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={normalizedStrokeWidth}\n strokeLinecap=\"round\"\n className={cn(\n \"stroke-current motion-reduce:transition-none\",\n progressColor ? undefined : indicatorVariants[variant],\n indeterminate ? undefined : \"transition-[stroke-dashoffset] duration-500 ease-out\",\n )}\n style={{\n strokeDasharray: indeterminate\n ? `${circumference * 0.35} ${circumference}`\n : `${circumference}`,\n strokeDashoffset: indeterminate\n ? `${circumference * 0.1}`\n : `${circumference - ((percent ?? 0) / 100) * circumference}`,\n ...(progressColor ? { stroke: progressColor } : {}),\n }}\n />\n </svg>\n\n {centerLabel ? (\n <span\n data-slot=\"circular-progress-label\"\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 flex items-center justify-center font-medium text-[11px] leading-none\"\n >\n {centerLabel}\n </span>\n ) : null}\n\n <span className=\"sr-only\" aria-live=\"polite\">\n {indeterminate ? indeterminateLabel : `${roundedPercent}% complete`}\n </span>\n </div>\n );\n}\n\nexport { CircularProgress, type CircularProgressProps, type CircularProgressVariant };\n"],"mappings":";;;AAIA,MAAM,oBAAoB;CACxB,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;CACT,MAAM;CACN,aAAa;CACb,WAAW;CACX,WAAW;AACb;AAEA,MAAM,gBAAgB;CACpB,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;CACT,MAAM;CACN,aAAa;CACb,WAAW;CACX,WAAW;AACb;AA+BA,SAAS,MAAM,OAAe,KAAa,KAAa;CACtD,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;;AAGA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G;KACH,MAAK;KACL,aAAa;KACb,WAAW,GACT,kBACA,aAAa,KAAA,IAAY,cAAc,gBAAgB,QACzD;KACA,OAAO,aAAa,EAAE,QAAQ,WAAW,IAAI,KAAA;IAC9C,CAAA,GACD,oBAAC,UAAD;KACE,aAAU;KACV,IAAI,iBAAiB;KACrB,IAAI,iBAAiB;KACrB,GAAG;KACH,MAAK;KACL,aAAa;KACb,eAAc;KACd,WAAW,GACT,gDACA,gBAAgB,KAAA,IAAY,kBAAkB,UAC9C,gBAAgB,KAAA,IAAY,sDAC9B;KACA,OAAO;MACL,iBAAiB,gBACb,GAAG,gBAAgB,IAAK,GAAG,kBAC3B,GAAG;MACP,kBAAkB,gBACd,GAAG,gBAAgB,OACnB,GAAG,iBAAkB,WAAW,KAAK,MAAO;MAChD,GAAI,gBAAgB,EAAE,QAAQ,cAAc,IAAI,CAAC;KACnD;IACD,CAAA,CACE;;GAEJ,cACC,oBAAC,QAAD;IACE,aAAU;IACV,eAAY;IACZ,WAAU;cAET;GACG,CAAA,IACJ;GAEJ,oBAAC,QAAD;IAAM,WAAU;IAAU,aAAU;cACjC,gBAAgB,qBAAqB,GAAG,eAAe;GACpD,CAAA;EACH;;AAET"}
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let radix_ui = require("radix-ui");
3
2
  let react_jsx_runtime = require("react/jsx-runtime");
3
+ let radix_ui = require("radix-ui");
4
4
  //#region src/primitives/Collapsible/Collapsible.tsx
5
5
  /** Root of an interactive panel that shows or hides its content when the trigger is toggled. */
6
6
  function Collapsible({ ...props }) {
@@ -1,2 +1,2 @@
1
- import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../../index17.cjs";
1
+ import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../../index18.cjs";
2
2
  export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -1,2 +1,2 @@
1
- import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../../index17.js";
1
+ import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "../../index18.js";
2
2
  export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -1,5 +1,5 @@
1
- import { Collapsible as Collapsible$1 } from "radix-ui";
2
1
  import { jsx } from "react/jsx-runtime";
2
+ import { Collapsible as Collapsible$1 } from "radix-ui";
3
3
  //#region src/primitives/Collapsible/Collapsible.tsx
4
4
  /** Root of an interactive panel that shows or hides its content when the trigger is toggled. */
5
5
  function Collapsible({ ...props }) {
@@ -1,8 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_cn = require("../../cn.cjs");
3
+ const require_Icon = require("../../Icon.cjs");
3
4
  const require_primitives_Dialog_index = require("../Dialog/index.cjs");
4
- let lucide_react = require("lucide-react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let lucide_react = require("lucide-react");
6
7
  let cmdk = require("cmdk");
7
8
  //#region src/primitives/Command/Command.tsx
8
9
  /** Command palette root: a filterable list of commands built on `cmdk`. */
@@ -35,7 +36,10 @@ function CommandInput({ className, ...props }) {
35
36
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
36
37
  "data-slot": "command-input-wrapper",
37
38
  className: "flex h-9 items-center gap-2 border-b px-3",
38
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, { className: "size-4 shrink-0 text-muted-txt" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Input, {
39
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
40
+ as: lucide_react.SearchIcon,
41
+ className: "size-4 shrink-0 text-muted-txt"
42
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Input, {
39
43
  "data-slot": "command-input",
40
44
  className: require_cn.cn("flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50", className),
41
45
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["CommandPrimitive","cn","Dialog","DialogHeader","DialogTitle","DialogDescription","DialogContent","SearchIcon"],"sources":["../../../src/primitives/Command/Command.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/Dialog\";\nimport { cn } from \"@/utils\";\n\n/** Command palette root: a filterable list of commands built on `cmdk`. */\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n // Figma Command (66:5046): bg/primary panel, radius-12, shadow-md.\n \"flex h-full w-full flex-col overflow-hidden rounded-12 bg-primary-bg text-primary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A `Command` rendered inside a centered, modal `Dialog` — the classic ⌘K palette. */\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n /** Accessible (visually hidden) dialog title for screen readers. */\n title?: string;\n /** Accessible (visually hidden) dialog description for screen readers. */\n description?: string;\n /** Extra classes applied to the dialog content surface. */\n className?: string;\n /** Whether to render the dialog's top-right close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The search field that filters the command list, with a leading search icon. */\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"flex h-9 items-center gap-2 border-b px-3\">\n <SearchIcon className=\"size-4 shrink-0 text-muted-txt\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/** Scrollable container for command groups, items, and the empty state. */\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder shown when the search query matches no items. */\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\n/** A labelled group of related command items, with an optional `heading`. */\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n // Group headings: paragraph small/bold on content/secondary (Figma).\n \"overflow-hidden p-1 text-primary-txt [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:leading-5 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between command groups. */\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable command row supporting keyboard navigation and a disabled state. */\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n // Figma Command Item: hover bg/muted, active/selected bg/secondary,\n // radius-6, 3px vertical padding.\n \"relative flex cursor-default items-center gap-2 rounded-6 px-2 py-0.75 text-sm leading-5 outline-hidden select-none hover:bg-muted-bg active:bg-secondary-bg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-secondary-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Right-aligned keyboard-shortcut hint shown inside a `CommandItem`. */\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;AAgBA,SAAS,QAAQ,EAAE,WAAW,GAAG,SAAwD;CACvF,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,SAAD;EACE,aAAU;EACV,WAAWC,WAAAA,GAET,yFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,cAAc,EACrB,QAAQ,mBAC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A,GAAA,kBAAA,KAACA,KAAAA,QAAiB,OAAlB;EACE,aAAU;EACV,WAAWC,WAAAA,GAET,6PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,iBAAA,GAAA,kBAAA,KAACD,KAAAA,QAAiB,WAAlB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,iBAAA,GAAA,kBAAA,KAACD,KAAAA,QAAiB,MAAlB;EACE,aAAU;EACV,WAAWC,WAAAA,GAGT,6YACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAuC;CAC9E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["CommandPrimitive","cn","Dialog","DialogHeader","DialogTitle","DialogDescription","DialogContent","Icon","SearchIcon"],"sources":["../../../src/primitives/Command/Command.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icon } from \"@/primitives/Icon\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/Dialog\";\nimport { cn } from \"@/utils\";\n\n/** Command palette root: a filterable list of commands built on `cmdk`. */\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n // Figma Command (66:5046): bg/primary panel, radius-12, shadow-md.\n \"flex h-full w-full flex-col overflow-hidden rounded-12 bg-primary-bg text-primary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A `Command` rendered inside a centered, modal `Dialog` — the classic ⌘K palette. */\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n /** Accessible (visually hidden) dialog title for screen readers. */\n title?: string;\n /** Accessible (visually hidden) dialog description for screen readers. */\n description?: string;\n /** Extra classes applied to the dialog content surface. */\n className?: string;\n /** Whether to render the dialog's top-right close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The search field that filters the command list, with a leading search icon. */\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"flex h-9 items-center gap-2 border-b px-3\">\n <Icon as={SearchIcon} className=\"size-4 shrink-0 text-muted-txt\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/** Scrollable container for command groups, items, and the empty state. */\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder shown when the search query matches no items. */\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\n/** A labelled group of related command items, with an optional `heading`. */\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n // Group headings: paragraph small/bold on content/secondary (Figma).\n \"overflow-hidden p-1 text-primary-txt [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:leading-5 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between command groups. */\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable command row supporting keyboard navigation and a disabled state. */\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n // Figma Command Item: hover bg/muted, active/selected bg/secondary,\n // radius-6, 3px vertical padding.\n \"relative flex cursor-default items-center gap-2 rounded-6 px-2 py-0.75 text-sm leading-5 outline-hidden select-none hover:bg-muted-bg active:bg-secondary-bg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-secondary-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Right-aligned keyboard-shortcut hint shown inside a `CommandItem`. */\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;;AAiBA,SAAS,QAAQ,EAAE,WAAW,GAAG,SAAwD;CACvF,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,SAAD;EACE,aAAU;EACV,WAAWC,WAAAA,GAET,yFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,cAAc,EACrB,QAAQ,mBACR,cAAc,kCACd,UACA,WACA,kBAAkB,MAClB,GAAG,SAUF;CACD,OACE,iBAAA,GAAA,kBAAA,MAACC,gCAAAA,QAAD;EAAQ,GAAI;YAAZ,CACE,iBAAA,GAAA,kBAAA,MAACC,gCAAAA,cAAD;GAAc,WAAU;aAAxB,CACE,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,aAAD,EAAA,UAAc,MAAmB,CAAA,GACjC,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,mBAAD,EAAA,UAAoB,YAA+B,CAAA,CACvC;MACd,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,eAAD;GACE,WAAWL,WAAAA,GAAG,uBAAuB,SAAS;GAC7B;aAEjB,iBAAA,GAAA,kBAAA,KAAC,SAAD;IAAS,WAAU;IAChB;GACM,CAAA;EACI,CAAA,CACT;;AAEZ;;AAGA,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,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AU;EACV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../../index19.cjs";
1
+ import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../../index20.cjs";
2
2
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -1,2 +1,2 @@
1
- import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../../index19.js";
1
+ import { a as CommandInput, c as CommandSeparator, i as CommandGroup, l as CommandShortcut, n as CommandDialog, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../../index20.js";
2
2
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -1,7 +1,8 @@
1
1
  import { t as cn } from "../../cn.js";
2
+ import { t as Icon } from "../../Icon.js";
2
3
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../Dialog/index.js";
3
- import { SearchIcon } from "lucide-react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { SearchIcon } from "lucide-react";
5
6
  import { Command as Command$1 } from "cmdk";
6
7
  //#region src/primitives/Command/Command.tsx
7
8
  /** Command palette root: a filterable list of commands built on `cmdk`. */
@@ -34,7 +35,10 @@ function CommandInput({ className, ...props }) {
34
35
  return /* @__PURE__ */ jsxs("div", {
35
36
  "data-slot": "command-input-wrapper",
36
37
  className: "flex h-9 items-center gap-2 border-b px-3",
37
- children: [/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 text-muted-txt" }), /* @__PURE__ */ jsx(Command$1.Input, {
38
+ children: [/* @__PURE__ */ jsx(Icon, {
39
+ as: SearchIcon,
40
+ className: "size-4 shrink-0 text-muted-txt"
41
+ }), /* @__PURE__ */ jsx(Command$1.Input, {
38
42
  "data-slot": "command-input",
39
43
  className: cn("flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50", className),
40
44
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CommandPrimitive"],"sources":["../../../src/primitives/Command/Command.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/Dialog\";\nimport { cn } from \"@/utils\";\n\n/** Command palette root: a filterable list of commands built on `cmdk`. */\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n // Figma Command (66:5046): bg/primary panel, radius-12, shadow-md.\n \"flex h-full w-full flex-col overflow-hidden rounded-12 bg-primary-bg text-primary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A `Command` rendered inside a centered, modal `Dialog` — the classic ⌘K palette. */\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n /** Accessible (visually hidden) dialog title for screen readers. */\n title?: string;\n /** Accessible (visually hidden) dialog description for screen readers. */\n description?: string;\n /** Extra classes applied to the dialog content surface. */\n className?: string;\n /** Whether to render the dialog's top-right close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The search field that filters the command list, with a leading search icon. */\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"flex h-9 items-center gap-2 border-b px-3\">\n <SearchIcon className=\"size-4 shrink-0 text-muted-txt\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/** Scrollable container for command groups, items, and the empty state. */\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder shown when the search query matches no items. */\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\n/** A labelled group of related command items, with an optional `heading`. */\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n // Group headings: paragraph small/bold on content/secondary (Figma).\n \"overflow-hidden p-1 text-primary-txt [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:leading-5 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between command groups. */\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable command row supporting keyboard navigation and a disabled state. */\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n // Figma Command Item: hover bg/muted, active/selected bg/secondary,\n // radius-6, 3px vertical padding.\n \"relative flex cursor-default items-center gap-2 rounded-6 px-2 py-0.75 text-sm leading-5 outline-hidden select-none hover:bg-muted-bg active:bg-secondary-bg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-secondary-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Right-aligned keyboard-shortcut hint shown inside a `CommandItem`. */\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;AAgBA,SAAS,QAAQ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AlB;EACE,aAAU;EACV,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GAGT,6YACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAuC;CAC9E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["CommandPrimitive"],"sources":["../../../src/primitives/Command/Command.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icon } from \"@/primitives/Icon\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/Dialog\";\nimport { cn } from \"@/utils\";\n\n/** Command palette root: a filterable list of commands built on `cmdk`. */\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n // Figma Command (66:5046): bg/primary panel, radius-12, shadow-md.\n \"flex h-full w-full flex-col overflow-hidden rounded-12 bg-primary-bg text-primary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A `Command` rendered inside a centered, modal `Dialog` — the classic ⌘K palette. */\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n /** Accessible (visually hidden) dialog title for screen readers. */\n title?: string;\n /** Accessible (visually hidden) dialog description for screen readers. */\n description?: string;\n /** Extra classes applied to the dialog content surface. */\n className?: string;\n /** Whether to render the dialog's top-right close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The search field that filters the command list, with a leading search icon. */\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"flex h-9 items-center gap-2 border-b px-3\">\n <Icon as={SearchIcon} className=\"size-4 shrink-0 text-muted-txt\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-6 bg-transparent py-3 text-sm leading-5 outline-hidden placeholder:text-muted-txt disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/** Scrollable container for command groups, items, and the empty state. */\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder shown when the search query matches no items. */\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\n/** A labelled group of related command items, with an optional `heading`. */\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n // Group headings: paragraph small/bold on content/secondary (Figma).\n \"overflow-hidden p-1 text-primary-txt [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:leading-5 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-secondary-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between command groups. */\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable command row supporting keyboard navigation and a disabled state. */\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n // Figma Command Item: hover bg/muted, active/selected bg/secondary,\n // radius-6, 3px vertical padding.\n \"relative flex cursor-default items-center gap-2 rounded-6 px-2 py-0.75 text-sm leading-5 outline-hidden select-none hover:bg-muted-bg active:bg-secondary-bg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-secondary-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Right-aligned keyboard-shortcut hint shown inside a `CommandItem`. */\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;AAiBA,SAAS,QAAQ,EAAE,WAAW,GAAG,SAAwD;CACvF,OACE,oBAACA,WAAD;EACE,aAAU;EACV,WAAW,GAET,yFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,cAAc,EACrB,QAAQ,mBACR,cAAc,kCACd,UACA,WACA,kBAAkB,MAClB,GAAG,SAUF;CACD,OACE,qBAAC,QAAD;EAAQ,GAAI;YAAZ,CACE,qBAAC,cAAD;GAAc,WAAU;aAAxB,CACE,oBAAC,aAAD,EAAA,UAAc,MAAmB,CAAA,GACjC,oBAAC,mBAAD,EAAA,UAAoB,YAA+B,CAAA,CACvC;MACd,oBAAC,eAAD;GACE,WAAW,GAAG,uBAAuB,SAAS;GAC7B;aAEjB,oBAAC,SAAD;IAAS,WAAU;IAChB;GACM,CAAA;EACI,CAAA,CACT;;AAEZ;;AAGA,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;CACtD,OACE,qBAAC,OAAD;EAAK,aAAU;EAAwB,WAAU;YAAjD,CACE,oBAAC,MAAD;GAAM,IAAI;GAAY,WAAU;EAAkC,CAAA,GAClE,oBAACA,UAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,8JACA,SACF;GACA,GAAI;EACL,CAAA,CACE;;AAET;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GAAG,0DAA0D,SAAS;EACjF,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,GAAG,SAA8D;CACvF,OACE,oBAACA,UAAiB,OAAlB;EACE,aAAU;EACV,WAAU;EACV,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;CACtD,OACE,oBAACA,UAAiB,OAAlB;EACE,aAAU;EACV,WAAW,GAET,6PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,UAAiB,WAAlB;EACE,aAAU;EACV,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GAGT,6YACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAuC;CAC9E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
@@ -1,8 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_cn = require("../../cn.cjs");
3
+ const require_Icon = require("../../Icon.cjs");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
3
5
  let lucide_react = require("lucide-react");
4
6
  let radix_ui = require("radix-ui");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
7
  //#region src/primitives/ContextMenu/ContextMenu.tsx
7
8
  /** Root provider for a right-click context menu; wires the trigger to its portalled content. */
8
9
  function ContextMenu({ ...props }) {
@@ -53,7 +54,10 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
53
54
  "data-inset": inset,
54
55
  className: require_cn.cn("flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt", className),
55
56
  ...props,
56
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "ml-auto size-4" })]
57
+ children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
58
+ as: lucide_react.ChevronRightIcon,
59
+ className: "ml-auto size-4"
60
+ })]
57
61
  });
58
62
  }
59
63
  /** The popover surface for a nested submenu. */
@@ -91,7 +95,10 @@ function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
91
95
  ...props,
92
96
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
93
97
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
94
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "size-4" }) })
98
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
99
+ as: lucide_react.CheckIcon,
100
+ className: "size-4"
101
+ }) })
95
102
  }), children]
96
103
  });
97
104
  }
@@ -103,7 +110,10 @@ function ContextMenuRadioItem({ className, children, ...props }) {
103
110
  ...props,
104
111
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
105
112
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
106
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleIcon, { className: "size-2 fill-current" }) })
113
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
114
+ as: lucide_react.CircleIcon,
115
+ className: "size-2 fill-current"
116
+ }) })
107
117
  }), children]
108
118
  });
109
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["ContextMenuPrimitive","cn","ChevronRightIcon","CheckIcon","CircleIcon"],"sources":["../../../src/primitives/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a right-click context menu; wires the trigger to its portalled content. */\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/** The target region that opens the menu on right-click (context menu). */\nfunction ContextMenuTrigger({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/** Groups related items together for labelling and accessibility. */\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/** Portals the menu content into the document body. */\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\n/** Wraps a nested submenu (pair with `ContextMenuSubTrigger` and `ContextMenuSubContent`). */\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/** Groups `ContextMenuRadioItem`s into a single-select set. */\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/** Item that opens a nested submenu; renders a trailing chevron. */\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/** The popover surface for a nested submenu. */\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The portalled popover surface that holds the menu items. */\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/** A selectable menu item; supports a `destructive` variant and `inset` alignment. */\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n /** Visual intent; `destructive` colours the item with the danger palette. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio indicator; use inside `ContextMenuRadioGroup`. */\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that labels a group of items. */\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A horizontal divider between groups of items. */\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned text for a keyboard shortcut hint inside an item. */\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;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AA,EACX,CAAA;EAChC,CAAA,GACL,QAC6B;;AAEpC;;AAGA,SAAS,iBAAiB,EACxB,WACA,OACA,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACJ,SAAAA,YAAqB,OAAtB;EACE,aAAU;EACV,cAAY;EACZ,WAAWC,WAAAA,GACT,8EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,YAAqB,WAAtB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["ContextMenuPrimitive","cn","Icon","ChevronRightIcon","CheckIcon","CircleIcon"],"sources":["../../../src/primitives/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a right-click context menu; wires the trigger to its portalled content. */\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/** The target region that opens the menu on right-click (context menu). */\nfunction ContextMenuTrigger({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/** Groups related items together for labelling and accessibility. */\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/** Portals the menu content into the document body. */\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\n/** Wraps a nested submenu (pair with `ContextMenuSubTrigger` and `ContextMenuSubContent`). */\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/** Groups `ContextMenuRadioItem`s into a single-select set. */\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/** Item that opens a nested submenu; renders a trailing chevron. */\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n >\n {children}\n <Icon as={ChevronRightIcon} className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/** The popover surface for a nested submenu. */\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The portalled popover surface that holds the menu items. */\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/** A selectable menu item; supports a `destructive` variant and `inset` alignment. */\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n /** Visual intent; `destructive` colours the item with the danger palette. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Icon as={CheckIcon} className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio indicator; use inside `ContextMenuRadioGroup`. */\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Icon as={CircleIcon} className=\"size-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that labels a group of items. */\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A horizontal divider between groups of items. */\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned text for a keyboard shortcut hint inside an item. */\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;AAQA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;;AAGA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;;AAGA,SAAS,iBAAiB,EAAE,GAAG,SAAkE;CAC/F,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,OAAtB;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAmE;CACjG,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;;AAGA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC3F,OAAO,iB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AAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { a as ContextMenuItem, c as ContextMenuRadioGroup, d as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuTrigger, i as ContextMenuGroup, l as ContextMenuRadioItem, m as ContextMenuSubTrigger, n as ContextMenuCheckboxItem, o as ContextMenuLabel, p as ContextMenuSubContent, r as ContextMenuContent, s as ContextMenuPortal, t as ContextMenu, u as ContextMenuSeparator } from "../../index20.cjs";
1
+ import { a as ContextMenuItem, c as ContextMenuRadioGroup, d as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuTrigger, i as ContextMenuGroup, l as ContextMenuRadioItem, m as ContextMenuSubTrigger, n as ContextMenuCheckboxItem, o as ContextMenuLabel, p as ContextMenuSubContent, r as ContextMenuContent, s as ContextMenuPortal, t as ContextMenu, u as ContextMenuSeparator } from "../../index21.cjs";
2
2
  export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -1,2 +1,2 @@
1
- import { a as ContextMenuItem, c as ContextMenuRadioGroup, d as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuTrigger, i as ContextMenuGroup, l as ContextMenuRadioItem, m as ContextMenuSubTrigger, n as ContextMenuCheckboxItem, o as ContextMenuLabel, p as ContextMenuSubContent, r as ContextMenuContent, s as ContextMenuPortal, t as ContextMenu, u as ContextMenuSeparator } from "../../index20.js";
1
+ import { a as ContextMenuItem, c as ContextMenuRadioGroup, d as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuTrigger, i as ContextMenuGroup, l as ContextMenuRadioItem, m as ContextMenuSubTrigger, n as ContextMenuCheckboxItem, o as ContextMenuLabel, p as ContextMenuSubContent, r as ContextMenuContent, s as ContextMenuPortal, t as ContextMenu, u as ContextMenuSeparator } from "../../index21.js";
2
2
  export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -1,7 +1,8 @@
1
1
  import { t as cn } from "../../cn.js";
2
+ import { t as Icon } from "../../Icon.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
2
4
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
3
5
  import { ContextMenu as ContextMenu$1 } from "radix-ui";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
6
  //#region src/primitives/ContextMenu/ContextMenu.tsx
6
7
  /** Root provider for a right-click context menu; wires the trigger to its portalled content. */
7
8
  function ContextMenu({ ...props }) {
@@ -52,7 +53,10 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
52
53
  "data-inset": inset,
53
54
  className: cn("flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt", className),
54
55
  ...props,
55
- children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
56
+ children: [children, /* @__PURE__ */ jsx(Icon, {
57
+ as: ChevronRightIcon,
58
+ className: "ml-auto size-4"
59
+ })]
56
60
  });
57
61
  }
58
62
  /** The popover surface for a nested submenu. */
@@ -90,7 +94,10 @@ function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
90
94
  ...props,
91
95
  children: [/* @__PURE__ */ jsx("span", {
92
96
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
93
- children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
97
+ children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
98
+ as: CheckIcon,
99
+ className: "size-4"
100
+ }) })
94
101
  }), children]
95
102
  });
96
103
  }
@@ -102,7 +109,10 @@ function ContextMenuRadioItem({ className, children, ...props }) {
102
109
  ...props,
103
110
  children: [/* @__PURE__ */ jsx("span", {
104
111
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
105
- children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
112
+ children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
113
+ as: CircleIcon,
114
+ className: "size-2 fill-current"
115
+ }) })
106
116
  }), children]
107
117
  });
108
118
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ContextMenuPrimitive"],"sources":["../../../src/primitives/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a right-click context menu; wires the trigger to its portalled content. */\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/** The target region that opens the menu on right-click (context menu). */\nfunction ContextMenuTrigger({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/** Groups related items together for labelling and accessibility. */\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/** Portals the menu content into the document body. */\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\n/** Wraps a nested submenu (pair with `ContextMenuSubTrigger` and `ContextMenuSubContent`). */\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/** Groups `ContextMenuRadioItem`s into a single-select set. */\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/** Item that opens a nested submenu; renders a trailing chevron. */\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/** The popover surface for a nested submenu. */\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The portalled popover surface that holds the menu items. */\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/** A selectable menu item; supports a `destructive` variant and `inset` alignment. */\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n /** Visual intent; `destructive` colours the item with the danger palette. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio indicator; use inside `ContextMenuRadioGroup`. */\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that labels a group of items. */\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A horizontal divider between groups of items. */\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned text for a keyboard shortcut hint inside an item. */\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;AAOA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;;AAGA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;;AAGA,SAAS,iBAAiB,EAAE,GAAG,SAAkE;CAC/F,OAAO,oBAACA,cAAqB,OAAtB;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAmE;CACjG,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;;AAGA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC3F,OAAO,oBAACA,cAAqB,KAAtB;EAA0B,aAAU;EAAmB,GAAI;CAAQ,CAA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ACA,UACA,GAAG,SAC2D;CAC9D,OACE,qBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GACT,6SACA,SACF;EACA,GAAI;YANN,CAQE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,cAAqB,eAAtB,EAAA,UACE,oBAAC,YAAD,EAAY,WAAU,sBAAuB,CAAA,EACX,CAAA;EAChC,CAAA,GACL,QAC6B;;AAEpC;;AAGA,SAAS,iBAAiB,EACxB,WACA,OACA,GAAG,SAIF;CACD,OACE,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GACT,8EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["ContextMenuPrimitive"],"sources":["../../../src/primitives/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a right-click context menu; wires the trigger to its portalled content. */\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/** The target region that opens the menu on right-click (context menu). */\nfunction ContextMenuTrigger({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/** Groups related items together for labelling and accessibility. */\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/** Portals the menu content into the document body. */\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\n/** Wraps a nested submenu (pair with `ContextMenuSubTrigger` and `ContextMenuSubContent`). */\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/** Groups `ContextMenuRadioItem`s into a single-select set. */\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/** Item that opens a nested submenu; renders a trailing chevron. */\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt\",\n className,\n )}\n {...props}\n >\n {children}\n <Icon as={ChevronRightIcon} className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/** The popover surface for a nested submenu. */\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The portalled popover surface that holds the menu items. */\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm data-[side=bottom]:slide-in-from-top-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=context-menu-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/** A selectable menu item; supports a `destructive` variant and `inset` alignment. */\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n /** Visual intent; `destructive` colours the item with the danger palette. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Icon as={CheckIcon} className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio indicator; use inside `ContextMenuRadioGroup`. */\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Icon as={CircleIcon} className=\"size-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that labels a group of items. */\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n /** Adds left padding so the label aligns with items that have a leading icon. */\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A horizontal divider between groups of items. */\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned text for a keyboard shortcut hint inside an item. */\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;AAQA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;;AAGA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;;AAGA,SAAS,iBAAiB,EAAE,GAAG,SAAkE;CAC/F,OAAO,oBAACA,cAAqB,OAAtB;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAmE;CACjG,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;;AAGA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC3F,OAAO,oBAACA,cAAqB,KAAtB;EAA0B,aAAU;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L,QACgC;;AAEvC;;AAGA,SAAS,qBAAqB,EAC5B,WACA,UACA,GAAG,SAC2D;CAC9D,OACE,qBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GACT,6SACA,SACF;EACA,GAAI;YANN,CAQE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,cAAqB,eAAtB,EAAA,UACE,oBAAC,MAAD;IAAM,IAAI;IAAY,WAAU;GAAuB,CAAA,EACrB,CAAA;EAChC,CAAA,GACL,QAC6B;;AAEpC;;AAGA,SAAS,iBAAiB,EACxB,WACA,OACA,GAAG,SAIF;CACD,OACE,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GACT,8EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL"}
@@ -1,9 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_cn = require("../../cn.cjs");
3
- let lucide_react = require("lucide-react");
3
+ const require_Icon = require("../../Icon.cjs");
4
+ let class_variance_authority = require("class-variance-authority");
4
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let lucide_react = require("lucide-react");
5
7
  //#region src/primitives/Credits/Credits.tsx
6
- const creditsVariants = (0, require("class-variance-authority").cva)("inline-flex w-fit items-center gap-1 rounded-8 px-2 py-0.5 text-xs leading-4 font-semibold tabular-nums whitespace-nowrap [&>svg]:size-3 [&>svg]:shrink-0", {
8
+ const creditsVariants = (0, class_variance_authority.cva)("inline-flex w-fit items-center gap-1 rounded-8 px-2 py-0.5 text-xs leading-4 font-semibold tabular-nums whitespace-nowrap [&>svg]:size-3 [&>svg]:shrink-0", {
7
9
  variants: { variant: {
8
10
  default: "border border-primary-border bg-outline-bg text-primary-txt",
9
11
  warning: "border border-transparent bg-warning-bg text-warning-txt",
@@ -29,7 +31,10 @@ function Credits({ className, value, variant, lowThreshold = 200, icon, format =
29
31
  "data-variant": resolved,
30
32
  className: require_cn.cn(creditsVariants({ variant: resolved }), className),
31
33
  ...props,
32
- children: [icon ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CirclePlus, { "aria-hidden": "true" }), format(value)]
34
+ children: [icon ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
35
+ as: lucide_react.CirclePlus,
36
+ "aria-hidden": "true"
37
+ }), format(value)]
33
38
  });
34
39
  }
35
40
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cn","CirclePlus"],"sources":["../../../src/primitives/Credits/Credits.tsx"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport { CirclePlus } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Credits — a pill showing a remaining-credits balance. Badge-like, but its own\n// primitive: the colour escalates with how low the balance is (Figma): neutral\n// when healthy, soft amber when low, soft red at zero. The variant is derived\n// from `value` (override with `variant`), and the value is formatted for display.\n\nexport type CreditsVariant = \"default\" | \"warning\" | \"critical\";\n\nconst creditsVariants = cva(\n \"inline-flex w-fit items-center gap-1 rounded-8 px-2 py-0.5 text-xs leading-4 font-semibold tabular-nums whitespace-nowrap [&>svg]:size-3 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"border border-primary-border bg-outline-bg text-primary-txt\",\n warning: \"border border-transparent bg-warning-bg text-warning-txt\",\n critical: \"border border-transparent bg-danger-bg text-danger-txt\",\n },\n },\n defaultVariants: { variant: \"default\" },\n },\n);\n\n/** Escalate the variant as the balance drops. */\nfunction resolveVariant(value: number, lowThreshold: number): CreditsVariant {\n if (value <= 0) return \"critical\";\n if (value <= lowThreshold) return \"warning\";\n return \"default\";\n}\n\n/** Whole-number, thousands-separated (e.g. 9995.79 → \"9,995\"). */\nfunction formatCredits(value: number): string {\n return Math.floor(value).toLocaleString();\n}\n\ntype CreditsProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** The numeric balance to display. */\n value: number;\n /** Force a variant; by default it is derived from `value`. */\n variant?: CreditsVariant;\n /** Balance at/below which the warning variant kicks in. Default 200. */\n lowThreshold?: number;\n /** Override the leading icon. */\n icon?: React.ReactNode;\n /** Override how the value is rendered. */\n format?: (value: number) => string;\n};\n\n/** A pill showing a remaining-credits balance, colour-escalating as it drops. */\nfunction Credits({\n className,\n value,\n variant,\n lowThreshold = 200,\n icon,\n format = formatCredits,\n ...props\n}: CreditsProps) {\n const resolved = variant ?? resolveVariant(value, lowThreshold);\n return (\n <span\n data-slot=\"credits\"\n data-variant={resolved}\n className={cn(creditsVariants({ variant: resolved }), className)}\n {...props}\n >\n {icon ?? <CirclePlus aria-hidden=\"true\" />}\n {format(value)}\n </span>\n );\n}\n\nexport { Credits, creditsVariants, type CreditsProps };\n"],"mappings":";;;;;AAaA,MAAM,mBAAA,qCAAA,EAAA,KACJ,6JACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,UAAU;CACZ,EACF;CACA,iBAAiB,EAAE,SAAS,UAAU;AACxC,CACF;;AAGA,SAAS,eAAe,OAAe,cAAsC;CAC3E,IAAI,SAAS,GAAG,OAAO;CACvB,IAAI,SAAS,cAAc,OAAO;CAClC,OAAO;AACT;;AAGA,SAAS,cAAc,OAAuB;CAC5C,OAAO,KAAK,MAAM,KAAK,EAAE,eAAe;AAC1C;;AAgBA,SAAS,QAAQ,EACf,WACA,OACA,SACA,eAAe,KACf,MACA,SAAS,eACT,GAAG,SACY;CACf,MAAM,WAAW,WAAW,eAAe,OAAO,YAAY;CAC9D,OACE,iBAAA,GAAA,kBAAA,MAAC,QAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAWA,WAAAA,GAAG,gBAAgB,EAAE,SAAS,SAAS,CAAC,GAAG,SAAS;EAC/D,GAAI;YAJN,CAMG,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,YAAD,EAAY,eAAY,OAAQ,CAAA,GACxC,OAAO,KAAK,CACT;;AAEV"}
1
+ {"version":3,"file":"index.cjs","names":["cn","Icon","CirclePlus"],"sources":["../../../src/primitives/Credits/Credits.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { cva } from \"class-variance-authority\";\nimport { CirclePlus } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Credits — a pill showing a remaining-credits balance. Badge-like, but its own\n// primitive: the colour escalates with how low the balance is (Figma): neutral\n// when healthy, soft amber when low, soft red at zero. The variant is derived\n// from `value` (override with `variant`), and the value is formatted for display.\n\nexport type CreditsVariant = \"default\" | \"warning\" | \"critical\";\n\nconst creditsVariants = cva(\n \"inline-flex w-fit items-center gap-1 rounded-8 px-2 py-0.5 text-xs leading-4 font-semibold tabular-nums whitespace-nowrap [&>svg]:size-3 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"border border-primary-border bg-outline-bg text-primary-txt\",\n warning: \"border border-transparent bg-warning-bg text-warning-txt\",\n critical: \"border border-transparent bg-danger-bg text-danger-txt\",\n },\n },\n defaultVariants: { variant: \"default\" },\n },\n);\n\n/** Escalate the variant as the balance drops. */\nfunction resolveVariant(value: number, lowThreshold: number): CreditsVariant {\n if (value <= 0) return \"critical\";\n if (value <= lowThreshold) return \"warning\";\n return \"default\";\n}\n\n/** Whole-number, thousands-separated (e.g. 9995.79 → \"9,995\"). */\nfunction formatCredits(value: number): string {\n return Math.floor(value).toLocaleString();\n}\n\ntype CreditsProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** The numeric balance to display. */\n value: number;\n /** Force a variant; by default it is derived from `value`. */\n variant?: CreditsVariant;\n /** Balance at/below which the warning variant kicks in. Default 200. */\n lowThreshold?: number;\n /** Override the leading icon. */\n icon?: React.ReactNode;\n /** Override how the value is rendered. */\n format?: (value: number) => string;\n};\n\n/** A pill showing a remaining-credits balance, colour-escalating as it drops. */\nfunction Credits({\n className,\n value,\n variant,\n lowThreshold = 200,\n icon,\n format = formatCredits,\n ...props\n}: CreditsProps) {\n const resolved = variant ?? resolveVariant(value, lowThreshold);\n return (\n <span\n data-slot=\"credits\"\n data-variant={resolved}\n className={cn(creditsVariants({ variant: resolved }), className)}\n {...props}\n >\n {icon ?? <Icon as={CirclePlus} aria-hidden=\"true\" />}\n {format(value)}\n </span>\n );\n}\n\nexport { Credits, creditsVariants, type CreditsProps };\n"],"mappings":";;;;;;;AAcA,MAAM,mBAAA,GAAA,yBAAA,KACJ,6JACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,UAAU;CACZ,EACF;CACA,iBAAiB,EAAE,SAAS,UAAU;AACxC,CACF;;AAGA,SAAS,eAAe,OAAe,cAAsC;CAC3E,IAAI,SAAS,GAAG,OAAO;CACvB,IAAI,SAAS,cAAc,OAAO;CAClC,OAAO;AACT;;AAGA,SAAS,cAAc,OAAuB;CAC5C,OAAO,KAAK,MAAM,KAAK,EAAE,eAAe;AAC1C;;AAgBA,SAAS,QAAQ,EACf,WACA,OACA,SACA,eAAe,KACf,MACA,SAAS,eACT,GAAG,SACY;CACf,MAAM,WAAW,WAAW,eAAe,OAAO,YAAY;CAC9D,OACE,iBAAA,GAAA,kBAAA,MAAC,QAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAWA,WAAAA,GAAG,gBAAgB,EAAE,SAAS,SAAS,CAAC,GAAG,SAAS;EAC/D,GAAI;YAJN,CAMG,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;GAAM,IAAIC,aAAAA;GAAY,eAAY;EAAQ,CAAA,GAClD,OAAO,KAAK,CACT;;AAEV"}