@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
@@ -5,15 +5,15 @@ import { Slot } from "radix-ui";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cva } from "class-variance-authority";
7
7
  //#region src/primitives/Button/Button.tsx
8
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
8
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive", {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
12
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
13
- outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
12
+ destructive: "bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error",
13
+ outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
14
14
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
15
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
16
- link: "text-primary underline-offset-4 hover:underline"
15
+ ghost: "hover:bg-accent hover:text-accent-foreground",
16
+ link: "text-foreground underline-offset-4 hover:underline"
17
17
  },
18
18
  size: {
19
19
  xs: "h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n outline:\n \"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n xs: \"h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2\",\n sm: \"h-8 gap-1.5 px-3 has-[>svg]:px-2.5\",\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n lg: \"h-10 px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n // Default is a pill (Figma); `square` gives the standard rounded-md corner.\n shape: {\n default: \"rounded-full\",\n square: \"rounded-md\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\ntype ButtonProps = ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n /** Render as the child element (Radix `Slot`) instead of a native `<button>`. */\n asChild?: boolean;\n /** Show a spinner and disable the button while an action is in flight. */\n loading?: boolean;\n };\n\n/**\n * Clickable button supporting visual variants, sizes, shapes, async loading, and\n * `asChild` composition. Forwards its ref so it can be used as a Radix trigger\n * (`asChild`) for floating overlays (Popover, Tooltip, DropdownMenu, …).\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n data-loading={loading || undefined}\n className={cn(buttonVariants({ variant, size, shape, className }))}\n disabled={disabled || loading}\n {...props}\n >\n {/* asChild expects a single child, so only plain buttons get the spinner. */}\n {asChild ? (\n children\n ) : (\n <>\n {loading ? <Spinner /> : null}\n {children}\n </>\n )}\n </Comp>\n );\n});\n\nexport { Button, buttonVariants, type ButtonProps };\n"],"mappings":";;;;;;;AAOA,MAAM,iBAAiB,IACrB,skBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;GACJ,MAAM;EACR;EAEA,OAAO;GACL,SAAS;GACT,QAAQ;EACV;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;;;;;AAeA,MAAM,SAAS,WAA2C,SAAS,OACjE,EACE,WACA,SACA,MACA,OACA,UAAU,OACV,UAAU,OACV,UACA,UACA,GAAG,SAEL,KACA;CAGA,OACE,oBAHW,UAAU,KAAK,OAAO,UAGjC;EACO;EACL,aAAU;EACV,gBAAc,WAAW,KAAA;EACzB,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAO;EAAU,CAAC,CAAC;EACjE,UAAU,YAAY;EACtB,GAAI;YAGH,UACC,WAEA,qBAAA,UAAA,EAAA,UAAA,CACG,UAAU,oBAAC,SAAD,CAAU,CAAA,IAAI,MACxB,QACD,EAAA,CAAA;CAEA,CAAA;AAEV,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error\",\n outline:\n \"border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-foreground underline-offset-4 hover:underline\",\n },\n size: {\n xs: \"h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2\",\n sm: \"h-8 gap-1.5 px-3 has-[>svg]:px-2.5\",\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n lg: \"h-10 px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n // Default is a pill (Figma); `square` gives the standard rounded-md corner.\n shape: {\n default: \"rounded-full\",\n square: \"rounded-md\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\ntype ButtonProps = ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n /** Render as the child element (Radix `Slot`) instead of a native `<button>`. */\n asChild?: boolean;\n /** Show a spinner and disable the button while an action is in flight. */\n loading?: boolean;\n };\n\n/**\n * Clickable button supporting visual variants, sizes, shapes, async loading, and\n * `asChild` composition. Forwards its ref so it can be used as a Radix trigger\n * (`asChild`) for floating overlays (Popover, Tooltip, DropdownMenu, …).\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n data-loading={loading || undefined}\n className={cn(buttonVariants({ variant, size, shape, className }))}\n disabled={disabled || loading}\n {...props}\n >\n {/* asChild expects a single child, so only plain buttons get the spinner. */}\n {asChild ? (\n children\n ) : (\n <>\n {loading ? <Spinner /> : null}\n {children}\n </>\n )}\n </Comp>\n );\n});\n\nexport { Button, buttonVariants, type ButtonProps };\n"],"mappings":";;;;;;;AAOA,MAAM,iBAAiB,IACrB,4hBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;GACJ,MAAM;EACR;EAEA,OAAO;GACL,SAAS;GACT,QAAQ;EACV;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;;;;;AAeA,MAAM,SAAS,WAA2C,SAAS,OACjE,EACE,WACA,SACA,MACA,OACA,UAAU,OACV,UAAU,OACV,UACA,UACA,GAAG,SAEL,KACA;CAGA,OACE,oBAHW,UAAU,KAAK,OAAO,UAGjC;EACO;EACL,aAAU;EACV,gBAAc,WAAW,KAAA;EACzB,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAO;EAAU,CAAC,CAAC;EACjE,UAAU,YAAY;EACtB,GAAI;YAGH,UACC,WAEA,qBAAA,UAAA,EAAA,UAAA,CACG,UAAU,oBAAC,SAAD,CAAU,CAAA,IAAI,MACxB,QACD,EAAA,CAAA;CAEA,CAAA;AAEV,CAAC"}
@@ -24,7 +24,7 @@ function ButtonGroup({ className, orientation, ...props }) {
24
24
  /** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */
25
25
  function ButtonGroupText({ className, asChild = false, ...props }) {
26
26
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? radix_ui.Slot.Root : "div", {
27
- className: require_cn.cn("flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
27
+ className: require_cn.cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
28
28
  ...props
29
29
  });
30
30
  }
@@ -33,7 +33,7 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
33
33
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_primitives_Separator_index.Separator, {
34
34
  "data-slot": "button-group-separator",
35
35
  orientation,
36
- className: require_cn.cn("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto", className),
36
+ className: require_cn.cn("relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto", className),
37
37
  ...props
38
38
  });
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cn","Slot","Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,uBAAA,qCAAA,EAAA,KACJ,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAWA,WAAAA,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,iBAAA,GAAA,kBAAA,KAHW,UAAUC,SAAAA,KAAK,OAAO,OAGjC;EACE,WAAWD,WAAAA,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,iBAAA,GAAA,kBAAA,KAACE,mCAAAA,WAAD;EACE,aAAU;EACG;EACb,WAAWF,WAAAA,GACT,0EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["cn","Slot","Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,uBAAA,qCAAA,EAAA,KACJ,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAWA,WAAAA,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,iBAAA,GAAA,kBAAA,KAHW,UAAUC,SAAAA,KAAK,OAAO,OAGjC;EACE,WAAWD,WAAAA,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,iBAAA,GAAA,kBAAA,KAACE,mCAAAA,WAAD;EACE,aAAU;EACG;EACb,WAAWF,WAAAA,GACT,2EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -24,7 +24,7 @@ function ButtonGroup({ className, orientation, ...props }) {
24
24
  /** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */
25
25
  function ButtonGroupText({ className, asChild = false, ...props }) {
26
26
  return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
27
- className: cn("flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
27
+ className: cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
28
28
  ...props
29
29
  });
30
30
  }
@@ -33,7 +33,7 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
33
33
  return /* @__PURE__ */ jsx(Separator$1, {
34
34
  "data-slot": "button-group-separator",
35
35
  orientation,
36
- className: cn("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto", className),
36
+ className: cn("relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto", className),
37
37
  ...props
38
38
  });
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,IAC1B,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,oBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,oBAHW,UAAU,KAAK,OAAO,OAGjC;EACE,WAAW,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,oBAACA,aAAD;EACE,aAAU;EACG;EACb,WAAW,GACT,0EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,IAC1B,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,oBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,oBAHW,UAAU,KAAK,OAAO,OAGjC;EACE,WAAW,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,oBAACA,aAAD;EACE,aAAU;EACG;EACb,WAAW,GACT,2EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -101,7 +101,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
101
101
  "data-range-start": modifiers.range_start,
102
102
  "data-range-end": modifiers.range_end,
103
103
  "data-range-middle": modifiers.range_middle,
104
- className: require_cn.cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
104
+ className: require_cn.cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
105
105
  ...props
106
106
  });
107
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["DayPicker","cn","buttonVariants","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","React","Button"],"sources":["../../../src/primitives/Calendar/Calendar.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Date picker calendar built on react-day-picker, themed with the DS Button + tokens. */\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n /** Button variant used for the previous/next navigation controls. */\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n \"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50\",\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label,\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday,\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\n \"text-[0.8rem] text-muted-foreground select-none\",\n defaultClassNames.week_number,\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-md\",\n defaultClassNames.day,\n ),\n range_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"font-semibold text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today,\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside,\n ),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\n/** Single day cell button, applying selected/range styling from the day's modifiers. */\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":";;;;;;;;;;;AAQA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,gBAAgB,SAChB,gBAAgB,SAChB,YACA,YACA,GAAG,SAIF;CACD,MAAM,qBAAA,GAAA,iBAAA,sBAAyC;CAE/C,OACE,iBAAA,GAAA,kBAAA,KAACA,iBAAAA,WAAD;EACmB;EACjB,WAAWC,WAAAA,GACT,0JACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,SACF;EACe;EACf,YAAY;GACV,sBAAsB,SAAS,KAAK,eAAe,WAAW,EAAE,OAAO,QAAQ,CAAC;GAChF,GAAG;EACL;EACA,YAAY;GACV,MAAMA,WAAAA,GAAG,SAAS,kBAAkB,IAAI;GACxC,QAAQA,WAAAA,GAAG,4CAA4C,kBAAkB,MAAM;GAC/E,OAAOA,WAAAA,GAAG,8BAA8B,kBAAkB,KAAK;GAC/D,KAAKA,WAAAA,GACH,2EACA,kBAAkB,GACpB;GACA,iBAAiBA,WAAAA,GACfC,gCAAAA,eAAe,EAAE,SAAS,cAAc,CAAC,GACzC,+DACA,kBAAkB,eACpB;GACA,aAAaD,WAAAA,GACXC,gCAAAA,eAAe,EAAE,SAAS,cAAc,CAAC,GACzC,+DACA,kBAAkB,WACpB;GACA,eAAeD,WAAAA,GACb,4EACA,kBAAkB,aACpB;GACA,WAAWA,WAAAA,GACT,uFACA,kBAAkB,SACpB;GACA,eAAeA,WAAAA,GACb,uHACA,kBAAkB,aACpB;GACA,UAAUA,WAAAA,GAAG,yCAAyC,kBAAkB,QAAQ;GAChF,eAAe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,CAAA;IAG3E,OAAO,iBAAA,GAAA,kBAAA,KAACI,aAAAA,iBAAD;KAAiB,WAAWJ,WAAAA,GAAG,UAAU,SAAS;KAAG,GAAI;IAAQ,CAAA;GAC1E;GACA,WAAW;GACX,aAAa,EAAE,UAAU,GAAG,YAAY;IACtC,OACE,iBAAA,GAAA,kBAAA,KAAC,MAAD;KAAI,GAAI;eACN,iBAAA,GAAA,kBAAA,KAAC,OAAD;MAAK,WAAU;MACZ;KACE,CAAA;IACH,CAAA;GAER;GACA,GAAG;EACL;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,kBAAkB,EACzB,WACA,KACA,WACA,GAAG,SACsC;CACzC,MAAM,qBAAA,GAAA,iBAAA,sBAAyC;CAE/C,MAAM,MAAMK,MAAM,OAA0B,IAAI;CAChD,MAAM,gBAAgB;EACpB,IAAI,UAAU,SAAS,IAAI,SAAS,MAAM;CAC5C,GAAG,CAAC,UAAU,OAAO,CAAC;CAEtB,OACE,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,QAAD;EACO;EACL,SAAQ;EACR,MAAK;EACL,YAAU,IAAI,KAAK,mBAAmB;EACtC,wBACE,UAAU,YACV,CAAC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,oBAAkB,UAAU;EAC5B,kBAAgB,UAAU;EAC1B,qBAAmB,UAAU;EAC7B,WAAWN,WAAAA,GACT,82BACA,kBAAkB,KAClB,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["DayPicker","cn","buttonVariants","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","React","Button"],"sources":["../../../src/primitives/Calendar/Calendar.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Date picker calendar built on react-day-picker, themed with the DS Button + tokens. */\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n /** Button variant used for the previous/next navigation controls. */\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n \"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50\",\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label,\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday,\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\n \"text-[0.8rem] text-muted-foreground select-none\",\n defaultClassNames.week_number,\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-md\",\n defaultClassNames.day,\n ),\n range_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"font-semibold text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today,\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside,\n ),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\n/** Single day cell button, applying selected/range styling from the day's modifiers. */\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayBut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,KAAC,OAAD;MAAK,WAAU;MACZ;KACE,CAAA;IACH,CAAA;GAER;GACA,GAAG;EACL;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,kBAAkB,EACzB,WACA,KACA,WACA,GAAG,SACsC;CACzC,MAAM,qBAAA,GAAA,iBAAA,sBAAyC;CAE/C,MAAM,MAAMK,MAAM,OAA0B,IAAI;CAChD,MAAM,gBAAgB;EACpB,IAAI,UAAU,SAAS,IAAI,SAAS,MAAM;CAC5C,GAAG,CAAC,UAAU,OAAO,CAAC;CAEtB,OACE,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,QAAD;EACO;EACL,SAAQ;EACR,MAAK;EACL,YAAU,IAAI,KAAK,mBAAmB;EACtC,wBACE,UAAU,YACV,CAAC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,oBAAkB,UAAU;EAC5B,kBAAgB,UAAU;EAC1B,qBAAmB,UAAU;EAC7B,WAAWN,WAAAA,GACT,40BACA,kBAAkB,KAClB,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -98,7 +98,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
98
98
  "data-range-start": modifiers.range_start,
99
99
  "data-range-end": modifiers.range_end,
100
100
  "data-range-middle": modifiers.range_middle,
101
- className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
101
+ className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
102
102
  ...props
103
103
  });
104
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Calendar/Calendar.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Date picker calendar built on react-day-picker, themed with the DS Button + tokens. */\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n /** Button variant used for the previous/next navigation controls. */\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n \"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50\",\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label,\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday,\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\n \"text-[0.8rem] text-muted-foreground select-none\",\n defaultClassNames.week_number,\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-md\",\n defaultClassNames.day,\n ),\n range_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"font-semibold text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today,\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside,\n ),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\n/** Single day cell button, applying selected/range styling from the day's modifiers. */\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":";;;;;;;;AAQA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,gBAAgB,SAChB,gBAAgB,SAChB,YACA,YACA,GAAG,SAIF;CACD,MAAM,oBAAoB,qBAAqB;CAE/C,OACE,oBAAC,WAAD;EACmB;EACjB,WAAW,GACT,0JACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,SACF;EACe;EACf,YAAY;GACV,sBAAsB,SAAS,KAAK,eAAe,WAAW,EAAE,OAAO,QAAQ,CAAC;GAChF,GAAG;EACL;EACA,YAAY;GACV,MAAM,GAAG,SAAS,kBAAkB,IAAI;GACxC,QAAQ,GAAG,4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jD,IAAI,gBAAgB,QAClB,OAAO,oBAAC,iBAAD;KAAiB,WAAW,GAAG,UAAU,SAAS;KAAG,GAAI;IAAQ,CAAA;IAG1E,IAAI,gBAAgB,SAClB,OAAO,oBAAC,kBAAD;KAAkB,WAAW,GAAG,UAAU,SAAS;KAAG,GAAI;IAAQ,CAAA;IAG3E,OAAO,oBAAC,iBAAD;KAAiB,WAAW,GAAG,UAAU,SAAS;KAAG,GAAI;IAAQ,CAAA;GAC1E;GACA,WAAW;GACX,aAAa,EAAE,UAAU,GAAG,YAAY;IACtC,OACE,oBAAC,MAAD;KAAI,GAAI;eACN,oBAAC,OAAD;MAAK,WAAU;MACZ;KACE,CAAA;IACH,CAAA;GAER;GACA,GAAG;EACL;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,kBAAkB,EACzB,WACA,KACA,WACA,GAAG,SACsC;CACzC,MAAM,oBAAoB,qBAAqB;CAE/C,MAAM,MAAM,MAAM,OAA0B,IAAI;CAChD,MAAM,gBAAgB;EACpB,IAAI,UAAU,SAAS,IAAI,SAAS,MAAM;CAC5C,GAAG,CAAC,UAAU,OAAO,CAAC;CAEtB,OACE,oBAAC,QAAD;EACO;EACL,SAAQ;EACR,MAAK;EACL,YAAU,IAAI,KAAK,mBAAmB;EACtC,wBACE,UAAU,YACV,CAAC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,oBAAkB,UAAU;EAC5B,kBAAgB,UAAU;EAC1B,qBAAmB,UAAU;EAC7B,WAAW,GACT,82BACA,kBAAkB,KAClB,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Calendar/Calendar.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/primitives/Button\";\nimport { cn } from \"@/utils\";\n\n/** Date picker calendar built on react-day-picker, themed with the DS Button + tokens. */\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n /** Button variant used for the previous/next navigation controls. */\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n \"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50\",\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\"absolute inset-0 bg-popover opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label,\n ),\n month_grid: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday,\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\"w-(--cell-size) select-none\", defaultClassNames.week_number_header),\n week_number: cn(\n \"text-[0.8rem] text-muted-foreground select-none\",\n defaultClassNames.week_number,\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-md\",\n defaultClassNames.day,\n ),\n range_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"font-semibold text-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today,\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside,\n ),\n disabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n if (orientation === \"right\") {\n return <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\n/** Single day cell button, applying selected/range styling from the day's modifiers. */\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar,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AC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,oBAAkB,UAAU;EAC5B,kBAAgB,UAAU;EAC1B,qBAAmB,UAAU;EAC7B,WAAW,GACT,40BACA,kBAAkB,KAClB,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -5,10 +5,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
5
5
  const cardVariants = (0, require("class-variance-authority").cva)("flex flex-col gap-6 rounded-xl border text-card-foreground", {
6
6
  variants: {
7
7
  variant: {
8
- default: "bg-card",
9
- glass: "border-transparent backdrop-blur-[var(--glass-blur)]",
8
+ default: "bg-card shadow-sm",
9
+ glass: "border-transparent backdrop-blur-glass",
10
10
  brand: "border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground",
11
- inverted: "border-transparent bg-foreground text-background"
11
+ inverted: "border-transparent bg-inverse text-inverse-foreground"
12
12
  },
13
13
  tint: {
14
14
  subtle: "",
@@ -52,7 +52,7 @@ function Card({ className, variant, tint, ...props }) {
52
52
  className: require_cn.cn(cardVariants({
53
53
  variant,
54
54
  tint
55
- }), className),
55
+ }), className, "justify-between"),
56
56
  ...props
57
57
  });
58
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Card/Card.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst cardVariants = cva(\"flex flex-col gap-6 rounded-xl border text-card-foreground\", {\n variants: {\n variant: {\n // Solid surface (default).\n default: \"bg-card\",\n // Translucent, backdrop-blurred glass surface — reads over a textured\n // background (e.g. PageBackground). `tint` picks the --glass-* token.\n glass: \"border-transparent backdrop-blur-[var(--glass-blur)]\",\n // Filled brand surface with light foreground — the active product's colour,\n // as a left-to-right gradient (darker → lighter brand shade).\n brand:\n \"border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground\",\n // Inverted surface — contrasts with the page (dark card in light mode,\n // light card in dark mode).\n inverted: \"border-transparent bg-foreground text-background\",\n },\n tint: {\n subtle: \"\",\n light: \"\",\n medium: \"\",\n heavy: \"\",\n },\n },\n compoundVariants: [\n { variant: \"glass\", tint: \"subtle\", class: \"bg-[var(--glass-subtle)]\" },\n { variant: \"glass\", tint: \"light\", class: \"bg-[var(--glass-light)]\" },\n { variant: \"glass\", tint: \"medium\", class: \"bg-[var(--glass-medium)]\" },\n { variant: \"glass\", tint: \"heavy\", class: \"bg-[var(--glass-heavy)]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n tint: \"light\",\n },\n});\n\ntype CardProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof cardVariants> & {\n /** Surface treatment of the card. Default `default` (solid `bg-card`). */\n variant?: VariantProps<typeof cardVariants>[\"variant\"];\n /** Glass opacity step — only applies to `variant=\"glass\"`. Default `light`. */\n tint?: VariantProps<typeof cardVariants>[\"tint\"];\n };\n\n/** Surface container with composable header/content/footer slots. */\nfunction Card({ className, variant, tint, ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-variant={variant ?? \"default\"}\n className={cn(cardVariants({ variant, tint }), className)}\n {...props}\n />\n );\n}\n\n// Vertical alignment of the header's items (title/description vs. the action).\nconst cardHeaderAlign = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n} as const;\n\n/** Top region of a card — holds the title, description, and optional action. */\nfunction CardHeader({\n className,\n align = \"center\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Vertical alignment of the header items. Default `center`. */\n align?: keyof typeof cardHeaderAlign;\n}) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n cardHeaderAlign[align],\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Card heading rendered as an `h4`. */\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return <h4 data-slot=\"card-title\" className={cn(\"leading-none\", className)} {...props} />;\n}\n\n/** Muted supporting text shown beneath the title. */\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <p data-slot=\"card-description\" className={cn(\"text-muted-foreground\", className)} {...props} />\n );\n}\n\n/** Action slot in the header row, aligned to the end alongside the title. */\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n // Sits in row 1 alongside the title (not spanning rows) and has no `self-*`,\n // so it shares the title's row and follows CardHeader's `align` — the title\n // and action then truly centre against each other regardless of height.\n className={cn(\"col-start-2 row-start-1 justify-self-end\", className)}\n {...props}\n />\n );\n}\n\n/** Main body region of the card. */\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6 [&:last-child]:pb-6\", className)}\n {...props}\n />\n );\n}\n\n// Footer fill. `default` is transparent (the usual footer); `brand`/`muted`\n// render a full-width tinted band with the action centred — pair with\n// `<Card className=\"overflow-hidden\">` so the band clips to the card radius.\nconst cardFooterTone = {\n default: \"px-6 pb-6 [.border-t]:pt-6\",\n brand: \"justify-center rounded-b-xl bg-brand-accent px-6 py-3 text-brand-accent-foreground\",\n muted: \"justify-center rounded-b-xl bg-muted px-6 py-3 text-muted-foreground\",\n card: \"justify-center rounded-b-xl bg-card px-6 py-3 text-card-foreground\",\n} as const;\n\n/** Bottom region of the card — typically holds actions or summary text. */\nfunction CardFooter({\n className,\n tone = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Footer fill. `brand`/`muted` render a full-width tinted band. */\n tone?: keyof typeof cardFooterTone;\n}) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center\", cardFooterTone[tone], className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n cardVariants,\n type CardProps,\n};\n"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A,WAAAA,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EAIV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,4BAA4B,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAKA,MAAM,iBAAiB;CACrB,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,WAAW,EAClB,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,qBAAqB,eAAe,OAAO,SAAS;EAClE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Card/Card.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst cardVariants = cva(\"flex flex-col gap-6 rounded-xl border text-card-foreground\", {\n variants: {\n variant: {\n // Solid surface (default).\n default: \"bg-card shadow-sm\",\n // Translucent, backdrop-blurred glass surface — reads over a textured\n // background (e.g. PageBackground). `tint` picks the --glass-* token.\n glass: \"border-transparent backdrop-blur-glass\",\n // Filled brand surface with light foreground — the active product's colour,\n // as a left-to-right gradient (darker → lighter brand shade).\n brand:\n \"border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground\",\n // Inverted surface — contrasts with the page (dark card in light mode,\n // light card in dark mode).\n inverted: \"border-transparent bg-inverse text-inverse-foreground\",\n },\n tint: {\n subtle: \"\",\n light: \"\",\n medium: \"\",\n heavy: \"\",\n },\n },\n compoundVariants: [\n { variant: \"glass\", tint: \"subtle\", class: \"bg-[var(--glass-subtle)]\" },\n { variant: \"glass\", tint: \"light\", class: \"bg-[var(--glass-light)]\" },\n { variant: \"glass\", tint: \"medium\", class: \"bg-[var(--glass-medium)]\" },\n { variant: \"glass\", tint: \"heavy\", class: \"bg-[var(--glass-heavy)]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n tint: \"light\",\n },\n});\n\ntype CardProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof cardVariants> & {\n /** Surface treatment of the card. Default `default` (solid `bg-card`). */\n variant?: VariantProps<typeof cardVariants>[\"variant\"];\n /** Glass opacity step — only applies to `variant=\"glass\"`. Default `light`. */\n tint?: VariantProps<typeof cardVariants>[\"tint\"];\n };\n\n/** Surface container with composable header/content/footer slots. */\nfunction Card({ className, variant, tint, ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-variant={variant ?? \"default\"}\n className={cn(cardVariants({ variant, tint }), className, \"justify-between\")}\n {...props}\n />\n );\n}\n\n// Vertical alignment of the header's items (title/description vs. the action).\nconst cardHeaderAlign = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n} as const;\n\n/** Top region of a card — holds the title, description, and optional action. */\nfunction CardHeader({\n className,\n align = \"center\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Vertical alignment of the header items. Default `center`. */\n align?: keyof typeof cardHeaderAlign;\n}) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n cardHeaderAlign[align],\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Card heading rendered as an `h4`. */\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return <h4 data-slot=\"card-title\" className={cn(\"leading-none\", className)} {...props} />;\n}\n\n/** Muted supporting text shown beneath the title. */\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <p data-slot=\"card-description\" className={cn(\"text-muted-foreground\", className)} {...props} />\n );\n}\n\n/** Action slot in the header row, aligned to the end alongside the title. */\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n // Sits in row 1 alongside the title (not spanning rows) and has no `self-*`,\n // so it shares the title's row and follows CardHeader's `align` — the title\n // and action then truly centre against each other regardless of height.\n className={cn(\"col-start-2 row-start-1 justify-self-end\", className)}\n {...props}\n />\n );\n}\n\n/** Main body region of the card. */\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6 [&:last-child]:pb-6\", className)}\n {...props}\n />\n );\n}\n\n// Footer fill. `default` is transparent (the usual footer); `brand`/`muted`\n// render a full-width tinted band with the action centred — pair with\n// `<Card className=\"overflow-hidden\">` so the band clips to the card radius.\nconst cardFooterTone = {\n default: \"px-6 pb-6 [.border-t]:pt-6\",\n brand: \"justify-center rounded-b-xl bg-brand-accent px-6 py-3 text-brand-accent-foreground\",\n muted: \"justify-center rounded-b-xl bg-muted px-6 py-3 text-muted-foreground\",\n card: \"justify-center rounded-b-xl bg-card px-6 py-3 text-card-foreground\",\n} as const;\n\n/** Bottom region of the card — typically holds actions or summary text. */\nfunction CardFooter({\n className,\n tone = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Footer fill. `brand`/`muted` render a full-width tinted band. */\n tone?: keyof typeof cardFooterTone;\n}) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center\", cardFooterTone[tone], className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n cardVariants,\n type CardProps,\n};\n"],"mappings":";;;;AAKA,MAAM,gBAAA,qCAAA,EAAA,KAAmB,8DAA8D;CACrF,UAAU;EACR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GA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EAIV,WAAWA,WAAAA,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,4BAA4B,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAKA,MAAM,iBAAiB;CACrB,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,WAAW,EAClB,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,qBAAqB,eAAe,OAAO,SAAS;EAClE,GAAI;CACL,CAAA;AAEL"}
@@ -5,10 +5,10 @@ import { cva } from "class-variance-authority";
5
5
  const cardVariants = cva("flex flex-col gap-6 rounded-xl border text-card-foreground", {
6
6
  variants: {
7
7
  variant: {
8
- default: "bg-card",
9
- glass: "border-transparent backdrop-blur-[var(--glass-blur)]",
8
+ default: "bg-card shadow-sm",
9
+ glass: "border-transparent backdrop-blur-glass",
10
10
  brand: "border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground",
11
- inverted: "border-transparent bg-foreground text-background"
11
+ inverted: "border-transparent bg-inverse text-inverse-foreground"
12
12
  },
13
13
  tint: {
14
14
  subtle: "",
@@ -52,7 +52,7 @@ function Card({ className, variant, tint, ...props }) {
52
52
  className: cn(cardVariants({
53
53
  variant,
54
54
  tint
55
- }), className),
55
+ }), className, "justify-between"),
56
56
  ...props
57
57
  });
58
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Card/Card.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst cardVariants = cva(\"flex flex-col gap-6 rounded-xl border text-card-foreground\", {\n variants: {\n variant: {\n // Solid surface (default).\n default: \"bg-card\",\n // Translucent, backdrop-blurred glass surface — reads over a textured\n // background (e.g. PageBackground). `tint` picks the --glass-* token.\n glass: \"border-transparent backdrop-blur-[var(--glass-blur)]\",\n // Filled brand surface with light foreground — the active product's colour,\n // as a left-to-right gradient (darker → lighter brand shade).\n brand:\n \"border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground\",\n // Inverted surface — contrasts with the page (dark card in light mode,\n // light card in dark mode).\n inverted: \"border-transparent bg-foreground text-background\",\n },\n tint: {\n subtle: \"\",\n light: \"\",\n medium: \"\",\n heavy: \"\",\n },\n },\n compoundVariants: [\n { variant: \"glass\", tint: \"subtle\", class: \"bg-[var(--glass-subtle)]\" },\n { variant: \"glass\", tint: \"light\", class: \"bg-[var(--glass-light)]\" },\n { variant: \"glass\", tint: \"medium\", class: \"bg-[var(--glass-medium)]\" },\n { variant: \"glass\", tint: \"heavy\", class: \"bg-[var(--glass-heavy)]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n tint: \"light\",\n },\n});\n\ntype CardProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof cardVariants> & {\n /** Surface treatment of the card. Default `default` (solid `bg-card`). */\n variant?: VariantProps<typeof cardVariants>[\"variant\"];\n /** Glass opacity step — only applies to `variant=\"glass\"`. Default `light`. */\n tint?: VariantProps<typeof cardVariants>[\"tint\"];\n };\n\n/** Surface container with composable header/content/footer slots. */\nfunction Card({ className, variant, tint, ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-variant={variant ?? \"default\"}\n className={cn(cardVariants({ variant, tint }), className)}\n {...props}\n />\n );\n}\n\n// Vertical alignment of the header's items (title/description vs. the action).\nconst cardHeaderAlign = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n} as const;\n\n/** Top region of a card — holds the title, description, and optional action. */\nfunction CardHeader({\n className,\n align = \"center\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Vertical alignment of the header items. Default `center`. */\n align?: keyof typeof cardHeaderAlign;\n}) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n cardHeaderAlign[align],\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Card heading rendered as an `h4`. */\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return <h4 data-slot=\"card-title\" className={cn(\"leading-none\", className)} {...props} />;\n}\n\n/** Muted supporting text shown beneath the title. */\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <p data-slot=\"card-description\" className={cn(\"text-muted-foreground\", className)} {...props} />\n );\n}\n\n/** Action slot in the header row, aligned to the end alongside the title. */\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n // Sits in row 1 alongside the title (not spanning rows) and has no `self-*`,\n // so it shares the title's row and follows CardHeader's `align` — the title\n // and action then truly centre against each other regardless of height.\n className={cn(\"col-start-2 row-start-1 justify-self-end\", className)}\n {...props}\n />\n );\n}\n\n/** Main body region of the card. */\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6 [&:last-child]:pb-6\", className)}\n {...props}\n />\n );\n}\n\n// Footer fill. `default` is transparent (the usual footer); `brand`/`muted`\n// render a full-width tinted band with the action centred — pair with\n// `<Card className=\"overflow-hidden\">` so the band clips to the card radius.\nconst cardFooterTone = {\n default: \"px-6 pb-6 [.border-t]:pt-6\",\n brand: \"justify-center rounded-b-xl bg-brand-accent px-6 py-3 text-brand-accent-foreground\",\n muted: \"justify-center rounded-b-xl bg-muted px-6 py-3 text-muted-foreground\",\n card: \"justify-center rounded-b-xl bg-card px-6 py-3 text-card-foreground\",\n} as const;\n\n/** Bottom region of the card — typically holds actions or summary text. */\nfunction CardFooter({\n className,\n tone = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Footer fill. `brand`/`muted` render a full-width tinted band. */\n tone?: keyof typeof cardFooterTone;\n}) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center\", cardFooterTone[tone], className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n cardVariants,\n type CardProps,\n};\n"],"mappings":";;;;AAKA,MAAM,eAAe,IAAI,8DAA8D;CACrF,UAAU;EACR,SAAS;GAEP,SAAS;GAGT,OAAO;GAGP,OACE;GAGF,UAAU;EACZ;EACA,MAAM;GACJ,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GAAE,SAAS;GAAS,MAAM;GAAU,OAAO;EAA2B;EACtE;GAAE,SAAS;GAAS,MAAM;GAAS,OAAO;EAA0B;EACpE;GAAE,SAAS;GAAS,MAAM;GAAU,OAAO;EAA2B;EACtE;GAAE,SAAS;GAAS,MAAM;GAAS,OAAO;EAA0B;CACtE;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC;;AAWD,SAAS,KAAK,EAAE,WAAW,SAAS,MAAM,GAAG,SAAoB;CAC/D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,WAAW,GAAG,aAAa;GAAE;GAAS;EAAK,CAAC,GAAG,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAGA,MAAM,kBAAkB;CACtB,OAAO;CACP,QAAQ;CACR,KAAK;AACP;;AAGA,SAAS,WAAW,EAClB,WACA,QAAQ,UACR,GAAG,SAIF;CACD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,uJACA,gBAAgB,QAChB,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OAAO,oBAAC,MAAD;EAAI,aAAU;EAAa,WAAW,GAAG,gBAAgB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC1F;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAsC;CAC7E,OACE,oBAAC,KAAD;EAAG,aAAU;EAAmB,WAAW,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EAIV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,4BAA4B,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAKA,MAAM,iBAAiB;CACrB,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,WAAW,EAClB,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,qBAAqB,eAAe,OAAO,SAAS;EAClE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Card/Card.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst cardVariants = cva(\"flex flex-col gap-6 rounded-xl border text-card-foreground\", {\n variants: {\n variant: {\n // Solid surface (default).\n default: \"bg-card shadow-sm\",\n // Translucent, backdrop-blurred glass surface — reads over a textured\n // background (e.g. PageBackground). `tint` picks the --glass-* token.\n glass: \"border-transparent backdrop-blur-glass\",\n // Filled brand surface with light foreground — the active product's colour,\n // as a left-to-right gradient (darker → lighter brand shade).\n brand:\n \"border-transparent bg-[image:var(--brand-surface-gradient)] text-brand-surface-foreground\",\n // Inverted surface — contrasts with the page (dark card in light mode,\n // light card in dark mode).\n inverted: \"border-transparent bg-inverse text-inverse-foreground\",\n },\n tint: {\n subtle: \"\",\n light: \"\",\n medium: \"\",\n heavy: \"\",\n },\n },\n compoundVariants: [\n { variant: \"glass\", tint: \"subtle\", class: \"bg-[var(--glass-subtle)]\" },\n { variant: \"glass\", tint: \"light\", class: \"bg-[var(--glass-light)]\" },\n { variant: \"glass\", tint: \"medium\", class: \"bg-[var(--glass-medium)]\" },\n { variant: \"glass\", tint: \"heavy\", class: \"bg-[var(--glass-heavy)]\" },\n ],\n defaultVariants: {\n variant: \"default\",\n tint: \"light\",\n },\n});\n\ntype CardProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof cardVariants> & {\n /** Surface treatment of the card. Default `default` (solid `bg-card`). */\n variant?: VariantProps<typeof cardVariants>[\"variant\"];\n /** Glass opacity step — only applies to `variant=\"glass\"`. Default `light`. */\n tint?: VariantProps<typeof cardVariants>[\"tint\"];\n };\n\n/** Surface container with composable header/content/footer slots. */\nfunction Card({ className, variant, tint, ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-variant={variant ?? \"default\"}\n className={cn(cardVariants({ variant, tint }), className, \"justify-between\")}\n {...props}\n />\n );\n}\n\n// Vertical alignment of the header's items (title/description vs. the action).\nconst cardHeaderAlign = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n} as const;\n\n/** Top region of a card — holds the title, description, and optional action. */\nfunction CardHeader({\n className,\n align = \"center\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Vertical alignment of the header items. Default `center`. */\n align?: keyof typeof cardHeaderAlign;\n}) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n cardHeaderAlign[align],\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Card heading rendered as an `h4`. */\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return <h4 data-slot=\"card-title\" className={cn(\"leading-none\", className)} {...props} />;\n}\n\n/** Muted supporting text shown beneath the title. */\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <p data-slot=\"card-description\" className={cn(\"text-muted-foreground\", className)} {...props} />\n );\n}\n\n/** Action slot in the header row, aligned to the end alongside the title. */\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n // Sits in row 1 alongside the title (not spanning rows) and has no `self-*`,\n // so it shares the title's row and follows CardHeader's `align` — the title\n // and action then truly centre against each other regardless of height.\n className={cn(\"col-start-2 row-start-1 justify-self-end\", className)}\n {...props}\n />\n );\n}\n\n/** Main body region of the card. */\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6 [&:last-child]:pb-6\", className)}\n {...props}\n />\n );\n}\n\n// Footer fill. `default` is transparent (the usual footer); `brand`/`muted`\n// render a full-width tinted band with the action centred — pair with\n// `<Card className=\"overflow-hidden\">` so the band clips to the card radius.\nconst cardFooterTone = {\n default: \"px-6 pb-6 [.border-t]:pt-6\",\n brand: \"justify-center rounded-b-xl bg-brand-accent px-6 py-3 text-brand-accent-foreground\",\n muted: \"justify-center rounded-b-xl bg-muted px-6 py-3 text-muted-foreground\",\n card: \"justify-center rounded-b-xl bg-card px-6 py-3 text-card-foreground\",\n} as const;\n\n/** Bottom region of the card — typically holds actions or summary text. */\nfunction CardFooter({\n className,\n tone = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Footer fill. `brand`/`muted` render a full-width tinted band. */\n tone?: keyof typeof cardFooterTone;\n}) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center\", cardFooterTone[tone], className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n cardVariants,\n type CardProps,\n};\n"],"mappings":";;;;AAKA,MAAM,eAAe,IAAI,8DAA8D;CACrF,UAAU;EACR,SAAS;GAEP,SAAS;GAGT,OAAO;GAGP,OACE;GAGF,UAAU;EACZ;EACA,MAAM;GACJ,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GAAE,SAAS;GAAS,MAAM;GAAU,OAAO;EAA2B;EACtE;GAAE,SAAS;GAAS,MAAM;GAAS,OAAO;EAA0B;EACpE;GAAE,SAAS;GAAS,MAAM;GAAU,OAAO;EAA2B;EACtE;GAAE,SAAS;GAAS,MAAM;GAAS,OAAO;EAA0B;CACtE;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC;;AAWD,SAAS,KAAK,EAAE,WAAW,SAAS,MAAM,GAAG,SAAoB;CAC/D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,WAAW,GAAG,aAAa;GAAE;GAAS;EAAK,CAAC,GAAG,WAAW,iBAAiB;EAC3E,GAAI;CACL,CAAA;AAEL;AAGA,MAAM,kBAAkB;CACtB,OAAO;CACP,QAAQ;CACR,KAAK;AACP;;AAGA,SAAS,WAAW,EAClB,WACA,QAAQ,UACR,GAAG,SAIF;CACD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,uJACA,gBAAgB,QAChB,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OAAO,oBAAC,MAAD;EAAI,aAAU;EAAa,WAAW,GAAG,gBAAgB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC1F;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAsC;CAC7E,OACE,oBAAC,KAAD;EAAG,aAAU;EAAmB,WAAW,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EAIV,WAAW,GAAG,4CAA4C,SAAS;EACnE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,4BAA4B,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAKA,MAAM,iBAAiB;CACrB,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,WAAW,EAClB,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,qBAAqB,eAAe,OAAO,SAAS;EAClE,GAAI;CACL,CAAA;AAEL"}
@@ -86,7 +86,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
86
86
  if (!active || !payload?.length) return null;
87
87
  const nestLabel = payload.length === 1 && indicator !== "dot";
88
88
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
89
- className: require_cn.cn("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", className),
89
+ className: require_cn.cn("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", className),
90
90
  children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
91
91
  className: "grid gap-1.5",
92
92
  children: payload.filter((item) => item.type !== "none").map((item, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["React","cn","RechartsPrimitive"],"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,eAAeA,MAAM,cAAwC,IAAI;AAEvE,SAAS,WAAW;CAClB,MAAM,UAAUA,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,WAAWA,MAAM,MAAM;CAC7B,MAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE;CAExD,OACE,iBAAA,GAAA,kBAAA,KAAC,aAAa,UAAd;EAAuB,OAAO,E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;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.cjs","names":["React","cn","RechartsPrimitive"],"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,eAAeA,MAAM,cAAwC,IAAI;AAEvE,SAAS,WAAW;CAClB,MAAM,UAAUA,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,WAAWA,MAAM,MAAM;CAC7B,MAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE;CAExD,OACE,iBAAA,GAAA,kBAAA,KAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,cAAY;GACZ,WAAWC,WAAAA,GACT,+pBACA,SACF;GACA,GAAI;aAPN,CASE,iBAAA,GAAA,kBAAA,KAAC,YAAD;IAAY,IAAI;IAAiB;GAAS,CAAA,GAC1C,iBAAA,GAAA,kBAAA,KAACC,SAAkB,qBAAnB;IAAyD;IACtD;GACoC,CAAA,CACpC;;CACgB,CAAA;AAE3B;;AAGA,MAAM,cAAc,EAAE,IAAI,aAAkD;CAC1E,MAAM,cAAc,OAAO,QAAQ,MAAM,EAAE,QAAQ,GAAG,YAAY,OAAO,SAAS,OAAO,KAAK;CAE9F,IAAI,CAAC,YAAY,QACf,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,KAAC,SAAD,EACE,yBAAyB,EACvB,QAAQ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@@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
82
82
  if (!active || !payload?.length) return null;
83
83
  const nestLabel = payload.length === 1 && indicator !== "dot";
84
84
  return /* @__PURE__ */ jsxs("div", {
85
- className: cn("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", className),
85
+ className: cn("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", className),
86
86
  children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
87
87
  className: "grid gap-1.5",
88
88
  children: payload.filter((item) => item.type !== "none").map((item, index) => {