@psnext/design-system 1.5.1 → 2.1.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 (646) hide show
  1. package/DESIGN.md +639 -0
  2. package/README.md +39 -2
  3. package/SKILL.md +101 -0
  4. package/bin/install-agent-skill.mjs +54 -0
  5. package/dist/Header.cjs +32 -29
  6. package/dist/Header.cjs.map +1 -1
  7. package/dist/Header.js +32 -29
  8. package/dist/Header.js.map +1 -1
  9. package/dist/Icon.cjs +19 -19
  10. package/dist/Icon.cjs.map +1 -1
  11. package/dist/Icon.js +19 -19
  12. package/dist/Icon.js.map +1 -1
  13. package/dist/Logo.cjs +4 -14
  14. package/dist/Logo.cjs.map +1 -1
  15. package/dist/Logo.js +4 -14
  16. package/dist/Logo.js.map +1 -1
  17. package/dist/Sidebar.cjs +26 -20
  18. package/dist/Sidebar.cjs.map +1 -1
  19. package/dist/Sidebar.js +21 -21
  20. package/dist/Sidebar.js.map +1 -1
  21. package/dist/cn.cjs +14 -1
  22. package/dist/cn.cjs.map +1 -1
  23. package/dist/cn.js +14 -1
  24. package/dist/cn.js.map +1 -1
  25. package/dist/index.cjs +13 -10
  26. package/dist/index.d.cts +5 -5
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +5 -4
  31. package/dist/index10.d.cts +4 -4
  32. package/dist/index10.d.cts.map +1 -1
  33. package/dist/index10.d.ts +7 -7
  34. package/dist/index11.d.cts +3 -3
  35. package/dist/index11.d.cts.map +1 -1
  36. package/dist/index11.d.ts +3 -3
  37. package/dist/index11.d.ts.map +1 -1
  38. package/dist/index12.d.cts +18 -17
  39. package/dist/index12.d.cts.map +1 -1
  40. package/dist/index12.d.ts +18 -17
  41. package/dist/index12.d.ts.map +1 -1
  42. package/dist/index13.d.cts +6 -6
  43. package/dist/index13.d.cts.map +1 -1
  44. package/dist/index13.d.ts +6 -6
  45. package/dist/index14.d.cts +5 -5
  46. package/dist/index14.d.cts.map +1 -1
  47. package/dist/index14.d.ts +5 -5
  48. package/dist/index14.d.ts.map +1 -1
  49. package/dist/index15.d.cts +3 -3
  50. package/dist/index15.d.cts.map +1 -1
  51. package/dist/index15.d.ts +3 -3
  52. package/dist/index15.d.ts.map +1 -1
  53. package/dist/index16.d.cts +2 -2
  54. package/dist/index16.d.cts.map +1 -1
  55. package/dist/index16.d.ts +2 -2
  56. package/dist/index17.d.cts +4 -4
  57. package/dist/index17.d.cts.map +1 -1
  58. package/dist/index17.d.ts +4 -4
  59. package/dist/index17.d.ts.map +1 -1
  60. package/dist/index18.d.cts +11 -11
  61. package/dist/index18.d.cts.map +1 -1
  62. package/dist/index18.d.ts +11 -11
  63. package/dist/index19.d.cts +10 -10
  64. package/dist/index19.d.cts.map +1 -1
  65. package/dist/index19.d.ts +10 -10
  66. package/dist/index19.d.ts.map +1 -1
  67. package/dist/index2.d.cts +8 -8
  68. package/dist/index2.d.cts.map +1 -1
  69. package/dist/index2.d.ts +8 -8
  70. package/dist/index2.d.ts.map +1 -1
  71. package/dist/index20.d.cts +16 -16
  72. package/dist/index20.d.cts.map +1 -1
  73. package/dist/index20.d.ts +16 -16
  74. package/dist/index20.d.ts.map +1 -1
  75. package/dist/index21.d.cts +4 -4
  76. package/dist/index21.d.cts.map +1 -1
  77. package/dist/index21.d.ts +4 -4
  78. package/dist/index22.d.cts +11 -11
  79. package/dist/index22.d.cts.map +1 -1
  80. package/dist/index22.d.ts +11 -11
  81. package/dist/index22.d.ts.map +1 -1
  82. package/dist/index23.d.cts +16 -16
  83. package/dist/index23.d.cts.map +1 -1
  84. package/dist/index23.d.ts +16 -16
  85. package/dist/index23.d.ts.map +1 -1
  86. package/dist/index24.d.cts +10 -10
  87. package/dist/index24.d.cts.map +1 -1
  88. package/dist/index24.d.ts +10 -10
  89. package/dist/index25.d.cts +2 -2
  90. package/dist/index25.d.ts +2 -2
  91. package/dist/index26.d.cts +13 -13
  92. package/dist/index26.d.ts +14 -14
  93. package/dist/index26.d.ts.map +1 -1
  94. package/dist/index27.d.cts +7 -7
  95. package/dist/index27.d.cts.map +1 -1
  96. package/dist/index27.d.ts +7 -7
  97. package/dist/index27.d.ts.map +1 -1
  98. package/dist/index28.d.cts +5 -5
  99. package/dist/index28.d.ts +5 -5
  100. package/dist/index28.d.ts.map +1 -1
  101. package/dist/index29.d.cts +4 -4
  102. package/dist/index29.d.ts +4 -4
  103. package/dist/index29.d.ts.map +1 -1
  104. package/dist/index3.d.cts +13 -13
  105. package/dist/index3.d.cts.map +1 -1
  106. package/dist/index3.d.ts +13 -13
  107. package/dist/index3.d.ts.map +1 -1
  108. package/dist/index30.d.cts +5 -5
  109. package/dist/index30.d.ts +5 -5
  110. package/dist/index31.d.cts +5 -5
  111. package/dist/index31.d.cts.map +1 -1
  112. package/dist/index31.d.ts +5 -5
  113. package/dist/index31.d.ts.map +1 -1
  114. package/dist/index32.d.cts +8 -5
  115. package/dist/index32.d.cts.map +1 -1
  116. package/dist/index32.d.ts +9 -6
  117. package/dist/index32.d.ts.map +1 -1
  118. package/dist/index33.d.cts +14 -10
  119. package/dist/index33.d.cts.map +1 -1
  120. package/dist/index33.d.ts +14 -10
  121. package/dist/index33.d.ts.map +1 -1
  122. package/dist/index34.d.cts +5 -5
  123. package/dist/index34.d.ts +5 -5
  124. package/dist/index35.d.cts +14 -14
  125. package/dist/index35.d.ts +16 -16
  126. package/dist/index35.d.ts.map +1 -1
  127. package/dist/index36.d.cts +3 -3
  128. package/dist/index36.d.cts.map +1 -1
  129. package/dist/index36.d.ts +3 -3
  130. package/dist/index36.d.ts.map +1 -1
  131. package/dist/index37.d.cts +5 -5
  132. package/dist/index37.d.cts.map +1 -1
  133. package/dist/index37.d.ts +4 -4
  134. package/dist/index37.d.ts.map +1 -1
  135. package/dist/index38.d.cts +2 -2
  136. package/dist/index38.d.ts +2 -2
  137. package/dist/index39.d.cts +17 -17
  138. package/dist/index39.d.cts.map +1 -1
  139. package/dist/index39.d.ts +17 -17
  140. package/dist/index39.d.ts.map +1 -1
  141. package/dist/index4.d.cts +2 -2
  142. package/dist/index4.d.cts.map +1 -1
  143. package/dist/index4.d.ts +2 -2
  144. package/dist/index4.d.ts.map +1 -1
  145. package/dist/index40.d.cts +4 -4
  146. package/dist/index40.d.ts +5 -5
  147. package/dist/index40.d.ts.map +1 -1
  148. package/dist/index41.d.cts +11 -11
  149. package/dist/index41.d.cts.map +1 -1
  150. package/dist/index41.d.ts +11 -11
  151. package/dist/index41.d.ts.map +1 -1
  152. package/dist/index42.d.cts +8 -8
  153. package/dist/index42.d.cts.map +1 -1
  154. package/dist/index42.d.ts +8 -8
  155. package/dist/index42.d.ts.map +1 -1
  156. package/dist/index43.d.cts +10 -10
  157. package/dist/index43.d.cts.map +1 -1
  158. package/dist/index43.d.ts +10 -10
  159. package/dist/index43.d.ts.map +1 -1
  160. package/dist/index44.d.cts +1 -48
  161. package/dist/index44.d.ts +1 -48
  162. package/dist/index45.d.cts +42 -22
  163. package/dist/index45.d.cts.map +1 -1
  164. package/dist/index45.d.ts +42 -22
  165. package/dist/index45.d.ts.map +1 -1
  166. package/dist/index46.d.cts +21 -34
  167. package/dist/index46.d.cts.map +1 -1
  168. package/dist/index46.d.ts +21 -34
  169. package/dist/index46.d.ts.map +1 -1
  170. package/dist/index47.d.cts +33 -17
  171. package/dist/index47.d.cts.map +1 -1
  172. package/dist/index47.d.ts +33 -17
  173. package/dist/index47.d.ts.map +1 -1
  174. package/dist/index48.d.cts +18 -14
  175. package/dist/index48.d.cts.map +1 -1
  176. package/dist/index48.d.ts +18 -14
  177. package/dist/index48.d.ts.map +1 -1
  178. package/dist/index49.d.cts +12 -60
  179. package/dist/index49.d.cts.map +1 -1
  180. package/dist/index49.d.ts +12 -60
  181. package/dist/index49.d.ts.map +1 -1
  182. package/dist/index5.d.cts +7 -7
  183. package/dist/index5.d.cts.map +1 -1
  184. package/dist/index5.d.ts +7 -7
  185. package/dist/index5.d.ts.map +1 -1
  186. package/dist/index50.d.cts +55 -49
  187. package/dist/index50.d.cts.map +1 -1
  188. package/dist/index50.d.ts +55 -49
  189. package/dist/index50.d.ts.map +1 -1
  190. package/dist/index51.d.cts +56 -24
  191. package/dist/index51.d.cts.map +1 -1
  192. package/dist/index51.d.ts +56 -24
  193. package/dist/index51.d.ts.map +1 -1
  194. package/dist/index52.d.cts +25 -203
  195. package/dist/index52.d.cts.map +1 -1
  196. package/dist/index52.d.ts +25 -203
  197. package/dist/index52.d.ts.map +1 -1
  198. package/dist/index53.d.cts +198 -15
  199. package/dist/index53.d.cts.map +1 -1
  200. package/dist/index53.d.ts +198 -15
  201. package/dist/index53.d.ts.map +1 -1
  202. package/dist/index54.d.cts +21 -23
  203. package/dist/index54.d.cts.map +1 -1
  204. package/dist/index54.d.ts +21 -23
  205. package/dist/index54.d.ts.map +1 -1
  206. package/dist/index55.d.cts +21 -18
  207. package/dist/index55.d.cts.map +1 -1
  208. package/dist/index55.d.ts +21 -18
  209. package/dist/index55.d.ts.map +1 -1
  210. package/dist/index56.d.cts +21 -8
  211. package/dist/index56.d.cts.map +1 -1
  212. package/dist/index56.d.ts +21 -8
  213. package/dist/index56.d.ts.map +1 -1
  214. package/dist/index57.d.cts +6 -44
  215. package/dist/index57.d.cts.map +1 -1
  216. package/dist/index57.d.ts +6 -44
  217. package/dist/index57.d.ts.map +1 -1
  218. package/dist/index58.d.cts +46 -47
  219. package/dist/index58.d.cts.map +1 -1
  220. package/dist/index58.d.ts +46 -47
  221. package/dist/index58.d.ts.map +1 -1
  222. package/dist/index59.d.cts +47 -59
  223. package/dist/index59.d.cts.map +1 -1
  224. package/dist/index59.d.ts +47 -59
  225. package/dist/index59.d.ts.map +1 -1
  226. package/dist/index6.d.cts +7 -7
  227. package/dist/index6.d.cts.map +1 -1
  228. package/dist/index6.d.ts +7 -7
  229. package/dist/index6.d.ts.map +1 -1
  230. package/dist/index60.d.cts +55 -37
  231. package/dist/index60.d.cts.map +1 -1
  232. package/dist/index60.d.ts +56 -38
  233. package/dist/index60.d.ts.map +1 -1
  234. package/dist/index61.d.cts +38 -14
  235. package/dist/index61.d.cts.map +1 -1
  236. package/dist/index61.d.ts +38 -14
  237. package/dist/index61.d.ts.map +1 -1
  238. package/dist/index62.d.cts +20 -41
  239. package/dist/index62.d.cts.map +1 -1
  240. package/dist/index62.d.ts +20 -41
  241. package/dist/index62.d.ts.map +1 -1
  242. package/dist/index63.d.cts +41 -19
  243. package/dist/index63.d.cts.map +1 -1
  244. package/dist/index63.d.ts +41 -19
  245. package/dist/index63.d.ts.map +1 -1
  246. package/dist/index64.d.cts +14 -39
  247. package/dist/index64.d.cts.map +1 -1
  248. package/dist/index64.d.ts +14 -39
  249. package/dist/index64.d.ts.map +1 -1
  250. package/dist/index65.d.cts +39 -16
  251. package/dist/index65.d.cts.map +1 -1
  252. package/dist/index65.d.ts +39 -16
  253. package/dist/index65.d.ts.map +1 -1
  254. package/dist/index66.d.cts +18 -12
  255. package/dist/index66.d.cts.map +1 -1
  256. package/dist/index66.d.ts +18 -12
  257. package/dist/index66.d.ts.map +1 -1
  258. package/dist/index67.d.cts +12 -30
  259. package/dist/index67.d.cts.map +1 -1
  260. package/dist/index67.d.ts +12 -30
  261. package/dist/index67.d.ts.map +1 -1
  262. package/dist/index68.d.cts +26 -25
  263. package/dist/index68.d.cts.map +1 -1
  264. package/dist/index68.d.ts +28 -27
  265. package/dist/index68.d.ts.map +1 -1
  266. package/dist/index69.d.cts +36 -69
  267. package/dist/index69.d.cts.map +1 -0
  268. package/dist/index69.d.ts +36 -69
  269. package/dist/index69.d.ts.map +1 -0
  270. package/dist/index7.d.cts +8 -8
  271. package/dist/index7.d.cts.map +1 -1
  272. package/dist/index7.d.ts +8 -8
  273. package/dist/index70.d.cts +76 -237
  274. package/dist/index70.d.cts.map +1 -1
  275. package/dist/index70.d.ts +76 -237
  276. package/dist/index70.d.ts.map +1 -1
  277. package/dist/index71.d.cts +249 -0
  278. package/dist/index71.d.cts.map +1 -0
  279. package/dist/index71.d.ts +249 -0
  280. package/dist/index71.d.ts.map +1 -0
  281. package/dist/index8.d.cts +4 -4
  282. package/dist/index8.d.cts.map +1 -1
  283. package/dist/index8.d.ts +4 -4
  284. package/dist/index8.d.ts.map +1 -1
  285. package/dist/index9.d.cts +2 -2
  286. package/dist/index9.d.cts.map +1 -1
  287. package/dist/index9.d.ts +2 -2
  288. package/dist/layouts/Container/index.cjs +4 -4
  289. package/dist/layouts/Container/index.cjs.map +1 -1
  290. package/dist/layouts/Container/index.d.cts +1 -1
  291. package/dist/layouts/Container/index.d.ts +1 -1
  292. package/dist/layouts/Container/index.js +4 -4
  293. package/dist/layouts/Container/index.js.map +1 -1
  294. package/dist/layouts/PageBackground/index.cjs +2 -2
  295. package/dist/layouts/PageBackground/index.cjs.map +1 -1
  296. package/dist/layouts/PageBackground/index.d.cts +1 -1
  297. package/dist/layouts/PageBackground/index.d.ts +1 -1
  298. package/dist/layouts/PageBackground/index.js +2 -2
  299. package/dist/layouts/PageBackground/index.js.map +1 -1
  300. package/dist/layouts/Stack/index.d.cts +1 -1
  301. package/dist/layouts/Stack/index.d.ts +1 -1
  302. package/dist/layouts/TwoColumn/index.d.cts +1 -1
  303. package/dist/layouts/TwoColumn/index.d.ts +1 -1
  304. package/dist/layouts/index.d.cts +4 -4
  305. package/dist/layouts/index.d.ts +4 -4
  306. package/dist/patterns/DataTable/index.cjs +12 -7
  307. package/dist/patterns/DataTable/index.cjs.map +1 -1
  308. package/dist/patterns/DataTable/index.d.cts +3 -3
  309. package/dist/patterns/DataTable/index.d.cts.map +1 -1
  310. package/dist/patterns/DataTable/index.d.ts +3 -3
  311. package/dist/patterns/DataTable/index.d.ts.map +1 -1
  312. package/dist/patterns/DataTable/index.js +12 -7
  313. package/dist/patterns/DataTable/index.js.map +1 -1
  314. package/dist/patterns/Footer/index.cjs +5 -5
  315. package/dist/patterns/Footer/index.cjs.map +1 -1
  316. package/dist/patterns/Footer/index.d.cts +9 -9
  317. package/dist/patterns/Footer/index.d.cts.map +1 -1
  318. package/dist/patterns/Footer/index.d.ts +9 -9
  319. package/dist/patterns/Footer/index.d.ts.map +1 -1
  320. package/dist/patterns/Footer/index.js +5 -5
  321. package/dist/patterns/Footer/index.js.map +1 -1
  322. package/dist/patterns/Header/index.d.cts +1 -1
  323. package/dist/patterns/Header/index.d.ts +1 -1
  324. package/dist/patterns/MediaObject/index.cjs +1 -1
  325. package/dist/patterns/MediaObject/index.cjs.map +1 -1
  326. package/dist/patterns/MediaObject/index.d.cts +13 -13
  327. package/dist/patterns/MediaObject/index.d.cts.map +1 -1
  328. package/dist/patterns/MediaObject/index.d.ts +10 -10
  329. package/dist/patterns/MediaObject/index.js +1 -1
  330. package/dist/patterns/MediaObject/index.js.map +1 -1
  331. package/dist/patterns/NavRail/index.cjs +195 -0
  332. package/dist/patterns/NavRail/index.cjs.map +1 -0
  333. package/dist/patterns/NavRail/index.d.cts +2 -0
  334. package/dist/patterns/NavRail/index.d.ts +2 -0
  335. package/dist/patterns/NavRail/index.js +185 -0
  336. package/dist/patterns/NavRail/index.js.map +1 -0
  337. package/dist/patterns/SectionCard/index.cjs +1 -1
  338. package/dist/patterns/SectionCard/index.cjs.map +1 -1
  339. package/dist/patterns/SectionCard/index.d.cts +2 -2
  340. package/dist/patterns/SectionCard/index.d.cts.map +1 -1
  341. package/dist/patterns/SectionCard/index.d.ts +2 -2
  342. package/dist/patterns/SectionCard/index.d.ts.map +1 -1
  343. package/dist/patterns/SectionCard/index.js +1 -1
  344. package/dist/patterns/SectionCard/index.js.map +1 -1
  345. package/dist/patterns/SectionHeading/index.d.cts +2 -2
  346. package/dist/patterns/SectionHeading/index.d.cts.map +1 -1
  347. package/dist/patterns/SectionHeading/index.d.ts +2 -2
  348. package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
  349. package/dist/patterns/index.cjs +9 -0
  350. package/dist/patterns/index.d.cts +3 -2
  351. package/dist/patterns/index.d.ts +3 -2
  352. package/dist/patterns/index.js +2 -1
  353. package/dist/primitives/Accordion/index.cjs +6 -6
  354. package/dist/primitives/Accordion/index.cjs.map +1 -1
  355. package/dist/primitives/Accordion/index.js +6 -6
  356. package/dist/primitives/Accordion/index.js.map +1 -1
  357. package/dist/primitives/Alert/index.cjs +4 -4
  358. package/dist/primitives/Alert/index.cjs.map +1 -1
  359. package/dist/primitives/Alert/index.js +4 -4
  360. package/dist/primitives/Alert/index.js.map +1 -1
  361. package/dist/primitives/AlertDialog/index.cjs +4 -4
  362. package/dist/primitives/AlertDialog/index.cjs.map +1 -1
  363. package/dist/primitives/AlertDialog/index.js +4 -4
  364. package/dist/primitives/AlertDialog/index.js.map +1 -1
  365. package/dist/primitives/Avatar/index.cjs +5 -5
  366. package/dist/primitives/Avatar/index.cjs.map +1 -1
  367. package/dist/primitives/Avatar/index.js +5 -5
  368. package/dist/primitives/Avatar/index.js.map +1 -1
  369. package/dist/primitives/Badge/index.cjs +11 -10
  370. package/dist/primitives/Badge/index.cjs.map +1 -1
  371. package/dist/primitives/Badge/index.js +11 -10
  372. package/dist/primitives/Badge/index.js.map +1 -1
  373. package/dist/primitives/Breadcrumb/index.cjs +4 -4
  374. package/dist/primitives/Breadcrumb/index.cjs.map +1 -1
  375. package/dist/primitives/Breadcrumb/index.js +4 -4
  376. package/dist/primitives/Breadcrumb/index.js.map +1 -1
  377. package/dist/primitives/Button/index.cjs +20 -13
  378. package/dist/primitives/Button/index.cjs.map +1 -1
  379. package/dist/primitives/Button/index.js +20 -13
  380. package/dist/primitives/Button/index.js.map +1 -1
  381. package/dist/primitives/ButtonGroup/index.cjs +3 -3
  382. package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
  383. package/dist/primitives/ButtonGroup/index.js +3 -3
  384. package/dist/primitives/ButtonGroup/index.js.map +1 -1
  385. package/dist/primitives/Calendar/index.cjs +22 -21
  386. package/dist/primitives/Calendar/index.cjs.map +1 -1
  387. package/dist/primitives/Calendar/index.js +22 -21
  388. package/dist/primitives/Calendar/index.js.map +1 -1
  389. package/dist/primitives/Card/index.cjs +18 -16
  390. package/dist/primitives/Card/index.cjs.map +1 -1
  391. package/dist/primitives/Card/index.js +18 -16
  392. package/dist/primitives/Card/index.js.map +1 -1
  393. package/dist/primitives/Carousel/index.cjs +2 -2
  394. package/dist/primitives/Carousel/index.cjs.map +1 -1
  395. package/dist/primitives/Carousel/index.js +2 -2
  396. package/dist/primitives/Carousel/index.js.map +1 -1
  397. package/dist/primitives/Chart/index.cjs +12 -12
  398. package/dist/primitives/Chart/index.cjs.map +1 -1
  399. package/dist/primitives/Chart/index.js +12 -12
  400. package/dist/primitives/Chart/index.js.map +1 -1
  401. package/dist/primitives/Checkbox/index.cjs +6 -6
  402. package/dist/primitives/Checkbox/index.cjs.map +1 -1
  403. package/dist/primitives/Checkbox/index.js +6 -6
  404. package/dist/primitives/Checkbox/index.js.map +1 -1
  405. package/dist/primitives/CheckboxTree/index.cjs +2 -2
  406. package/dist/primitives/CheckboxTree/index.cjs.map +1 -1
  407. package/dist/primitives/CheckboxTree/index.js +2 -2
  408. package/dist/primitives/CheckboxTree/index.js.map +1 -1
  409. package/dist/primitives/Command/index.cjs +9 -9
  410. package/dist/primitives/Command/index.cjs.map +1 -1
  411. package/dist/primitives/Command/index.js +9 -9
  412. package/dist/primitives/Command/index.js.map +1 -1
  413. package/dist/primitives/ContextMenu/index.cjs +10 -10
  414. package/dist/primitives/ContextMenu/index.cjs.map +1 -1
  415. package/dist/primitives/ContextMenu/index.js +10 -10
  416. package/dist/primitives/ContextMenu/index.js.map +1 -1
  417. package/dist/primitives/Credits/index.cjs +4 -4
  418. package/dist/primitives/Credits/index.cjs.map +1 -1
  419. package/dist/primitives/Credits/index.js +4 -4
  420. package/dist/primitives/Credits/index.js.map +1 -1
  421. package/dist/primitives/Dialog/index.cjs +5 -5
  422. package/dist/primitives/Dialog/index.cjs.map +1 -1
  423. package/dist/primitives/Dialog/index.js +5 -5
  424. package/dist/primitives/Dialog/index.js.map +1 -1
  425. package/dist/primitives/Drawer/index.cjs +5 -5
  426. package/dist/primitives/Drawer/index.cjs.map +1 -1
  427. package/dist/primitives/Drawer/index.js +5 -5
  428. package/dist/primitives/Drawer/index.js.map +1 -1
  429. package/dist/primitives/DropdownMenu/index.cjs +9 -9
  430. package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
  431. package/dist/primitives/DropdownMenu/index.js +9 -9
  432. package/dist/primitives/DropdownMenu/index.js.map +1 -1
  433. package/dist/primitives/Empty/index.cjs +4 -4
  434. package/dist/primitives/Empty/index.cjs.map +1 -1
  435. package/dist/primitives/Empty/index.js +4 -4
  436. package/dist/primitives/Empty/index.js.map +1 -1
  437. package/dist/primitives/Field/index.cjs +5 -5
  438. package/dist/primitives/Field/index.cjs.map +1 -1
  439. package/dist/primitives/Field/index.js +5 -5
  440. package/dist/primitives/Field/index.js.map +1 -1
  441. package/dist/primitives/Form/index.cjs +1 -1
  442. package/dist/primitives/Form/index.cjs.map +1 -1
  443. package/dist/primitives/Form/index.js +1 -1
  444. package/dist/primitives/Form/index.js.map +1 -1
  445. package/dist/primitives/Heading/index.cjs +2 -2
  446. package/dist/primitives/Heading/index.cjs.map +1 -1
  447. package/dist/primitives/Heading/index.js +2 -2
  448. package/dist/primitives/Heading/index.js.map +1 -1
  449. package/dist/primitives/HoverCard/index.cjs +1 -1
  450. package/dist/primitives/HoverCard/index.cjs.map +1 -1
  451. package/dist/primitives/HoverCard/index.js +1 -1
  452. package/dist/primitives/HoverCard/index.js.map +1 -1
  453. package/dist/primitives/InfoBanner/index.cjs +12 -12
  454. package/dist/primitives/InfoBanner/index.cjs.map +1 -1
  455. package/dist/primitives/InfoBanner/index.js +12 -12
  456. package/dist/primitives/InfoBanner/index.js.map +1 -1
  457. package/dist/primitives/Input/index.cjs +13 -7
  458. package/dist/primitives/Input/index.cjs.map +1 -1
  459. package/dist/primitives/Input/index.js +13 -7
  460. package/dist/primitives/Input/index.js.map +1 -1
  461. package/dist/primitives/InputGroup/index.cjs +7 -7
  462. package/dist/primitives/InputGroup/index.cjs.map +1 -1
  463. package/dist/primitives/InputGroup/index.js +7 -7
  464. package/dist/primitives/InputGroup/index.js.map +1 -1
  465. package/dist/primitives/InputOtp/index.cjs +3 -3
  466. package/dist/primitives/InputOtp/index.cjs.map +1 -1
  467. package/dist/primitives/InputOtp/index.js +3 -3
  468. package/dist/primitives/InputOtp/index.js.map +1 -1
  469. package/dist/primitives/Item/index.cjs +6 -6
  470. package/dist/primitives/Item/index.cjs.map +1 -1
  471. package/dist/primitives/Item/index.js +6 -6
  472. package/dist/primitives/Item/index.js.map +1 -1
  473. package/dist/primitives/Kbd/index.cjs +1 -1
  474. package/dist/primitives/Kbd/index.cjs.map +1 -1
  475. package/dist/primitives/Kbd/index.js +1 -1
  476. package/dist/primitives/Kbd/index.js.map +1 -1
  477. package/dist/primitives/Link/index.cjs +4 -4
  478. package/dist/primitives/Link/index.cjs.map +1 -1
  479. package/dist/primitives/Link/index.js +4 -4
  480. package/dist/primitives/Link/index.js.map +1 -1
  481. package/dist/primitives/Menubar/index.cjs +12 -12
  482. package/dist/primitives/Menubar/index.cjs.map +1 -1
  483. package/dist/primitives/Menubar/index.js +12 -12
  484. package/dist/primitives/Menubar/index.js.map +1 -1
  485. package/dist/primitives/NativeSelect/index.cjs +5 -5
  486. package/dist/primitives/NativeSelect/index.cjs.map +1 -1
  487. package/dist/primitives/NativeSelect/index.js +5 -5
  488. package/dist/primitives/NativeSelect/index.js.map +1 -1
  489. package/dist/primitives/NavRail/index.cjs +9 -194
  490. package/dist/primitives/NavRail/index.d.cts +1 -0
  491. package/dist/primitives/NavRail/index.d.ts +1 -0
  492. package/dist/primitives/NavRail/index.js +1 -184
  493. package/dist/primitives/NavigationMenu/index.cjs +7 -7
  494. package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
  495. package/dist/primitives/NavigationMenu/index.js +7 -7
  496. package/dist/primitives/NavigationMenu/index.js.map +1 -1
  497. package/dist/primitives/Pagination/index.cjs +7 -13
  498. package/dist/primitives/Pagination/index.cjs.map +1 -1
  499. package/dist/primitives/Pagination/index.d.cts +1 -1
  500. package/dist/primitives/Pagination/index.d.ts +1 -1
  501. package/dist/primitives/Pagination/index.js +8 -14
  502. package/dist/primitives/Pagination/index.js.map +1 -1
  503. package/dist/primitives/Popover/index.cjs +4 -4
  504. package/dist/primitives/Popover/index.cjs.map +1 -1
  505. package/dist/primitives/Popover/index.js +4 -4
  506. package/dist/primitives/Popover/index.js.map +1 -1
  507. package/dist/primitives/Progress/index.cjs +16 -16
  508. package/dist/primitives/Progress/index.cjs.map +1 -1
  509. package/dist/primitives/Progress/index.d.cts +1 -1
  510. package/dist/primitives/Progress/index.d.ts +1 -1
  511. package/dist/primitives/Progress/index.js +16 -16
  512. package/dist/primitives/Progress/index.js.map +1 -1
  513. package/dist/primitives/RadioGroup/index.cjs +7 -7
  514. package/dist/primitives/RadioGroup/index.cjs.map +1 -1
  515. package/dist/primitives/RadioGroup/index.d.cts +1 -1
  516. package/dist/primitives/RadioGroup/index.d.ts +1 -1
  517. package/dist/primitives/RadioGroup/index.js +7 -7
  518. package/dist/primitives/RadioGroup/index.js.map +1 -1
  519. package/dist/primitives/Resizable/index.cjs +2 -2
  520. package/dist/primitives/Resizable/index.cjs.map +1 -1
  521. package/dist/primitives/Resizable/index.d.cts +1 -1
  522. package/dist/primitives/Resizable/index.d.ts +1 -1
  523. package/dist/primitives/Resizable/index.js +2 -2
  524. package/dist/primitives/Resizable/index.js.map +1 -1
  525. package/dist/primitives/ScrollArea/index.cjs +2 -2
  526. package/dist/primitives/ScrollArea/index.cjs.map +1 -1
  527. package/dist/primitives/ScrollArea/index.d.cts +1 -1
  528. package/dist/primitives/ScrollArea/index.d.ts +1 -1
  529. package/dist/primitives/ScrollArea/index.js +2 -2
  530. package/dist/primitives/ScrollArea/index.js.map +1 -1
  531. package/dist/primitives/Select/index.cjs +8 -8
  532. package/dist/primitives/Select/index.cjs.map +1 -1
  533. package/dist/primitives/Select/index.d.cts +1 -1
  534. package/dist/primitives/Select/index.d.ts +1 -1
  535. package/dist/primitives/Select/index.js +8 -8
  536. package/dist/primitives/Select/index.js.map +1 -1
  537. package/dist/primitives/Separator/index.cjs +1 -1
  538. package/dist/primitives/Separator/index.cjs.map +1 -1
  539. package/dist/primitives/Separator/index.js +1 -1
  540. package/dist/primitives/Separator/index.js.map +1 -1
  541. package/dist/primitives/Sheet/index.cjs +8 -8
  542. package/dist/primitives/Sheet/index.cjs.map +1 -1
  543. package/dist/primitives/Sheet/index.d.cts +1 -1
  544. package/dist/primitives/Sheet/index.d.ts +1 -1
  545. package/dist/primitives/Sheet/index.js +8 -8
  546. package/dist/primitives/Sheet/index.js.map +1 -1
  547. package/dist/primitives/Sidebar/index.d.cts +1 -1
  548. package/dist/primitives/Sidebar/index.d.ts +1 -1
  549. package/dist/primitives/Skeleton/index.cjs +2 -2
  550. package/dist/primitives/Skeleton/index.cjs.map +1 -1
  551. package/dist/primitives/Skeleton/index.d.cts +1 -1
  552. package/dist/primitives/Skeleton/index.d.ts +1 -1
  553. package/dist/primitives/Skeleton/index.js +2 -2
  554. package/dist/primitives/Skeleton/index.js.map +1 -1
  555. package/dist/primitives/Slider/index.cjs +3 -3
  556. package/dist/primitives/Slider/index.cjs.map +1 -1
  557. package/dist/primitives/Slider/index.d.cts +1 -1
  558. package/dist/primitives/Slider/index.d.ts +1 -1
  559. package/dist/primitives/Slider/index.js +3 -3
  560. package/dist/primitives/Slider/index.js.map +1 -1
  561. package/dist/primitives/Sonner/index.cjs +13 -6
  562. package/dist/primitives/Sonner/index.cjs.map +1 -1
  563. package/dist/primitives/Sonner/index.d.cts +1 -1
  564. package/dist/primitives/Sonner/index.d.ts +1 -1
  565. package/dist/primitives/Sonner/index.js +13 -6
  566. package/dist/primitives/Sonner/index.js.map +1 -1
  567. package/dist/primitives/Spinner/index.d.cts +1 -1
  568. package/dist/primitives/Spinner/index.d.ts +1 -1
  569. package/dist/primitives/Switch/index.cjs +7 -7
  570. package/dist/primitives/Switch/index.cjs.map +1 -1
  571. package/dist/primitives/Switch/index.d.cts +1 -1
  572. package/dist/primitives/Switch/index.d.ts +1 -1
  573. package/dist/primitives/Switch/index.js +7 -7
  574. package/dist/primitives/Switch/index.js.map +1 -1
  575. package/dist/primitives/Table/index.cjs +7 -7
  576. package/dist/primitives/Table/index.cjs.map +1 -1
  577. package/dist/primitives/Table/index.d.cts +1 -1
  578. package/dist/primitives/Table/index.d.ts +1 -1
  579. package/dist/primitives/Table/index.js +7 -7
  580. package/dist/primitives/Table/index.js.map +1 -1
  581. package/dist/primitives/Tabs/index.cjs +21 -21
  582. package/dist/primitives/Tabs/index.cjs.map +1 -1
  583. package/dist/primitives/Tabs/index.d.cts +1 -1
  584. package/dist/primitives/Tabs/index.d.ts +1 -1
  585. package/dist/primitives/Tabs/index.js +21 -21
  586. package/dist/primitives/Tabs/index.js.map +1 -1
  587. package/dist/primitives/Text/index.cjs +5 -5
  588. package/dist/primitives/Text/index.cjs.map +1 -1
  589. package/dist/primitives/Text/index.d.cts +1 -1
  590. package/dist/primitives/Text/index.d.ts +1 -1
  591. package/dist/primitives/Text/index.js +5 -5
  592. package/dist/primitives/Text/index.js.map +1 -1
  593. package/dist/primitives/Textarea/index.cjs +20 -8
  594. package/dist/primitives/Textarea/index.cjs.map +1 -1
  595. package/dist/primitives/Textarea/index.d.cts +1 -1
  596. package/dist/primitives/Textarea/index.d.ts +1 -1
  597. package/dist/primitives/Textarea/index.js +20 -8
  598. package/dist/primitives/Textarea/index.js.map +1 -1
  599. package/dist/primitives/ThemeProvider/index.d.cts +1 -1
  600. package/dist/primitives/ThemeProvider/index.d.ts +1 -1
  601. package/dist/primitives/Toggle/index.cjs +11 -10
  602. package/dist/primitives/Toggle/index.cjs.map +1 -1
  603. package/dist/primitives/Toggle/index.d.cts +1 -1
  604. package/dist/primitives/Toggle/index.d.ts +1 -1
  605. package/dist/primitives/Toggle/index.js +11 -10
  606. package/dist/primitives/Toggle/index.js.map +1 -1
  607. package/dist/primitives/ToggleGroup/index.cjs +2 -2
  608. package/dist/primitives/ToggleGroup/index.cjs.map +1 -1
  609. package/dist/primitives/ToggleGroup/index.d.cts +1 -1
  610. package/dist/primitives/ToggleGroup/index.d.ts +1 -1
  611. package/dist/primitives/ToggleGroup/index.js +2 -2
  612. package/dist/primitives/ToggleGroup/index.js.map +1 -1
  613. package/dist/primitives/Tooltip/index.cjs +2 -2
  614. package/dist/primitives/Tooltip/index.cjs.map +1 -1
  615. package/dist/primitives/Tooltip/index.d.cts +1 -1
  616. package/dist/primitives/Tooltip/index.d.ts +1 -1
  617. package/dist/primitives/Tooltip/index.js +2 -2
  618. package/dist/primitives/Tooltip/index.js.map +1 -1
  619. package/dist/primitives/index.cjs +10 -10
  620. package/dist/primitives/index.d.cts +21 -21
  621. package/dist/primitives/index.d.ts +21 -21
  622. package/dist/primitives/index.js +2 -2
  623. package/dist/styles/base.css +23 -4
  624. package/dist/styles/brand-scopes.css +49 -0
  625. package/dist/styles/glass.css +13 -8
  626. package/dist/styles/index.css +8 -9
  627. package/dist/styles/theme.css +141 -90
  628. package/dist/styles/tokens/border-radius.css +8 -8
  629. package/dist/styles/tokens/mode-dark.css +71 -94
  630. package/dist/styles/tokens/mode-light.css +71 -94
  631. package/dist/styles/tokens/shadows.css +4 -7
  632. package/dist/styles/tokens/spacing.css +17 -37
  633. package/dist/styles/tokens/theme-bodhi.css +6 -28
  634. package/dist/styles/tokens/theme-slingshot.css +7 -28
  635. package/dist/styles/tokens/theme-sustain.css +6 -28
  636. package/dist/styles/typography.css +9 -9
  637. package/package.json +8 -2
  638. package/dist/index44.d.cts.map +0 -1
  639. package/dist/index44.d.ts.map +0 -1
  640. package/dist/primitives/NavRail/index.cjs.map +0 -1
  641. package/dist/primitives/NavRail/index.js.map +0 -1
  642. package/dist/styles/semantic.css +0 -178
  643. package/dist/styles/tokens/alpha.css +0 -39
  644. package/dist/styles/tokens/chart-colors-dark.css +0 -18
  645. package/dist/styles/tokens/chart-colors-light.css +0 -18
  646. package/dist/styles/tokens/colors.css +0 -251
@@ -4,13 +4,13 @@ import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
6
6
  //#region src/primitives/InfoBanner/InfoBanner.tsx
7
- const infoBannerVariants = cva("flex w-full gap-3 rounded-xl px-4 py-3", {
7
+ const infoBannerVariants = cva("flex w-full gap-4 rounded-12 px-4 py-3", {
8
8
  variants: { variant: {
9
- info: "bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)]",
10
- success: "bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)]",
11
- warning: "bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]",
12
- error: "bg-destructive/10 text-destructive",
13
- neutral: "bg-muted text-foreground"
9
+ info: "bg-info-bg text-info-txt",
10
+ success: "bg-success-bg text-success-txt",
11
+ warning: "bg-warning-bg text-warning-txt",
12
+ error: "bg-danger-bg text-danger-txt",
13
+ neutral: "bg-muted-bg text-primary-txt"
14
14
  } },
15
15
  defaultVariants: { variant: "info" }
16
16
  });
@@ -35,25 +35,25 @@ function InfoBanner({ title, description, variant, icon, dismissible = true, vis
35
35
  "data-slot": "info-banner",
36
36
  "data-variant": variant ?? "info",
37
37
  role: "status",
38
- className: cn(infoBannerVariants({ variant }), description != null ? "items-start" : "items-center", className),
38
+ className: cn(infoBannerVariants({ variant }), "items-start", className),
39
39
  ...props,
40
40
  children: [
41
41
  /* @__PURE__ */ jsx("span", {
42
42
  "data-slot": "info-banner-icon",
43
- className: "shrink-0",
43
+ className: "shrink-0 pt-0.5",
44
44
  "aria-hidden": "true",
45
45
  children: icon ?? /* @__PURE__ */ jsx(VariantIcon, { className: "size-5" })
46
46
  }),
47
47
  /* @__PURE__ */ jsxs("div", {
48
48
  "data-slot": "info-banner-content",
49
- className: "flex min-w-0 flex-1 flex-col gap-0.5",
49
+ className: "flex min-w-0 flex-1 flex-col gap-1",
50
50
  children: [/* @__PURE__ */ jsx("span", {
51
51
  "data-slot": "info-banner-title",
52
- className: "font-medium text-sm",
52
+ className: "font-heading text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium",
53
53
  children: title
54
54
  }), description != null && /* @__PURE__ */ jsx("span", {
55
55
  "data-slot": "info-banner-description",
56
- className: "text-sm opacity-80",
56
+ className: "text-sm leading-5 font-medium text-secondary-txt",
57
57
  children: description
58
58
  })]
59
59
  }),
@@ -62,7 +62,7 @@ function InfoBanner({ title, description, variant, icon, dismissible = true, vis
62
62
  type: "button",
63
63
  "aria-label": "Dismiss",
64
64
  onClick: handleDismiss,
65
- className: "-mr-1 flex size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-foreground/5",
65
+ className: "-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5",
66
66
  children: /* @__PURE__ */ jsx(X, {
67
67
  "data-slot": "info-banner-dismiss-icon",
68
68
  className: "size-4",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InfoBanner/InfoBanner.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { CircleAlert, CircleCheck, Info, TriangleAlert, X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { useState } from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// InfoBanner — a dismissible inline status banner. Colored by intent via the\n// semantic --bg-*-subtle / --content-*-bold token sets (info/success/warning/\n// error) plus a neutral option. Distinct from Alert (which is not dismissible).\nconst infoBannerVariants = cva(\"flex w-full gap-3 rounded-xl px-4 py-3\", {\n variants: {\n variant: {\n info: \"bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)]\",\n success: \"bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)]\",\n warning: \"bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)]\",\n error: \"bg-destructive/10 text-destructive\",\n neutral: \"bg-muted text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"info\",\n },\n});\n\nconst variantIcons = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n neutral: Info,\n} as const;\n\nexport type InfoBannerProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n VariantProps<typeof infoBannerVariants> & {\n /** Intent that drives the banner colors and default icon. Default `info`. */\n variant?: VariantProps<typeof infoBannerVariants>[\"variant\"];\n /** Banner heading. */\n title: string;\n /** Optional supporting copy below the title. */\n description?: React.ReactNode;\n /** Override the default per-variant leading icon. */\n icon?: React.ReactNode;\n /** Show the trailing dismiss button. Default true. */\n dismissible?: boolean;\n /** Controlled visibility. When provided, overrides internal state. */\n visible?: boolean;\n /** Called when the dismiss button is pressed. */\n onDismiss?: () => void;\n };\n\n/** Dismissible inline status banner colored by intent (info/success/warning/error/neutral). */\nfunction InfoBanner({\n title,\n description,\n variant,\n icon,\n dismissible = true,\n visible,\n onDismiss,\n className,\n ...props\n}: InfoBannerProps) {\n const [internalVisible, setInternalVisible] = useState(true);\n const isControlled = visible !== undefined;\n const isVisible = isControlled ? visible : internalVisible;\n\n if (!isVisible) return null;\n\n const handleDismiss = () => {\n if (!isControlled) setInternalVisible(false);\n onDismiss?.();\n };\n\n const VariantIcon = variantIcons[variant ?? \"info\"];\n\n return (\n <div\n data-slot=\"info-banner\"\n data-variant={variant ?? \"info\"}\n role=\"status\"\n className={cn(\n infoBannerVariants({ variant }),\n // Center a single-line (title-only) banner; top-align when a description wraps.\n description != null ? \"items-start\" : \"items-center\",\n className,\n )}\n {...props}\n >\n {/* Icon inherits the variant's text color via currentColor. */}\n <span data-slot=\"info-banner-icon\" className=\"shrink-0\" aria-hidden=\"true\">\n {icon ?? <VariantIcon className=\"size-5\" />}\n </span>\n\n <div data-slot=\"info-banner-content\" className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span data-slot=\"info-banner-title\" className=\"font-medium text-sm\">\n {title}\n </span>\n {description != null && (\n <span data-slot=\"info-banner-description\" className=\"text-sm opacity-80\">\n {description}\n </span>\n )}\n </div>\n\n {dismissible && (\n <button\n data-slot=\"info-banner-dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={handleDismiss}\n className=\"-mr-1 flex size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-foreground/5\"\n >\n <X data-slot=\"info-banner-dismiss-icon\" className=\"size-4\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n\nexport { InfoBanner, infoBannerVariants };\n"],"mappings":";;;;;;AAUA,MAAM,qBAAqB,IAAI,0CAA0C;CACvE,UAAU,EACR,SAAS;EACP,MAAM;EACN,SAAS;EACT,SAAS;EACT,OAAO;EACP,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC;AAED,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAqBA,SAAS,WAAW,EAClB,OACA,aACA,SACA,MACA,cAAc,MACd,SACA,WACA,WACA,GAAG,SACe;CAClB,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,IAAI;CAC3D,MAAM,eAAe,YAAY,KAAA;CAGjC,IAAI,EAFc,eAAe,UAAU,kBAE3B,OAAO;CAEvB,MAAM,sBAAsB;EAC1B,IAAI,CAAC,cAAc,mBAAmB,KAAK;EAC3C,YAAY;CACd;CAEA,MAAM,cAAc,aAAa,WAAW;CAE5C,OACE,qBAAC,OAAD;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,MAAK;EACL,WAAW,GACT,mBAAmB,EAAE,QAAQ,CAAC,GAE9B,eAAe,OAAO,gBAAgB,gBACtC,SACF;EACA,GAAI;YAVN;GAaE,oBAAC,QAAD;IAAM,aAAU;IAAmB,WAAU;IAAW,eAAY;cACjE,QAAQ,oBAAC,aAAD,EAAa,WAAU,SAAU,CAAA;GACtC,CAAA;GAEN,qBAAC,OAAD;IAAK,aAAU;IAAsB,WAAU;cAA/C,CACE,oBAAC,QAAD;KAAM,aAAU;KAAoB,WAAU;eAC3C;IACG,CAAA,GACL,eAAe,QACd,oBAAC,QAAD;KAAM,aAAU;KAA0B,WAAU;eACjD;IACG,CAAA,CAEL;;GAEJ,eACC,oBAAC,UAAD;IACE,aAAU;IACV,MAAK;IACL,cAAW;IACX,SAAS;IACT,WAAU;cAEV,oBAAC,GAAD;KAAG,aAAU;KAA2B,WAAU;KAAS,eAAY;IAAQ,CAAA;GACzE,CAAA;EAEP;;AAET"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InfoBanner/InfoBanner.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { CircleAlert, CircleCheck, Info, TriangleAlert, X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { useState } from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// InfoBanner — a dismissible inline status banner (Figma \"Toast Messages\" on\n// the Alert page, node 3962:11659): status-bg surface, rounded-12, px-4 py-3,\n// heading-5 title in the status text color, 14/20 medium secondary description.\n// Distinct from Alert (which is not dismissible).\nconst infoBannerVariants = cva(\"flex w-full gap-4 rounded-12 px-4 py-3\", {\n variants: {\n variant: {\n info: \"bg-info-bg text-info-txt\",\n success: \"bg-success-bg text-success-txt\",\n warning: \"bg-warning-bg text-warning-txt\",\n error: \"bg-danger-bg text-danger-txt\",\n neutral: \"bg-muted-bg text-primary-txt\",\n },\n },\n defaultVariants: {\n variant: \"info\",\n },\n});\n\nconst variantIcons = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n neutral: Info,\n} as const;\n\nexport type InfoBannerProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n VariantProps<typeof infoBannerVariants> & {\n /** Intent that drives the banner colors and default icon. Default `info`. */\n variant?: VariantProps<typeof infoBannerVariants>[\"variant\"];\n /** Banner heading. */\n title: string;\n /** Optional supporting copy below the title. */\n description?: React.ReactNode;\n /** Override the default per-variant leading icon. */\n icon?: React.ReactNode;\n /** Show the trailing dismiss button. Default true. */\n dismissible?: boolean;\n /** Controlled visibility. When provided, overrides internal state. */\n visible?: boolean;\n /** Called when the dismiss button is pressed. */\n onDismiss?: () => void;\n };\n\n/** Dismissible inline status banner colored by intent (info/success/warning/error/neutral). */\nfunction InfoBanner({\n title,\n description,\n variant,\n icon,\n dismissible = true,\n visible,\n onDismiss,\n className,\n ...props\n}: InfoBannerProps) {\n const [internalVisible, setInternalVisible] = useState(true);\n const isControlled = visible !== undefined;\n const isVisible = isControlled ? visible : internalVisible;\n\n if (!isVisible) return null;\n\n const handleDismiss = () => {\n if (!isControlled) setInternalVisible(false);\n onDismiss?.();\n };\n\n const VariantIcon = variantIcons[variant ?? \"info\"];\n\n return (\n <div\n data-slot=\"info-banner\"\n data-variant={variant ?? \"info\"}\n role=\"status\"\n className={cn(\n infoBannerVariants({ variant }),\n // Top-aligned like Alert; the icon aligner below sits it on the first line.\n \"items-start\",\n className,\n )}\n {...props}\n >\n {/* Icon inherits the variant's text color via currentColor. */}\n <span data-slot=\"info-banner-icon\" className=\"shrink-0 pt-0.5\" aria-hidden=\"true\">\n {icon ?? <VariantIcon className=\"size-5\" />}\n </span>\n\n <div data-slot=\"info-banner-content\" className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span\n data-slot=\"info-banner-title\"\n className=\"font-heading text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium\"\n >\n {title}\n </span>\n {description != null && (\n <span\n data-slot=\"info-banner-description\"\n className=\"text-sm leading-5 font-medium text-secondary-txt\"\n >\n {description}\n </span>\n )}\n </div>\n\n {dismissible && (\n <button\n data-slot=\"info-banner-dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={handleDismiss}\n className=\"-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5\"\n >\n <X data-slot=\"info-banner-dismiss-icon\" className=\"size-4\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n\nexport { InfoBanner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(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_cn = require("../../cn.cjs");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
  //#region src/primitives/Input/Input.tsx
5
- const inputVariants = (0, require("class-variance-authority").cva)(require_cn.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-border bg-input-background flex w-full min-w-0 border transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-ring-error aria-invalid:border-destructive"), {
5
+ const inputVariants = (0, require("class-variance-authority").cva)(require_cn.cn("file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:ring-focus focus-visible:ring-3", "aria-invalid:ring-focus-error"), {
6
6
  variants: {
7
+ variant: {
8
+ default: "border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border",
9
+ ai: "ai-border [--ai-surface:var(--input-bg)]"
10
+ },
7
11
  size: {
8
- xs: "h-6 px-2 py-0.5 text-xs file:h-5 file:text-xs",
9
- sm: "h-8 px-2.5 py-1 text-sm file:h-6 file:text-xs",
10
- default: "h-9 px-3 py-1 text-sm file:h-7 file:text-sm",
11
- lg: "h-10 px-4 py-2 text-sm file:h-8 file:text-sm"
12
+ xs: "h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs",
13
+ sm: "h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs",
14
+ default: "h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm",
15
+ lg: "h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm"
12
16
  },
13
17
  shape: {
14
- default: "rounded-xl",
18
+ default: "rounded-12",
15
19
  round: "rounded-full"
16
20
  }
17
21
  },
18
22
  defaultVariants: {
23
+ variant: "default",
19
24
  size: "default",
20
25
  shape: "default"
21
26
  }
22
27
  });
23
28
  /** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */
24
- function Input({ className, type, size, shape, ...props }) {
29
+ function Input({ className, type, variant, size, shape, ...props }) {
25
30
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
26
31
  type,
27
32
  "data-slot": "input",
28
33
  className: require_cn.cn(inputVariants({
34
+ variant,
29
35
  size,
30
36
  shape
31
37
  }), className),
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst inputVariants = cva(\n cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-border bg-input-background flex w-full min-w-0 border transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-ring-error aria-invalid:border-destructive\",\n ),\n {\n variants: {\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-2 py-0.5 text-xs file:h-5 file:text-xs\",\n sm: \"h-8 px-2.5 py-1 text-sm file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-1 text-sm file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2 text-sm file:h-8 file:text-sm\",\n },\n // Roundness: Default (rounded-xl) and Round (pill).\n shape: {\n default: \"rounded-xl\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (rounded-xl) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":";;;;AAKA,MAAM,iBAAA,qCAAA,EAAA,KACJA,WAAAA,GACE,0WACA,iFACA,8DACF,GACA;CACE,UAAU;EAER,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;EAEA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,MAEA,MAEA,OACA,GAAG,SACgF;CACnF,OACE,iBAAA,GAAA,kBAAA,KAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAWA,WAAAA,GAAG,cAAc;GAAE;GAAM;EAAM,CAAC,GAAG,SAAS;EACvD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/* Figma: PS AI Helix – Core → Input & Input Group (node 16:1738). Paddings with\n half-pixel values are Figma's \"hacks to fit scale\" tokens (no spacing step). */\nconst inputVariants = cva(\n cn(\n \"file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-focus focus-visible:ring-3\",\n \"aria-invalid:ring-focus-error\",\n ),\n {\n variants: {\n // `ai` swaps the border for the AI gradient; text/placeholder are unchanged.\n variant: {\n default:\n \"border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border\",\n ai: \"ai-border [--ai-surface:var(--input-bg)]\",\n },\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs\",\n sm: \"h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm\",\n },\n // Roundness: Default (12px) and Round (pill).\n shape: {\n default: \"rounded-12\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Chrome style — `default` bordered field or `ai` (AI gradient border). */\n variant,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (12px) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ variant, size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":";;;;AAOA,MAAM,iBAAA,qCAAA,EAAA,KACJA,WAAAA,GACE,sVACA,iDACA,+BACF,GACA;CACE,UAAU;EAER,SAAS;GACP,SACE;GACF,IAAI;EACN;EAEA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;EAEA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,MAEA,SAEA,MAEA,OACA,GAAG,SACgF;CACnF,OACE,iBAAA,GAAA,kBAAA,KAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAWA,WAAAA,GAAG,cAAc;GAAE;GAAS;GAAM;EAAM,CAAC,GAAG,SAAS;EAChE,GAAI;CACL,CAAA;AAEL"}
@@ -2,30 +2,36 @@ import { t as cn } from "../../cn.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
4
  //#region src/primitives/Input/Input.tsx
5
- const inputVariants = cva(cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-border bg-input-background flex w-full min-w-0 border transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-ring-error aria-invalid:border-destructive"), {
5
+ const inputVariants = cva(cn("file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:ring-focus focus-visible:ring-3", "aria-invalid:ring-focus-error"), {
6
6
  variants: {
7
+ variant: {
8
+ default: "border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border",
9
+ ai: "ai-border [--ai-surface:var(--input-bg)]"
10
+ },
7
11
  size: {
8
- xs: "h-6 px-2 py-0.5 text-xs file:h-5 file:text-xs",
9
- sm: "h-8 px-2.5 py-1 text-sm file:h-6 file:text-xs",
10
- default: "h-9 px-3 py-1 text-sm file:h-7 file:text-sm",
11
- lg: "h-10 px-4 py-2 text-sm file:h-8 file:text-sm"
12
+ xs: "h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs",
13
+ sm: "h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs",
14
+ default: "h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm",
15
+ lg: "h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm"
12
16
  },
13
17
  shape: {
14
- default: "rounded-xl",
18
+ default: "rounded-12",
15
19
  round: "rounded-full"
16
20
  }
17
21
  },
18
22
  defaultVariants: {
23
+ variant: "default",
19
24
  size: "default",
20
25
  shape: "default"
21
26
  }
22
27
  });
23
28
  /** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */
24
- function Input({ className, type, size, shape, ...props }) {
29
+ function Input({ className, type, variant, size, shape, ...props }) {
25
30
  return /* @__PURE__ */ jsx("input", {
26
31
  type,
27
32
  "data-slot": "input",
28
33
  className: cn(inputVariants({
34
+ variant,
29
35
  size,
30
36
  shape
31
37
  }), className),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst inputVariants = cva(\n cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-border bg-input-background flex w-full min-w-0 border transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-ring-error aria-invalid:border-destructive\",\n ),\n {\n variants: {\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-2 py-0.5 text-xs file:h-5 file:text-xs\",\n sm: \"h-8 px-2.5 py-1 text-sm file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-1 text-sm file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2 text-sm file:h-8 file:text-sm\",\n },\n // Roundness: Default (rounded-xl) and Round (pill).\n shape: {\n default: \"rounded-xl\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (rounded-xl) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":";;;;AAKA,MAAM,gBAAgB,IACpB,GACE,0WACA,iFACA,8DACF,GACA;CACE,UAAU;EAER,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;EAEA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,MAEA,MAEA,OACA,GAAG,SACgF;CACnF,OACE,oBAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAW,GAAG,cAAc;GAAE;GAAM;EAAM,CAAC,GAAG,SAAS;EACvD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/* Figma: PS AI Helix – Core → Input & Input Group (node 16:1738). Paddings with\n half-pixel values are Figma's \"hacks to fit scale\" tokens (no spacing step). */\nconst inputVariants = cva(\n cn(\n \"file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-focus focus-visible:ring-3\",\n \"aria-invalid:ring-focus-error\",\n ),\n {\n variants: {\n // `ai` swaps the border for the AI gradient; text/placeholder are unchanged.\n variant: {\n default:\n \"border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border\",\n ai: \"ai-border [--ai-surface:var(--input-bg)]\",\n },\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs\",\n sm: \"h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm\",\n },\n // Roundness: Default (12px) and Round (pill).\n shape: {\n default: \"rounded-12\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Chrome style — `default` bordered field or `ai` (AI gradient border). */\n variant,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (12px) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ variant, size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":";;;;AAOA,MAAM,gBAAgB,IACpB,GACE,sVACA,iDACA,+BACF,GACA;CACE,UAAU;EAER,SAAS;GACP,SACE;GACF,IAAI;EACN;EAEA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;EAEA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,MAEA,SAEA,MAEA,OACA,GAAG,SACgF;CACnF,OACE,oBAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAW,GAAG,cAAc;GAAE;GAAS;GAAM;EAAM,CAAC,GAAG,SAAS;EAChE,GAAI;CACL,CAAA;AAEL"}
@@ -7,15 +7,15 @@ let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let class_variance_authority = require("class-variance-authority");
8
8
  //#region src/primitives/InputGroup/InputGroup.tsx
9
9
  /** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */
10
- function InputGroup({ className, ...props }) {
10
+ function InputGroup({ className, variant = "default", ...props }) {
11
11
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12
12
  "data-slot": "input-group",
13
13
  role: "group",
14
- className: require_cn.cn("group/input-group relative flex w-full items-center rounded-xl border border-input shadow-xs transition-[color,box-shadow] outline-none", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-ring-error", className),
14
+ className: require_cn.cn("group/input-group relative flex w-full items-center rounded-12 transition-[color,box-shadow] outline-none", variant === "ai" ? "ai-border [--ai-surface:var(--input-bg)]" : "border border-primary-border", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-primary-invert-border has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-focus", "has-[[data-slot][aria-invalid=true]]:border-danger-border has-[[data-slot][aria-invalid=true]]:ring-focus-error", className),
15
15
  ...props
16
16
  });
17
17
  }
18
- const inputGroupAddonVariants = (0, class_variance_authority.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-5 [&>svg:not([class*='size-'])]:size-4", {
18
+ const inputGroupAddonVariants = (0, class_variance_authority.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-txt select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-4 [&>svg:not([class*='size-'])]:size-4", {
19
19
  variants: { align: {
20
20
  "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
21
21
  "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
@@ -40,9 +40,9 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
40
40
  }
41
41
  const inputGroupButtonVariants = (0, class_variance_authority.cva)("flex items-center gap-2 text-sm shadow-none", {
42
42
  variants: { size: {
43
- xs: "h-6 gap-1 rounded-5 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
44
- sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
45
- "icon-xs": "size-6 rounded-5 p-0 has-[>svg]:p-0",
43
+ xs: "h-6 gap-1 rounded-4 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
44
+ sm: "h-8 gap-1.5 rounded-6 px-2.5 has-[>svg]:px-2.5",
45
+ "icon-xs": "size-6 rounded-4 p-0 has-[>svg]:p-0",
46
46
  "icon-sm": "size-8 p-0 has-[>svg]:p-0"
47
47
  } },
48
48
  defaultVariants: { size: "xs" }
@@ -60,7 +60,7 @@ function InputGroupButton({ className, type = "button", variant = "ghost", size
60
60
  /** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */
61
61
  function InputGroupText({ className, ...props }) {
62
62
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
63
- className: require_cn.cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
63
+ className: require_cn.cn("flex items-center gap-2 text-sm text-muted-txt [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
64
64
  ...props
65
65
  });
66
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cn","Button","Input","Textarea"],"sources":["../../../src/primitives/InputGroup/InputGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { Input } from \"@/primitives/Input\";\nimport { Textarea } from \"@/primitives/Textarea\";\nimport { cn } from \"@/utils\";\n\n/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex w-full items-center rounded-xl border border-input shadow-xs transition-[color,box-shadow] outline-none\",\n \"h-9 min-w-0 has-[>textarea]:h-auto\",\n\n // Variants based on alignment.\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\n\n // Focus state.\n \"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50\",\n\n // Error state.\n \"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-ring-error\",\n\n className,\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-5 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\n \"inline-end\": \"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3\",\n \"block-end\":\n \"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n\n/** A leading/trailing or stacked slot for icons, text, or buttons; clicking it focuses the group's input. */\nfunction InputGroupAddon({\n className,\n /** Where the addon sits relative to the control: inline (left/right) or block (top/bottom). */\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return;\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\"flex items-center gap-2 text-sm shadow-none\", {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-5 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5\",\n \"icon-xs\": \"size-6 rounded-5 p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n});\n\n/** A compact Button sized to sit inside an addon without overflowing the group's height. */\nfunction InputGroupButton({\n className,\n /** The button's HTML type; defaults to `\"button\"` so it does not submit forms. */\n type = \"button\",\n /** Visual style forwarded to the underlying Button; defaults to `\"ghost\"`. */\n variant = \"ghost\",\n /** Compact sizing tuned for the group: text (`xs`/`sm`) or square icon (`icon-xs`/`icon-sm`). */\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\n/** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Input control for the group: borderless and transparent so the group container provides the chrome. */\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Textarea control for the group: borderless, transparent, and non-resizing so the group provides the chrome. */\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;;AAWA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,WAAWA,WAAAA,GACT,2IACA,sCAGA,mDACA,iDACA,kIACA,4HAGA,mMAGA,gHAEA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,2BAAA,GAAA,yBAAA,KACJ,mOACA;CACE,UAAU,EACR,OAAO;EACL,gBAAgB;EAChB,cAAc;EACd,eACE;EACF,aACE;CACJ,EACF;CACA,iBAAiB,EACf,OAAO,eACT;AACF,CACF;;AAGA,SAAS,gBAAgB,EACvB,WAEA,QAAQ,gBACR,GAAG,SAC0E;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,cAAY;EACZ,WAAWA,WAAAA,GAAG,wBAAwB,EAAE,MAAM,CAAC,GAAG,SAAS;EAC3D,UAAU,MAAM;GACd,IAAK,EAAE,OAAuB,QAAQ,QAAQ,GAC5C;GAEF,EAAE,cAAc,eAAe,cAAc,OAAO,GAAG,MAAM;EAC/D;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,4BAAA,GAAA,yBAAA,KAA+B,+CAA+C;CAClF,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,WAAW;EACX,WAAW;CACb,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC;;AAGD,SAAS,iBAAiB,EACxB,WAEA,OAAO,UAEP,UAAU,SAEV,OAAO,MACP,GAAG,SAE4C;CAC/C,OACE,iBAAA,GAAA,kBAAA,KAACC,gCAAAA,QAAD;EACQ;EACN,aAAW;EACF;EACT,WAAWD,WAAAA,GAAG,yBAAyB,EAAE,KAAK,CAAC,GAAG,SAAS;EAC3D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,WAAWA,WAAAA,GACT,0HACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA6C;CACpF,OACE,iBAAA,GAAA,kBAAA,KAACE,+BAAAA,OAAD;EACE,aAAU;EACV,WAAWF,WAAAA,GACT,gFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA2C;CACrF,OACE,iBAAA,GAAA,kBAAA,KAACG,kCAAAA,UAAD;EACE,aAAU;EACV,WAAWH,WAAAA,GACT,iGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.cjs","names":["cn","Button","Input","Textarea"],"sources":["../../../src/primitives/InputGroup/InputGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { Input } from \"@/primitives/Input\";\nimport { Textarea } from \"@/primitives/Textarea\";\nimport { cn } from \"@/utils\";\n\n/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */\nfunction InputGroup({\n className,\n /** Chrome style — `default` bordered group or `ai` (AI gradient border). */\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { variant?: \"default\" | \"ai\" }) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex w-full items-center rounded-12 transition-[color,box-shadow] outline-none\",\n // `ai` swaps the border for the AI gradient; contents are unchanged.\n variant === \"ai\"\n ? \"ai-border [--ai-surface:var(--input-bg)]\"\n : \"border border-primary-border\",\n \"h-9 min-w-0 has-[>textarea]:h-auto\",\n\n // Variants based on alignment.\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\n\n // Focus state.\n \"has-[[data-slot=input-group-control]:focus-visible]:border-primary-invert-border has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-focus\",\n\n // Error state.\n \"has-[[data-slot][aria-invalid=true]]:border-danger-border has-[[data-slot][aria-invalid=true]]:ring-focus-error\",\n\n className,\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-txt select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-4 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\n \"inline-end\": \"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3\",\n \"block-end\":\n \"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n\n/** A leading/trailing or stacked slot for icons, text, or buttons; clicking it focuses the group's input. */\nfunction InputGroupAddon({\n className,\n /** Where the addon sits relative to the control: inline (left/right) or block (top/bottom). */\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return;\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\"flex items-center gap-2 text-sm shadow-none\", {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-4 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"h-8 gap-1.5 rounded-6 px-2.5 has-[>svg]:px-2.5\",\n \"icon-xs\": \"size-6 rounded-4 p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n});\n\n/** A compact Button sized to sit inside an addon without overflowing the group's height. */\nfunction InputGroupButton({\n className,\n /** The button's HTML type; defaults to `\"button\"` so it does not submit forms. */\n type = \"button\",\n /** Visual style forwarded to the underlying Button; defaults to `\"ghost\"`. */\n variant = \"ghost\",\n /** Compact sizing tuned for the group: text (`xs`/`sm`) or square icon (`icon-xs`/`icon-sm`). */\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\n/** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-txt [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Input control for the group: borderless and transparent so the group container provides the chrome. */\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Textarea control for the group: borderless, transparent, and non-resizing so the group provides the chrome. */\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;;AAWA,SAAS,WAAW,EAClB,WAEA,UAAU,WACV,GAAG,SAC4D;CAC/D,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,WAAWA,WAAAA,GACT,6GAEA,YAAY,OACR,6CACA,gCACJ,sCAGA,mDACA,iDACA,kIACA,4HAGA,8MAGA,mHAEA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,2BAAA,GAAA,yBAAA,KACJ,4NACA;CACE,UAAU,EACR,OAAO;EACL,gBAAgB;EAChB,cAAc;EACd,eACE;EACF,aACE;CACJ,EACF;CACA,iBAAiB,EACf,OAAO,eACT;AACF,CACF;;AAGA,SAAS,gBAAgB,EACvB,WAEA,QAAQ,gBACR,GAAG,SAC0E;CAC7E,OACE,iBAAA,GAAA,kB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from "class-variance-authority";
7
7
  //#region src/primitives/InputGroup/InputGroup.tsx
8
8
  /** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */
9
- function InputGroup({ className, ...props }) {
9
+ function InputGroup({ className, variant = "default", ...props }) {
10
10
  return /* @__PURE__ */ jsx("div", {
11
11
  "data-slot": "input-group",
12
12
  role: "group",
13
- className: cn("group/input-group relative flex w-full items-center rounded-xl border border-input shadow-xs transition-[color,box-shadow] outline-none", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-ring-error", className),
13
+ className: cn("group/input-group relative flex w-full items-center rounded-12 transition-[color,box-shadow] outline-none", variant === "ai" ? "ai-border [--ai-surface:var(--input-bg)]" : "border border-primary-border", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-primary-invert-border has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-focus", "has-[[data-slot][aria-invalid=true]]:border-danger-border has-[[data-slot][aria-invalid=true]]:ring-focus-error", className),
14
14
  ...props
15
15
  });
16
16
  }
17
- const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-5 [&>svg:not([class*='size-'])]:size-4", {
17
+ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-txt select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-4 [&>svg:not([class*='size-'])]:size-4", {
18
18
  variants: { align: {
19
19
  "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
20
20
  "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
@@ -39,9 +39,9 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
39
39
  }
40
40
  const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
41
41
  variants: { size: {
42
- xs: "h-6 gap-1 rounded-5 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
43
- sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
44
- "icon-xs": "size-6 rounded-5 p-0 has-[>svg]:p-0",
42
+ xs: "h-6 gap-1 rounded-4 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
43
+ sm: "h-8 gap-1.5 rounded-6 px-2.5 has-[>svg]:px-2.5",
44
+ "icon-xs": "size-6 rounded-4 p-0 has-[>svg]:p-0",
45
45
  "icon-sm": "size-8 p-0 has-[>svg]:p-0"
46
46
  } },
47
47
  defaultVariants: { size: "xs" }
@@ -59,7 +59,7 @@ function InputGroupButton({ className, type = "button", variant = "ghost", size
59
59
  /** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */
60
60
  function InputGroupText({ className, ...props }) {
61
61
  return /* @__PURE__ */ jsx("span", {
62
- className: cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
62
+ className: cn("flex items-center gap-2 text-sm text-muted-txt [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
63
63
  ...props
64
64
  });
65
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InputGroup/InputGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { Input } from \"@/primitives/Input\";\nimport { Textarea } from \"@/primitives/Textarea\";\nimport { cn } from \"@/utils\";\n\n/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex w-full items-center rounded-xl border border-input shadow-xs transition-[color,box-shadow] outline-none\",\n \"h-9 min-w-0 has-[>textarea]:h-auto\",\n\n // Variants based on alignment.\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\n\n // Focus state.\n \"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50\",\n\n // Error state.\n \"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-ring-error\",\n\n className,\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-5 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\n \"inline-end\": \"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3\",\n \"block-end\":\n \"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n\n/** A leading/trailing or stacked slot for icons, text, or buttons; clicking it focuses the group's input. */\nfunction InputGroupAddon({\n className,\n /** Where the addon sits relative to the control: inline (left/right) or block (top/bottom). */\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return;\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\"flex items-center gap-2 text-sm shadow-none\", {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-5 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5\",\n \"icon-xs\": \"size-6 rounded-5 p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n});\n\n/** A compact Button sized to sit inside an addon without overflowing the group's height. */\nfunction InputGroupButton({\n className,\n /** The button's HTML type; defaults to `\"button\"` so it does not submit forms. */\n type = \"button\",\n /** Visual style forwarded to the underlying Button; defaults to `\"ghost\"`. */\n variant = \"ghost\",\n /** Compact sizing tuned for the group: text (`xs`/`sm`) or square icon (`icon-xs`/`icon-sm`). */\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\n/** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Input control for the group: borderless and transparent so the group container provides the chrome. */\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Textarea control for the group: borderless, transparent, and non-resizing so the group provides the chrome. */\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;AAWA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,WAAW,GACT,2IACA,sCAGA,mDACA,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AAD;EACE,aAAU;EACV,WAAW,GACT,iGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InputGroup/InputGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { Button } from \"@/primitives/Button\";\nimport { Input } from \"@/primitives/Input\";\nimport { Textarea } from \"@/primitives/Textarea\";\nimport { cn } from \"@/utils\";\n\n/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */\nfunction InputGroup({\n className,\n /** Chrome style — `default` bordered group or `ai` (AI gradient border). */\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { variant?: \"default\" | \"ai\" }) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex w-full items-center rounded-12 transition-[color,box-shadow] outline-none\",\n // `ai` swaps the border for the AI gradient; contents are unchanged.\n variant === \"ai\"\n ? \"ai-border [--ai-surface:var(--input-bg)]\"\n : \"border border-primary-border\",\n \"h-9 min-w-0 has-[>textarea]:h-auto\",\n\n // Variants based on alignment.\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\n\n // Focus state.\n \"has-[[data-slot=input-group-control]:focus-visible]:border-primary-invert-border has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-focus\",\n\n // Error state.\n \"has-[[data-slot][aria-invalid=true]]:border-danger-border has-[[data-slot][aria-invalid=true]]:ring-focus-error\",\n\n className,\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-txt select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-4 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\n \"inline-end\": \"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3\",\n \"block-end\":\n \"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n\n/** A leading/trailing or stacked slot for icons, text, or buttons; clicking it focuses the group's input. */\nfunction InputGroupAddon({\n className,\n /** Where the addon sits relative to the control: inline (left/right) or block (top/bottom). */\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return;\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\"flex items-center gap-2 text-sm shadow-none\", {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-4 px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"h-8 gap-1.5 rounded-6 px-2.5 has-[>svg]:px-2.5\",\n \"icon-xs\": \"size-6 rounded-4 p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n});\n\n/** A compact Button sized to sit inside an addon without overflowing the group's height. */\nfunction InputGroupButton({\n className,\n /** The button's HTML type; defaults to `\"button\"` so it does not submit forms. */\n type = \"button\",\n /** Visual style forwarded to the underlying Button; defaults to `\"ghost\"`. */\n variant = \"ghost\",\n /** Compact sizing tuned for the group: text (`xs`/`sm`) or square icon (`icon-xs`/`icon-sm`). */\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\n/** Muted inline text for prefixes, suffixes, or counts placed inside an addon (e.g. `$`, `USD`, `12 results`). */\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-txt [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Input control for the group: borderless and transparent so the group container provides the chrome. */\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The Textarea control for the group: borderless, transparent, and non-resizing so the group provides the chrome. */\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;AAWA,SAAS,WAAW,EAClB,WAEA,UAAU,WACV,GAAG,SAC4D;CAC/D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,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S,mBAAmB,EAAE,WAAW,GAAG,SAA2C;CACrF,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GACT,iGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -47,17 +47,17 @@ function InputOTPSlot({ index, className, ...props }) {
47
47
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
48
48
  "data-slot": "input-otp-slot",
49
49
  "data-active": isActive,
50
- className: require_cn.cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-ring-error aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive border-input relative flex items-center justify-center border-y border-r bg-input-background transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-[3px]", inputOTPSlotSizes[size], className),
50
+ className: require_cn.cn("data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3", inputOTPSlotSizes[size], className),
51
51
  ...props,
52
52
  children: [
53
53
  char,
54
54
  isEmpty && placeholder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
55
- className: "text-muted-foreground pointer-events-none",
55
+ className: "text-muted-txt pointer-events-none",
56
56
  children: placeholder
57
57
  }),
58
58
  hasFakeCaret && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
59
59
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
60
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
60
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "animate-caret-blink bg-primary-txt h-4 w-px duration-1000" })
61
61
  })
62
62
  ]
63
63
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["React","OTPInput","cn","OTPInputContext","MinusIcon"],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-ring-error aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive border-input relative flex items-center justify-center border-y border-r bg-input-background transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-[3px]\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-foreground pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;;;AAiBA,MAAM,0BAA0BA,MAAM,cAAoC,EACxE,MAAM,UACR,CAAC;AAGD,MAAM,oBAAkD;CACtD,IAAI;CACJ,IAAI;CACJ,SAAS;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OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,aAAU;EAAsB,MAAK;EAAY,GAAI;YACxD,iBAAA,GAAA,kBAAA,KAACE,aAAAA,WAAD,CAAY,CAAA;CACT,CAAA;AAET"}
1
+ {"version":3,"file":"index.cjs","names":["React","OTPInput","cn","OTPInputContext","MinusIcon"],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup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A,KAAC,OAAD;IAAK,WAAU;cACb,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAK,WAAU,4DAA6D,CAAA;GACzE,CAAA;EAEJ;;AAET;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAsC;CACpE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,aAAU;EAAsB,MAAK;EAAY,GAAI;YACxD,iBAAA,GAAA,kBAAA,KAACE,aAAAA,WAAD,CAAY,CAAA;CACT,CAAA;AAET"}
@@ -44,17 +44,17 @@ function InputOTPSlot({ index, className, ...props }) {
44
44
  return /* @__PURE__ */ jsxs("div", {
45
45
  "data-slot": "input-otp-slot",
46
46
  "data-active": isActive,
47
- className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-ring-error aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive border-input relative flex items-center justify-center border-y border-r bg-input-background transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-[3px]", inputOTPSlotSizes[size], className),
47
+ className: cn("data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3", inputOTPSlotSizes[size], className),
48
48
  ...props,
49
49
  children: [
50
50
  char,
51
51
  isEmpty && placeholder && /* @__PURE__ */ jsx("span", {
52
- className: "text-muted-foreground pointer-events-none",
52
+ className: "text-muted-txt pointer-events-none",
53
53
  children: placeholder
54
54
  }),
55
55
  hasFakeCaret && /* @__PURE__ */ jsx("div", {
56
56
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
57
- children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
57
+ children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-primary-txt h-4 w-px duration-1000" })
58
58
  })
59
59
  ]
60
60
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-ring-error aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive border-input relative flex items-center justify-center border-y border-r bg-input-background transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-[3px]\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-foreground pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;AAiBA,MAAM,0BAA0B,MAAM,cAAoC,EACxE,MAAM,UACR,CAAC;AAGD,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../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;AAiBA,MAAM,0BAA0B,MAAM,cAAoC,EACxE,MAAM,UACR,CAAC;AAGD,MAAM,oBAAkD;CACtD,IAAI;CACJ,IAAI;CACJ,SAAS;CACT,IAAI;AACN;;AAGA,SAAS,SAAS,EAChB,WACA,oBACA,OAAO,WACP,aACA,GAAG,SAQF;CACD,MAAM,WAAW,MAAM,eACd;EAAE;EAAM;CAAY,IAC3B,CAAC,MAAM,WAAW,CACpB;CAEA,OACE,oBAAC,wBAAwB,UAAzB;EAAkC,OAAO;YACvC,oBAAC,UAAD;GACE,aAAU;GACV,oBAAoB,GAClB,mDACA,kBACF;GACA,WAAW,GAAG,+BAA+B,SAAS;GACtD,GAAI;EACL,CAAA;CAC+B,CAAA;AAEtC;;AAGA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EACpB,OACA,WACA,GAAG,SAIF;CACD,MAAM,kBAAkB,MAAM,WAAW,eAAe;CACxD,MAAM,EAAE,MAAM,gBAAgB,MAAM,WAAW,uBAAuB;CACtE,MAAM,EAAE,MAAM,cAAc,aAAa,iBAAiB,MAAM,UAAU,CAAC;CAC3E,MAAM,UAAU,QAAQ,QAAQ,SAAS;CAEzC,OACE,qBAAC,OAAD;EACE,aAAU;EACV,eAAa;EACb,WAAW,GACT,ybACA,kBAAkB,OAClB,SACF;EACA,GAAI;YARN;GAUG;GACA,WAAW,eACV,oBAAC,QAAD;IAAM,WAAU;cAAsC;GAAkB,CAAA;GAEzE,gBACC,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,OAAD,EAAK,WAAU,4DAA6D,CAAA;GACzE,CAAA;EAEJ;;AAET;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAsC;CACpE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAsB,MAAK;EAAY,GAAI;YACxD,oBAAC,WAAD,CAAY,CAAA;CACT,CAAA;AAET"}
@@ -23,12 +23,12 @@ function ItemSeparator({ className, ...props }) {
23
23
  ...props
24
24
  });
25
25
  }
26
- const itemVariants = (0, class_variance_authority.cva)("group/item flex flex-wrap items-center rounded-xl border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-secondary", {
26
+ const itemVariants = (0, class_variance_authority.cva)("group/item flex flex-wrap items-center rounded-12 border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-primary-invert-border focus-visible:ring-3 focus-visible:ring-focus [a]:transition-colors [a]:hover:bg-secondary-bg", {
27
27
  variants: {
28
28
  variant: {
29
29
  default: "bg-transparent",
30
- outline: "border-border",
31
- muted: "bg-secondary"
30
+ outline: "border-primary-border",
31
+ muted: "bg-secondary-bg"
32
32
  },
33
33
  size: {
34
34
  default: "gap-4 p-4",
@@ -57,8 +57,8 @@ function Item({ className, variant = "default", size = "default", asChild = fals
57
57
  const itemMediaVariants = (0, class_variance_authority.cva)("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", {
58
58
  variants: { variant: {
59
59
  default: "bg-transparent",
60
- icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
61
- image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
60
+ icon: "size-8 rounded-4 border bg-muted-bg [&_svg:not([class*='size-'])]:size-4",
61
+ image: "size-10 overflow-hidden rounded-4 [&_img]:size-full [&_img]:object-cover"
62
62
  } },
63
63
  defaultVariants: { variant: "default" }
64
64
  });
@@ -94,7 +94,7 @@ function ItemTitle({ className, ...props }) {
94
94
  function ItemDescription({ className, ...props }) {
95
95
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
96
96
  "data-slot": "item-description",
97
- className: require_cn.cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
97
+ className: require_cn.cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-txt", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary-txt", className),
98
98
  ...props
99
99
  });
100
100
  }