@psnext/design-system 1.2.0 → 1.3.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 (442) hide show
  1. package/dist/Header.cjs +2 -2
  2. package/dist/Header.cjs.map +1 -1
  3. package/dist/Header.js +2 -2
  4. package/dist/Header.js.map +1 -1
  5. package/dist/Icon.cjs +8 -8
  6. package/dist/Icon.cjs.map +1 -1
  7. package/dist/Icon.js +8 -8
  8. package/dist/Icon.js.map +1 -1
  9. package/dist/Logo.cjs +163 -137
  10. package/dist/Logo.cjs.map +1 -1
  11. package/dist/Logo.js +163 -137
  12. package/dist/Logo.js.map +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.cts +5 -5
  15. package/dist/index.d.cts.map +1 -1
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index10.d.cts +6 -6
  20. package/dist/index10.d.cts.map +1 -1
  21. package/dist/index10.d.ts +7 -7
  22. package/dist/index10.d.ts.map +1 -1
  23. package/dist/index11.d.cts +3 -3
  24. package/dist/index11.d.ts +3 -3
  25. package/dist/index11.d.ts.map +1 -1
  26. package/dist/index12.d.cts +12 -12
  27. package/dist/index12.d.ts +12 -12
  28. package/dist/index12.d.ts.map +1 -1
  29. package/dist/index13.d.cts +6 -6
  30. package/dist/index13.d.ts +6 -6
  31. package/dist/index13.d.ts.map +1 -1
  32. package/dist/index14.d.cts +5 -5
  33. package/dist/index14.d.ts +5 -5
  34. package/dist/index15.d.cts +3 -3
  35. package/dist/index15.d.ts +3 -3
  36. package/dist/index15.d.ts.map +1 -1
  37. package/dist/index16.d.cts +2 -2
  38. package/dist/index16.d.ts +2 -2
  39. package/dist/index16.d.ts.map +1 -1
  40. package/dist/index17.d.ts +4 -4
  41. package/dist/index17.d.ts.map +1 -1
  42. package/dist/index18.d.cts +11 -11
  43. package/dist/index18.d.cts.map +1 -1
  44. package/dist/index18.d.ts +11 -11
  45. package/dist/index18.d.ts.map +1 -1
  46. package/dist/index19.d.cts +10 -10
  47. package/dist/index19.d.ts +10 -10
  48. package/dist/index19.d.ts.map +1 -1
  49. package/dist/index2.d.cts +8 -8
  50. package/dist/index2.d.cts.map +1 -1
  51. package/dist/index2.d.ts +8 -8
  52. package/dist/index2.d.ts.map +1 -1
  53. package/dist/index20.d.cts +16 -16
  54. package/dist/index20.d.cts.map +1 -1
  55. package/dist/index20.d.ts +16 -16
  56. package/dist/index21.d.cts +4 -4
  57. package/dist/index21.d.ts +4 -4
  58. package/dist/index21.d.ts.map +1 -1
  59. package/dist/index22.d.cts +11 -11
  60. package/dist/index22.d.ts +11 -11
  61. package/dist/index22.d.ts.map +1 -1
  62. package/dist/index23.d.cts +16 -16
  63. package/dist/index23.d.ts +16 -16
  64. package/dist/index24.d.cts +7 -7
  65. package/dist/index24.d.cts.map +1 -1
  66. package/dist/index24.d.ts +10 -10
  67. package/dist/index25.d.cts +2 -2
  68. package/dist/index25.d.ts +2 -2
  69. package/dist/index25.d.ts.map +1 -1
  70. package/dist/index26.d.cts +13 -13
  71. package/dist/index26.d.cts.map +1 -1
  72. package/dist/index26.d.ts +14 -14
  73. package/dist/index26.d.ts.map +1 -1
  74. package/dist/index27.d.cts +7 -7
  75. package/dist/index27.d.ts +7 -7
  76. package/dist/index28.d.cts +5 -5
  77. package/dist/index28.d.cts.map +1 -1
  78. package/dist/index28.d.ts +5 -5
  79. package/dist/index29.d.cts +4 -4
  80. package/dist/index29.d.cts.map +1 -1
  81. package/dist/index29.d.ts +4 -4
  82. package/dist/index29.d.ts.map +1 -1
  83. package/dist/index3.d.cts +13 -13
  84. package/dist/index3.d.cts.map +1 -1
  85. package/dist/index3.d.ts +13 -13
  86. package/dist/index3.d.ts.map +1 -1
  87. package/dist/index30.d.cts +5 -5
  88. package/dist/index30.d.cts.map +1 -1
  89. package/dist/index30.d.ts +6 -6
  90. package/dist/index30.d.ts.map +1 -1
  91. package/dist/index31.d.cts +2 -2
  92. package/dist/index31.d.ts +3 -3
  93. package/dist/index32.d.cts +6 -6
  94. package/dist/index32.d.cts.map +1 -1
  95. package/dist/index32.d.ts +6 -6
  96. package/dist/index32.d.ts.map +1 -1
  97. package/dist/index33.d.cts +10 -10
  98. package/dist/index33.d.cts.map +1 -1
  99. package/dist/index33.d.ts +11 -11
  100. package/dist/index33.d.ts.map +1 -1
  101. package/dist/index34.d.cts +5 -5
  102. package/dist/index34.d.ts +5 -5
  103. package/dist/index35.d.cts +17 -17
  104. package/dist/index35.d.cts.map +1 -1
  105. package/dist/index35.d.ts +15 -15
  106. package/dist/index35.d.ts.map +1 -1
  107. package/dist/index36.d.cts +3 -3
  108. package/dist/index36.d.cts.map +1 -1
  109. package/dist/index36.d.ts +3 -3
  110. package/dist/index36.d.ts.map +1 -1
  111. package/dist/index37.d.cts +4 -4
  112. package/dist/index37.d.ts +5 -5
  113. package/dist/index38.d.cts +2 -2
  114. package/dist/index38.d.ts +2 -2
  115. package/dist/index39.d.cts +17 -17
  116. package/dist/index39.d.ts +17 -17
  117. package/dist/index4.d.cts +2 -2
  118. package/dist/index4.d.ts +2 -2
  119. package/dist/index4.d.ts.map +1 -1
  120. package/dist/index40.d.cts +5 -5
  121. package/dist/index40.d.cts.map +1 -1
  122. package/dist/index40.d.ts +5 -5
  123. package/dist/index40.d.ts.map +1 -1
  124. package/dist/index41.d.cts +11 -11
  125. package/dist/index41.d.cts.map +1 -1
  126. package/dist/index41.d.ts +11 -11
  127. package/dist/index42.d.cts +8 -8
  128. package/dist/index42.d.cts.map +1 -1
  129. package/dist/index42.d.ts +8 -8
  130. package/dist/index42.d.ts.map +1 -1
  131. package/dist/index43.d.cts +9 -9
  132. package/dist/index43.d.cts.map +1 -1
  133. package/dist/index43.d.ts +9 -9
  134. package/dist/index44.d.cts +8 -8
  135. package/dist/index44.d.ts +8 -8
  136. package/dist/index44.d.ts.map +1 -1
  137. package/dist/index45.d.cts +2 -2
  138. package/dist/index45.d.cts.map +1 -1
  139. package/dist/index45.d.ts +2 -2
  140. package/dist/index45.d.ts.map +1 -1
  141. package/dist/index46.d.cts +4 -4
  142. package/dist/index46.d.ts +4 -4
  143. package/dist/index46.d.ts.map +1 -1
  144. package/dist/index47.d.cts +4 -4
  145. package/dist/index47.d.cts.map +1 -1
  146. package/dist/index47.d.ts +4 -4
  147. package/dist/index47.d.ts.map +1 -1
  148. package/dist/index48.d.cts +3 -3
  149. package/dist/index48.d.cts.map +1 -1
  150. package/dist/index48.d.ts +3 -3
  151. package/dist/index48.d.ts.map +1 -1
  152. package/dist/index49.d.cts +11 -11
  153. package/dist/index49.d.cts.map +1 -1
  154. package/dist/index49.d.ts +11 -11
  155. package/dist/index49.d.ts.map +1 -1
  156. package/dist/index5.d.cts +7 -7
  157. package/dist/index5.d.cts.map +1 -1
  158. package/dist/index5.d.ts +7 -7
  159. package/dist/index5.d.ts.map +1 -1
  160. package/dist/index50.d.cts +9 -9
  161. package/dist/index50.d.ts +9 -9
  162. package/dist/index50.d.ts.map +1 -1
  163. package/dist/index51.d.cts +5 -5
  164. package/dist/index51.d.ts +5 -5
  165. package/dist/index51.d.ts.map +1 -1
  166. package/dist/index52.d.cts +27 -27
  167. package/dist/index52.d.cts.map +1 -1
  168. package/dist/index52.d.ts +25 -25
  169. package/dist/index52.d.ts.map +1 -1
  170. package/dist/index53.d.cts +5 -5
  171. package/dist/index53.d.ts +5 -5
  172. package/dist/index54.d.cts +2 -2
  173. package/dist/index54.d.ts +2 -2
  174. package/dist/index54.d.ts.map +1 -1
  175. package/dist/index55.d.cts +2 -2
  176. package/dist/index55.d.cts.map +1 -1
  177. package/dist/index55.d.ts +2 -2
  178. package/dist/index55.d.ts.map +1 -1
  179. package/dist/index56.d.cts +2 -2
  180. package/dist/index56.d.ts +2 -2
  181. package/dist/index56.d.ts.map +1 -1
  182. package/dist/index57.d.cts +4 -4
  183. package/dist/index57.d.ts +4 -4
  184. package/dist/index57.d.ts.map +1 -1
  185. package/dist/index58.d.cts +9 -9
  186. package/dist/index58.d.ts +9 -9
  187. package/dist/index58.d.ts.map +1 -1
  188. package/dist/index59.d.cts +9 -9
  189. package/dist/index59.d.ts +13 -13
  190. package/dist/index59.d.ts.map +1 -1
  191. package/dist/index6.d.cts +5 -5
  192. package/dist/index6.d.cts.map +1 -1
  193. package/dist/index6.d.ts +5 -5
  194. package/dist/index6.d.ts.map +1 -1
  195. package/dist/index60.d.cts +6 -6
  196. package/dist/index60.d.cts.map +1 -1
  197. package/dist/index60.d.ts +7 -7
  198. package/dist/index60.d.ts.map +1 -1
  199. package/dist/index61.d.cts +4 -4
  200. package/dist/index61.d.cts.map +1 -1
  201. package/dist/index61.d.ts +4 -4
  202. package/dist/index61.d.ts.map +1 -1
  203. package/dist/index62.d.cts +2 -2
  204. package/dist/index62.d.cts.map +1 -1
  205. package/dist/index62.d.ts +2 -2
  206. package/dist/index62.d.ts.map +1 -1
  207. package/dist/index63.d.cts +5 -5
  208. package/dist/index63.d.ts +3 -3
  209. package/dist/index64.d.cts +3 -3
  210. package/dist/index64.d.ts +3 -3
  211. package/dist/index64.d.ts.map +1 -1
  212. package/dist/index65.d.cts +4 -4
  213. package/dist/index65.d.cts.map +1 -1
  214. package/dist/index65.d.ts +4 -4
  215. package/dist/index65.d.ts.map +1 -1
  216. package/dist/index66.d.cts +2 -2
  217. package/dist/index66.d.ts +2 -2
  218. package/dist/index66.d.ts.map +1 -1
  219. package/dist/index67.d.cts +7 -7
  220. package/dist/index67.d.cts.map +1 -1
  221. package/dist/index67.d.ts +8 -8
  222. package/dist/index67.d.ts.map +1 -1
  223. package/dist/index68.d.cts +7 -7
  224. package/dist/index68.d.ts +7 -7
  225. package/dist/index68.d.ts.map +1 -1
  226. package/dist/index7.d.cts +8 -8
  227. package/dist/index7.d.cts.map +1 -1
  228. package/dist/index7.d.ts +8 -8
  229. package/dist/index7.d.ts.map +1 -1
  230. package/dist/index70.d.cts +8 -8
  231. package/dist/index70.d.ts +8 -8
  232. package/dist/index8.d.cts +4 -4
  233. package/dist/index8.d.ts +4 -4
  234. package/dist/index8.d.ts.map +1 -1
  235. package/dist/index9.d.cts +2 -2
  236. package/dist/index9.d.cts.map +1 -1
  237. package/dist/index9.d.ts +2 -2
  238. package/dist/index9.d.ts.map +1 -1
  239. package/dist/layouts/Container/index.cjs +1 -1
  240. package/dist/layouts/Container/index.cjs.map +1 -1
  241. package/dist/layouts/Container/index.js +1 -1
  242. package/dist/layouts/Container/index.js.map +1 -1
  243. package/dist/layouts/PageBackground/index.cjs +1 -1
  244. package/dist/layouts/PageBackground/index.cjs.map +1 -1
  245. package/dist/layouts/PageBackground/index.js +1 -1
  246. package/dist/layouts/PageBackground/index.js.map +1 -1
  247. package/dist/patterns/DataTable/index.d.cts +3 -3
  248. package/dist/patterns/DataTable/index.d.ts +3 -3
  249. package/dist/patterns/Footer/index.cjs +1 -1
  250. package/dist/patterns/Footer/index.cjs.map +1 -1
  251. package/dist/patterns/Footer/index.d.cts +8 -8
  252. package/dist/patterns/Footer/index.d.cts.map +1 -1
  253. package/dist/patterns/Footer/index.d.ts +8 -8
  254. package/dist/patterns/Footer/index.d.ts.map +1 -1
  255. package/dist/patterns/Footer/index.js +1 -1
  256. package/dist/patterns/Footer/index.js.map +1 -1
  257. package/dist/patterns/MediaObject/index.d.cts +11 -11
  258. package/dist/patterns/MediaObject/index.d.ts +13 -13
  259. package/dist/patterns/MediaObject/index.d.ts.map +1 -1
  260. package/dist/patterns/SectionCard/index.d.cts +2 -2
  261. package/dist/patterns/SectionCard/index.d.ts +2 -2
  262. package/dist/patterns/SectionCard/index.d.ts.map +1 -1
  263. package/dist/patterns/SectionHeading/index.d.cts +2 -2
  264. package/dist/patterns/SectionHeading/index.d.ts +2 -2
  265. package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
  266. package/dist/primitives/Accordion/index.cjs +1 -1
  267. package/dist/primitives/Accordion/index.cjs.map +1 -1
  268. package/dist/primitives/Accordion/index.js +1 -1
  269. package/dist/primitives/Accordion/index.js.map +1 -1
  270. package/dist/primitives/Alert/index.cjs +2 -2
  271. package/dist/primitives/Alert/index.cjs.map +1 -1
  272. package/dist/primitives/Alert/index.js +2 -2
  273. package/dist/primitives/Alert/index.js.map +1 -1
  274. package/dist/primitives/AlertDialog/index.cjs +2 -2
  275. package/dist/primitives/AlertDialog/index.cjs.map +1 -1
  276. package/dist/primitives/AlertDialog/index.js +2 -2
  277. package/dist/primitives/AlertDialog/index.js.map +1 -1
  278. package/dist/primitives/Avatar/index.cjs +2 -2
  279. package/dist/primitives/Avatar/index.cjs.map +1 -1
  280. package/dist/primitives/Avatar/index.js +2 -2
  281. package/dist/primitives/Avatar/index.js.map +1 -1
  282. package/dist/primitives/Badge/index.cjs +4 -4
  283. package/dist/primitives/Badge/index.cjs.map +1 -1
  284. package/dist/primitives/Badge/index.js +4 -4
  285. package/dist/primitives/Badge/index.js.map +1 -1
  286. package/dist/primitives/Button/index.cjs +5 -5
  287. package/dist/primitives/Button/index.cjs.map +1 -1
  288. package/dist/primitives/Button/index.js +5 -5
  289. package/dist/primitives/Button/index.js.map +1 -1
  290. package/dist/primitives/ButtonGroup/index.cjs +2 -2
  291. package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
  292. package/dist/primitives/ButtonGroup/index.js +2 -2
  293. package/dist/primitives/ButtonGroup/index.js.map +1 -1
  294. package/dist/primitives/Calendar/index.cjs +1 -1
  295. package/dist/primitives/Calendar/index.cjs.map +1 -1
  296. package/dist/primitives/Calendar/index.js +1 -1
  297. package/dist/primitives/Calendar/index.js.map +1 -1
  298. package/dist/primitives/Card/index.cjs +4 -4
  299. package/dist/primitives/Card/index.cjs.map +1 -1
  300. package/dist/primitives/Card/index.js +4 -4
  301. package/dist/primitives/Card/index.js.map +1 -1
  302. package/dist/primitives/Chart/index.cjs +1 -1
  303. package/dist/primitives/Chart/index.cjs.map +1 -1
  304. package/dist/primitives/Chart/index.js +1 -1
  305. package/dist/primitives/Chart/index.js.map +1 -1
  306. package/dist/primitives/Checkbox/index.cjs +1 -1
  307. package/dist/primitives/Checkbox/index.cjs.map +1 -1
  308. package/dist/primitives/Checkbox/index.js +1 -1
  309. package/dist/primitives/Checkbox/index.js.map +1 -1
  310. package/dist/primitives/Command/index.cjs +1 -1
  311. package/dist/primitives/Command/index.cjs.map +1 -1
  312. package/dist/primitives/Command/index.js +1 -1
  313. package/dist/primitives/Command/index.js.map +1 -1
  314. package/dist/primitives/ContextMenu/index.cjs +1 -1
  315. package/dist/primitives/ContextMenu/index.cjs.map +1 -1
  316. package/dist/primitives/ContextMenu/index.js +1 -1
  317. package/dist/primitives/ContextMenu/index.js.map +1 -1
  318. package/dist/primitives/Credits/index.cjs +1 -1
  319. package/dist/primitives/Credits/index.cjs.map +1 -1
  320. package/dist/primitives/Credits/index.js +1 -1
  321. package/dist/primitives/Credits/index.js.map +1 -1
  322. package/dist/primitives/Dialog/index.cjs +2 -2
  323. package/dist/primitives/Dialog/index.cjs.map +1 -1
  324. package/dist/primitives/Dialog/index.js +2 -2
  325. package/dist/primitives/Dialog/index.js.map +1 -1
  326. package/dist/primitives/Drawer/index.cjs +1 -1
  327. package/dist/primitives/Drawer/index.cjs.map +1 -1
  328. package/dist/primitives/Drawer/index.js +1 -1
  329. package/dist/primitives/Drawer/index.js.map +1 -1
  330. package/dist/primitives/DropdownMenu/index.cjs +1 -1
  331. package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
  332. package/dist/primitives/DropdownMenu/index.js +1 -1
  333. package/dist/primitives/DropdownMenu/index.js.map +1 -1
  334. package/dist/primitives/Field/index.cjs +1 -1
  335. package/dist/primitives/Field/index.cjs.map +1 -1
  336. package/dist/primitives/Field/index.js +1 -1
  337. package/dist/primitives/Field/index.js.map +1 -1
  338. package/dist/primitives/HoverCard/index.cjs +1 -1
  339. package/dist/primitives/HoverCard/index.cjs.map +1 -1
  340. package/dist/primitives/HoverCard/index.js +1 -1
  341. package/dist/primitives/HoverCard/index.js.map +1 -1
  342. package/dist/primitives/Input/index.cjs +4 -4
  343. package/dist/primitives/Input/index.cjs.map +1 -1
  344. package/dist/primitives/Input/index.js +4 -4
  345. package/dist/primitives/Input/index.js.map +1 -1
  346. package/dist/primitives/InputGroup/index.cjs +6 -6
  347. package/dist/primitives/InputGroup/index.cjs.map +1 -1
  348. package/dist/primitives/InputGroup/index.js +6 -6
  349. package/dist/primitives/InputGroup/index.js.map +1 -1
  350. package/dist/primitives/InputOtp/index.cjs +1 -1
  351. package/dist/primitives/InputOtp/index.cjs.map +1 -1
  352. package/dist/primitives/InputOtp/index.js +1 -1
  353. package/dist/primitives/InputOtp/index.js.map +1 -1
  354. package/dist/primitives/Item/index.cjs +2 -2
  355. package/dist/primitives/Item/index.cjs.map +1 -1
  356. package/dist/primitives/Item/index.js +2 -2
  357. package/dist/primitives/Item/index.js.map +1 -1
  358. package/dist/primitives/Kbd/index.cjs +1 -1
  359. package/dist/primitives/Kbd/index.cjs.map +1 -1
  360. package/dist/primitives/Kbd/index.js +1 -1
  361. package/dist/primitives/Kbd/index.js.map +1 -1
  362. package/dist/primitives/Menubar/index.cjs +1 -1
  363. package/dist/primitives/Menubar/index.cjs.map +1 -1
  364. package/dist/primitives/Menubar/index.js +1 -1
  365. package/dist/primitives/Menubar/index.js.map +1 -1
  366. package/dist/primitives/NativeSelect/index.cjs +1 -1
  367. package/dist/primitives/NativeSelect/index.cjs.map +1 -1
  368. package/dist/primitives/NativeSelect/index.js +1 -1
  369. package/dist/primitives/NativeSelect/index.js.map +1 -1
  370. package/dist/primitives/NavRail/index.cjs +2 -2
  371. package/dist/primitives/NavRail/index.cjs.map +1 -1
  372. package/dist/primitives/NavRail/index.js +2 -2
  373. package/dist/primitives/NavRail/index.js.map +1 -1
  374. package/dist/primitives/NavigationMenu/index.cjs +1 -1
  375. package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
  376. package/dist/primitives/NavigationMenu/index.js +1 -1
  377. package/dist/primitives/NavigationMenu/index.js.map +1 -1
  378. package/dist/primitives/Popover/index.cjs +1 -1
  379. package/dist/primitives/Popover/index.cjs.map +1 -1
  380. package/dist/primitives/Popover/index.js +1 -1
  381. package/dist/primitives/Popover/index.js.map +1 -1
  382. package/dist/primitives/Progress/index.cjs +1 -1
  383. package/dist/primitives/Progress/index.cjs.map +1 -1
  384. package/dist/primitives/Progress/index.js +1 -1
  385. package/dist/primitives/Progress/index.js.map +1 -1
  386. package/dist/primitives/RadioGroup/index.cjs +1 -1
  387. package/dist/primitives/RadioGroup/index.cjs.map +1 -1
  388. package/dist/primitives/RadioGroup/index.js +1 -1
  389. package/dist/primitives/RadioGroup/index.js.map +1 -1
  390. package/dist/primitives/ScrollArea/index.cjs +1 -1
  391. package/dist/primitives/ScrollArea/index.cjs.map +1 -1
  392. package/dist/primitives/ScrollArea/index.js +1 -1
  393. package/dist/primitives/ScrollArea/index.js.map +1 -1
  394. package/dist/primitives/Select/index.cjs +1 -1
  395. package/dist/primitives/Select/index.cjs.map +1 -1
  396. package/dist/primitives/Select/index.js +1 -1
  397. package/dist/primitives/Select/index.js.map +1 -1
  398. package/dist/primitives/Skeleton/index.cjs +2 -2
  399. package/dist/primitives/Skeleton/index.cjs.map +1 -1
  400. package/dist/primitives/Skeleton/index.js +2 -2
  401. package/dist/primitives/Skeleton/index.js.map +1 -1
  402. package/dist/primitives/Slider/index.cjs +1 -1
  403. package/dist/primitives/Slider/index.cjs.map +1 -1
  404. package/dist/primitives/Slider/index.js +1 -1
  405. package/dist/primitives/Slider/index.js.map +1 -1
  406. package/dist/primitives/Sonner/index.cjs +1 -1
  407. package/dist/primitives/Sonner/index.cjs.map +1 -1
  408. package/dist/primitives/Sonner/index.js +1 -1
  409. package/dist/primitives/Sonner/index.js.map +1 -1
  410. package/dist/primitives/Switch/index.cjs +3 -3
  411. package/dist/primitives/Switch/index.cjs.map +1 -1
  412. package/dist/primitives/Switch/index.js +3 -3
  413. package/dist/primitives/Switch/index.js.map +1 -1
  414. package/dist/primitives/Table/index.cjs +3 -3
  415. package/dist/primitives/Table/index.cjs.map +1 -1
  416. package/dist/primitives/Table/index.js +3 -3
  417. package/dist/primitives/Table/index.js.map +1 -1
  418. package/dist/primitives/Tabs/index.cjs +4 -4
  419. package/dist/primitives/Tabs/index.cjs.map +1 -1
  420. package/dist/primitives/Tabs/index.js +4 -4
  421. package/dist/primitives/Tabs/index.js.map +1 -1
  422. package/dist/primitives/Textarea/index.cjs +2 -2
  423. package/dist/primitives/Textarea/index.cjs.map +1 -1
  424. package/dist/primitives/Textarea/index.js +2 -2
  425. package/dist/primitives/Textarea/index.js.map +1 -1
  426. package/dist/primitives/Toggle/index.cjs +2 -2
  427. package/dist/primitives/Toggle/index.cjs.map +1 -1
  428. package/dist/primitives/Toggle/index.js +2 -2
  429. package/dist/primitives/Toggle/index.js.map +1 -1
  430. package/dist/primitives/Tooltip/index.cjs +2 -2
  431. package/dist/primitives/Tooltip/index.cjs.map +1 -1
  432. package/dist/primitives/Tooltip/index.js +2 -2
  433. package/dist/primitives/Tooltip/index.js.map +1 -1
  434. package/dist/primitives/index.cjs +1 -1
  435. package/dist/primitives/index.js +1 -1
  436. package/dist/styles/index.css +3 -0
  437. package/dist/styles/semantic.css +23 -12
  438. package/dist/styles/theme.css +43 -4
  439. package/dist/styles/tokens/border-radius.css +2 -1
  440. package/dist/styles/tokens/mode-dark.css +1 -1
  441. package/dist/styles/typography.css +136 -0
  442. package/package.json +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Chart/Chart.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\nimport type { TooltipValueType } from \"recharts\";\n\nimport { cn } from \"@/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\ntype TooltipNameType = number | string;\n\n/** Maps each data key to its display label, optional icon, and color (flat or per-theme). */\nexport type ChartConfig = Record<\n string,\n {\n /** Human-readable label rendered in tooltips and the legend. */\n label?: React.ReactNode;\n /** Optional icon component shown alongside the label. */\n icon?: React.ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\n/** Root chart wrapper: provides the config context, theme CSS variables, and a responsive container. */\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Maps data keys to labels, icons, and colors used across tooltip and legend. */\n config: ChartConfig;\n /** Recharts chart element rendered inside the responsive container. */\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\n /** Initial width/height used before the responsive container measures its parent. */\n initialDimension?: {\n width: number;\n height: number;\n };\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\n/** Injects per-chart CSS custom properties (`--color-*`) derived from the config, one block per theme. */\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join(\"\\n\")}\n}\n`,\n )\n .join(\"\\n\"),\n }}\n />\n );\n};\n\n/** Recharts Tooltip element; pair with `ChartTooltipContent` for the styled body. */\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\n/** Styled tooltip body that resolves labels, colors, and indicators from the chart config. */\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n /** Hides the tooltip's leading label row. */\n hideLabel?: boolean;\n /** Hides the per-item color indicator swatch. */\n hideIndicator?: boolean;\n /** Visual style of the per-item color indicator. */\n indicator?: \"line\" | \"dot\" | \"dashed\";\n /** Config key used to resolve each item's label/color (defaults to its name). */\n nameKey?: string;\n /** Config key used to resolve the tooltip's label (defaults to the data key). */\n labelKey?: string;\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>,\n \"accessibilityLayer\"\n >) {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === \"string\" ? (config[label]?.label ?? label) : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n return (\n <div\n className={cn(\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\",\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n },\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\",\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\"\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\n/** Recharts Legend element; pair with `ChartLegendContent` for the styled body. */\nconst ChartLegend = RechartsPrimitive.Legend;\n\n/** Styled legend body that resolves labels, icons, and colors from the chart config. */\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n /** Hides each item's icon, showing only the color swatch. */\n hideIcon?: boolean;\n /** Config key used to resolve each item's label/color (defaults to the data key). */\n nameKey?: string;\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className,\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={index}\n className={cn(\n \"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\",\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null\n ? payload.payload\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n};\n"],"mappings":";;;;;AASA,MAAM,SAAS;CAAE,OAAO;CAAI,MAAM;AAAQ;AAE1C,MAAM,oBAAoB;CAAE,OAAO;CAAK,QAAQ;AAAI;AAqBpD,MAAM,eAAe,MAAM,cAAwC,IAAI;AAEvE,SAAS,WAAW;CAClB,MAAM,UAAU,MAAM,WAAW,YAAY;CAE7C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAGrE,OAAO;AACT;;AAGA,SAAS,eAAe,EACtB,IACA,WACA,UACA,QACA,mBAAmB,mBACnB,GAAG,SAWF;CACD,MAAM,WAAW,MAAM,MAAM;CAC7B,MAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE;CAExD,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,qBAAC,OAAD;GACE,aAAU;GACV,cAAY;GACZ,WAAW,GACT,+pBACA,SACF;GACA,GAAI;aAPN,CASE,oBAAC,YAAD;IAAY,IAAI;IAAiB;GAAS,CAAA,GAC1C,oBAAC,kBAAkB,qBAAnB;IAAyD;IACtD;GACoC,CAAA,CACpC;;CACgB,C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C;EACA,CAAA,CACF;;AAET;;AAGA,MAAM,cAAc,kBAAkB;;AAGtC,SAAS,mBAAmB,EAC1B,WACA,WAAW,OACX,SACA,gBAAgB,UAChB,WAM+C;CAC/C,MAAM,EAAE,WAAW,SAAS;CAE5B,IAAI,CAAC,SAAS,QACZ,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,WAAW,GACT,0CACA,kBAAkB,QAAQ,SAAS,QACnC,SACF;YAEC,QACE,QAAQ,SAAS,KAAK,SAAS,MAAM,EACrC,KAAK,MAAM,UAAU;GAEpB,MAAM,aAAa,4BAA4B,QAAQ,MAAM,GAD9C,WAAW,KAAK,WAAW,SACsB;GAEhE,OACE,qBAAC,OAAD;IAEE,WAAW,GACT,iFACF;cAJF,CAMG,YAAY,QAAQ,CAAC,WACpB,oBAAC,WAAW,MAAZ,CAAkB,CAAA,IAElB,oBAAC,OAAD;KACE,WAAU;KACV,OAAO,EACL,iBAAiB,KAAK,MACxB;IACD,CAAA,GAEF,YAAY,KACV;MAhBE,KAgBF;EAET,CAAC;CACA,CAAA;AAET;AAGA,SAAS,4BAA4B,QAAqB,SAAkB,KAAa;CACvF,IAAI,OAAO,YAAY,YAAY,YAAY,MAC7C;CAGF,MAAM,iBACJ,aAAa,WAAW,OAAO,QAAQ,YAAY,YAAY,QAAQ,YAAY,OAC/E,QAAQ,UACR,KAAA;CAEN,IAAI,iBAAyB;CAE7B,IAAI,OAAO,WAAW,OAAO,QAAQ,SAAiC,UACpE,iBAAiB,QAAQ;MACpB,IACL,kBACA,OAAO,kBACP,OAAO,eAAe,SAAwC,UAE9D,iBAAiB,eAAe;CAGlC,OAAO,kBAAkB,SAAS,OAAO,kBAAkB,OAAO;AACpE"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Chart/Chart.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\nimport type { TooltipValueType } from \"recharts\";\n\nimport { cn } from \"@/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\ntype TooltipNameType = number | string;\n\n/** Maps each data key to its display label, optional icon, and color (flat or per-theme). */\nexport type ChartConfig = Record<\n string,\n {\n /** Human-readable label rendered in tooltips and the legend. */\n label?: React.ReactNode;\n /** Optional icon component shown alongside the label. */\n icon?: React.ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\n/** Root chart wrapper: provides the config context, theme CSS variables, and a responsive container. */\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Maps data keys to labels, icons, and colors used across tooltip and legend. */\n config: ChartConfig;\n /** Recharts chart element rendered inside the responsive container. */\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\n /** Initial width/height used before the responsive container measures its parent. */\n initialDimension?: {\n width: number;\n height: number;\n };\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\n/** Injects per-chart CSS custom properties (`--color-*`) derived from the config, one block per theme. */\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join(\"\\n\")}\n}\n`,\n )\n .join(\"\\n\"),\n }}\n />\n );\n};\n\n/** Recharts Tooltip element; pair with `ChartTooltipContent` for the styled body. */\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\n/** Styled tooltip body that resolves labels, colors, and indicators from the chart config. */\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n /** Hides the tooltip's leading label row. */\n hideLabel?: boolean;\n /** Hides the per-item color indicator swatch. */\n hideIndicator?: boolean;\n /** Visual style of the per-item color indicator. */\n indicator?: \"line\" | \"dot\" | \"dashed\";\n /** Config key used to resolve each item's label/color (defaults to its name). */\n nameKey?: string;\n /** Config key used to resolve the tooltip's label (defaults to the data key). */\n labelKey?: string;\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>,\n \"accessibilityLayer\"\n >) {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === \"string\" ? (config[label]?.label ?? label) : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n return (\n <div\n className={cn(\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border bg-popover px-2.5 py-1.5 text-xs shadow-xl\",\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\",\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n },\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\",\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\"\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\n/** Recharts Legend element; pair with `ChartLegendContent` for the styled body. */\nconst ChartLegend = RechartsPrimitive.Legend;\n\n/** Styled legend body that resolves labels, icons, and colors from the chart config. */\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n /** Hides each item's icon, showing only the color swatch. */\n hideIcon?: boolean;\n /** Config key used to resolve each item's label/color (defaults to the data key). */\n nameKey?: string;\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className,\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={index}\n className={cn(\n \"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\",\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null\n ? payload.payload\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n};\n"],"mappings":";;;;;AASA,MAAM,SAAS;CAAE,OAAO;CAAI,MAAM;AAAQ;AAE1C,MAAM,oBAAoB;CAAE,OAAO;CAAK,QAAQ;AAAI;AAqBpD,MAAM,eAAe,MAAM,cAAwC,IAAI;AAEvE,SAAS,WAAW;CAClB,MAAM,UAAU,MAAM,WAAW,YAAY;CAE7C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAGrE,OAAO;AACT;;AAGA,SAAS,eAAe,EACtB,IACA,WACA,UACA,QACA,mBAAmB,mBACnB,GAAG,SAWF;CACD,MAAM,WAAW,MAAM,MAAM;CAC7B,MAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE;CAExD,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,qBAAC,OAA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OAAO;AACpE"}
@@ -9,7 +9,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
9
9
  function Checkbox({ className, ...props }) {
10
10
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Checkbox.Root, {
11
11
  "data-slot": "checkbox",
12
- className: require_cn.cn("group/checkbox peer bg-input-background dark:bg-input/30 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary dark:data-[state=checked]:bg-primary", "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", "aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white", className),
12
+ className: require_cn.cn("group/checkbox peer bg-input-background size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary", "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-ring-error", "aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white", className),
13
13
  ...props,
14
14
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Checkbox.Indicator, {
15
15
  "data-slot": "checkbox-indicator",
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["CheckboxPrimitive","cn","CheckIcon","MinusIcon"],"sources":["../../../src/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon, MinusIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A square toggle control built on Radix Checkbox, supporting checked, unchecked, indeterminate, error, and disabled states. */\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group/checkbox peer bg-input-background dark:bg-input/30 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n // Checked + indeterminate share the primary fill.\n \"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary dark:data-[state=checked]:bg-primary\",\n \"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n // Error: red border when unchecked, red fill when checked (Figma error states).\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n \"aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5 group-data-[state=indeterminate]/checkbox:hidden\" />\n <MinusIcon className=\"hidden size-3.5 group-data-[state=indeterminate]/checkbox:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\n/** A bordered card variant of {@link Checkbox} that pairs the control with a title and optional description. */\nfunction RichCheckbox({\n className,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof Checkbox>, \"children\"> & {\n /** Primary label rendered next to the checkbox. */\n title?: React.ReactNode;\n /** Secondary helper text rendered beneath the title. */\n description?: React.ReactNode;\n /** When true, places the checkbox on the right (row-reverse) instead of the left. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-checkbox\"\n htmlFor={checkboxId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Checkbox data-slot=\"rich-checkbox-control\" id={checkboxId} className=\"mt-0.5\" {...props} />\n <span data-slot=\"rich-checkbox-content\" className=\"flex flex-1 flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-checkbox-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-checkbox-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { Checkbox, RichCheckbox };\n"],"mappings":";;;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA8D;CAC9F,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,SAAkB,MAAnB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,0LAEA,yJACA,sIACA,iFAEA,0GACA,sJACA,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,MAACD,SAAAA,SAAkB,WAAnB;GACE,aAAU;GACV,WAAU;aAFZ,CAIE,iBAAA,GAAA,kBAAA,KAACE,aAAAA,WAAD,EAAW,WAAU,4DAA6D,CAAA,GAClF,iBAAA,GAAA,kBAAA,KAACC,aAAAA,WAAD,EAAW,WAAU,kEAAmE,CAAA,CAC7D;;CACP,CAAA;AAE5B;;AAGA,SAAS,aAAa,EACpB,WACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAQF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,aAAa,MAAM;CACzB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAWF,WAAAA,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,iBAAA,GAAA,kBAAA,KAAC,UAAD;GAAU,aAAU;GAAwB,IAAI;GAAY,WAAU;GAAS,GAAI;EAAQ,CAAA,GAC3F,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,aAAU;GAAwB,WAAU;aAAlD,CACG,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAsB,WAAU;cAC7C;GACG,CAAA,GAEP,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAA4B,WAAU;cACnD;GACG,CAAA,CAEJ;IACD;;AAEX"}
1
+ {"version":3,"file":"index.cjs","names":["CheckboxPrimitive","cn","CheckIcon","MinusIcon"],"sources":["../../../src/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon, MinusIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A square toggle control built on Radix Checkbox, supporting checked, unchecked, indeterminate, error, and disabled states. */\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group/checkbox peer bg-input-background size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n // Checked + indeterminate share the primary fill.\n \"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary\",\n \"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n // Error: red border when unchecked, red fill when checked (Figma error states).\n \"aria-invalid:border-destructive aria-invalid:ring-ring-error\",\n \"aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5 group-data-[state=indeterminate]/checkbox:hidden\" />\n <MinusIcon className=\"hidden size-3.5 group-data-[state=indeterminate]/checkbox:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\n/** A bordered card variant of {@link Checkbox} that pairs the control with a title and optional description. */\nfunction RichCheckbox({\n className,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof Checkbox>, \"children\"> & {\n /** Primary label rendered next to the checkbox. */\n title?: React.ReactNode;\n /** Secondary helper text rendered beneath the title. */\n description?: React.ReactNode;\n /** When true, places the checkbox on the right (row-reverse) instead of the left. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-checkbox\"\n htmlFor={checkboxId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Checkbox data-slot=\"rich-checkbox-control\" id={checkboxId} className=\"mt-0.5\" {...props} />\n <span data-slot=\"rich-checkbox-content\" className=\"flex flex-1 flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-checkbox-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-checkbox-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { Checkbox, RichCheckbox };\n"],"mappings":";;;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA8D;CAC9F,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,SAAkB,MAAnB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,sLAEA,oHACA,sIACA,iFAEA,gEACA,sJACA,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,MAACD,SAAAA,SAAkB,WAAnB;GACE,aAAU;GACV,WAAU;aAFZ,CAIE,iBAAA,GAAA,kBAAA,KAACE,aAAAA,WAAD,EAAW,WAAU,4DAA6D,CAAA,GAClF,iBAAA,GAAA,kBAAA,KAACC,aAAAA,WAAD,EAAW,WAAU,kEAAmE,CAAA,CAC7D;;CACP,CAAA;AAE5B;;AAGA,SAAS,aAAa,EACpB,WACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAQF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,aAAa,MAAM;CACzB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAWF,WAAAA,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,iBAAA,GAAA,kBAAA,KAAC,UAAD;GAAU,aAAU;GAAwB,IAAI;GAAY,WAAU;GAAS,GAAI;EAAQ,CAAA,GAC3F,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,aAAU;GAAwB,WAAU;aAAlD,CACG,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAsB,WAAU;cAC7C;GACG,CAAA,GAEP,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAA4B,WAAU;cACnD;GACG,CAAA,CAEJ;IACD;;AAEX"}
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  function Checkbox({ className, ...props }) {
9
9
  return /* @__PURE__ */ jsx(Checkbox$1.Root, {
10
10
  "data-slot": "checkbox",
11
- className: cn("group/checkbox peer bg-input-background dark:bg-input/30 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary dark:data-[state=checked]:bg-primary", "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", "aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white", className),
11
+ className: cn("group/checkbox peer bg-input-background size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary", "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-ring-error", "aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white", className),
12
12
  ...props,
13
13
  children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
14
14
  "data-slot": "checkbox-indicator",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CheckboxPrimitive"],"sources":["../../../src/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon, MinusIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A square toggle control built on Radix Checkbox, supporting checked, unchecked, indeterminate, error, and disabled states. */\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group/checkbox peer bg-input-background dark:bg-input/30 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n // Checked + indeterminate share the primary fill.\n \"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary dark:data-[state=checked]:bg-primary\",\n \"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n // Error: red border when unchecked, red fill when checked (Figma error states).\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n \"aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5 group-data-[state=indeterminate]/checkbox:hidden\" />\n <MinusIcon className=\"hidden size-3.5 group-data-[state=indeterminate]/checkbox:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\n/** A bordered card variant of {@link Checkbox} that pairs the control with a title and optional description. */\nfunction RichCheckbox({\n className,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof Checkbox>, \"children\"> & {\n /** Primary label rendered next to the checkbox. */\n title?: React.ReactNode;\n /** Secondary helper text rendered beneath the title. */\n description?: React.ReactNode;\n /** When true, places the checkbox on the right (row-reverse) instead of the left. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-checkbox\"\n htmlFor={checkboxId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Checkbox data-slot=\"rich-checkbox-control\" id={checkboxId} className=\"mt-0.5\" {...props} />\n <span data-slot=\"rich-checkbox-content\" className=\"flex flex-1 flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-checkbox-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-checkbox-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { Checkbox, RichCheckbox };\n"],"mappings":";;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA8D;CAC9F,OACE,oBAACA,WAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GACT,0LAEA,yJACA,sIACA,iFAEA,0GACA,sJACA,SACF;EACA,GAAI;YAEJ,qBAACA,WAAkB,WAAnB;GACE,aAAU;GACV,WAAU;aAFZ,CAIE,oBAAC,WAAD,EAAW,WAAU,4DAA6D,CAAA,GAClF,oBAAC,WAAD,EAAW,WAAU,kEAAmE,CAAA,CAC7D;;CACP,CAAA;AAE5B;;AAGA,SAAS,aAAa,EACpB,WACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAQF;CACD,MAAM,cAAc,MAAM;CAC1B,MAAM,aAAa,MAAM;CACzB,OACE,qBAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAW,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,oBAAC,UAAD;GAAU,aAAU;GAAwB,IAAI;GAAY,WAAU;GAAS,GAAI;EAAQ,CAAA,GAC3F,qBAAC,QAAD;GAAM,aAAU;GAAwB,WAAU;aAAlD,CACG,SAAS,QACR,oBAAC,QAAD;IAAM,aAAU;IAAsB,WAAU;cAC7C;GACG,CAAA,GAEP,eAAe,QACd,oBAAC,QAAD;IAAM,aAAU;IAA4B,WAAU;cACnD;GACG,CAAA,CAEJ;IACD;;AAEX"}
1
+ {"version":3,"file":"index.js","names":["CheckboxPrimitive"],"sources":["../../../src/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon, MinusIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A square toggle control built on Radix Checkbox, supporting checked, unchecked, indeterminate, error, and disabled states. */\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group/checkbox peer bg-input-background size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n // Checked + indeterminate share the primary fill.\n \"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary\",\n \"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n // Error: red border when unchecked, red fill when checked (Figma error states).\n \"aria-invalid:border-destructive aria-invalid:ring-ring-error\",\n \"aria-invalid:data-[state=checked]:bg-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=checked]:text-white\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5 group-data-[state=indeterminate]/checkbox:hidden\" />\n <MinusIcon className=\"hidden size-3.5 group-data-[state=indeterminate]/checkbox:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\n/** A bordered card variant of {@link Checkbox} that pairs the control with a title and optional description. */\nfunction RichCheckbox({\n className,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof Checkbox>, \"children\"> & {\n /** Primary label rendered next to the checkbox. */\n title?: React.ReactNode;\n /** Secondary helper text rendered beneath the title. */\n description?: React.ReactNode;\n /** When true, places the checkbox on the right (row-reverse) instead of the left. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-checkbox\"\n htmlFor={checkboxId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Checkbox data-slot=\"rich-checkbox-control\" id={checkboxId} className=\"mt-0.5\" {...props} />\n <span data-slot=\"rich-checkbox-content\" className=\"flex flex-1 flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-checkbox-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-checkbox-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { Checkbox, RichCheckbox };\n"],"mappings":";;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA8D;CAC9F,OACE,oBAACA,WAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GACT,sLAEA,oHACA,sIACA,iFAEA,gEACA,sJACA,SACF;EACA,GAAI;YAEJ,qBAACA,WAAkB,WAAnB;GACE,aAAU;GACV,WAAU;aAFZ,CAIE,oBAAC,WAAD,EAAW,WAAU,4DAA6D,CAAA,GAClF,oBAAC,WAAD,EAAW,WAAU,kEAAmE,CAAA,CAC7D;;CACP,CAAA;AAE5B;;AAGA,SAAS,aAAa,EACpB,WACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAQF;CACD,MAAM,cAAc,MAAM;CAC1B,MAAM,aAAa,MAAM;CACzB,OACE,qBAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAW,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,oBAAC,UAAD;GAAU,aAAU;GAAwB,IAAI;GAAY,WAAU;GAAS,GAAI;EAAQ,CAAA,GAC3F,qBAAC,QAAD;GAAM,aAAU;GAAwB,WAAU;aAAlD,CACG,SAAS,QACR,oBAAC,QAAD;IAAM,aAAU;IAAsB,WAAU;cAC7C;GACG,CAAA,GAEP,eAAe,QACd,oBAAC,QAAD;IAAM,aAAU;IAA4B,WAAU;cACnD;GACG,CAAA,CAEJ;IACD;;AAEX"}
@@ -9,7 +9,7 @@ let cmdk = require("cmdk");
9
9
  function Command({ className, ...props }) {
10
10
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command, {
11
11
  "data-slot": "command",
12
- className: require_cn.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
12
+ className: require_cn.cn("flex h-full w-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground", className),
13
13
  ...props
14
14
  });
15
15
  }
@@ -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 \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\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-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-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 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground 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-[300px] 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 \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\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-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 \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\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-xs tracking-widest text-muted-foreground\", 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,GACT,6FACA,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,E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,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
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 \"flex h-full w-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground\",\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-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-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 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground 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-[300px] 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 \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\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-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 \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\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-xs tracking-widest text-muted-foreground\", 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,GACT,6FACA,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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NACA,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,wBAAwB,SAAS;EAC/C,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,GACT,uYACA,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,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
@@ -8,7 +8,7 @@ import { Command as Command$1 } from "cmdk";
8
8
  function Command({ className, ...props }) {
9
9
  return /* @__PURE__ */ jsx(Command$1, {
10
10
  "data-slot": "command",
11
- className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
11
+ className: cn("flex h-full w-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground", className),
12
12
  ...props
13
13
  });
14
14
  }
@@ -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 \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\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-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-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 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground 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-[300px] 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 \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\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-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 \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\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-xs tracking-widest text-muted-foreground\", 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,oBAACA,WAAD;EACE,aAAU;EACV,WAAW,GACT,6FACA,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,YAAD,EAAY,WAAU,6BAA8B,CAAA,GACpD,oBAACA,UAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,4JACA,SACF;GACA,GAAI;EACL,CAAA,CACE;;AAET;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GAAG,+DAA+D,SAAS;EACtF,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,GACT,0NACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,UAAiB,WAAlB;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GACT,uYACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAuC;CAC9E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
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 \"flex h-full w-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground\",\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-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-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 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground 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-[300px] 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 \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\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-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 \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\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-xs tracking-widest text-muted-foreground\", 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,oBAACA,WAAD;EACE,aAAU;EACV,WAAW,GACT,6FACA,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,YAAD,EAAY,WAAU,6BAA8B,CAAA,GACpD,oBAACA,UAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,4JACA,SACF;GACA,GAAI;EACL,CAAA,CACE;;AAET;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GAAG,+DAA+D,SAAS;EACtF,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,GACT,0NACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,UAAiB,WAAlB;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,UAAiB,MAAlB;EACE,aAAU;EACV,WAAW,GACT,uYACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAuC;CAC9E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
@@ -78,7 +78,7 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
78
78
  "data-slot": "context-menu-item",
79
79
  "data-inset": inset,
80
80
  "data-variant": variant,
81
- className: require_cn.cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className),
81
+ className: require_cn.cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-subtle data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className),
82
82
  ...props
83
83
  });
84
84
  }
@@ -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 cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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 cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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(\"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8\", className)}\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(\"-mx-1 my-1 h-px bg-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-xs tracking-widest text-muted-foreground\", 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;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,EA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EAC5F,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,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
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 cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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 cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-subtle data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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(\"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8\", className)}\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(\"-mx-1 my-1 h-px bg-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-xs tracking-widest text-muted-foreground\", 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;AACzE;;AAGA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;;AAGA,SAA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EAAqE,SAAS;EAC5F,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,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
@@ -77,7 +77,7 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
77
77
  "data-slot": "context-menu-item",
78
78
  "data-inset": inset,
79
79
  "data-variant": variant,
80
- className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className),
80
+ className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-subtle data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className),
81
81
  ...props
82
82
  });
83
83
  }
@@ -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 cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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 cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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(\"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8\", className)}\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(\"-mx-1 my-1 h-px bg-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-xs tracking-widest text-muted-foreground\", 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,CAAA;AAC5E;;AAGA,SAAS,sBAAsB,EAC7B,GAAG,SAC4D;CAC/D,OAAO,oBAACA,cAAqB,YAAtB;EAA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AM,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,GAAG,qEAAqE,SAAS;EAC5F,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
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 cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 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 cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-subtle data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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 cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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(\"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8\", className)}\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(\"-mx-1 my-1 h-px bg-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-xs tracking-widest text-muted-foreground\", 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,mBAAm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EACE,aAAU;EACV,cAAY;EACZ,gBAAc;EACd,WAAW,GACT,2jBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,wBAAwB,EAC/B,WACA,UACA,SACA,GAAG,SAC8D;CACjE,OACE,qBAACA,cAAqB,cAAtB;EACE,aAAU;EACV,WAAW,GACT,gTACA,SACF;EACS;EACT,GAAI;YAPN,CASE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,cAAqB,eAAtB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACG,CAAA;EAChC,CAAA,GACL,QACgC;;AAEvC;;AAGA,SAAS,qBAAqB,EAC5B,WACA,UACA,GAAG,SAC2D;CAC9D,OACE,qBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GACT,gTACA,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,GAAG,qEAAqE,SAAS;EAC5F,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,cAAqB,WAAtB;EACE,aAAU;EACV,WAAW,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL"}
@@ -7,7 +7,7 @@ const creditsVariants = (0, require("class-variance-authority").cva)("inline-fle
7
7
  variants: { variant: {
8
8
  default: "bg-muted text-foreground [&>svg]:text-muted-foreground",
9
9
  warning: "bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]",
10
- critical: "bg-[var(--bg-error-subtle)] text-[var(--content-error-bold)]"
10
+ critical: "bg-error-subtle text-[var(--content-error-bold)]"
11
11
  } },
12
12
  defaultVariants: { variant: "default" }
13
13
  });
@@ -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-full px-2.5 py-0.5 text-sm font-medium tabular-nums whitespace-nowrap [&>svg]:size-3.5 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-muted text-foreground [&>svg]:text-muted-foreground\",\n warning: \"bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]\",\n critical: \"bg-[var(--bg-error-subtle)] text-[var(--content-error-bold)]\",\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,wJACA;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","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-full px-2.5 py-0.5 text-sm font-medium tabular-nums whitespace-nowrap [&>svg]:size-3.5 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-muted text-foreground [&>svg]:text-muted-foreground\",\n warning: \"bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]\",\n critical: \"bg-error-subtle text-[var(--content-error-bold)]\",\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,wJACA;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"}
@@ -7,7 +7,7 @@ const creditsVariants = cva("inline-flex w-fit items-center gap-1 rounded-full p
7
7
  variants: { variant: {
8
8
  default: "bg-muted text-foreground [&>svg]:text-muted-foreground",
9
9
  warning: "bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]",
10
- critical: "bg-[var(--bg-error-subtle)] text-[var(--content-error-bold)]"
10
+ critical: "bg-error-subtle text-[var(--content-error-bold)]"
11
11
  } },
12
12
  defaultVariants: { variant: "default" }
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"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-full px-2.5 py-0.5 text-sm font-medium tabular-nums whitespace-nowrap [&>svg]:size-3.5 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-muted text-foreground [&>svg]:text-muted-foreground\",\n warning: \"bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]\",\n critical: \"bg-[var(--bg-error-subtle)] text-[var(--content-error-bold)]\",\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,kBAAkB,IACtB,wJACA;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,qBAAC,QAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,gBAAgB,EAAE,SAAS,SAAS,CAAC,GAAG,SAAS;EAC/D,GAAI;YAJN,CAMG,QAAQ,oBAAC,YAAD,EAAY,eAAY,OAAQ,CAAA,GACxC,OAAO,KAAK,CACT;;AAEV"}
1
+ {"version":3,"file":"index.js","names":[],"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-full px-2.5 py-0.5 text-sm font-medium tabular-nums whitespace-nowrap [&>svg]:size-3.5 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-muted text-foreground [&>svg]:text-muted-foreground\",\n warning: \"bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]\",\n critical: \"bg-error-subtle text-[var(--content-error-bold)]\",\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,kBAAkB,IACtB,wJACA;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,qBAAC,QAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,gBAAgB,EAAE,SAAS,SAAS,CAAC,GAAG,SAAS;EAC/D,GAAI;YAJN,CAMG,QAAQ,oBAAC,YAAD,EAAY,eAAY,OAAQ,CAAA,GACxC,OAAO,KAAK,CACT;;AAEV"}
@@ -54,7 +54,7 @@ function DialogContent({ className, children, size = "default", showCloseButton
54
54
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Content, {
55
55
  "data-slot": "dialog-content",
56
56
  "data-size": size,
57
- className: require_cn.cn("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-background p-6 shadow-lg duration-200 outline-none 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", dialogSizes[size], className),
57
+ className: require_cn.cn("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-background p-6 shadow-lg duration-200 outline-none 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", dialogSizes[size], className),
58
58
  ...props,
59
59
  children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Close, {
60
60
  "data-slot": "dialog-close",
@@ -94,7 +94,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
94
94
  function DialogTitle({ className, ...props }) {
95
95
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Title, {
96
96
  "data-slot": "dialog-title",
97
- className: require_cn.cn("text-lg leading-none font-semibold", className),
97
+ className: require_cn.cn("font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal", className),
98
98
  ...props
99
99
  });
100
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["DialogPrimitive","cn","XIcon","Button"],"sources":["../../../src/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Modal dialog root — owns open/closed state and renders its content in a portal. */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that toggles the dialog open when activated. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Portals the dialog overlay and content to the document body. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Element that closes the dialog when activated. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Dimmed backdrop rendered behind the dialog content. */\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-[var(--overlay)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst dialogSizes = {\n sm: \"sm:max-w-sm\",\n default: \"sm:max-w-lg\",\n lg: \"sm:max-w-2xl\",\n xl: \"sm:max-w-4xl\",\n} as const;\n\n/** The dialog panel: centered, animated content with overlay and optional close button. */\nfunction DialogContent({\n className,\n children,\n size = \"default\",\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** Width preset for the panel. */\n size?: keyof typeof dialogSizes;\n /** Whether to render the top-right \"X\" close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n data-size={size}\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-background p-6 shadow-lg duration-200 outline-none 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 dialogSizes[size],\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Top section of the dialog, holds the title and description. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/** Bottom action row of the dialog, with an optional built-in Close button. */\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Whether to append a built-in outline \"Close\" button after the children. */\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\n/** Accessible heading for the dialog (announced to screen readers). */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\n/** Supporting text beneath the dialog title (linked for assistive tech). */\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;;AAQA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,cAAc,EAAE,GAAG,SAA+D;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,SAAjB;EAAyB,aAAU;EAAi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AAWD,WAAAA,GAAG,gDAAgD,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EACpB,WACA,kBAAkB,OAClB,UACA,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,0DAA0D,SAAS;EACjF,GAAI;YAHN,CAKG,UACA,mBACC,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;GAAuB,SAAA;aACrB,iBAAA,GAAA,kBAAA,KAACG,gCAAAA,QAAD;IAAQ,SAAQ;cAAU;GAAa,CAAA;EAClB,CAAA,CAEtB;;AAET;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,iBAAA,GAAA,kBAAA,KAACH,SAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,aAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["DialogPrimitive","cn","XIcon","Button"],"sources":["../../../src/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Modal dialog root — owns open/closed state and renders its content in a portal. */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that toggles the dialog open when activated. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Portals the dialog overlay and content to the document body. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Element that closes the dialog when activated. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Dimmed backdrop rendered behind the dialog content. */\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-[var(--overlay)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst dialogSizes = {\n sm: \"sm:max-w-sm\",\n default: \"sm:max-w-lg\",\n lg: \"sm:max-w-2xl\",\n xl: \"sm:max-w-4xl\",\n} as const;\n\n/** The dialog panel: centered, animated content with overlay and optional close button. */\nfunction DialogContent({\n className,\n children,\n size = \"default\",\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** Width preset for the panel. */\n size?: keyof typeof dialogSizes;\n /** Whether to render the top-right \"X\" close button. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n data-size={size}\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-background p-6 shadow-lg duration-200 outline-none 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 dialogSizes[size],\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Top section of the dialog, holds the title and description. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/** Bottom action row of the dialog, with an optional built-in Close button. */\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Whether to append a built-in outline \"Close\" button after the children. */\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\n/** Accessible heading for the dialog (announced to screen readers). */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Supporting text beneath the dialog title (linked for assistive tech). */\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;;AAQA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,cAAc,EAAE,GAAG,SAA+D;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;;AAGA,SAAS,aAAa,EAAE,GAAG,SAA8D;CACvF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;CACvD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,SAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,kKACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;CACJ,IAAI;AACN;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,OAAO,WACP,kBAAkB,MAClB,GAAG,SAMF;CACD,OACE,iBAAA,GAAA,kBAAA,MAAC,cAAD;EAAc,aAAU;YAAxB,CACE,iBAAA,GAAA,kBAAA,KAAC,eAAD,CAAgB,CAAA,GA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AS;EACxD,GAAI;CACL,CAAA;AAEL"}
@@ -53,7 +53,7 @@ function DialogContent({ className, children, size = "default", showCloseButton
53
53
  children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
54
54
  "data-slot": "dialog-content",
55
55
  "data-size": size,
56
- className: cn("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-background p-6 shadow-lg duration-200 outline-none 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", dialogSizes[size], className),
56
+ className: cn("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-background p-6 shadow-lg duration-200 outline-none 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", dialogSizes[size], className),
57
57
  ...props,
58
58
  children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
59
59
  "data-slot": "dialog-close",
@@ -93,7 +93,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
93
93
  function DialogTitle({ className, ...props }) {
94
94
  return /* @__PURE__ */ jsx(Dialog$1.Title, {
95
95
  "data-slot": "dialog-title",
96
- className: cn("text-lg leading-none font-semibold", className),
96
+ className: cn("font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal", className),
97
97
  ...props
98
98
  });
99
99
  }