@parto-system-design/ui 1.1.11 → 1.1.17

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 (409) 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.js +96 -2
  60. package/dist/components/ui/badge.js.map +1 -1
  61. package/dist/components/ui/breadcrumb.cjs +100 -0
  62. package/dist/components/ui/breadcrumb.cjs.map +1 -0
  63. package/dist/components/ui/breadcrumb.d.cts +35 -0
  64. package/dist/components/ui/breadcrumb.d.ts +35 -0
  65. package/dist/components/ui/breadcrumb.js +92 -0
  66. package/dist/components/ui/breadcrumb.js.map +1 -0
  67. package/dist/components/ui/button.cjs +304 -11
  68. package/dist/components/ui/button.cjs.map +1 -1
  69. package/dist/components/ui/button.d.cts +1 -1
  70. package/dist/components/ui/button.d.ts +1 -1
  71. package/dist/components/ui/button.js +306 -3
  72. package/dist/components/ui/button.js.map +1 -1
  73. package/dist/components/ui/calendar.cjs +401 -8
  74. package/dist/components/ui/calendar.cjs.map +1 -1
  75. package/dist/components/ui/calendar.js +404 -4
  76. package/dist/components/ui/calendar.js.map +1 -1
  77. package/dist/components/ui/card.cjs +154 -30
  78. package/dist/components/ui/card.cjs.map +1 -1
  79. package/dist/components/ui/card.js +131 -2
  80. package/dist/components/ui/card.js.map +1 -1
  81. package/dist/{chunk-CAJKSTXX.cjs → components/ui/checkbox.cjs} +10 -5
  82. package/dist/components/ui/checkbox.cjs.map +1 -0
  83. package/dist/components/ui/checkbox.d.cts +6 -0
  84. package/dist/components/ui/checkbox.d.ts +6 -0
  85. package/dist/{chunk-5JJSRGJD.js → components/ui/checkbox.js} +9 -4
  86. package/dist/components/ui/checkbox.js.map +1 -0
  87. package/dist/components/ui/concept-card.cjs +728 -11
  88. package/dist/components/ui/concept-card.cjs.map +1 -1
  89. package/dist/components/ui/concept-card.d.cts +2 -2
  90. package/dist/components/ui/concept-card.d.ts +2 -2
  91. package/dist/components/ui/concept-card.js +710 -7
  92. package/dist/components/ui/concept-card.js.map +1 -1
  93. package/dist/components/ui/data-table.cjs +1553 -10
  94. package/dist/components/ui/data-table.cjs.map +1 -1
  95. package/dist/components/ui/data-table.js +1537 -7
  96. package/dist/components/ui/data-table.js.map +1 -1
  97. package/dist/components/ui/dialog.cjs +119 -42
  98. package/dist/components/ui/dialog.cjs.map +1 -1
  99. package/dist/components/ui/dialog.js +92 -2
  100. package/dist/components/ui/dialog.js.map +1 -1
  101. package/dist/components/ui/dropdown-menu.cjs +268 -0
  102. package/dist/components/ui/dropdown-menu.cjs.map +1 -0
  103. package/dist/components/ui/dropdown-menu.d.cts +73 -0
  104. package/dist/components/ui/dropdown-menu.d.ts +73 -0
  105. package/dist/components/ui/dropdown-menu.js +232 -0
  106. package/dist/components/ui/dropdown-menu.js.map +1 -0
  107. package/dist/components/ui/filter-provider.cjs +70 -13
  108. package/dist/components/ui/filter-provider.cjs.map +1 -1
  109. package/dist/components/ui/filter-provider.js +51 -1
  110. package/dist/components/ui/filter-provider.js.map +1 -1
  111. package/dist/components/ui/form.cjs +169 -0
  112. package/dist/components/ui/form.cjs.map +1 -0
  113. package/dist/components/ui/form.d.cts +46 -0
  114. package/dist/components/ui/form.d.ts +46 -0
  115. package/dist/components/ui/form.js +139 -0
  116. package/dist/components/ui/form.js.map +1 -0
  117. package/dist/components/ui/input.cjs +135 -15
  118. package/dist/components/ui/input.cjs.map +1 -1
  119. package/dist/components/ui/input.d.cts +15 -0
  120. package/dist/components/ui/input.d.ts +15 -0
  121. package/dist/components/ui/input.js +116 -3
  122. package/dist/components/ui/input.js.map +1 -1
  123. package/dist/components/ui/iran-province-heat.cjs +328 -5
  124. package/dist/components/ui/iran-province-heat.cjs.map +1 -1
  125. package/dist/components/ui/iran-province-heat.js +312 -2
  126. package/dist/components/ui/iran-province-heat.js.map +1 -1
  127. package/dist/components/ui/label.cjs +52 -0
  128. package/dist/components/ui/label.cjs.map +1 -0
  129. package/dist/components/ui/label.d.cts +10 -0
  130. package/dist/components/ui/label.d.ts +10 -0
  131. package/dist/components/ui/label.js +30 -0
  132. package/dist/components/ui/label.js.map +1 -0
  133. package/dist/components/ui/page-card.cjs +627 -8
  134. package/dist/components/ui/page-card.cjs.map +1 -1
  135. package/dist/components/ui/page-card.d.cts +3 -2
  136. package/dist/components/ui/page-card.d.ts +3 -2
  137. package/dist/components/ui/page-card.js +611 -5
  138. package/dist/components/ui/page-card.js.map +1 -1
  139. package/dist/components/ui/page-header.cjs +299 -0
  140. package/dist/components/ui/page-header.cjs.map +1 -0
  141. package/dist/components/ui/page-header.d.cts +21 -0
  142. package/dist/components/ui/page-header.d.ts +21 -0
  143. package/dist/components/ui/page-header.js +277 -0
  144. package/dist/components/ui/page-header.js.map +1 -0
  145. package/dist/components/ui/password-input.cjs +168 -0
  146. package/dist/components/ui/password-input.cjs.map +1 -0
  147. package/dist/components/ui/password-input.d.cts +48 -0
  148. package/dist/components/ui/password-input.d.ts +48 -0
  149. package/dist/components/ui/password-input.js +146 -0
  150. package/dist/components/ui/password-input.js.map +1 -0
  151. package/dist/components/ui/popover.cjs +51 -18
  152. package/dist/components/ui/popover.cjs.map +1 -1
  153. package/dist/components/ui/popover.js +30 -2
  154. package/dist/components/ui/popover.js.map +1 -1
  155. package/dist/components/ui/progress.cjs +95 -0
  156. package/dist/components/ui/progress.cjs.map +1 -0
  157. package/dist/components/ui/progress.d.cts +18 -0
  158. package/dist/components/ui/progress.d.ts +18 -0
  159. package/dist/components/ui/progress.js +72 -0
  160. package/dist/components/ui/progress.js.map +1 -0
  161. package/dist/components/ui/radio-card.cjs +84 -0
  162. package/dist/components/ui/radio-card.cjs.map +1 -0
  163. package/dist/components/ui/radio-card.d.cts +12 -0
  164. package/dist/components/ui/radio-card.d.ts +12 -0
  165. package/dist/components/ui/radio-card.js +58 -0
  166. package/dist/components/ui/radio-card.js.map +1 -0
  167. package/dist/components/ui/radio-group.cjs +62 -0
  168. package/dist/components/ui/radio-group.cjs.map +1 -0
  169. package/dist/components/ui/radio-group.d.cts +7 -0
  170. package/dist/components/ui/radio-group.d.ts +7 -0
  171. package/dist/components/ui/radio-group.js +38 -0
  172. package/dist/components/ui/radio-group.js.map +1 -0
  173. package/dist/components/ui/saved-query-card.cjs +409 -7
  174. package/dist/components/ui/saved-query-card.cjs.map +1 -1
  175. package/dist/components/ui/saved-query-card.js +394 -4
  176. package/dist/components/ui/saved-query-card.js.map +1 -1
  177. package/dist/components/ui/scroll-area.cjs +79 -0
  178. package/dist/components/ui/scroll-area.cjs.map +1 -0
  179. package/dist/components/ui/scroll-area.d.cts +14 -0
  180. package/dist/components/ui/scroll-area.d.ts +14 -0
  181. package/dist/components/ui/scroll-area.js +56 -0
  182. package/dist/components/ui/scroll-area.js.map +1 -0
  183. package/dist/components/ui/select.cjs +242 -0
  184. package/dist/components/ui/select.cjs.map +1 -0
  185. package/dist/components/ui/select.d.cts +29 -0
  186. package/dist/components/ui/select.d.ts +29 -0
  187. package/dist/components/ui/select.js +210 -0
  188. package/dist/components/ui/select.js.map +1 -0
  189. package/dist/components/ui/separator.cjs +105 -6
  190. package/dist/components/ui/separator.cjs.map +1 -1
  191. package/dist/components/ui/separator.js +87 -2
  192. package/dist/components/ui/separator.js.map +1 -1
  193. package/dist/components/ui/sheet.cjs +134 -38
  194. package/dist/components/ui/sheet.cjs.map +1 -1
  195. package/dist/components/ui/sheet.js +109 -2
  196. package/dist/components/ui/sheet.js.map +1 -1
  197. package/dist/{chunk-D2EBLE2B.cjs → components/ui/skeleton.cjs} +21 -16
  198. package/dist/components/ui/skeleton.cjs.map +1 -0
  199. package/dist/components/ui/skeleton.d.cts +90 -0
  200. package/dist/components/ui/skeleton.d.ts +90 -0
  201. package/dist/{chunk-SB5DSYR5.js → components/ui/skeleton.js} +8 -3
  202. package/dist/components/ui/skeleton.js.map +1 -0
  203. package/dist/components/ui/slider.cjs +129 -0
  204. package/dist/components/ui/slider.cjs.map +1 -0
  205. package/dist/components/ui/slider.d.cts +10 -0
  206. package/dist/components/ui/slider.d.ts +10 -0
  207. package/dist/components/ui/slider.js +107 -0
  208. package/dist/components/ui/slider.js.map +1 -0
  209. package/dist/components/ui/social-platform-badge.cjs +120 -0
  210. package/dist/components/ui/social-platform-badge.cjs.map +1 -0
  211. package/dist/components/ui/social-platform-badge.d.cts +21 -0
  212. package/dist/components/ui/social-platform-badge.d.ts +21 -0
  213. package/dist/components/ui/social-platform-badge.js +97 -0
  214. package/dist/components/ui/social-platform-badge.js.map +1 -0
  215. package/dist/components/ui/sonner.cjs +51 -0
  216. package/dist/components/ui/sonner.cjs.map +1 -0
  217. package/dist/components/ui/sonner.d.cts +13 -0
  218. package/dist/components/ui/sonner.d.ts +13 -0
  219. package/dist/components/ui/sonner.js +45 -0
  220. package/dist/components/ui/sonner.js.map +1 -0
  221. package/dist/components/ui/sparkline.cjs +159 -6
  222. package/dist/components/ui/sparkline.cjs.map +1 -1
  223. package/dist/components/ui/sparkline.js +142 -2
  224. package/dist/components/ui/sparkline.js.map +1 -1
  225. package/dist/components/ui/switch.cjs +96 -0
  226. package/dist/components/ui/switch.cjs.map +1 -0
  227. package/dist/components/ui/switch.d.cts +13 -0
  228. package/dist/components/ui/switch.d.ts +13 -0
  229. package/dist/components/ui/switch.js +73 -0
  230. package/dist/components/ui/switch.js.map +1 -0
  231. package/dist/components/ui/table.cjs +188 -0
  232. package/dist/components/ui/table.cjs.map +1 -0
  233. package/dist/components/ui/table.d.cts +59 -0
  234. package/dist/components/ui/table.d.ts +59 -0
  235. package/dist/components/ui/table.js +178 -0
  236. package/dist/components/ui/table.js.map +1 -0
  237. package/dist/components/ui/tabs.cjs +140 -0
  238. package/dist/components/ui/tabs.cjs.map +1 -0
  239. package/dist/components/ui/tabs.d.cts +21 -0
  240. package/dist/components/ui/tabs.d.ts +21 -0
  241. package/dist/components/ui/tabs.js +115 -0
  242. package/dist/components/ui/tabs.js.map +1 -0
  243. package/dist/components/ui/textarea.cjs +56 -0
  244. package/dist/components/ui/textarea.cjs.map +1 -0
  245. package/dist/components/ui/textarea.d.cts +5 -0
  246. package/dist/components/ui/textarea.d.ts +5 -0
  247. package/dist/components/ui/textarea.js +34 -0
  248. package/dist/components/ui/textarea.js.map +1 -0
  249. package/dist/components/ui/toggle-group.cjs +123 -0
  250. package/dist/components/ui/toggle-group.cjs.map +1 -0
  251. package/dist/components/ui/toggle-group.d.cts +7 -0
  252. package/dist/components/ui/toggle-group.d.ts +7 -0
  253. package/dist/components/ui/toggle-group.js +99 -0
  254. package/dist/components/ui/toggle-group.js.map +1 -0
  255. package/dist/components/ui/tooltip.cjs +77 -18
  256. package/dist/components/ui/tooltip.cjs.map +1 -1
  257. package/dist/components/ui/tooltip.js +56 -2
  258. package/dist/components/ui/tooltip.js.map +1 -1
  259. package/dist/{concept-card-RwPbqJ06.d.cts → concept-card-BXra9mr0.d.cts} +2 -2
  260. package/dist/{concept-card-CcOBb2Nz.d.ts → concept-card-BoJ5gIJD.d.ts} +2 -2
  261. package/dist/hooks/use-hotkey-registry.cjs +201 -14
  262. package/dist/hooks/use-hotkey-registry.cjs.map +1 -1
  263. package/dist/hooks/use-hotkey-registry.js +182 -2
  264. package/dist/hooks/use-hotkey-registry.js.map +1 -1
  265. package/dist/hooks/use-hotkeys.cjs +144 -9
  266. package/dist/hooks/use-hotkeys.cjs.map +1 -1
  267. package/dist/hooks/use-hotkeys.js +126 -1
  268. package/dist/hooks/use-hotkeys.js.map +1 -1
  269. package/dist/{i18n-CAd9wGOr.d.cts → i18n-BfRhV5aw.d.cts} +5 -3
  270. package/dist/{i18n-ArS3mqj0.d.ts → i18n-ewyqbKM-.d.ts} +5 -3
  271. package/dist/index.cjs +21003 -15720
  272. package/dist/index.cjs.map +1 -1
  273. package/dist/index.css +412 -71
  274. package/dist/index.d.cts +82 -490
  275. package/dist/index.d.ts +82 -490
  276. package/dist/index.js +6727 -976
  277. package/dist/index.js.map +1 -1
  278. package/dist/{page-card-CmShVqG-.d.cts → page-card-C9XXXOVr.d.cts} +3 -20
  279. package/dist/{page-card-HBn-cy4J.d.ts → page-card-DAnbez_f.d.ts} +3 -20
  280. package/dist/toggle-group-B8r4LOQw.d.cts +26 -0
  281. package/dist/toggle-group-B8r4LOQw.d.ts +26 -0
  282. package/package.json +132 -2
  283. package/tailwind.config.ts +45 -0
  284. package/dist/chunk-2ACKKPWA.cjs +0 -112
  285. package/dist/chunk-2ACKKPWA.cjs.map +0 -1
  286. package/dist/chunk-2UD3LGVX.cjs +0 -316
  287. package/dist/chunk-2UD3LGVX.cjs.map +0 -1
  288. package/dist/chunk-3QYYPPFJ.js.map +0 -1
  289. package/dist/chunk-4SVQNEVH.js +0 -173
  290. package/dist/chunk-4SVQNEVH.js.map +0 -1
  291. package/dist/chunk-4WONHORR.cjs +0 -152
  292. package/dist/chunk-4WONHORR.cjs.map +0 -1
  293. package/dist/chunk-5HCXH6GS.js +0 -409
  294. package/dist/chunk-5HCXH6GS.js.map +0 -1
  295. package/dist/chunk-5JJSRGJD.js.map +0 -1
  296. package/dist/chunk-5K6E4ZSW.cjs +0 -77
  297. package/dist/chunk-5K6E4ZSW.cjs.map +0 -1
  298. package/dist/chunk-5NY26ULO.js +0 -89
  299. package/dist/chunk-5NY26ULO.js.map +0 -1
  300. package/dist/chunk-7RVPG3LE.cjs +0 -231
  301. package/dist/chunk-7RVPG3LE.cjs.map +0 -1
  302. package/dist/chunk-AYEK3WOM.js +0 -207
  303. package/dist/chunk-AYEK3WOM.js.map +0 -1
  304. package/dist/chunk-BRMBLIQG.js +0 -53
  305. package/dist/chunk-BRMBLIQG.js.map +0 -1
  306. package/dist/chunk-CAJKSTXX.cjs.map +0 -1
  307. package/dist/chunk-CKFWMHQU.js +0 -401
  308. package/dist/chunk-CKFWMHQU.js.map +0 -1
  309. package/dist/chunk-CV3N3HVK.js +0 -672
  310. package/dist/chunk-CV3N3HVK.js.map +0 -1
  311. package/dist/chunk-D2EBLE2B.cjs.map +0 -1
  312. package/dist/chunk-GCZ6YATL.js +0 -940
  313. package/dist/chunk-GCZ6YATL.js.map +0 -1
  314. package/dist/chunk-GKRAZGDI.cjs +0 -84
  315. package/dist/chunk-GKRAZGDI.cjs.map +0 -1
  316. package/dist/chunk-GPYJ66CG.js +0 -45
  317. package/dist/chunk-GPYJ66CG.js.map +0 -1
  318. package/dist/chunk-HF6XU5NI.js +0 -84
  319. package/dist/chunk-HF6XU5NI.js.map +0 -1
  320. package/dist/chunk-HJPDZOMJ.cjs +0 -87
  321. package/dist/chunk-HJPDZOMJ.cjs.map +0 -1
  322. package/dist/chunk-HS3XI3CC.cjs +0 -69
  323. package/dist/chunk-HS3XI3CC.cjs.map +0 -1
  324. package/dist/chunk-HUCC3QH5.cjs +0 -53
  325. package/dist/chunk-HUCC3QH5.cjs.map +0 -1
  326. package/dist/chunk-HYZ6BQPS.cjs +0 -425
  327. package/dist/chunk-HYZ6BQPS.cjs.map +0 -1
  328. package/dist/chunk-ISCSZMYW.cjs +0 -106
  329. package/dist/chunk-ISCSZMYW.cjs.map +0 -1
  330. package/dist/chunk-IXFEFIDO.js +0 -82
  331. package/dist/chunk-IXFEFIDO.js.map +0 -1
  332. package/dist/chunk-JCJLN437.js +0 -108
  333. package/dist/chunk-JCJLN437.js.map +0 -1
  334. package/dist/chunk-JMKNNH63.cjs +0 -982
  335. package/dist/chunk-JMKNNH63.cjs.map +0 -1
  336. package/dist/chunk-JUBHQAA2.js +0 -53
  337. package/dist/chunk-JUBHQAA2.js.map +0 -1
  338. package/dist/chunk-K6G63EED.cjs +0 -41
  339. package/dist/chunk-K6G63EED.cjs.map +0 -1
  340. package/dist/chunk-KCWRCSI7.js +0 -62
  341. package/dist/chunk-KCWRCSI7.js.map +0 -1
  342. package/dist/chunk-KYM7NIJO.cjs +0 -433
  343. package/dist/chunk-KYM7NIJO.cjs.map +0 -1
  344. package/dist/chunk-L2L5CKC2.js +0 -291
  345. package/dist/chunk-L2L5CKC2.js.map +0 -1
  346. package/dist/chunk-M5CHZ5BA.js +0 -124
  347. package/dist/chunk-M5CHZ5BA.js.map +0 -1
  348. package/dist/chunk-MEK4RSGC.js +0 -65
  349. package/dist/chunk-MEK4RSGC.js.map +0 -1
  350. package/dist/chunk-MEKWH3GS.js +0 -89
  351. package/dist/chunk-MEKWH3GS.js.map +0 -1
  352. package/dist/chunk-MFTX2DDQ.js +0 -27
  353. package/dist/chunk-MFTX2DDQ.js.map +0 -1
  354. package/dist/chunk-MMC6M35Q.cjs.map +0 -1
  355. package/dist/chunk-NMH43BDC.js +0 -130
  356. package/dist/chunk-NMH43BDC.js.map +0 -1
  357. package/dist/chunk-NORDUD2T.cjs +0 -135
  358. package/dist/chunk-NORDUD2T.cjs.map +0 -1
  359. package/dist/chunk-NV4JOKWL.cjs +0 -197
  360. package/dist/chunk-NV4JOKWL.cjs.map +0 -1
  361. package/dist/chunk-O2JG7WY5.cjs +0 -121
  362. package/dist/chunk-O2JG7WY5.cjs.map +0 -1
  363. package/dist/chunk-ONO2FTV4.cjs +0 -68
  364. package/dist/chunk-ONO2FTV4.cjs.map +0 -1
  365. package/dist/chunk-OQB6HIUL.cjs +0 -108
  366. package/dist/chunk-OQB6HIUL.cjs.map +0 -1
  367. package/dist/chunk-OS6CMYAS.cjs +0 -79
  368. package/dist/chunk-OS6CMYAS.cjs.map +0 -1
  369. package/dist/chunk-PYURPUTV.js +0 -402
  370. package/dist/chunk-PYURPUTV.js.map +0 -1
  371. package/dist/chunk-RJ3HYZ7S.js +0 -44
  372. package/dist/chunk-RJ3HYZ7S.js.map +0 -1
  373. package/dist/chunk-RZNRIOLT.js +0 -128
  374. package/dist/chunk-RZNRIOLT.js.map +0 -1
  375. package/dist/chunk-S3T2L6NA.js +0 -38
  376. package/dist/chunk-S3T2L6NA.js.map +0 -1
  377. package/dist/chunk-S5IPJQZ3.cjs +0 -161
  378. package/dist/chunk-S5IPJQZ3.cjs.map +0 -1
  379. package/dist/chunk-SB5DSYR5.js.map +0 -1
  380. package/dist/chunk-SFXV2DUH.js +0 -106
  381. package/dist/chunk-SFXV2DUH.js.map +0 -1
  382. package/dist/chunk-SXEPGD4Z.cjs +0 -152
  383. package/dist/chunk-SXEPGD4Z.cjs.map +0 -1
  384. package/dist/chunk-SXWSOU3Y.js +0 -89
  385. package/dist/chunk-SXWSOU3Y.js.map +0 -1
  386. package/dist/chunk-SZMVOHT7.cjs +0 -107
  387. package/dist/chunk-SZMVOHT7.cjs.map +0 -1
  388. package/dist/chunk-TWJXOV4C.js +0 -145
  389. package/dist/chunk-TWJXOV4C.js.map +0 -1
  390. package/dist/chunk-U3ADRIVO.cjs +0 -434
  391. package/dist/chunk-U3ADRIVO.cjs.map +0 -1
  392. package/dist/chunk-U5FLLCGC.cjs +0 -151
  393. package/dist/chunk-U5FLLCGC.cjs.map +0 -1
  394. package/dist/chunk-UOZN45G4.cjs +0 -130
  395. package/dist/chunk-UOZN45G4.cjs.map +0 -1
  396. package/dist/chunk-VHLDOG74.cjs +0 -167
  397. package/dist/chunk-VHLDOG74.cjs.map +0 -1
  398. package/dist/chunk-YC5KLN6I.js +0 -139
  399. package/dist/chunk-YC5KLN6I.js.map +0 -1
  400. package/dist/chunk-YENXXYUV.cjs +0 -111
  401. package/dist/chunk-YENXXYUV.cjs.map +0 -1
  402. package/dist/chunk-YFQWC2PW.js +0 -113
  403. package/dist/chunk-YFQWC2PW.js.map +0 -1
  404. package/dist/chunk-Z2TY4A75.cjs +0 -700
  405. package/dist/chunk-Z2TY4A75.cjs.map +0 -1
  406. package/dist/chunk-Z56O7UEU.cjs +0 -136
  407. package/dist/chunk-Z56O7UEU.cjs.map +0 -1
  408. package/dist/chunk-ZBZDR4ZC.js +0 -106
  409. package/dist/chunk-ZBZDR4ZC.js.map +0 -1
@@ -1,7 +1,613 @@
1
- export { PageCard } from '../../chunk-5HCXH6GS.js';
2
- import '../../chunk-MEK4RSGC.js';
3
- import '../../chunk-YC5KLN6I.js';
4
- import '../../chunk-CV3N3HVK.js';
5
- 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 { cva } from 'class-variance-authority';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ function convertToLocalNumbers(text, locale) {
12
+ if (locale === "fa" || locale === "ar") {
13
+ const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
14
+ return String(text).replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
15
+ }
16
+ return String(text);
17
+ }
18
+
19
+ // src/lib/i18n.ts
20
+ var statusLabels = {
21
+ fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631", normal: "\u0639\u0627\u062F\u06CC" },
22
+ ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631", normal: "\u0637\u0628\u064A\u0639\u064A" },
23
+ en: { critical: "Critical", warning: "Warning", normal: "Normal" }
24
+ };
25
+ var SIZE_CLASSES = {
26
+ sm: { badge: "h-6 text-xs px-2 gap-1.5", dot: "size-1.5" },
27
+ md: { badge: "h-7 text-sm px-2.5 gap-2", dot: "size-2" }
28
+ };
29
+ function tokenVar(status) {
30
+ return `--status-${status}`;
31
+ }
32
+ var StatusBadge = React.forwardRef(
33
+ ({ className, status, size = "md", showLabel = true, locale = "fa", animated, ...props }, ref) => {
34
+ const label = statusLabels[locale]?.[status] ?? statusLabels.fa[status];
35
+ const shouldPulse = animated ?? status === "critical";
36
+ const token = tokenVar(status);
37
+ return /* @__PURE__ */ jsxs(
38
+ "span",
39
+ {
40
+ ref,
41
+ "data-slot": "status-badge",
42
+ "data-status": status,
43
+ "aria-label": showLabel ? void 0 : label,
44
+ className: cn(
45
+ "inline-flex items-center rounded-full border font-medium transition-colors duration-150",
46
+ SIZE_CLASSES[size].badge,
47
+ className
48
+ ),
49
+ style: {
50
+ backgroundColor: `hsl(var(${token}) / 0.1)`,
51
+ borderColor: `hsl(var(${token}) / 0.3)`,
52
+ color: `hsl(var(${token}))`
53
+ },
54
+ ...props,
55
+ children: [
56
+ /* @__PURE__ */ jsxs("span", { className: "relative inline-flex", children: [
57
+ shouldPulse && /* @__PURE__ */ jsx(
58
+ "span",
59
+ {
60
+ className: "absolute inset-0 rounded-full animate-pulse-subtle",
61
+ style: { backgroundColor: `hsl(var(${token}) / 0.5)` },
62
+ "aria-hidden": "true"
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx(
66
+ "span",
67
+ {
68
+ className: cn("relative inline-block rounded-full", SIZE_CLASSES[size].dot),
69
+ style: { backgroundColor: `hsl(var(${token}))` },
70
+ "aria-hidden": "true"
71
+ }
72
+ )
73
+ ] }),
74
+ showLabel && /* @__PURE__ */ jsx("span", { children: label })
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ );
80
+ StatusBadge.displayName = "StatusBadge";
81
+ var PLATFORM_META = {
82
+ instagram: {
83
+ label: "Instagram",
84
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" }) })
85
+ },
86
+ twitter: {
87
+ label: "X",
88
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.737-8.835L1.254 2.25H8.08l4.259 5.63 5.905-5.63zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) })
89
+ },
90
+ tiktok: {
91
+ label: "TikTok",
92
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.16 8.16 0 004.77 1.52V6.75a4.85 4.85 0 01-1-.06z" }) })
93
+ },
94
+ youtube: {
95
+ label: "YouTube",
96
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }) })
97
+ },
98
+ linkedin: {
99
+ label: "LinkedIn",
100
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) })
101
+ },
102
+ telegram: {
103
+ label: "Telegram",
104
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0a12 12 0 00-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" }) })
105
+ },
106
+ threads: {
107
+ label: "Threads",
108
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.868 1.205 8.617.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.749-1.752-2.98-.065-1.19.388-2.285 1.277-3.086.84-.754 2.02-1.164 3.43-1.19.954-.018 1.858.09 2.695.322-.082-.858-.372-1.502-.861-1.903-.529-.434-1.32-.658-2.332-.67-.884.01-1.63.23-2.22.65l-1.11-1.75c.97-.625 2.18-.95 3.6-.97h.022c1.63.02 2.976.497 3.898 1.385.955.92 1.444 2.25 1.51 3.95.23.073.46.149.682.232 1.69.64 2.847 1.635 3.406 2.946.859 2.002.86 5.139-1.773 7.674-1.797 1.742-3.993 2.525-6.935 2.545zm.098-10.02c-.745.01-1.377.186-1.882.523-.443.298-.706.733-.67 1.215.03.564.342 1.017.876 1.275.516.25 1.087.299 1.58.127.684-.24 1.34-.93 1.614-2.366a9.68 9.68 0 00-1.518-.774z" }) })
109
+ },
110
+ facebook: {
111
+ label: "Facebook",
112
+ icon: ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.875v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }) })
113
+ }
114
+ };
115
+ var socialPlatformBadgeVariants = cva("inline-flex items-center font-medium transition-colors duration-150", {
116
+ variants: {
117
+ size: {
118
+ xs: "gap-1",
119
+ sm: "gap-1.5",
120
+ md: "gap-1.5",
121
+ lg: "gap-2"
122
+ },
123
+ variant: {
124
+ flat: "",
125
+ badge: "border border-border bg-surface-100"
126
+ }
127
+ },
128
+ compoundVariants: [
129
+ { variant: "badge", size: "xs", className: "px-1.5 py-0.5 rounded" },
130
+ { variant: "badge", size: "sm", className: "px-2 py-1 rounded" },
131
+ { variant: "badge", size: "md", className: "px-2.5 py-1 rounded-md" },
132
+ { variant: "badge", size: "lg", className: "px-3 py-1.5 rounded-md" }
133
+ ],
134
+ defaultVariants: { size: "sm", variant: "flat" }
135
+ });
136
+ var SIZE_CHILD_CLASSES = {
137
+ xs: { icon: "size-3", text: "text-xs" },
138
+ sm: { icon: "size-4", text: "text-xs" },
139
+ md: { icon: "size-5", text: "text-sm" },
140
+ lg: { icon: "size-6", text: "text-base" }
141
+ };
142
+ var SocialPlatformBadge = React.forwardRef(
143
+ ({ className, platform, size = "sm", showLabel = false, variant = "flat", style, ...props }, ref) => {
144
+ const meta = PLATFORM_META[platform];
145
+ const Icon = meta.icon;
146
+ const sizeClasses = SIZE_CHILD_CLASSES[size];
147
+ return /* @__PURE__ */ jsxs(
148
+ "span",
149
+ {
150
+ ref,
151
+ "data-slot": "social-platform-badge",
152
+ className: cn(socialPlatformBadgeVariants({ size, variant }), className),
153
+ style,
154
+ ...props,
155
+ children: [
156
+ /* @__PURE__ */ jsx(Icon, { className: cn(sizeClasses.icon, "shrink-0"), style: { color: `var(--social-platform-${platform})` } }),
157
+ showLabel && /* @__PURE__ */ jsx("span", { className: cn(sizeClasses.text, "text-foreground-light"), children: meta.label })
158
+ ]
159
+ }
160
+ );
161
+ }
162
+ );
163
+ SocialPlatformBadge.displayName = "SocialPlatformBadge";
164
+ var TREND_CLASSES = {
165
+ up: "text-[hsl(var(--sentiment-positive))]",
166
+ down: "text-[hsl(var(--sentiment-negative))]",
167
+ neutral: "text-[hsl(var(--sentiment-neutral))]"
168
+ };
169
+ function resolveTrend(data, trend) {
170
+ if (trend !== "auto") return trend;
171
+ if (data.length < 2) return "neutral";
172
+ const first = data[0];
173
+ const last = data[data.length - 1];
174
+ if (last > first) return "up";
175
+ if (last < first) return "down";
176
+ return "neutral";
177
+ }
178
+ var Sparkline = React.forwardRef(
179
+ ({
180
+ className,
181
+ data,
182
+ variant = "line",
183
+ trend = "auto",
184
+ width = 80,
185
+ height = 24,
186
+ strokeWidth = 1.5,
187
+ showEndDot = false,
188
+ padding = 2,
189
+ color,
190
+ barGap = 1,
191
+ "aria-label": ariaLabel,
192
+ ...props
193
+ }, ref) => {
194
+ const effectiveTrend = resolveTrend(data, trend);
195
+ const trendColorClass = color ? void 0 : TREND_CLASSES[effectiveTrend];
196
+ if (data.length === 0) {
197
+ return /* @__PURE__ */ jsx(
198
+ "div",
199
+ {
200
+ ref,
201
+ "data-slot": "sparkline",
202
+ "data-empty": "true",
203
+ "aria-hidden": "true",
204
+ className: cn("inline-block", className),
205
+ style: { width, height },
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+ const min = Math.min(...data);
211
+ const max = Math.max(...data);
212
+ const range = max - min || 1;
213
+ const innerW = width - padding * 2;
214
+ const innerH = height - padding * 2;
215
+ const stepX = data.length > 1 ? innerW / (data.length - 1) : 0;
216
+ const yFor = (v) => padding + innerH - (v - min) / range * innerH;
217
+ const xFor = (i) => padding + i * stepX;
218
+ const points = data.map((v, i) => ({ x: xFor(i), y: yFor(v) }));
219
+ const linePath = points.map((p, i) => `${i === 0 ? "M" : "L"}${p.x.toFixed(2)} ${p.y.toFixed(2)}`).join(" ");
220
+ const areaPath = `${linePath} L${points[points.length - 1].x.toFixed(2)} ${(height - padding).toFixed(
221
+ 2
222
+ )} L${points[0].x.toFixed(2)} ${(height - padding).toFixed(2)} Z`;
223
+ const stroke = color ?? "currentColor";
224
+ return /* @__PURE__ */ jsx(
225
+ "div",
226
+ {
227
+ ref,
228
+ "data-slot": "sparkline",
229
+ "data-variant": variant,
230
+ "data-trend": effectiveTrend,
231
+ role: ariaLabel ? "img" : void 0,
232
+ "aria-label": ariaLabel,
233
+ "aria-hidden": ariaLabel ? void 0 : true,
234
+ className: cn("inline-block align-middle", trendColorClass, className),
235
+ style: { width, height },
236
+ ...props,
237
+ children: /* @__PURE__ */ jsxs(
238
+ "svg",
239
+ {
240
+ width,
241
+ height,
242
+ viewBox: `0 0 ${width} ${height}`,
243
+ preserveAspectRatio: "none",
244
+ focusable: "false",
245
+ children: [
246
+ variant === "area" && /* @__PURE__ */ jsx("path", { d: areaPath, fill: stroke, opacity: 0.18 }),
247
+ (variant === "line" || variant === "area") && /* @__PURE__ */ jsx(
248
+ "path",
249
+ {
250
+ d: linePath,
251
+ fill: "none",
252
+ stroke,
253
+ strokeWidth,
254
+ strokeLinecap: "round",
255
+ strokeLinejoin: "round",
256
+ vectorEffect: "non-scaling-stroke"
257
+ }
258
+ ),
259
+ variant === "bars" && data.map((v, i) => {
260
+ const gap = barGap;
261
+ const barW = Math.max(0, stepX - gap);
262
+ const y = yFor(v);
263
+ const barH = Math.max(1, height - padding - y);
264
+ const x = xFor(i) - barW / 2;
265
+ return /* @__PURE__ */ jsx(
266
+ "rect",
267
+ {
268
+ x: x.toFixed(2),
269
+ y: y.toFixed(2),
270
+ width: barW.toFixed(2),
271
+ height: barH.toFixed(2),
272
+ rx: Math.min(1, barW / 3),
273
+ fill: stroke
274
+ },
275
+ i
276
+ );
277
+ }),
278
+ showEndDot && variant !== "bars" && /* @__PURE__ */ jsx(
279
+ "circle",
280
+ {
281
+ cx: points[points.length - 1].x.toFixed(2),
282
+ cy: points[points.length - 1].y.toFixed(2),
283
+ r: strokeWidth + 0.5,
284
+ fill: stroke
285
+ }
286
+ )
287
+ ]
288
+ }
289
+ )
290
+ }
291
+ );
292
+ }
293
+ );
294
+ Sparkline.displayName = "Sparkline";
295
+ var LABELS = {
296
+ fa: { real: "\u0648\u0627\u0642\u0639\u06CC", suspicious: "\u0645\u0634\u06A9\u0648\u06A9", bot: "\u0628\u0627\u062A", summary: "\u0646\u0631\u062E \u062D\u0633\u0627\u0628\u200C\u0647\u0627\u06CC \u0648\u0627\u0642\u0639\u06CC" },
297
+ ar: { real: "\u062D\u0642\u064A\u0642\u064A", suspicious: "\u0645\u0634\u0628\u0648\u0647", bot: "\u0631\u0648\u0628\u0648\u062A", summary: "\u0645\u0639\u062F\u0644 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u062D\u0642\u064A\u0642\u064A\u0629" },
298
+ en: { real: "Real", suspicious: "Suspicious", bot: "Bot", summary: "Real-account rate" }
299
+ };
300
+ var SEGMENT_STYLES = {
301
+ real: {
302
+ bar: "bg-[hsl(var(--sentiment-positive))]",
303
+ text: "text-[hsl(var(--sentiment-positive))]",
304
+ bg: "bg-[hsl(var(--sentiment-positive)/0.12)]",
305
+ dot: "bg-[hsl(var(--sentiment-positive))]"
306
+ },
307
+ suspicious: {
308
+ bar: "bg-[hsl(var(--warning-default))]",
309
+ text: "text-[hsl(var(--warning-default))]",
310
+ bg: "bg-[hsl(var(--warning-default)/0.12)]",
311
+ dot: "bg-[hsl(var(--warning-default))]"
312
+ },
313
+ bot: {
314
+ bar: "bg-[hsl(var(--destructive-default))]",
315
+ text: "text-[hsl(var(--destructive-default))]",
316
+ bg: "bg-[hsl(var(--destructive-default)/0.12)]",
317
+ dot: "bg-[hsl(var(--destructive-default))]"
318
+ }
319
+ };
320
+ var SEGMENT_ORDER = ["real", "suspicious", "bot"];
321
+ function calcPercents(data) {
322
+ const total = SEGMENT_ORDER.reduce((sum, k) => sum + (data[k] ?? 0), 0);
323
+ if (total === 0) return { real: 0, suspicious: 0, bot: 0 };
324
+ const floats = SEGMENT_ORDER.map((k) => ({ k, v: (data[k] ?? 0) / total * 100 }));
325
+ const floors = floats.map(({ k, v }) => ({ k, floor: Math.floor(v), rem: v - Math.floor(v) }));
326
+ const remaining = 100 - floors.reduce((s, f) => s + f.floor, 0);
327
+ const sorted = [...floors].sort((a, b) => b.rem - a.rem);
328
+ sorted.slice(0, remaining).forEach((f) => f.floor++);
329
+ const result = { real: 0, suspicious: 0, bot: 0 };
330
+ sorted.forEach(({ k, floor }) => result[k] = floor);
331
+ return result;
332
+ }
333
+ var BAR_HEIGHT = {
334
+ sm: "h-1.5",
335
+ md: "h-2",
336
+ lg: "h-3"
337
+ };
338
+ var BotDetectionMeter = React.forwardRef(
339
+ ({
340
+ className,
341
+ data,
342
+ variant = "stacked",
343
+ showCounts = false,
344
+ showPercent = true,
345
+ showSummary = true,
346
+ size = "md",
347
+ locale = "fa",
348
+ ...props
349
+ }, ref) => {
350
+ const labels = LABELS[locale];
351
+ const percents = calcPercents(data);
352
+ const total = SEGMENT_ORDER.reduce((sum, k) => sum + (data[k] ?? 0), 0);
353
+ const fmt = (n) => convertToLocalNumbers(n, locale);
354
+ if (variant === "compact") {
355
+ return /* @__PURE__ */ jsx(
356
+ "div",
357
+ {
358
+ ref,
359
+ "data-slot": "bot-detection-meter",
360
+ "data-variant": "compact",
361
+ className: cn("flex items-center gap-2 text-xs", className),
362
+ ...props,
363
+ children: SEGMENT_ORDER.map((k) => {
364
+ const value = showCounts ? data[k] ?? 0 : percents[k];
365
+ return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
366
+ /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", SEGMENT_STYLES[k].dot), "aria-hidden": "true" }),
367
+ /* @__PURE__ */ jsx("span", { className: "text-foreground-lighter", children: labels[k] }),
368
+ /* @__PURE__ */ jsxs("span", { className: cn("font-semibold tabular-nums", SEGMENT_STYLES[k].text), children: [
369
+ fmt(value),
370
+ !showCounts && showPercent && "\u066A"
371
+ ] })
372
+ ] }, k);
373
+ })
374
+ }
375
+ );
376
+ }
377
+ if (variant === "bars") {
378
+ return /* @__PURE__ */ jsx(
379
+ "div",
380
+ {
381
+ ref,
382
+ "data-slot": "bot-detection-meter",
383
+ "data-variant": "bars",
384
+ className: cn("flex flex-col gap-2", className),
385
+ ...props,
386
+ children: SEGMENT_ORDER.map((k) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
387
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
388
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-foreground", children: [
389
+ /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", SEGMENT_STYLES[k].dot), "aria-hidden": "true" }),
390
+ labels[k]
391
+ ] }),
392
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums text-foreground-lighter", children: [
393
+ showCounts && /* @__PURE__ */ jsx("span", { className: "me-2", children: fmt(data[k] ?? 0) }),
394
+ showPercent && /* @__PURE__ */ jsxs("span", { className: cn("font-semibold", SEGMENT_STYLES[k].text), children: [
395
+ fmt(percents[k]),
396
+ "\u066A"
397
+ ] })
398
+ ] })
399
+ ] }),
400
+ /* @__PURE__ */ jsx("div", { className: cn("w-full rounded-full overflow-hidden", SEGMENT_STYLES[k].bg, BAR_HEIGHT[size]), children: /* @__PURE__ */ jsx(
401
+ "div",
402
+ {
403
+ className: cn("h-full rounded-full transition-[width] duration-300", SEGMENT_STYLES[k].bar),
404
+ style: { width: `${percents[k]}%` },
405
+ role: "progressbar",
406
+ "aria-valuenow": percents[k],
407
+ "aria-valuemin": 0,
408
+ "aria-valuemax": 100,
409
+ "aria-label": `${labels[k]}: ${fmt(percents[k])}\u066A`
410
+ }
411
+ ) })
412
+ ] }, k))
413
+ }
414
+ );
415
+ }
416
+ return /* @__PURE__ */ jsxs(
417
+ "div",
418
+ {
419
+ ref,
420
+ "data-slot": "bot-detection-meter",
421
+ "data-variant": "stacked",
422
+ className: cn("flex flex-col gap-2", className),
423
+ ...props,
424
+ children: [
425
+ showSummary && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
426
+ /* @__PURE__ */ jsx("span", { className: "text-foreground-lighter", children: labels.summary }),
427
+ /* @__PURE__ */ jsxs("span", { className: cn("font-semibold tabular-nums", SEGMENT_STYLES.real.text), children: [
428
+ fmt(percents.real),
429
+ "\u066A",
430
+ showCounts && total > 0 && /* @__PURE__ */ jsxs("span", { className: "ms-1 font-normal text-foreground-lighter", children: [
431
+ "(",
432
+ fmt(data.real),
433
+ " / ",
434
+ fmt(total),
435
+ ")"
436
+ ] })
437
+ ] })
438
+ ] }),
439
+ /* @__PURE__ */ jsx(
440
+ "div",
441
+ {
442
+ className: cn("w-full rounded-full overflow-hidden bg-surface-200 flex", BAR_HEIGHT[size]),
443
+ role: "group",
444
+ "aria-label": labels.summary,
445
+ children: SEGMENT_ORDER.map((k) => {
446
+ if (percents[k] === 0) return null;
447
+ return /* @__PURE__ */ jsx(
448
+ "div",
449
+ {
450
+ className: cn("h-full transition-[width] duration-300", SEGMENT_STYLES[k].bar),
451
+ style: { width: `${percents[k]}%` },
452
+ role: "progressbar",
453
+ "aria-valuenow": percents[k],
454
+ "aria-valuemin": 0,
455
+ "aria-valuemax": 100,
456
+ "aria-label": `${labels[k]}: ${fmt(percents[k])}\u066A`
457
+ },
458
+ k
459
+ );
460
+ })
461
+ }
462
+ ),
463
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-4 text-xs", children: SEGMENT_ORDER.map((k) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
464
+ /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", SEGMENT_STYLES[k].dot), "aria-hidden": "true" }),
465
+ /* @__PURE__ */ jsx("span", { className: "text-foreground-lighter", children: labels[k] }),
466
+ /* @__PURE__ */ jsx("span", { className: cn("font-semibold tabular-nums", SEGMENT_STYLES[k].text), children: showCounts ? fmt(data[k] ?? 0) : `${fmt(percents[k])}\u066A` })
467
+ ] }, k)) })
468
+ ]
469
+ }
470
+ );
471
+ }
472
+ );
473
+ BotDetectionMeter.displayName = "BotDetectionMeter";
474
+ function formatBig(n, locale) {
475
+ if (n >= 1e6) return `${convertToLocalNumbers((n / 1e6).toFixed(1), locale)}M`;
476
+ if (n >= 1e3) return `${convertToLocalNumbers((n / 1e3).toFixed(1), locale)}K`;
477
+ return convertToLocalNumbers(n, locale);
478
+ }
479
+ var PageCard = React.forwardRef(
480
+ ({
481
+ className,
482
+ handle,
483
+ subtitle,
484
+ avatarSrc,
485
+ platform,
486
+ status,
487
+ followers,
488
+ followerTrend,
489
+ engagementRate,
490
+ postsPerWeek,
491
+ contentMix,
492
+ botDetection,
493
+ interactive = false,
494
+ locale = "fa",
495
+ onClick,
496
+ ...props
497
+ }, ref) => {
498
+ const isClickable = interactive || !!onClick;
499
+ const totalContent = contentMix && (contentMix.photo ?? 0) + (contentMix.video ?? 0) + (contentMix.carousel ?? 0) + (contentMix.story ?? 0);
500
+ return /* @__PURE__ */ jsxs(
501
+ "div",
502
+ {
503
+ ref,
504
+ "data-slot": "page-card",
505
+ "data-status": status,
506
+ role: isClickable ? "button" : "article",
507
+ tabIndex: isClickable ? 0 : void 0,
508
+ onClick,
509
+ onKeyDown: isClickable ? (e) => {
510
+ if ((e.key === "Enter" || e.key === " ") && e.target === e.currentTarget) {
511
+ e.preventDefault();
512
+ e.currentTarget.click();
513
+ }
514
+ } : void 0,
515
+ className: cn(
516
+ "flex flex-col gap-3 rounded-lg border border-border bg-background p-4 transition-colors",
517
+ 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",
518
+ className
519
+ ),
520
+ ...props,
521
+ children: [
522
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
523
+ avatarSrc ? /* @__PURE__ */ jsx(
524
+ "img",
525
+ {
526
+ src: avatarSrc,
527
+ alt: "",
528
+ className: "size-10 rounded-full object-cover object-center shrink-0 border border-border"
529
+ }
530
+ ) : /* @__PURE__ */ jsx("div", { className: "size-10 rounded-full bg-surface-200 shrink-0", "aria-hidden": "true" }),
531
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
532
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
533
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground truncate", children: handle }),
534
+ platform && /* @__PURE__ */ jsx(SocialPlatformBadge, { platform, size: "xs" }),
535
+ status && /* @__PURE__ */ jsx(StatusBadge, { status, size: "sm", animated: true, locale })
536
+ ] }),
537
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground-lighter truncate", children: subtitle })
538
+ ] })
539
+ ] }),
540
+ (typeof followers === "number" || followerTrend || typeof engagementRate === "number") && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-3 text-xs", children: [
541
+ typeof followers === "number" && /* @__PURE__ */ jsxs("div", { children: [
542
+ /* @__PURE__ */ jsx("div", { className: "text-foreground-lighter", children: locale === "fa" ? "\u0641\u0627\u0644\u0648\u0648\u0631" : locale === "ar" ? "\u0645\u062A\u0627\u0628\u0639\u0648\u0646" : "Followers" }),
543
+ /* @__PURE__ */ jsx("div", { className: "text-base font-semibold tabular-nums text-foreground", children: formatBig(followers, locale) })
544
+ ] }),
545
+ followerTrend && followerTrend.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
546
+ /* @__PURE__ */ jsx("div", { className: "text-foreground-lighter", children: locale === "fa" ? "\u0631\u0648\u0646\u062F" : locale === "ar" ? "\u0627\u0644\u0627\u062A\u062C\u0627\u0647" : "Trend" }),
547
+ /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(Sparkline, { data: followerTrend, variant: "line", width: 80, height: 24 }) })
548
+ ] }),
549
+ typeof engagementRate === "number" && /* @__PURE__ */ jsxs("div", { children: [
550
+ /* @__PURE__ */ jsx("div", { className: "text-foreground-lighter", children: locale === "fa" ? "\u0646\u0631\u062E \u062A\u0639\u0627\u0645\u0644" : locale === "ar" ? "\u0645\u0639\u062F\u0644 \u0627\u0644\u062A\u0641\u0627\u0639\u0644" : "Engagement" }),
551
+ /* @__PURE__ */ jsxs("div", { className: "text-base font-semibold tabular-nums text-foreground", children: [
552
+ convertToLocalNumbers(engagementRate.toFixed(1), locale),
553
+ locale === "en" ? "%" : "\u066A"
554
+ ] })
555
+ ] })
556
+ ] }),
557
+ contentMix && totalContent && totalContent > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
558
+ /* @__PURE__ */ jsx("div", { className: "text-2xs text-foreground-lighter", children: locale === "fa" ? "\u062A\u0631\u06A9\u06CC\u0628 \u0645\u062D\u062A\u0648\u0627" : locale === "ar" ? "\u0645\u0632\u064A\u062C \u0627\u0644\u0645\u062D\u062A\u0648\u0649" : "Content mix" }),
559
+ /* @__PURE__ */ jsxs("div", { className: "flex h-1.5 w-full overflow-hidden rounded-full bg-surface-200", children: [
560
+ contentMix.photo ? /* @__PURE__ */ jsx(
561
+ "span",
562
+ {
563
+ style: {
564
+ width: `${contentMix.photo / totalContent * 100}%`,
565
+ backgroundColor: "hsl(var(--chart-1))"
566
+ },
567
+ "aria-label": `photo ${contentMix.photo}`
568
+ }
569
+ ) : null,
570
+ contentMix.video ? /* @__PURE__ */ jsx(
571
+ "span",
572
+ {
573
+ style: {
574
+ width: `${contentMix.video / totalContent * 100}%`,
575
+ backgroundColor: "hsl(var(--chart-2))"
576
+ },
577
+ "aria-label": `video ${contentMix.video}`
578
+ }
579
+ ) : null,
580
+ contentMix.carousel ? /* @__PURE__ */ jsx(
581
+ "span",
582
+ {
583
+ style: {
584
+ width: `${contentMix.carousel / totalContent * 100}%`,
585
+ backgroundColor: "hsl(var(--chart-3))"
586
+ },
587
+ "aria-label": `carousel ${contentMix.carousel}`
588
+ }
589
+ ) : null,
590
+ contentMix.story ? /* @__PURE__ */ jsx(
591
+ "span",
592
+ {
593
+ style: {
594
+ width: `${contentMix.story / totalContent * 100}%`,
595
+ backgroundColor: "hsl(var(--chart-4))"
596
+ },
597
+ "aria-label": `story ${contentMix.story}`
598
+ }
599
+ ) : null
600
+ ] })
601
+ ] }),
602
+ botDetection && /* @__PURE__ */ jsx("div", { "data-slot": "page-card-bot", children: /* @__PURE__ */ jsx(BotDetectionMeter, { data: botDetection, variant: "compact", size: "sm", locale }) }),
603
+ typeof postsPerWeek === "number" && /* @__PURE__ */ jsx("div", { className: "text-2xs text-foreground-lighter pt-1 border-t border-border", children: locale === "fa" ? `\u0645\u06CC\u0627\u0646\u06AF\u06CC\u0646 ${convertToLocalNumbers(postsPerWeek.toFixed(1), "fa")} \u067E\u0633\u062A \u062F\u0631 \u0647\u0641\u062A\u0647` : locale === "ar" ? `\u0645\u062A\u0648\u0633\u0637 ${convertToLocalNumbers(postsPerWeek.toFixed(1), "ar")} \u0645\u0646\u0634\u0648\u0631 \u0641\u064A \u0627\u0644\u0623\u0633\u0628\u0648\u0639` : `Avg ${postsPerWeek.toFixed(1)} posts/week` })
604
+ ]
605
+ }
606
+ );
607
+ }
608
+ );
609
+ PageCard.displayName = "PageCard";
610
+
611
+ export { PageCard };
6
612
  //# sourceMappingURL=page-card.js.map
7
613
  //# sourceMappingURL=page-card.js.map