@parto-system-design/ui 1.1.11 → 1.1.16

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 (411) hide show
  1. package/dist/components/brand/parto-logo.cjs +130 -0
  2. package/dist/components/brand/parto-logo.cjs.map +1 -0
  3. package/dist/components/brand/parto-logo.d.cts +38 -0
  4. package/dist/components/brand/parto-logo.d.ts +38 -0
  5. package/dist/components/brand/parto-logo.js +108 -0
  6. package/dist/components/brand/parto-logo.js.map +1 -0
  7. package/dist/components/charts/PartoAreaChart.cjs +579 -7
  8. package/dist/components/charts/PartoAreaChart.cjs.map +1 -1
  9. package/dist/components/charts/PartoAreaChart.js +564 -4
  10. package/dist/components/charts/PartoAreaChart.js.map +1 -1
  11. package/dist/components/charts/PartoBarChart.cjs +616 -7
  12. package/dist/components/charts/PartoBarChart.cjs.map +1 -1
  13. package/dist/components/charts/PartoBarChart.js +601 -4
  14. package/dist/components/charts/PartoBarChart.js.map +1 -1
  15. package/dist/components/charts/PartoLineChart.cjs +584 -7
  16. package/dist/components/charts/PartoLineChart.cjs.map +1 -1
  17. package/dist/components/charts/PartoLineChart.js +569 -4
  18. package/dist/components/charts/PartoLineChart.js.map +1 -1
  19. package/dist/components/charts/PartoPieChart.cjs +566 -7
  20. package/dist/components/charts/PartoPieChart.cjs.map +1 -1
  21. package/dist/components/charts/PartoPieChart.js +551 -4
  22. package/dist/components/charts/PartoPieChart.js.map +1 -1
  23. package/dist/components/ui/accordion.cjs +97 -0
  24. package/dist/components/ui/accordion.cjs.map +1 -0
  25. package/dist/components/ui/accordion.d.cts +22 -0
  26. package/dist/components/ui/accordion.d.ts +22 -0
  27. package/dist/components/ui/accordion.js +72 -0
  28. package/dist/components/ui/accordion.js.map +1 -0
  29. package/dist/{chunk-MMC6M35Q.cjs → components/ui/alert-dialog.cjs} +216 -22
  30. package/dist/components/ui/alert-dialog.cjs.map +1 -0
  31. package/dist/components/ui/alert-dialog.d.cts +17 -0
  32. package/dist/components/ui/alert-dialog.d.ts +17 -0
  33. package/dist/{chunk-3QYYPPFJ.js → components/ui/alert-dialog.js} +175 -10
  34. package/dist/components/ui/alert-dialog.js.map +1 -0
  35. package/dist/components/ui/alert-rule-card.cjs +289 -8
  36. package/dist/components/ui/alert-rule-card.cjs.map +1 -1
  37. package/dist/components/ui/alert-rule-card.d.cts +1 -1
  38. package/dist/components/ui/alert-rule-card.d.ts +1 -1
  39. package/dist/components/ui/alert-rule-card.js +271 -4
  40. package/dist/components/ui/alert-rule-card.js.map +1 -1
  41. package/dist/components/ui/alert.cjs +81 -0
  42. package/dist/components/ui/alert.cjs.map +1 -0
  43. package/dist/components/ui/alert.d.cts +11 -0
  44. package/dist/components/ui/alert.d.ts +11 -0
  45. package/dist/components/ui/alert.js +57 -0
  46. package/dist/components/ui/alert.js.map +1 -0
  47. package/dist/components/ui/app-bar.cjs +67 -0
  48. package/dist/components/ui/app-bar.cjs.map +1 -0
  49. package/dist/components/ui/app-bar.d.cts +22 -0
  50. package/dist/components/ui/app-bar.d.ts +22 -0
  51. package/dist/components/ui/app-bar.js +44 -0
  52. package/dist/components/ui/app-bar.js.map +1 -0
  53. package/dist/components/ui/avatar.cjs +66 -14
  54. package/dist/components/ui/avatar.cjs.map +1 -1
  55. package/dist/components/ui/avatar.js +47 -2
  56. package/dist/components/ui/avatar.js.map +1 -1
  57. package/dist/components/ui/badge.cjs +113 -9
  58. package/dist/components/ui/badge.cjs.map +1 -1
  59. package/dist/components/ui/badge.d.cts +1 -1
  60. package/dist/components/ui/badge.d.ts +1 -1
  61. package/dist/components/ui/badge.js +96 -2
  62. package/dist/components/ui/badge.js.map +1 -1
  63. package/dist/components/ui/breadcrumb.cjs +100 -0
  64. package/dist/components/ui/breadcrumb.cjs.map +1 -0
  65. package/dist/components/ui/breadcrumb.d.cts +35 -0
  66. package/dist/components/ui/breadcrumb.d.ts +35 -0
  67. package/dist/components/ui/breadcrumb.js +92 -0
  68. package/dist/components/ui/breadcrumb.js.map +1 -0
  69. package/dist/components/ui/button.cjs +304 -11
  70. package/dist/components/ui/button.cjs.map +1 -1
  71. package/dist/components/ui/button.d.cts +3 -3
  72. package/dist/components/ui/button.d.ts +3 -3
  73. package/dist/components/ui/button.js +306 -3
  74. package/dist/components/ui/button.js.map +1 -1
  75. package/dist/components/ui/calendar.cjs +401 -8
  76. package/dist/components/ui/calendar.cjs.map +1 -1
  77. package/dist/components/ui/calendar.js +404 -4
  78. package/dist/components/ui/calendar.js.map +1 -1
  79. package/dist/components/ui/card.cjs +154 -30
  80. package/dist/components/ui/card.cjs.map +1 -1
  81. package/dist/components/ui/card.js +131 -2
  82. package/dist/components/ui/card.js.map +1 -1
  83. package/dist/{chunk-CAJKSTXX.cjs → components/ui/checkbox.cjs} +10 -5
  84. package/dist/components/ui/checkbox.cjs.map +1 -0
  85. package/dist/components/ui/checkbox.d.cts +6 -0
  86. package/dist/components/ui/checkbox.d.ts +6 -0
  87. package/dist/{chunk-5JJSRGJD.js → components/ui/checkbox.js} +9 -4
  88. package/dist/components/ui/checkbox.js.map +1 -0
  89. package/dist/components/ui/concept-card.cjs +728 -11
  90. package/dist/components/ui/concept-card.cjs.map +1 -1
  91. package/dist/components/ui/concept-card.d.cts +2 -2
  92. package/dist/components/ui/concept-card.d.ts +2 -2
  93. package/dist/components/ui/concept-card.js +710 -7
  94. package/dist/components/ui/concept-card.js.map +1 -1
  95. package/dist/components/ui/data-table.cjs +1553 -10
  96. package/dist/components/ui/data-table.cjs.map +1 -1
  97. package/dist/components/ui/data-table.js +1537 -7
  98. package/dist/components/ui/data-table.js.map +1 -1
  99. package/dist/components/ui/dialog.cjs +119 -42
  100. package/dist/components/ui/dialog.cjs.map +1 -1
  101. package/dist/components/ui/dialog.js +92 -2
  102. package/dist/components/ui/dialog.js.map +1 -1
  103. package/dist/components/ui/dropdown-menu.cjs +268 -0
  104. package/dist/components/ui/dropdown-menu.cjs.map +1 -0
  105. package/dist/components/ui/dropdown-menu.d.cts +73 -0
  106. package/dist/components/ui/dropdown-menu.d.ts +73 -0
  107. package/dist/components/ui/dropdown-menu.js +232 -0
  108. package/dist/components/ui/dropdown-menu.js.map +1 -0
  109. package/dist/components/ui/filter-provider.cjs +70 -13
  110. package/dist/components/ui/filter-provider.cjs.map +1 -1
  111. package/dist/components/ui/filter-provider.js +51 -1
  112. package/dist/components/ui/filter-provider.js.map +1 -1
  113. package/dist/components/ui/form.cjs +169 -0
  114. package/dist/components/ui/form.cjs.map +1 -0
  115. package/dist/components/ui/form.d.cts +46 -0
  116. package/dist/components/ui/form.d.ts +46 -0
  117. package/dist/components/ui/form.js +139 -0
  118. package/dist/components/ui/form.js.map +1 -0
  119. package/dist/components/ui/input.cjs +135 -15
  120. package/dist/components/ui/input.cjs.map +1 -1
  121. package/dist/components/ui/input.d.cts +15 -0
  122. package/dist/components/ui/input.d.ts +15 -0
  123. package/dist/components/ui/input.js +116 -3
  124. package/dist/components/ui/input.js.map +1 -1
  125. package/dist/components/ui/iran-province-heat.cjs +328 -5
  126. package/dist/components/ui/iran-province-heat.cjs.map +1 -1
  127. package/dist/components/ui/iran-province-heat.js +312 -2
  128. package/dist/components/ui/iran-province-heat.js.map +1 -1
  129. package/dist/components/ui/label.cjs +52 -0
  130. package/dist/components/ui/label.cjs.map +1 -0
  131. package/dist/components/ui/label.d.cts +10 -0
  132. package/dist/components/ui/label.d.ts +10 -0
  133. package/dist/components/ui/label.js +30 -0
  134. package/dist/components/ui/label.js.map +1 -0
  135. package/dist/components/ui/page-card.cjs +627 -8
  136. package/dist/components/ui/page-card.cjs.map +1 -1
  137. package/dist/components/ui/page-card.d.cts +3 -2
  138. package/dist/components/ui/page-card.d.ts +3 -2
  139. package/dist/components/ui/page-card.js +611 -5
  140. package/dist/components/ui/page-card.js.map +1 -1
  141. package/dist/components/ui/page-header.cjs +299 -0
  142. package/dist/components/ui/page-header.cjs.map +1 -0
  143. package/dist/components/ui/page-header.d.cts +21 -0
  144. package/dist/components/ui/page-header.d.ts +21 -0
  145. package/dist/components/ui/page-header.js +277 -0
  146. package/dist/components/ui/page-header.js.map +1 -0
  147. package/dist/components/ui/password-input.cjs +168 -0
  148. package/dist/components/ui/password-input.cjs.map +1 -0
  149. package/dist/components/ui/password-input.d.cts +48 -0
  150. package/dist/components/ui/password-input.d.ts +48 -0
  151. package/dist/components/ui/password-input.js +146 -0
  152. package/dist/components/ui/password-input.js.map +1 -0
  153. package/dist/components/ui/popover.cjs +51 -18
  154. package/dist/components/ui/popover.cjs.map +1 -1
  155. package/dist/components/ui/popover.js +30 -2
  156. package/dist/components/ui/popover.js.map +1 -1
  157. package/dist/components/ui/progress.cjs +95 -0
  158. package/dist/components/ui/progress.cjs.map +1 -0
  159. package/dist/components/ui/progress.d.cts +18 -0
  160. package/dist/components/ui/progress.d.ts +18 -0
  161. package/dist/components/ui/progress.js +72 -0
  162. package/dist/components/ui/progress.js.map +1 -0
  163. package/dist/components/ui/radio-card.cjs +84 -0
  164. package/dist/components/ui/radio-card.cjs.map +1 -0
  165. package/dist/components/ui/radio-card.d.cts +12 -0
  166. package/dist/components/ui/radio-card.d.ts +12 -0
  167. package/dist/components/ui/radio-card.js +58 -0
  168. package/dist/components/ui/radio-card.js.map +1 -0
  169. package/dist/components/ui/radio-group.cjs +62 -0
  170. package/dist/components/ui/radio-group.cjs.map +1 -0
  171. package/dist/components/ui/radio-group.d.cts +7 -0
  172. package/dist/components/ui/radio-group.d.ts +7 -0
  173. package/dist/components/ui/radio-group.js +38 -0
  174. package/dist/components/ui/radio-group.js.map +1 -0
  175. package/dist/components/ui/saved-query-card.cjs +409 -7
  176. package/dist/components/ui/saved-query-card.cjs.map +1 -1
  177. package/dist/components/ui/saved-query-card.js +394 -4
  178. package/dist/components/ui/saved-query-card.js.map +1 -1
  179. package/dist/components/ui/scroll-area.cjs +79 -0
  180. package/dist/components/ui/scroll-area.cjs.map +1 -0
  181. package/dist/components/ui/scroll-area.d.cts +14 -0
  182. package/dist/components/ui/scroll-area.d.ts +14 -0
  183. package/dist/components/ui/scroll-area.js +56 -0
  184. package/dist/components/ui/scroll-area.js.map +1 -0
  185. package/dist/components/ui/select.cjs +242 -0
  186. package/dist/components/ui/select.cjs.map +1 -0
  187. package/dist/components/ui/select.d.cts +29 -0
  188. package/dist/components/ui/select.d.ts +29 -0
  189. package/dist/components/ui/select.js +210 -0
  190. package/dist/components/ui/select.js.map +1 -0
  191. package/dist/components/ui/separator.cjs +105 -6
  192. package/dist/components/ui/separator.cjs.map +1 -1
  193. package/dist/components/ui/separator.js +87 -2
  194. package/dist/components/ui/separator.js.map +1 -1
  195. package/dist/components/ui/sheet.cjs +134 -38
  196. package/dist/components/ui/sheet.cjs.map +1 -1
  197. package/dist/components/ui/sheet.js +109 -2
  198. package/dist/components/ui/sheet.js.map +1 -1
  199. package/dist/{chunk-D2EBLE2B.cjs → components/ui/skeleton.cjs} +21 -16
  200. package/dist/components/ui/skeleton.cjs.map +1 -0
  201. package/dist/components/ui/skeleton.d.cts +90 -0
  202. package/dist/components/ui/skeleton.d.ts +90 -0
  203. package/dist/{chunk-SB5DSYR5.js → components/ui/skeleton.js} +8 -3
  204. package/dist/components/ui/skeleton.js.map +1 -0
  205. package/dist/components/ui/slider.cjs +129 -0
  206. package/dist/components/ui/slider.cjs.map +1 -0
  207. package/dist/components/ui/slider.d.cts +10 -0
  208. package/dist/components/ui/slider.d.ts +10 -0
  209. package/dist/components/ui/slider.js +107 -0
  210. package/dist/components/ui/slider.js.map +1 -0
  211. package/dist/components/ui/social-platform-badge.cjs +120 -0
  212. package/dist/components/ui/social-platform-badge.cjs.map +1 -0
  213. package/dist/components/ui/social-platform-badge.d.cts +21 -0
  214. package/dist/components/ui/social-platform-badge.d.ts +21 -0
  215. package/dist/components/ui/social-platform-badge.js +97 -0
  216. package/dist/components/ui/social-platform-badge.js.map +1 -0
  217. package/dist/components/ui/sonner.cjs +51 -0
  218. package/dist/components/ui/sonner.cjs.map +1 -0
  219. package/dist/components/ui/sonner.d.cts +13 -0
  220. package/dist/components/ui/sonner.d.ts +13 -0
  221. package/dist/components/ui/sonner.js +45 -0
  222. package/dist/components/ui/sonner.js.map +1 -0
  223. package/dist/components/ui/sparkline.cjs +159 -6
  224. package/dist/components/ui/sparkline.cjs.map +1 -1
  225. package/dist/components/ui/sparkline.js +142 -2
  226. package/dist/components/ui/sparkline.js.map +1 -1
  227. package/dist/components/ui/switch.cjs +96 -0
  228. package/dist/components/ui/switch.cjs.map +1 -0
  229. package/dist/components/ui/switch.d.cts +13 -0
  230. package/dist/components/ui/switch.d.ts +13 -0
  231. package/dist/components/ui/switch.js +73 -0
  232. package/dist/components/ui/switch.js.map +1 -0
  233. package/dist/components/ui/table.cjs +188 -0
  234. package/dist/components/ui/table.cjs.map +1 -0
  235. package/dist/components/ui/table.d.cts +59 -0
  236. package/dist/components/ui/table.d.ts +59 -0
  237. package/dist/components/ui/table.js +178 -0
  238. package/dist/components/ui/table.js.map +1 -0
  239. package/dist/components/ui/tabs.cjs +140 -0
  240. package/dist/components/ui/tabs.cjs.map +1 -0
  241. package/dist/components/ui/tabs.d.cts +21 -0
  242. package/dist/components/ui/tabs.d.ts +21 -0
  243. package/dist/components/ui/tabs.js +115 -0
  244. package/dist/components/ui/tabs.js.map +1 -0
  245. package/dist/components/ui/textarea.cjs +56 -0
  246. package/dist/components/ui/textarea.cjs.map +1 -0
  247. package/dist/components/ui/textarea.d.cts +5 -0
  248. package/dist/components/ui/textarea.d.ts +5 -0
  249. package/dist/components/ui/textarea.js +34 -0
  250. package/dist/components/ui/textarea.js.map +1 -0
  251. package/dist/components/ui/toggle-group.cjs +123 -0
  252. package/dist/components/ui/toggle-group.cjs.map +1 -0
  253. package/dist/components/ui/toggle-group.d.cts +7 -0
  254. package/dist/components/ui/toggle-group.d.ts +7 -0
  255. package/dist/components/ui/toggle-group.js +99 -0
  256. package/dist/components/ui/toggle-group.js.map +1 -0
  257. package/dist/components/ui/tooltip.cjs +77 -18
  258. package/dist/components/ui/tooltip.cjs.map +1 -1
  259. package/dist/components/ui/tooltip.js +56 -2
  260. package/dist/components/ui/tooltip.js.map +1 -1
  261. package/dist/{concept-card-RwPbqJ06.d.cts → concept-card-BXra9mr0.d.cts} +2 -2
  262. package/dist/{concept-card-CcOBb2Nz.d.ts → concept-card-BoJ5gIJD.d.ts} +2 -2
  263. package/dist/hooks/use-hotkey-registry.cjs +201 -14
  264. package/dist/hooks/use-hotkey-registry.cjs.map +1 -1
  265. package/dist/hooks/use-hotkey-registry.js +182 -2
  266. package/dist/hooks/use-hotkey-registry.js.map +1 -1
  267. package/dist/hooks/use-hotkeys.cjs +144 -9
  268. package/dist/hooks/use-hotkeys.cjs.map +1 -1
  269. package/dist/hooks/use-hotkeys.js +126 -1
  270. package/dist/hooks/use-hotkeys.js.map +1 -1
  271. package/dist/{i18n-CAd9wGOr.d.cts → i18n-BfRhV5aw.d.cts} +5 -3
  272. package/dist/{i18n-ArS3mqj0.d.ts → i18n-ewyqbKM-.d.ts} +5 -3
  273. package/dist/index.cjs +20906 -15706
  274. package/dist/index.cjs.map +1 -1
  275. package/dist/index.css +396 -69
  276. package/dist/index.d.cts +49 -490
  277. package/dist/index.d.ts +49 -490
  278. package/dist/index.js +7704 -2032
  279. package/dist/index.js.map +1 -1
  280. package/dist/{page-card-CmShVqG-.d.cts → page-card-C9XXXOVr.d.cts} +3 -20
  281. package/dist/{page-card-HBn-cy4J.d.ts → page-card-DAnbez_f.d.ts} +3 -20
  282. package/dist/toggle-group-B8r4LOQw.d.cts +26 -0
  283. package/dist/toggle-group-B8r4LOQw.d.ts +26 -0
  284. package/package.json +132 -2
  285. package/tailwind.config.ts +45 -0
  286. package/dist/chunk-2ACKKPWA.cjs +0 -112
  287. package/dist/chunk-2ACKKPWA.cjs.map +0 -1
  288. package/dist/chunk-2UD3LGVX.cjs +0 -316
  289. package/dist/chunk-2UD3LGVX.cjs.map +0 -1
  290. package/dist/chunk-3QYYPPFJ.js.map +0 -1
  291. package/dist/chunk-4SVQNEVH.js +0 -173
  292. package/dist/chunk-4SVQNEVH.js.map +0 -1
  293. package/dist/chunk-4WONHORR.cjs +0 -152
  294. package/dist/chunk-4WONHORR.cjs.map +0 -1
  295. package/dist/chunk-5HCXH6GS.js +0 -409
  296. package/dist/chunk-5HCXH6GS.js.map +0 -1
  297. package/dist/chunk-5JJSRGJD.js.map +0 -1
  298. package/dist/chunk-5K6E4ZSW.cjs +0 -77
  299. package/dist/chunk-5K6E4ZSW.cjs.map +0 -1
  300. package/dist/chunk-5NY26ULO.js +0 -89
  301. package/dist/chunk-5NY26ULO.js.map +0 -1
  302. package/dist/chunk-7RVPG3LE.cjs +0 -231
  303. package/dist/chunk-7RVPG3LE.cjs.map +0 -1
  304. package/dist/chunk-AYEK3WOM.js +0 -207
  305. package/dist/chunk-AYEK3WOM.js.map +0 -1
  306. package/dist/chunk-BRMBLIQG.js +0 -53
  307. package/dist/chunk-BRMBLIQG.js.map +0 -1
  308. package/dist/chunk-CAJKSTXX.cjs.map +0 -1
  309. package/dist/chunk-CKFWMHQU.js +0 -401
  310. package/dist/chunk-CKFWMHQU.js.map +0 -1
  311. package/dist/chunk-CV3N3HVK.js +0 -672
  312. package/dist/chunk-CV3N3HVK.js.map +0 -1
  313. package/dist/chunk-D2EBLE2B.cjs.map +0 -1
  314. package/dist/chunk-GCZ6YATL.js +0 -940
  315. package/dist/chunk-GCZ6YATL.js.map +0 -1
  316. package/dist/chunk-GKRAZGDI.cjs +0 -84
  317. package/dist/chunk-GKRAZGDI.cjs.map +0 -1
  318. package/dist/chunk-GPYJ66CG.js +0 -45
  319. package/dist/chunk-GPYJ66CG.js.map +0 -1
  320. package/dist/chunk-HF6XU5NI.js +0 -84
  321. package/dist/chunk-HF6XU5NI.js.map +0 -1
  322. package/dist/chunk-HJPDZOMJ.cjs +0 -87
  323. package/dist/chunk-HJPDZOMJ.cjs.map +0 -1
  324. package/dist/chunk-HS3XI3CC.cjs +0 -69
  325. package/dist/chunk-HS3XI3CC.cjs.map +0 -1
  326. package/dist/chunk-HUCC3QH5.cjs +0 -53
  327. package/dist/chunk-HUCC3QH5.cjs.map +0 -1
  328. package/dist/chunk-HYZ6BQPS.cjs +0 -425
  329. package/dist/chunk-HYZ6BQPS.cjs.map +0 -1
  330. package/dist/chunk-ISCSZMYW.cjs +0 -106
  331. package/dist/chunk-ISCSZMYW.cjs.map +0 -1
  332. package/dist/chunk-IXFEFIDO.js +0 -82
  333. package/dist/chunk-IXFEFIDO.js.map +0 -1
  334. package/dist/chunk-JCJLN437.js +0 -108
  335. package/dist/chunk-JCJLN437.js.map +0 -1
  336. package/dist/chunk-JMKNNH63.cjs +0 -982
  337. package/dist/chunk-JMKNNH63.cjs.map +0 -1
  338. package/dist/chunk-JUBHQAA2.js +0 -53
  339. package/dist/chunk-JUBHQAA2.js.map +0 -1
  340. package/dist/chunk-K6G63EED.cjs +0 -41
  341. package/dist/chunk-K6G63EED.cjs.map +0 -1
  342. package/dist/chunk-KCWRCSI7.js +0 -62
  343. package/dist/chunk-KCWRCSI7.js.map +0 -1
  344. package/dist/chunk-KYM7NIJO.cjs +0 -433
  345. package/dist/chunk-KYM7NIJO.cjs.map +0 -1
  346. package/dist/chunk-L2L5CKC2.js +0 -291
  347. package/dist/chunk-L2L5CKC2.js.map +0 -1
  348. package/dist/chunk-M5CHZ5BA.js +0 -124
  349. package/dist/chunk-M5CHZ5BA.js.map +0 -1
  350. package/dist/chunk-MEK4RSGC.js +0 -65
  351. package/dist/chunk-MEK4RSGC.js.map +0 -1
  352. package/dist/chunk-MEKWH3GS.js +0 -89
  353. package/dist/chunk-MEKWH3GS.js.map +0 -1
  354. package/dist/chunk-MFTX2DDQ.js +0 -27
  355. package/dist/chunk-MFTX2DDQ.js.map +0 -1
  356. package/dist/chunk-MMC6M35Q.cjs.map +0 -1
  357. package/dist/chunk-NMH43BDC.js +0 -130
  358. package/dist/chunk-NMH43BDC.js.map +0 -1
  359. package/dist/chunk-NORDUD2T.cjs +0 -135
  360. package/dist/chunk-NORDUD2T.cjs.map +0 -1
  361. package/dist/chunk-NV4JOKWL.cjs +0 -197
  362. package/dist/chunk-NV4JOKWL.cjs.map +0 -1
  363. package/dist/chunk-O2JG7WY5.cjs +0 -121
  364. package/dist/chunk-O2JG7WY5.cjs.map +0 -1
  365. package/dist/chunk-ONO2FTV4.cjs +0 -68
  366. package/dist/chunk-ONO2FTV4.cjs.map +0 -1
  367. package/dist/chunk-OQB6HIUL.cjs +0 -108
  368. package/dist/chunk-OQB6HIUL.cjs.map +0 -1
  369. package/dist/chunk-OS6CMYAS.cjs +0 -79
  370. package/dist/chunk-OS6CMYAS.cjs.map +0 -1
  371. package/dist/chunk-PYURPUTV.js +0 -402
  372. package/dist/chunk-PYURPUTV.js.map +0 -1
  373. package/dist/chunk-RJ3HYZ7S.js +0 -44
  374. package/dist/chunk-RJ3HYZ7S.js.map +0 -1
  375. package/dist/chunk-RZNRIOLT.js +0 -128
  376. package/dist/chunk-RZNRIOLT.js.map +0 -1
  377. package/dist/chunk-S3T2L6NA.js +0 -38
  378. package/dist/chunk-S3T2L6NA.js.map +0 -1
  379. package/dist/chunk-S5IPJQZ3.cjs +0 -161
  380. package/dist/chunk-S5IPJQZ3.cjs.map +0 -1
  381. package/dist/chunk-SB5DSYR5.js.map +0 -1
  382. package/dist/chunk-SFXV2DUH.js +0 -106
  383. package/dist/chunk-SFXV2DUH.js.map +0 -1
  384. package/dist/chunk-SXEPGD4Z.cjs +0 -152
  385. package/dist/chunk-SXEPGD4Z.cjs.map +0 -1
  386. package/dist/chunk-SXWSOU3Y.js +0 -89
  387. package/dist/chunk-SXWSOU3Y.js.map +0 -1
  388. package/dist/chunk-SZMVOHT7.cjs +0 -107
  389. package/dist/chunk-SZMVOHT7.cjs.map +0 -1
  390. package/dist/chunk-TWJXOV4C.js +0 -145
  391. package/dist/chunk-TWJXOV4C.js.map +0 -1
  392. package/dist/chunk-U3ADRIVO.cjs +0 -434
  393. package/dist/chunk-U3ADRIVO.cjs.map +0 -1
  394. package/dist/chunk-U5FLLCGC.cjs +0 -151
  395. package/dist/chunk-U5FLLCGC.cjs.map +0 -1
  396. package/dist/chunk-UOZN45G4.cjs +0 -130
  397. package/dist/chunk-UOZN45G4.cjs.map +0 -1
  398. package/dist/chunk-VHLDOG74.cjs +0 -167
  399. package/dist/chunk-VHLDOG74.cjs.map +0 -1
  400. package/dist/chunk-YC5KLN6I.js +0 -139
  401. package/dist/chunk-YC5KLN6I.js.map +0 -1
  402. package/dist/chunk-YENXXYUV.cjs +0 -111
  403. package/dist/chunk-YENXXYUV.cjs.map +0 -1
  404. package/dist/chunk-YFQWC2PW.js +0 -113
  405. package/dist/chunk-YFQWC2PW.js.map +0 -1
  406. package/dist/chunk-Z2TY4A75.cjs +0 -700
  407. package/dist/chunk-Z2TY4A75.cjs.map +0 -1
  408. package/dist/chunk-Z56O7UEU.cjs +0 -136
  409. package/dist/chunk-Z56O7UEU.cjs.map +0 -1
  410. package/dist/chunk-ZBZDR4ZC.js +0 -106
  411. package/dist/chunk-ZBZDR4ZC.js.map +0 -1
@@ -1,9 +1,712 @@
1
- export { ConceptCard } from '../../chunk-CKFWMHQU.js';
2
- import '../../chunk-MEK4RSGC.js';
3
- import '../../chunk-YC5KLN6I.js';
4
- import '../../chunk-5JJSRGJD.js';
5
- import '../../chunk-KCWRCSI7.js';
6
- import '../../chunk-CV3N3HVK.js';
7
- import '../../chunk-4SVQNEVH.js';
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import { clsx } from 'clsx';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+ import { ChevronDown, Minus, ChevronUp, Flame, CheckIcon } from 'lucide-react';
7
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
+
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+ function convertToLocalNumbers(text, locale) {
13
+ if (locale === "fa" || locale === "ar") {
14
+ const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
15
+ return String(text).replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
16
+ }
17
+ return String(text);
18
+ }
19
+
20
+ // src/lib/i18n.ts
21
+ var FLOW_KEYS = [
22
+ "pro-gov",
23
+ "internal-critic",
24
+ "internal-opponent",
25
+ "external-opponent",
26
+ "grey"
27
+ ];
28
+ var flowLabels = {
29
+ fa: {
30
+ "pro-gov": "\u062D\u0627\u0645\u06CC",
31
+ "internal-critic": "\u0645\u0646\u062A\u0642\u062F \u0633\u0627\u0632\u0646\u062F\u0647",
32
+ "internal-opponent": "\u0645\u062E\u0627\u0644\u0641",
33
+ "external-opponent": "\u0645\u062E\u0627\u0644\u0641 \u062C\u062F\u06CC",
34
+ grey: "\u062E\u0646\u062B\u06CC"
35
+ },
36
+ ar: {
37
+ "pro-gov": "\u0645\u0624\u064A\u062F",
38
+ "internal-critic": "\u0645\u0646\u062A\u0642\u062F \u0628\u0646\u0651\u0627\u0621",
39
+ "internal-opponent": "\u0645\u0639\u0627\u0631\u0636",
40
+ "external-opponent": "\u0645\u0639\u0627\u0631\u0636 \u0634\u062F\u064A\u062F",
41
+ grey: "\u0645\u062D\u0627\u064A\u062F"
42
+ },
43
+ en: {
44
+ "pro-gov": "Supporter",
45
+ "internal-critic": "Constructive Critic",
46
+ "internal-opponent": "Detractor",
47
+ "external-opponent": "Strong Detractor",
48
+ grey: "Undecided"
49
+ }
50
+ };
51
+ var statusLabels = {
52
+ fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631", normal: "\u0639\u0627\u062F\u06CC" },
53
+ ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631", normal: "\u0637\u0628\u064A\u0639\u064A" },
54
+ en: { critical: "Critical", warning: "Warning", normal: "Normal" }
55
+ };
56
+ var severityLabels = {
57
+ fa: { urgent: "\u0641\u0648\u0631\u06CC", high: "\u0628\u0627\u0644\u0627", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
58
+ ar: { urgent: "\u0639\u0627\u062C\u0644", high: "\u0645\u0631\u062A\u0641\u0639", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
59
+ en: { urgent: "Urgent", high: "High", medium: "Medium", low: "Low" }
60
+ };
61
+ var SIZE_CLASSES = {
62
+ sm: { badge: "h-6 text-xs px-2 gap-1.5", dot: "size-1.5" },
63
+ md: { badge: "h-7 text-sm px-2.5 gap-2", dot: "size-2" }
64
+ };
65
+ function tokenVar(status) {
66
+ return `--status-${status}`;
67
+ }
68
+ var StatusBadge = React.forwardRef(
69
+ ({ className, status, size = "md", showLabel = true, locale = "fa", animated, ...props }, ref) => {
70
+ const label = statusLabels[locale]?.[status] ?? statusLabels.fa[status];
71
+ const shouldPulse = animated ?? status === "critical";
72
+ const token = tokenVar(status);
73
+ return /* @__PURE__ */ jsxs(
74
+ "span",
75
+ {
76
+ ref,
77
+ "data-slot": "status-badge",
78
+ "data-status": status,
79
+ "aria-label": showLabel ? void 0 : label,
80
+ className: cn(
81
+ "inline-flex items-center rounded-full border font-medium transition-colors duration-150",
82
+ SIZE_CLASSES[size].badge,
83
+ className
84
+ ),
85
+ style: {
86
+ backgroundColor: `hsl(var(${token}) / 0.1)`,
87
+ borderColor: `hsl(var(${token}) / 0.3)`,
88
+ color: `hsl(var(${token}))`
89
+ },
90
+ ...props,
91
+ children: [
92
+ /* @__PURE__ */ jsxs("span", { className: "relative inline-flex", children: [
93
+ shouldPulse && /* @__PURE__ */ jsx(
94
+ "span",
95
+ {
96
+ className: "absolute inset-0 rounded-full animate-pulse-subtle",
97
+ style: { backgroundColor: `hsl(var(${token}) / 0.5)` },
98
+ "aria-hidden": "true"
99
+ }
100
+ ),
101
+ /* @__PURE__ */ jsx(
102
+ "span",
103
+ {
104
+ className: cn("relative inline-block rounded-full", SIZE_CLASSES[size].dot),
105
+ style: { backgroundColor: `hsl(var(${token}))` },
106
+ "aria-hidden": "true"
107
+ }
108
+ )
109
+ ] }),
110
+ showLabel && /* @__PURE__ */ jsx("span", { children: label })
111
+ ]
112
+ }
113
+ );
114
+ }
115
+ );
116
+ StatusBadge.displayName = "StatusBadge";
117
+ var SEVERITY_ICON = {
118
+ urgent: Flame,
119
+ high: ChevronUp,
120
+ medium: Minus,
121
+ low: ChevronDown
122
+ };
123
+ var SIZE_CLASSES2 = {
124
+ sm: { badge: "h-6 text-xs px-2 gap-1", icon: "size-3" },
125
+ md: { badge: "h-7 text-sm px-2.5 gap-1.5", icon: "size-3.5" }
126
+ };
127
+ function tokenVar2(severity) {
128
+ return `--severity-${severity}`;
129
+ }
130
+ var SeverityBadge = React.forwardRef(
131
+ ({ className, severity, size = "md", showLabel = true, variant = "soft", locale = "fa", ...props }, ref) => {
132
+ const label = severityLabels[locale]?.[severity] ?? severityLabels.fa[severity];
133
+ const Icon = SEVERITY_ICON[severity];
134
+ const token = tokenVar2(severity);
135
+ const softStyle = {
136
+ backgroundColor: `hsl(var(${token}) / 0.1)`,
137
+ borderColor: `hsl(var(${token}) / 0.3)`,
138
+ color: `hsl(var(${token}))`
139
+ };
140
+ const solidStyle = {
141
+ backgroundColor: `hsl(var(${token}))`,
142
+ borderColor: `hsl(var(${token}))`,
143
+ color: "hsl(var(--foreground-contrast))"
144
+ };
145
+ return /* @__PURE__ */ jsxs(
146
+ "span",
147
+ {
148
+ ref,
149
+ "data-slot": "severity-badge",
150
+ "data-severity": severity,
151
+ "data-variant": variant,
152
+ "aria-label": showLabel ? void 0 : label,
153
+ className: cn(
154
+ "inline-flex items-center rounded-full border font-medium transition-colors duration-150",
155
+ SIZE_CLASSES2[size].badge,
156
+ className
157
+ ),
158
+ style: variant === "solid" ? solidStyle : softStyle,
159
+ ...props,
160
+ children: [
161
+ /* @__PURE__ */ jsx(Icon, { className: SIZE_CLASSES2[size].icon, "aria-hidden": "true" }),
162
+ showLabel && /* @__PURE__ */ jsx("span", { children: label })
163
+ ]
164
+ }
165
+ );
166
+ }
167
+ );
168
+ SeverityBadge.displayName = "SeverityBadge";
169
+ function calcPercents(data) {
170
+ const total = FLOW_KEYS.reduce((s, k) => s + (data[k] ?? 0), 0);
171
+ const result = Object.fromEntries(FLOW_KEYS.map((k) => [k, 0]));
172
+ if (total === 0) return result;
173
+ const floats = FLOW_KEYS.filter((k) => (data[k] ?? 0) > 0).map((k) => {
174
+ const v = (data[k] ?? 0) / total * 100;
175
+ return { k, floor: Math.floor(v), rem: v - Math.floor(v) };
176
+ });
177
+ const remaining = 100 - floats.reduce((s, f) => s + f.floor, 0);
178
+ const sorted = [...floats].sort((a, b) => b.rem - a.rem);
179
+ sorted.slice(0, remaining).forEach((f) => f.floor++);
180
+ floats.forEach(({ k, floor }) => result[k] = floor);
181
+ return result;
182
+ }
183
+ var STACKED_ORDER = [
184
+ "pro-gov",
185
+ "internal-critic",
186
+ "internal-opponent",
187
+ "external-opponent",
188
+ "grey"
189
+ ];
190
+ function tokenVar3(key) {
191
+ return `--flow-${key}`;
192
+ }
193
+ var FlowDistribution = React.forwardRef(
194
+ ({
195
+ className,
196
+ data,
197
+ variant = "stacked",
198
+ showCounts = false,
199
+ showPercent = true,
200
+ locale = "fa",
201
+ isLoading = false,
202
+ ...props
203
+ }, ref) => {
204
+ const labels = flowLabels[locale] ?? flowLabels.fa;
205
+ const percents = calcPercents(data);
206
+ const percentSign = locale === "en" ? "%" : "\u066A";
207
+ if (isLoading) {
208
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "flow-distribution", className: cn("space-y-2", className), ...props, children: variant === "stacked" ? /* @__PURE__ */ jsx("div", { className: "h-3 w-full rounded-full bg-muted animate-pulse" }) : variant === "compact" ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("div", { className: "h-5 w-20 rounded-full bg-muted animate-pulse" }, i)) }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
209
+ /* @__PURE__ */ jsx("div", { className: "h-3 w-16 rounded bg-muted animate-pulse" }),
210
+ /* @__PURE__ */ jsx("div", { className: "h-2 flex-1 rounded-full bg-muted animate-pulse" }),
211
+ /* @__PURE__ */ jsx("div", { className: "h-3 w-8 rounded bg-muted animate-pulse" })
212
+ ] }, i)) }) });
213
+ }
214
+ if (variant === "stacked") {
215
+ const active = STACKED_ORDER.filter((k) => (data[k] ?? 0) > 0);
216
+ const srLabel = active.map((k) => `${labels[k]} ${convertToLocalNumbers(percents[k], locale)}${percentSign}`).join("\u060C ");
217
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "flow-distribution", className: cn("space-y-2", className), ...props, children: [
218
+ /* @__PURE__ */ jsx("div", { className: "flex h-3 w-full overflow-hidden rounded-full bg-muted", role: "img", "aria-label": srLabel, children: active.map((k) => /* @__PURE__ */ jsx(
219
+ "div",
220
+ {
221
+ className: "transition-all duration-500",
222
+ style: { width: `${percents[k]}%`, backgroundColor: `hsl(var(${tokenVar3(k)}))` }
223
+ },
224
+ k
225
+ )) }),
226
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-x-3 gap-y-1", children: active.map((k) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
227
+ /* @__PURE__ */ jsx(
228
+ "span",
229
+ {
230
+ className: "inline-block h-2 w-2 rounded-full",
231
+ style: { backgroundColor: `hsl(var(${tokenVar3(k)}))` }
232
+ }
233
+ ),
234
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-foreground-light", children: labels[k] }),
235
+ showPercent && /* @__PURE__ */ jsxs("span", { className: "text-xs font-medium tabular-nums", style: { color: `hsl(var(${tokenVar3(k)}))` }, children: [
236
+ convertToLocalNumbers(percents[k], locale),
237
+ percentSign
238
+ ] }),
239
+ showCounts && /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground-muted tabular-nums", children: [
240
+ "(",
241
+ convertToLocalNumbers(data[k] ?? 0, locale),
242
+ ")"
243
+ ] })
244
+ ] }, k)) })
245
+ ] });
246
+ }
247
+ if (variant === "compact") {
248
+ const active = FLOW_KEYS.filter((k) => (data[k] ?? 0) > 0).sort((a, b) => (data[b] ?? 0) - (data[a] ?? 0));
249
+ return /* @__PURE__ */ jsx(
250
+ "div",
251
+ {
252
+ ref,
253
+ "data-slot": "flow-distribution",
254
+ className: cn("inline-flex flex-wrap gap-2", className),
255
+ ...props,
256
+ children: active.map((k) => /* @__PURE__ */ jsxs(
257
+ "span",
258
+ {
259
+ className: "inline-flex items-center gap-1 rounded-full px-2 py-0.5",
260
+ style: {
261
+ backgroundColor: `hsl(var(${tokenVar3(k)}) / 0.12)`,
262
+ color: `hsl(var(${tokenVar3(k)}))`
263
+ },
264
+ children: [
265
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium", children: labels[k] }),
266
+ showPercent && /* @__PURE__ */ jsxs("span", { className: "text-xs font-bold tabular-nums", children: [
267
+ convertToLocalNumbers(percents[k], locale),
268
+ percentSign
269
+ ] }),
270
+ showCounts && /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground-muted tabular-nums", children: [
271
+ "(",
272
+ convertToLocalNumbers(data[k] ?? 0, locale),
273
+ ")"
274
+ ] })
275
+ ]
276
+ },
277
+ k
278
+ ))
279
+ }
280
+ );
281
+ }
282
+ const sorted = FLOW_KEYS.filter((k) => (data[k] ?? 0) > 0).sort((a, b) => (data[b] ?? 0) - (data[a] ?? 0));
283
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "flow-distribution", className: cn("space-y-1.5", className), ...props, children: sorted.map((k) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
284
+ /* @__PURE__ */ jsx("span", { className: "w-24 shrink-0 text-xs text-foreground-light text-end", children: labels[k] }),
285
+ /* @__PURE__ */ jsx("div", { className: "relative flex-1 h-2 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsx(
286
+ "div",
287
+ {
288
+ className: "absolute inset-y-0 start-0 rounded-full transition-all duration-500",
289
+ style: {
290
+ width: `${percents[k]}%`,
291
+ backgroundColor: `hsl(var(${tokenVar3(k)}))`
292
+ },
293
+ role: "progressbar",
294
+ "aria-valuenow": percents[k],
295
+ "aria-valuemin": 0,
296
+ "aria-valuemax": 100,
297
+ "aria-label": `${labels[k]}: ${percents[k]}%`
298
+ }
299
+ ) }),
300
+ /* @__PURE__ */ jsx(
301
+ "span",
302
+ {
303
+ className: "w-12 shrink-0 text-xs font-medium tabular-nums text-start",
304
+ style: { color: `hsl(var(${tokenVar3(k)}))` },
305
+ children: showCounts ? convertToLocalNumbers((data[k] ?? 0).toLocaleString(), locale) : `${convertToLocalNumbers(percents[k], locale)}${percentSign}`
306
+ }
307
+ )
308
+ ] }, k)) });
309
+ }
310
+ );
311
+ FlowDistribution.displayName = "FlowDistribution";
312
+ var LABELS = {
313
+ fa: { positive: "\u0645\u062B\u0628\u062A", negative: "\u0645\u0646\u0641\u06CC", neutral: "\u062E\u0646\u062B\u06CC", mixed: "\u062A\u0631\u06A9\u06CC\u0628\u06CC" },
314
+ ar: { positive: "\u0625\u064A\u062C\u0627\u0628\u064A", negative: "\u0633\u0644\u0628\u064A", neutral: "\u0645\u062D\u0627\u064A\u062F", mixed: "\u0645\u062E\u062A\u0644\u0637" },
315
+ en: { positive: "Positive", negative: "Negative", neutral: "Neutral", mixed: "Mixed" }
316
+ };
317
+ var SENTIMENT_STYLES = {
318
+ positive: {
319
+ bar: "bg-[hsl(var(--sentiment-positive))]",
320
+ text: "text-[hsl(var(--sentiment-positive))]",
321
+ bg: "bg-[hsl(var(--sentiment-positive)/0.12)]"
322
+ },
323
+ negative: {
324
+ bar: "bg-[hsl(var(--sentiment-negative))]",
325
+ text: "text-[hsl(var(--sentiment-negative))]",
326
+ bg: "bg-[hsl(var(--sentiment-negative)/0.12)]"
327
+ },
328
+ neutral: {
329
+ bar: "bg-[hsl(var(--sentiment-neutral))]",
330
+ text: "text-[hsl(var(--sentiment-neutral))]",
331
+ bg: "bg-[hsl(var(--sentiment-neutral)/0.12)]"
332
+ },
333
+ mixed: {
334
+ bar: "bg-[hsl(var(--sentiment-mixed))]",
335
+ text: "text-[hsl(var(--sentiment-mixed))]",
336
+ bg: "bg-[hsl(var(--sentiment-mixed)/0.12)]"
337
+ }
338
+ };
339
+ function calcPercents2(data) {
340
+ const keys = ["positive", "negative", "neutral", "mixed"].filter((k) => (data[k] ?? 0) > 0);
341
+ const total = ["positive", "negative", "neutral", "mixed"].reduce((sum, k) => sum + (data[k] ?? 0), 0);
342
+ if (total === 0) return { positive: 0, negative: 0, neutral: 0, mixed: 0 };
343
+ const floats = keys.map((k) => ({ k, v: (data[k] ?? 0) / total * 100 }));
344
+ const floors = floats.map(({ k, v }) => ({ k, floor: Math.floor(v), rem: v - Math.floor(v) }));
345
+ const remaining = 100 - floors.reduce((s, f) => s + f.floor, 0);
346
+ const sorted = [...floors].sort((a, b) => b.rem - a.rem);
347
+ sorted.slice(0, remaining).forEach((f) => f.floor++);
348
+ const result = { positive: 0, negative: 0, neutral: 0, mixed: 0 };
349
+ sorted.forEach(({ k, floor }) => result[k] = floor);
350
+ return result;
351
+ }
352
+ var SENTIMENT_ORDER = ["positive", "neutral", "mixed", "negative"];
353
+ var SentimentDistribution = React.forwardRef(
354
+ ({
355
+ className,
356
+ data,
357
+ variant = "bars",
358
+ showCounts = false,
359
+ showPercent = true,
360
+ locale = "fa",
361
+ isLoading = false,
362
+ ...props
363
+ }, ref) => {
364
+ const labels = LABELS[locale] ?? LABELS.fa;
365
+ const percents = calcPercents2(data);
366
+ const activeOrder = SENTIMENT_ORDER.filter((key) => (data[key] ?? 0) > 0);
367
+ if (isLoading) {
368
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "sentiment-distribution", className: cn("space-y-2", className), ...props, children: variant === "stacked" ? /* @__PURE__ */ jsx("div", { className: "h-3 w-full rounded-full bg-muted animate-pulse" }) : variant === "compact" ? /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("div", { className: "h-4 w-16 rounded bg-muted animate-pulse" }, i)) }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
369
+ /* @__PURE__ */ jsx("div", { className: "h-3 w-12 rounded bg-muted animate-pulse" }),
370
+ /* @__PURE__ */ jsx("div", { className: "h-2 flex-1 rounded-full bg-muted animate-pulse" }),
371
+ /* @__PURE__ */ jsx("div", { className: "h-3 w-8 rounded bg-muted animate-pulse" })
372
+ ] }, i)) }) });
373
+ }
374
+ if (variant === "stacked") {
375
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "sentiment-distribution", className: cn("space-y-2", className), ...props, children: [
376
+ /* @__PURE__ */ jsx(
377
+ "div",
378
+ {
379
+ className: "flex h-3 w-full overflow-hidden rounded-full bg-muted",
380
+ role: "img",
381
+ "aria-label": `${labels.positive} ${percents.positive}\u066A\u060C ${labels.negative} ${percents.negative}\u066A\u060C ${labels.neutral} ${percents.neutral}\u066A`,
382
+ children: activeOrder.map((key) => /* @__PURE__ */ jsx(
383
+ "div",
384
+ {
385
+ className: cn("transition-all duration-500", SENTIMENT_STYLES[key].bar),
386
+ style: { width: `${percents[key]}%` }
387
+ },
388
+ key
389
+ ))
390
+ }
391
+ ),
392
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-x-3 gap-y-1", children: activeOrder.map((key) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
393
+ /* @__PURE__ */ jsx("span", { className: cn("inline-block h-2 w-2 rounded-full", SENTIMENT_STYLES[key].bar) }),
394
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-foreground-light", children: labels[key] }),
395
+ showPercent && /* @__PURE__ */ jsxs("span", { className: cn("text-xs font-medium", SENTIMENT_STYLES[key].text), children: [
396
+ convertToLocalNumbers(percents[key], locale),
397
+ locale === "en" ? "%" : "\u066A"
398
+ ] }),
399
+ showCounts && /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground-muted", children: [
400
+ "(",
401
+ convertToLocalNumbers(data[key] ?? 0, locale),
402
+ ")"
403
+ ] })
404
+ ] }, key)) })
405
+ ] });
406
+ }
407
+ if (variant === "compact") {
408
+ return /* @__PURE__ */ jsx(
409
+ "div",
410
+ {
411
+ ref,
412
+ "data-slot": "sentiment-distribution",
413
+ className: cn("inline-flex flex-wrap gap-2", className),
414
+ ...props,
415
+ children: activeOrder.map((key) => /* @__PURE__ */ jsxs(
416
+ "span",
417
+ {
418
+ className: cn("inline-flex items-center gap-1 rounded-full px-2 py-0.5", SENTIMENT_STYLES[key].bg),
419
+ children: [
420
+ /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", SENTIMENT_STYLES[key].text), children: labels[key] }),
421
+ showPercent && /* @__PURE__ */ jsxs("span", { className: cn("text-xs font-bold tabular-nums", SENTIMENT_STYLES[key].text), children: [
422
+ convertToLocalNumbers(percents[key], locale),
423
+ locale === "en" ? "%" : "\u066A"
424
+ ] }),
425
+ showCounts && /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground-muted tabular-nums", children: [
426
+ "(",
427
+ convertToLocalNumbers((data[key] ?? 0).toLocaleString(), locale),
428
+ ")"
429
+ ] })
430
+ ]
431
+ },
432
+ key
433
+ ))
434
+ }
435
+ );
436
+ }
437
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "sentiment-distribution", className: cn("space-y-1.5", className), ...props, children: activeOrder.map((key) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
438
+ /* @__PURE__ */ jsx("span", { className: "w-10 shrink-0 text-xs text-foreground-light text-end", children: labels[key] }),
439
+ /* @__PURE__ */ jsx("div", { className: "relative flex-1 h-2 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsx(
440
+ "div",
441
+ {
442
+ className: cn(
443
+ "absolute inset-y-0 start-0 rounded-full transition-all duration-500",
444
+ SENTIMENT_STYLES[key].bar
445
+ ),
446
+ style: { width: `${percents[key]}%` },
447
+ role: "progressbar",
448
+ "aria-valuenow": percents[key],
449
+ "aria-valuemin": 0,
450
+ "aria-valuemax": 100,
451
+ "aria-label": `${labels[key]}: ${percents[key]}%`
452
+ }
453
+ ) }),
454
+ /* @__PURE__ */ jsx(
455
+ "span",
456
+ {
457
+ className: cn("w-10 shrink-0 text-xs font-medium tabular-nums text-start", SENTIMENT_STYLES[key].text),
458
+ children: showCounts ? convertToLocalNumbers((data[key] ?? 0).toLocaleString(), locale) : `${convertToLocalNumbers(percents[key], locale)}${locale === "en" ? "%" : "\u066A"}`
459
+ }
460
+ )
461
+ ] }, key)) });
462
+ }
463
+ );
464
+ SentimentDistribution.displayName = "SentimentDistribution";
465
+ var TREND_CLASSES = {
466
+ up: "text-[hsl(var(--sentiment-positive))]",
467
+ down: "text-[hsl(var(--sentiment-negative))]",
468
+ neutral: "text-[hsl(var(--sentiment-neutral))]"
469
+ };
470
+ function resolveTrend(data, trend) {
471
+ if (trend !== "auto") return trend;
472
+ if (data.length < 2) return "neutral";
473
+ const first = data[0];
474
+ const last = data[data.length - 1];
475
+ if (last > first) return "up";
476
+ if (last < first) return "down";
477
+ return "neutral";
478
+ }
479
+ var Sparkline = React.forwardRef(
480
+ ({
481
+ className,
482
+ data,
483
+ variant = "line",
484
+ trend = "auto",
485
+ width = 80,
486
+ height = 24,
487
+ strokeWidth = 1.5,
488
+ showEndDot = false,
489
+ padding = 2,
490
+ color,
491
+ barGap = 1,
492
+ "aria-label": ariaLabel,
493
+ ...props
494
+ }, ref) => {
495
+ const effectiveTrend = resolveTrend(data, trend);
496
+ const trendColorClass = color ? void 0 : TREND_CLASSES[effectiveTrend];
497
+ if (data.length === 0) {
498
+ return /* @__PURE__ */ jsx(
499
+ "div",
500
+ {
501
+ ref,
502
+ "data-slot": "sparkline",
503
+ "data-empty": "true",
504
+ "aria-hidden": "true",
505
+ className: cn("inline-block", className),
506
+ style: { width, height },
507
+ ...props
508
+ }
509
+ );
510
+ }
511
+ const min = Math.min(...data);
512
+ const max = Math.max(...data);
513
+ const range = max - min || 1;
514
+ const innerW = width - padding * 2;
515
+ const innerH = height - padding * 2;
516
+ const stepX = data.length > 1 ? innerW / (data.length - 1) : 0;
517
+ const yFor = (v) => padding + innerH - (v - min) / range * innerH;
518
+ const xFor = (i) => padding + i * stepX;
519
+ const points = data.map((v, i) => ({ x: xFor(i), y: yFor(v) }));
520
+ const linePath = points.map((p, i) => `${i === 0 ? "M" : "L"}${p.x.toFixed(2)} ${p.y.toFixed(2)}`).join(" ");
521
+ const areaPath = `${linePath} L${points[points.length - 1].x.toFixed(2)} ${(height - padding).toFixed(
522
+ 2
523
+ )} L${points[0].x.toFixed(2)} ${(height - padding).toFixed(2)} Z`;
524
+ const stroke = color ?? "currentColor";
525
+ return /* @__PURE__ */ jsx(
526
+ "div",
527
+ {
528
+ ref,
529
+ "data-slot": "sparkline",
530
+ "data-variant": variant,
531
+ "data-trend": effectiveTrend,
532
+ role: ariaLabel ? "img" : void 0,
533
+ "aria-label": ariaLabel,
534
+ "aria-hidden": ariaLabel ? void 0 : true,
535
+ className: cn("inline-block align-middle", trendColorClass, className),
536
+ style: { width, height },
537
+ ...props,
538
+ children: /* @__PURE__ */ jsxs(
539
+ "svg",
540
+ {
541
+ width,
542
+ height,
543
+ viewBox: `0 0 ${width} ${height}`,
544
+ preserveAspectRatio: "none",
545
+ focusable: "false",
546
+ children: [
547
+ variant === "area" && /* @__PURE__ */ jsx("path", { d: areaPath, fill: stroke, opacity: 0.18 }),
548
+ (variant === "line" || variant === "area") && /* @__PURE__ */ jsx(
549
+ "path",
550
+ {
551
+ d: linePath,
552
+ fill: "none",
553
+ stroke,
554
+ strokeWidth,
555
+ strokeLinecap: "round",
556
+ strokeLinejoin: "round",
557
+ vectorEffect: "non-scaling-stroke"
558
+ }
559
+ ),
560
+ variant === "bars" && data.map((v, i) => {
561
+ const gap = barGap;
562
+ const barW = Math.max(0, stepX - gap);
563
+ const y = yFor(v);
564
+ const barH = Math.max(1, height - padding - y);
565
+ const x = xFor(i) - barW / 2;
566
+ return /* @__PURE__ */ jsx(
567
+ "rect",
568
+ {
569
+ x: x.toFixed(2),
570
+ y: y.toFixed(2),
571
+ width: barW.toFixed(2),
572
+ height: barH.toFixed(2),
573
+ rx: Math.min(1, barW / 3),
574
+ fill: stroke
575
+ },
576
+ i
577
+ );
578
+ }),
579
+ showEndDot && variant !== "bars" && /* @__PURE__ */ jsx(
580
+ "circle",
581
+ {
582
+ cx: points[points.length - 1].x.toFixed(2),
583
+ cy: points[points.length - 1].y.toFixed(2),
584
+ r: strokeWidth + 0.5,
585
+ fill: stroke
586
+ }
587
+ )
588
+ ]
589
+ }
590
+ )
591
+ }
592
+ );
593
+ }
594
+ );
595
+ Sparkline.displayName = "Sparkline";
596
+ var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
597
+ CheckboxPrimitive.Root,
598
+ {
599
+ ref,
600
+ "data-slot": "checkbox",
601
+ className: cn(
602
+ "peer border-control bg-control data-[state=checked]:bg-brand data-[state=checked]:text-on-brand data-[state=checked]:border-brand focus-visible:border-brand-default focus-visible:ring-brand-default/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-all duration-150 outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
603
+ className
604
+ ),
605
+ ...props,
606
+ children: /* @__PURE__ */ jsx(
607
+ CheckboxPrimitive.Indicator,
608
+ {
609
+ "data-slot": "checkbox-indicator",
610
+ className: "grid place-content-center text-current transition-none",
611
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
612
+ }
613
+ )
614
+ }
615
+ ));
616
+ Checkbox.displayName = "Checkbox";
617
+ var ConceptCard = React.forwardRef(
618
+ ({
619
+ className,
620
+ title,
621
+ subtitle,
622
+ status,
623
+ severity,
624
+ flow,
625
+ sentiment,
626
+ trend,
627
+ aiSummary,
628
+ totalCount,
629
+ comparison,
630
+ interactive = false,
631
+ locale = "fa",
632
+ onClick,
633
+ ...props
634
+ }, ref) => {
635
+ const isClickable = interactive || !!onClick;
636
+ const handleClick = isClickable ? (e) => {
637
+ const target = e.target;
638
+ if (target && target.closest('[data-slot="concept-card-comparison"]')) return;
639
+ onClick?.(e);
640
+ } : void 0;
641
+ return /* @__PURE__ */ jsxs(
642
+ "div",
643
+ {
644
+ ref,
645
+ "data-slot": "concept-card",
646
+ "data-status": status,
647
+ "data-severity": severity,
648
+ role: isClickable ? "button" : "article",
649
+ tabIndex: isClickable ? 0 : void 0,
650
+ onClick: handleClick,
651
+ onKeyDown: isClickable ? (e) => {
652
+ if ((e.key === "Enter" || e.key === " ") && e.target === e.currentTarget) {
653
+ e.preventDefault();
654
+ e.currentTarget.click();
655
+ }
656
+ } : void 0,
657
+ className: cn(
658
+ "group/concept-card flex flex-col gap-3 rounded-lg border border-border bg-background p-4 transition-colors",
659
+ isClickable && "cursor-pointer hover:border-strong hover:bg-surface-100/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-background",
660
+ className
661
+ ),
662
+ ...props,
663
+ children: [
664
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
665
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
666
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
667
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground truncate", children: title }),
668
+ status && /* @__PURE__ */ jsx(StatusBadge, { status, size: "sm", animated: true, locale }),
669
+ severity && /* @__PURE__ */ jsx(SeverityBadge, { severity, size: "sm", locale })
670
+ ] }),
671
+ subtitle && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-foreground-lighter truncate", children: subtitle })
672
+ ] }),
673
+ comparison && /* @__PURE__ */ jsx("div", { "data-slot": "concept-card-comparison", className: "shrink-0", children: /* @__PURE__ */ jsx(
674
+ Checkbox,
675
+ {
676
+ checked: comparison.selected,
677
+ onCheckedChange: (next) => comparison.onSelectionChange(next === true),
678
+ "aria-label": typeof comparison.label === "string" ? comparison.label : locale === "fa" ? "\u0627\u0646\u062A\u062E\u0627\u0628 \u0628\u0631\u0627\u06CC \u0645\u0642\u0627\u06CC\u0633\u0647" : locale === "ar" ? "\u062A\u062D\u062F\u064A\u062F \u0644\u0644\u0645\u0642\u0627\u0631\u0646\u0629" : "Select for comparison"
679
+ }
680
+ ) })
681
+ ] }),
682
+ aiSummary && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground leading-relaxed", children: aiSummary }),
683
+ (flow || sentiment) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
684
+ flow && /* @__PURE__ */ jsx("div", { "data-slot": "concept-card-flow", children: /* @__PURE__ */ jsx(FlowDistribution, { data: flow, variant: "stacked", showCounts: false, showPercent: true, locale }) }),
685
+ sentiment && /* @__PURE__ */ jsx("div", { "data-slot": "concept-card-sentiment", children: /* @__PURE__ */ jsx(
686
+ SentimentDistribution,
687
+ {
688
+ data: sentiment,
689
+ variant: "stacked",
690
+ showCounts: false,
691
+ showPercent: true,
692
+ locale
693
+ }
694
+ ) })
695
+ ] }),
696
+ (trend || typeof totalCount === "number") && /* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-3 pt-1 border-t border-border mt-auto", children: [
697
+ trend && trend.length > 0 ? /* @__PURE__ */ jsx("div", { "data-slot": "concept-card-trend", children: /* @__PURE__ */ jsx(Sparkline, { data: trend, variant: "area", width: 120, height: 28 }) }) : /* @__PURE__ */ jsx("span", {}),
698
+ typeof totalCount === "number" && /* @__PURE__ */ jsxs("div", { className: "text-end", children: [
699
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-foreground-lighter", children: locale === "fa" ? "\u0645\u062C\u0645\u0648\u0639" : locale === "ar" ? "\u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A" : "Total" }),
700
+ /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold tabular-nums text-foreground", children: convertToLocalNumbers(totalCount, locale) })
701
+ ] })
702
+ ] })
703
+ ]
704
+ }
705
+ );
706
+ }
707
+ );
708
+ ConceptCard.displayName = "ConceptCard";
709
+
710
+ export { ConceptCard };
8
711
  //# sourceMappingURL=concept-card.js.map
9
712
  //# sourceMappingURL=concept-card.js.map